Initial commit for OpenECOMP SDN-C OA&M
Change-Id: I7ab579fd0d206bf356f36d52dcdf4f71f1fa2680
Signed-off-by: Timoney, Daniel (dt5972) <dtimoney@att.com>
Former-commit-id: 2a9f0edd09581f907e62ec4689b5ac94dd5382ba
diff --git a/.gitignore b/.gitignore
new file mode 100755
index 0000000..662e956
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,54 @@
+#####standard .git ignore entries#####
+
+## IDE Specific Files ##
+org.eclipse.core.resources.prefs
+.classpath
+.project
+.settings
+.idea
+.externalToolBuilders
+maven-eclipse.xml
+workspace
+
+## Compilation Files ##
+*.class
+**/target
+target
+target-ide
+MANIFEST.MF
+
+## Misc Ignores (OS specific etc) ##
+bin/
+dist
+*~
+*.ipr
+*.iml
+*.iws
+classes
+out/
+.DS_STORE
+.metadata
+
+## antlr4 generated files ##
+ExprGrammarBaseListener.java
+ExprGrammarLexer.java
+ExprGrammarListener.java
+ExprGrammarParser.java
+ExprGrammar.tokens
+ExprGrammarLexer.tokens
+
+# BlackDuck generated file
+sdnc-oam_bdio.jsonld
+blackDuckHubProjectName.txt
+blackDuckHubProjectVersionName.txt
+
+#Chef local mode cache
+local-mode-cache
+
+# Generated local docker image
+**/docker-files/opt
+**/src/main/resources/opt
+
+#dgbuilder releases
+#**/dgbuilder/releases
+
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..e90ebed
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,4 @@
+[gerrit]
+host=gerrit.openecomp.org
+port=29418
+project=sdnc/oam.git
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..3ea5081
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,22 @@
+/*
+ * ============LICENSE_START==========================================
+ * ===================================================================
+ * Copyright © 2017 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============================================
+ *
+ * ECOMP and OpenECOMP are trademarks
+ * and service marks of AT&T Intellectual Property.
+ *
+ */
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..98b67fb
--- /dev/null
+++ b/README.md
@@ -0,0 +1,14 @@
+This source repository contains the code for SDN Controller operations, administration and maintenance utilities. This code depends on the following, which should be downloaded and compiled first:
+
+1. org.openecomp.sdnc/sdnc-core
+2. org.openecomp.sdnc/sdnc-adaptors
+3. org.openecomp.sdnc/sdnc-northbound
+4. org.openecomp.sdnc/sdnc-plugins
+
+To compile this code:
+
+1. Make sure your local Maven settings file ($HOME/.m2/settings.xml) contains references to the OpenECOMP repositories and OpenDaylight repositories. See example-settings.xml for an example.
+
+2. To compile, run "mvn clean install".
+
+
diff --git a/admportal/.gitignore b/admportal/.gitignore
new file mode 100644
index 0000000..1b8a6ba
--- /dev/null
+++ b/admportal/.gitignore
@@ -0,0 +1,12 @@
+org.eclipse.core.resources.prefs
+.classpath
+.project
+.settings
+.idea
+.externalToolBuilders
+maven-eclipse.xml
+*.class
+target/
+MANIFEST.MF
+.DS_STORE
+.metadata
diff --git a/admportal/README b/admportal/README
new file mode 100644
index 0000000..5712b36
--- /dev/null
+++ b/admportal/README
@@ -0,0 +1,52 @@
+5.0.1 Initial Build for 1512
+
+10/29/2015
+MR 36,39
+
+11/12/2015
+MR: SDNGC-84 Handle BGP block correctly
+
+11/18/2015
+5.0.3
+MR: SDNGC-145 error with loading uCPE reference data files
+MR: SDNGC=153
+
+11/19/2015
+5.0.4
+MR: SDNGC-154 change ack namespaces for instar request
+
+1/5/2016
+6.0.1
+MR: SDNGC-323 changes to reflect CSI namespace changes
+
+1/7/2016
+6.0.2
+MR: SDNGC-339
+
+1/19/2016
+MR: SDNGC-394 add as-override and secondary-asn to AVPN BGP params
+
+1/20/2016
+MR: SDNGC-404 send response back to CSI before sending request to SDNC
+
+1/27/2016
+MR: SDNGC-463 UCPE Reference Data Change for ucpenminterfaces_MMDDYYYY file
+
+2/15/2016
+MR: SDNGC-489 Add multicast parameters
+
+2/29/2016
+MR: SDNGC-690 AdmPortal protocol changes for 1604
+
+3/22/2016
+MR: SDNGC-909 instar.js handling CSI namespace changes
+
+5/4/2016
+MR: SDNGC-1386 Fix multicast indicator checking
+
+5/19/2016
+MR: SDNGC-1522 CSI format changes in 16.07 for instar CDN
+
+5/23/2016
+MR: SDNGC-1531 More CSI format fixes
+
diff --git a/admportal/certs/README b/admportal/certs/README
new file mode 100644
index 0000000..4ac10fc
--- /dev/null
+++ b/admportal/certs/README
@@ -0,0 +1 @@
+SSL certs are stored in this directory
diff --git a/admportal/config/admportal.json b/admportal/config/admportal.json
new file mode 100644
index 0000000..830b762
--- /dev/null
+++ b/admportal/config/admportal.json
@@ -0,0 +1,68 @@
+{
+ "MainMenu": "gamma",
+ "dbConnLimit": "100",
+ "home": "/opt/admportal",
+ "sslEnabled": "false",
+ "nonSslPort": "8843",
+ "ConexusNetworkPort": "8443",
+ "AppNetworkPort": "8543",
+ "clusterPort": "8443",
+ "serviceHomingServiceType": "SDN-ETHERNET-INTERNET",
+ "passwordKey": "QtfJMKggVk",
+ "preloadImportDirectory": "C:/data/csv",
+ "clusterPrefixURL": "/jolokia/read/org.opendaylight.controller:Category=Shards,name=member-",
+ "clusterMidURL": "-shard-",
+ "clusterSuffixURL": "-config,type=DistributedConfigDatastore",
+ "shards": [
+ "default",
+ "inventory",
+ "topology"
+ ],
+ "dbFabric": "false",
+ "ip-addresses": {
+ "lo": "127.0.0.1",
+ "eth0": "127.0.0.1",
+ "docker0": "172.17.0.1",
+ "virbr0": "192.168.122.1"
+ },
+ "svclogicPropertiesDb01": "/opt/openecomp/sdnc/data/properties/svclogic.properties.sdnctldb01",
+ "databases": [
+ "dbhost|sdnctldb01"
+ ],
+ "dbFabricServer": "localhost",
+ "dbFabricPort": "32275",
+ "dbFabricGroupId": "hagroup1",
+ "dbFabricUser": "admin",
+ "dbFabricPassword": "admin",
+ "dbFabricDB": "mysql",
+ "dbUser": "sdnctl",
+ "dbPassword": "gamma",
+ "dbName": "sdnctl",
+ "odlProtocol": "http",
+ "odlHost": "sdnhost",
+ "odlConexusHost": "sdnhost",
+ "odlPort": "8181",
+ "odlConexusPort": "8181",
+ "odlUser": "admin",
+ "odlPasswd": "admin",
+ "ConexusNetwork_sslCert": "",
+ "ConexusNetwork_sslKey": "",
+ "AppNetwork_sslCert": "",
+ "AppNetwork_sslKey": "",
+ "hostnameList": [
+ {
+ "hname": "localhost"
+ }
+ ],
+ "shard_list": [
+ {
+ "shard_name": "default"
+ },
+ {
+ "shard_name": "inventory"
+ },
+ {
+ "shard_name": "topology"
+ }
+ ]
+}
diff --git a/admportal/config/admportal.log4js.json b/admportal/config/admportal.log4js.json
new file mode 100644
index 0000000..1dcb699
--- /dev/null
+++ b/admportal/config/admportal.log4js.json
@@ -0,0 +1,154 @@
+{
+ "appenders": [
+ {
+ "category": "accesslog",
+ "type" : "dateFile",
+ "absolute": true,
+ "filename": "/opt/admportal/logs/accesslog.rp",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "usertrace",
+ "type" : "file",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/usertrace.log"
+ },
+ {
+ "category": "tracelog",
+ "type" : "dateFile",
+ "absolute": true,
+ "filename": "/opt/admportal/logs/tracelog.log",
+ "pattern": "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "eipam",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/eipam.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "instar",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/instar.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "app",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/app.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "csp",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/csp.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "db",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/db.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "admin",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/admin.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "resalloc",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/resalloc.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "logs",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/applogs.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "sla",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/sla.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "gamma",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/gamma.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "odl",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/odl.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "mobility",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/mobility.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "ucpe",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/ucpe.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "user",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/user.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ }
+ ]
+}
diff --git a/admportal/config/svclogic.properties b/admportal/config/svclogic.properties
new file mode 100644
index 0000000..f0cc841
--- /dev/null
+++ b/admportal/config/svclogic.properties
@@ -0,0 +1,5 @@
+org.openecomp.sdnctl.sli.dbtype = jdbc
+org.openecomp.sdnctl.sli.jdbc.url = jdbc:mysql://sdnctldb01:3306/sdnctl
+org.openecomp.sdnctl.sli.jdbc.database = sdnctl
+org.openecomp.sdnctl.sli.jdbc.user = sdnctl
+org.openecomp.sdnctl.sli.jdbc.password = gamma
diff --git a/admportal/config/svclogic.properties.sdnctldb01 b/admportal/config/svclogic.properties.sdnctldb01
new file mode 100644
index 0000000..f0cc841
--- /dev/null
+++ b/admportal/config/svclogic.properties.sdnctldb01
@@ -0,0 +1,5 @@
+org.openecomp.sdnctl.sli.dbtype = jdbc
+org.openecomp.sdnctl.sli.jdbc.url = jdbc:mysql://sdnctldb01:3306/sdnctl
+org.openecomp.sdnctl.sli.jdbc.database = sdnctl
+org.openecomp.sdnctl.sli.jdbc.user = sdnctl
+org.openecomp.sdnctl.sli.jdbc.password = gamma
diff --git a/admportal/config/svclogic.properties.sdnctldb02 b/admportal/config/svclogic.properties.sdnctldb02
new file mode 100644
index 0000000..c2b48ec
--- /dev/null
+++ b/admportal/config/svclogic.properties.sdnctldb02
@@ -0,0 +1,5 @@
+org.openecomp.sdnctl.sli.dbtype = jdbc
+org.openecomp.sdnctl.sli.jdbc.url = jdbc:mysql://sdnctldb02:3306/sdnctl
+org.openecomp.sdnctl.sli.jdbc.database = sdnctl
+org.openecomp.sdnctl.sli.jdbc.user = sdnctl
+org.openecomp.sdnctl.sli.jdbc.password = gamma
diff --git a/admportal/lib/CSPCheck.java b/admportal/lib/CSPCheck.java
new file mode 100644
index 0000000..dac1d88
--- /dev/null
+++ b/admportal/lib/CSPCheck.java
@@ -0,0 +1,27 @@
+import esGateKeeper.*;
+import java.util.*;
+import java.io.*;
+import java.net.*;
+public class CSPCheck{
+
+public static void main(String[] args){
+ try{
+ String attuid = "";
+ if(args != null && args.length == 2){
+ String secCookie = args[0];
+ //validationEnv can be DEVL or PROD
+ String validationEnv=args[1];
+ String retString = esGateKeeper.esGateKeeper(secCookie, "CSP", validationEnv, -5, "/tmp/");
+ if(retString != null){
+ String[] dataArr = retString.split("\\|");
+ attuid= dataArr[5];
+
+ }
+ System.out.print("{" + "\"attuid\" : \"" + attuid + "\"}");
+ }
+ }catch(Exception e){
+ System.out.print("{" + "\"attuid\" : \"ERROR\"}");
+ }
+}
+}
+
diff --git a/admportal/lib/GLCookieDecryption.jar b/admportal/lib/GLCookieDecryption.jar
new file mode 100644
index 0000000..aa3d059
--- /dev/null
+++ b/admportal/lib/GLCookieDecryption.jar
Binary files differ
diff --git a/admportal/lib/Helloworld.java b/admportal/lib/Helloworld.java
new file mode 100644
index 0000000..daf4741
--- /dev/null
+++ b/admportal/lib/Helloworld.java
@@ -0,0 +1,7 @@
+public class Helloworld{
+
+public static void main(String[] args){
+ System.out.println("hello world");
+ }
+}
+
diff --git a/admportal/lib/ST4-4.0.8.jar b/admportal/lib/ST4-4.0.8.jar
new file mode 100644
index 0000000..144828b
--- /dev/null
+++ b/admportal/lib/ST4-4.0.8.jar
Binary files differ
diff --git a/admportal/lib/antlr4-4.5.1.jar b/admportal/lib/antlr4-4.5.1.jar
new file mode 100755
index 0000000..81039db
--- /dev/null
+++ b/admportal/lib/antlr4-4.5.1.jar
Binary files differ
diff --git a/admportal/lib/antlr4-runtime-4.5.1.jar b/admportal/lib/antlr4-runtime-4.5.1.jar
new file mode 100755
index 0000000..7807292
--- /dev/null
+++ b/admportal/lib/antlr4-runtime-4.5.1.jar
Binary files differ
diff --git a/admportal/lib/java-concurrent-hash-trie-map-0.2.23.jar b/admportal/lib/java-concurrent-hash-trie-map-0.2.23.jar
new file mode 100644
index 0000000..2c019d0
--- /dev/null
+++ b/admportal/lib/java-concurrent-hash-trie-map-0.2.23.jar
Binary files differ
diff --git a/admportal/lib/jsr305-2.0.3.jar b/admportal/lib/jsr305-2.0.3.jar
new file mode 100644
index 0000000..cc39b73
--- /dev/null
+++ b/admportal/lib/jsr305-2.0.3.jar
Binary files differ
diff --git a/admportal/lib/object-cache-api-0.6.3-Helium-SR1.jar b/admportal/lib/object-cache-api-0.6.3-Helium-SR1.jar
new file mode 100644
index 0000000..e75db74
--- /dev/null
+++ b/admportal/lib/object-cache-api-0.6.3-Helium-SR1.jar
Binary files differ
diff --git a/admportal/lib/org.abego.treelayout.core-1.0.1.jar b/admportal/lib/org.abego.treelayout.core-1.0.1.jar
new file mode 100644
index 0000000..2350adc
--- /dev/null
+++ b/admportal/lib/org.abego.treelayout.core-1.0.1.jar
Binary files differ
diff --git a/admportal/lib/org.eclipse.osgi-3.8.1.v20120830-144521.jar b/admportal/lib/org.eclipse.osgi-3.8.1.v20120830-144521.jar
new file mode 100644
index 0000000..c152830
--- /dev/null
+++ b/admportal/lib/org.eclipse.osgi-3.8.1.v20120830-144521.jar
Binary files differ
diff --git a/admportal/lib/util-0.6.3-Helium-SR1.jar b/admportal/lib/util-0.6.3-Helium-SR1.jar
new file mode 100644
index 0000000..0f8ca62
--- /dev/null
+++ b/admportal/lib/util-0.6.3-Helium-SR1.jar
Binary files differ
diff --git a/admportal/lib/yang-binding-0.6.3-Helium-SR1.jar b/admportal/lib/yang-binding-0.6.3-Helium-SR1.jar
new file mode 100644
index 0000000..6adef24
--- /dev/null
+++ b/admportal/lib/yang-binding-0.6.3-Helium-SR1.jar
Binary files differ
diff --git a/admportal/lib/yang-common-0.6.3-Helium-SR1.jar b/admportal/lib/yang-common-0.6.3-Helium-SR1.jar
new file mode 100644
index 0000000..1fc5f9f
--- /dev/null
+++ b/admportal/lib/yang-common-0.6.3-Helium-SR1.jar
Binary files differ
diff --git a/admportal/package.json b/admportal/package.json
new file mode 100644
index 0000000..e625ef2
--- /dev/null
+++ b/admportal/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "admportal",
+ "version": "0.0.0",
+ "private": true,
+ "scripts": {
+ "start": "node ./bin/www"
+ },
+ "dependencies": {
+ "body-parser": "~1.8.1",
+ "bootstrap": "^3.3.6",
+ "bootstrap-submenu": "^2.0.3",
+ "bootstrap-table": "^1.9.1",
+ "cookie-parser": "~1.3.3",
+ "csv": "^0.4.1",
+ "csvtojson": "^0.5.3",
+ "dateformat": "^1.0.11",
+ "debug": "~2.0.0",
+ "ejs": "~0.8.5",
+ "express": "~4.9.0",
+ "express-session": "^1.10.1",
+ "fs.extra": "^1.3.2",
+ "lodash": "^3.8.0",
+ "moment": "^2.13.0",
+ "morgan": "~1.3.0",
+ "multer": "^1.1.0",
+ "mysql": "^2.5.4",
+ "node-uuid": "^1.4.7",
+ "path": "^0.12.7",
+ "properties-reader": "0.0.9",
+ "sax": "^0.6.1",
+ "serve-favicon": "~2.1.3",
+ "xml2js": "^0.4.5",
+ "dns-sync": "~0.1.3"
+ }
+}
diff --git a/admportal/pom.xml b/admportal/pom.xml
new file mode 100644
index 0000000..2ce7ac0
--- /dev/null
+++ b/admportal/pom.xml
@@ -0,0 +1,97 @@
+<?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/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>sdnc-oam</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>admportal</artifactId>
+
+ <version>1.0.0</version>
+
+ <name>Admin Portal</name>
+ <description>Admin Portal</description>
+
+ <properties>
+ <application.name>admportal</application.name>
+ <skip.SWM>true</skip.SWM>
+ <adm.base>/opt/app/admportal</adm.base>
+ <maven.build.timestamp.format>yyMMdd-HHmmss</maven.build.timestamp.format>
+ <build.number>${maven.build.timestamp}</build.number>
+ <SWM_VERSION>${project.version}-${build.number}</SWM_VERSION>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>sli-common</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.31</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>create-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <finalName>${application.name}.${project.version}</finalName>
+ <attach>true</attach>
+ <descriptors>
+ <descriptor>src/assembly/assemble_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <phase>prepare-package</phase>
+ <configuration>
+ <transitive>false</transitive>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <useRepositoryLayout>false</useRepositoryLayout>
+ <addParentPoms>false</addParentPoms>
+ <copyPom>false</copyPom>
+ <scope>provided</scope>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <organization>
+ <name>AT&T</name>
+ </organization>
+</project>
+
diff --git a/admportal/process.http.json b/admportal/process.http.json
new file mode 100644
index 0000000..717f2bc
--- /dev/null
+++ b/admportal/process.http.json
@@ -0,0 +1,17 @@
+{
+ "apps" :[
+ {
+ "name" : "http_admportal",
+ "script" : "/opt/admportal/bin/www",
+ "out_file" : "/opt/admportal/logs/http_admportal.log",
+ "error_file" : "/opt/admportal/logs/error_http_admportal.log",
+ "cwd" : "/opt/admportal",
+ "env":
+ {
+ "NODE_ENV": "production",
+ "HTTP_PROTOCOL": "http:",
+ "CLASSPATH" : "/opt/admportal/lib/GLCookieDecryption.jar:/opt/admportal/lib"
+ }
+ }
+ ]
+}
diff --git a/admportal/process.https.json b/admportal/process.https.json
new file mode 100644
index 0000000..a9b5ae7
--- /dev/null
+++ b/admportal/process.https.json
@@ -0,0 +1,17 @@
+{
+ "apps" :[
+ {
+ "name" : "admportal8443",
+ "script" : "/opt/admportal/bin/wwwssl",
+ "out_file" : "/opt/admportal/logs/admportal8443.log",
+ "error_file" : "/opt/admportal/logs/error_admportal8443.log",
+ "cwd" : "/opt/admportal",
+ "env":
+ {
+ "NODE_ENV": "production",
+ "HTTP_PROTOCOL": "https:",
+ "CLASSPATH" : "/opt/admportal/lib/GLCookieDecryption.jar:/opt/admportal/lib"
+ }
+ }
+ ]
+}
diff --git a/admportal/public/fonts/glyphicons-halflings-regular.eot b/admportal/public/fonts/glyphicons-halflings-regular.eot
new file mode 100644
index 0000000..b93a495
--- /dev/null
+++ b/admportal/public/fonts/glyphicons-halflings-regular.eot
Binary files differ
diff --git a/admportal/public/fonts/glyphicons-halflings-regular.svg b/admportal/public/fonts/glyphicons-halflings-regular.svg
new file mode 100644
index 0000000..94fb549
--- /dev/null
+++ b/admportal/public/fonts/glyphicons-halflings-regular.svg
@@ -0,0 +1,288 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
+<font-face units-per-em="1200" ascent="960" descent="-240" />
+<missing-glyph horiz-adv-x="500" />
+<glyph horiz-adv-x="0" />
+<glyph horiz-adv-x="400" />
+<glyph unicode=" " />
+<glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
+<glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode=" " />
+<glyph unicode="¥" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
+<glyph unicode=" " horiz-adv-x="650" />
+<glyph unicode=" " horiz-adv-x="1300" />
+<glyph unicode=" " horiz-adv-x="650" />
+<glyph unicode=" " horiz-adv-x="1300" />
+<glyph unicode=" " horiz-adv-x="433" />
+<glyph unicode=" " horiz-adv-x="325" />
+<glyph unicode=" " horiz-adv-x="216" />
+<glyph unicode=" " horiz-adv-x="216" />
+<glyph unicode=" " horiz-adv-x="162" />
+<glyph unicode=" " horiz-adv-x="260" />
+<glyph unicode=" " horiz-adv-x="72" />
+<glyph unicode=" " horiz-adv-x="260" />
+<glyph unicode=" " horiz-adv-x="325" />
+<glyph unicode="€" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
+<glyph unicode="₽" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
+<glyph unicode="−" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="⌛" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
+<glyph unicode="◼" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="☁" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
+<glyph unicode="⛺" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
+<glyph unicode="✉" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
+<glyph unicode="✏" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
+<glyph unicode="" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
+<glyph unicode="" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
+<glyph unicode="" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
+<glyph unicode="" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
+<glyph unicode="" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
+<glyph unicode="" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
+<glyph unicode="" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
+<glyph unicode="" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
+<glyph unicode="" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
+<glyph unicode="" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
+<glyph unicode="" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
+<glyph unicode="" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
+<glyph unicode="" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
+<glyph unicode="" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
+<glyph unicode="" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
+<glyph unicode="" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
+<glyph unicode="" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
+<glyph unicode="" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
+<glyph unicode="" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
+<glyph unicode="" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
+<glyph unicode="" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
+<glyph unicode="" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
+<glyph unicode="" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
+<glyph unicode="" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
+<glyph unicode="" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
+<glyph unicode="" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
+<glyph unicode="" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
+<glyph unicode="" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
+<glyph unicode="" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
+<glyph unicode="" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
+<glyph unicode="" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
+<glyph unicode="" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
+<glyph unicode="" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
+<glyph unicode="" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
+<glyph unicode="" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
+<glyph unicode="" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
+<glyph unicode="" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
+<glyph unicode="" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
+<glyph unicode="" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
+<glyph unicode="" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
+<glyph unicode="" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
+<glyph unicode="" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
+<glyph unicode="" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
+<glyph unicode="" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
+<glyph unicode="" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
+<glyph unicode="" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
+<glyph unicode="" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
+<glyph unicode="" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
+<glyph unicode="" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
+<glyph unicode="" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
+<glyph unicode="" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
+<glyph unicode="" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
+<glyph unicode="" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
+<glyph unicode="" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
+<glyph unicode="" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
+<glyph unicode="" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
+<glyph unicode="" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
+<glyph unicode="" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
+<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
+<glyph unicode="" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
+<glyph unicode="" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
+<glyph unicode="" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
+<glyph unicode="" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
+<glyph unicode="" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
+<glyph unicode="" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
+<glyph unicode="" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
+<glyph unicode="" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
+<glyph unicode="" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
+<glyph unicode="" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
+<glyph unicode="" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
+<glyph unicode="" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
+<glyph unicode="" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
+<glyph unicode="" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
+<glyph unicode="" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
+<glyph unicode="" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
+<glyph unicode="" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
+<glyph unicode="" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
+<glyph unicode="" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
+<glyph unicode="" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
+<glyph unicode="" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
+<glyph unicode="" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
+<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
+<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
+<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
+<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
+<glyph unicode="" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
+<glyph unicode="" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
+<glyph unicode="" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
+<glyph unicode="" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
+<glyph unicode="" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
+<glyph unicode="" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
+<glyph unicode="" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
+<glyph unicode="" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
+<glyph unicode="" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
+<glyph unicode="" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
+<glyph unicode="" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
+<glyph unicode="" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
+<glyph unicode="" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
+<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
+<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
+<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
+<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
+<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
+<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
+<glyph unicode="" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
+<glyph unicode="" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
+<glyph unicode="" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
+<glyph unicode="" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
+<glyph unicode="" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
+<glyph unicode="" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
+<glyph unicode="" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
+<glyph unicode="" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
+<glyph unicode="" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
+<glyph unicode="" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
+<glyph unicode="" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
+<glyph unicode="" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
+<glyph unicode="" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
+<glyph unicode="" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
+<glyph unicode="" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
+<glyph unicode="" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
+<glyph unicode="" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
+<glyph unicode="" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
+<glyph unicode="" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
+<glyph unicode="" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
+<glyph unicode="" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
+<glyph unicode="" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
+<glyph unicode="" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
+<glyph unicode="" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
+<glyph unicode="" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
+<glyph unicode="" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
+<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
+<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
+<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
+<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
+<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
+<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
+<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
+<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
+<glyph unicode="" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
+<glyph unicode="" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
+<glyph unicode="" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
+<glyph unicode="" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
+<glyph unicode="" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
+<glyph unicode="" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
+<glyph unicode="" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
+<glyph unicode="" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
+<glyph unicode="" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
+<glyph unicode="" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
+<glyph unicode="" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
+<glyph unicode="" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
+<glyph unicode="" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
+<glyph unicode="" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
+<glyph unicode="" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
+<glyph unicode="" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
+<glyph unicode="" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
+<glyph unicode="" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
+<glyph unicode="" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
+<glyph unicode="" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
+<glyph unicode="" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
+<glyph unicode="" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
+<glyph unicode="" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
+<glyph unicode="" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
+<glyph unicode="" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
+<glyph unicode="" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
+<glyph unicode="" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
+<glyph unicode="" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
+<glyph unicode="" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
+<glyph unicode="" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
+<glyph unicode="" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
+<glyph unicode="" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
+<glyph unicode="" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
+<glyph unicode="" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
+<glyph unicode="" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
+<glyph unicode="" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
+<glyph unicode="" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
+<glyph unicode="" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
+<glyph unicode="" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
+<glyph unicode="" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
+<glyph unicode="" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
+<glyph unicode="" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
+<glyph unicode="" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
+<glyph unicode="" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
+<glyph unicode="" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
+<glyph unicode="" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
+<glyph unicode="" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
+<glyph unicode="🔑" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
+<glyph unicode="🚪" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
+</font>
+</defs></svg>
\ No newline at end of file
diff --git a/admportal/public/fonts/glyphicons-halflings-regular.ttf b/admportal/public/fonts/glyphicons-halflings-regular.ttf
new file mode 100644
index 0000000..1413fc6
--- /dev/null
+++ b/admportal/public/fonts/glyphicons-halflings-regular.ttf
Binary files differ
diff --git a/admportal/public/fonts/glyphicons-halflings-regular.woff b/admportal/public/fonts/glyphicons-halflings-regular.woff
new file mode 100644
index 0000000..9e61285
--- /dev/null
+++ b/admportal/public/fonts/glyphicons-halflings-regular.woff
Binary files differ
diff --git a/admportal/public/fonts/glyphicons-halflings-regular.woff2 b/admportal/public/fonts/glyphicons-halflings-regular.woff2
new file mode 100644
index 0000000..64539b5
--- /dev/null
+++ b/admportal/public/fonts/glyphicons-halflings-regular.woff2
Binary files differ
diff --git a/admportal/public/javascripts/admportal.js b/admportal/public/javascripts/admportal.js
new file mode 100644
index 0000000..d73517d
--- /dev/null
+++ b/admportal/public/javascripts/admportal.js
@@ -0,0 +1,79 @@
+function uploadFile(form)
+{
+ if ( form.filename.value.length == 0)
+ {
+ bootbox.alert('Must select a file.');
+ return false;
+ }
+ else { form.submit(); return; }
+}
+function isDigit(num)
+{
+ // false means error
+ // true means success
+ //var dlNum = obj.value;
+ var charAllowed="0123456789";
+ var thisChar;
+ var cnt = 0;
+ var blankCnt = 0;
+ if ( num.length > 0 )
+ {
+ for (var i = 0; i < num.length; i++)
+ {
+ thisChar = num.substring(i, i+1);
+ if ( charAllowed.indexOf(thisChar) != -1 ) cnt++;
+ if ( num.substring(i, i + 1) == " " ) blankCnt++;
+ }
+ if ( cnt != num.length ){
+ return false;
+ }
+ else if (blankCnt == num.length) {
+ return false;
+ }
+ return true;
+ }
+ else
+ return false;
+}
+function isFloat(num)
+{
+ // false means error
+ // true means success
+ //var dlNum = obj.value;
+ var charAllowed=".-0123456789";
+ var thisChar;
+ var cnt = 0;
+ var blankCnt = 0;
+ if ( num.length > 0 )
+ {
+ for (var i = 0; i < num.length; i++)
+ {
+ thisChar = num.substring(i, i+1);
+ if ( charAllowed.indexOf(thisChar) != -1 ) cnt++;
+ if ( num.substring(i, i + 1) == " " ) blankCnt++;
+ }
+ if ( cnt != num.length ){
+ return false;
+ }
+ else if (blankCnt == num.length) {
+ return false;
+ }
+ return true;
+ }
+ else
+ return false;
+}
+function isblank(s)
+{
+ // true means all blank
+ // flase means not blank
+ for(var i=0; i<s.length; i++) {
+ var c = s.charAt(i);
+ if ( (c != ' ') && (c != '\n') && (c != '\t') ) return false;
+ }
+ return true;
+}
+
+function padLeft(nr, n, str){
+ return Array(n-String(nr).length+1).join(str||'0')+nr;
+}
diff --git a/admportal/public/javascripts/bootbox.min.js b/admportal/public/javascripts/bootbox.min.js
new file mode 100644
index 0000000..0dc0cbd
--- /dev/null
+++ b/admportal/public/javascripts/bootbox.min.js
@@ -0,0 +1,6 @@
+/**
+ * bootbox.js v4.4.0
+ *
+ * http://bootboxjs.com/license.txt
+ */
+!function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.bootbox=b(a.jQuery)}(this,function a(b,c){"use strict";function d(a){var b=q[o.locale];return b?b[a]:q.en[a]}function e(a,c,d){a.stopPropagation(),a.preventDefault();var e=b.isFunction(d)&&d.call(c,a)===!1;e||c.modal("hide")}function f(a){var b,c=0;for(b in a)c++;return c}function g(a,c){var d=0;b.each(a,function(a,b){c(a,b,d++)})}function h(a){var c,d;if("object"!=typeof a)throw new Error("Please supply an object of options");if(!a.message)throw new Error("Please specify a message");return a=b.extend({},o,a),a.buttons||(a.buttons={}),c=a.buttons,d=f(c),g(c,function(a,e,f){if(b.isFunction(e)&&(e=c[a]={callback:e}),"object"!==b.type(e))throw new Error("button with key "+a+" must be an object");e.label||(e.label=a),e.className||(e.className=2>=d&&f===d-1?"btn-primary":"btn-default")}),a}function i(a,b){var c=a.length,d={};if(1>c||c>2)throw new Error("Invalid argument length");return 2===c||"string"==typeof a[0]?(d[b[0]]=a[0],d[b[1]]=a[1]):d=a[0],d}function j(a,c,d){return b.extend(!0,{},a,i(c,d))}function k(a,b,c,d){var e={className:"bootbox-"+a,buttons:l.apply(null,b)};return m(j(e,d,c),b)}function l(){for(var a={},b=0,c=arguments.length;c>b;b++){var e=arguments[b],f=e.toLowerCase(),g=e.toUpperCase();a[f]={label:d(g)}}return a}function m(a,b){var d={};return g(b,function(a,b){d[b]=!0}),g(a.buttons,function(a){if(d[a]===c)throw new Error("button key "+a+" is not allowed (options are "+b.join("\n")+")")}),a}var n={dialog:"<div class='bootbox modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-body'><div class='bootbox-body'></div></div></div></div></div>",header:"<div class='modal-header'><h4 class='modal-title'></h4></div>",footer:"<div class='modal-footer'></div>",closeButton:"<button type='button' class='bootbox-close-button close' data-dismiss='modal' aria-hidden='true'>×</button>",form:"<form class='bootbox-form'></form>",inputs:{text:"<input class='bootbox-input bootbox-input-text form-control' autocomplete=off type=text />",textarea:"<textarea class='bootbox-input bootbox-input-textarea form-control'></textarea>",email:"<input class='bootbox-input bootbox-input-email form-control' autocomplete='off' type='email' />",select:"<select class='bootbox-input bootbox-input-select form-control'></select>",checkbox:"<div class='checkbox'><label><input class='bootbox-input bootbox-input-checkbox' type='checkbox' /></label></div>",date:"<input class='bootbox-input bootbox-input-date form-control' autocomplete=off type='date' />",time:"<input class='bootbox-input bootbox-input-time form-control' autocomplete=off type='time' />",number:"<input class='bootbox-input bootbox-input-number form-control' autocomplete=off type='number' />",password:"<input class='bootbox-input bootbox-input-password form-control' autocomplete='off' type='password' />"}},o={locale:"en",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body"},p={};p.alert=function(){var a;if(a=k("alert",["ok"],["message","callback"],arguments),a.callback&&!b.isFunction(a.callback))throw new Error("alert requires callback property to be a function when provided");return a.buttons.ok.callback=a.onEscape=function(){return b.isFunction(a.callback)?a.callback.call(this):!0},p.dialog(a)},p.confirm=function(){var a;if(a=k("confirm",["cancel","confirm"],["message","callback"],arguments),a.buttons.cancel.callback=a.onEscape=function(){return a.callback.call(this,!1)},a.buttons.confirm.callback=function(){return a.callback.call(this,!0)},!b.isFunction(a.callback))throw new Error("confirm requires a callback");return p.dialog(a)},p.prompt=function(){var a,d,e,f,h,i,k;if(f=b(n.form),d={className:"bootbox-prompt",buttons:l("cancel","confirm"),value:"",inputType:"text"},a=m(j(d,arguments,["title","callback"]),["cancel","confirm"]),i=a.show===c?!0:a.show,a.message=f,a.buttons.cancel.callback=a.onEscape=function(){return a.callback.call(this,null)},a.buttons.confirm.callback=function(){var c;switch(a.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":c=h.val();break;case"checkbox":var d=h.find("input:checked");c=[],g(d,function(a,d){c.push(b(d).val())})}return a.callback.call(this,c)},a.show=!1,!a.title)throw new Error("prompt requires a title");if(!b.isFunction(a.callback))throw new Error("prompt requires a callback");if(!n.inputs[a.inputType])throw new Error("invalid prompt type");switch(h=b(n.inputs[a.inputType]),a.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":h.val(a.value);break;case"select":var o={};if(k=a.inputOptions||[],!b.isArray(k))throw new Error("Please pass an array of input options");if(!k.length)throw new Error("prompt with select requires options");g(k,function(a,d){var e=h;if(d.value===c||d.text===c)throw new Error("given options in wrong format");d.group&&(o[d.group]||(o[d.group]=b("<optgroup/>").attr("label",d.group)),e=o[d.group]),e.append("<option value='"+d.value+"'>"+d.text+"</option>")}),g(o,function(a,b){h.append(b)}),h.val(a.value);break;case"checkbox":var q=b.isArray(a.value)?a.value:[a.value];if(k=a.inputOptions||[],!k.length)throw new Error("prompt with checkbox requires options");if(!k[0].value||!k[0].text)throw new Error("given options in wrong format");h=b("<div/>"),g(k,function(c,d){var e=b(n.inputs[a.inputType]);e.find("input").attr("value",d.value),e.find("label").append(d.text),g(q,function(a,b){b===d.value&&e.find("input").prop("checked",!0)}),h.append(e)})}return a.placeholder&&h.attr("placeholder",a.placeholder),a.pattern&&h.attr("pattern",a.pattern),a.maxlength&&h.attr("maxlength",a.maxlength),f.append(h),f.on("submit",function(a){a.preventDefault(),a.stopPropagation(),e.find(".btn-primary").click()}),e=p.dialog(a),e.off("shown.bs.modal"),e.on("shown.bs.modal",function(){h.focus()}),i===!0&&e.modal("show"),e},p.dialog=function(a){a=h(a);var d=b(n.dialog),f=d.find(".modal-dialog"),i=d.find(".modal-body"),j=a.buttons,k="",l={onEscape:a.onEscape};if(b.fn.modal===c)throw new Error("$.fn.modal is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.");if(g(j,function(a,b){k+="<button data-bb-handler='"+a+"' type='button' class='btn "+b.className+"'>"+b.label+"</button>",l[a]=b.callback}),i.find(".bootbox-body").html(a.message),a.animate===!0&&d.addClass("fade"),a.className&&d.addClass(a.className),"large"===a.size?f.addClass("modal-lg"):"small"===a.size&&f.addClass("modal-sm"),a.title&&i.before(n.header),a.closeButton){var m=b(n.closeButton);a.title?d.find(".modal-header").prepend(m):m.css("margin-top","-10px").prependTo(i)}return a.title&&d.find(".modal-title").html(a.title),k.length&&(i.after(n.footer),d.find(".modal-footer").html(k)),d.on("hidden.bs.modal",function(a){a.target===this&&d.remove()}),d.on("shown.bs.modal",function(){d.find(".btn-primary:first").focus()}),"static"!==a.backdrop&&d.on("click.dismiss.bs.modal",function(a){d.children(".modal-backdrop").length&&(a.currentTarget=d.children(".modal-backdrop").get(0)),a.target===a.currentTarget&&d.trigger("escape.close.bb")}),d.on("escape.close.bb",function(a){l.onEscape&&e(a,d,l.onEscape)}),d.on("click",".modal-footer button",function(a){var c=b(this).data("bb-handler");e(a,d,l[c])}),d.on("click",".bootbox-close-button",function(a){e(a,d,l.onEscape)}),d.on("keyup",function(a){27===a.which&&d.trigger("escape.close.bb")}),b(a.container).append(d),d.modal({backdrop:a.backdrop?"static":!1,keyboard:!1,show:!1}),a.show&&d.modal("show"),d},p.setDefaults=function(){var a={};2===arguments.length?a[arguments[0]]=arguments[1]:a=arguments[0],b.extend(o,a)},p.hideAll=function(){return b(".bootbox").modal("hide"),p};var q={bg_BG:{OK:"Ок",CANCEL:"Отказ",CONFIRM:"Потвърждавам"},br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},cs:{OK:"OK",CANCEL:"Zrušit",CONFIRM:"Potvrdit"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},el:{OK:"Εντάξει",CANCEL:"Ακύρωση",CONFIRM:"Επιβεβαίωση"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},et:{OK:"OK",CANCEL:"Katkesta",CONFIRM:"OK"},fa:{OK:"قبول",CANCEL:"لغو",CONFIRM:"تایید"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"אישור",CANCEL:"ביטול",CONFIRM:"אישור"},hu:{OK:"OK",CANCEL:"Mégsem",CONFIRM:"Megerősít"},hr:{OK:"OK",CANCEL:"Odustani",CONFIRM:"Potvrdi"},id:{OK:"OK",CANCEL:"Batal",CONFIRM:"OK"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},ja:{OK:"OK",CANCEL:"キャンセル",CONFIRM:"確認"},lt:{OK:"Gerai",CANCEL:"Atšaukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"Apstiprināt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},pt:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Confirmar"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},sq:{OK:"OK",CANCEL:"Anulo",CONFIRM:"Prano"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},th:{OK:"ตกลง",CANCEL:"ยกเลิก",CONFIRM:"ยืนยัน"},tr:{OK:"Tamam",CANCEL:"İptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};return p.addLocale=function(a,c){return b.each(["OK","CANCEL","CONFIRM"],function(a,b){if(!c[b])throw new Error("Please supply a translation for '"+b+"'")}),q[a]={OK:c.OK,CANCEL:c.CANCEL,CONFIRM:c.CONFIRM},p},p.removeLocale=function(a){return delete q[a],p},p.setLocale=function(a){return p.setDefaults("locale",a)},p.init=function(c){return a(c||b)},p});
\ No newline at end of file
diff --git a/admportal/public/javascripts/bootstrap-submenu.js b/admportal/public/javascripts/bootstrap-submenu.js
new file mode 100644
index 0000000..7c8e411
--- /dev/null
+++ b/admportal/public/javascripts/bootstrap-submenu.js
@@ -0,0 +1,185 @@
+/*!
+ * Bootstrap-submenu v2.0.3 (https://vsn4ik.github.io/bootstrap-submenu/)
+ * Copyright 2015 Vasily A. (https://github.com/vsn4ik)
+ * Licensed under the MIT license
+ */
+
+/**
+ * $.inArray: friends with IE8. Use Array.prototype.indexOf in future.
+ * $.proxy: friends with IE8. Use Function.prototype.bind in future.
+ */
+
+'use strict';
+
+(function(factory) {
+ if (typeof define == 'function' && define.amd) {
+ // AMD. Register as an anonymous module
+ define(['jquery'], factory);
+ }
+ else if (typeof exports == 'object') {
+ // Node/CommonJS
+ module.exports = factory(require('jquery'));
+ }
+ else {
+ // Browser globals
+ factory(jQuery);
+ }
+})(function($) {
+ function Item(element) {
+ this.$element = $(element);
+ this.$menu = this.$element.closest('.dropdown-menu');
+ this.$main = this.$menu.parent();
+ this.$items = this.$menu.children('.dropdown-submenu');
+
+ this.init();
+ }
+
+ Item.prototype = {
+ init: function() {
+ this.$element.on('keydown', $.proxy(this, 'keydown'));
+ },
+ close: function() {
+ this.$main.removeClass('open');
+ this.$items.trigger('hide.bs.submenu');
+ },
+ keydown: function(event) {
+ // 27: Esc
+
+ if (event.keyCode == 27) {
+ event.stopPropagation();
+
+ this.close();
+ this.$main.children('a, button').trigger('focus');
+ }
+ }
+ };
+
+ function SubmenuItem(element) {
+ this.$element = $(element);
+ this.$main = this.$element.parent();
+ this.$menu = this.$main.children('.dropdown-menu');
+ this.$subs = this.$main.siblings('.dropdown-submenu');
+ this.$items = this.$menu.children('.dropdown-submenu');
+
+ this.init();
+ }
+
+ $.extend(SubmenuItem.prototype, Item.prototype, {
+ init: function() {
+ this.$element.on({
+ click: $.proxy(this, 'click'),
+ keydown: $.proxy(this, 'keydown')
+ });
+
+ this.$main.on('hide.bs.submenu', $.proxy(this, 'hide'));
+ },
+ click: function(event) {
+ // Fix a[href="#"]. For community
+ event.preventDefault();
+
+ event.stopPropagation();
+
+ this.toggle();
+ },
+ hide: function(event) {
+ // Stop event bubbling
+ event.stopPropagation();
+
+ this.close();
+ },
+ open: function() {
+ this.$main.addClass('open');
+ this.$subs.trigger('hide.bs.submenu');
+ },
+ toggle: function() {
+ if (this.$main.hasClass('open')) {
+ this.close();
+ }
+ else {
+ this.open();
+ }
+ },
+ keydown: function(event) {
+ // 13: Return, 32: Spacebar
+
+ if (event.keyCode == 32) {
+ // Off vertical scrolling
+ event.preventDefault();
+ }
+
+ if ($.inArray(event.keyCode, [13, 32]) != -1) {
+ this.toggle();
+ }
+ }
+ });
+
+ function Submenupicker(element) {
+ this.$element = $(element);
+ this.$main = this.$element.parent();
+ this.$menu = this.$main.children('.dropdown-menu');
+ this.$items = this.$menu.children('.dropdown-submenu');
+
+ this.init();
+ }
+
+ Submenupicker.prototype = {
+ init: function() {
+ this.$menu.off('keydown.bs.dropdown.data-api');
+ this.$menu.on('keydown', $.proxy(this, 'itemKeydown'));
+
+ this.$menu.find('li > a').each(function() {
+ new Item(this);
+ });
+
+ this.$menu.find('.dropdown-submenu > a').each(function() {
+ new SubmenuItem(this);
+ });
+
+ this.$main.on('hidden.bs.dropdown', $.proxy(this, 'hidden'));
+ },
+ hidden: function() {
+ this.$items.trigger('hide.bs.submenu');
+ },
+ itemKeydown: function(event) {
+ // 38: Arrow up, 40: Arrow down
+
+ if ($.inArray(event.keyCode, [38, 40]) != -1) {
+ // Off vertical scrolling
+ event.preventDefault();
+
+ event.stopPropagation();
+
+ var $items = this.$menu.find('li:not(.disabled):visible > a');
+ var index = $items.index(event.target);
+
+ if (event.keyCode == 38 && index !== 0) {
+ index--;
+ }
+ else if (event.keyCode == 40 && index !== $items.length - 1) {
+ index++;
+ }
+ else {
+ return;
+ }
+
+ $items.eq(index).trigger('focus');
+ }
+ }
+ };
+
+ // For AMD/Node/CommonJS used elements (optional)
+ // http://learn.jquery.com/jquery-ui/environments/amd/
+ return $.fn.submenupicker = function(elements) {
+ var $elements = this instanceof $ ? this : $(elements);
+
+ return $elements.each(function() {
+ var data = $.data(this, 'bs.submenu');
+
+ if (!data) {
+ data = new Submenupicker(this);
+
+ $.data(this, 'bs.submenu', data);
+ }
+ });
+ };
+});
diff --git a/admportal/public/javascripts/bootstrap-submenu.min.js b/admportal/public/javascripts/bootstrap-submenu.min.js
new file mode 100644
index 0000000..6293c43
--- /dev/null
+++ b/admportal/public/javascripts/bootstrap-submenu.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-submenu v2.0.3 (https://vsn4ik.github.io/bootstrap-submenu/)
+ * Copyright 2015 Vasily A. (https://github.com/vsn4ik)
+ * Licensed under the MIT license
+ */
+
+"use strict";!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){function b(b){this.$element=a(b),this.$menu=this.$element.closest(".dropdown-menu"),this.$main=this.$menu.parent(),this.$items=this.$menu.children(".dropdown-submenu"),this.init()}function c(b){this.$element=a(b),this.$main=this.$element.parent(),this.$menu=this.$main.children(".dropdown-menu"),this.$subs=this.$main.siblings(".dropdown-submenu"),this.$items=this.$menu.children(".dropdown-submenu"),this.init()}function d(b){this.$element=a(b),this.$main=this.$element.parent(),this.$menu=this.$main.children(".dropdown-menu"),this.$items=this.$menu.children(".dropdown-submenu"),this.init()}return b.prototype={init:function(){this.$element.on("keydown",a.proxy(this,"keydown"))},close:function(){this.$main.removeClass("open"),this.$items.trigger("hide.bs.submenu")},keydown:function(a){27==a.keyCode&&(a.stopPropagation(),this.close(),this.$main.children("a, button").trigger("focus"))}},a.extend(c.prototype,b.prototype,{init:function(){this.$element.on({click:a.proxy(this,"click"),keydown:a.proxy(this,"keydown")}),this.$main.on("hide.bs.submenu",a.proxy(this,"hide"))},click:function(a){a.preventDefault(),a.stopPropagation(),this.toggle()},hide:function(a){a.stopPropagation(),this.close()},open:function(){this.$main.addClass("open"),this.$subs.trigger("hide.bs.submenu")},toggle:function(){this.$main.hasClass("open")?this.close():this.open()},keydown:function(b){32==b.keyCode&&b.preventDefault(),-1!=a.inArray(b.keyCode,[13,32])&&this.toggle()}}),d.prototype={init:function(){this.$menu.off("keydown.bs.dropdown.data-api"),this.$menu.on("keydown",a.proxy(this,"itemKeydown")),this.$menu.find("li > a").each(function(){new b(this)}),this.$menu.find(".dropdown-submenu > a").each(function(){new c(this)}),this.$main.on("hidden.bs.dropdown",a.proxy(this,"hidden"))},hidden:function(){this.$items.trigger("hide.bs.submenu")},itemKeydown:function(b){if(-1!=a.inArray(b.keyCode,[38,40])){b.preventDefault(),b.stopPropagation();var c=this.$menu.find("li:not(.disabled):visible > a"),d=c.index(b.target);if(38==b.keyCode&&0!==d)d--;else{if(40!=b.keyCode||d===c.length-1)return;d++}c.eq(d).trigger("focus")}}},a.fn.submenupicker=function(b){var c=this instanceof a?this:a(b);return c.each(function(){var b=a.data(this,"bs.submenu");b||(b=new d(this),a.data(this,"bs.submenu",b))})}});
\ No newline at end of file
diff --git a/admportal/public/javascripts/bootstrap-table.js b/admportal/public/javascripts/bootstrap-table.js
new file mode 100644
index 0000000..f8715e9
--- /dev/null
+++ b/admportal/public/javascripts/bootstrap-table.js
@@ -0,0 +1,2690 @@
+/**
+ * @author zhixin wen <wenzhixin2010@gmail.com>
+ * version: 1.9.1
+ * https://github.com/wenzhixin/bootstrap-table/
+ */
+
+!function ($) {
+ 'use strict';
+
+ // TOOLS DEFINITION
+ // ======================
+
+ var cachedWidth = null;
+
+ // it only does '%s', and return '' when arguments are undefined
+ var sprintf = function (str) {
+ var args = arguments,
+ flag = true,
+ i = 1;
+
+ str = str.replace(/%s/g, function () {
+ var arg = args[i++];
+
+ if (typeof arg === 'undefined') {
+ flag = false;
+ return '';
+ }
+ return arg;
+ });
+ return flag ? str : '';
+ };
+
+ var getPropertyFromOther = function (list, from, to, value) {
+ var result = '';
+ $.each(list, function (i, item) {
+ if (item[from] === value) {
+ result = item[to];
+ return false;
+ }
+ return true;
+ });
+ return result;
+ };
+
+ var getFieldIndex = function (columns, field) {
+ var index = -1;
+
+ $.each(columns, function (i, column) {
+ if (column.field === field) {
+ index = i;
+ return false;
+ }
+ return true;
+ });
+ return index;
+ };
+
+ // http://jsfiddle.net/wenyi/47nz7ez9/3/
+ var setFieldIndex = function (columns) {
+ var i, j, k,
+ totalCol = 0,
+ flag = [];
+
+ for (i = 0; i < columns[0].length; i++) {
+ totalCol += columns[0][i].colspan || 1;
+ }
+
+ for (i = 0; i < columns.length; i++) {
+ flag[i] = [];
+ for (j = 0; j < totalCol; j++) {
+ flag[i][j] = false;
+ }
+ }
+
+ for (i = 0; i < columns.length; i++) {
+ for (j = 0; j < columns[i].length; j++) {
+ var r = columns[i][j],
+ rowspan = r.rowspan || 1,
+ colspan = r.colspan || 1,
+ index = $.inArray(false, flag[i]);
+
+ if (colspan === 1) {
+ r.fieldIndex = index;
+ // when field is undefined, use index instead
+ if (typeof r.field === 'undefined') {
+ r.field = index;
+ }
+ }
+
+ for (k = 0; k < rowspan; k++) {
+ flag[i + k][index] = true;
+ }
+ for (k = 0; k < colspan; k++) {
+ flag[i][index + k] = true;
+ }
+ }
+ }
+ };
+
+ var getScrollBarWidth = function () {
+ if (cachedWidth === null) {
+ var inner = $('<p/>').addClass('fixed-table-scroll-inner'),
+ outer = $('<div/>').addClass('fixed-table-scroll-outer'),
+ w1, w2;
+
+ outer.append(inner);
+ $('body').append(outer);
+
+ w1 = inner[0].offsetWidth;
+ outer.css('overflow', 'scroll');
+ w2 = inner[0].offsetWidth;
+
+ if (w1 === w2) {
+ w2 = outer[0].clientWidth;
+ }
+
+ outer.remove();
+ cachedWidth = w1 - w2;
+ }
+ return cachedWidth;
+ };
+
+ var calculateObjectValue = function (self, name, args, defaultValue) {
+ var func = name;
+
+ if (typeof name === 'string') {
+ // support obj.func1.func2
+ var names = name.split('.');
+
+ if (names.length > 1) {
+ func = window;
+ $.each(names, function (i, f) {
+ func = func[f];
+ });
+ } else {
+ func = window[name];
+ }
+ }
+ if (typeof func === 'object') {
+ return func;
+ }
+ if (typeof func === 'function') {
+ return func.apply(self, args);
+ }
+ if (!func && typeof name === 'string' && sprintf.apply(this, [name].concat(args))) {
+ return sprintf.apply(this, [name].concat(args));
+ }
+ return defaultValue;
+ };
+
+ var compareObjects = function (objectA, objectB, compareLength) {
+ // Create arrays of property names
+ var objectAProperties = Object.getOwnPropertyNames(objectA),
+ objectBProperties = Object.getOwnPropertyNames(objectB),
+ propName = '';
+
+ if (compareLength) {
+ // If number of properties is different, objects are not equivalent
+ if (objectAProperties.length !== objectBProperties.length) {
+ return false;
+ }
+ }
+
+ for (var i = 0; i < objectAProperties.length; i++) {
+ propName = objectAProperties[i];
+
+ // If the property is not in the object B properties, continue with the next property
+ if ($.inArray(propName, objectBProperties) > -1) {
+ // If values of same property are not equal, objects are not equivalent
+ if (objectA[propName] !== objectB[propName]) {
+ return false;
+ }
+ }
+ }
+
+ // If we made it this far, objects are considered equivalent
+ return true;
+ };
+
+ var escapeHTML = function (text) {
+ if (typeof text === 'string') {
+ return text
+ .replace(/&/g, "&")
+ .replace(/</g, "<")
+ .replace(/>/g, ">")
+ .replace(/"/g, """)
+ .replace(/'/g, "'");
+ }
+ return text;
+ };
+
+ var getRealHeight = function ($el) {
+ var height = 0;
+ $el.children().each(function () {
+ if (height < $(this).outerHeight(true)) {
+ height = $(this).outerHeight(true);
+ }
+ });
+ return height;
+ };
+
+ var getRealDataAttr = function (dataAttr) {
+ for (var attr in dataAttr) {
+ var auxAttr = attr.split(/(?=[A-Z])/).join('-').toLowerCase();
+ if (auxAttr !== attr) {
+ dataAttr[auxAttr] = dataAttr[attr];
+ delete dataAttr[attr];
+ }
+ }
+
+ return dataAttr;
+ };
+
+ var getItemField = function (item, field) {
+ var value = item;
+
+ if (typeof field !== 'string' || item.hasOwnProperty(field)) {
+ return item[field];
+ }
+ var props = field.split('.');
+ for (var p in props) {
+ value = value[props[p]];
+ }
+ return value;
+ };
+
+ // BOOTSTRAP TABLE CLASS DEFINITION
+ // ======================
+
+ var BootstrapTable = function (el, options) {
+ this.options = options;
+ this.$el = $(el);
+ this.$el_ = this.$el.clone();
+ this.timeoutId_ = 0;
+ this.timeoutFooter_ = 0;
+
+ this.init();
+ };
+
+ BootstrapTable.DEFAULTS = {
+ classes: 'table table-hover',
+ locale: undefined,
+ height: undefined,
+ undefinedText: '-',
+ sortName: undefined,
+ sortOrder: 'asc',
+ striped: false,
+ columns: [[]],
+ data: [],
+ dataField: 'rows',
+ method: 'get',
+ url: undefined,
+ ajax: undefined,
+ cache: true,
+ contentType: 'application/json',
+ dataType: 'json',
+ ajaxOptions: {},
+ queryParams: function (params) {
+ return params;
+ },
+ queryParamsType: 'limit', // undefined
+ responseHandler: function (res) {
+ return res;
+ },
+ pagination: false,
+ onlyInfoPagination: false,
+ sidePagination: 'client', // client or server
+ totalRows: 0, // server side need to set
+ pageNumber: 1,
+ pageSize: 10,
+ pageList: [10, 25, 50, 100],
+ paginationHAlign: 'right', //right, left
+ paginationVAlign: 'bottom', //bottom, top, both
+ paginationDetailHAlign: 'left', //right, left
+ paginationFirstText: '«',
+ paginationPreText: '‹',
+ paginationNextText: '›',
+ paginationLastText: '»',
+ search: false,
+ strictSearch: false,
+ searchAlign: 'right',
+ selectItemName: 'btSelectItem',
+ showHeader: true,
+ showFooter: false,
+ showColumns: false,
+ showPaginationSwitch: false,
+ showRefresh: false,
+ showToggle: false,
+ buttonsAlign: 'right',
+ smartDisplay: true,
+ minimumCountColumns: 1,
+ idField: undefined,
+ uniqueId: undefined,
+ cardView: false,
+ detailView: false,
+ detailFormatter: function (index, row) {
+ return '';
+ },
+ trimOnSearch: true,
+ clickToSelect: false,
+ singleSelect: false,
+ toolbar: undefined,
+ toolbarAlign: 'left',
+ checkboxHeader: true,
+ sortable: true,
+ silentSort: true,
+ maintainSelected: false,
+ searchTimeOut: 500,
+ searchText: '',
+ iconSize: undefined,
+ iconsPrefix: 'glyphicon', // glyphicon of fa (font awesome)
+ icons: {
+ paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down',
+ paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up',
+ refresh: 'glyphicon-refresh icon-refresh',
+ toggle: 'glyphicon-list-alt icon-list-alt',
+ columns: 'glyphicon-th icon-th',
+ detailOpen: 'glyphicon-plus icon-plus',
+ detailClose: 'glyphicon-minus icon-minus'
+ },
+
+ rowStyle: function (row, index) {
+ return {};
+ },
+
+ rowAttributes: function (row, index) {
+ return {};
+ },
+
+ onAll: function (name, args) {
+ return false;
+ },
+ onClickCell: function (field, value, row, $element) {
+ return false;
+ },
+ onDblClickCell: function (field, value, row, $element) {
+ return false;
+ },
+ onClickRow: function (item, $element) {
+ return false;
+ },
+ onDblClickRow: function (item, $element) {
+ return false;
+ },
+ onSort: function (name, order) {
+ return false;
+ },
+ onCheck: function (row) {
+ return false;
+ },
+ onUncheck: function (row) {
+ return false;
+ },
+ onCheckAll: function (rows) {
+ return false;
+ },
+ onUncheckAll: function (rows) {
+ return false;
+ },
+ onCheckSome: function (rows) {
+ return false;
+ },
+ onUncheckSome: function (rows) {
+ return false;
+ },
+ onLoadSuccess: function (data) {
+ return false;
+ },
+ onLoadError: function (status) {
+ return false;
+ },
+ onColumnSwitch: function (field, checked) {
+ return false;
+ },
+ onPageChange: function (number, size) {
+ return false;
+ },
+ onSearch: function (text) {
+ return false;
+ },
+ onToggle: function (cardView) {
+ return false;
+ },
+ onPreBody: function (data) {
+ return false;
+ },
+ onPostBody: function () {
+ return false;
+ },
+ onPostHeader: function () {
+ return false;
+ },
+ onExpandRow: function (index, row, $detail) {
+ return false;
+ },
+ onCollapseRow: function (index, row) {
+ return false;
+ },
+ onRefreshOptions: function (options) {
+ return false;
+ },
+ onResetView: function () {
+ return false;
+ }
+ };
+
+ BootstrapTable.LOCALES = [];
+
+ BootstrapTable.LOCALES['en-US'] = BootstrapTable.LOCALES['en'] = {
+ formatLoadingMessage: function () {
+ return 'Loading, please wait...';
+ },
+ formatRecordsPerPage: function (pageNumber) {
+ return sprintf('%s records per page', pageNumber);
+ },
+ formatShowingRows: function (pageFrom, pageTo, totalRows) {
+ return sprintf('Showing %s to %s of %s rows', pageFrom, pageTo, totalRows);
+ },
+ formatDetailPagination: function (totalRows) {
+ return sprintf('Showing %s rows', totalRows);
+ },
+ formatSearch: function () {
+ return 'Search';
+ },
+ formatNoMatches: function () {
+ return 'No matching records found';
+ },
+ formatPaginationSwitch: function () {
+ return 'Hide/Show pagination';
+ },
+ formatRefresh: function () {
+ return 'Refresh';
+ },
+ formatToggle: function () {
+ return 'Toggle';
+ },
+ formatColumns: function () {
+ return 'Columns';
+ },
+ formatAllRows: function () {
+ return 'All';
+ }
+ };
+
+ $.extend(BootstrapTable.DEFAULTS, BootstrapTable.LOCALES['en-US']);
+
+ BootstrapTable.COLUMN_DEFAULTS = {
+ radio: false,
+ checkbox: false,
+ checkboxEnabled: true,
+ field: undefined,
+ title: undefined,
+ titleTooltip: undefined,
+ 'class': undefined,
+ align: undefined, // left, right, center
+ halign: undefined, // left, right, center
+ falign: undefined, // left, right, center
+ valign: undefined, // top, middle, bottom
+ width: undefined,
+ sortable: false,
+ order: 'asc', // asc, desc
+ visible: true,
+ switchable: true,
+ clickToSelect: true,
+ formatter: undefined,
+ footerFormatter: undefined,
+ events: undefined,
+ sorter: undefined,
+ sortName: undefined,
+ cellStyle: undefined,
+ searchable: true,
+ searchFormatter: true,
+ cardVisible: true
+ };
+
+ BootstrapTable.EVENTS = {
+ 'all.bs.table': 'onAll',
+ 'click-cell.bs.table': 'onClickCell',
+ 'dbl-click-cell.bs.table': 'onDblClickCell',
+ 'click-row.bs.table': 'onClickRow',
+ 'dbl-click-row.bs.table': 'onDblClickRow',
+ 'sort.bs.table': 'onSort',
+ 'check.bs.table': 'onCheck',
+ 'uncheck.bs.table': 'onUncheck',
+ 'check-all.bs.table': 'onCheckAll',
+ 'uncheck-all.bs.table': 'onUncheckAll',
+ 'check-some.bs.table': 'onCheckSome',
+ 'uncheck-some.bs.table': 'onUncheckSome',
+ 'load-success.bs.table': 'onLoadSuccess',
+ 'load-error.bs.table': 'onLoadError',
+ 'column-switch.bs.table': 'onColumnSwitch',
+ 'page-change.bs.table': 'onPageChange',
+ 'search.bs.table': 'onSearch',
+ 'toggle.bs.table': 'onToggle',
+ 'pre-body.bs.table': 'onPreBody',
+ 'post-body.bs.table': 'onPostBody',
+ 'post-header.bs.table': 'onPostHeader',
+ 'expand-row.bs.table': 'onExpandRow',
+ 'collapse-row.bs.table': 'onCollapseRow',
+ 'refresh-options.bs.table': 'onRefreshOptions',
+ 'reset-view.bs.table': 'onResetView'
+ };
+
+ BootstrapTable.prototype.init = function () {
+ this.initLocale();
+ this.initContainer();
+ this.initTable();
+ this.initHeader();
+ this.initData();
+ this.initFooter();
+ this.initToolbar();
+ this.initPagination();
+ this.initBody();
+ this.initSearchText();
+ this.initServer();
+ };
+
+ BootstrapTable.prototype.initLocale = function () {
+ if (this.options.locale) {
+ var parts = this.options.locale.split(/-|_/);
+ parts[0].toLowerCase();
+ parts[1] && parts[1].toUpperCase();
+ if ($.fn.bootstrapTable.locales[this.options.locale]) {
+ // locale as requested
+ $.extend(this.options, $.fn.bootstrapTable.locales[this.options.locale]);
+ } else if ($.fn.bootstrapTable.locales[parts.join('-')]) {
+ // locale with sep set to - (in case original was specified with _)
+ $.extend(this.options, $.fn.bootstrapTable.locales[parts.join('-')]);
+ } else if ($.fn.bootstrapTable.locales[parts[0]]) {
+ // short locale language code (i.e. 'en')
+ $.extend(this.options, $.fn.bootstrapTable.locales[parts[0]]);
+ }
+ }
+ };
+
+ BootstrapTable.prototype.initContainer = function () {
+ this.$container = $([
+ '<div class="bootstrap-table">',
+ '<div class="fixed-table-toolbar"></div>',
+ this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
+ '<div class="fixed-table-pagination" style="clear: both;"></div>' :
+ '',
+ '<div class="fixed-table-container">',
+ '<div class="fixed-table-header"><table></table></div>',
+ '<div class="fixed-table-body">',
+ '<div class="fixed-table-loading">',
+ this.options.formatLoadingMessage(),
+ '</div>',
+ '</div>',
+ '<div class="fixed-table-footer"><table><tr></tr></table></div>',
+ this.options.paginationVAlign === 'bottom' || this.options.paginationVAlign === 'both' ?
+ '<div class="fixed-table-pagination"></div>' :
+ '',
+ '</div>',
+ '</div>'
+ ].join(''));
+
+ this.$container.insertAfter(this.$el);
+ this.$tableContainer = this.$container.find('.fixed-table-container');
+ this.$tableHeader = this.$container.find('.fixed-table-header');
+ this.$tableBody = this.$container.find('.fixed-table-body');
+ this.$tableLoading = this.$container.find('.fixed-table-loading');
+ this.$tableFooter = this.$container.find('.fixed-table-footer');
+ this.$toolbar = this.$container.find('.fixed-table-toolbar');
+ this.$pagination = this.$container.find('.fixed-table-pagination');
+
+ this.$tableBody.append(this.$el);
+ this.$container.after('<div class="clearfix"></div>');
+
+ this.$el.addClass(this.options.classes);
+ if (this.options.striped) {
+ this.$el.addClass('table-striped');
+ }
+ if ($.inArray('table-no-bordered', this.options.classes.split(' ')) !== -1) {
+ this.$tableContainer.addClass('table-no-bordered');
+ }
+ };
+
+ BootstrapTable.prototype.initTable = function () {
+ var that = this,
+ columns = [],
+ data = [];
+
+ this.$header = this.$el.find('>thead');
+ if (!this.$header.length) {
+ this.$header = $('<thead></thead>').appendTo(this.$el);
+ }
+ this.$header.find('tr').each(function () {
+ var column = [];
+
+ $(this).find('th').each(function () {
+ column.push($.extend({}, {
+ title: $(this).html(),
+ 'class': $(this).attr('class'),
+ titleTooltip: $(this).attr('title'),
+ rowspan: $(this).attr('rowspan') ? +$(this).attr('rowspan') : undefined,
+ colspan: $(this).attr('colspan') ? +$(this).attr('colspan') : undefined
+ }, $(this).data()));
+ });
+ columns.push(column);
+ });
+ if (!$.isArray(this.options.columns[0])) {
+ this.options.columns = [this.options.columns];
+ }
+ this.options.columns = $.extend(true, [], columns, this.options.columns);
+ this.columns = [];
+
+ setFieldIndex(this.options.columns);
+ $.each(this.options.columns, function (i, columns) {
+ $.each(columns, function (j, column) {
+ column = $.extend({}, BootstrapTable.COLUMN_DEFAULTS, column);
+
+ if (typeof column.fieldIndex !== 'undefined') {
+ that.columns[column.fieldIndex] = column;
+ }
+
+ that.options.columns[i][j] = column;
+ });
+ });
+
+ // if options.data is setting, do not process tbody data
+ if (this.options.data.length) {
+ return;
+ }
+
+ this.$el.find('>tbody>tr').each(function () {
+ var row = {};
+
+ // save tr's id, class and data-* attributes
+ row._id = $(this).attr('id');
+ row._class = $(this).attr('class');
+ row._data = getRealDataAttr($(this).data());
+
+ $(this).find('td').each(function (i) {
+ var field = that.columns[i].field;
+
+ row[field] = $(this).html();
+ // save td's id, class and data-* attributes
+ row['_' + field + '_id'] = $(this).attr('id');
+ row['_' + field + '_class'] = $(this).attr('class');
+ row['_' + field + '_rowspan'] = $(this).attr('rowspan');
+ row['_' + field + '_title'] = $(this).attr('title');
+ row['_' + field + '_data'] = getRealDataAttr($(this).data());
+ });
+ data.push(row);
+ });
+ this.options.data = data;
+ };
+
+ BootstrapTable.prototype.initHeader = function () {
+ var that = this,
+ visibleColumns = {},
+ html = [];
+
+ this.header = {
+ fields: [],
+ styles: [],
+ classes: [],
+ formatters: [],
+ events: [],
+ sorters: [],
+ sortNames: [],
+ cellStyles: [],
+ searchables: []
+ };
+
+ $.each(this.options.columns, function (i, columns) {
+ html.push('<tr>');
+
+ if (i == 0 && !that.options.cardView && that.options.detailView) {
+ html.push(sprintf('<th class="detail" rowspan="%s"><div class="fht-cell"></div></th>',
+ that.options.columns.length));
+ }
+
+ $.each(columns, function (j, column) {
+ var text = '',
+ halign = '', // header align style
+ align = '', // body align style
+ style = '',
+ class_ = sprintf(' class="%s"', column['class']),
+ order = that.options.sortOrder || column.order,
+ unitWidth = 'px',
+ width = column.width;
+
+ if (column.width !== undefined && (!that.options.cardView)) {
+ if (typeof column.width === 'string') {
+ if (column.width.indexOf('%') !== -1) {
+ unitWidth = '%';
+ }
+ }
+ }
+ if (column.width && typeof column.width === 'string') {
+ width = column.width.replace('%', '').replace('px', '');
+ }
+
+ halign = sprintf('text-align: %s; ', column.halign ? column.halign : column.align);
+ align = sprintf('text-align: %s; ', column.align);
+ style = sprintf('vertical-align: %s; ', column.valign);
+ style += sprintf('width: %s; ', (column.checkbox || column.radio) && !width ?
+ '36px' : (width ? width + unitWidth : undefined));
+
+ if (typeof column.fieldIndex !== 'undefined') {
+ that.header.fields[column.fieldIndex] = column.field;
+ that.header.styles[column.fieldIndex] = align + style;
+ that.header.classes[column.fieldIndex] = class_;
+ that.header.formatters[column.fieldIndex] = column.formatter;
+ that.header.events[column.fieldIndex] = column.events;
+ that.header.sorters[column.fieldIndex] = column.sorter;
+ that.header.sortNames[column.fieldIndex] = column.sortName;
+ that.header.cellStyles[column.fieldIndex] = column.cellStyle;
+ that.header.searchables[column.fieldIndex] = column.searchable;
+
+ if (!column.visible) {
+ return;
+ }
+
+ if (that.options.cardView && (!column.cardVisible)) {
+ return;
+ }
+
+ visibleColumns[column.field] = column;
+ }
+
+ html.push('<th' + sprintf(' title="%s"', column.titleTooltip),
+ column.checkbox || column.radio ?
+ sprintf(' class="bs-checkbox %s"', column['class'] || '') :
+ class_,
+ sprintf(' style="%s"', halign + style),
+ sprintf(' rowspan="%s"', column.rowspan),
+ sprintf(' colspan="%s"', column.colspan),
+ sprintf(' data-field="%s"', column.field),
+ "tabindex='0'",
+ '>');
+
+ html.push(sprintf('<div class="th-inner %s">', that.options.sortable && column.sortable ?
+ 'sortable both' : ''));
+
+ text = column.title;
+
+ if (column.checkbox) {
+ if (!that.options.singleSelect && that.options.checkboxHeader) {
+ text = '<input name="btSelectAll" type="checkbox" />';
+ }
+ that.header.stateField = column.field;
+ }
+ if (column.radio) {
+ text = '';
+ that.header.stateField = column.field;
+ that.options.singleSelect = true;
+ }
+
+ html.push(text);
+ html.push('</div>');
+ html.push('<div class="fht-cell"></div>');
+ html.push('</div>');
+ html.push('</th>');
+ });
+ html.push('</tr>');
+ });
+
+ this.$header.html(html.join(''));
+ this.$header.find('th[data-field]').each(function (i) {
+ $(this).data(visibleColumns[$(this).data('field')]);
+ });
+ this.$container.off('click', '.th-inner').on('click', '.th-inner', function (event) {
+ if (that.options.sortable && $(this).parent().data().sortable) {
+ that.onSort(event);
+ }
+ });
+
+ this.$header.children().children().off('keypress').on('keypress', function (event) {
+ if (that.options.sortable && $(this).data().sortable) {
+ var code = event.keyCode || event.which;
+ if (code == 13) { //Enter keycode
+ that.onSort(event);
+ }
+ }
+ });
+
+ if (!this.options.showHeader || this.options.cardView) {
+ this.$header.hide();
+ this.$tableHeader.hide();
+ this.$tableLoading.css('top', 0);
+ } else {
+ this.$header.show();
+ this.$tableHeader.show();
+ this.$tableLoading.css('top', this.$header.outerHeight() + 1);
+ // Assign the correct sortable arrow
+ this.getCaret();
+ }
+
+ this.$selectAll = this.$header.find('[name="btSelectAll"]');
+ this.$container.off('click', '[name="btSelectAll"]')
+ .on('click', '[name="btSelectAll"]', function () {
+ var checked = $(this).prop('checked');
+ that[checked ? 'checkAll' : 'uncheckAll']();
+ that.updateSelected();
+ });
+ };
+
+ BootstrapTable.prototype.initFooter = function () {
+ if (!this.options.showFooter || this.options.cardView) {
+ this.$tableFooter.hide();
+ } else {
+ this.$tableFooter.show();
+ }
+ };
+
+ /**
+ * @param data
+ * @param type: append / prepend
+ */
+ BootstrapTable.prototype.initData = function (data, type) {
+ if (type === 'append') {
+ this.data = this.data.concat(data);
+ } else if (type === 'prepend') {
+ this.data = [].concat(data).concat(this.data);
+ } else {
+ this.data = data || this.options.data;
+ }
+
+ // Fix #839 Records deleted when adding new row on filtered table
+ if (type === 'append') {
+ this.options.data = this.options.data.concat(data);
+ } else if (type === 'prepend') {
+ this.options.data = [].concat(data).concat(this.options.data);
+ } else {
+ this.options.data = this.data;
+ }
+
+ if (this.options.sidePagination === 'server') {
+ return;
+ }
+ this.initSort();
+ };
+
+ BootstrapTable.prototype.initSort = function () {
+ var that = this,
+ name = this.options.sortName,
+ order = this.options.sortOrder === 'desc' ? -1 : 1,
+ index = $.inArray(this.options.sortName, this.header.fields);
+
+ if (index !== -1) {
+ this.data.sort(function (a, b) {
+ if (that.header.sortNames[index]) {
+ name = that.header.sortNames[index];
+ }
+ var aa = getItemField(a, name),
+ bb = getItemField(b, name),
+ value = calculateObjectValue(that.header, that.header.sorters[index], [aa, bb]);
+
+ if (value !== undefined) {
+ return order * value;
+ }
+
+ // Fix #161: undefined or null string sort bug.
+ if (aa === undefined || aa === null) {
+ aa = '';
+ }
+ if (bb === undefined || bb === null) {
+ bb = '';
+ }
+
+ // IF both values are numeric, do a numeric comparison
+ if ($.isNumeric(aa) && $.isNumeric(bb)) {
+ // Convert numerical values form string to float.
+ aa = parseFloat(aa);
+ bb = parseFloat(bb);
+ if (aa < bb) {
+ return order * -1;
+ }
+ return order;
+ }
+
+ if (aa === bb) {
+ return 0;
+ }
+
+ // If value is not a string, convert to string
+ if (typeof aa !== 'string') {
+ aa = aa.toString();
+ }
+
+ if (aa.localeCompare(bb) === -1) {
+ return order * -1;
+ }
+
+ return order;
+ });
+ }
+ };
+
+ BootstrapTable.prototype.onSort = function (event) {
+ var $this = event.type === "keypress" ? $(event.currentTarget) : $(event.currentTarget).parent(),
+ $this_ = this.$header.find('th').eq($this.index());
+
+ this.$header.add(this.$header_).find('span.order').remove();
+
+ if (this.options.sortName === $this.data('field')) {
+ this.options.sortOrder = this.options.sortOrder === 'asc' ? 'desc' : 'asc';
+ } else {
+ this.options.sortName = $this.data('field');
+ this.options.sortOrder = $this.data('order') === 'asc' ? 'desc' : 'asc';
+ }
+ this.trigger('sort', this.options.sortName, this.options.sortOrder);
+
+ $this.add($this_).data('order', this.options.sortOrder);
+
+ // Assign the correct sortable arrow
+ this.getCaret();
+
+ if (this.options.sidePagination === 'server') {
+ this.initServer(this.options.silentSort);
+ return;
+ }
+
+ this.initSort();
+ this.initBody();
+ };
+
+ BootstrapTable.prototype.initToolbar = function () {
+ var that = this,
+ html = [],
+ timeoutId = 0,
+ $keepOpen,
+ $search,
+ switchableCount = 0;
+
+ this.$toolbar.html('');
+
+ if (typeof this.options.toolbar === 'string' || typeof this.options.toolbar === 'object') {
+ $(sprintf('<div class="bars pull-%s"></div>', this.options.toolbarAlign))
+ .appendTo(this.$toolbar)
+ .append($(this.options.toolbar));
+ }
+
+ // showColumns, showToggle, showRefresh
+ html = [sprintf('<div class="columns columns-%s btn-group pull-%s">',
+ this.options.buttonsAlign, this.options.buttonsAlign)];
+
+ if (typeof this.options.icons === 'string') {
+ this.options.icons = calculateObjectValue(null, this.options.icons);
+ }
+
+ if (this.options.showPaginationSwitch) {
+ html.push(sprintf('<button class="btn btn-default" type="button" name="paginationSwitch" title="%s">',
+ this.options.formatPaginationSwitch()),
+ sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.paginationSwitchDown),
+ '</button>');
+ }
+
+ if (this.options.showRefresh) {
+ html.push(sprintf('<button class="btn btn-default' +
+ sprintf(' btn-%s', this.options.iconSize) +
+ '" type="button" name="refresh" title="%s">',
+ this.options.formatRefresh()),
+ sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.refresh),
+ '</button>');
+ }
+
+ if (this.options.showToggle) {
+ html.push(sprintf('<button class="btn btn-default' +
+ sprintf(' btn-%s', this.options.iconSize) +
+ '" type="button" name="toggle" title="%s">',
+ this.options.formatToggle()),
+ sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.toggle),
+ '</button>');
+ }
+
+ if (this.options.showColumns) {
+ html.push(sprintf('<div class="keep-open btn-group" title="%s">',
+ this.options.formatColumns()),
+ '<button type="button" class="btn btn-default' +
+ sprintf(' btn-%s', this.options.iconSize) +
+ ' dropdown-toggle" data-toggle="dropdown">',
+ sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.columns),
+ ' <span class="caret"></span>',
+ '</button>',
+ '<ul class="dropdown-menu" role="menu">');
+
+ $.each(this.columns, function (i, column) {
+ if (column.radio || column.checkbox) {
+ return;
+ }
+
+ if (that.options.cardView && (!column.cardVisible)) {
+ return;
+ }
+
+ var checked = column.visible ? ' checked="checked"' : '';
+
+ if (column.switchable) {
+ html.push(sprintf('<li>' +
+ '<label><input type="checkbox" data-field="%s" value="%s"%s> %s</label>' +
+ '</li>', column.field, i, checked, column.title));
+ switchableCount++;
+ }
+ });
+ html.push('</ul>',
+ '</div>');
+ }
+
+ html.push('</div>');
+
+ // Fix #188: this.showToolbar is for extentions
+ if (this.showToolbar || html.length > 2) {
+ this.$toolbar.append(html.join(''));
+ }
+
+ if (this.options.showPaginationSwitch) {
+ this.$toolbar.find('button[name="paginationSwitch"]')
+ .off('click').on('click', $.proxy(this.togglePagination, this));
+ }
+
+ if (this.options.showRefresh) {
+ this.$toolbar.find('button[name="refresh"]')
+ .off('click').on('click', $.proxy(this.refresh, this));
+ }
+
+ if (this.options.showToggle) {
+ this.$toolbar.find('button[name="toggle"]')
+ .off('click').on('click', function () {
+ that.toggleView();
+ });
+ }
+
+ if (this.options.showColumns) {
+ $keepOpen = this.$toolbar.find('.keep-open');
+
+ if (switchableCount <= this.options.minimumCountColumns) {
+ $keepOpen.find('input').prop('disabled', true);
+ }
+
+ $keepOpen.find('li').off('click').on('click', function (event) {
+ event.stopImmediatePropagation();
+ });
+ $keepOpen.find('input').off('click').on('click', function () {
+ var $this = $(this);
+
+ that.toggleColumn(getFieldIndex(that.columns,
+ $(this).data('field')), $this.prop('checked'), false);
+ that.trigger('column-switch', $(this).data('field'), $this.prop('checked'));
+ });
+ }
+
+ if (this.options.search) {
+ html = [];
+ html.push(
+ '<div class="pull-' + this.options.searchAlign + ' search">',
+ sprintf('<input class="form-control' +
+ sprintf(' input-%s', this.options.iconSize) +
+ '" type="text" placeholder="%s">',
+ this.options.formatSearch()),
+ '</div>');
+
+ this.$toolbar.append(html.join(''));
+ $search = this.$toolbar.find('.search input');
+ $search.off('keyup drop').on('keyup drop', function (event) {
+ clearTimeout(timeoutId); // doesn't matter if it's 0
+ timeoutId = setTimeout(function () {
+ that.onSearch(event);
+ }, that.options.searchTimeOut);
+ });
+ }
+ };
+
+ BootstrapTable.prototype.onSearch = function (event) {
+ var text = $.trim($(event.currentTarget).val());
+
+ // trim search input
+ if (this.options.trimOnSearch && $(event.currentTarget).val() !== text) {
+ $(event.currentTarget).val(text);
+ }
+
+ if (text === this.searchText) {
+ return;
+ }
+ this.searchText = text;
+
+ this.options.pageNumber = 1;
+ this.initSearch();
+ this.updatePagination();
+ this.trigger('search', text);
+ };
+
+ BootstrapTable.prototype.initSearch = function () {
+ var that = this;
+
+ if (this.options.sidePagination !== 'server') {
+ var s = this.searchText && this.searchText.toLowerCase();
+ var f = $.isEmptyObject(this.filterColumns) ? null : this.filterColumns;
+
+ // Check filter
+ this.data = f ? $.grep(this.options.data, function (item, i) {
+ for (var key in f) {
+ if ($.isArray(f[key])) {
+ if ($.inArray(item[key], f[key]) === -1) {
+ return false;
+ }
+ } else if (item[key] !== f[key]) {
+ return false;
+ }
+ }
+ return true;
+ }) : this.options.data;
+
+ this.data = s ? $.grep(this.data, function (item, i) {
+ for (var key in item) {
+ key = $.isNumeric(key) ? parseInt(key, 10) : key;
+ var value = item[key],
+ column = that.columns[getFieldIndex(that.columns, key)],
+ j = $.inArray(key, that.header.fields);
+
+ // Fix #142: search use formated data
+ if (column && column.searchFormatter) {
+ value = calculateObjectValue(column,
+ that.header.formatters[j], [value, item, i], value);
+ }
+
+ var index = $.inArray(key, that.header.fields);
+ if (index !== -1 && that.header.searchables[index] && (typeof value === 'string' || typeof value === 'number')) {
+ if (that.options.strictSearch) {
+ if ((value + '').toLowerCase() === s) {
+ return true;
+ }
+ } else {
+ if ((value + '').toLowerCase().indexOf(s) !== -1) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }) : this.data;
+ }
+ };
+
+ BootstrapTable.prototype.initPagination = function () {
+ if (!this.options.pagination) {
+ this.$pagination.hide();
+ return;
+ } else {
+ this.$pagination.show();
+ }
+
+ var that = this,
+ html = [],
+ $allSelected = false,
+ i, from, to,
+ $pageList,
+ $first, $pre,
+ $next, $last,
+ $number,
+ data = this.getData();
+
+ if (this.options.sidePagination !== 'server') {
+ this.options.totalRows = data.length;
+ }
+
+ this.totalPages = 0;
+ if (this.options.totalRows) {
+ if (this.options.pageSize === this.options.formatAllRows()) {
+ this.options.pageSize = this.options.totalRows;
+ $allSelected = true;
+ } else if (this.options.pageSize === this.options.totalRows) {
+ // Fix #667 Table with pagination,
+ // multiple pages and a search that matches to one page throws exception
+ var pageLst = typeof this.options.pageList === 'string' ?
+ this.options.pageList.replace('[', '').replace(']', '')
+ .replace(/ /g, '').toLowerCase().split(',') : this.options.pageList;
+ if ($.inArray(this.options.formatAllRows().toLowerCase(), pageLst) > -1) {
+ $allSelected = true;
+ }
+ }
+
+ this.totalPages = ~~((this.options.totalRows - 1) / this.options.pageSize) + 1;
+
+ this.options.totalPages = this.totalPages;
+ }
+ if (this.totalPages > 0 && this.options.pageNumber > this.totalPages) {
+ this.options.pageNumber = this.totalPages;
+ }
+
+ this.pageFrom = (this.options.pageNumber - 1) * this.options.pageSize + 1;
+ this.pageTo = this.options.pageNumber * this.options.pageSize;
+ if (this.pageTo > this.options.totalRows) {
+ this.pageTo = this.options.totalRows;
+ }
+
+ html.push(
+ '<div class="pull-' + this.options.paginationDetailHAlign + ' pagination-detail">',
+ '<span class="pagination-info">',
+ this.options.onlyInfoPagination ? this.options.formatDetailPagination(this.options.totalRows) :
+ this.options.formatShowingRows(this.pageFrom, this.pageTo, this.options.totalRows),
+ '</span>');
+
+ if (!this.options.onlyInfoPagination) {
+ html.push('<span class="page-list">');
+
+ var pageNumber = [
+ sprintf('<span class="btn-group %s">',
+ this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
+ 'dropdown' : 'dropup'),
+ '<button type="button" class="btn btn-default ' +
+ sprintf(' btn-%s', this.options.iconSize) +
+ ' dropdown-toggle" data-toggle="dropdown">',
+ '<span class="page-size">',
+ $allSelected ? this.options.formatAllRows() : this.options.pageSize,
+ '</span>',
+ ' <span class="caret"></span>',
+ '</button>',
+ '<ul class="dropdown-menu" role="menu">'
+ ],
+ pageList = this.options.pageList;
+
+ if (typeof this.options.pageList === 'string') {
+ var list = this.options.pageList.replace('[', '').replace(']', '')
+ .replace(/ /g, '').split(',');
+
+ pageList = [];
+ $.each(list, function (i, value) {
+ pageList.push(value.toUpperCase() === that.options.formatAllRows().toUpperCase() ?
+ that.options.formatAllRows() : +value);
+ });
+ }
+
+ $.each(pageList, function (i, page) {
+ if (!that.options.smartDisplay || i === 0 || pageList[i - 1] <= that.options.totalRows) {
+ var active;
+ if ($allSelected) {
+ active = page === that.options.formatAllRows() ? ' class="active"' : '';
+ } else {
+ active = page === that.options.pageSize ? ' class="active"' : '';
+ }
+ pageNumber.push(sprintf('<li%s><a href="javascript:void(0)">%s</a></li>', active, page));
+ }
+ });
+ pageNumber.push('</ul></span>');
+
+ html.push(this.options.formatRecordsPerPage(pageNumber.join('')));
+ html.push('</span>');
+
+ html.push('</div>',
+ '<div class="pull-' + this.options.paginationHAlign + ' pagination">',
+ '<ul class="pagination' + sprintf(' pagination-%s', this.options.iconSize) + '">',
+ '<li class="page-first"><a href="javascript:void(0)">' + this.options.paginationFirstText + '</a></li>',
+ '<li class="page-pre"><a href="javascript:void(0)">' + this.options.paginationPreText + '</a></li>');
+
+ if (this.totalPages < 5) {
+ from = 1;
+ to = this.totalPages;
+ } else {
+ from = this.options.pageNumber - 2;
+ to = from + 4;
+ if (from < 1) {
+ from = 1;
+ to = 5;
+ }
+ if (to > this.totalPages) {
+ to = this.totalPages;
+ from = to - 4;
+ }
+ }
+ for (i = from; i <= to; i++) {
+ html.push('<li class="page-number' + (i === this.options.pageNumber ? ' active' : '') + '">',
+ '<a href="javascript:void(0)">', i, '</a>',
+ '</li>');
+ }
+
+ html.push(
+ '<li class="page-next"><a href="javascript:void(0)">' + this.options.paginationNextText + '</a></li>',
+ '<li class="page-last"><a href="javascript:void(0)">' + this.options.paginationLastText + '</a></li>',
+ '</ul>',
+ '</div>');
+
+ }
+ this.$pagination.html(html.join(''));
+
+ if (!this.options.onlyInfoPagination) {
+ $pageList = this.$pagination.find('.page-list a');
+ $first = this.$pagination.find('.page-first');
+ $pre = this.$pagination.find('.page-pre');
+ $next = this.$pagination.find('.page-next');
+ $last = this.$pagination.find('.page-last');
+ $number = this.$pagination.find('.page-number');
+
+ if (this.options.pageNumber <= 1) {
+ $first.addClass('disabled');
+ $pre.addClass('disabled');
+ }
+ if (this.options.pageNumber >= this.totalPages) {
+ $next.addClass('disabled');
+ $last.addClass('disabled');
+ }
+ if (this.options.smartDisplay) {
+ if (this.totalPages <= 1) {
+ this.$pagination.find('div.pagination').hide();
+ }
+ if (pageList.length < 2 || this.options.totalRows <= pageList[0]) {
+ this.$pagination.find('span.page-list').hide();
+ }
+
+ // when data is empty, hide the pagination
+ this.$pagination[this.getData().length ? 'show' : 'hide']();
+ }
+ if ($allSelected) {
+ this.options.pageSize = this.options.formatAllRows();
+ }
+ $pageList.off('click').on('click', $.proxy(this.onPageListChange, this));
+ $first.off('click').on('click', $.proxy(this.onPageFirst, this));
+ $pre.off('click').on('click', $.proxy(this.onPagePre, this));
+ $next.off('click').on('click', $.proxy(this.onPageNext, this));
+ $last.off('click').on('click', $.proxy(this.onPageLast, this));
+ $number.off('click').on('click', $.proxy(this.onPageNumber, this));
+ }
+ };
+
+ BootstrapTable.prototype.updatePagination = function (event) {
+ // Fix #171: IE disabled button can be clicked bug.
+ if (event && $(event.currentTarget).hasClass('disabled')) {
+ return;
+ }
+
+ if (!this.options.maintainSelected) {
+ this.resetRows();
+ }
+
+ this.initPagination();
+ if (this.options.sidePagination === 'server') {
+ this.initServer();
+ } else {
+ this.initBody();
+ }
+
+ this.trigger('page-change', this.options.pageNumber, this.options.pageSize);
+ };
+
+ BootstrapTable.prototype.onPageListChange = function (event) {
+ var $this = $(event.currentTarget);
+
+ $this.parent().addClass('active').siblings().removeClass('active');
+ this.options.pageSize = $this.text().toUpperCase() === this.options.formatAllRows().toUpperCase() ?
+ this.options.formatAllRows() : +$this.text();
+ this.$toolbar.find('.page-size').text(this.options.pageSize);
+
+ this.updatePagination(event);
+ };
+
+ BootstrapTable.prototype.onPageFirst = function (event) {
+ this.options.pageNumber = 1;
+ this.updatePagination(event);
+ };
+
+ BootstrapTable.prototype.onPagePre = function (event) {
+ this.options.pageNumber--;
+ this.updatePagination(event);
+ };
+
+ BootstrapTable.prototype.onPageNext = function (event) {
+ this.options.pageNumber++;
+ this.updatePagination(event);
+ };
+
+ BootstrapTable.prototype.onPageLast = function (event) {
+ this.options.pageNumber = this.totalPages;
+ this.updatePagination(event);
+ };
+
+ BootstrapTable.prototype.onPageNumber = function (event) {
+ if (this.options.pageNumber === +$(event.currentTarget).text()) {
+ return;
+ }
+ this.options.pageNumber = +$(event.currentTarget).text();
+ this.updatePagination(event);
+ };
+
+ BootstrapTable.prototype.initBody = function (fixedScroll) {
+ var that = this,
+ html = [],
+ data = this.getData();
+
+ this.trigger('pre-body', data);
+
+ this.$body = this.$el.find('>tbody');
+ if (!this.$body.length) {
+ this.$body = $('<tbody></tbody>').appendTo(this.$el);
+ }
+
+ //Fix #389 Bootstrap-table-flatJSON is not working
+
+ if (!this.options.pagination || this.options.sidePagination === 'server') {
+ this.pageFrom = 1;
+ this.pageTo = data.length;
+ }
+
+ for (var i = this.pageFrom - 1; i < this.pageTo; i++) {
+ var key,
+ item = data[i],
+ style = {},
+ csses = [],
+ data_ = '',
+ attributes = {},
+ htmlAttributes = [];
+
+ style = calculateObjectValue(this.options, this.options.rowStyle, [item, i], style);
+
+ if (style && style.css) {
+ for (key in style.css) {
+ csses.push(key + ': ' + style.css[key]);
+ }
+ }
+
+ attributes = calculateObjectValue(this.options,
+ this.options.rowAttributes, [item, i], attributes);
+
+ if (attributes) {
+ for (key in attributes) {
+ htmlAttributes.push(sprintf('%s="%s"', key, escapeHTML(attributes[key])));
+ }
+ }
+
+ if (item._data && !$.isEmptyObject(item._data)) {
+ $.each(item._data, function (k, v) {
+ // ignore data-index
+ if (k === 'index') {
+ return;
+ }
+ data_ += sprintf(' data-%s="%s"', k, v);
+ });
+ }
+
+ html.push('<tr',
+ sprintf(' %s', htmlAttributes.join(' ')),
+ sprintf(' id="%s"', $.isArray(item) ? undefined : item._id),
+ sprintf(' class="%s"', style.classes || ($.isArray(item) ? undefined : item._class)),
+ sprintf(' data-index="%s"', i),
+ sprintf(' data-uniqueid="%s"', item[this.options.uniqueId]),
+ sprintf('%s', data_),
+ '>'
+ );
+
+ if (this.options.cardView) {
+ html.push(sprintf('<td colspan="%s">', this.header.fields.length));
+ }
+
+ if (!this.options.cardView && this.options.detailView) {
+ html.push('<td>',
+ '<a class="detail-icon" href="javascript:">',
+ sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.detailOpen),
+ '</a>',
+ '</td>');
+ }
+
+ $.each(this.header.fields, function (j, field) {
+ var text = '',
+ value = getItemField(item, field),
+ type = '',
+ cellStyle = {},
+ id_ = '',
+ class_ = that.header.classes[j],
+ data_ = '',
+ rowspan_ = '',
+ title_ = '',
+ column = that.columns[getFieldIndex(that.columns, field)];
+
+ if (!column.visible) {
+ return;
+ }
+
+ style = sprintf('style="%s"', csses.concat(that.header.styles[j]).join('; '));
+
+ value = calculateObjectValue(column,
+ that.header.formatters[j], [value, item, i], value);
+
+ // handle td's id and class
+ if (item['_' + field + '_id']) {
+ id_ = sprintf(' id="%s"', item['_' + field + '_id']);
+ }
+ if (item['_' + field + '_class']) {
+ class_ = sprintf(' class="%s"', item['_' + field + '_class']);
+ }
+ if (item['_' + field + '_rowspan']) {
+ rowspan_ = sprintf(' rowspan="%s"', item['_' + field + '_rowspan']);
+ }
+ if (item['_' + field + '_title']) {
+ title_ = sprintf(' title="%s"', item['_' + field + '_title']);
+ }
+ cellStyle = calculateObjectValue(that.header,
+ that.header.cellStyles[j], [value, item, i], cellStyle);
+ if (cellStyle.classes) {
+ class_ = sprintf(' class="%s"', cellStyle.classes);
+ }
+ if (cellStyle.css) {
+ var csses_ = [];
+ for (var key in cellStyle.css) {
+ csses_.push(key + ': ' + cellStyle.css[key]);
+ }
+ style = sprintf('style="%s"', csses_.concat(that.header.styles[j]).join('; '));
+ }
+
+ if (item['_' + field + '_data'] && !$.isEmptyObject(item['_' + field + '_data'])) {
+ $.each(item['_' + field + '_data'], function (k, v) {
+ // ignore data-index
+ if (k === 'index') {
+ return;
+ }
+ data_ += sprintf(' data-%s="%s"', k, v);
+ });
+ }
+
+ if (column.checkbox || column.radio) {
+ type = column.checkbox ? 'checkbox' : type;
+ type = column.radio ? 'radio' : type;
+
+ text = [that.options.cardView ?
+ '<div class="card-view">' : '<td class="bs-checkbox">',
+ '<input' +
+ sprintf(' data-index="%s"', i) +
+ sprintf(' name="%s"', that.options.selectItemName) +
+ sprintf(' type="%s"', type) +
+ sprintf(' value="%s"', item[that.options.idField]) +
+ sprintf(' checked="%s"', value === true ||
+ (value && value.checked) ? 'checked' : undefined) +
+ sprintf(' disabled="%s"', !column.checkboxEnabled ||
+ (value && value.disabled) ? 'disabled' : undefined) +
+ ' />',
+ that.header.formatters[j] && typeof value === 'string' ? value : '',
+ that.options.cardView ? '</div>' : '</td>'
+ ].join('');
+
+ item[that.header.stateField] = value === true || (value && value.checked);
+ } else {
+ value = typeof value === 'undefined' || value === null ?
+ that.options.undefinedText : value;
+
+ text = that.options.cardView ? ['<div class="card-view">',
+ that.options.showHeader ? sprintf('<span class="title" %s>%s</span>', style,
+ getPropertyFromOther(that.columns, 'field', 'title', field)) : '',
+ sprintf('<span class="value">%s</span>', value),
+ '</div>'
+ ].join('') : [sprintf('<td%s %s %s %s %s %s>', id_, class_, style, data_, rowspan_, title_),
+ value,
+ '</td>'
+ ].join('');
+
+ // Hide empty data on Card view when smartDisplay is set to true.
+ if (that.options.cardView && that.options.smartDisplay && value === '') {
+ // Should set a placeholder for event binding correct fieldIndex
+ text = '<div class="card-view"></div>';
+ }
+ }
+
+ html.push(text);
+ });
+
+ if (this.options.cardView) {
+ html.push('</td>');
+ }
+
+ html.push('</tr>');
+ }
+
+ // show no records
+ if (!html.length) {
+ html.push('<tr class="no-records-found">',
+ sprintf('<td colspan="%s">%s</td>',
+ this.$header.find('th').length, this.options.formatNoMatches()),
+ '</tr>');
+ }
+
+ this.$body.html(html.join(''));
+
+ if (!fixedScroll) {
+ this.scrollTo(0);
+ }
+
+ // click to select by column
+ this.$body.find('> tr[data-index] > td').off('click dblclick').on('click dblclick', function (e) {
+ var $td = $(this),
+ $tr = $td.parent(),
+ item = that.data[$tr.data('index')],
+ index = $td[0].cellIndex,
+ field = that.header.fields[that.options.detailView && !that.options.cardView ? index - 1 : index],
+ column = that.columns[getFieldIndex(that.columns, field)],
+ value = getItemField(item, field);
+
+ if ($td.find('.detail-icon').length) {
+ return;
+ }
+
+ that.trigger(e.type === 'click' ? 'click-cell' : 'dbl-click-cell', field, value, item, $td);
+ that.trigger(e.type === 'click' ? 'click-row' : 'dbl-click-row', item, $tr);
+
+ // if click to select - then trigger the checkbox/radio click
+ if (e.type === 'click' && that.options.clickToSelect && column.clickToSelect) {
+ var $selectItem = $tr.find(sprintf('[name="%s"]', that.options.selectItemName));
+ if ($selectItem.length) {
+ $selectItem[0].click(); // #144: .trigger('click') bug
+ }
+ }
+ });
+
+ this.$body.find('> tr[data-index] > td > .detail-icon').off('click').on('click', function () {
+ var $this = $(this),
+ $tr = $this.parent().parent(),
+ index = $tr.data('index'),
+ row = data[index]; // Fix #980 Detail view, when searching, returns wrong row
+
+ // remove and update
+ if ($tr.next().is('tr.detail-view')) {
+ $this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailOpen));
+ $tr.next().remove();
+ that.trigger('collapse-row', index, row);
+ } else {
+ $this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailClose));
+ $tr.after(sprintf('<tr class="detail-view"><td colspan="%s">%s</td></tr>',
+ $tr.find('td').length, calculateObjectValue(that.options,
+ that.options.detailFormatter, [index, row], '')));
+ that.trigger('expand-row', index, row, $tr.next().find('td'));
+ }
+ that.resetView();
+ });
+
+ this.$selectItem = this.$body.find(sprintf('[name="%s"]', this.options.selectItemName));
+ this.$selectItem.off('click').on('click', function (event) {
+ event.stopImmediatePropagation();
+
+ var $this = $(this),
+ checked = $this.prop('checked'),
+ row = that.data[$this.data('index')];
+
+ if (that.options.maintainSelected && $(this).is(':radio')) {
+ $.each(that.options.data, function (i, row) {
+ row[that.header.stateField] = false;
+ });
+ }
+
+ row[that.header.stateField] = checked;
+
+ if (that.options.singleSelect) {
+ that.$selectItem.not(this).each(function () {
+ that.data[$(this).data('index')][that.header.stateField] = false;
+ });
+ that.$selectItem.filter(':checked').not(this).prop('checked', false);
+ }
+
+ that.updateSelected();
+ that.trigger(checked ? 'check' : 'uncheck', row, $this);
+ });
+
+ $.each(this.header.events, function (i, events) {
+ if (!events) {
+ return;
+ }
+ // fix bug, if events is defined with namespace
+ if (typeof events === 'string') {
+ events = calculateObjectValue(null, events);
+ }
+
+ var field = that.header.fields[i],
+ fieldIndex = $.inArray(field, that.getVisibleFields());
+
+ if (that.options.detailView && !that.options.cardView) {
+ fieldIndex += 1;
+ }
+
+ for (var key in events) {
+ that.$body.find('>tr:not(.no-records-found)').each(function () {
+ var $tr = $(this),
+ $td = $tr.find(that.options.cardView ? '.card-view' : 'td').eq(fieldIndex),
+ index = key.indexOf(' '),
+ name = key.substring(0, index),
+ el = key.substring(index + 1),
+ func = events[key];
+
+ $td.find(el).off(name).on(name, function (e) {
+ var index = $tr.data('index'),
+ row = that.data[index],
+ value = row[field];
+
+ func.apply(this, [e, value, row, index]);
+ });
+ });
+ }
+ });
+
+ this.updateSelected();
+ this.resetView();
+
+ this.trigger('post-body');
+ };
+
+ BootstrapTable.prototype.initServer = function (silent, query) {
+ var that = this,
+ data = {},
+ params = {
+ pageSize: this.options.pageSize === this.options.formatAllRows() ?
+ this.options.totalRows : this.options.pageSize,
+ pageNumber: this.options.pageNumber,
+ searchText: this.searchText,
+ sortName: this.options.sortName,
+ sortOrder: this.options.sortOrder
+ },
+ request;
+
+ if (!this.options.url && !this.options.ajax) {
+ return;
+ }
+
+ if (this.options.queryParamsType === 'limit') {
+ params = {
+ search: params.searchText,
+ sort: params.sortName,
+ order: params.sortOrder
+ };
+ if (this.options.pagination) {
+ params.limit = this.options.pageSize === this.options.formatAllRows() ?
+ this.options.totalRows : this.options.pageSize;
+ params.offset = this.options.pageSize === this.options.formatAllRows() ?
+ 0 : this.options.pageSize * (this.options.pageNumber - 1);
+ }
+ }
+
+ if (!($.isEmptyObject(this.filterColumnsPartial))) {
+ params['filter'] = JSON.stringify(this.filterColumnsPartial, null);
+ }
+
+ data = calculateObjectValue(this.options, this.options.queryParams, [params], data);
+
+ $.extend(data, query || {});
+
+ // false to stop request
+ if (data === false) {
+ return;
+ }
+
+ if (!silent) {
+ this.$tableLoading.show();
+ }
+ request = $.extend({}, calculateObjectValue(null, this.options.ajaxOptions), {
+ type: this.options.method,
+ url: this.options.url,
+ data: this.options.contentType === 'application/json' && this.options.method === 'post' ?
+ JSON.stringify(data) : data,
+ cache: this.options.cache,
+ contentType: this.options.contentType,
+ dataType: this.options.dataType,
+ success: function (res) {
+ res = calculateObjectValue(that.options, that.options.responseHandler, [res], res);
+
+ that.load(res);
+ that.trigger('load-success', res);
+ },
+ error: function (res) {
+ that.trigger('load-error', res.status, res);
+ },
+ complete: function () {
+ if (!silent) {
+ that.$tableLoading.hide();
+ }
+ }
+ });
+
+ if (this.options.ajax) {
+ calculateObjectValue(this, this.options.ajax, [request], null);
+ } else {
+ $.ajax(request);
+ }
+ };
+
+ BootstrapTable.prototype.initSearchText = function () {
+ if (this.options.search) {
+ if (this.options.searchText !== '') {
+ var $search = this.$toolbar.find('.search input');
+ $search.val(this.options.searchText);
+ this.onSearch({currentTarget: $search});
+ }
+ }
+ };
+
+ BootstrapTable.prototype.getCaret = function () {
+ var that = this;
+
+ $.each(this.$header.find('th'), function (i, th) {
+ $(th).find('.sortable').removeClass('desc asc').addClass($(th).data('field') === that.options.sortName ? that.options.sortOrder : 'both');
+ });
+ };
+
+ BootstrapTable.prototype.updateSelected = function () {
+ var checkAll = this.$selectItem.filter(':enabled').length &&
+ this.$selectItem.filter(':enabled').length ===
+ this.$selectItem.filter(':enabled').filter(':checked').length;
+
+ this.$selectAll.add(this.$selectAll_).prop('checked', checkAll);
+
+ this.$selectItem.each(function () {
+ $(this).closest('tr')[$(this).prop('checked') ? 'addClass' : 'removeClass']('selected');
+ });
+ };
+
+ BootstrapTable.prototype.updateRows = function () {
+ var that = this;
+
+ this.$selectItem.each(function () {
+ that.data[$(this).data('index')][that.header.stateField] = $(this).prop('checked');
+ });
+ };
+
+ BootstrapTable.prototype.resetRows = function () {
+ var that = this;
+
+ $.each(this.data, function (i, row) {
+ that.$selectAll.prop('checked', false);
+ that.$selectItem.prop('checked', false);
+ if (that.header.stateField) {
+ row[that.header.stateField] = false;
+ }
+ });
+ };
+
+ BootstrapTable.prototype.trigger = function (name) {
+ var args = Array.prototype.slice.call(arguments, 1);
+
+ name += '.bs.table';
+ this.options[BootstrapTable.EVENTS[name]].apply(this.options, args);
+ this.$el.trigger($.Event(name), args);
+
+ this.options.onAll(name, args);
+ this.$el.trigger($.Event('all.bs.table'), [name, args]);
+ };
+
+ BootstrapTable.prototype.resetHeader = function () {
+ // fix #61: the hidden table reset header bug.
+ // fix bug: get $el.css('width') error sometime (height = 500)
+ clearTimeout(this.timeoutId_);
+ this.timeoutId_ = setTimeout($.proxy(this.fitHeader, this), this.$el.is(':hidden') ? 100 : 0);
+ };
+
+ BootstrapTable.prototype.fitHeader = function () {
+ var that = this,
+ fixedBody,
+ scrollWidth,
+ focused,
+ focusedTemp;
+
+ if (that.$el.is(':hidden')) {
+ that.timeoutId_ = setTimeout($.proxy(that.fitHeader, that), 100);
+ return;
+ }
+ fixedBody = this.$tableBody.get(0);
+
+ scrollWidth = fixedBody.scrollWidth > fixedBody.clientWidth &&
+ fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ?
+ getScrollBarWidth() : 0;
+
+ this.$el.css('margin-top', -this.$header.outerHeight());
+
+ focused = $(':focus');
+ if (focused.length > 0) {
+ var $th = focused.parents('th');
+ if ($th.length > 0) {
+ var dataField = $th.attr('data-field');
+ if (dataField !== undefined) {
+ var $headerTh = this.$header.find("[data-field='" + dataField + "']");
+ if ($headerTh.length > 0) {
+ $headerTh.find(":input").addClass("focus-temp");
+ }
+ }
+ }
+ }
+
+ this.$header_ = this.$header.clone(true, true);
+ this.$selectAll_ = this.$header_.find('[name="btSelectAll"]');
+ this.$tableHeader.css({
+ 'margin-right': scrollWidth
+ }).find('table').css('width', this.$el.outerWidth())
+ .html('').attr('class', this.$el.attr('class'))
+ .append(this.$header_);
+
+
+ focusedTemp = $('.focus-temp:visible:eq(0)');
+ if (focusedTemp.length > 0) {
+ focusedTemp.focus();
+ this.$header.find('.focus-temp').removeClass('focus-temp');
+ }
+
+ // fix bug: $.data() is not working as expected after $.append()
+ this.$header.find('th[data-field]').each(function (i) {
+ that.$header_.find(sprintf('th[data-field="%s"]', $(this).data('field'))).data($(this).data());
+ });
+
+ var visibleFields = this.getVisibleFields();
+
+ this.$body.find('>tr:first-child:not(.no-records-found) > *').each(function (i) {
+ var $this = $(this),
+ index = i;
+
+ if (that.options.detailView && !that.options.cardView) {
+ if (i === 0) {
+ that.$header_.find('th.detail').find('.fht-cell').width($this.innerWidth());
+ }
+ index = i - 1;
+ }
+
+ that.$header_.find(sprintf('th[data-field="%s"]', visibleFields[index]))
+ .find('.fht-cell').width($this.innerWidth());
+ });
+ // horizontal scroll event
+ // TODO: it's probably better improving the layout than binding to scroll event
+ this.$tableBody.off('scroll').on('scroll', function () {
+ that.$tableHeader.scrollLeft($(this).scrollLeft());
+
+ if (that.options.showFooter && !that.options.cardView) {
+ that.$tableFooter.scrollLeft($(this).scrollLeft());
+ }
+ });
+ that.trigger('post-header');
+ };
+
+ BootstrapTable.prototype.resetFooter = function () {
+ var that = this,
+ data = that.getData(),
+ html = [];
+
+ if (!this.options.showFooter || this.options.cardView) { //do nothing
+ return;
+ }
+
+ if (!this.options.cardView && this.options.detailView) {
+ html.push('<td><div class="th-inner"> </div><div class="fht-cell"></div></td>');
+ }
+
+ $.each(this.columns, function (i, column) {
+ var falign = '', // footer align style
+ style = '',
+ class_ = sprintf(' class="%s"', column['class']);
+
+ if (!column.visible) {
+ return;
+ }
+
+ if (that.options.cardView && (!column.cardVisible)) {
+ return;
+ }
+
+ falign = sprintf('text-align: %s; ', column.falign ? column.falign : column.align);
+ style = sprintf('vertical-align: %s; ', column.valign);
+
+ html.push('<td', class_, sprintf(' style="%s"', falign + style), '>');
+ html.push('<div class="th-inner">');
+
+ html.push(calculateObjectValue(column, column.footerFormatter, [data], ' ') || ' ');
+
+ html.push('</div>');
+ html.push('<div class="fht-cell"></div>');
+ html.push('</div>');
+ html.push('</td>');
+ });
+
+ this.$tableFooter.find('tr').html(html.join(''));
+ clearTimeout(this.timeoutFooter_);
+ this.timeoutFooter_ = setTimeout($.proxy(this.fitFooter, this),
+ this.$el.is(':hidden') ? 100 : 0);
+ };
+
+ BootstrapTable.prototype.fitFooter = function () {
+ var that = this,
+ $footerTd,
+ elWidth,
+ scrollWidth;
+
+ clearTimeout(this.timeoutFooter_);
+ if (this.$el.is(':hidden')) {
+ this.timeoutFooter_ = setTimeout($.proxy(this.fitFooter, this), 100);
+ return;
+ }
+
+ elWidth = this.$el.css('width');
+ scrollWidth = elWidth > this.$tableBody.width() ? getScrollBarWidth() : 0;
+
+ this.$tableFooter.css({
+ 'margin-right': scrollWidth
+ }).find('table').css('width', elWidth)
+ .attr('class', this.$el.attr('class'));
+
+ $footerTd = this.$tableFooter.find('td');
+
+ this.$body.find('>tr:first-child:not(.no-records-found) > *').each(function (i) {
+ var $this = $(this);
+
+ $footerTd.eq(i).find('.fht-cell').width($this.innerWidth());
+ });
+ };
+
+ BootstrapTable.prototype.toggleColumn = function (index, checked, needUpdate) {
+ if (index === -1) {
+ return;
+ }
+ this.columns[index].visible = checked;
+ this.initHeader();
+ this.initSearch();
+ this.initPagination();
+ this.initBody();
+
+ if (this.options.showColumns) {
+ var $items = this.$toolbar.find('.keep-open input').prop('disabled', false);
+
+ if (needUpdate) {
+ $items.filter(sprintf('[value="%s"]', index)).prop('checked', checked);
+ }
+
+ if ($items.filter(':checked').length <= this.options.minimumCountColumns) {
+ $items.filter(':checked').prop('disabled', true);
+ }
+ }
+ };
+
+ BootstrapTable.prototype.toggleRow = function (index, uniqueId, visible) {
+ if (index === -1) {
+ return;
+ }
+
+ this.$body.find(typeof index !== 'undefined' ?
+ sprintf('tr[data-index="%s"]', index) :
+ sprintf('tr[data-uniqueid="%s"]', uniqueId))
+ [visible ? 'show' : 'hide']();
+ };
+
+ BootstrapTable.prototype.getVisibleFields = function () {
+ var that = this,
+ visibleFields = [];
+
+ $.each(this.header.fields, function (j, field) {
+ var column = that.columns[getFieldIndex(that.columns, field)];
+
+ if (!column.visible) {
+ return;
+ }
+ visibleFields.push(field);
+ });
+ return visibleFields;
+ };
+
+ // PUBLIC FUNCTION DEFINITION
+ // =======================
+
+ BootstrapTable.prototype.resetView = function (params) {
+ var padding = 0;
+
+ if (params && params.height) {
+ this.options.height = params.height;
+ }
+
+ this.$selectAll.prop('checked', this.$selectItem.length > 0 &&
+ this.$selectItem.length === this.$selectItem.filter(':checked').length);
+
+ if (this.options.height) {
+ var toolbarHeight = getRealHeight(this.$toolbar),
+ paginationHeight = getRealHeight(this.$pagination),
+ height = this.options.height - toolbarHeight - paginationHeight;
+
+ this.$tableContainer.css('height', height + 'px');
+ }
+
+ if (this.options.cardView) {
+ // remove the element css
+ this.$el.css('margin-top', '0');
+ this.$tableContainer.css('padding-bottom', '0');
+ return;
+ }
+
+ if (this.options.showHeader && this.options.height) {
+ this.$tableHeader.show();
+ this.resetHeader();
+ padding += this.$header.outerHeight();
+ } else {
+ this.$tableHeader.hide();
+ this.trigger('post-header');
+ }
+
+ if (this.options.showFooter) {
+ this.resetFooter();
+ if (this.options.height) {
+ padding += this.$tableFooter.outerHeight() + 1;
+ }
+ }
+
+ // Assign the correct sortable arrow
+ this.getCaret();
+ this.$tableContainer.css('padding-bottom', padding + 'px');
+ this.trigger('reset-view');
+ };
+
+ BootstrapTable.prototype.getData = function (useCurrentPage) {
+ return (this.searchText || !$.isEmptyObject(this.filterColumns) || !$.isEmptyObject(this.filterColumnsPartial)) ?
+ (useCurrentPage ? this.data.slice(this.pageFrom - 1, this.pageTo) : this.data) :
+ (useCurrentPage ? this.options.data.slice(this.pageFrom - 1, this.pageTo) : this.options.data);
+ };
+
+ BootstrapTable.prototype.load = function (data) {
+ var fixedScroll = false;
+
+ // #431: support pagination
+ if (this.options.sidePagination === 'server') {
+ this.options.totalRows = data.total;
+ fixedScroll = data.fixedScroll;
+ data = data[this.options.dataField];
+ } else if (!$.isArray(data)) { // support fixedScroll
+ fixedScroll = data.fixedScroll;
+ data = data.data;
+ }
+
+ this.initData(data);
+ this.initSearch();
+ this.initPagination();
+ this.initBody(fixedScroll);
+ };
+
+ BootstrapTable.prototype.append = function (data) {
+ this.initData(data, 'append');
+ this.initSearch();
+ this.initPagination();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.prepend = function (data) {
+ this.initData(data, 'prepend');
+ this.initSearch();
+ this.initPagination();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.remove = function (params) {
+ var len = this.options.data.length,
+ i, row;
+
+ if (!params.hasOwnProperty('field') || !params.hasOwnProperty('values')) {
+ return;
+ }
+
+ for (i = len - 1; i >= 0; i--) {
+ row = this.options.data[i];
+
+ if (!row.hasOwnProperty(params.field)) {
+ continue;
+ }
+ if ($.inArray(row[params.field], params.values) !== -1) {
+ this.options.data.splice(i, 1);
+ }
+ }
+
+ if (len === this.options.data.length) {
+ return;
+ }
+
+ this.initSearch();
+ this.initPagination();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.removeAll = function () {
+ if (this.options.data.length > 0) {
+ this.options.data.splice(0, this.options.data.length);
+ this.initSearch();
+ this.initPagination();
+ this.initBody(true);
+ }
+ };
+
+ BootstrapTable.prototype.getRowByUniqueId = function (id) {
+ var uniqueId = this.options.uniqueId,
+ len = this.options.data.length,
+ dataRow = null,
+ i, row, rowUniqueId;
+
+ for (i = len - 1; i >= 0; i--) {
+ row = this.options.data[i];
+
+ if (row.hasOwnProperty(uniqueId)) { // uniqueId is a column
+ rowUniqueId = row[uniqueId];
+ } else if(row._data.hasOwnProperty(uniqueId)) { // uniqueId is a row data property
+ rowUniqueId = row._data[uniqueId];
+ } else {
+ continue;
+ }
+
+ if (typeof rowUniqueId === 'string') {
+ id = id.toString();
+ } else if (typeof rowUniqueId === 'number') {
+ if ((Number(rowUniqueId) === rowUniqueId) && (rowUniqueId % 1 === 0)) {
+ id = parseInt(id);
+ } else if ((rowUniqueId === Number(rowUniqueId)) && (rowUniqueId !== 0)) {
+ id = parseFloat(id);
+ }
+ }
+
+ if (rowUniqueId === id) {
+ dataRow = row;
+ break;
+ }
+ }
+
+ return dataRow;
+ };
+
+ BootstrapTable.prototype.removeByUniqueId = function (id) {
+ var len = this.options.data.length,
+ row = this.getRowByUniqueId(id);
+
+ if (row) {
+ this.options.data.splice(this.options.data.indexOf(row), 1);
+ }
+
+ if (len === this.options.data.length) {
+ return;
+ }
+
+ this.initSearch();
+ this.initPagination();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.updateByUniqueId = function (params) {
+ var rowId;
+
+ if (!params.hasOwnProperty('id') || !params.hasOwnProperty('row')) {
+ return;
+ }
+
+ rowId = $.inArray(this.getRowByUniqueId(params.id), this.options.data);
+
+ if (rowId === -1) {
+ return;
+ }
+
+ $.extend(this.data[rowId], params.row);
+ this.initSort();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.insertRow = function (params) {
+ if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) {
+ return;
+ }
+ this.data.splice(params.index, 0, params.row);
+ this.initSearch();
+ this.initPagination();
+ this.initSort();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.updateRow = function (params) {
+ if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) {
+ return;
+ }
+ $.extend(this.data[params.index], params.row);
+ this.initSort();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.showRow = function (params) {
+ if (!params.hasOwnProperty('index') || !params.hasOwnProperty('uniqueId')) {
+ return;
+ }
+ this.toggleRow(params.index, params.uniqueId, true);
+ };
+
+ BootstrapTable.prototype.hideRow = function (params) {
+ if (!params.hasOwnProperty('index') || !params.hasOwnProperty('uniqueId')) {
+ return;
+ }
+ this.toggleRow(params.index, params.uniqueId, false);
+ };
+
+ BootstrapTable.prototype.getRowsHidden = function (show) {
+ var rows = $(this.$body[0]).children().filter(':hidden'),
+ i = 0;
+ if (show) {
+ for (; i < rows.length; i++) {
+ $(rows[i]).show();
+ }
+ }
+ return rows;
+ };
+
+ BootstrapTable.prototype.mergeCells = function (options) {
+ var row = options.index,
+ col = $.inArray(options.field, this.getVisibleFields()),
+ rowspan = options.rowspan || 1,
+ colspan = options.colspan || 1,
+ i, j,
+ $tr = this.$body.find('>tr'),
+ $td;
+
+ if (this.options.detailView && !this.options.cardView) {
+ col += 1;
+ }
+
+ $td = $tr.eq(row).find('>td').eq(col);
+
+ if (row < 0 || col < 0 || row >= this.data.length) {
+ return;
+ }
+
+ for (i = row; i < row + rowspan; i++) {
+ for (j = col; j < col + colspan; j++) {
+ $tr.eq(i).find('>td').eq(j).hide();
+ }
+ }
+
+ $td.attr('rowspan', rowspan).attr('colspan', colspan).show();
+ };
+
+ BootstrapTable.prototype.updateCell = function (params) {
+ if (!params.hasOwnProperty('index') ||
+ !params.hasOwnProperty('field') ||
+ !params.hasOwnProperty('value')) {
+ return;
+ }
+ this.data[params.index][params.field] = params.value;
+ this.initSort();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.getOptions = function () {
+ return this.options;
+ };
+
+ BootstrapTable.prototype.getSelections = function () {
+ var that = this;
+
+ return $.grep(this.data, function (row) {
+ return row[that.header.stateField];
+ });
+ };
+
+ BootstrapTable.prototype.getAllSelections = function () {
+ var that = this;
+
+ return $.grep(this.options.data, function (row) {
+ return row[that.header.stateField];
+ });
+ };
+
+ BootstrapTable.prototype.checkAll = function () {
+ this.checkAll_(true);
+ };
+
+ BootstrapTable.prototype.uncheckAll = function () {
+ this.checkAll_(false);
+ };
+
+ BootstrapTable.prototype.checkAll_ = function (checked) {
+ var rows;
+ if (!checked) {
+ rows = this.getSelections();
+ }
+ this.$selectAll.add(this.$selectAll_).prop('checked', checked);
+ this.$selectItem.filter(':enabled').prop('checked', checked);
+ this.updateRows();
+ if (checked) {
+ rows = this.getSelections();
+ }
+ this.trigger(checked ? 'check-all' : 'uncheck-all', rows);
+ };
+
+ BootstrapTable.prototype.check = function (index) {
+ this.check_(true, index);
+ };
+
+ BootstrapTable.prototype.uncheck = function (index) {
+ this.check_(false, index);
+ };
+
+ BootstrapTable.prototype.check_ = function (checked, index) {
+ var $el = this.$selectItem.filter(sprintf('[data-index="%s"]', index)).prop('checked', checked);
+ this.data[index][this.header.stateField] = checked;
+ this.updateSelected();
+ this.trigger(checked ? 'check' : 'uncheck', this.data[index], $el);
+ };
+
+ BootstrapTable.prototype.checkBy = function (obj) {
+ this.checkBy_(true, obj);
+ };
+
+ BootstrapTable.prototype.uncheckBy = function (obj) {
+ this.checkBy_(false, obj);
+ };
+
+ BootstrapTable.prototype.checkBy_ = function (checked, obj) {
+ if (!obj.hasOwnProperty('field') || !obj.hasOwnProperty('values')) {
+ return;
+ }
+
+ var that = this,
+ rows = [];
+ $.each(this.options.data, function (index, row) {
+ if (!row.hasOwnProperty(obj.field)) {
+ return false;
+ }
+ if ($.inArray(row[obj.field], obj.values) !== -1) {
+ var $el = that.$selectItem.filter(':enabled')
+ .filter(sprintf('[data-index="%s"]', index)).prop('checked', checked);
+ row[that.header.stateField] = checked;
+ rows.push(row);
+ that.trigger(checked ? 'check' : 'uncheck', row, $el);
+ }
+ });
+ this.updateSelected();
+ this.trigger(checked ? 'check-some' : 'uncheck-some', rows);
+ };
+
+ BootstrapTable.prototype.destroy = function () {
+ this.$el.insertBefore(this.$container);
+ $(this.options.toolbar).insertBefore(this.$el);
+ this.$container.next().remove();
+ this.$container.remove();
+ this.$el.html(this.$el_.html())
+ .css('margin-top', '0')
+ .attr('class', this.$el_.attr('class') || ''); // reset the class
+ };
+
+ BootstrapTable.prototype.showLoading = function () {
+ this.$tableLoading.show();
+ };
+
+ BootstrapTable.prototype.hideLoading = function () {
+ this.$tableLoading.hide();
+ };
+
+ BootstrapTable.prototype.togglePagination = function () {
+ this.options.pagination = !this.options.pagination;
+ var button = this.$toolbar.find('button[name="paginationSwitch"] i');
+ if (this.options.pagination) {
+ button.attr("class", this.options.iconsPrefix + " " + this.options.icons.paginationSwitchDown);
+ } else {
+ button.attr("class", this.options.iconsPrefix + " " + this.options.icons.paginationSwitchUp);
+ }
+ this.updatePagination();
+ };
+
+ BootstrapTable.prototype.refresh = function (params) {
+ if (params && params.url) {
+ this.options.url = params.url;
+ this.options.pageNumber = 1;
+ }
+ this.initServer(params && params.silent, params && params.query);
+ };
+
+ BootstrapTable.prototype.resetWidth = function () {
+ if (this.options.showHeader && this.options.height) {
+ this.fitHeader();
+ }
+ if (this.options.showFooter) {
+ this.fitFooter();
+ }
+ };
+
+ BootstrapTable.prototype.showColumn = function (field) {
+ this.toggleColumn(getFieldIndex(this.columns, field), true, true);
+ };
+
+ BootstrapTable.prototype.hideColumn = function (field) {
+ this.toggleColumn(getFieldIndex(this.columns, field), false, true);
+ };
+
+ BootstrapTable.prototype.getHiddenColumns = function () {
+ return $.grep(this.columns, function (column) {
+ return !column.visible;
+ });
+ };
+
+ BootstrapTable.prototype.filterBy = function (columns) {
+ this.filterColumns = $.isEmptyObject(columns) ? {} : columns;
+ this.options.pageNumber = 1;
+ this.initSearch();
+ this.updatePagination();
+ };
+
+ BootstrapTable.prototype.scrollTo = function (value) {
+ if (typeof value === 'string') {
+ value = value === 'bottom' ? this.$tableBody[0].scrollHeight : 0;
+ }
+ if (typeof value === 'number') {
+ this.$tableBody.scrollTop(value);
+ }
+ if (typeof value === 'undefined') {
+ return this.$tableBody.scrollTop();
+ }
+ };
+
+ BootstrapTable.prototype.getScrollPosition = function () {
+ return this.scrollTo();
+ };
+
+ BootstrapTable.prototype.selectPage = function (page) {
+ if (page > 0 && page <= this.options.totalPages) {
+ this.options.pageNumber = page;
+ this.updatePagination();
+ }
+ };
+
+ BootstrapTable.prototype.prevPage = function () {
+ if (this.options.pageNumber > 1) {
+ this.options.pageNumber--;
+ this.updatePagination();
+ }
+ };
+
+ BootstrapTable.prototype.nextPage = function () {
+ if (this.options.pageNumber < this.options.totalPages) {
+ this.options.pageNumber++;
+ this.updatePagination();
+ }
+ };
+
+ BootstrapTable.prototype.toggleView = function () {
+ this.options.cardView = !this.options.cardView;
+ this.initHeader();
+ // Fixed remove toolbar when click cardView button.
+ //that.initToolbar();
+ this.initBody();
+ this.trigger('toggle', this.options.cardView);
+ };
+
+ BootstrapTable.prototype.refreshOptions = function (options) {
+ //If the objects are equivalent then avoid the call of destroy / init methods
+ if (compareObjects(this.options, options, false)) {
+ return;
+ }
+ this.options = $.extend(this.options, options);
+ this.trigger('refresh-options', this.options);
+ this.destroy();
+ this.init();
+ };
+
+ BootstrapTable.prototype.resetSearch = function (text) {
+ var $search = this.$toolbar.find('.search input');
+ $search.val(text || '');
+ this.onSearch({currentTarget: $search});
+ };
+
+ BootstrapTable.prototype.expandRow_ = function (expand, index) {
+ var $tr = this.$body.find(sprintf('> tr[data-index="%s"]', index));
+ if ($tr.next().is('tr.detail-view') === (expand ? false : true)) {
+ $tr.find('> td > .detail-icon').click();
+ }
+ };
+
+ BootstrapTable.prototype.expandRow = function (index) {
+ this.expandRow_(true, index);
+ };
+
+ BootstrapTable.prototype.collapseRow = function (index) {
+ this.expandRow_(false, index);
+ };
+
+ BootstrapTable.prototype.expandAllRows = function (isSubTable) {
+ if (isSubTable) {
+ var $tr = this.$body.find(sprintf('> tr[data-index="%s"]', 0)),
+ that = this,
+ detailIcon = null,
+ executeInterval = false,
+ idInterval = -1;
+
+ if (!$tr.next().is('tr.detail-view')) {
+ $tr.find('> td > .detail-icon').click();
+ executeInterval = true;
+ } else if (!$tr.next().next().is('tr.detail-view')) {
+ $tr.next().find(".detail-icon").click();
+ executeInterval = true;
+ }
+
+ if (executeInterval) {
+ try {
+ idInterval = setInterval(function () {
+ detailIcon = that.$body.find("tr.detail-view").last().find(".detail-icon");
+ if (detailIcon.length > 0) {
+ detailIcon.click();
+ } else {
+ clearInterval(idInterval);
+ }
+ }, 1);
+ } catch (ex) {
+ clearInterval(idInterval);
+ }
+ }
+ } else {
+ var trs = this.$body.children();
+ for (var i = 0; i < trs.length; i++) {
+ this.expandRow_(true, $(trs[i]).data("index"));
+ }
+ }
+ };
+
+ BootstrapTable.prototype.collapseAllRows = function (isSubTable) {
+ if (isSubTable) {
+ this.expandRow_(false, 0);
+ } else {
+ var trs = this.$body.children();
+ for (var i = 0; i < trs.length; i++) {
+ this.expandRow_(false, $(trs[i]).data("index"));
+ }
+ }
+ };
+
+ // BOOTSTRAP TABLE PLUGIN DEFINITION
+ // =======================
+
+ var allowedMethods = [
+ 'getOptions',
+ 'getSelections', 'getAllSelections', 'getData',
+ 'load', 'append', 'prepend', 'remove', 'removeAll',
+ 'insertRow', 'updateRow', 'updateCell', 'updateByUniqueId', 'removeByUniqueId',
+ 'getRowByUniqueId', 'showRow', 'hideRow', 'getRowsHidden',
+ 'mergeCells',
+ 'checkAll', 'uncheckAll',
+ 'check', 'uncheck',
+ 'checkBy', 'uncheckBy',
+ 'refresh',
+ 'resetView',
+ 'resetWidth',
+ 'destroy',
+ 'showLoading', 'hideLoading',
+ 'showColumn', 'hideColumn', 'getHiddenColumns',
+ 'filterBy',
+ 'scrollTo',
+ 'getScrollPosition',
+ 'selectPage', 'prevPage', 'nextPage',
+ 'togglePagination',
+ 'toggleView',
+ 'refreshOptions',
+ 'resetSearch',
+ 'expandRow', 'collapseRow', 'expandAllRows', 'collapseAllRows'
+ ];
+
+ $.fn.bootstrapTable = function (option) {
+ var value,
+ args = Array.prototype.slice.call(arguments, 1);
+
+ this.each(function () {
+ var $this = $(this),
+ data = $this.data('bootstrap.table'),
+ options = $.extend({}, BootstrapTable.DEFAULTS, $this.data(),
+ typeof option === 'object' && option);
+
+ if (typeof option === 'string') {
+ if ($.inArray(option, allowedMethods) < 0) {
+ throw new Error("Unknown method: " + option);
+ }
+
+ if (!data) {
+ return;
+ }
+
+ value = data[option].apply(data, args);
+
+ if (option === 'destroy') {
+ $this.removeData('bootstrap.table');
+ }
+ }
+
+ if (!data) {
+ $this.data('bootstrap.table', (data = new BootstrapTable(this, options)));
+ }
+ });
+
+ return typeof value === 'undefined' ? this : value;
+ };
+
+ $.fn.bootstrapTable.Constructor = BootstrapTable;
+ $.fn.bootstrapTable.defaults = BootstrapTable.DEFAULTS;
+ $.fn.bootstrapTable.columnDefaults = BootstrapTable.COLUMN_DEFAULTS;
+ $.fn.bootstrapTable.locales = BootstrapTable.LOCALES;
+ $.fn.bootstrapTable.methods = allowedMethods;
+ $.fn.bootstrapTable.utils = {
+ sprintf: sprintf,
+ getFieldIndex: getFieldIndex,
+ compareObjects: compareObjects,
+ calculateObjectValue: calculateObjectValue
+ };
+
+ // BOOTSTRAP TABLE INIT
+ // =======================
+
+ $(function () {
+ $('[data-toggle="table"]').bootstrapTable();
+ });
+
+}(jQuery);
diff --git a/admportal/public/javascripts/bootstrap.min.js b/admportal/public/javascripts/bootstrap.min.js
new file mode 100644
index 0000000..e79c065
--- /dev/null
+++ b/admportal/public/javascripts/bootstrap.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under the MIT license
+ */
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");
+d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file
diff --git a/admportal/public/javascripts/dataTables.bootstrap.min.js b/admportal/public/javascripts/dataTables.bootstrap.min.js
new file mode 100644
index 0000000..7ae847b
--- /dev/null
+++ b/admportal/public/javascripts/dataTables.bootstrap.min.js
@@ -0,0 +1,9 @@
+/*!
+ DataTables Bootstrap 3 integration
+ ©2011-2015 SpryMedia Ltd - datatables.net/license
+*/
+(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,e){a||(a=window);if(!e||!e.fn.dataTable)e=require("datatables.net")(a,e).$;return b(e,a,a.document)}:b(jQuery,window,document)})(function(b,a,e){var d=b.fn.dataTable;b.extend(!0,d.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});b.extend(d.ext.classes,
+{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});d.ext.renderer.pageButton.bootstrap=function(a,h,r,m,j,n){var o=new d.Api(a),s=a.oClasses,k=a.oLanguage.oPaginate,t=a.oLanguage.oAria.paginate||{},f,g,p=0,q=function(d,e){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")};
+l=0;for(h=e.length;l<h;l++)if(c=e[l],b.isArray(c))q(d,c);else{g=f="";switch(c){case "ellipsis":f="…";g="disabled";break;case "first":f=k.sFirst;g=c+(0<j?"":" disabled");break;case "previous":f=k.sPrevious;g=c+(0<j?"":" disabled");break;case "next":f=k.sNext;g=c+(j<n-1?"":" disabled");break;case "last":f=k.sLast;g=c+(j<n-1?"":" disabled");break;default:f=c+1,g=j===c?"active":""}f&&(i=b("<li>",{"class":s.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("<a>",{href:"#",
+"aria-controls":a.sTableId,"aria-label":t[c],"data-dt-idx":p,tabindex:a.iTabIndex}).html(f)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(e.activeElement).data("dt-idx")}catch(u){}q(b(h).empty().html('<ul class="pagination"/>').children("ul"),m);i&&b(h).find("[data-dt-idx="+i+"]").focus()};d.TableTools&&(b.extend(!0,d.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",
+buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,d.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}));return d});
diff --git a/admportal/public/javascripts/jquery-2.2.0.min.js b/admportal/public/javascripts/jquery-2.2.0.min.js
new file mode 100644
index 0000000..06ac263
--- /dev/null
+++ b/admportal/public/javascripts/jquery-2.2.0.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v2.2.0 | (c) jQuery Foundation | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!k.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=R.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c}catch(e){}O.set(a,b,c);
+}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=N.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function W(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&T.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var X=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,Z=/^$|\/(?:java|ecma)script/i,$={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return this;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.rnamespace||a.rnamespace.test(g.namespace))&&(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||d,e=c.documentElement,f=c.body,a.pageX=b.clientX+(e&&e.scrollLeft||f&&f.scrollLeft||0)-(e&&e.clientLeft||f&&f.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||f&&f.scrollTop||0)-(e&&e.clientTop||f&&f.clientTop||0)),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ea.test(f)?this.mouseHooks:da.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=d),3===a.target.nodeType&&(a.target=a.target.parentNode),h.filter?h.filter(a,g):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==ia()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===ia()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ga:ha):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:ha,isPropagationStopped:ha,isImmediatePropagationStopped:ha,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ga,a&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ga,a&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ga,a&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),n.fn.extend({on:function(a,b,c,d){return ja(this,a,b,c,d)},one:function(a,b,c,d){return ja(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=ha),this.each(function(){n.event.remove(this,a,c,b)})}});var ka=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,la=/<script|<style|<link/i,ma=/checked\s*(?:[^=]|=\s*.checked.)/i,na=/^true\/(.*)/,oa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=wa[0].contentDocument,b.write(),b.close(),c=ya(a,b),wa.detach()),xa[a]=c),c}var Aa=/^margin/,Ba=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ca=function(b){var c=b.ownerDocument.defaultView;return c.opener||(c=a),c.getComputedStyle(b)},Da=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Ea=d.documentElement;!function(){var b,c,e,f,g=d.createElement("div"),h=d.createElement("div");if(h.style){h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,g.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",g.appendChild(h);function i(){h.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",h.innerHTML="",Ea.appendChild(g);var d=a.getComputedStyle(h);b="1%"!==d.top,f="2px"===d.marginLeft,c="4px"===d.width,h.style.marginRight="50%",e="4px"===d.marginRight,Ea.removeChild(g)}n.extend(l,{pixelPosition:function(){return i(),b},boxSizingReliable:function(){return null==c&&i(),c},pixelMarginRight:function(){return null==c&&i(),e},reliableMarginLeft:function(){return null==c&&i(),f},reliableMarginRight:function(){var b,c=h.appendChild(d.createElement("div"));return c.style.cssText=h.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",h.style.width="1px",Ea.appendChild(g),b=!parseFloat(a.getComputedStyle(c).marginRight),Ea.removeChild(g),h.removeChild(c),b}})}}();function Fa(a,b,c){var d,e,f,g,h=a.style;return c=c||Ca(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),!l.pixelMarginRight()&&Ba.test(g)&&Aa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Ga(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Ha=/^(none|table(?!-c[ea]).+)/,Ia={position:"absolute",visibility:"hidden",display:"block"},Ja={letterSpacing:"0",fontWeight:"400"},Ka=["Webkit","O","Moz","ms"],La=d.createElement("div").style;function Ma(a){if(a in La)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ka.length;while(c--)if(a=Ka[c]+b,a in La)return a}function Na(a,b,c){var d=T.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Oa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Pa(b,c,e){var f=!0,g="width"===c?b.offsetWidth:b.offsetHeight,h=Ca(b),i="border-box"===n.css(b,"boxSizing",!1,h);if(d.msFullscreenElement&&a.top!==a&&b.getClientRects().length&&(g=Math.round(100*b.getBoundingClientRect()[c])),0>=g||null==g){if(g=Fa(b,c,h),(0>g||null==g)&&(g=b.style[c]),Ba.test(g))return g;f=i&&(l.boxSizingReliable()||g===b.style[c]),g=parseFloat(g)||0}return g+Oa(b,c,e||(i?"border":"content"),f,h)+"px"}function Qa(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=N.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=N.access(d,"olddisplay",za(d.nodeName)))):(e=V(d),"none"===c&&e||N.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Fa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=T.exec(c))&&e[1]&&(c=W(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Fa(a,b,d)),"normal"===e&&b in Ja&&(e=Ja[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Ha.test(n.css(a,"display"))&&0===a.offsetWidth?Da(a,Ia,function(){return Pa(a,b,d)}):Pa(a,b,d):void 0},set:function(a,c,d){var e,f=d&&Ca(a),g=d&&Oa(a,b,d,"border-box"===n.css(a,"boxSizing",!1,f),f);return g&&(e=T.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=n.css(a,b)),Na(a,c,g)}}}),n.cssHooks.marginLeft=Ga(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Fa(a,"marginLeft"))||a.getBoundingClientRect().left-Da(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px":void 0}),n.cssHooks.marginRight=Ga(l.reliableMarginRight,function(a,b){return b?Da(a,{display:"inline-block"},Fa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Aa.test(a)||(n.cssHooks[a+b].set=Na)}),n.fn.extend({css:function(a,b){return K(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ca(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Qa(this,!0)},hide:function(){return Qa(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function Ra(a,b,c,d,e){return new Ra.prototype.init(a,b,c,d,e)}n.Tween=Ra,Ra.prototype={constructor:Ra,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ra.propHooks[this.prop];return a&&a.get?a.get(this):Ra.propHooks._default.get(this)},run:function(a){var b,c=Ra.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,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):Ra.propHooks._default.set(this),this}},Ra.prototype.init.prototype=Ra.prototype,Ra.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},Ra.propHooks.scrollTop=Ra.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=Ra.prototype.init,n.fx.step={};var Sa,Ta,Ua=/^(?:toggle|show|hide)$/,Va=/queueHooks$/;function Wa(){return a.setTimeout(function(){Sa=void 0}),Sa=n.now()}function Xa(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=U[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ya(a,b,c){for(var d,e=(_a.tweeners[b]||[]).concat(_a.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Za(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&V(a),q=N.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?N.get(a,"olddisplay")||za(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Ua.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?za(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=N.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;N.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ya(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function $a(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],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 _a(a,b,c){var d,e,f=0,g=_a.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Sa||Wa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:Sa||Wa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for($a(k,j.opts.specialEasing);g>f;f++)if(d=_a.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,Ya,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(_a,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return W(c.elem,a,T.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],_a.tweeners[c]=_a.tweeners[c]||[],_a.tweeners[c].unshift(b)},prefilters:[Za],prefilter:function(a,b){b?_a.prefilters.unshift(a):_a.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=_a(this,n.extend({},a),f);(e||N.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=N.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Va.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=N.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Xa(b,!0),a,d,e)}}),n.each({slideDown:Xa("show"),slideUp:Xa("hide"),slideToggle:Xa("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Sa=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Sa=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ta||(Ta=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(Ta),Ta=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",l.checkOn=""!==a.value,l.optSelected=c.selected,b.disabled=!0,l.optDisabled=!c.disabled,a=d.createElement("input"),a.value="t",a.type="radio",l.radioValue="t"===a.value}();var ab,bb=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return K(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ab:void 0)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)}}),ab={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=bb[b]||n.find.attr;bb[b]=function(a,b,d){var e,f;return d||(f=bb[b],bb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,bb[b]=f),e}});var cb=/^(?:input|select|textarea|button)$/i,db=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return K(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b];
+},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):cb.test(a.nodeName)||db.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var eb=/[\t\r\n\f]/g;function fb(a){return a.getAttribute&&a.getAttribute("class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,fb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,fb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,fb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(void 0===a||"boolean"===c)&&(b=fb(this),b&&N.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":N.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+fb(c)+" ").replace(eb," ").indexOf(b)>-1)return!0;return!1}});var gb=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(gb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){return n.trim(a.value)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(n.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var hb=/^(?:focusinfocus|focusoutblur)$/;n.extend(n.event,{trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!hb.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),l=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},f||!o.trigger||o.trigger.apply(e,c)!==!1)){if(!f&&!o.noBubble&&!n.isWindow(e)){for(j=o.delegateType||q,hb.test(j+q)||(h=h.parentNode);h;h=h.parentNode)p.push(h),i=h;i===(e.ownerDocument||d)&&p.push(i.defaultView||i.parentWindow||a)}g=0;while((h=p[g++])&&!b.isPropagationStopped())b.type=g>1?j:o.bindType||q,m=(N.get(h,"events")||{})[b.type]&&N.get(h,"handle"),m&&m.apply(h,c),m=l&&h[l],m&&m.apply&&L(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=q,f||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!L(e)||l&&n.isFunction(e[q])&&!n.isWindow(e)&&(i=e[l],i&&(e[l]=null),n.event.triggered=q,e[q](),n.event.triggered=void 0,i&&(e[l]=i)),b.result}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}}),n.fn.extend({trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}}),n.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){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),l.focusin="onfocusin"in a,l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=N.access(d,b);e||d.addEventListener(a,c,!0),N.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=N.access(d,b)-1;e?N.access(d,b,e):(d.removeEventListener(a,c,!0),N.remove(d,b))}}});var ib=a.location,jb=n.now(),kb=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return(!c||c.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+b),c};var lb=/#.*$/,mb=/([?&])_=[^&]*/,nb=/^(.*?):[ \t]*([^\r\n]*)$/gm,ob=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,pb=/^(?:GET|HEAD)$/,qb=/^\/\//,rb={},sb={},tb="*/".concat("*"),ub=d.createElement("a");ub.href=ib.href;function vb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function wb(a,b,c,d){var e={},f=a===sb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function xb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function yb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function zb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ib.href,type:"GET",isLocal:ob.test(ib.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":tb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?xb(xb(a,n.ajaxSettings),b):xb(n.ajaxSettings,a)},ajaxPrefilter:vb(rb),ajaxTransport:vb(sb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m=n.ajaxSetup({},c),o=m.context||m,p=m.context&&(o.nodeType||o.jquery)?n(o):n.event,q=n.Deferred(),r=n.Callbacks("once memory"),s=m.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,getResponseHeader:function(a){var b;if(2===v){if(!h){h={};while(b=nb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===v?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return v||(a=u[c]=u[c]||a,t[a]=b),this},overrideMimeType:function(a){return v||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>v)for(b in a)s[b]=[s[b],a[b]];else x.always(a[x.status]);return this},abort:function(a){var b=a||w;return e&&e.abort(b),z(0,b),this}};if(q.promise(x).complete=r.add,x.success=x.done,x.error=x.fail,m.url=((b||m.url||ib.href)+"").replace(lb,"").replace(qb,ib.protocol+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=n.trim(m.dataType||"*").toLowerCase().match(G)||[""],null==m.crossDomain){j=d.createElement("a");try{j.href=m.url,j.href=j.href,m.crossDomain=ub.protocol+"//"+ub.host!=j.protocol+"//"+j.host}catch(y){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=n.param(m.data,m.traditional)),wb(rb,m,c,x),2===v)return x;k=n.event&&m.global,k&&0===n.active++&&n.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!pb.test(m.type),f=m.url,m.hasContent||(m.data&&(f=m.url+=(kb.test(f)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=mb.test(f)?f.replace(mb,"$1_="+jb++):f+(kb.test(f)?"&":"?")+"_="+jb++)),m.ifModified&&(n.lastModified[f]&&x.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&x.setRequestHeader("If-None-Match",n.etag[f])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",m.contentType),x.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+tb+"; q=0.01":""):m.accepts["*"]);for(l in m.headers)x.setRequestHeader(l,m.headers[l]);if(m.beforeSend&&(m.beforeSend.call(o,x,m)===!1||2===v))return x.abort();w="abort";for(l in{success:1,error:1,complete:1})x[l](m[l]);if(e=wb(sb,m,c,x)){if(x.readyState=1,k&&p.trigger("ajaxSend",[x,m]),2===v)return x;m.async&&m.timeout>0&&(i=a.setTimeout(function(){x.abort("timeout")},m.timeout));try{v=1,e.send(t,z)}catch(y){if(!(2>v))throw y;z(-1,y)}}else z(-1,"No Transport");function z(b,c,d,h){var j,l,t,u,w,y=c;2!==v&&(v=2,i&&a.clearTimeout(i),e=void 0,g=h||"",x.readyState=b>0?4:0,j=b>=200&&300>b||304===b,d&&(u=yb(m,x,d)),u=zb(m,u,x,j),j?(m.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(n.lastModified[f]=w),w=x.getResponseHeader("etag"),w&&(n.etag[f]=w)),204===b||"HEAD"===m.type?y="nocontent":304===b?y="notmodified":(y=u.state,l=u.data,t=u.error,j=!t)):(t=y,(b||!y)&&(y="error",0>b&&(b=0))),x.status=b,x.statusText=(c||y)+"",j?q.resolveWith(o,[l,y,x]):q.rejectWith(o,[x,y,t]),x.statusCode(s),s=void 0,k&&p.trigger(j?"ajaxSuccess":"ajaxError",[x,m,j?l:t]),r.fireWith(o,[x,y]),k&&(p.trigger("ajaxComplete",[x,m]),--n.active||n.event.trigger("ajaxStop")))}return x},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return!n.expr.filters.visible(a)},n.expr.filters.visible=function(a){return a.offsetWidth>0||a.offsetHeight>0||a.getClientRects().length>0};var Ab=/%20/g,Bb=/\[\]$/,Cb=/\r?\n/g,Db=/^(?:submit|button|image|reset|file)$/i,Eb=/^(?:input|select|textarea|keygen)/i;function Fb(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Bb.test(a)?d(a,e):Fb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Fb(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Fb(c,a[c],b,e);return d.join("&").replace(Ab,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Eb.test(this.nodeName)&&!Db.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Cb,"\r\n")}}):{name:b.name,value:c.replace(Cb,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Gb={0:200,1223:204},Hb=n.ajaxSettings.xhr();l.cors=!!Hb&&"withCredentials"in Hb,l.ajax=Hb=!!Hb,n.ajaxTransport(function(b){var c,d;return l.cors||Hb&&!b.crossDomain?{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Gb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=n("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Ib=[],Jb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Ib.pop()||n.expando+"_"+jb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Jb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Jb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Jb,"$1"+e):b.jsonp!==!1&&(b.url+=(kb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Ib.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),l.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||(l.createHTMLDocument?d.implementation.createHTMLDocument(""):d);var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ca([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var Kb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Kb)return Kb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(g,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function Lb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(e=d.getBoundingClientRect(),c=Lb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0)-a.scrollTop(),d.left+=n.css(a[0],"borderLeftWidth",!0)-a.scrollLeft()),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ea})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;n.fn[a]=function(d){return K(this,function(a,d,e){var f=Lb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ga(l.pixelPosition,function(a,c){return c?(c=Fa(a,b),Ba.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return K(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)},size:function(){return this.length}}),n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Mb=a.jQuery,Nb=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Nb),b&&a.jQuery===n&&(a.jQuery=Mb),n},b||(a.jQuery=a.$=n),n});
diff --git a/admportal/public/javascripts/jquery.dataTables.min.js b/admportal/public/javascripts/jquery.dataTables.min.js
new file mode 100644
index 0000000..d877804
--- /dev/null
+++ b/admportal/public/javascripts/jquery.dataTables.min.js
@@ -0,0 +1,164 @@
+/*!
+ DataTables 1.10.10
+ ©2008-2015 SpryMedia Ltd - datatables.net/license
+*/
+(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E,H){E||(E=window);H||(H="undefined"!==typeof window?require("jquery"):require("jquery")(E));return h(H,E,E.document)}:h(jQuery,window,document)})(function(h,E,H,k){function Y(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),
+d[c]=e,"o"===b[1]&&Y(a[e])});a._hungarianMap=d}function J(a,b,c){a._hungarianMap||Y(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),J(a[d],b[d],c)):b[d]=b[e]})}function Fa(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&F(a,a,"sZeroRecords","sLoadingRecords");
+a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&db(a)}function eb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":"");"boolean"===typeof a.scrollX&&(a.scrollX=
+a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&J(m.models.oSearch,a[b])}function fb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;b&&!h.isArray(b)&&(a.aDataSort=[b])}function gb(a){if(!m.__browser){var b={};m.__browser=b;var c=h("<div/>").css({position:"fixed",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(h("<div/>").css({position:"absolute",top:1,left:1,
+width:100,overflow:"scroll"}).append(h("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,m.__browser);a.oScroll.iBarWidth=m.__browser.barWidth}function hb(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==e;)a.hasOwnProperty(d)&&
+(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ga(a,b){var c=m.defaults.column,d=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:H.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},m.models.oSearch,c[d]);la(a,d,h(b).data())}function la(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f=
+(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(fb(c),J(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),h.extend(b,c),F(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),F(b,c,"aDataSort"));var g=b.mData,j=Q(g),i=b.mRender?Q(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&
+(c(g.sort)||c(g.type)||c(g.filter));b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return R(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=
+d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function U(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ha(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&Z(a);v(a,null,"column-sizing",[a])}function $(a,b){var c=aa(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function ba(a,b){var c=aa(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function ca(a){return aa(a,
+"bVisible").length}function aa(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Ia(a){var b=a.aoColumns,c=a.aoData,d=m.ext.type.detect,e,f,g,j,i,h,l,q,u;e=0;for(f=b.length;e<f;e++)if(l=b[e],u=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g<j;g++){i=0;for(h=c.length;i<h;i++){u[i]===k&&(u[i]=B(a,i,e,"type"));q=d[g](u[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function ib(a,
+b,c,d){var e,f,g,j,i,o,l=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){o=b[e];var q=o.targets!==k?o.targets:o.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Ga(a);d(q[f],o)}else if("number"===typeof q[f]&&0>q[f])d(l.length+q[f],o);else if("string"===typeof q[f]){j=0;for(i=l.length;j<i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&d(j,o)}}if(c){e=0;for(a=c.length;e<a;e++)d(e,c[e])}}function N(a,b,c,d){var e=a.aoData.length,f=h.extend(!0,
+{},m.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,j=0,i=g.length;j<i;j++)g[j].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==k&&(a.aIds[b]=f);(c||!a.oFeatures.bDeferRender)&&Ja(a,e,c,d);return e}function ma(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,e){c=Ka(a,e);return N(a,c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,i=f.fnGetData(g,d,{settings:a,row:b,col:c});
+if(i===k)return a.iDrawError!=e&&null===j&&(K(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function jb(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function La(a){return h.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\./g,".")})}function Q(a){if(h.isPlainObject(a)){var b=
+{};h.each(a,function(a,c){c&&(b[a]=Q(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,b,f){var g,j;if(""!==f){j=La(f);for(var i=0,o=j.length;i<o;i++){f=j[i].match(da);g=j[i].match(V);if(f){j[i]=j[i].replace(da,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=
+j.join(".");if(h.isArray(a)){i=0;for(o=a.length;i<o;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(V,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}function R(a){if(h.isPlainObject(a))return R(a._);if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||
+-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=La(e),f;f=e[e.length-1];for(var g,j,i=0,o=e.length-1;i<o;i++){g=e[i].match(da);j=e[i].match(V);if(g){e[i]=e[i].replace(da,"");a[e[i]]=[];f=e.slice();f.splice(0,i+1);g=f.join(".");if(h.isArray(d)){j=0;for(o=d.length;j<o;j++)f={},b(f,d[j],g),a[e[i]].push(f)}else a[e[i]]=d;return}j&&(e[i]=e[i].replace(V,""),a=a[e[i]](d));if(null===a[e[i]]||a[e[i]]===k)a[e[i]]={};a=a[e[i]]}if(f.match(V))a[f.replace(V,"")](d);else a[f.replace(da,"")]=
+d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ma(a){return D(a.aoData,"_aData")}function na(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function oa(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function ea(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=
+Ka(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;Na(a,e)}}function Ka(a,b,c,d){var e=[],f=b.firstChild,g,j,i=0,o,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],u=function(a,b){if("string"===typeof a){var c=a.indexOf("@");-1!==c&&(c=a.substring(c+1),R(a)(d,b.getAttribute(c)))}},S=function(a){if(c===k||
+c===i)j=l[i],o=h.trim(a.innerHTML),j&&j._bAttrSrc?(R(j.mData._)(d,o),u(j.mData.sort,a),u(j.mData.type,a),u(j.mData.filter,a)):q?(j._setter||(j._setter=R(j.mData)),j._setter(d,o)):d[i]=o;i++};if(f)for(;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)S(f),e.push(f);f=f.nextSibling}else{e=b.anCells;f=0;for(g=e.length;f<g;f++)S(e[f])}if(b=b.firstChild?b:b.nTr)(b=b.getAttribute("id"))&&R(a.rowId)(d,b);return{data:d,cells:e}}function Ja(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,h,l,q;if(null===
+e.nTr){j=c||H.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;Na(a,e);l=0;for(q=a.aoColumns.length;l<q;l++){h=a.aoColumns[l];i=c?d[l]:H.createElement(h.sCellType);i._DT_CellIndex={row:b,column:l};g.push(i);if(!c||h.mRender||h.mData!==l)i.innerHTML=B(a,b,l,"display");h.sClass&&(i.className+=" "+h.sClass);h.bVisible&&!c?j.appendChild(i):!h.bVisible&&c&&i.parentNode.removeChild(i);h.fnCreatedCell&&h.fnCreatedCell.call(a.oInstance,i,B(a,b,l),f,b,l)}v(a,"aoRowCreatedCallback",null,[j,f,b])}e.nTr.setAttribute("role",
+"row")}function Na(a,b){var c=b.nTr,d=b._aData;if(c){var e=a.rowIdFn(d);e&&(c.id=e);d.DT_RowClass&&(e=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?pa(b.__rowc.concat(e)):e,h(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&h(c).attr(d.DT_RowAttr);d.DT_RowData&&h(c).data(d.DT_RowData)}}function kb(a){var b,c,d,e,f,g=a.nTHead,j=a.nTFoot,i=0===h("th, td",g).length,o=a.oClasses,l=a.aoColumns;i&&(e=h("<tr/>").appendTo(g));b=0;for(c=l.length;b<c;b++)f=l[b],d=h(f.nTh).addClass(f.sClass),
+i&&d.appendTo(e),a.oFeatures.bSort&&(d.addClass(f.sSortingClass),!1!==f.bSortable&&(d.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),Oa(a,f.nTh,b))),f.sTitle!=d[0].innerHTML&&d.html(f.sTitle),Pa(a,"header")(a,d,f,o);i&&fa(a.aoHeader,g);h(g).find(">tr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(o.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(o.sFooterTH);if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}
+function ga(a,b,c){var d,e,f,g=[],j=[],i=a.aoColumns.length,o;if(b){c===k&&(c=!1);d=0;for(e=b.length;d<e;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);j.push([])}d=0;for(e=g.length;d<e;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(o=i=1,j[d][f]===k){a.appendChild(g[d][f].cell);for(j[d][f]=1;g[d+i]!==k&&g[d][f].cell==g[d+i][f].cell;)j[d+i][f]=1,i++;for(;g[d][f+o]!==k&&g[d][f].cell==g[d][f+o].cell;){for(c=
+0;c<i;c++)j[d+c][f+o]=1;o++}h(g[d][f].cell).attr("rowspan",i).attr("colspan",o)}}}}function O(a){var b=v(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))C(a,!1);else{var b=[],c=0,d=a.asStripeClasses,e=d.length,f=a.oLanguage,g=a.iInitDisplayStart,j="ssp"==y(a),i=a.aiDisplay;a.bDrawing=!0;g!==k&&-1!==g&&(a._iDisplayStart=j?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);var g=a._iDisplayStart,o=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&
+!lb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:o;for(j=j?0:g;j<f;j++){var l=i[j],q=a.aoData[l];null===q.nTr&&Ja(a,l);l=q.nTr;if(0!==e){var u=d[c%e];q._sRowStripe!=u&&(h(l).removeClass(q._sRowStripe).addClass(u),q._sRowStripe=u)}v(a,"aoRowCallback",null,[l,q._aData,c,j]);b.push(l);c++}}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==y(a)?c=f.sLoadingRecords:f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":e?d[0]:""}).append(h("<td />",{valign:"top",colSpan:ca(a),
+"class":a.oClasses.sRowEmpty}).html(c))[0];v(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ma(a),g,o,i]);v(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ma(a),g,o,i]);d=h(a.nTBody);d.children().detach();d.append(h(b));v(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function T(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&mb(a);d?ha(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;O(a);a._drawHold=
+!1}function nb(a){var b=a.oClasses,c=h(a.nTable),c=h("<div/>").insertBefore(c),d=a.oFeatures,e=h("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,o,l,q,u=0;u<f.length;u++){g=null;j=f[u];if("<"==j){i=h("<div/>")[0];o=f[u+1];if("'"==o||'"'==o){l="";for(q=2;f[u+q]!=o;)l+=f[u+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(o=l.split("."),
+i.id=o[0].substr(1,o[0].length-1),i.className=o[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;u+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=ob(a);else if("f"==j&&d.bFilter)g=pb(a);else if("r"==j&&d.bProcessing)g=qb(a);else if("t"==j)g=rb(a);else if("i"==j&&d.bInfo)g=sb(a);else if("p"==j&&d.bPaginate)g=tb(a);else if(0!==m.ext.feature.length){i=m.ext.feature;q=0;for(o=i.length;q<o;q++)if(j==i[q].cFeature){g=i[q].fnInit(a);break}}g&&
+(i=a.aanFeatures,i[j]||(i[j]=[]),i[j].push(g),e.append(g))}c.replaceWith(e);a.nHolding=null}function fa(a,b){var c=h(b).children("tr"),d,e,f,g,j,i,o,l,q,u;a.splice(0,a.length);f=0;for(i=c.length;f<i;f++)a.push([]);f=0;for(i=c.length;f<i;f++){d=c[f];for(e=d.firstChild;e;){if("TD"==e.nodeName.toUpperCase()||"TH"==e.nodeName.toUpperCase()){l=1*e.getAttribute("colspan");q=1*e.getAttribute("rowspan");l=!l||0===l||1===l?1:l;q=!q||0===q||1===q?1:q;g=0;for(j=a[f];j[g];)g++;o=g;u=1===l?!0:!1;for(j=0;j<l;j++)for(g=
+0;g<q;g++)a[f+g][o+j]={cell:e,unique:u},a[f+g].nTr=d}e=e.nextSibling}}}function qa(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],fa(c,b)));for(var b=0,e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function ra(a,b,c){v(a,"aoServerParams","serverParams",[b]);if(b&&h.isArray(b)){var d={},e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,
+j=a.oInstance,i=function(b){v(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var o=h.isFunction(f)?f(b,a):f,b=h.isFunction(f)&&o?o:h.extend(!0,b,o);delete g.data}o={data:b,success:function(b){var c=b.error||b.sError;c&&K(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=v(a,null,"xhr",[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?K(a,0,"Invalid JSON response",1):4===b.readyState&&K(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData=
+b;v(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),i,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(o,{url:g||a.sAjaxSource})):h.isFunction(g)?a.jqXHR=g.call(j,b,i,a):(a.jqXHR=h.ajax(h.extend(o,g)),g.data=f)}function lb(a){return a.bAjaxDataGet?(a.iDraw++,C(a,!0),ra(a,ub(a),function(b){vb(a,b)}),!1):!0}function ub(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,o,
+l,q=W(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var k=function(a,b){j.push({name:a,value:b})};k("sEcho",a.iDraw);k("iColumns",c);k("sColumns",D(b,"sName").join(","));k("iDisplayStart",g);k("iDisplayLength",i);var S={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)o=b[g],l=f[g],i="function"==typeof o.mData?"function":o.mData,S.columns.push({data:i,name:o.sName,searchable:o.bSearchable,orderable:o.bSortable,search:{value:l.sSearch,
+regex:l.bRegex}}),k("mDataProp_"+g,i),d.bFilter&&(k("sSearch_"+g,l.sSearch),k("bRegex_"+g,l.bRegex),k("bSearchable_"+g,o.bSearchable)),d.bSort&&k("bSortable_"+g,o.bSortable);d.bFilter&&(k("sSearch",e.sSearch),k("bRegex",e.bRegex));d.bSort&&(h.each(q,function(a,b){S.order.push({column:b.col,dir:b.dir});k("iSortCol_"+a,b.col);k("sSortDir_"+a,b.dir)}),k("iSortingCols",q.length));b=m.ext.legacy.ajax;return null===b?a.sAjaxSource?j:S:b?j:S}function vb(a,b){var c=sa(a,b),d=b.sEcho!==k?b.sEcho:b.draw,e=
+b.iTotalRecords!==k?b.iTotalRecords:b.recordsTotal,f=b.iTotalDisplayRecords!==k?b.iTotalDisplayRecords:b.recordsFiltered;if(d){if(1*d<a.iDraw)return;a.iDraw=1*d}na(a);a._iRecordsTotal=parseInt(e,10);a._iRecordsDisplay=parseInt(f,10);d=0;for(e=c.length;d<e;d++)N(a,c[d]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;O(a);a._bInitComplete||ta(a,b);a.bAjaxDataGet=!0;C(a,!1)}function sa(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==k?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||
+b[c]:""!==c?Q(c)(b):b}function pb(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function(){var b=!this.value?"":this.value;b!=e.sSearch&&(ha(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,O(a))},g=null!==
+a.searchDelay?a.searchDelay:"ssp"===y(a)?400:0,i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT",g?ua(f,g):f).bind("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",c);h(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{i[0]!==H.activeElement&&i.val(e.sSearch)}catch(d){}});return b[0]}function ha(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;
+d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Ia(a);if("ssp"!=y(a)){wb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)xb(a,e[b].sSearch,b,e[b].bEscapeRegex!==k?!e[b].bEscapeRegex:e[b].bRegex,e[b].bSmart,e[b].bCaseInsensitive);yb(a)}else f(b);a.bFiltered=!0;v(a,null,"search",[a])}function yb(a){for(var b=m.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var j=[],i=0,o=c.length;i<o;i++)e=c[i],d=a.aoData[e],b[f](a,
+d._aFilterData,e,d._aData,i)&&j.push(e);c.length=0;h.merge(c,j)}}function xb(a,b,c,d,e,f){if(""!==b)for(var g=a.aiDisplay,d=Qa(b,d,e,f),e=g.length-1;0<=e;e--)b=a.aoData[g[e]]._aFilterData[c],d.test(b)||g.splice(e,1)}function wb(a,b,c,d,e,f){var d=Qa(b,d,e,f),e=a.oPreviousSearch.sSearch,f=a.aiDisplayMaster,g;0!==m.ext.search.length&&(c=!0);g=zb(a);if(0>=b.length)a.aiDisplay=f.slice();else{if(g||c||e.length>b.length||0!==b.indexOf(e)||a.bSorted)a.aiDisplay=f.slice();b=a.aiDisplay;for(c=b.length-1;0<=
+c;c--)d.test(a.aoData[b[c]]._sFilterRow)||b.splice(c,1)}}function Qa(a,b,c,d){a=b?a:va(a);c&&(a="^(?=.*?"+h.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(a){if('"'===a.charAt(0))var b=a.match(/^"(.*)"$/),a=b?b[1]:a;return a.replace('"',"")}).join(")(?=.*?")+").*$");return RegExp(a,d?"i":"")}function va(a){return a.replace(Yb,"\\$1")}function zb(a){var b=a.aoColumns,c,d,e,f,g,j,i,h,l=m.ext.type.search;c=!1;d=0;for(f=a.aoData.length;d<f;d++)if(h=a.aoData[d],!h._aFilterData){j=[];e=0;for(g=b.length;e<
+g;e++)c=b[e],c.bSearchable?(i=B(a,d,e,"filter"),l[c.sType]&&(i=l[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(wa.innerHTML=i,i=Zb?wa.textContent:wa.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i);h._aFilterData=j;h._sFilterRow=j.join(" ");c=!0}return c}function Ab(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}function Bb(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,
+bCaseInsensitive:a.caseInsensitive}}function sb(a){var b=a.sTableId,c=a.aanFeatures.i,d=h("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Cb,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),h(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function Cb(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&
+(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=Db(a,j);c=c.fnInfoCallback;null!==c&&(j=c.call(a.oInstance,a,d,e,f,g,j));h(b).html(j)}}function Db(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/
+e)))}function ia(a){var b,c,d=a.iInitDisplayStart,e=a.aoColumns,f;c=a.oFeatures;var g=a.bDeferLoading;if(a.bInitialised){nb(a);kb(a);ga(a,a.aoHeader);ga(a,a.aoFooter);C(a,!0);c.bAutoWidth&&Ha(a);b=0;for(c=e.length;b<c;b++)f=e[b],f.sWidth&&(f.nTh.style.width=w(f.sWidth));v(a,null,"preInit",[a]);T(a);e=y(a);if("ssp"!=e||g)"ajax"==e?ra(a,[],function(c){var f=sa(a,c);for(b=0;b<f.length;b++)N(a,f[b]);a.iInitDisplayStart=d;T(a);C(a,!1);ta(a,c)},a):(C(a,!1),ta(a))}else setTimeout(function(){ia(a)},200)}
+function ta(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&U(a);v(a,null,"plugin-init",[a,b]);v(a,"aoInitComplete","init",[a,b])}function Ra(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Sa(a);v(a,null,"length",[a,c])}function ob(a){for(var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=h.isArray(d[0]),f=e?d[0]:d,d=e?d[1]:d,e=h("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),g=0,j=f.length;g<j;g++)e[0][g]=new Option(d[g],f[g]);var i=h("<div><label/></div>").addClass(b.sLength);
+a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).bind("change.DT",function(){Ra(a,h(this).val());O(a)});h(a.nTable).bind("length.dt.DT",function(b,c,d){a===c&&h("select",i).val(d)});return i[0]}function tb(a){var b=a.sPaginationType,c=m.ext.pager[b],d="function"===typeof c,e=function(a){O(a)},b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+
+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;l<k;l++)Pa(a,"pageButton")(a,f.p[l],l,h,b,i)}else c.fnUpdate(a,e)},sName:"pagination"}));return b}function Ta(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===e?d=0:"number"===typeof b?(d=b*e,d>f&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==
+b?d+e<f&&(d+=e):"last"==b?d=Math.floor((f-1)/e)*e:K(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(v(a,null,"page",[a]),c&&O(a));return b}function qb(a){return h("<div/>",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",b?"block":"none");v(a,null,"processing",[a,b])}function rb(a){var b=h(a.nTable);b.attr("role",
+"grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),o=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("<div/>",{"class":f.sScrollWrapper}).append(h("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?!d?null:w(d):"100%"}).append(h("<div/>",{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||
+"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("<div/>",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:w(d)}).append(b));l&&i.append(h("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:w(d):"100%"}).append(h("<div/>",{"class":f.sScrollFootInner}).append(o.removeAttr("id").css("margin-left",0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(),
+k=b[0],f=b[1],u=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(u.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=u;a.aoDrawCallback.push({fn:Z,sName:"scrolling"});return i[0]}function Z(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth,f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,o=j.children("table"),j=a.nScrollBody,l=h(j),q=j.style,u=h(a.nScrollFoot).children("div"),
+m=u.children("table"),n=h(a.nTHead),p=h(a.nTable),t=p[0],v=t.style,r=a.nTFoot?h(a.nTFoot):null,Eb=a.oBrowser,Ua=Eb.bScrollOversize,s,L,P,x,y=[],z=[],A=[],B,C=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};L=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!==L&&a.scrollBarVis!==k)a.scrollBarVis=L,U(a);else{a.scrollBarVis=L;p.children("thead, tfoot").remove();x=n.clone().prependTo(p);n=n.find("tr");L=x.find("tr");x.find("th, td").removeAttr("tabindex");
+r&&(P=r.clone().prependTo(p),s=r.find("tr"),P=P.find("tr"));c||(q.width="100%",f[0].style.width="100%");h.each(qa(a,x),function(b,c){B=$(a,b);c.style.width=a.aoColumns[B].sWidth});r&&I(function(a){a.style.width=""},P);f=p.outerWidth();if(""===c){v.width="100%";if(Ua&&(p.find("tbody").height()>j.offsetHeight||"scroll"==l.css("overflow-y")))v.width=w(p.outerWidth()-b);f=p.outerWidth()}else""!==d&&(v.width=w(d),f=p.outerWidth());I(C,L);I(function(a){A.push(a.innerHTML);y.push(w(h(a).css("width")))},
+L);I(function(a,b){a.style.width=y[b]},n);h(L).height(0);r&&(I(C,P),I(function(a){z.push(w(h(a).css("width")))},P),I(function(a,b){a.style.width=z[b]},s),h(P).height(0));I(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+A[b]+"</div>";a.style.width=y[b]},L);r&&I(function(a,b){a.innerHTML="";a.style.width=z[b]},P);if(p.outerWidth()<f){s=j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(Ua&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))v.width=
+w(s-b);(""===c||""!==d)&&K(a,1,"Possible column misalignment",6)}else s="100%";q.width=w(s);g.width=w(s);r&&(a.nScrollFoot.style.width=w(s));!e&&Ua&&(q.height=w(t.offsetHeight+b));c=p.outerWidth();o[0].style.width=w(c);i.width=w(c);d=p.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+(Eb.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";r&&(m[0].style.width=w(c),u[0].style.width=w(c),u[0].style[e]=d?b+"px":"0px");l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=
+0}}function I(a,b,c){for(var d=0,e=0,f=b.length,g,j;e<f;){g=b[e].firstChild;for(j=c?c[e].firstChild:null;g;)1===g.nodeType&&(c?a(g,j,d):a(g,d),d++),g=g.nextSibling,j=c?j.nextSibling:null;e++}}function Ha(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,e=d.sY,f=d.sX,g=d.sXInner,j=c.length,i=aa(a,"bVisible"),o=h("th",a.nTHead),l=b.getAttribute("width"),k=b.parentNode,u=!1,m,n,p=a.oBrowser,d=p.bScrollOversize;(m=b.style.width)&&-1!==m.indexOf("%")&&(l=m);for(m=0;m<i.length;m++)n=c[i[m]],null!==n.sWidth&&
+(n.sWidth=Fb(n.sWidthOrig,k),u=!0);if(d||!u&&!f&&!e&&j==ca(a)&&j==o.length)for(m=0;m<j;m++)i=$(a,m),null!==i&&(c[i].sWidth=w(o.eq(m).width()));else{j=h(b).clone().css("visibility","hidden").removeAttr("id");j.find("tbody tr").remove();var t=h("<tr/>").appendTo(j.find("tbody"));j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");o=qa(a,j.find("thead")[0]);for(m=0;m<i.length;m++)n=c[i[m]],o[m].style.width=null!==n.sWidthOrig&&
+""!==n.sWidthOrig?w(n.sWidthOrig):"",n.sWidthOrig&&f&&h(o[m]).append(h("<div/>").css({width:n.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(m=0;m<i.length;m++)u=i[m],n=c[u],h(Gb(a,u)).clone(!1).append(n.sContentPadding).appendTo(t);n=h("<div/>").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()<k.clientWidth&&l&&j.width(k.clientWidth)):e?j.width(k.clientWidth):
+l&&j.width(l);for(m=e=0;m<i.length;m++)k=h(o[m]),g=k.outerWidth()-k.width(),k=p.bBounding?Math.ceil(o[m].getBoundingClientRect().width):k.outerWidth(),e+=k,c[i[m]].sWidth=w(k-g);b.style.width=w(e);n.remove()}l&&(b.style.width=w(l));if((l||f)&&!a._reszEvt)b=function(){h(E).bind("resize.DT-"+a.sInstance,ua(function(){U(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0}function ua(a,b){var c=b!==k?b:200,d,e;return function(){var b=this,g=+new Date,j=arguments;d&&g<d+c?(clearTimeout(e),e=setTimeout(function(){d=
+k;a.apply(b,j)},c)):(d=g,a.apply(b,j))}}function Fb(a,b){if(!a)return 0;var c=h("<div/>").css("width",w(a)).appendTo(b||H.body),d=c[0].offsetWidth;c.remove();return d}function Gb(a,b){var c=Hb(a,b);if(0>c)return null;var d=a.aoData[c];return!d.nTr?h("<td/>").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Hb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;f<g;f++)c=B(a,f,b,"display")+"",c=c.replace($b,""),c=c.replace(/ /g," "),c.length>d&&(d=c.length,e=f);return e}function w(a){return null===
+a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function W(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var o=[];f=function(a){a.length&&!h.isArray(a[0])?o.push(a):h.merge(o,a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;a<o.length;a++){i=o[a][0];f=e[i].aDataSort;b=0;for(c=f.length;b<c;b++)g=f[b],j=e[g].sType||"string",o[a]._idx===k&&(o[a]._idx=h.inArray(o[a][1],e[g].asSorting)),d.push({src:i,col:g,dir:o[a][1],
+index:o[a]._idx,type:j,formatter:m.ext.type.order[j+"-pre"]})}return d}function mb(a){var b,c,d=[],e=m.ext.type.order,f=a.aoData,g=0,j,i=a.aiDisplayMaster,h;Ia(a);h=W(a);b=0;for(c=h.length;b<c;b++)j=h[b],j.formatter&&g++,Ib(a,j.col);if("ssp"!=y(a)&&0!==h.length){b=0;for(c=i.length;b<c;b++)d[i[b]]=b;g===h.length?i.sort(function(a,b){var c,e,g,j,i=h.length,k=f[a]._aSortData,m=f[b]._aSortData;for(g=0;g<i;g++)if(j=h[g],c=k[j.col],e=m[j.col],c=c<e?-1:c>e?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];
+return c<e?-1:c>e?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,m=f[a]._aSortData,p=f[b]._aSortData;for(j=0;j<k;j++)if(i=h[j],c=m[i.col],g=p[i.col],i=e[i.type+"-"+i.dir]||e["string-"+i.dir],c=i(c,g),0!==c)return c;c=d[a];g=d[b];return c<g?-1:c>g?1:0})}a.bSorted=!0}function Jb(a){for(var b,c,d=a.aoColumns,e=W(a),a=a.oLanguage.oAria,f=0,g=d.length;f<g;f++){c=d[f];var j=c.asSorting;b=c.sTitle.replace(/<.*?>/g,"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0<e.length&&e[0].col==f?(i.setAttribute("aria-sort",
+"asc"==e[0].dir?"ascending":"descending"),c=j[e[0].index+1]||j[0]):c=j[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);i.setAttribute("aria-label",b)}}function Va(a,b,c,d){var e=a.aaSorting,f=a.aoColumns[b].asSorting,g=function(a,b){var c=a._idx;c===k&&(c=h.inArray(a[1],f));return c+1<f.length?c+1:b?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=h.inArray(b,D(e,"0")),-1!==c?(b=g(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=f[b],e[c]._idx=
+b)):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);T(a);"function"==typeof d&&d(a)}function Oa(a,b,c,d){var e=a.aoColumns[c];Wa(b,{},function(b){!1!==e.bSortable&&(a.oFeatures.bProcessing?(C(a,!0),setTimeout(function(){Va(a,c,b.shiftKey,d);"ssp"!==y(a)&&C(a,!1)},0)):Va(a,c,b.shiftKey,d))})}function xa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=W(a),e=a.oFeatures,f,g;if(e.bSort&&e.bSortClasses){e=
+0;for(f=b.length;e<f;e++)g=b[e].src,h(D(a.aoData,"anCells",g)).removeClass(c+(2>e?e+1:3));e=0;for(f=d.length;e<f;e++)g=d[e].src,h(D(a.aoData,"anCells",g)).addClass(c+(2>e?e+1:3))}a.aLastSort=d}function Ib(a,b){var c=a.aoColumns[b],d=m.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ba(a,b)));for(var f,g=m.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j<i;j++)if(c=a.aoData[j],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function ya(a){if(a.oFeatures.bStateSave&&
+!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:Ab(a.oPreviousSearch),columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:Ab(a.aoPreSearchCols[d])}})};v(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,b)}}function Kb(a){var b,c,d=a.aoColumns;if(a.oFeatures.bStateSave){var e=a.fnStateLoadCallback.call(a.oInstance,a);if(e&&e.time&&(b=v(a,"aoStateLoadParams",
+"stateLoadParams",[a,e]),-1===h.inArray(!1,b)&&(b=a.iStateDuration,!(0<b&&e.time<+new Date-1E3*b)&&d.length===e.columns.length))){a.oLoadedState=h.extend(!0,{},e);e.start!==k&&(a._iDisplayStart=e.start,a.iInitDisplayStart=e.start);e.length!==k&&(a._iDisplayLength=e.length);e.order!==k&&(a.aaSorting=[],h.each(e.order,function(b,c){a.aaSorting.push(c[0]>=d.length?[0,c[1]]:c)}));e.search!==k&&h.extend(a.oPreviousSearch,Bb(e.search));b=0;for(c=e.columns.length;b<c;b++){var f=e.columns[b];f.visible!==
+k&&(d[b].bVisible=f.visible);f.search!==k&&h.extend(a.aoPreSearchCols[b],Bb(f.search))}v(a,"aoStateLoaded","stateLoaded",[a,e])}}}function za(a){var b=m.settings,a=h.inArray(a,D(b,"nTable"));return-1!==a?b[a]:null}function K(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)E.console&&console.log&&console.log(c);else if(b=m.ext,b=b.sErrMode||b.errMode,a&&v(a,null,"error",[a,d,c]),"alert"==
+b)alert(c);else{if("throw"==b)throw Error(c);"function"==typeof b&&b(a,d,c)}}function F(a,b,c,d){h.isArray(c)?h.each(c,function(c,d){h.isArray(d)?F(a,b,d[0],d[1]):F(a,b,d)}):(d===k&&(d=c),b[c]!==k&&(a[d]=b[c]))}function Lb(a,b,c){var d,e;for(e in b)b.hasOwnProperty(e)&&(d=b[e],h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Wa(a,b,c){h(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",
+b,function(a){13===a.which&&(a.preventDefault(),c(a))}).bind("selectstart.DT",function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function v(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Sa(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Pa(a,b){var c=
+a.renderer,d=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Aa(a,b){var c=[],c=Mb.numbers_length,d=Math.floor(c/2);b<=c?c=X(0,b):a<=d?(c=X(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=X(b-(c-2),b):(c=X(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function db(a){h.each({num:function(b){return Ba(b,
+a)},"num-fmt":function(b){return Ba(b,a,Xa)},"html-num":function(b){return Ba(b,a,Ca)},"html-num-fmt":function(b){return Ba(b,a,Ca,Xa)}},function(b,c){s.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(s.type.search[b+a]=s.type.search.html)})}function Nb(a){return function(){var b=[za(this[m.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return m.ext.internal[a].apply(this,b)}}var m,s,t,p,r,Ya={},Ob=/[\r\n]/g,Ca=/<.*?>/g,ac=/^[\w\+\-]/,bc=/[\w\+\-]$/,Yb=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)",
+"g"),Xa=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,M=function(a){return!a||!0===a||"-"===a?!0:!1},Pb=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Qb=function(a,b){Ya[b]||(Ya[b]=RegExp(va(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Ya[b],"."):a},Za=function(a,b,c){var d="string"===typeof a;if(M(a))return!0;b&&d&&(a=Qb(a,b));c&&d&&(a=a.replace(Xa,""));return!isNaN(parseFloat(a))&&isFinite(a)},Rb=function(a,b,c){return M(a)?!0:!(M(a)||"string"===
+typeof a)?null:Za(a.replace(Ca,""),b,c)?!0:null},D=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;e<f;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<f;e++)a[e]&&d.push(a[e][b]);return d},ja=function(a,b,c,d){var e=[],f=0,g=b.length;if(d!==k)for(;f<g;f++)a[b[f]][c]&&e.push(a[b[f]][c][d]);else for(;f<g;f++)e.push(a[b[f]][c]);return e},X=function(a,b){var c=[],d;b===k?(b=0,d=a):(d=b,b=a);for(var e=b;e<d;e++)c.push(e);return c},Sb=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);
+return b},pa=function(a){var b=[],c,d,e=a.length,f,g=0;d=0;a:for(;d<e;d++){c=a[d];for(f=0;f<g;f++)if(b[f]===c)continue a;b.push(c);g++}return b},A=function(a,b,c){a[b]!==k&&(a[c]=a[b])},da=/\[.*?\]$/,V=/\(\)$/,wa=h("<div>")[0],Zb=wa.textContent!==k,$b=/<.*?>/g;m=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new t(za(this[s.iApiIndex])):new t(this)};this.fnAddData=function(a,b){var c=this.api(!0),
+d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&Z(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],
+h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};
+this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);
+(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return za(this[s.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();(d===k||d)&&h.draw();return 0};this.fnVersionCheck=
+s.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=s.internal;for(var e in m.ext.internal)e&&(this[e]=Nb(e));this.each(function(){var e={},e=1<d?Lb(e,a,!0):a,g=0,j,i=this.getAttribute("id"),o=!1,l=m.defaults,q=h(this);if("table"!=this.nodeName.toLowerCase())K(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{eb(l);fb(l.column);J(l,l,!0);J(l.column,l.column,!0);J(l,h.extend(e,q.data()));var u=m.settings,g=0;for(j=u.length;g<j;g++){var p=u[g];if(p.nTable==
+this||p.nTHead.parentNode==this||p.nTFoot&&p.nTFoot.parentNode==this){g=e.bRetrieve!==k?e.bRetrieve:l.bRetrieve;if(c||g)return p.oInstance;if(e.bDestroy!==k?e.bDestroy:l.bDestroy){p.oInstance.fnDestroy();break}else{K(p,0,"Cannot reinitialise DataTable",3);return}}if(p.sTableId==this.id){u.splice(g,1);break}}if(null===i||""===i)this.id=i="DataTables_Table_"+m.ext._unique++;var n=h.extend(!0,{},m.models.oSettings,{sDestroyWidth:q[0].style.width,sInstance:i,sTableId:i});n.nTable=this;n.oApi=b.internal;
+n.oInit=e;u.push(n);n.oInstance=1===b.length?b:q.dataTable();eb(e);e.oLanguage&&Fa(e.oLanguage);e.aLengthMenu&&!e.iDisplayLength&&(e.iDisplayLength=h.isArray(e.aLengthMenu[0])?e.aLengthMenu[0][0]:e.aLengthMenu[0]);e=Lb(h.extend(!0,{},l),e);F(n.oFeatures,e,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));F(n,e,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu",
+"sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]);F(n.oScroll,e,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);F(n.oLanguage,e,"fnInfoCallback");z(n,"aoDrawCallback",
+e.fnDrawCallback,"user");z(n,"aoServerParams",e.fnServerParams,"user");z(n,"aoStateSaveParams",e.fnStateSaveParams,"user");z(n,"aoStateLoadParams",e.fnStateLoadParams,"user");z(n,"aoStateLoaded",e.fnStateLoaded,"user");z(n,"aoRowCallback",e.fnRowCallback,"user");z(n,"aoRowCreatedCallback",e.fnCreatedRow,"user");z(n,"aoHeaderCallback",e.fnHeaderCallback,"user");z(n,"aoFooterCallback",e.fnFooterCallback,"user");z(n,"aoInitComplete",e.fnInitComplete,"user");z(n,"aoPreDrawCallback",e.fnPreDrawCallback,
+"user");n.rowIdFn=Q(e.rowId);gb(n);i=n.oClasses;e.bJQueryUI?(h.extend(i,m.ext.oJUIClasses,e.oClasses),e.sDom===l.sDom&&"lfrtip"===l.sDom&&(n.sDom='<"H"lfr>t<"F"ip>'),n.renderer)?h.isPlainObject(n.renderer)&&!n.renderer.header&&(n.renderer.header="jqueryui"):n.renderer="jqueryui":h.extend(i,m.ext.classes,e.oClasses);q.addClass(i.sTable);n.iInitDisplayStart===k&&(n.iInitDisplayStart=e.iDisplayStart,n._iDisplayStart=e.iDisplayStart);null!==e.iDeferLoading&&(n.bDeferLoading=!0,g=h.isArray(e.iDeferLoading),
+n._iRecordsDisplay=g?e.iDeferLoading[0]:e.iDeferLoading,n._iRecordsTotal=g?e.iDeferLoading[1]:e.iDeferLoading);var t=n.oLanguage;h.extend(!0,t,e.oLanguage);""!==t.sUrl&&(h.ajax({dataType:"json",url:t.sUrl,success:function(a){Fa(a);J(l.oLanguage,a);h.extend(true,t,a);ia(n)},error:function(){ia(n)}}),o=!0);null===e.asStripeClasses&&(n.asStripeClasses=[i.sStripeOdd,i.sStripeEven]);var g=n.asStripeClasses,r=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(g,function(a){return r.hasClass(a)}))&&
+(h("tbody tr",this).removeClass(g.join(" ")),n.asDestroyStripes=g.slice());u=[];g=this.getElementsByTagName("thead");0!==g.length&&(fa(n.aoHeader,g[0]),u=qa(n));if(null===e.aoColumns){p=[];g=0;for(j=u.length;g<j;g++)p.push(null)}else p=e.aoColumns;g=0;for(j=p.length;g<j;g++)Ga(n,u?u[g]:null);ib(n,e.aoColumnDefs,p,function(a,b){la(n,a,b)});if(r.length){var s=function(a,b){return a.getAttribute("data-"+b)!==null?b:null};h(r[0]).children("th, td").each(function(a,b){var c=n.aoColumns[a];if(c.mData===
+a){var d=s(b,"sort")||s(b,"order"),e=s(b,"filter")||s(b,"search");if(d!==null||e!==null){c.mData={_:a+".display",sort:d!==null?a+".@data-"+d:k,type:d!==null?a+".@data-"+d:k,filter:e!==null?a+".@data-"+e:k};la(n,a)}}})}var w=n.oFeatures;e.bStateSave&&(w.bStateSave=!0,Kb(n,e),z(n,"aoDrawCallback",ya,"state_save"));if(e.aaSorting===k){u=n.aaSorting;g=0;for(j=u.length;g<j;g++)u[g][1]=n.aoColumns[g].asSorting[0]}xa(n);w.bSort&&z(n,"aoDrawCallback",function(){if(n.bSorted){var a=W(n),b={};h.each(a,function(a,
+c){b[c.src]=c.dir});v(n,null,"order",[n,a,b]);Jb(n)}});z(n,"aoDrawCallback",function(){(n.bSorted||y(n)==="ssp"||w.bDeferRender)&&xa(n)},"sc");g=q.children("caption").each(function(){this._captionSide=q.css("caption-side")});j=q.children("thead");0===j.length&&(j=h("<thead/>").appendTo(this));n.nTHead=j[0];j=q.children("tbody");0===j.length&&(j=h("<tbody/>").appendTo(this));n.nTBody=j[0];j=q.children("tfoot");if(0===j.length&&0<g.length&&(""!==n.oScroll.sX||""!==n.oScroll.sY))j=h("<tfoot/>").appendTo(this);
+0===j.length||0===j.children().length?q.addClass(i.sNoFooter):0<j.length&&(n.nTFoot=j[0],fa(n.aoFooter,n.nTFoot));if(e.aaData)for(g=0;g<e.aaData.length;g++)N(n,e.aaData[g]);else(n.bDeferLoading||"dom"==y(n))&&ma(n,h(n.nTBody).children("tr"));n.aiDisplay=n.aiDisplayMaster.slice();n.bInitialised=!0;!1===o&&ia(n)}});b=null;return this};var Tb=[],x=Array.prototype,cc=function(a){var b,c,d=m.settings,e=h.map(d,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=
+h.inArray(a,e),-1!==b?[d[b]]:null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?c=h(a):a instanceof h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,e);return-1!==b?d[b]:null}).toArray()};t=function(a,b){if(!(this instanceof t))return new t(a,b);var c=[],d=function(a){(a=cc(a))&&(c=c.concat(a))};if(h.isArray(a))for(var e=0,f=a.length;e<f;e++)d(a[e]);else d(a);this.context=pa(c);b&&h.merge(this,b);this.selector={rows:null,cols:null,opts:null};
+t.extend(this,this,Tb)};m.Api=t;h.extend(t.prototype,{any:function(){return 0!==this.count()},concat:x.concat,context:[],count:function(){return this.flatten().length},each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=this.context;return b.length>a?new t(b[a],this[a]):null},filter:function(a){var b=[];if(x.filter)b=x.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new t(this.context,
+b)},flatten:function(){var a=[];return new t(this.context,a.concat.apply(a,this.toArray()))},join:x.join,indexOf:x.indexOf||function(a,b){for(var c=b||0,d=this.length;c<d;c++)if(this[c]===a)return c;return-1},iterator:function(a,b,c,d){var e=[],f,g,h,i,o,l=this.context,m,p,r=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);g=0;for(h=l.length;g<h;g++){var n=new t(l[g]);if("table"===b)f=c.call(n,l[g],g),f!==k&&e.push(f);else if("columns"===b||"rows"===b)f=c.call(n,l[g],this[g],g),f!==k&&e.push(f);
+else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){p=this[g];"column-rows"===b&&(m=Da(l[g],r.opts));i=0;for(o=p.length;i<o;i++)f=p[i],f="cell"===b?c.call(n,l[g],f.row,f.column,g,i):c.call(n,l[g],f,g,i,m),f!==k&&e.push(f)}}return e.length||d?(a=new t(l,a?e.concat.apply([],e):e),b=a.selector,b.rows=r.rows,b.cols=r.cols,b.opts=r.opts,a):this},lastIndexOf:x.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(x.map)b=
+x.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new t(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:x.pop,push:x.push,reduce:x.reduce||function(a,b){return hb(this,a,b,0,this.length,1)},reduceRight:x.reduceRight||function(a,b){return hb(this,a,b,this.length-1,-1,-1)},reverse:x.reverse,selector:null,shift:x.shift,sort:x.sort,splice:x.splice,toArray:function(){return x.slice.call(this)},to$:function(){return h(this)},
+toJQuery:function(){return h(this)},unique:function(){return new t(this.context,pa(this))},unshift:x.unshift});t.extend=function(a,b,c){if(c.length&&b&&(b instanceof t||b.__dt_wrapper)){var d,e,f,g=function(a,b,c){return function(){var d=b.apply(a,arguments);t.extend(d,d,c.methodExt);return d}};d=0;for(e=c.length;d<e;d++)f=c[d],b[f.name]="function"===typeof f.val?g(a,f.val,f):h.isPlainObject(f.val)?{}:f.val,b[f.name].__dt_wrapper=!0,t.extend(a,b[f.name],f.propExt)}};t.register=p=function(a,b){if(h.isArray(a))for(var c=
+0,d=a.length;c<d;c++)t.register(a[c],b);else for(var e=a.split("."),f=Tb,g,j,c=0,d=e.length;c<d;c++){g=(j=-1!==e[c].indexOf("()"))?e[c].replace("()",""):e[c];var i;a:{i=0;for(var k=f.length;i<k;i++)if(f[i].name===g){i=f[i];break a}i=null}i||(i={name:g,val:{},methodExt:[],propExt:[]},f.push(i));c===d-1?i.val=b:f=j?i.methodExt:i.propExt}};t.registerPlural=r=function(a,b,c){t.register(a,c);t.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof t?a.length?h.isArray(a[0])?
+new t(a.context,a[0]):a[0]:k:a})};p("tables()",function(a){var b;if(a){b=t;var c=this.context;if("number"===typeof a)a=[c[a]];else var d=h.map(c,function(a){return a.nTable}),a=h(d).filter(a).map(function(){var a=h.inArray(this,d);return c[a]}).toArray();b=new b(a)}else b=this;return b});p("table()",function(a){var a=this.tables(a),b=a.context;return b.length?new t(b[0]):a});r("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});r("tables().body()",
+"table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});r("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});r("tables().footer()","table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});r("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});p("draw()",function(a){return this.iterator("table",
+function(b){"page"===a?O(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),T(b,!1===a))})});p("page()",function(a){return a===k?this.page.info().page:this.iterator("table",function(b){Ta(b,a)})});p("page.info()",function(){if(0===this.context.length)return k;var a=this.context[0],b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),
+recordsDisplay:d,serverSide:"ssp"===y(a)}});p("page.len()",function(a){return a===k?0!==this.context.length?this.context[0]._iDisplayLength:k:this.iterator("table",function(b){Ra(b,a)})});var Ub=function(a,b,c){if(c){var d=new t(a);d.one("draw",function(){c(d.ajax.json())})}if("ssp"==y(a))T(a,b);else{C(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();ra(a,[],function(c){na(a);for(var c=sa(a,c),d=0,e=c.length;d<e;d++)N(a,c[d]);T(a,b);C(a,!1)})}};p("ajax.json()",function(){var a=this.context;if(0<
+a.length)return a[0].json});p("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});p("ajax.reload()",function(a,b){return this.iterator("table",function(c){Ub(c,!1===b,a)})});p("ajax.url()",function(a){var b=this.context;if(a===k){if(0===b.length)return k;b=b[0];return b.ajax?h.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){h.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});p("ajax.url().load()",function(a,b){return this.iterator("table",
+function(c){Ub(c,!1===b,a)})});var $a=function(a,b,c,d,e){var f=[],g,j,i,o,l,m;i=typeof b;if(!b||"string"===i||"function"===i||b.length===k)b=[b];i=0;for(o=b.length;i<o;i++){j=b[i]&&b[i].split?b[i].split(","):[b[i]];l=0;for(m=j.length;l<m;l++)(g=c("string"===typeof j[l]?h.trim(j[l]):j[l]))&&g.length&&(f=f.concat(g))}a=s.selector[a];if(a.length){i=0;for(o=a.length;i<o;i++)f=a[i](d,e,f)}return pa(f)},ab=function(a){a||(a={});a.filter&&a.search===k&&(a.search=a.filter);return h.extend({search:"none",
+order:"current",page:"all"},a)},bb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Da=function(a,b){var c,d,e,f=[],g=a.aiDisplay;c=a.aiDisplayMaster;var j=b.search;d=b.order;e=b.page;if("ssp"==y(a))return"removed"===j?[]:X(0,c.length);if("current"==e){c=a._iDisplayStart;for(d=a.fnDisplayEnd();c<d;c++)f.push(g[c])}else if("current"==d||"applied"==d)f="none"==j?c.slice():"applied"==j?g.slice():h.map(c,
+function(a){return-1===h.inArray(a,g)?a:null});else if("index"==d||"original"==d){c=0;for(d=a.aoData.length;c<d;c++)"none"==j?f.push(c):(e=h.inArray(c,g),(-1===e&&"removed"==j||0<=e&&"applied"==j)&&f.push(c))}return f};p("rows()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=ab(b),c=this.iterator("table",function(c){var e=b;return $a("row",a,function(a){var b=Pb(a);if(b!==null&&!e)return[b];var j=Da(c,e);if(b!==null&&h.inArray(b,j)!==-1)return[b];if(!a)return j;if(typeof a==="function")return h.map(j,
+function(b){var e=c.aoData[b];return a(b,e._aData,e.nTr)?b:null});b=Sb(ja(c.aoData,j,"nTr"));if(a.nodeName&&h.inArray(a,b)!==-1)return[a._DT_RowIndex];if(typeof a==="string"&&a.charAt(0)==="#"){j=c.aIds[a.replace(/^#/,"")];if(j!==k)return[j.idx]}return h(b).filter(a).map(function(){return this._DT_RowIndex}).toArray()},c,e)},1);c.selector.rows=a;c.selector.opts=b;return c});p("rows().nodes()",function(){return this.iterator("row",function(a,b){return a.aoData[b].nTr||k},1)});p("rows().data()",function(){return this.iterator(!0,
+"rows",function(a,b){return ja(a.aoData,b,"_aData")},1)});r("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){var d=b.aoData[c];return"search"===a?d._aFilterData:d._aSortData},1)});r("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){ea(b,c,a)})});r("rows().indexes()","row().index()",function(){return this.iterator("row",function(a,b){return b},1)});r("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,
+d=0,e=c.length;d<e;d++)for(var f=0,g=this[d].length;f<g;f++){var h=c[d].rowIdFn(c[d].aoData[this[d][f]]._aData);b.push((!0===a?"#":"")+h)}return new t(c,b)});r("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,f=e[c],g,h,i,o,l;e.splice(c,1);g=0;for(h=e.length;g<h;g++)if(i=e[g],l=i.anCells,null!==i.nTr&&(i.nTr._DT_RowIndex=g),null!==l){i=0;for(o=l.length;i<o;i++)l[i]._DT_CellIndex.row=g}oa(b.aiDisplayMaster,c);oa(b.aiDisplay,c);oa(a[d],c,!1);
+Sa(b);c=b.rowIdFn(f._aData);c!==k&&delete b.aIds[c]});this.iterator("table",function(a){for(var c=0,d=a.aoData.length;c<d;c++)a.aoData[c].idx=c});return this});p("rows.add()",function(a){var b=this.iterator("table",function(b){var c,f,g,h=[];f=0;for(g=a.length;f<g;f++)c=a[f],c.nodeName&&"TR"===c.nodeName.toUpperCase()?h.push(ma(b,c)[0]):h.push(N(b,c));return h},1),c=this.rows(-1);c.pop();h.merge(c,b);return c});p("row()",function(a,b){return bb(this.rows(a,b))});p("row().data()",function(a){var b=
+this.context;if(a===k)return b.length&&this.length?b[0].aoData[this[0]]._aData:k;b[0].aoData[this[0]]._aData=a;ea(b[0],this[0],"data");return this});p("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});p("row.add()",function(a){a instanceof h&&a.length&&(a=a[0]);var b=this.iterator("table",function(b){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?ma(b,a)[0]:N(b,a)});return this.row(b[0])});var cb=function(a,b){var c=a.context;if(c.length&&
+(c=c[0].aoData[b!==k?b:a[0]])&&c._details)c._details.remove(),c._detailsShow=k,c._details=k},Vb=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];if(d._details){(d._detailsShow=b)?d._details.insertAfter(d.nTr):d._details.detach();var e=c[0],f=new t(e),g=e.aoData;f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");0<D(g,"_details").length&&(f.on("draw.dt.DT_details",function(a,b){e===b&&f.rows({page:"current"}).eq(0).each(function(a){a=g[a];
+a._detailsShow&&a._details.insertAfter(a.nTr)})}),f.on("column-visibility.dt.DT_details",function(a,b){if(e===b)for(var c,d=ca(b),f=0,h=g.length;f<h;f++)c=g[f],c._details&&c._details.children("td[colspan]").attr("colspan",d)}),f.on("destroy.dt.DT_details",function(a,b){if(e===b)for(var c=0,d=g.length;c<d;c++)g[c]._details&&cb(f,c)}))}}};p("row().child()",function(a,b){var c=this.context;if(a===k)return c.length&&this.length?c[0].aoData[this[0]]._details:k;if(!0===a)this.child.show();else if(!1===
+a)cb(this);else if(c.length&&this.length){var d=c[0],c=c[0].aoData[this[0]],e=[],f=function(a,b){if(h.isArray(a)||a instanceof h)for(var c=0,k=a.length;c<k;c++)f(a[c],b);else a.nodeName&&"tr"===a.nodeName.toLowerCase()?e.push(a):(c=h("<tr><td/></tr>").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=ca(d),e.push(c[0]))};f(a,b);c._details&&c._details.remove();c._details=h(e);c._detailsShow&&c._details.insertAfter(c.nTr)}return this});p(["row().child.show()","row().child().show()"],function(){Vb(this,
+!0);return this});p(["row().child.hide()","row().child().hide()"],function(){Vb(this,!1);return this});p(["row().child.remove()","row().child().remove()"],function(){cb(this);return this});p("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var dc=/^(.+):(name|visIdx|visible)$/,Wb=function(a,b,c,d,e){for(var c=[],d=0,f=e.length;d<f;d++)c.push(B(a,e[d],b));return c};p("columns()",function(a,b){a===k?a="":h.isPlainObject(a)&&
+(b=a,a="");var b=ab(b),c=this.iterator("table",function(c){var e=a,f=b,g=c.aoColumns,j=D(g,"sName"),i=D(g,"nTh");return $a("column",e,function(a){var b=Pb(a);if(a==="")return X(g.length);if(b!==null)return[b>=0?b:g.length+b];if(typeof a==="function"){var e=Da(c,f);return h.map(g,function(b,f){return a(f,Wb(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(dc):"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],10);if(b<0){var m=h.map(g,function(a,b){return a.bVisible?b:null});
+return[m[m.length+b]]}return[$(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null})}else return h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray()},c,f)},1);c.selector.cols=a;c.selector.opts=b;return c});r("columns().header()","column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});r("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});r("columns().data()",
+"column().data()",function(){return this.iterator("column-rows",Wb,1)});r("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});r("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,f){return ja(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});r("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ja(a.aoData,
+e,"anCells",b)},1)});r("columns().visible()","column().visible()",function(a,b){return this.iterator("column",function(c,d){if(a===k)return c.aoColumns[d].bVisible;var e=c.aoColumns,f=e[d],g=c.aoData,j,i,m;if(a!==k&&f.bVisible!==a){if(a){var l=h.inArray(!0,D(e,"bVisible"),d+1);j=0;for(i=g.length;j<i;j++)m=g[j].nTr,e=g[j].anCells,m&&m.insertBefore(e[d],e[l]||null)}else h(D(c.aoData,"anCells",d)).detach();f.bVisible=a;ga(c,c.aoHeader);ga(c,c.aoFooter);if(b===k||b)U(c),(c.oScroll.sX||c.oScroll.sY)&&
+Z(c);v(c,null,"column-visibility",[c,d,a,b]);ya(c)}})});r("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?ba(b,c):c},1)});p("columns.adjust()",function(){return this.iterator("table",function(a){U(a)},1)});p("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return $(c,b);if("fromData"===a||"toVisible"===a)return ba(c,b)}});p("column()",function(a,b){return bb(this.columns(a,
+b))});p("cells()",function(a,b,c){h.isPlainObject(a)&&(a.row===k?(c=a,a=null):(c=b,b=null));h.isPlainObject(b)&&(c=b,b=null);if(null===b||b===k)return this.iterator("table",function(b){var d=a,e=ab(c),f=b.aoData,g=Da(b,e),j=Sb(ja(f,g,"anCells")),i=h([].concat.apply([],j)),l,m=b.aoColumns.length,o,p,t,r,s,v;return $a("cell",d,function(a){var c=typeof a==="function";if(a===null||a===k||c){o=[];p=0;for(t=g.length;p<t;p++){l=g[p];for(r=0;r<m;r++){s={row:l,column:r};if(c){v=f[l];a(s,B(b,l,r),v.anCells?
+v.anCells[r]:null)&&o.push(s)}else o.push(s)}}return o}return h.isPlainObject(a)?[a]:i.filter(a).map(function(a,b){return{row:b._DT_CellIndex.row,column:b._DT_CellIndex.column}}).toArray()},b,e)});var d=this.columns(b,c),e=this.rows(a,c),f,g,j,i,m,l=this.iterator("table",function(a,b){f=[];g=0;for(j=e[b].length;g<j;g++){i=0;for(m=d[b].length;i<m;i++)f.push({row:e[b][g],column:d[b][i]})}return f},1);h.extend(l.selector,{cols:b,rows:a,opts:c});return l});r("cells().nodes()","cell().node()",function(){return this.iterator("cell",
+function(a,b,c){return(a=a.aoData[b].anCells)?a[c]:k},1)});p("cells().data()",function(){return this.iterator("cell",function(a,b,c){return B(a,b,c)},1)});r("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});r("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,d){return B(b,c,d,a)},1)});r("cells().indexes()","cell().index()",function(){return this.iterator("cell",
+function(a,b,c){return{row:b,column:c,columnVisible:ba(a,c)}},1)});r("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,d){ea(b,c,a,d)})});p("cell()",function(a,b,c){return bb(this.cells(a,b,c))});p("cell().data()",function(a){var b=this.context,c=this[0];if(a===k)return b.length&&c.length?B(b[0],c[0].row,c[0].column):k;jb(b[0],c[0].row,c[0].column,a);ea(b[0],c[0].row,"data",c[0].column);return this});p("order()",function(a,b){var c=this.context;if(a===
+k)return 0!==c.length?c[0].aaSorting:k;"number"===typeof a?a=[[a,b]]:h.isArray(a[0])||(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=a.slice()})});p("order.listener()",function(a,b,c){return this.iterator("table",function(d){Oa(d,a,b,c)})});p("order.fixed()",function(a){if(!a){var b=this.context,b=b.length?b[0].aaSortingFixed:k;return h.isArray(b)?{pre:b}:b}return this.iterator("table",function(b){b.aaSortingFixed=h.extend(!0,{},a)})});p(["columns().order()",
+"column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];h.each(b[d],function(b,c){e.push([c,a])});c.aaSorting=e})});p("search()",function(a,b,c,d){var e=this.context;return a===k?0!==e.length?e[0].oPreviousSearch.sSearch:k:this.iterator("table",function(e){e.oFeatures.bFilter&&ha(e,h.extend({},e.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});r("columns().search()","column().search()",function(a,
+b,c,d){return this.iterator("column",function(e,f){var g=e.aoPreSearchCols;if(a===k)return g[f].sSearch;e.oFeatures.bFilter&&(h.extend(g[f],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),ha(e,e.oPreviousSearch,1))})});p("state()",function(){return this.context.length?this.context[0].oSavedState:null});p("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});p("state.loaded()",function(){return this.context.length?
+this.context[0].oLoadedState:null});p("state.save()",function(){return this.iterator("table",function(a){ya(a)})});m.versionCheck=m.fnVersionCheck=function(a){for(var b=m.version.split("."),a=a.split("."),c,d,e=0,f=a.length;e<f;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};m.isDataTable=m.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;h.each(m.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?h("table",e.nScrollFoot)[0]:
+null;if(e.nTable===b||f===b||g===b)c=!0});return c};m.tables=m.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(m.settings,function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable});return b?new t(c):c};m.util={throttle:ua,escapeRegex:va};m.camelToHungarian=J;p("$()",function(a,b){var c=this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){p(b+"()",function(){var a=Array.prototype.slice.call(arguments);
+a[0].match(/\.dt\b/)||(a[0]+=".dt");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});p("clear()",function(){return this.iterator("table",function(a){na(a)})});p("settings()",function(){return new t(this.context,this.context)});p("init()",function(){var a=this.context;return a.length?a[0].oInit:null});p("data()",function(){return this.iterator("table",function(a){return D(a.aoData,"_aData")}).flatten()});p("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=
+b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),p;b.bDestroying=!0;v(b,"aoDestroyCallback","destroy",[b]);a||(new t(b)).columns().visible(!0);k.unbind(".DT").find(":not(tbody *)").unbind(".DT");h(E).unbind(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));b.aaSorting=[];b.aaSortingFixed=[];xa(b);
+h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);b.bJUI&&(h("th span."+d.sSortIcon+", td span."+d.sSortIcon,g).detach(),h("th, td",g).each(function(){var a=h("div."+d.sSortJUIWrapper,this);h(this).append(a.contents());a.detach()}));f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable),(p=
+b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%p])}));c=h.inArray(b,m.settings);-1!==c&&m.settings.splice(c,1)})});h.each(["column","row","cell"],function(a,b){p(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,m){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,m)})})});p("i18n()",function(a,b,c){var d=this.context[0],a=Q(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:a._);
+return a.replace("%d",c)});m.version="1.10.10";m.settings=[];m.models={};m.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};m.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};m.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,
+sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};m.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,
+bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+
+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},
+oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},
+m.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};Y(m.defaults);m.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};
+Y(m.defaults.column);m.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],
+aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",
+iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?
+1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};
+m.ext=s={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:m.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:m.version};h.extend(s,{afnFiltering:s.search,aTypes:s.type.detect,ofnSearch:s.type.search,oSort:s.type.order,afnSortData:s.order,aoFeatures:s.feature,oApi:s.internal,oStdClasses:s.classes,
+oPagination:s.pager});h.extend(m.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",
+sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",
+sJUIHeader:"",sJUIFooter:""});var Ea="",Ea="",G=Ea+"ui-state-default",ka=Ea+"css_right ui-icon ui-icon-",Xb=Ea+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";h.extend(m.ext.oJUIClasses,m.ext.classes,{sPageButton:"fg-button ui-button "+G,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:G+" sorting_asc",sSortDesc:G+" sorting_desc",sSortable:G+" sorting",
+sSortableAsc:G+" sorting_asc_disabled",sSortableDesc:G+" sorting_desc_disabled",sSortableNone:G+" sorting_disabled",sSortJUIAsc:ka+"triangle-1-n",sSortJUIDesc:ka+"triangle-1-s",sSortJUI:ka+"carat-2-n-s",sSortJUIAscAllowed:ka+"carat-1-n",sSortJUIDescAllowed:ka+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+G,sScrollFoot:"dataTables_scrollFoot "+G,sHeaderTH:G,sFooterTH:G,sJUIHeader:Xb+" ui-corner-tl ui-corner-tr",sJUIFooter:Xb+
+" ui-corner-bl ui-corner-br"});var Mb=m.ext.pager;h.extend(Mb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[Aa(a,b)]},simple_numbers:function(a,b){return["previous",Aa(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Aa(a,b),"next","last"]},_numbers:Aa,numbers_length:7});h.extend(!0,m.ext.renderer,{pageButton:{_:function(a,b,c,d,e,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||
+{},k,l,m=0,p=function(b,d){var n,r,t,s,v=function(b){Ta(a,b.data.action,true)};n=0;for(r=d.length;n<r;n++){s=d[n];if(h.isArray(s)){t=h("<"+(s.DT_el||"div")+"/>").appendTo(b);p(t,s)}else{k=null;l="";switch(s){case "ellipsis":b.append('<span class="ellipsis">…</span>');break;case "first":k=j.sFirst;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":k=j.sPrevious;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":k=j.sNext;l=s+(e<f-1?"":" "+g.sPageButtonDisabled);break;case "last":k=
+j.sLast;l=s+(e<f-1?"":" "+g.sPageButtonDisabled);break;default:k=s+1;l=e===s?g.sPageButtonActive:""}if(k!==null){t=h("<a>",{"class":g.sPageButton+" "+l,"aria-controls":a.sTableId,"aria-label":i[s],"data-dt-idx":m,tabindex:a.iTabIndex,id:c===0&&typeof s==="string"?a.sTableId+"_"+s:null}).html(k).appendTo(b);Wa(t,{action:s},v);m++}}}},r;try{r=h(b).find(H.activeElement).data("dt-idx")}catch(n){}p(h(b).empty(),d);r&&h(b).find("[data-dt-idx="+r+"]").focus()}}});h.extend(m.ext.type.detect,[function(a,b){var c=
+b.oLanguage.sDecimal;return Za(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&(!ac.test(a)||!bc.test(a)))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||M(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c,!0)?"html-num-fmt"+c:null},function(a){return M(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":
+null}]);h.extend(m.ext.type.search,{html:function(a){return M(a)?a:"string"===typeof a?a.replace(Ob," ").replace(Ca,""):""},string:function(a){return M(a)?a:"string"===typeof a?a.replace(Ob," "):a}});var Ba=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Qb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(s.type.order,{"date-pre":function(a){return Date.parse(a)||0},"html-pre":function(a){return M(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():
+a+""},"string-pre":function(a){return M(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,b){return a<b?1:a>b?-1:0}});db("");h.extend(!0,m.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,
+b,c,d){h("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]=="asc"?d.sSortJUIAsc:
+h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});m.render={number:function(a,b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return f;f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+f+(e||"")}}},text:function(){return{display:function(a){return"string"===typeof a?a.replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):
+a}}}};h.extend(m.ext.internal,{_fnExternApiFunc:Nb,_fnBuildAjax:ra,_fnAjaxUpdate:lb,_fnAjaxParameters:ub,_fnAjaxUpdateDraw:vb,_fnAjaxDataSrc:sa,_fnAddColumn:Ga,_fnColumnOptions:la,_fnAdjustColumnSizing:U,_fnVisibleToColumnIndex:$,_fnColumnIndexToVisible:ba,_fnVisbleColumns:ca,_fnGetColumns:aa,_fnColumnTypes:Ia,_fnApplyColumnDefs:ib,_fnHungarianMap:Y,_fnCamelToHungarian:J,_fnLanguageCompat:Fa,_fnBrowserDetect:gb,_fnAddData:N,_fnAddTr:ma,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==k?b._DT_RowIndex:
+null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:jb,_fnSplitObjNotation:La,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:R,_fnGetDataMaster:Ma,_fnClearTable:na,_fnDeleteIndex:oa,_fnInvalidate:ea,_fnGetRowElements:Ka,_fnCreateTr:Ja,_fnBuildHead:kb,_fnDrawHead:ga,_fnDraw:O,_fnReDraw:T,_fnAddOptionsHtml:nb,_fnDetectHeader:fa,_fnGetUniqueThs:qa,_fnFeatureHtmlFilter:pb,_fnFilterComplete:ha,_fnFilterCustom:yb,_fnFilterColumn:xb,_fnFilter:wb,_fnFilterCreateSearch:Qa,
+_fnEscapeRegex:va,_fnFilterData:zb,_fnFeatureHtmlInfo:sb,_fnUpdateInfo:Cb,_fnInfoMacros:Db,_fnInitialise:ia,_fnInitComplete:ta,_fnLengthChange:Ra,_fnFeatureHtmlLength:ob,_fnFeatureHtmlPaginate:tb,_fnPageChange:Ta,_fnFeatureHtmlProcessing:qb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:rb,_fnScrollDraw:Z,_fnApplyToChildren:I,_fnCalculateColumnWidths:Ha,_fnThrottle:ua,_fnConvertToWidth:Fb,_fnGetWidestNode:Gb,_fnGetMaxLenString:Hb,_fnStringToCss:w,_fnSortFlatten:W,_fnSort:mb,_fnSortAria:Jb,_fnSortListener:Va,
+_fnSortAttachListener:Oa,_fnSortingClasses:xa,_fnSortData:Ib,_fnSaveState:ya,_fnLoadState:Kb,_fnSettingsFromNode:za,_fnLog:K,_fnMap:F,_fnBindAction:Wa,_fnCallbackReg:z,_fnCallbackFire:v,_fnLengthOverflow:Sa,_fnRenderer:Pa,_fnDataSource:y,_fnRowAttributes:Na,_fnCalculateEnd:function(){}});h.fn.dataTable=m;m.$=h;h.fn.dataTableSettings=m.settings;h.fn.dataTableExt=m.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};h.each(m,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable});
diff --git a/admportal/public/javascripts/jquery.min.js b/admportal/public/javascripts/jquery.min.js
new file mode 100644
index 0000000..ab28a24
--- /dev/null
+++ b/admportal/public/javascripts/jquery.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
+if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"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 null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.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]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.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=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,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||(m.cssNumber[c]?"":"px")
+},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,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):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],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 kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.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){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
diff --git a/admportal/public/javascripts/jquery.treegrid.bootstrap3.js b/admportal/public/javascripts/jquery.treegrid.bootstrap3.js
new file mode 100644
index 0000000..1118697
--- /dev/null
+++ b/admportal/public/javascripts/jquery.treegrid.bootstrap3.js
@@ -0,0 +1,4 @@
+$.extend($.fn.treegrid.defaults, {
+ expanderExpandedClass: 'glyphicon glyphicon-chevron-down',
+ expanderCollapsedClass: 'glyphicon glyphicon-chevron-right'
+});
diff --git a/admportal/public/javascripts/jquery.treegrid.js b/admportal/public/javascripts/jquery.treegrid.js
new file mode 100644
index 0000000..8579d8e
--- /dev/null
+++ b/admportal/public/javascripts/jquery.treegrid.js
@@ -0,0 +1,626 @@
+/*
+ * jQuery treegrid Plugin 0.2.0
+ * https://github.com/maxazan/jquery-treegrid
+ *
+ * Copyright 2013, Pomazan Max
+ * Licensed under the MIT licenses.
+ */
+(function($) {
+
+ var methods = {
+ /**
+ * Initialize tree
+ *
+ * @param {Object} options
+ * @returns {Object[]}
+ */
+ initTree: function(options) {
+ var settings = $.extend({}, this.treegrid.defaults, options);
+ return this.each(function() {
+ var $this = $(this);
+ $this.treegrid('setTreeContainer', $(this));
+ $this.treegrid('setSettings', settings);
+ settings.getRootNodes.apply(this, [$(this)]).treegrid('initNode', settings);
+ $this.treegrid('getRootNodes').treegrid('render');
+ });
+ },
+ /**
+ * Initialize node
+ *
+ * @param {Object} settings
+ * @returns {Object[]}
+ */
+ initNode: function(settings) {
+ return this.each(function() {
+ var $this = $(this);
+ $this.treegrid('setTreeContainer', settings.getTreeGridContainer.apply(this));
+ $this.treegrid('getChildNodes').treegrid('initNode', settings);
+ $this.treegrid('initExpander').treegrid('initIndent').treegrid('initEvents').treegrid('initState').treegrid('initChangeEvent').treegrid("initSettingsEvents");
+ });
+ },
+ initChangeEvent: function() {
+ var $this = $(this);
+ //Save state on change
+ $this.on("change", function() {
+ var $this = $(this);
+ $this.treegrid('render');
+ if ($this.treegrid('getSetting', 'saveState')) {
+ $this.treegrid('saveState');
+ }
+ });
+ return $this;
+ },
+ /**
+ * Initialize node events
+ *
+ * @returns {Node}
+ */
+ initEvents: function() {
+ var $this = $(this);
+ //Default behavior on collapse
+ $this.on("collapse", function() {
+ var $this = $(this);
+ $this.removeClass('treegrid-expanded');
+ $this.addClass('treegrid-collapsed');
+ });
+ //Default behavior on expand
+ $this.on("expand", function() {
+ var $this = $(this);
+ $this.removeClass('treegrid-collapsed');
+ $this.addClass('treegrid-expanded');
+ });
+
+ return $this;
+ },
+ /**
+ * Initialize events from settings
+ *
+ * @returns {Node}
+ */
+ initSettingsEvents: function() {
+ var $this = $(this);
+ //Save state on change
+ $this.on("change", function() {
+ var $this = $(this);
+ if (typeof($this.treegrid('getSetting', 'onChange')) === "function") {
+ $this.treegrid('getSetting', 'onChange').apply($this);
+ }
+ });
+ //Default behavior on collapse
+ $this.on("collapse", function() {
+ var $this = $(this);
+ if (typeof($this.treegrid('getSetting', 'onCollapse')) === "function") {
+ $this.treegrid('getSetting', 'onCollapse').apply($this);
+ }
+ });
+ //Default behavior on expand
+ $this.on("expand", function() {
+ var $this = $(this);
+ if (typeof($this.treegrid('getSetting', 'onExpand')) === "function") {
+ $this.treegrid('getSetting', 'onExpand').apply($this);
+ }
+
+ });
+
+ return $this;
+ },
+ /**
+ * Initialize expander for node
+ *
+ * @returns {Node}
+ */
+ initExpander: function() {
+ var $this = $(this);
+ var cell = $this.find('td').get($this.treegrid('getSetting', 'treeColumn'));
+ var tpl = $this.treegrid('getSetting', 'expanderTemplate');
+ var expander = $this.treegrid('getSetting', 'getExpander').apply(this);
+ if (expander) {
+ expander.remove();
+ }
+ $(tpl).prependTo(cell).click(function() {
+ $($(this).closest('tr')).treegrid('toggle');
+ });
+ return $this;
+ },
+ /**
+ * Initialize indent for node
+ *
+ * @returns {Node}
+ */
+ initIndent: function() {
+ var $this = $(this);
+ $this.find('.treegrid-indent').remove();
+ var tpl = $this.treegrid('getSetting', 'indentTemplate');
+ var expander = $this.find('.treegrid-expander');
+ var depth = $this.treegrid('getDepth');
+ for (var i = 0; i < depth; i++) {
+ $(tpl).insertBefore(expander);
+ }
+ return $this;
+ },
+ /**
+ * Initialise state of node
+ *
+ * @returns {Node}
+ */
+ initState: function() {
+ var $this = $(this);
+ if ($this.treegrid('getSetting', 'saveState') && !$this.treegrid('isFirstInit')) {
+ $this.treegrid('restoreState');
+ } else {
+ if ($this.treegrid('getSetting', 'initialState') === "expanded") {
+ $this.treegrid('expand');
+ } else {
+ $this.treegrid('collapse');
+ }
+ }
+ return $this;
+ },
+ /**
+ * Return true if this tree was never been initialised
+ *
+ * @returns {Boolean}
+ */
+ isFirstInit: function() {
+ var tree = $(this).treegrid('getTreeContainer');
+ if (tree.data('first_init') === undefined) {
+ tree.data('first_init', $.cookie(tree.treegrid('getSetting', 'saveStateName')) === undefined);
+ }
+ return tree.data('first_init');
+ },
+ /**
+ * Save state of current node
+ *
+ * @returns {Node}
+ */
+ saveState: function() {
+ var $this = $(this);
+ if ($this.treegrid('getSetting', 'saveStateMethod') === 'cookie') {
+
+ var stateArrayString = $.cookie($this.treegrid('getSetting', 'saveStateName')) || '';
+ var stateArray = (stateArrayString === '' ? [] : stateArrayString.split(','));
+ var nodeId = $this.treegrid('getNodeId');
+
+ if ($this.treegrid('isExpanded')) {
+ if ($.inArray(nodeId, stateArray) === -1) {
+ stateArray.push(nodeId);
+ }
+ } else if ($this.treegrid('isCollapsed')) {
+ if ($.inArray(nodeId, stateArray) !== -1) {
+ stateArray.splice($.inArray(nodeId, stateArray), 1);
+ }
+ }
+ $.cookie($this.treegrid('getSetting', 'saveStateName'), stateArray.join(','));
+ }
+ return $this;
+ },
+ /**
+ * Restore state of current node.
+ *
+ * @returns {Node}
+ */
+ restoreState: function() {
+ var $this = $(this);
+ if ($this.treegrid('getSetting', 'saveStateMethod') === 'cookie') {
+ var stateArray = $.cookie($this.treegrid('getSetting', 'saveStateName')).split(',');
+ if ($.inArray($this.treegrid('getNodeId'), stateArray) !== -1) {
+ $this.treegrid('expand');
+ } else {
+ $this.treegrid('collapse');
+ }
+
+ }
+ return $this;
+ },
+ /**
+ * Method return setting by name
+ *
+ * @param {type} name
+ * @returns {unresolved}
+ */
+ getSetting: function(name) {
+ if (!$(this).treegrid('getTreeContainer')) {
+ return null;
+ }
+ return $(this).treegrid('getTreeContainer').data('settings')[name];
+ },
+ /**
+ * Add new settings
+ *
+ * @param {Object} settings
+ */
+ setSettings: function(settings) {
+ $(this).treegrid('getTreeContainer').data('settings', settings);
+ },
+ /**
+ * Return tree container
+ *
+ * @returns {HtmlElement}
+ */
+ getTreeContainer: function() {
+ return $(this).data('treegrid');
+ },
+ /**
+ * Set tree container
+ *
+ * @param {HtmlE;ement} container
+ */
+ setTreeContainer: function(container) {
+ return $(this).data('treegrid', container);
+ },
+ /**
+ * Method return all root nodes of tree.
+ *
+ * Start init all child nodes from it.
+ *
+ * @returns {Array}
+ */
+ getRootNodes: function() {
+ return $(this).treegrid('getSetting', 'getRootNodes').apply(this, [$(this).treegrid('getTreeContainer')]);
+ },
+ /**
+ * Method return all nodes of tree.
+ *
+ * @returns {Array}
+ */
+ getAllNodes: function() {
+ return $(this).treegrid('getSetting', 'getAllNodes').apply(this, [$(this).treegrid('getTreeContainer')]);
+ },
+ /**
+ * Mthod return true if element is Node
+ *
+ * @returns {String}
+ */
+ isNode: function() {
+ return $(this).treegrid('getNodeId') !== null;
+ },
+ /**
+ * Mthod return id of node
+ *
+ * @returns {String}
+ */
+ getNodeId: function() {
+ if ($(this).treegrid('getSetting', 'getNodeId') === null) {
+ return null;
+ } else {
+ return $(this).treegrid('getSetting', 'getNodeId').apply(this);
+ }
+ },
+ /**
+ * Method return parent id of node or null if root node
+ *
+ * @returns {String}
+ */
+ getParentNodeId: function() {
+ return $(this).treegrid('getSetting', 'getParentNodeId').apply(this);
+ },
+ /**
+ * Method return parent node or null if root node
+ *
+ * @returns {Object[]}
+ */
+ getParentNode: function() {
+ if ($(this).treegrid('getParentNodeId') === null) {
+ return null;
+ } else {
+ return $(this).treegrid('getSetting', 'getNodeById').apply(this, [$(this).treegrid('getParentNodeId'), $(this).treegrid('getTreeContainer')]);
+ }
+ },
+ /**
+ * Method return array of child nodes or null if node is leaf
+ *
+ * @returns {Object[]}
+ */
+ getChildNodes: function() {
+ return $(this).treegrid('getSetting', 'getChildNodes').apply(this, [$(this).treegrid('getNodeId'), $(this).treegrid('getTreeContainer')]);
+ },
+ /**
+ * Method return depth of tree.
+ *
+ * This method is needs for calculate indent
+ *
+ * @returns {Number}
+ */
+ getDepth: function() {
+ if ($(this).treegrid('getParentNode') === null) {
+ return 0;
+ }
+ return $(this).treegrid('getParentNode').treegrid('getDepth') + 1;
+ },
+ /**
+ * Method return true if node is root
+ *
+ * @returns {Boolean}
+ */
+ isRoot: function() {
+ return $(this).treegrid('getDepth') === 0;
+ },
+ /**
+ * Method return true if node has no child nodes
+ *
+ * @returns {Boolean}
+ */
+ isLeaf: function() {
+ return $(this).treegrid('getChildNodes').length === 0;
+ },
+ /**
+ * Method return true if node last in branch
+ *
+ * @returns {Boolean}
+ */
+ isLast: function() {
+ if ($(this).treegrid('isNode')) {
+ var parentNode = $(this).treegrid('getParentNode');
+ if (parentNode === null) {
+ if ($(this).treegrid('getNodeId') === $(this).treegrid('getRootNodes').last().treegrid('getNodeId')) {
+ return true;
+ }
+ } else {
+ if ($(this).treegrid('getNodeId') === parentNode.treegrid('getChildNodes').last().treegrid('getNodeId')) {
+ return true;
+ }
+ }
+ }
+ return false;
+ },
+ /**
+ * Method return true if node first in branch
+ *
+ * @returns {Boolean}
+ */
+ isFirst: function() {
+ if ($(this).treegrid('isNode')) {
+ var parentNode = $(this).treegrid('getParentNode');
+ if (parentNode === null) {
+ if ($(this).treegrid('getNodeId') === $(this).treegrid('getRootNodes').first().treegrid('getNodeId')) {
+ return true;
+ }
+ } else {
+ if ($(this).treegrid('getNodeId') === parentNode.treegrid('getChildNodes').first().treegrid('getNodeId')) {
+ return true;
+ }
+ }
+ }
+ return false;
+ },
+ /**
+ * Return true if node expanded
+ *
+ * @returns {Boolean}
+ */
+ isExpanded: function() {
+ return $(this).hasClass('treegrid-expanded');
+ },
+ /**
+ * Return true if node collapsed
+ *
+ * @returns {Boolean}
+ */
+ isCollapsed: function() {
+ return $(this).hasClass('treegrid-collapsed');
+ },
+ /**
+ * Return true if at least one of parent node is collapsed
+ *
+ * @returns {Boolean}
+ */
+ isOneOfParentsCollapsed: function() {
+ var $this = $(this);
+ if ($this.treegrid('isRoot')) {
+ return false;
+ } else {
+ if ($this.treegrid('getParentNode').treegrid('isCollapsed')) {
+ return true;
+ } else {
+ return $this.treegrid('getParentNode').treegrid('isOneOfParentsCollapsed');
+ }
+ }
+ },
+ /**
+ * Expand node
+ *
+ * @returns {Node}
+ */
+ expand: function() {
+ if (!this.treegrid('isLeaf') && !this.treegrid("isExpanded")) {
+ this.trigger("expand");
+ this.trigger("change");
+ return this;
+ }
+ return this;
+ },
+ /**
+ * Expand all nodes
+ *
+ * @returns {Node}
+ */
+ expandAll: function() {
+ var $this = $(this);
+ $this.treegrid('getRootNodes').treegrid('expandRecursive');
+ return $this;
+ },
+ /**
+ * Expand current node and all child nodes begin from current
+ *
+ * @returns {Node}
+ */
+ expandRecursive: function() {
+ return $(this).each(function() {
+ var $this = $(this);
+ $this.treegrid('expand');
+ if (!$this.treegrid('isLeaf')) {
+ $this.treegrid('getChildNodes').treegrid('expandRecursive');
+ }
+ });
+ },
+ /**
+ * Collapse node
+ *
+ * @returns {Node}
+ */
+ collapse: function() {
+ return $(this).each(function() {
+ var $this = $(this);
+ if (!$this.treegrid('isLeaf') && !$this.treegrid("isCollapsed")) {
+ $this.trigger("collapse");
+ $this.trigger("change");
+ }
+ });
+ },
+ /**
+ * Collapse all nodes
+ *
+ * @returns {Node}
+ */
+ collapseAll: function() {
+ var $this = $(this);
+ $this.treegrid('getRootNodes').treegrid('collapseRecursive');
+ return $this;
+ },
+ /**
+ * Collapse current node and all child nodes begin from current
+ *
+ * @returns {Node}
+ */
+ collapseRecursive: function() {
+ return $(this).each(function() {
+ var $this = $(this);
+ $this.treegrid('collapse');
+ if (!$this.treegrid('isLeaf')) {
+ $this.treegrid('getChildNodes').treegrid('collapseRecursive');
+ }
+ });
+ },
+ /**
+ * Expand if collapsed, Collapse if expanded
+ *
+ * @returns {Node}
+ */
+ toggle: function() {
+ var $this = $(this);
+ if ($this.treegrid('isExpanded')) {
+ $this.treegrid('collapse');
+ } else {
+ $this.treegrid('expand');
+ }
+ return $this;
+ },
+ /**
+ * Rendering node
+ *
+ * @returns {Node}
+ */
+ render: function() {
+ return $(this).each(function() {
+ var $this = $(this);
+ //if parent colapsed we hidden
+ if ($this.treegrid('isOneOfParentsCollapsed')) {
+ $this.hide();
+ } else {
+ $this.show();
+ }
+ if (!$this.treegrid('isLeaf')) {
+ $this.treegrid('renderExpander');
+ $this.treegrid('getChildNodes').treegrid('render');
+ }
+ });
+ },
+ /**
+ * Rendering expander depends on node state
+ *
+ * @returns {Node}
+ */
+ renderExpander: function() {
+ return $(this).each(function() {
+ var $this = $(this);
+ var expander = $this.treegrid('getSetting', 'getExpander').apply(this);
+ if (expander) {
+
+ if (!$this.treegrid('isCollapsed')) {
+ expander.removeClass($this.treegrid('getSetting', 'expanderCollapsedClass'));
+ expander.addClass($this.treegrid('getSetting', 'expanderExpandedClass'));
+ } else {
+ expander.removeClass($this.treegrid('getSetting', 'expanderExpandedClass'));
+ expander.addClass($this.treegrid('getSetting', 'expanderCollapsedClass'));
+ }
+ } else {
+ $this.treegrid('initExpander');
+ $this.treegrid('renderExpander');
+ }
+ });
+ }
+ };
+ $.fn.treegrid = function(method) {
+ if (methods[method]) {
+ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
+ } else if (typeof method === 'object' || !method) {
+ return methods.initTree.apply(this, arguments);
+ } else {
+ $.error('Method with name ' + method + ' does not exists for jQuery.treegrid');
+ }
+ };
+ /**
+ * Plugin's default options
+ */
+ $.fn.treegrid.defaults = {
+ initialState: 'expanded',
+ saveState: false,
+ saveStateMethod: 'cookie',
+ saveStateName: 'tree-grid-state',
+ expanderTemplate: '<span class="treegrid-expander"></span>',
+ indentTemplate: '<span class="treegrid-indent"></span>',
+ expanderExpandedClass: 'treegrid-expander-expanded',
+ expanderCollapsedClass: 'treegrid-expander-collapsed',
+ treeColumn: 0,
+ getExpander: function() {
+ return $(this).find('.treegrid-expander');
+ },
+ getNodeId: function() {
+ var template = /treegrid-([A-Za-z0-9_-]+)/;
+ if (template.test($(this).attr('class'))) {
+ return template.exec($(this).attr('class'))[1];
+ }
+ return null;
+ },
+ getParentNodeId: function() {
+ var template = /treegrid-parent-([A-Za-z0-9_-]+)/;
+ if (template.test($(this).attr('class'))) {
+ return template.exec($(this).attr('class'))[1];
+ }
+ return null;
+ },
+ getNodeById: function(id, treegridContainer) {
+ var templateClass = "treegrid-" + id;
+ return treegridContainer.find('tr.' + templateClass);
+ },
+ getChildNodes: function(id, treegridContainer) {
+ var templateClass = "treegrid-parent-" + id;
+ return treegridContainer.find('tr.' + templateClass);
+ },
+ getTreeGridContainer: function() {
+ return $(this).closest('table');
+ },
+ getRootNodes: function(treegridContainer) {
+ var result = $.grep(treegridContainer.find('tr'), function(element) {
+ var classNames = $(element).attr('class');
+ var templateClass = /treegrid-([A-Za-z0-9_-]+)/;
+ var templateParentClass = /treegrid-parent-([A-Za-z0-9_-]+)/;
+ return templateClass.test(classNames) && !templateParentClass.test(classNames);
+ });
+ return $(result);
+ },
+ getAllNodes: function(treegridContainer) {
+ var result = $.grep(treegridContainer.find('tr'), function(element) {
+ var classNames = $(element).attr('class');
+ var templateClass = /treegrid-([A-Za-z0-9_-]+)/;
+ return templateClass.test(classNames);
+ });
+ return $(result);
+ },
+ //Events
+ onCollapse: null,
+ onExpand: null,
+ onChange: null
+
+ };
+})(jQuery);
diff --git a/admportal/public/javascripts/sla.js b/admportal/public/javascripts/sla.js
new file mode 100644
index 0000000..53c4931
--- /dev/null
+++ b/admportal/public/javascripts/sla.js
@@ -0,0 +1,9 @@
+function uploadDG(form)
+{
+ if ( form.filename.value.length == 0)
+ {
+ alert('Must select a file.');
+ return false;
+ }
+ else { form.submit(); return; }
+}
diff --git a/admportal/public/stylesheets/bootstrap-submenu.css b/admportal/public/stylesheets/bootstrap-submenu.css
new file mode 100644
index 0000000..91e88db
--- /dev/null
+++ b/admportal/public/stylesheets/bootstrap-submenu.css
@@ -0,0 +1,125 @@
+/*!
+ * Bootstrap-submenu v2.0.3 (https://vsn4ik.github.io/bootstrap-submenu/)
+ * Copyright 2015 Vasily A. (https://github.com/vsn4ik)
+ * Licensed under the MIT license
+ */
+
+.dropdown-submenu > a:after {
+ content: "";
+}
+@media (min-width: 768px) {
+ .dropdown-submenu {
+ position: relative;
+ }
+ .dropdown-submenu .dropdown-menu {
+ top: 0;
+ left: 100%;
+ margin-top: -6px;
+ border-top-left-radius: 0;
+ }
+ .dropup .dropdown-submenu .dropdown-menu,
+ .navbar-fixed-bottom .dropdown-submenu .dropdown-menu {
+ top: auto;
+ bottom: 0;
+ margin-top: 0;
+ margin-bottom: -6px;
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 0;
+ }
+ .dropdown-menu-right .dropdown-submenu .dropdown-menu,
+ .navbar-right .dropdown-submenu .dropdown-menu {
+ left: auto;
+ right: 100%;
+ border-top-left-radius: 4px;
+ border-top-right-radius: 0;
+ }
+ .dropup .dropdown-menu-right .dropdown-submenu .dropdown-menu,
+ .dropup .navbar-right .dropdown-submenu .dropdown-menu,
+ .navbar-fixed-bottom .dropdown-menu-right .dropdown-submenu .dropdown-menu,
+ .navbar-fixed-bottom .navbar-right .dropdown-submenu .dropdown-menu {
+ border-radius: 4px 4px 0;
+ }
+ .dropdown-submenu > a:after {
+ float: right;
+ margin-top: 6px;
+ margin-right: -10px;
+ border-left: 4px dashed;
+ border-top: 4px solid transparent;
+ border-bottom: 4px solid transparent;
+ }
+ .dropdown-menu-right .dropdown-submenu > a:after,
+ .navbar-right .dropdown-submenu > a:after {
+ float: left;
+ border-left: none;
+ margin-left: -10px;
+ margin-right: 0;
+ border-right: 4px dashed;
+ border-top: 4px solid transparent;
+ border-bottom: 4px solid transparent;
+ }
+}
+@media (max-width: 767px) {
+ .dropdown-submenu .dropdown-menu {
+ position: static;
+ margin-top: 0;
+ border: 0;
+ box-shadow: none;
+ }
+ .dropdown-submenu > a:after {
+ margin-left: 6px;
+ display: inline-block;
+ vertical-align: middle;
+ border-top: 4px dashed;
+ border-left: 4px solid transparent;
+ border-right: 4px solid transparent;
+ }
+ .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li.dropdown-header,
+ .dropup > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li.dropdown-header,
+ .btn-group > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li.dropdown-header,
+ .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > a,
+ .dropup > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > a,
+ .btn-group > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > a {
+ padding-left: 30px;
+ }
+ .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li.dropdown-header,
+ .dropup > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li.dropdown-header,
+ .btn-group > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li.dropdown-header,
+ .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > a,
+ .dropup > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > a,
+ .btn-group > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > a {
+ padding-left: 40px;
+ }
+ .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li.dropdown-header,
+ .dropup > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li.dropdown-header,
+ .btn-group > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li.dropdown-header,
+ .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > a,
+ .dropup > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > a,
+ .btn-group > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > a {
+ padding-left: 50px;
+ }
+ .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li.dropdown-header,
+ .dropup > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li.dropdown-header,
+ .btn-group > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li.dropdown-header,
+ .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > a,
+ .dropup > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > a,
+ .btn-group > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > a {
+ padding-left: 60px;
+ }
+ .navbar-nav > .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li.dropdown-header,
+ .navbar-nav > .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > a {
+ padding-left: 35px;
+ }
+ .navbar-nav > .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li.dropdown-header,
+ .navbar-nav > .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > a {
+ padding-left: 45px;
+ }
+ .navbar-nav > .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li.dropdown-header,
+ .navbar-nav > .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > a {
+ padding-left: 55px;
+ }
+ .navbar-nav > .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li.dropdown-header,
+ .navbar-nav > .dropdown > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > a {
+ padding-left: 65px;
+ }
+}
+/*# sourceMappingURL=bootstrap-submenu.css.map */
\ No newline at end of file
diff --git a/admportal/public/stylesheets/bootstrap-submenu.css.map b/admportal/public/stylesheets/bootstrap-submenu.css.map
new file mode 100644
index 0000000..4ab4300
--- /dev/null
+++ b/admportal/public/stylesheets/bootstrap-submenu.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["less/bootstrap-submenu.less","less/mixins.less"],"names":[],"mappings":"AAYA,iBAAkB,IAAG;EACnB,SAAS,EAAT;;AA2DF,QAxD2C;EACzC;IACE,kBAAA;;EADF,iBAGE;IACE,MAAA;IACA,UAAA;IACA,gBAAA;IACA,yBAAA;;EAGA,OAAQ,kBAPV;EAQE,oBAAqB,kBARvB;IASI,SAAA;IACA,SAAA;IACA,aAAA;IACA,mBAAA;IACA,2BAAA;IACA,4BAAA;;EAGF,oBAAqB,kBAjBvB;EAkBE,aAAc,kBAlBhB;IAmBI,UAAA;IACA,WAAA;IAEA,2BAAA;IACA,0BAAA;;EAEA,OAAQ,qBARW,kBAjBvB;EAyBI,OAAQ,cAPI,kBAlBhB;EA0BI,oBAAqB,qBATF,kBAjBvB;EA0BI,oBAAqB,cART,kBAlBhB;IA2BM,wBAAA;;EA9BR,iBAmCE,IAAG;IACD,YAAA;IACA,eAAA;IACA,mBAAA;ICrDJ,uBAAA;IAEA,iCAAA;IACA,oCAAA;;EDsDI,oBAAqB,kBAPvB,IAAG;EAQD,aAAc,kBARhB,IAAG;IASC,WAAA;IACA,iBAAA;IACA,kBAAA;IACA,eAAA;IC9DN,wBAAA;IAEA,iCAAA;IACA,oCAAA;;;ADiGF,QA9B+C;EAC7C,iBACE;IACE,gBAAA;IACA,aAAA;IACA,SAAA;IACA,gBAAA;;EALJ,iBAQE,IAAG;IACD,gBAAA;IACA,qBAAA;IACA,sBAAA;IClFJ,sBAAA;IAEA,kCAAA;IACA,mCAAA;;EAKE,SDiFU,iBADG,oBCjFf,iBAAiB,KACd;EAAD,ODkFQ,iBAFK,oBCjFf,iBAAiB,KACd;EAAD,UDmFW,iBAHE,oBCjFf,iBAAiB,KACd;EDiFD,SAAU,iBADG,oBCjFf,iBAAiB,KAEf;EDiFA,OAAQ,iBAFK,oBCjFf,iBAAiB,KAEf;EDkFA,UAAW,iBAHE,oBCjFf,iBAAiB,KAEf;IACE,kBAAA;;EAFF,SDiFU,iBADG,oBCjFf,iBAAiB,KAAjB,iBAAiB,KACd;EAAD,ODkFQ,iBAFK,oBCjFf,iBAAiB,KAAjB,iBAAiB,KACd;EAAD,UDmFW,iBAHE,oBCjFf,iBAAiB,KAAjB,iBAAiB,KACd;EDiFD,SAAU,iBADG,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAEf;EDiFA,OAAQ,iBAFK,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAEf;EDkFA,UAAW,iBAHE,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAEf;IACE,kBAAA;;EAFF,SDiFU,iBADG,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KACd;EAAD,ODkFQ,iBAFK,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KACd;EAAD,UDmFW,iBAHE,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KACd;EDiFD,SAAU,iBADG,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAEf;EDiFA,OAAQ,iBAFK,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAEf;EDkFA,UAAW,iBAHE,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAEf;IACE,kBAAA;;EAFF,SDiFU,iBADG,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KACd;EAAD,ODkFQ,iBAFK,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KACd;EAAD,UDmFW,iBAHE,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KACd;EDiFD,SAAU,iBADG,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAEf;EDiFA,OAAQ,iBAFK,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAEf;EDkFA,UAAW,iBAHE,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAEf;IACE,kBAAA;;EAFF,WDuFY,YAAY,iBAPX,oBCjFf,iBAAiB,KACd;EDuFD,WAAY,YAAY,iBAPX,oBCjFf,iBAAiB,KAEf;IACE,kBAAA;;EAFF,WDuFY,YAAY,iBAPX,oBCjFf,iBAAiB,KAAjB,iBAAiB,KACd;EDuFD,WAAY,YAAY,iBAPX,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAEf;IACE,kBAAA;;EAFF,WDuFY,YAAY,iBAPX,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KACd;EDuFD,WAAY,YAAY,iBAPX,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAEf;IACE,kBAAA;;EAFF,WDuFY,YAAY,iBAPX,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KACd;EDuFD,WAAY,YAAY,iBAPX,oBCjFf,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAAjB,iBAAiB,KAEf;IACE,kBAAA","sourcesContent":["// :after: friends with IE8. Use ::after in future.\n\n@import \"../node_modules/bootstrap/less/variables.less\";\n@import \"mixins.less\";\n\n// Variables\n@caret-margin: -@caret-width-base * 2 - 2;\n\n//\n// Sub-Menus\n// --------------------------------------------------\n\n.dropdown-submenu > a:after {\n content: \"\";\n}\n\n@media (min-width: @grid-float-breakpoint) {\n .dropdown-submenu {\n position: relative;\n\n .dropdown-menu {\n top: 0;\n left: 100%;\n margin-top: -6px;\n border-top-left-radius: 0;\n\n // Strictly before .dropdown-menu-right\n .dropup &,\n .navbar-fixed-bottom & {\n top: auto;\n bottom: 0;\n margin-top: 0;\n margin-bottom: -6px;\n border-top-left-radius: @border-radius-base;\n border-bottom-left-radius: 0;\n }\n\n .dropdown-menu-right &,\n .navbar-right & {\n left: auto;\n right: 100%;\n\n border-top-left-radius: @border-radius-base;\n border-top-right-radius: 0;\n\n .dropup &,\n .navbar-fixed-bottom & {\n border-radius: @border-radius-base @border-radius-base 0;\n }\n }\n }\n\n > a:after {\n float: right;\n margin-top: @line-height-computed / 2 - @caret-width-base;\n margin-right: @caret-margin;\n\n .make-caret(left, top, bottom);\n\n .dropdown-menu-right &,\n .navbar-right & {\n float: left;\n border-left: none;\n margin-left: @caret-margin;\n margin-right: 0;\n\n .make-caret(right, top, bottom);\n }\n }\n }\n}\n\n@media (max-width: @grid-float-breakpoint-max) {\n .dropdown-submenu {\n .dropdown-menu {\n position: static;\n margin-top: 0;\n border: 0;\n box-shadow: none;\n }\n\n > a:after {\n margin-left: 6px;\n display: inline-block;\n vertical-align: middle;\n\n .make-caret(top, left, right);\n }\n }\n\n .dropdown-menu > .dropdown-submenu {\n .dropdown > &,\n .dropup > &,\n .btn-group > & {\n .make-nested-list(30px, 0, 4);\n }\n\n .navbar-nav > .dropdown > & {\n .make-nested-list(35px, 0, 4);\n }\n }\n}\n",".make-caret(@base, @left, @right) {\n // dashed: fix caret size for Mozilla Firefox\n border-@{base}: @caret-width-base dashed;\n\n border-@{left}: @caret-width-base solid transparent;\n border-@{right}: @caret-width-base solid transparent;\n}\n\n.make-nested-list(@offset, @i, @n) when (@i < @n) {\n > .dropdown-menu > li {\n &.dropdown-header,\n > a {\n padding-left: @offset + (10 * @i);\n }\n\n .make-nested-list(@offset, @i + 1, @n);\n }\n}\n"]}
\ No newline at end of file
diff --git a/admportal/public/stylesheets/bootstrap-submenu.min.css b/admportal/public/stylesheets/bootstrap-submenu.min.css
new file mode 100644
index 0000000..7199e0d
--- /dev/null
+++ b/admportal/public/stylesheets/bootstrap-submenu.min.css
@@ -0,0 +1,8 @@
+/*!
+ * Bootstrap-submenu v2.0.3 (https://vsn4ik.github.io/bootstrap-submenu/)
+ * Copyright 2015 Vasily A. (https://github.com/vsn4ik)
+ * Licensed under the MIT license
+ */
+
+.dropdown-submenu>a:after{content:""}@media (min-width:768px){.dropdown-submenu{position:relative}.dropdown-submenu .dropdown-menu{top:0;left:100%;margin-top:-6px;border-top-left-radius:0}.dropup .dropdown-submenu .dropdown-menu,.navbar-fixed-bottom .dropdown-submenu .dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-6px;border-top-left-radius:4px;border-bottom-left-radius:0}.dropdown-menu-right .dropdown-submenu .dropdown-menu,.navbar-right .dropdown-submenu .dropdown-menu{left:auto;right:100%;border-top-left-radius:4px;border-top-right-radius:0}.dropup .dropdown-menu-right .dropdown-submenu .dropdown-menu,.dropup .navbar-right .dropdown-submenu .dropdown-menu,.navbar-fixed-bottom .dropdown-menu-right .dropdown-submenu .dropdown-menu,.navbar-fixed-bottom .navbar-right .dropdown-submenu .dropdown-menu{border-radius:4px 4px 0}.dropdown-submenu>a:after{float:right;margin-top:6px;margin-right:-10px;border-left:4px dashed;border-top:4px solid transparent;border-bottom:4px solid transparent}.dropdown-menu-right .dropdown-submenu>a:after,.navbar-right .dropdown-submenu>a:after{float:left;border-left:none;margin-left:-10px;margin-right:0;border-right:4px dashed;border-top:4px solid transparent;border-bottom:4px solid transparent}}@media (max-width:767px){.dropdown-submenu .dropdown-menu{position:static;margin-top:0;border:0;box-shadow:none}.dropdown-submenu>a:after{margin-left:6px;display:inline-block;vertical-align:middle;border-top:4px dashed;border-left:4px solid transparent;border-right:4px solid transparent}.btn-group>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li.dropdown-header,.btn-group>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>a,.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li.dropdown-header,.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>a,.dropup>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li.dropdown-header,.dropup>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>a{padding-left:30px}.btn-group>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li.dropdown-header,.btn-group>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>a,.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li.dropdown-header,.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>a,.dropup>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li.dropdown-header,.dropup>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>a{padding-left:40px}.btn-group>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li.dropdown-header,.btn-group>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>a,.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li.dropdown-header,.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>a,.dropup>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li.dropdown-header,.dropup>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>a{padding-left:50px}.btn-group>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li.dropdown-header,.btn-group>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>a,.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li.dropdown-header,.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>a,.dropup>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li.dropdown-header,.dropup>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>a{padding-left:60px}.navbar-nav>.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li.dropdown-header,.navbar-nav>.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>a{padding-left:35px}.navbar-nav>.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li.dropdown-header,.navbar-nav>.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>a{padding-left:45px}.navbar-nav>.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li.dropdown-header,.navbar-nav>.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>a{padding-left:55px}.navbar-nav>.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li.dropdown-header,.navbar-nav>.dropdown>.dropdown-menu>.dropdown-submenu>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>.dropdown-menu>li>a{padding-left:65px}}
+/*# sourceMappingURL=bootstrap-submenu.min.css.map */
\ No newline at end of file
diff --git a/admportal/public/stylesheets/bootstrap-submenu.min.css.map b/admportal/public/stylesheets/bootstrap-submenu.min.css.map
new file mode 100644
index 0000000..6eab8c7
--- /dev/null
+++ b/admportal/public/stylesheets/bootstrap-submenu.min.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["less/bootstrap-submenu.less","less/mixins.less"],"names":[],"mappings":"AAYqB,0BACnB,QAAA,GAGyC,yBACzC,kBACE,SAAA,SAEA,iCACE,IAAA,EACA,KAAA,KACA,WAAA,KACA,uBAAA,EAJF,yCAAA,sDASI,IAAA,KACA,OAAA,EACA,WAAA,EACA,cAAA,KACA,uBAAA,IACA,0BAAA,EAdJ,sDAAA,+CAmBI,KAAA,KACA,MAAA,KAEA,uBAAA,IACA,wBAAA,EAvBJ,8DAAA,uDAAA,2EAAA,oEA2BM,cAAA,IAAA,IAAA,EAKH,0BACD,MAAA,MACA,WAAA,IACA,aAAA,MCrDJ,YAAA,IAAA,OAEA,WAAA,IAAA,MAAA,YACA,cAAA,IAAA,MAAA,YD+CK,+CAAA,wCASC,MAAA,KACA,YAAA,KACA,YAAA,MACA,aAAA,EC9DN,aAAA,IAAA,OAEA,WAAA,IAAA,MAAA,YACA,cAAA,IAAA,MAAA,aDmE6C,yBAE3C,iCACE,SAAA,OACA,WAAA,EACA,OAAA,EACA,WAAA,KAGC,0BACD,YAAA,IACA,QAAA,aACA,eAAA,OClFJ,WAAA,IAAA,OAEA,YAAA,IAAA,MAAA,YACA,aAAA,IAAA,MAAA,YAKG,8EACD,gEADC,6EACD,+DADC,2EACD,6DACE,aAAA,KAFD,gGACD,kFADC,+FACD,iFADC,6FACD,+EACE,aAAA,KAFD,kHACD,oGADC,iHACD,mGADC,+GACD,iGACE,aAAA,KAFD,oIACD,sHADC,mIACD,qHADC,iIACD,mHACE,aAAA,KAFD,yFACD,2EACE,aAAA,KAFD,2GACD,6FACE,aAAA,KAFD,6HACD,+GACE,aAAA,KAFD,+IACD,iIACE,aAAA"}
\ No newline at end of file
diff --git a/admportal/public/stylesheets/bootstrap-table.css b/admportal/public/stylesheets/bootstrap-table.css
new file mode 100644
index 0000000..66d5631
--- /dev/null
+++ b/admportal/public/stylesheets/bootstrap-table.css
@@ -0,0 +1,297 @@
+/**
+ * @author zhixin wen <wenzhixin2010@gmail.com>
+ * version: 1.8.1
+ * https://github.com/wenzhixin/bootstrap-table/
+ */
+
+.bootstrap-table .table {
+ margin-bottom: 0 !important;
+ border-bottom: 1px solid #dddddd;
+ border-collapse: collapse !important;
+ border-radius: 1px;
+}
+
+.bootstrap-table .table:not(.table-condensed),
+.bootstrap-table .table:not(.table-condensed) > tbody > tr > th,
+.bootstrap-table .table:not(.table-condensed) > tfoot > tr > th,
+.bootstrap-table .table:not(.table-condensed) > thead > tr > td,
+.bootstrap-table .table:not(.table-condensed) > tbody > tr > td,
+.bootstrap-table .table:not(.table-condensed) > tfoot > tr > td {
+ padding: 8px !important;
+}
+
+.bootstrap-table .table.table-no-bordered > thead > tr > th,
+.bootstrap-table .table.table-no-bordered > tbody > tr > td {
+ border-right: 2px solid transparent;
+}
+
+.fixed-table-container {
+ position: relative;
+ clear: both;
+ border: 1px solid #dddddd;
+ border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+}
+
+.fixed-table-container.table-no-bordered {
+ border: 1px solid transparent;
+}
+
+.fixed-table-footer,
+.fixed-table-header {
+ overflow: hidden;
+}
+
+.fixed-table-footer {
+ border-top: 1px solid #dddddd;
+}
+
+.fixed-table-body {
+ overflow-x: auto;
+ overflow-y: auto;
+ height: 100%;
+}
+
+.fixed-table-container table {
+ width: 100%;
+}
+
+.fixed-table-container thead th {
+ height: 0;
+ padding: 0;
+ margin: 0;
+ border-left: 1px solid #dddddd;
+}
+
+.fixed-table-container thead th:first-child {
+ border-left: none;
+ border-top-left-radius: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topleft: 4px;
+}
+
+.fixed-table-container thead th .th-inner,
+.fixed-table-container tbody td .th-inner {
+ padding: 8px;
+ line-height: 24px;
+ vertical-align: top;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.fixed-table-container thead th .sortable {
+ cursor: pointer;
+ background-position: right;
+ background-repeat: no-repeat;
+ padding-right: 30px;
+}
+
+.fixed-table-container thead th .both {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC');
+}
+
+.fixed-table-container thead th .asc {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==');
+}
+
+.fixed-table-container thead th .desc {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= ');
+}
+
+.fixed-table-container th.detail {
+ width: 30px;
+}
+
+.fixed-table-container tbody td {
+ border-left: 1px solid #dddddd;
+}
+
+.fixed-table-container tbody tr:first-child td {
+ border-top: none;
+}
+
+.fixed-table-container tbody td:first-child {
+ border-left: none;
+}
+
+/* the same color with .active */
+.fixed-table-container tbody .selected td {
+ background-color: #f5f5f5;
+}
+
+.fixed-table-container .bs-checkbox {
+ text-align: center;
+}
+
+.fixed-table-container .bs-checkbox .th-inner {
+ padding: 8px 0;
+}
+
+.fixed-table-container input[type="radio"],
+.fixed-table-container input[type="checkbox"] {
+ margin: 0 auto !important;
+}
+
+.fixed-table-container .no-records-found {
+ text-align: center;
+}
+
+.fixed-table-pagination div.pagination,
+.fixed-table-pagination .pagination-detail {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+
+.fixed-table-pagination div.pagination .pagination {
+ margin: 0;
+}
+
+.fixed-table-pagination .pagination a {
+ padding: 6px 12px;
+ line-height: 1.428571429;
+}
+
+.fixed-table-pagination .pagination-info {
+ line-height: 34px;
+ margin-right: 5px;
+}
+
+.fixed-table-pagination .btn-group {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.fixed-table-pagination .dropup .dropdown-menu {
+ margin-bottom: 0;
+}
+
+.fixed-table-pagination .page-list {
+ display: inline-block;
+}
+
+.fixed-table-toolbar .columns-left {
+ margin-right: 5px;
+}
+
+.fixed-table-toolbar .columns-right {
+ margin-left: 5px;
+}
+
+.fixed-table-toolbar .columns label {
+ display: block;
+ padding: 3px 20px;
+ clear: both;
+ font-weight: normal;
+ line-height: 1.428571429;
+}
+
+.fixed-table-toolbar .bars,
+.fixed-table-toolbar .search,
+.fixed-table-toolbar .columns {
+ position: relative;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ line-height: 34px;
+}
+
+.fixed-table-pagination li.disabled a {
+ pointer-events: none;
+ cursor: default;
+}
+
+.fixed-table-loading {
+ display: none;
+ position: absolute;
+ top: 42px;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 99;
+ background-color: #fff;
+ text-align: center;
+}
+
+.fixed-table-body .card-view .title {
+ font-weight: bold;
+ display: inline-block;
+ min-width: 30%;
+ text-align: left !important;
+}
+
+/* support bootstrap 2 */
+.fixed-table-body thead th .th-inner {
+ box-sizing: border-box;
+}
+
+.table th, .table td {
+ vertical-align: middle;
+ box-sizing: border-box;
+}
+
+.fixed-table-toolbar .dropdown-menu {
+ text-align: left;
+ max-height: 300px;
+ overflow: auto;
+}
+
+.fixed-table-toolbar .btn-group > .btn-group {
+ display: inline-block;
+ margin-left: -1px !important;
+}
+
+.fixed-table-toolbar .btn-group > .btn-group > .btn {
+ border-radius: 0;
+}
+
+.fixed-table-toolbar .btn-group > .btn-group:first-child > .btn {
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+}
+
+.fixed-table-toolbar .btn-group > .btn-group:last-child > .btn {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+}
+
+.bootstrap-table .table > thead > tr > th {
+ vertical-align: bottom;
+ border-bottom: 1px solid #ddd;
+}
+
+/* support bootstrap 3 */
+.bootstrap-table .table thead > tr > th {
+ padding: 0;
+ margin: 0;
+}
+
+.bootstrap-table .fixed-table-footer tbody > tr > td {
+ padding: 0 !important;
+}
+
+.bootstrap-table .fixed-table-footer .table {
+ border-bottom: none;
+ border-radius: 0;
+}
+
+.pull-right .dropdown-menu {
+ right: 0;
+ left: auto;
+}
+
+/* calculate scrollbar width */
+p.fixed-table-scroll-inner {
+ width: 100%;
+ height: 200px;
+}
+
+div.fixed-table-scroll-outer {
+ top: 0;
+ left: 0;
+ visibility: hidden;
+ width: 200px;
+ height: 150px;
+ overflow: hidden;
+}
diff --git a/admportal/public/stylesheets/bootstrap-theme.min.css b/admportal/public/stylesheets/bootstrap-theme.min.css
new file mode 100644
index 0000000..dc95d8e
--- /dev/null
+++ b/admportal/public/stylesheets/bootstrap-theme.min.css
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
+/*# sourceMappingURL=bootstrap-theme.min.css.map */
\ No newline at end of file
diff --git a/admportal/public/stylesheets/bootstrap.min.css b/admportal/public/stylesheets/bootstrap.min.css
new file mode 100644
index 0000000..4cf729e
--- /dev/null
+++ b/admportal/public/stylesheets/bootstrap.min.css
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
+/*# sourceMappingURL=bootstrap.min.css.map */
\ No newline at end of file
diff --git a/admportal/public/stylesheets/dataTables.bootstrap.min.css b/admportal/public/stylesheets/dataTables.bootstrap.min.css
new file mode 100644
index 0000000..745f299
--- /dev/null
+++ b/admportal/public/stylesheets/dataTables.bootstrap.min.css
@@ -0,0 +1 @@
+table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:8px;right:8px;display:block;font-family:'Glyphicons Halflings';opacity:0.5}table.dataTable thead .sorting:after{opacity:0.2;content:"\e150"}table.dataTable thead .sorting_asc:after{content:"\e155"}table.dataTable thead .sorting_desc:after{content:"\e156"}table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{color:#eee}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table thead .sorting:after,div.dataTables_scrollBody table thead .sorting_asc:after,div.dataTables_scrollBody table thead .sorting_desc:after{display:none}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-condensed>thead>tr>th{padding-right:20px}table.dataTable.table-condensed .sorting:after,table.dataTable.table-condensed .sorting_asc:after,table.dataTable.table-condensed .sorting_desc:after{top:6px;right:6px}table.table-bordered.dataTable{border-collapse:separate !important}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0}
diff --git a/admportal/public/stylesheets/jquery.treegrid.css b/admportal/public/stylesheets/jquery.treegrid.css
new file mode 100644
index 0000000..b5bf0de
--- /dev/null
+++ b/admportal/public/stylesheets/jquery.treegrid.css
@@ -0,0 +1,6 @@
+.treegrid-indent {width:16px; height: 16px; display: inline-block; position: relative;}
+
+.treegrid-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;}
+
+.treegrid-expander-expanded{background-image: url(../img/collapse.png); }
+.treegrid-expander-collapsed{background-image: url(../img/expand.png);}
diff --git a/admportal/public/stylesheets/signin.css b/admportal/public/stylesheets/signin.css
new file mode 100644
index 0000000..995df48
--- /dev/null
+++ b/admportal/public/stylesheets/signin.css
@@ -0,0 +1,40 @@
+body {
+ padding-top: 40px;
+ padding-bottom: 40px;
+ background-color: #eee;
+}
+
+.form-signin {
+ max-width: 330px;
+ padding: 15px;
+ margin: 0 auto;
+}
+.form-signin .form-signin-heading,
+.form-signin .checkbox {
+ margin-bottom: 10px;
+}
+.form-signin .checkbox {
+ font-weight: normal;
+}
+.form-signin .form-control {
+ position: relative;
+ height: auto;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ padding: 10px;
+ font-size: 16px;
+}
+.form-signin .form-control:focus {
+ z-index: 2;
+}
+.form-signin input[type="email"] {
+ margin-bottom: -1px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.form-signin input[type="password"] {
+ margin-bottom: 10px;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
diff --git a/admportal/public/stylesheets/style.css b/admportal/public/stylesheets/style.css
new file mode 100644
index 0000000..30e047d
--- /dev/null
+++ b/admportal/public/stylesheets/style.css
@@ -0,0 +1,8 @@
+body {
+ padding: 50px;
+ font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
+}
+
+a {
+ color: #00B7FF;
+}
\ No newline at end of file
diff --git a/admportal/routes/index.js b/admportal/routes/index.js
new file mode 100644
index 0000000..896c948
--- /dev/null
+++ b/admportal/routes/index.js
@@ -0,0 +1,9 @@
+var express = require('express');
+var router = express.Router();
+
+/* GET home page. */
+router.get('/', function(req, res) {
+ res.render('index', { title: 'Express' });
+});
+
+module.exports = router;
diff --git a/admportal/routes/users.js b/admportal/routes/users.js
new file mode 100644
index 0000000..c00d7de
--- /dev/null
+++ b/admportal/routes/users.js
@@ -0,0 +1,9 @@
+var express = require('express');
+var router = express.Router();
+
+/* GET users listing. */
+router.get('/', function(req, res) {
+ res.send('respond with a resource');
+});
+
+module.exports = router;
diff --git a/admportal/server/adminPortal.db b/admportal/server/adminPortal.db
new file mode 100644
index 0000000..18429e4
--- /dev/null
+++ b/admportal/server/adminPortal.db
Binary files differ
diff --git a/admportal/server/app.js b/admportal/server/app.js
new file mode 100644
index 0000000..33cdb64
--- /dev/null
+++ b/admportal/server/app.js
@@ -0,0 +1,69 @@
+var express = require('express');
+var app = express();
+var path = require('path');
+var session = require('express-session');
+var cookieParser = require('cookie-parser');
+var bodyParser = require('body-parser');
+var PropertiesReader = require('properties-reader');
+var properties = PropertiesReader(process.argv[2]); //property file passed
+var morgan = require('morgan');
+var _ = require('lodash');
+//var multer = require('multer');
+//var done=false;
+
+// Check to make sure SDNC_CONFIG_DIR is set
+var sdnc_config_dir = process.env.SDNC_CONFIG_DIR;
+if ( typeof sdnc_config_dir == 'undefined' )
+{
+ console.log('ERROR the SDNC_CONFIG_DIR environmental variable is not set.');
+ return;
+}
+
+
+var moptions = { "stream":
+{
+ write: function(str)
+ {
+ if ( str.indexOf("/javascript") == -1 && str.indexOf("/stylesheets") == -1)
+ {
+ console.log(str);
+ }
+ }
+}
+};
+var accesslog = morgan( "|:method|HTTP/:http-version|:status|:url - requestIP-:remote-addr", moptions);
+
+//var favicon = require('serve-favicon');
+
+// initialize session objects
+app.use(session({
+ secret:'SDN7C',
+ resave: false,
+ saveUninitialized: false
+}));
+
+app.use(cookieParser());
+app.use(bodyParser.urlencoded({
+ extended: true
+}));
+
+app.use(accesslog); // http access log
+app.use(express.static(process.cwd() + '/public')); // static files
+
+
+//app.use('trust proxy', true);
+app.enable('trust proxy');
+
+// view engine setup
+app.set('views', path.join(__dirname, '../views'));
+app.set('view engine', 'ejs');
+
+
+var router = require('./router')(app);
+
+// Error Handling
+app.use(function(err,req,res,next) {
+ res.status(err.status || 500);
+});
+
+module.exports = app;
diff --git a/admportal/server/netdb_updater.js b/admportal/server/netdb_updater.js
new file mode 100644
index 0000000..6dde27b
--- /dev/null
+++ b/admportal/server/netdb_updater.js
@@ -0,0 +1,749 @@
+var log4js = require('log4js');
+var http = require('http');
+var async = require('async');
+var properties = require(process.env.SDNC_CONFIG_DIR + '/netdb-updater.json');
+var admProperties = require(process.env.SDNC_CONFIG_DIR + '/admportal.json');
+var csvtojson = require('csvtojson');
+var mysql = require('mysql');
+var moment = require('moment');
+var os = require('os');
+var fs = require('fs.extra');
+
+// Check to make sure SDNC_CONFIG_DIR is set
+var sdnc_config_dir = process.env.SDNC_CONFIG_DIR;
+if ( typeof sdnc_config_dir == 'undefined' )
+{
+ console.log('ERROR the SDNC_CONFIG_DIR environmental variable is not set.');
+ return;
+}
+
+// SETUP LOGGER
+log4js.configure(process.env.SDNC_CONFIG_DIR + '/netdb.log4js.json');
+var logger = log4js.getLogger('netdb');
+logger.setLevel(properties.netdbLogLevel);
+
+var yargs = require('yargs')
+ .usage("\nUsage: node netdb_updater -t link_master|router_master")
+ .demand('t')
+ .alias('t', 'table')
+ .example("Example: node netdb_updater -t link_master","Update SDNC LINK_MASTER table from NetDB.")
+ .argv;
+
+var dbTable = yargs.table;
+var debug = properties.netdbDebug;
+var env = properties.netdbEnv;
+var retSuccess = false;
+
+// DB Setup
+var currentDB = '';
+var dbConnection = '';
+var db01 = '';
+var db02 = '';
+var count = 0;
+var errorMsg = [];
+
+var dbtasks = [];
+dbtasks.push( function(callback) { checkParams(callback); } );
+dbtasks.push( function(callback) { dbConnect(callback); } );
+//dbtasks.push( function(callback) { netdb(callback); } );
+
+logger.debug('\n\n********** START PROCESSING - Env=' + env + ' Debug=' + debug + ' **********');
+
+async.series(dbtasks, function(err,result){
+ if(err) {
+ logger.error(err + ' COUNT: ' + count);
+ }
+ else {
+ if ( errorMsg.length > 0 ){
+ logger.error(errorMsg);
+ }
+ }
+});
+
+
+function checkParams(scb){
+ if ( dbTable != 'link_master' && dbTable != 'router_master' ){
+ scb("Invalid parameter passed in '" + dbTable + " ' exiting.'");
+ }
+ else{
+ scb(null);
+ }
+}
+
+
+async.whilst(
+ function () { return count < properties.netdbRetryInterval },
+ function (callback) {
+ if ( dbTable == 'link_master' ){
+ getLinkMaster(callback);
+ }
+ else if (dbTable == 'router_master'){
+ getRouterMaster(callback);
+ }
+ else{ // should never hit this condition
+ logger.debug("Invalid parameter passed in '" + dbTable + " ' exiting.'");
+ }
+ },
+ function (err) {
+logger.debug('whilst err function errorMsg = ' + errorMsg);
+ // report error
+ if ( errorMsg.length > 0 ){
+ logger.debug(errorMsg + ' COUNT: ' + count);
+ process.exit(1);
+ }
+ else{
+ logger.debug('success');
+ process.exit(0);
+ }
+ }
+);
+
+
+function returnError(emsg, cb){
+ retSuccess=false;
+ errorMsg.push(emsg);
+ if ( count == properties.netdbRetryInterval ) { logger.error(errorMsg); }
+ setTimeout( function(){
+ cb(null);
+ }, properties.netdbWaitTime);
+}
+
+function returnSuccess(cb){
+logger.debug('inside returnSuccess');
+ errorMsg = '';
+ //var cnt = properties.netdbRetryInterval;
+ //logger.debug('b4 inc returnSuccess count=' + count);
+ //count = ++cnt;
+ //logger.debug('after inc returnSuccess count=' + count);
+ //cb(null);
+ retSuccess=true;
+process.exit(0);
+}
+
+function getRouterMaster(cb){
+
+ logger.info('getRouterMaster debug=' + debug + ' count=' + count);
+
+ // setup connection
+ var netdbEnv = properties.netdbEnv;
+ var auth_param = '';
+ if ( netdbEnv == 'e2e' || netdbEnv == 'prod' ){
+ // conexus network
+ auth_param = '?auth=' + admProperties['ip-addresses']['eth2'] + ';'
+ }else{
+ // app network
+ auth_param = '?auth=' + admProperties['ip-addresses']['eth1:0'] + ';'
+ }
+ var username = properties.netdbUser;;
+ var password = properties.netdbPassword;
+ var date = moment().format('YYYYMMDD');
+ var auth = 'Basic ' + new Buffer(username + ':' + password).toString('base64');
+ var host = properties.netdbHost;
+ var port = properties.netdbPort;
+ var path = '/' + properties.netdbPath
+ + '/' + properties.netdbNetwork
+ + '/' + properties.netdbApiName
+ + auth_param
+ + 'client=' + properties.netdbClientName + ';'
+ + 'date=' + date + ';'
+ + 'reportName=' + dbTable + ';'
+ + 'type=' + properties.netdbType;
+
+ var header = { 'Content-Type': 'text/csv' };
+ //var header = {'Host': host, 'Authorization': auth, 'Content-Type': 'text/csv' };
+ var options = {
+ method : "GET",
+ path : path,
+ host : host,
+ port : port,
+ headers : header
+ };
+
+ logger.debug('options:\n' + JSON.stringify(options,null,2));
+
+ var request = http.request(options, function(response) {
+
+ var response_str = '';
+ if ( retSuccess == true ){
+ var cnt = properties.netdbRetryInterval;
+ count = ++cnt;
+ }
+ else{
+ count++;
+ }
+
+ logger.debug('STATUS: ' + response.statusCode + ' content-type=' + response.headers['content-type']);
+
+ // Read the response from ODL side
+ response.on('data', function(chunk) {
+ response_str += chunk;
+ });
+
+ response.on('end', function() {
+
+ logger.debug('HEADERS:' + JSON.stringify(response.headers));
+
+ if(response.statusCode == 200){
+
+ if(response_str.length > 0){
+
+ // save the upload
+ try{
+ fs.writeFileSync('/sdncvar/sdnc/files/netdb-updater/' + moment().unix() + ".netdb." + dbTable + '.csv', response_str);
+ }
+ catch(e){
+ // this is not in reqs, if it fails keep on going.
+ logger.error('Error writing NetDB file:' + e);
+ }
+
+ if (response.headers['content-type'].indexOf('html') > 0){
+ returnError('Error:Unexpected content-type:' + response.headers['content-type'] + ' returned.\n', cb);
+ return;
+ }
+ // need to parse csv file
+ var Converter=csvtojson.Converter;
+ var csvConverter = new Converter({
+ noheader:true
+ });
+ var routerMasterSQL = '';
+
+ // end_parsed will be emitted once parsing is finished
+ csvConverter.on("end_parsed", function(respObj){
+
+ routerMasterSQL = routerMasterSQL.concat("INSERT INTO ROUTER_MASTER (crs_name, loopback_ip)");
+ for ( var x=0; x < respObj.length; x++ ){
+
+ if ( respObj[x].field1.length == 0 ){
+ returnError('Required field [crs_name] is null.', cb);
+ }
+
+ if (x!=0){
+ routerMasterSQL = routerMasterSQL.concat(' union ');
+ }
+ routerMasterSQL = routerMasterSQL.concat(" SELECT "
+ + "'" + respObj[x].field1 + "',"
+ + "'" + respObj[x].field2 + "' FROM DUAL ");
+ }
+ //logger.debug('SQL: ' + routerMasterSQL);
+
+ if (debug != 'debug' && env != 'dev'){
+
+ var tasks = [];
+ tasks.push( function(callback) { updateRouterMaster(routerMasterSQL,callback); } );
+ async.series(tasks, function(err,result){
+ if(err) {
+ returnError(err,cb);
+ return;
+ }
+ else {
+ logger.info('*** Router Master Table Replaced ***');
+ returnSuccess(cb);
+ return;
+ }
+ });
+ }
+ else{
+logger.debug('*** debug ***');
+ returnSuccess(cb);
+ return;
+ }
+
+ });
+ csvConverter.on("error",function(errMsg,errData){
+ returnError(errMsg,cb);
+ return;
+ });
+ csvConverter.fromString(response_str, function(err,result){
+ if(err){
+ returnError(err,cb);
+ return;
+ }
+ });
+ }
+ else{
+ //logger.debug("no data");
+ returnError('no data',cb);
+ return;
+ }
+ }
+ else if(response.statusCode == 404){
+ returnError('Router Master Table for ' + date + ' is not Available.',cb);
+ return;
+ }
+ else {
+ returnError('Status Code:' + response.statudCode + ' returned for Router Master Table query.',cb);
+ return;
+ }
+ });
+ });
+ request.on('error', function(e) {
+ if ( retSuccess == true ){
+ var cnt = properties.netdbRetryInterval;
+ count = ++cnt;
+ }
+ else{
+ count++;
+ }
+ returnError(e,cb);
+ return;
+ });
+ request.end();
+}
+
+function getLinkMaster(cb){
+
+ logger.info('getLinkMaster debug=' + debug + ' count=' + count);
+
+ // setup connection
+ var netdbEnv = properties.netdbEnv;
+ var auth_param = '';
+ if ( netdbEnv == 'e2e' || netdbEnv == 'prod' ){
+ // conexus network
+ auth_param = '?auth=' + admProperties['ip-addresses']['eth2'] + ';'
+ }else{
+ // app network
+ auth_param = '?auth=' + admProperties['ip-addresses']['eth1:0'] + ';'
+ }
+ var username = properties.netdbUser;;
+ var password = properties.netdbPassword;
+ var auth = 'Basic ' + new Buffer(username + ':' + password).toString('base64');
+ var host = properties.netdbHost;
+ var port = properties.netdbPort;
+ var date = moment().format('YYYYMMDD');
+ var path = '/' + properties.netdbPath
+ + '/' + properties.netdbNetwork
+ + '/' + properties.netdbApiName
+ + auth_param
+ + 'client=' + properties.netdbClientName + ';'
+ + 'date=' + date + ';'
+ + 'reportName=' + dbTable + ';'
+ + 'type=' + properties.netdbType;
+
+ var header = { 'Content-Type': 'text/csv' };
+ //var header = {'Host': host, 'Authorization': auth, 'Content-Type': 'text/csv' };
+ var options = {
+ method : "GET",
+ path : path,
+ host : host,
+ port : port,
+ headers : header
+ };
+
+ logger.debug('options:\n' + JSON.stringify(options,null,2));
+
+ var request = http.request(options, function(response) {
+
+ logger.debug('STATUS: ' + response.statusCode + ' content-type=' + response.headers['content-type']);
+
+ if ( retSuccess == true ){
+ var cnt = properties.netdbRetryInterval;
+ count = ++cnt;
+ }
+ else{
+ count++
+ }
+
+ var response_str = '';
+
+ // Read the response from ODL side
+ response.on('data', function(chunk) {
+ response_str += chunk;
+ });
+
+ response.on('end', function() {
+
+ logger.debug('HEADERS:' + JSON.stringify(response.headers));
+
+ if(response.statusCode == 200){
+
+ if(response_str.length > 0){
+
+ //logger.debug('response_str=' + response_str);
+ // save the upload
+ try{
+ fs.writeFileSync('/sdncvar/sdnc/files/netdb-updater/' + moment().unix() + ".netdb." + dbTable + '.csv', response_str);
+ }
+ catch(e){
+ // this is not in reqs, if it fails keep on going.
+ logger.error('Error writing NetDB file:' + e);
+ }
+
+ if (response.headers['content-type'].indexOf('html') > 0){
+ returnError('Error:Unexpected content-type:' + response.headers['content-type'] + ' returned.\n', cb);
+ return;
+ }
+ // need to parse csv file
+ var Converter=csvtojson.Converter;
+ var csvConverter = new Converter({
+ noheader:true
+ });
+
+ var linkMasterSQL = '';
+
+ // end_parsed will be emitted once parsing is finished
+ csvConverter.on("end_parsed", function(jsonObj){
+
+ linkMasterSQL = linkMasterSQL.concat("INSERT INTO LINK_MASTER (link_interface_ip, source_crs_name, destination_crs_name, link_speed, default_cost, bundle_name, shutdown)");
+ for ( var x=0; x < jsonObj.length; x++ ){
+ if ( jsonObj[x].field1.length == 0 ){
+ returnError('Required field [link_interface_ip] is null.', cb);
+ return;
+ }
+ if ( jsonObj[x].field2.length == 0 ){
+ returnError('Required field [source_crs_name] is null.', cb);
+ return;
+ }
+ if ( jsonObj[x].field3.length == 0 ){
+ returnError('Required field [destination_crs_name] is null.', cb);
+ return;
+ }
+ if (x!=0){
+ linkMasterSQL = linkMasterSQL.concat(' union ');
+ }
+
+ linkMasterSQL = linkMasterSQL.concat(" SELECT "
+ + "'" + jsonObj[x].field1 + "',"
+ + "'" + jsonObj[x].field2 + "',"
+ + "'" + jsonObj[x].field3 + "',"
+ + jsonObj[x].field4 + ","
+ + jsonObj[x].field5 + ","
+ + "'" + jsonObj[x].field6 + "',"
+ + "'" + jsonObj[x].field7 + "' FROM DUAL");
+ }
+ //logger.debug('SQL: ' + linkMasterSQL);
+
+ if (debug != 'debug' && env != 'dev'){
+ // update db
+ var tasks = [];
+ tasks.push( function(callback) { updateLinkMaster(linkMasterSQL,callback); } );
+ async.series(tasks, function(err,result){
+ if(err)
+ {
+ returnError(err,cb);
+ return;
+ }
+ else
+ {
+ logger.info('*** Link Master Table Replaced ***');
+ returnSuccess(cb);
+ return;
+ }
+ });
+ }
+ else{
+ returnSuccess(cb);
+ return;
+ }
+ });
+ csvConverter.on("error",function(errMsg,errData){
+ returnError(errMsg,cb);
+ return;
+ });
+ csvConverter.fromString(response_str, function(err,result){
+ if(err){
+ returnError(errMsg,cb);
+ return;
+ }
+ });
+ }
+ else{
+ returnError('no data',cb);
+ return;
+ }
+ }
+ else if(response.statusCode == 404){
+ returnError('Link Master Table for ' + date + ' is not Available.',cb);
+ return;
+ }
+ else {
+ returnError('Status Code:' + response.statudCode + ' returned for Link Master Table query.',cb);
+ return;
+ }
+ });
+ });
+ request.on('error', function(e) {
+ if ( retSuccess == true ){
+ var cnt = properties.netdbRetryInterval;
+ count = ++cnt;
+ }
+ else{
+ count++
+ }
+ returnError(e,cb);
+ return;
+ });
+ request.end();
+}
+
+
+function dbConnect(callback){
+
+ var l_db01 = admProperties['databases']['0'];
+ var db01Array = l_db01.split("|");
+ db01 = db01Array[0];
+
+ var l_db02 = admProperties['databases']['1'];
+ var db02Array = l_db02.split("|");
+ db02 = db02Array[0];
+
+ if ( admProperties.dbFabric == 'true' )
+ {
+ logger.debug('connectFabric()');
+
+ // testing
+ var fabric_connection = mysql.createConnection({
+ host : admProperties.dbFabricServer,
+ user : admProperties.dbFabricUser,
+ password : admProperties.dbFabricPassword,
+ database : admProperties.dbFabricDB,
+ port : admProperties.dbFabricPort
+ });
+
+
+ fabric_connection.connect( function(err) {
+
+ if (err) {
+ callback(err);
+ return;
+ }
+ fabric_connection.query('CALL dump.servers()', function(err,rows) {
+
+ var masterDB = '';
+
+ if (err) {
+ callback(err);
+ return;
+ }
+ fabric_connection.end();
+ logger.debug('rows: ' + JSON.stringify(rows,null,2));
+
+ // fabric servers
+ for ( var x=0; x<rows.length; x++)
+ {
+ // database servers
+ for ( var y=0; y<rows[x].length; y++)
+ {
+ var row = rows[x][y];
+ if (row.group_id == admProperties.dbFabricGroupId)
+ {
+ if (row.status == '3' && row.mode == '3'){
+ masterDB = row.host;
+ }
+ }
+ }
+ }
+ logger.debug('currentDB: ' + currentDB);
+ logger.debug('masterDB: ' + masterDB);
+
+ if (masterDB.length <=0)
+ {
+ logger.debug('no writable master db');
+ callback('no writable master db');
+ return;
+ }
+
+ if ( currentDB != masterDB )
+ {
+ currentDB = masterDB;
+ dbConnection = mysql.createConnection({
+ connectionLimit : admProperties.dbConnLimit,
+ host : currentDB,
+ user : admProperties.dbUser,
+ password : admProperties.dbPassword,
+ database : admProperties.dbName,
+ multipleStatements: true,
+ debug : false
+ });
+ }
+ logger.debug('new currentDB: ' + currentDB);
+ logger.debug('new masterDB: ' + masterDB);
+ callback(null);
+ return;
+ });
+ fabric_connection.on('error', function(err){
+ logger.debug(err.code);
+ callback(err);
+ return;
+ });
+ });
+ }
+ else
+ {
+ currentDB = db01;
+
+ var dbConn = mysql.createConnection({
+ connectionLimit : admProperties.dbConnLimit,
+ host : currentDB,
+ user : admProperties.dbUser,
+ password : admProperties.dbPassword,
+ database : admProperties.dbName,
+ multipleStatements: true,
+ debug : false
+ });
+ logger.debug('initDB currentDB=' + currentDB);
+
+ dbConn.connect(function(err,connection){
+
+ if(err){
+ logger.debug( String(err) ); // ALARM
+ callback(err);
+ return;
+ }
+ var sql = 'select @@read_only';
+ dbConn.query(sql, function(err,result){
+ dbConn.end();
+
+ // @@read_only=0 means db is writable
+ logger.debug('@@read_only=' + result[0]['@@read_only']);
+ if ( result[0]['@@read_only'] != '0' )
+ {
+ if (currentDB == db01)
+ {
+ currentDB = db02;
+ }
+ else
+ {
+ currentDB = db01;
+ }
+logger.debug('initDB reconnect to currentDB '+ currentDB);
+ var newConnection = mysql.createConnection({
+ connectionLimit : admProperties.dbConnLimit,
+ host : currentDB,
+ user : admProperties.dbUser,
+ password : admProperties.dbPassword,
+ database : admProperties.dbName,
+ multipleStatements: true,
+ debug : false
+ }); // end create
+ dbConnection = newConnection;
+ callback(null);
+ return;
+ }
+ dbConnection = dbConn;
+ callback(null);
+ return;
+ });
+ });
+ }
+}
+
+function updateLinkMaster(linkMasterSQL,callback){
+
+logger.debug('updateLinkMaster');
+
+ dbConnection.connect(function(err,connection)
+ {
+ if(err){
+ logger.debug( String(err) ); // ALARM
+ callback(err, 'Unable to get database connection.');
+ return;
+ }
+ }); // end connection
+ dbConnection.beginTransaction(function(err) {
+ if(err){
+ //dbConnection.release();
+ callback(err,String(err));
+ return;
+ }
+ var sql = "DELETE FROM LINK_MASTER";
+ dbConnection.query(sql,function(err,result)
+ {
+ if(err){
+ //dbConnection.release();
+ dbConnection.rollback( {rollback: 'NO RELEASE'},function(){
+ callback(err,String(err));
+ return;
+ });
+ }
+ dbConnection.query(linkMasterSQL,function(err,result)
+ {
+ if(err){
+ //dbConnection.release();
+ dbConnection.rollback( {rollback: 'NO RELEASE'},function(){
+ callback(err,String(err));
+ return;
+ });
+ }
+ dbConnection.commit(function(err){
+ if(err){
+ //dbConnection.release();
+ dbConnection.rollback( {rollback: 'NO RELEASE'},function(){
+ callback(err,String(err));
+ return;
+ });
+ }
+ //dbConnection.release();
+ callback(null);
+ });
+ })
+ });
+ }); // end transaction
+}
+
+function updateRouterMaster(routerMasterSQL,callback){
+
+logger.debug('updateRouterMaster');
+
+ dbConnection.connect(function(err,connection)
+ {
+ if(err){
+ logger.debug( String(err) ); // ALARM
+ callback(err, 'Unable to get database connection.');
+ return;
+ }
+ }); // end connection
+ dbConnection.beginTransaction(function(err) {
+ if(err){
+ //dbConnection.release();
+ callback(err,String(err));
+ return;
+ }
+ var sql = "DELETE FROM ROUTER_MASTER";
+ dbConnection.query(sql,function(err,result)
+ {
+ if(err){
+ //dbConnection.release();
+ dbConnection.rollback( function(){
+ callback(err,String(err));
+ return;
+ });
+ }
+ dbConnection.query(routerMasterSQL,function(err,result)
+ {
+ if(err){
+ //dbConnection.release();
+ dbConnection.rollback( function(){
+ callback(err,String(err));
+ return;
+ });
+ }
+ dbConnection.commit(function(err){
+ if(err){
+ //dbConnection.release();
+ dbConnection.rollback( function(){
+ callback(err,String(err));
+ return;
+ });
+ }
+ //dbConnection.release();
+ callback(null);
+ });
+ })
+ });
+ }); // end transaction
+}
+
+/*
+
+ logger.debug('getLinkMaster - count=' + count);
+ if ( true ) {
+ //fail
+ setTimeout( function(){
+ cb(null);}, properties.netdbWaitTime);
+ return;
+ }
+ // success
+ count = 10;
+ cb(null);
+}
+*/
diff --git a/admportal/server/npm-debug.log b/admportal/server/npm-debug.log
new file mode 100644
index 0000000..40e151a
--- /dev/null
+++ b/admportal/server/npm-debug.log
@@ -0,0 +1,18 @@
+0 info it worked if it ends with ok
+1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
+2 info using npm@1.4.28
+3 info using node@v0.10.35
+4 verbose node symlink /usr/bin/node
+5 error Error: ENOENT, open '/home/users/ar3165/projects/admin-portal2/server/package.json'
+6 error If you need help, you may report this *entire* log,
+6 error including the npm and node versions, at:
+6 error <http://github.com/npm/npm/issues>
+7 error System Linux 3.13.0-40-generic
+8 error command "/usr/bin/node" "/usr/bin/npm" "start"
+9 error cwd /home/users/ar3165/projects/admin-portal2/server
+10 error node -v v0.10.35
+11 error npm -v 1.4.28
+12 error path /home/users/ar3165/projects/admin-portal2/server/package.json
+13 error code ENOENT
+14 error errno 34
+15 verbose exit [ 34, true ]
diff --git a/admportal/server/router/index.js b/admportal/server/router/index.js
new file mode 100644
index 0000000..76cd611
--- /dev/null
+++ b/admportal/server/router/index.js
@@ -0,0 +1,18 @@
+console.log("index.js");
+
+module.exports = function(app) {
+
+//console.log ( 'index port ' + server.address().port );
+
+ app.use('/', require('./routes/root'));
+ //app.use('/login', require('./routes/login'));
+ app.use('/odl', require('./routes/odl'));
+ app.use('/sla', require('./routes/sla'));
+ app.use('/user', require('./routes/user'));
+ app.use('/gamma', require('./routes/gamma'));
+ app.use('/mobility', require('./routes/mobility'));
+ app.use('/admin', require('./routes/admin'));
+ app.use('/preload', require('./routes/preload'));
+ //app.use('/svc-topology-operation', require('./routes/odl'));
+ //app.use('/wklist-delete', require('./routes/odl'));
+};
diff --git a/admportal/server/router/routes/Odl.js b/admportal/server/router/routes/Odl.js
new file mode 100755
index 0000000..a27d73b
--- /dev/null
+++ b/admportal/server/router/routes/Odl.js
@@ -0,0 +1,594 @@
+// Odl.js
+var https = require('https');
+var http = require('http');
+var properties = require(process.env.SDNC_CONFIG_DIR + '/admportal.json');
+
+
+var Odl = function() {
+ // Call ODL page
+ // get(uri,res)
+ // post(uri,data, res)
+
+ var _healthcheck = function(options, callback)
+ {
+ // Setup request to ODL side
+ console.log('options:' + JSON.stringify(options,null,2));
+ var request = https.request(options, function(response) {
+
+ var response_str = '';
+ // Read the response from ODL side
+ response.on('data', function(chunk) {
+ response_str += chunk;
+ });
+
+ response.on('end', function()
+ {
+ //logger.debug(response_str);
+ if(response.statusCode == 200)
+ {
+ console.log('200 OK');
+ callback(null, response_str);
+ return;
+ }
+ else{
+ console.log('not ok status=' + response.statusCode);
+ callback(response_str, 'statusCode=' + response.statusCode + '\n' + response_str);
+ return;
+ }
+ });
+ });
+ request.end()
+
+ request.on('error', function(err) {
+ console.error('err:' + err);
+ callback(err, err);
+ return;
+ });
+ }
+
+ var _get = function(uri,options,callback,req,res)
+ {
+
+ options.method = "GET";
+ options.path = uri;
+
+ // Setup request to ODL side
+ console.log('options:' + JSON.stringify(options,null,2));
+ var request = https.request(options, function(response) {
+ // console.dir(response);
+ console.log('STATUS: ' + response.statusCode);
+ var response_str = '';
+ // Read the response from ODL side
+ response.on('data', function(chunk) {
+ response_str += chunk;
+ });
+
+ response.on('end', function()
+ {
+ console.log(response_str);
+
+ if(response.statusCode == 200)
+ {
+ // make sure response starts with JSON string
+ if (response_str && response_str.indexOf('{') == 0) {
+ //console.log("response: ", result);
+
+ req.session.l3sdnPageInfo = undefined;
+ var x=0;
+ var pageList = [];
+ var obj_rows = [];
+ var rows = [];
+ var robj = JSON.parse(response_str);
+
+ if ( typeof robj['services']['layer3-service-list'] != 'undefined' )
+ {
+ for( var i=0; i<robj['services']['layer3-service-list'].length; i++)
+ {
+ obj_rows.push( robj['services']['layer3-service-list'][i] );
+ }
+ }
+ else
+ {
+ res.render('pages/err', {result:{code:'failure', msg:'no data Error: ' + String(err)}, header:process.env.MAIN_MENU});
+ callback(null,response_str,res);
+ return;
+ }
+
+ var rows = [];
+ var l3sdnPageInfo =
+ {
+ 'totalRows' : obj_rows.length,
+ 'pageSize' : 18,
+ 'pageCount' : parseInt(obj_rows.length/18),
+ 'currentPage' : 1
+ }
+
+ while (obj_rows.length > 0){
+ pageList.push(obj_rows.splice(0,l3sdnPageInfo.pageSize));
+ }
+ l3sdnPageInfo.rows = pageList[0]; // first page
+ l3sdnPageInfo.pages = pageList; // all pages
+
+
+ req.session.l3sdnPageInfo = l3sdnPageInfo;
+ var privObj = req.session.loggedInAdmin;
+
+ res.render('odl/listWklst',
+ {
+ pageInfo : l3sdnPageInfo,
+ result : {code:'', msg:''},
+ privilege : privObj, header:process.env.MAIN_MENU
+ });
+
+
+ } else {
+ res.render('pages/err', {result:{code:'failure', msg:'no data Error: ' + String(err)}, header:process.env.MAIN_MENU});
+ }
+ callback(null, response_str, res);
+ }
+ else
+ {
+ callback(response_str,response_str,res);
+ //res.render('pages/err', {result:{code:'failure', msg:'Failed to retrieve worklist. ' + response_str}});
+ }
+ });
+ });
+
+ request.end()
+
+ request.on('error', function(err) {
+ callback(err,null, res);
+ });
+ }
+
+ var _getid = function(uri,options,res) {
+ options.method = "GET";
+ options.path = uri;
+
+ // Setup request to ODL side
+ var request = https.request(options, function(response) {
+ // console.dir(response);
+ //console.log('STATUS: ' + response.statusCode);
+ var response_str = '';
+ // Read the response from ODL side
+ response.on('data', function(chunk) {
+ response_str += chunk;
+ });
+
+ response.on('end', function() {
+ if(response.statusCode == 200){
+ if(response_str){
+ //console.log("response: ", response_str);
+ res.render('odl/view', {response_obj: JSON.parse(response_str), header:process.env.MAIN_MENU});
+ }
+ else{
+ //console.log("no data");
+ res.render('pages/err', {result:{code:'failure', msg:'Failed to retrieve worklist'}, header:process.env.MAIN_MENU});
+ }
+ }
+ else {
+ //console.log("bad status code:", response.statusCode);
+ res.render('pages/err', {result:{code:'failure', msg:'Failed to retrieve worklist. Status Code:' + response.statusCode}, header:process.env.MAIN_MENU});
+ }
+ });
+ });
+
+ request.end()
+
+ request.on('error', function(err) {
+ //console.log(err);
+ res.render('pages/err', {result:{code:'failure', msg:'Failed to get worklist item. ' + String(err)}, header:process.env.MAIN_MENU});
+ });
+ }
+
+ var _getvrlan = function(uri,options,callback) {
+ options.method = "GET";
+ options.path = uri;
+
+
+ //callback(null,'');
+ // Setup request to ODL side
+ var request = https.request(options, function(response) {
+ // console.dir(response);
+ //console.log('STATUS: ' + response.statusCode);
+ var response_str = '';
+ // Read the response from ODL side
+ response.on('data', function(chunk) {
+ response_str += chunk;
+ });
+
+
+ response.on('end', function() {
+ if(response.statusCode == 200){
+ if(response_str){
+ callback(null,response_str);
+ return;
+ }
+ else{
+ callback('err','no data');
+ return;
+ }
+ }
+ else {
+ callback('error',response.statusCode);
+ return;
+ }
+ });
+ });
+
+ request.end()
+
+ request.on('error', function(err) {
+ callback(err,String(err));
+ return;
+ });
+ }
+
+
+ var _getvnf = function(uri,options,req,res) {
+ options.method = "GET";
+ options.path = uri;
+
+ // Setup request to ODL side
+ var request = https.request(options, function(response) {
+ // console.dir(response);
+ //console.log('STATUS: ' + response.statusCode);
+ var response_str = '';
+ // Read the response from ODL side
+ response.on('data', function(chunk) {
+ response_str += chunk;
+ });
+
+ response.on('end', function() {
+ if(response.statusCode == 200){
+ if(response_str){
+ //console.log("response: ", response_str);
+ res.render('odl/viewvnf', { vnf_obj: JSON.parse(response_str),
+ request_id: req.query['request'], header:process.env.MAIN_MENU });
+ }
+ else{
+ //console.log("no data");
+ res.render('pages/err', {result:{code:'failure', msg:'Failed to retrieve worklist item.'}, header:process.env.MAIN_MENU});
+ }
+ }
+ else {
+ //console.log("bad status code:", response.statusCode);
+ res.render('pages/err', {result:{code:'failure', msg:'Failed to retrieve worklist. Status Code:' + response.statusCode}, header:process.env.MAIN_MENU});
+ }
+ });
+ });
+
+ request.end()
+
+ request.on('error', function(err) {
+ //console.log(err);
+ res.render('pages/err', {result:{code:'failure', msg:'Failed getting VNF information. Error: '+ String(err)}, header:process.env.MAIN_MENU});
+ });
+ }
+
+ var _getPreloadVnfData = function(uri,options,res,callback) {
+
+ options.method = "GET";
+ options.path = uri;
+
+
+ // Setup request to ODL side
+ var protocol;
+ if ( process.env.NODE_ENV != 'production' ){
+ protocol = http;
+ }else{
+ protocol = https;
+ }
+
+console.log('NODE_ENV:' + process.env.NODE_ENV);
+console.log('GET: ' + JSON.stringify(options,null,4));
+
+ var request = protocol.request(options, function(response) {
+
+ var response_str = '';
+
+ // Read the response from ODL side
+ response.on('data', function(chunk) {
+ response_str += chunk;
+ });
+
+ response.on('end', function() {
+console.log('response_str: ' + response_str);
+console.log('response.statusCode: ' + response.statusCode);
+ if(response.statusCode == 200){
+ if(response_str){
+ callback(null,response_str);
+ return;
+ }
+ else{
+ callback('Error - No data returned.');
+ return;
+ }
+ }
+ else {
+ if ( response.statusCode == 404 )
+ {
+ callback('HTTP Status Code:' + response.statusCode + '. Not Found.');
+ return;
+ }
+ else if ( response_str.length > 0 )
+ {
+ callback('HTTP Status Code:' + response.statusCode + '. ' + response_str);
+ return;
+ }
+ else
+ {
+ callback('HTTP Status Code:' + response.statusCode + '. No data returned.');
+ return;
+ }
+ }
+ });
+ });
+
+ request.end()
+
+ request.on('error', function(err) {
+ callback(err);
+ return;
+ });
+ }
+
+var _getClusterStatus = function(options,callback) {
+ //options.method = "GET";
+ //options.path = uri;
+
+ console.log('URI='+options.path);
+
+ // Setup request to ODL side
+ var protocol = properties.odlProtocol;
+console.log('protocol=' + protocol);
+ if ( protocol == 'http' || protocol == 'HTTP' )
+ {
+console.log('http request');
+ var request = http.request(options, function(response) {
+ var response_str = '';
+
+ // Read the response from ODL side
+ response.on('data', function(chunk) {
+ response_str += chunk;
+ });
+
+
+ response.on('end', function() {
+console.log('HTTP StatusCode='+response.statusCode);
+ if(response.statusCode == 200){
+ if(response_str){
+console.log('response_str='+response_str);
+ callback(null,JSON.parse(response_str));
+ return;
+ }
+ else{
+ callback(null,'no data');
+ return;
+ }
+ }
+ else {
+ callback(null,response.statusCode);
+ return;
+ }
+ });
+ });
+
+ request.end()
+
+ request.on('error', function(err) {
+ callback(null,String(err));
+ return;
+ });
+ }
+ else {
+ var request = https.request(options, function(response) {
+ var response_str = '';
+
+ // Read the response from ODL side
+ response.on('data', function(chunk) {
+ response_str += chunk;
+ });
+
+
+ response.on('end', function() {
+ if(response.statusCode == 200){
+ if(response_str){
+console.log('response_str='+response_str);
+ callback(null,JSON.parse(response_str));
+ return;
+ }
+ else{
+ callback(null,'no data');
+ return;
+ }
+ }
+ else {
+ callback(null,response.statusCode);
+ return;
+ }
+ });
+ });
+
+ request.end()
+
+ request.on('error', function(err) {
+ callback(null,String(err));
+ return;
+ });
+ }
+}
+
+ var _delete = function(uri,options,res,callback) {
+ options.method = 'DELETE';
+ options.path = uri;
+
+
+ // Setup request to ODL side
+ //var request = https.request(options, function(response) {
+ var request = http.request(options, function(response) {
+ //console.log('STATUS: ' + response.statusCode);
+ var response_str = '';
+ // Read the response from ODL side
+ response.on('data', function(chunk) {
+ response_str += chunk;
+ });
+
+ response.on('end', function() {
+ if(response.statusCode == 200){
+ callback(null);
+ return;
+ }
+ else {
+ callback('Error:' + response_str);
+ return;
+ }
+ });
+ });
+ request.on('error', function(err) {
+ callback(err);
+ return;
+ });
+ request.end()
+ }
+
+ var _post = function(uri,options,data,res,callback)
+ {
+ options.method = 'POST';
+ options.path = uri;
+
+
+ // Setup request to ODL side
+ var protocol;
+ //if ( process.env.NODE_ENV != 'production' ){
+ protocol = http;
+ //}else{
+ //protocol = https;
+ //}
+ var request = protocol.request(options, function(response)
+ {
+ var response_str = '';
+ // Read the response from ODL side
+ response.on('data', function(chunk) {
+ response_str += chunk;
+ //logger.debug('chunk:' + chunk);
+ });
+
+ // end of request, check response
+ response.on('end', function() {
+ console.log('post status code:'+response.statusCode);
+ if(response.statusCode == 200 ){
+ try {
+ var respObj = JSON.parse(response_str);
+ console.log('response_str.length:' + response_str.length);
+ if(response_str){
+ console.log("post response-code:" + respObj['output']['response-code']);
+
+ if ( respObj['output']['response-code'] == 200 ){
+ callback(null,response_str);
+ return;
+ }else{
+ callback('Error - response-code:' + respObj['output']['response-code'] + ' response-message:' + respObj['output']['response-message']);
+ return;
+ }
+ }else{
+ // success
+ callback(null);
+ return;
+ }
+ }
+ catch (error) {
+ callback('Error parsing response: ' + error);
+ return;
+ }
+ }
+ else {
+ var respObj = null;
+ if ( response_str.length > 0 ) {
+ console.log('response_str:' + response_str);
+ try {
+ respObj = JSON.parse(response_str);
+ if ( typeof respObj['errors'] != 'undefined' )
+ {
+ console.log('Error' + JSON.stringify(respObj));
+ if ( typeof respObj['errors']['error'][0]['error-message'] != 'undefined' )
+ {
+ callback('HTTP Status Code:' + response.statusCode + '. Message:'
+ + respObj['errors']['error'][0]['error-message']);
+ return;
+ }
+ else
+ {
+ callback('Error - HTTP Status Code:' + response.statusCode + '.');
+ return;
+ }
+ }
+ else
+ {
+ callback('Error - HTTP Status Code:' + response.statusCode + '.');
+ return;
+ }
+ }
+ catch (error) {
+ callback('Error - HTTP Status Code:' + response.statusCode + '.');
+ return;
+ }
+ }
+ else{
+ callback('Error - HTTP Status Code:' + response.statusCode + '.');
+ return;
+ }
+ }
+ });
+ });
+
+ request.on('error', function(err) {
+ callback(err);
+ return;
+ });
+
+ request.write(data);
+ request.end()
+ }
+
+ var _postSubnetAllocated = function(uri,options,data,callback,res) {
+ options.method = 'POST';
+ options.path = uri;
+
+ // Setup request to ODL side
+ var request = https.request(options, function(response) {
+ var response_str = '';
+ // Read the response from ODL side
+ response.on('data', function(chunk) {
+ response_str += chunk;
+ });
+
+ // end of request, check response
+ response.on('end', function() {
+ //console.log("post: response: " + response_str);
+ callback(response_str,null,res);
+ });
+ });
+ request.on('error', function(err) {
+ callback(err,null, res);
+ });
+ request.write(data);
+ request.end()
+ }
+
+ return {
+ GetClusterStatus: _getClusterStatus,
+ Get: _get,
+ GetID: _getid,
+ GetVNF: _getvnf,
+ GetVRlan: _getvrlan,
+ GetPreloadVnfData: _getPreloadVnfData,
+ Post: _post,
+ PostSubnetAllocated: _postSubnetAllocated,
+ Delete: _delete,
+ Healthcheck: _healthcheck
+ };
+}();
+
+module.exports = Odl;
+
diff --git a/admportal/server/router/routes/admin.js b/admportal/server/router/routes/admin.js
new file mode 100755
index 0000000..4b7b808
--- /dev/null
+++ b/admportal/server/router/routes/admin.js
@@ -0,0 +1,83 @@
+var express = require('express');
+var router = express.Router();
+var exec = require('child_process').exec;
+var util = require('util');
+var fs = require('fs');
+var dbRoutes = require('./dbRoutes');
+var csp = require('./csp');
+var bodyParser = require('body-parser');
+var sax = require('sax'),strict=true,parser = sax.parser(strict);
+var async = require('async');
+
+
+// GET
+router.get('/getParameters', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getParameters(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+router.get('/deleteParameter', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push(function(callback) {
+ dbRoutes.deleteParameter(req,res,callback);
+ });
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getParameters(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from PARAMETERS table.');
+ dbRoutes.getParameters(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+// POST
+router.post('/addParameter', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.addParameter(req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getParameters(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully updated PARAMETERS.');
+ dbRoutes.getParameters(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// gamma - updateAicSite
+router.post('/updateParameter', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.updateParameter(req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getParameters(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully updated PARAMETERS.');
+ dbRoutes.getParameters(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+module.exports = router;
diff --git a/admportal/server/router/routes/csp.js b/admportal/server/router/routes/csp.js
new file mode 100644
index 0000000..435aaf9
--- /dev/null
+++ b/admportal/server/router/routes/csp.js
@@ -0,0 +1,84 @@
+var exec = require('child_process').exec;
+var dbRoutes = require('./dbRoutes');
+var fs = require('fs.extra');
+var properties = require(process.env.SDNC_CONFIG_DIR + '/admportal.json');
+
+var retURL = "";
+var noCookieUrl = "";
+var logoutUrl = "";
+
+function logout(req,res){
+ console.log("logout");
+ req.session.loggedInAdmin = undefined;
+ res.redirect('/login');
+}
+
+function login (req,res) {
+
+ var loggedInAdmin={};
+ var email = req.body.email;
+ dbRoutes.findAdminUser(email,res,function(adminUser){
+ if(adminUser !== null){
+
+ // make sure correct password is provided
+ if (req.body.password != adminUser.password) {
+ res.render("pages/login",
+ {
+ result:
+ {
+ code:'error',
+ msg:'Invalid password entered.'
+ },
+ header:process.env.MAIN_MENU
+ });
+ return;
+ }
+
+ var loggedInAdmin = {
+ email:adminUser.email,
+ password:adminUser.password,
+ privilege:adminUser.privilege
+ }
+ req.session.loggedInAdmin = loggedInAdmin;
+ console.log("Login Success"+JSON.stringify(loggedInAdmin));
+ res.redirect('sla/listSLA');
+ }else{
+ res.render("pages/err",
+ {
+ result:
+ {
+ code:'error',
+ msg:'User ' + attuid + ' is not in the database. Please see an adminstrator to have them added.'
+ },
+ header:process.env.MAIN_MENU
+ });
+ }
+ });
+}
+
+function checkAuth(req,res,next){
+ var host = req.get('host');
+ var url = req.url;
+ var originalUrl = req.originalUrl;
+
+ console.log("checkAuth");
+
+ var host = req.headers['host'];
+console.log('host=' + host);
+
+ console.log("cookie is not null "+JSON.stringify(req.session.loggedInAdmin));
+ if(req.session == null || req.session == undefined
+ || req.session.loggedInAdmin == null || req.session.loggedInAdmin == undefined)
+ {
+ // nothing else to do but log them back in, or they may
+ // be coming from the graph tool
+ console.log("loggedInAdmin not found.session timed out.");
+ res.render('pages/login');
+ return false;
+ }
+ next();
+}
+
+exports.login = login;
+exports.logout = logout;
+exports.checkAuth = checkAuth;
diff --git a/admportal/server/router/routes/dbRoutes.js b/admportal/server/router/routes/dbRoutes.js
new file mode 100644
index 0000000..d2f40b5
--- /dev/null
+++ b/admportal/server/router/routes/dbRoutes.js
@@ -0,0 +1,1192 @@
+var express = require('express'),
+ app = express();
+var mysql = require('mysql');
+var properties = require(process.env.SDNC_CONFIG_DIR + '/admportal.json');
+var fs = require('fs.extra');
+var util = require('util');
+var os = require('os');
+var async = require('async');
+var l_ = require('lodash');
+var dns = require('dns');
+var dnsSync = require('dns-sync');
+
+var pool = '';
+var currentDB = '';
+var currentDbName = '';
+var fabricDB = properties.dbFabricServer;
+var dbArray = properties.databases;
+var enckey = properties.passwordKey;
+
+console.log('dbFabric=' + properties.dbFabric);
+
+if ( properties.dbFabric == 'true' )
+{
+ connectFabric();
+}
+else
+{
+ initDB();
+}
+
+
+exports.dbConnect = function(){
+
+ console.log('fabric=' + fabricDB);
+ if ( properties.dbFabric == 'true' )
+ {
+ connectFabric();
+ }
+ else
+ {
+ initDB();
+ }
+}
+
+function setCurrentDbName(){
+
+ function createFunction(dbentry)
+ {
+ return function(callback) { findCurrentDbIP(dbentry,callback); }
+ }
+
+ var tasks = [];
+ for (var x=0; x<dbArray.length; x++){
+ var dbElement = dbArray[x];
+ var dbElementArray = dbElement.split("|");
+
+ tasks.push( createFunction(dbElement) );
+ }
+ async.series(tasks, function(err,result){
+
+ if(err){
+ currentDbName = err;
+ console.log('currentDbName: ' + err);
+ return;
+ }
+ else {
+ console.log('not found');
+ return;
+ }
+ });
+}
+
+
+function findCurrentDbIP(dbElement, callback){
+
+ var dbElementArray = dbElement.split("|");
+
+ dns.lookup( dbElementArray[0], function onLookup(err, addresses, family) {
+
+ if ( currentDB == addresses ){
+ callback(dbElementArray[1]);
+ return;
+ }
+ else {
+ callback(null);
+ return;
+ }
+ });
+}
+
+
+exports.getCurrentDB = function(){
+ return currentDbName;
+}
+
+
+exports.testdb = function(req,res,callback){
+console.log('testdb');
+
+ osObj = {
+ 'hostname' : os.hostname(),
+ 'type' : os.type(),
+ 'platform' : os.platform(),
+ 'arch' : os.arch(),
+ 'release' : os.release(),
+ 'uptime' : os.uptime(),
+ 'totalmem' : os.totalmem(),
+ 'dbhealth' : ''
+ };
+
+ pool.getConnection(function(err,connection)
+ {
+ if(err){
+ callback(err);
+ return;
+ }
+
+ // http://stackoverflow.com/questions/10982281/mysql-connection-validity-test-in-datasource-select-1-or-something-better
+ connection.query("/* pint */ SELECT 1", function(err,result){
+
+ connection.release();
+ if(err) {
+ callback(err);
+ return;
+ }
+ callback(null,'Database Connectivity to ' + currentDB + ' is working.');
+ return;
+ }); //end query
+ }); // end getConnection
+}
+
+/*
+exports.checkSvcLogic = function(req,res){
+
+ if ( DBmasterHost.length > 0 && currentHost != DBmasterHost )
+ {
+ // need to copy file so SLA functionality works
+ var source = process.env.SDNC_CONFIG_DIR
+ + "/svclogic.properties." + currentHost;
+ var target = process.env.SDNC_CONFIG_DIR
+ + "/svclogic.properties";
+ fs.copy(source,target,{replace:true}, function(err){
+ if(err){
+ res.render("pages/err",
+ {result:{code:'error',
+ msg:"Unable to copy svclogic.properties. "+ String(err) }});
+ return;
+ }
+ });
+ }
+}
+*/
+function initDB( next ) {
+
+
+ var tasks = [];
+ for (var x=0; x<properties.databases.length; x++){
+
+ var db = properties.databases[x];
+ var dbArray = db.split("|");
+ var _dbIP = dnsSync.resolve(dbArray[0]);
+ var _dbName = dbArray[1];
+
+ tasks.push( createFindMasterFunctionObj(_dbIP, _dbName) );
+ }
+ async.series(tasks, function(err,result)
+ {
+ if(err){
+ if ( err == 'found' ){
+ if ( typeof next != 'undefined'){
+ next();
+ }
+ else {
+ return;
+ }
+ }
+ else {
+ console.error( String(err) ); // ALARM
+ return;
+ }
+ }
+ console.log('result=' + result);
+ });
+ return;
+}
+
+
+function createFindMasterFunctionObj(dbIP,dbName){
+ return function(callback) { findMaster(dbIP, dbName, callback); }
+}
+
+function findMaster (ldbIP, ldbName, callback){
+var dbIP = ldbIP;
+var dbName = ldbName;
+
+ console.log('checking dbIP:' + dbIP);
+
+ pool = mysql.createPool({
+ connectionLimit : properties.dbConnLimit,
+ host : dbIP,
+ user : properties.dbUser,
+ password : properties.dbPassword,
+ database : properties.dbName,
+ multipleStatements: true,
+ debug : false
+ });
+
+ pool.getConnection(function(err,connection){
+
+ if(err){
+ callback( String(err) );
+ return;
+ }
+ var sql = 'select @@read_only';
+ connection.query(sql, function(err,result){
+ connection.release();
+
+ // @@read_only=0 means db is writeable
+ console.log('@@read_only=' + result[0]['@@read_only']);
+ if ( result[0]['@@read_only'] == '0' )
+ { // writeable
+ // if this is not the current DB, make it since its writeable
+ currentDB = dbIP;
+ currentDbName = dbName;
+ console.log('currentDB=' + currentDB + "|" + currentDbName);
+ var newpool = mysql.createPool({
+ connectionLimit : properties.dbConnLimit,
+ host : currentDB,
+ user : properties.dbUser,
+ password : properties.dbPassword,
+ database : properties.dbName,
+ multipleStatements: true,
+ debug : false
+ }); // end create
+ pool = newpool;
+ callback('found', currentDB);
+ return;
+ }
+ // otherwise this is the current db and its writeable, just return
+ callback(null, currentDB);
+ return;
+ });
+ });
+}
+
+exports.checkDB = function(req,res,next){
+
+console.log('checkDB');
+
+
+ if ( properties.dbFabric == 'true' )
+ {
+ connectFabric();
+ next();
+ }
+ else
+ {
+ initDB( next );
+ }
+}
+
+
+exports.saveUser = function(req,res){
+
+ pool.getConnection(function(err,connection){
+ if(err){
+ console.error( String(err) ); // ALARM
+ res.render("pages/signup", {result:{code:'error', msg:"Unable to get database connection. " + String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+ //var sql = "SELECT AES_DECRYPT(password, '" + enckey + "') password FROM PORTAL_USERS";
+ var sql = "SELECT email FROM PORTAL_USERS WHERE email='" + req.body.nf_email + "'";
+
+ console.log(sql);
+
+ connection.query(sql, function(err,result){
+ if(err){
+ res.render("pages/signup", {result:{code:'error', msg:"Unable to get database connection. " + String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+ if (result.length == 1 || result.length > 1)
+ {
+ res.render("pages/signup", {result:{code:'error', msg:'User Information already exists.'},header:process.env.MAIN_MENU});
+ return;
+ }
+
+ sql = "INSERT INTO PORTAL_USERS (email,password,privilege) VALUES ("
+ +"'"+ req.body.nf_email + "',"
+ + "AES_ENCRYPT('" + req.body.nf_password + "','" + enckey + "'),"
+ +"'A')";
+
+ console.log(sql);
+
+ connection.query(sql, function(err,result){
+ connection.release();
+
+ if(err){
+ res.render("pages/signup", {result:{ code:'error', msg:String(err) },header:process.env.MAIN_MENU});;
+ return;
+ }
+ res.render('pages/signup', {result:{code:'success', msg:'User created. Please login.'},header:process.env.MAIN_MENU});
+ return;
+ });
+ });
+ });
+}
+
+// delete User
+exports.deleteUser = function(req,res){
+
+ var rows={};
+ var resultObj = { code:'', msg:'' };
+ var privilegeObj = req.session.loggedInAdmin;
+
+ pool.getConnection(function(err,connection) {
+ if(err){
+ console.error( String(err) ); // ALARM
+ res.render("user/list", {rows: null, result:{code:'error', msg:"Unable to get database connection. Error:" + String(err),
+ privilege:privilegeObj },header:process.env.MAIN_MENU});
+ return;
+ }
+
+ var sqlUpdate = "DELETE FROM PORTAL_USERS WHERE email='" + req.query.email + "'";
+
+ console.log(sqlUpdate);
+
+ connection.query(sqlUpdate,function(err,result){
+
+ if(err){
+ resultObj = {code:'error', msg:'Delete of user failed Error: '+ String(err) };
+ }
+
+ // Need DB lookup logic here
+ connection.query("SELECT email,password,privilege FROM PORTAL_USERS", function(err, rows) {
+ connection.release();
+ if(!err) {
+ if ( rows.length > 0 )
+ {
+ resultObj = {code:'success',msg:'Successfully deleted user.'};
+ res.render('user/list', { rows: rows, result:resultObj, privilege:privilegeObj,header:process.env.MAIN_MENU } );
+ return;
+ }else{
+ res.render("user/list", { rows: null, result:{code:'error', msg:'Unexpected no rows returned from database, please try again.',
+ privilege:privilegeObj },header:process.env.MAIN_MENU});
+ return;
+ }
+ } else {
+ res.render("user/list", { rows: null, result:{code:'error', msg:'Unexpected no rows returned from database. Error: ' + String(err),
+ privilege:privilegeObj },header:process.env.MAIN_MENU});
+ return;
+ }
+ }); //end query
+ });
+ }); // end of getConnection
+}
+
+// add User
+exports.addUser = function(req,res){
+
+ var rows={};
+ var resultObj = { code:'', msg:'' };
+ var privilegeObj = req.session.loggedInAdmin;
+
+ pool.getConnection(function(err,connection) {
+ if(err){
+ console.error( String(err) ); // ALARM
+ res.render("user/list", {rows: null, result:{code:'error', msg:"Unable to get database connection. "+ String(err),
+ privilege:privilegeObj },header:process.env.MAIN_MENU});
+ return;
+ }
+
+ if( req.body.nf_privilege == "admin" ){
+ var char_priv = 'A';
+ }else if(req.body.nf_privilege == 'readonly'){
+ var char_priv = 'R';
+ }else{
+ var char_priv = 'A';
+ }
+
+
+ //connection.query(sqlRequest, function(err,result){
+ var sqlUpdate = "INSERT INTO PORTAL_USERS (email, password, privilege) VALUES ("
+ +"'"+ req.body.nf_email + "',"
+ + "AES_ENCRYPT('" + req.body.nf_password + "','" + enckey + "'),"
+ +"'"+ char_priv + "')";
+
+ console.log(sqlUpdate);
+
+ connection.query(sqlUpdate,function(err,result){
+
+ if(err){
+ resultObj = {code:'error', msg:'Add of user failed Error: '+err};
+ }
+
+ // Need DB lookup logic here
+ connection.query("SELECT email,AES_DECRYPT(password, '" + enckey + "') password,privilege FROM PORTAL_USERS", function(err, rows) {
+
+ connection.release();
+ if(!err) {
+ if ( rows.length > 0 )
+ {
+ resultObj = {code:'success',msg:'Successfully added user.'};
+ res.render('user/list', { rows: rows, result:resultObj, privilege:privilegeObj,header:process.env.MAIN_MENU } );
+ return;
+ }else{
+ res.render("user/list", {rows: null, result:{code:'error', msg:'Unexpected no rows returned from database, please try again.',
+ privilege:privilegeObj },header:process.env.MAIN_MENU});
+ return;
+ }
+ } else {
+ res.render("user/list", {rows: null, result:{code:'error', msg:'Unexpected no rows returned from database. Error: '+ err ,
+ privilege:privilegeObj },header:process.env.MAIN_MENU});
+ return;
+ }
+ }); //end query
+ });
+
+ }); // end of getConnection
+}
+
+// updateUser
+exports.updateUser= function(req,res){
+
+ var rows={};
+ var resultObj = { code:'', msg:'' };
+ var privilegeObj = req.session.loggedInAdmin;
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ res.render("user/list", {rows: null, result:{code:'error', msg:"Unable to get database connection. " + String(err),
+ privilege:privilegeObj },header:process.env.MAIN_MENU});
+ return;
+ }
+
+ if( req.body.uf_privilege == "admin" ){
+ var char_priv = 'A';
+ }else if(req.body.uf_privilege == 'readonly'){
+ var char_priv = 'R';
+ }else{
+ var char_priv = 'A';
+ }
+
+
+ //connection.query(sqlRequest, function(err,result){
+ var sqlUpdate = "UPDATE PORTAL_USERS SET "
+ + "email = '" + req.body.uf_email + "',"
+ + "password = " + "AES_ENCRYPT('" + req.body.uf_password + "','" + enckey + "'), "
+ + "privilege = '"+ char_priv + "'"
+ + " WHERE email = '" + req.body.uf_key_email + "'";
+
+ console.log(sqlUpdate);
+
+ connection.query(sqlUpdate,function(err,result){
+
+ if(err){
+ resultObj = {code:'error', msg:'Update of user failed Error: '+err};
+ }
+
+ // Need DB lookup logic here
+ connection.query("SELECT email, AES_DECRYPT(password,'" + enckey + "') password, privilege FROM PORTAL_USERS", function(err, rows) {
+ connection.release();
+ if(!err) {
+ if ( rows.length > 0 )
+ {
+ resultObj = {code:'success',msg:'Successfully updated user.'};
+ res.render('user/list', { rows: rows, result:resultObj, privilege:privilegeObj,header:process.env.MAIN_MENU} );
+ return;
+ }else{
+ res.render("user/list", {rows: null, result:{ code:'error', msg:'Unexpected no rows returned from database.',
+ privilege:privilegeObj },header:process.env.MAIN_MENU});
+ return;
+ }
+ } else {
+ res.render("user/list", {rows: null, result:{code:'error', msg:'Unexpected no rows returned from database. ' + String(err),
+ privilege:privilegeObj },header:process.env.MAIN_MENU});
+ return;
+ }
+ }); //end query
+ });
+ }); // end of getConnection
+};
+
+exports.listUsers = function(req,res,resultObj){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var rows={};
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ res.render("pages/list", {rows: null, result:{code:'error', msg:"Unable to get database connection. " + String(err),
+ privilege:privilegeObj },header:process.env.MAIN_MENU});
+ return;
+ }
+
+ // Need DB lookup logic here
+ var selectUsers = "SELECT email, AES_DECRYPT(password,'" + enckey + "') password, privilege from PORTAL_USERS";
+ console.log(selectUsers);
+ connection.query(selectUsers, function(err, rows) {
+
+ connection.release();
+ if(err){
+ resultObj = {code:'error', msg:'Unable to SELECT users Error: '+err};
+ }
+
+ if(!err) {
+ if ( rows.length > 0 )
+ {
+ console.log(JSON.stringify(rows));
+ res.render('user/list', { rows: rows, result:resultObj, privilege:privilegeObj,header:process.env.MAIN_MENU });
+ return;
+ }
+ else{
+ res.render("user/list", {rows: null, result:{code:'error', msg:'Unexpected no rows returned from database.',
+ privilege:privilegeObj },header:process.env.MAIN_MENU});
+ return;
+ }
+ } else {
+ res.render("user/list", {rows: null, result:{code:'error', msg:'Unexpected no rows returned from database. ' + String(err),
+ privilege:privilegeObj },header:process.env.MAIN_MENU});
+ return;
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+exports.listSLA = function(req,res,resultObj){
+
+ var privilegeObj = req.session.loggedInAdmin;
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ res.render("pages/err", {result:{code:'error', msg:"Unable to get database connection. "+ String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+
+ // Need DB lookup logic here
+ connection.query("SELECT module,rpc,version,mode,active,graph FROM SVC_LOGIC", function(err, rows) {
+
+ connection.release();
+ if(err) {
+ res.render("pages/err", {result:{code:'error',msg:'Database Error: '+ String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+ else {
+ res.render("sla/list", {rows:rows, result:resultObj, privilege:privilegeObj, header:process.env.MAIN_MENU} );
+ return;
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+exports.executeSQL = function(sql,req,res,callback){
+
+ console.log(sql);
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ callback(err, 'Unable to get database connection.' + err);
+ return;
+ }
+
+ connection.query(sql, function(err,result){
+ connection.release();
+ if (err) {
+ callback(err,'Database operation failed. ' + err );
+ }
+ else
+ {
+console.log('affectedRows='+result.affectedRows);
+ callback(null, result.affectedRows);
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+
+// gamma - deleteParameter
+exports.deleteParameter = function(req,res,callback){
+
+ var sql = "DELETE FROM PARAMETERS WHERE name='" + req.query.name + "'";
+
+ console.log(sql);
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.log( String(err) ); // ALARM
+ callback(err, 'Unable to get database connection.' + err);
+ return;
+ }
+ connection.query(sql, function(err,result){
+ connection.release();
+ if(err){
+ console.log('Update failed. ' + err );
+ callback(err,'Update failed. ' + err );
+ }
+ else
+ {
+ callback(null,'');
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+
+exports.getTable = function(req,res,sql,rdestination,resultObj,privilegeObj){
+
+console.log('SQL:'+sql);
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ res.render("pages/err", {result:{code:'error', msg:"Unable to get database connection. "+ String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+ connection.query(sql,function(err, rows)
+ {
+ connection.release();
+ if(err) {
+ res.render(rdestination, {result:{code:'error',msg:'Database Error: '+ String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+ else {
+ res.render(rdestination, { rows: rows, result:resultObj, privilege:privilegeObj,header:process.env.MAIN_MENU } );
+ return;
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+exports.getMetaTable = function(req,res,sql,rdestination,resultObj,privilegeObj){
+
+ console.log('SQL:'+ sql);
+
+ var rdata = [];
+ var v_tables = [];
+ var vtables = properties.viewTables;
+
+ for ( var i in vtables ) {
+ v_tables.push(vtables[i]);
+ }
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ res.render("pages/err", {result:{code:'error', msg:"Unable to get database connection. "+ String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+ connection.query(sql,function(err, rows, fields)
+ {
+ console.log('rows:' + JSON.stringify(rows,null,2));
+ // http://stackoverflow.com/questions/14528385/how-to-convert-json-object-to-javascript-array
+ //logger.debug(Object.keys(rows[0]).map(function(v) { return rows[0][v]; }));
+ for ( var i in rows ){
+ rdata.push(Object.keys(rows[i]).map(function(v) { return rows[i][v]; }));
+ //logger.debug(Object.keys(rows[i]).map(function(v) { return rows[i][v]; }));
+ //logger.debug([i, rows[i]]);
+ }
+ for ( var x in rdata ){
+ for ( var j in rdata[x] ){
+ console.log('rdata[' + x + ']: ' + rdata[x][j]);
+ }
+ }
+ console.log('rdata:' + rdata[0]);
+ console.log('fields:' + JSON.stringify(fields,null,2));
+ connection.release();
+ if(err) {
+ res.render(rdestination, {result:{code:'error',msg:'Database Error: '+ String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+ else {
+ res.render(rdestination, { displayTable:true, vtables:v_tables, rows:rdata, fields:fields, result:resultObj, privilege:privilegeObj, header:process.env.MAIN_MENU } );
+ return;
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+exports.getVnfProfile = function(req,res,resultObj,privilegeObj){
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ res.render("pages/err", {result:{code:'error', msg:"Unable to get database connection. "+ String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+
+ connection.query("SELECT vnf_type,availability_zone_count,equipment_role "
+ + "FROM VNF_PROFILE ORDER BY VNF_TYPE", function(err, rows)
+ {
+ connection.release();
+ if(err) {
+ res.render("mobility/vnfProfile", {result:{code:'error',msg:'Database Error: '+ String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+ else {
+ res.render('mobility/vnfProfile', { rows: rows, result:resultObj, privilege:privilegeObj,header:process.env.MAIN_MENU } );
+ return;
+ }
+ }); //end query
+console.log('after query');
+ }); // end getConnection
+}
+
+
+exports.getVnfPreloadData = function(req,res,dbtable,callback){
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ callback(err, 'Unable to get database connection.' + err);
+ return;
+ }
+
+ // Need DB lookup logic here
+ connection.query("SELECT preload_data FROM " + dbtable + " WHERE id="
+ + req.query.id, function(err, rows)
+ {
+ connection.release();
+ if(err) {
+ callback(err);
+ return;
+ }
+ else {
+ var buffer = rows[0].preload_data;
+ var decode_buffer = decodeURI(buffer);
+ var content = JSON.parse(decode_buffer);
+ callback(null,content);
+ return;
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+
+
+exports.getVnfNetworkData = function(req,res,resultObj,privilegeObj){
+
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ res.render("pages/err", {result:{code:'error', msg:"Unable to get database connection. "+ String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+
+ // Need DB lookup logic here
+ connection.query("SELECT id,svc_request_id,svc_action,status,filename,ts,preload_data "
+ + "FROM PRE_LOAD_VNF_NETWORK_DATA ORDER BY id", function(err, rows)
+ {
+ var msgArray = new Array();
+
+ connection.release();
+ if(err) {
+ msgArray = 'Database Error: '+ String(err);
+ res.render("mobility/vnfPreloadNetworkData", {
+ result:{code:'error',msg:msgArray},
+ preloadImportDirectory: properties.preloadImportDirectory,
+ header:process.env.MAIN_MENU
+ });
+ return;
+ }
+ else {
+ var retData = [];
+ for( r=0; r<rows.length; r++)
+ {
+ var rowObj = {};
+ rowObj.row = rows[r];
+ if ( rows[r].filename.length > 0 )
+ {
+ try{
+ var buffer = rows[r].preload_data;
+ var decode_buffer = decodeURI(buffer);
+ var filecontent = JSON.parse(decode_buffer);
+ rowObj.filecontent = filecontent;
+ rowObj.network_name = filecontent.input["network-topology-information"]["network-topology-identifier"]["network-name"];
+ rowObj.network_type = filecontent.input["network-topology-information"]["network-topology-identifier"]["network-type"];
+ }
+ catch(error){
+ msgArray.push('File ' + rows[r].filename + ' has invalid JSON. Error:' + error);
+ }
+ }
+ else {
+ rowObj.filecontent = '';
+ }
+ retData.push(rowObj);
+ }
+ if(msgArray.length>0){
+ resultObj.code = 'failure';
+ resultObj.msg = msgArray;
+ }
+ res.render('mobility/vnfPreloadNetworkData', {
+ retData:retData,
+ result:resultObj,
+ privilege:privilegeObj,
+ preloadImportDirectory: properties.preloadImportDirectory,
+ header:process.env.MAIN_MENU
+ });
+ return;
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+exports.getVnfData = function(req,res,resultObj,privilegeObj){
+
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ res.render("pages/err", {result:{code:'error', msg:"Unable to get database connection. "+ String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+
+ // Need DB lookup logic here
+ connection.query("SELECT id,svc_request_id,svc_action,status,filename,ts,preload_data "
+ + "FROM PRE_LOAD_VNF_DATA ORDER BY id", function(err, rows)
+ {
+ var msgArray = new Array();
+
+ connection.release();
+ if(err) {
+ msgArray = 'Database Error: '+ String(err);
+ res.render("mobility/vnfPreloadData", {
+ result:{code:'error',msg:msgArray},
+ preloadImportDirectory: properties.preloadImportDirectory,
+ header:process.env.MAIN_MENU
+ });
+ return;
+ }
+ else {
+ var retData = [];
+ for( r=0; r<rows.length; r++)
+ {
+ var rowObj = {};
+ rowObj.row = rows[r];
+ if ( rows[r].filename.length > 0 )
+ {
+ try{
+ var buffer = rows[r].preload_data;
+ var s_buffer = decodeURI(buffer);
+ var filecontent = JSON.parse(s_buffer);
+ rowObj.filecontent = filecontent;
+ rowObj.vnf_name = filecontent.input["vnf-topology-information"]["vnf-topology-identifier"]["vnf-name"];
+ rowObj.vnf_type = filecontent.input["vnf-topology-information"]["vnf-topology-identifier"]["vnf-type"];
+ }
+ catch(error){
+ msgArray.push('File ' + rows[r].filename + ' has invalid JSON. Error:' + error);
+ }
+ }
+ else {
+ rowObj.filecontent = '';
+ }
+ retData.push(rowObj);
+ }
+ if(msgArray.length>0){
+ resultObj.code = 'failure';
+ resultObj.msg = msgArray;
+ }
+ res.render('mobility/vnfPreloadData',{
+ retData:retData, result:resultObj,
+ privilege:privilegeObj,
+ header:process.env.MAIN_MENU,
+ preloadImportDirectory: properties.preloadImportDirectory
+ });
+ return;
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+
+exports.findAdminUser = function(email,res,callback) {
+
+
+ var adminUser={};
+ pool.getConnection(function(err,connection) {
+ if(err){
+ console.error( String(err) ); // ALARM
+ res.render("pages/login", {result:{code:'error', msg:"Unable to get database connection. "+ String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+
+ // Need DB lookup logic here
+ connection.query("SELECT email, AES_DECRYPT(password, '" + enckey + "') password, privilege FROM PORTAL_USERS WHERE email='" + email + "'", function(err, rows) {
+
+ connection.release();
+ if(!err) {
+ if ( rows.length > 0 )
+ {
+ rows.forEach(function(row){
+ adminUser = {
+ "email" : row.email,
+ "password" : row.password,
+ "privilege" : row.privilege };
+ });
+ callback(adminUser);
+ return;
+ }else{
+ console.log("no rows returned");
+ res.render("pages/login", {result:{code:'error', msg:'User is not in database.'},header:process.env.MAIN_MENU});
+ return;
+ }
+ } else {
+ res.render("pages/err", {result:{code:'error',msg:'Unexpected no rows returned from database. '+ String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+
+exports.addRow = function(sql,req,res,callback){
+
+ console.log(sql);
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ callback(err, 'Unable to get database connection.' + err);
+ return;
+ }
+
+ connection.query(sql, function(err,result){
+ connection.release();
+ if(err){
+ console.debug('Database operation failed. ' + err );
+ callback(err,'Database operation failed. ' + err );
+ }
+ else
+ {
+ callback(null, result.affectedRows);
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+
+
+exports.addVnfProfile = function(row,res,callback){
+
+ var sqlInsert;
+
+ if ( row.length < 3 )
+ {
+ console.log('Row [' + row + '] does not have enough fields.');
+ callback(null, 'Row [' + row + '] does not have enough fields.');
+ return;
+ }
+
+ sqlInsert = "INSERT INTO VNF_PROFILE ("
+ + "vnf_type,availability_zone_count,equipment_role) VALUES ("
+ + "'" + row[0] + "',"
+ + row[1]
+ + ",'" + row[2] + "')";
+
+ console.log('SQL='+sqlInsert);
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.log( String(err) ); // ALARM
+ callback(err, 'Unable to get database connection.');
+ return;
+ }
+ connection.query(sqlInsert, function(err,result){
+ connection.release();
+ if(err){
+ console.log('Row [' + row + '] failed to insert. ' + err );
+ callback(null,'Row [' + row + '] failed to insert. ' + err );
+ }
+ else
+ {
+ callback(null,'');
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+
+// Add to SVC_LOGIC table
+exports.addDG = function(_module, version, rpc, mode, xmlfile, req,res){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var rows={};
+
+ pool.getConnection(function(err,connection) {
+ if(err){
+ console.error( String(err) ); // ALARM
+ res.render("pages/err", {result:{code:'error', msg:"Unable to get database connection. "+ String(err)},header:process.env.MAIN_MENU});
+ return;
+ }
+
+ var post = {
+ module : _module,
+ rpc : rpc,
+ version : version,
+ mode : mode,
+ active : "N",
+ graph : xmlfile
+ };
+
+ //logger.debug( JSON.stringify(post));
+
+ //connection.query(sqlRequest, function(err,result){
+ connection.query('INSERT INTO SVC_LOGIC SET ?', post, function(err,result){
+ // neat!
+
+ // Need DB lookup logic here
+ connection.query("SELECT module,rpc,version,mode,active,graph FROM SVC_LOGIC", function(err, rows) {
+
+ if(!err) {
+ if ( rows.length > 0 )
+ {
+ res.render('sla/list', { rows: rows, result:{code:'',msg:''}, privilege:privilegeObj,header:process.env.MAIN_MENU } );
+ return;
+ }else{
+ console.log("no rows returned");
+ res.render("pages/home");
+ return;
+ }
+ }
+ connection.on('error', function(err){
+ connection.release();
+ console.log(500, "An error has occurred -- " + err);
+ res.render("pages/home");
+ return;
+ });
+ }); //end query
+
+ connection.release();
+ });
+ //connection.query('INSERT INTO SVC_LOGIC SET ?', post, function(err,result){
+ // neat!
+ //logger.debug('inserted rows');
+ //});
+
+ //if(err){
+ //res.render('pages/home');
+ //}
+ return;
+
+ }); // end of getConnection
+};
+
+exports.activate = function(req,res,_module,rpc,version,mode,callback){
+
+ var sql = "UPDATE SVC_LOGIC SET active=\'Y\' WHERE module=\'"
+ + _module + "' AND rpc=\'"
+ + rpc + "' AND version=\'"
+ + version + "' AND mode=\'"
+ + mode + "'";
+
+ console.log('SQL='+sql);
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ callback(err, 'Unable to get database connection.' + err);
+ return;
+ }
+
+ connection.query(sql, function(err,result){
+
+ connection.release();
+ if(err){
+ callback(err, 'Unable to get database connection.' + err);
+ }
+ else
+ {
+ callback(null,'');
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+
+exports.deactivate = function(req,res,_module,rpc,version,mode,callback){
+
+ var sql = "UPDATE SVC_LOGIC SET active=\'N\' WHERE module=\'"
+ + _module + "' AND rpc=\'"
+ + rpc + "' AND version=\'"
+ + version + "' AND mode=\'"
+ + mode + "'";
+
+ console.log('SQL='+sql);
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ callback(err, 'Unable to get database connection.' + err);
+ return;
+ }
+
+ connection.query(sql, function(err,result){
+
+ connection.release();
+ if(err){
+ callback(err, 'Unable to get database connection.' + err);
+ }
+ else
+ {
+ callback(null,'');
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+exports.global_deactivate = function(req,res,_module,rpc,mode,callback){
+
+ var sql = "UPDATE SVC_LOGIC SET active=\'N\' WHERE module=\'"
+ + _module + "' AND rpc=\'"
+ + rpc + "' AND mode=\'"
+ + mode + "'";
+
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ callback(err, 'Unable to get database connection.' + err);
+ return;
+ }
+
+ connection.query(sql, function(err,result){
+
+ connection.release();
+ if(err){
+ callback(err, err);
+ }
+ else
+ {
+ callback(null,'');
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+
+exports.deleteDG = function(req,res,_module,rpc,version,mode,callback){
+
+ var sql = "DELETE FROM SVC_LOGIC WHERE module=\'"
+ + _module + "' AND rpc=\'"
+ + rpc + "' AND version=\'"
+ + version + "' AND mode=\'"
+ + mode + "'";
+
+ console.log('SQL='+sql);
+
+ pool.getConnection(function(err,connection) {
+
+ if(err){
+ console.error( String(err) ); // ALARM
+ callback(err, 'Unable to get database connection.' + err);
+ return;
+ }
+
+ connection.query(sql, function(err,result){
+
+ connection.release();
+ if(err){
+ callback(err, 'Unable to get database connection.' + err);
+ }
+ else
+ {
+ callback(null,'');
+ }
+ }); //end query
+ }); // end getConnection
+}
+
+
+
+function padLeft(nr, n, str){
+ return Array(n-String(nr).length+1).join(str||'0')+nr;
+}
+
diff --git a/admportal/server/router/routes/gamma.js b/admportal/server/router/routes/gamma.js
new file mode 100644
index 0000000..70e6713
--- /dev/null
+++ b/admportal/server/router/routes/gamma.js
@@ -0,0 +1,1667 @@
+var express = require('express');
+var router = express.Router();
+var exec = require('child_process').exec;
+var util = require('util');
+var fs = require('fs');
+var dbRoutes = require('./dbRoutes');
+var csp = require('./csp');
+var multer = require('multer');
+var bodyParser = require('body-parser');
+var sax = require('sax'),strict=true,parser = sax.parser(strict);
+var async = require('async');
+var l_ = require('lodash');
+
+
+// used for file upload button, retain original file name
+//router.use(bodyParser());
+router.use(bodyParser.urlencoded({
+ extended: true
+}));
+
+//var upload = multer({ dest: process.cwd() + '/uploads/', rename: function(fieldname,filename){ return filename; } });
+
+// multer 1.1
+var storage = multer.diskStorage({
+ destination: function (req, file, cb) {
+ cb(null, process.cwd() + '/uploads/')
+ },
+ filename: function (req, file, cb) {
+ cb(null, file.originalname )
+ }
+});
+
+var upload = multer({
+ storage: storage
+});
+
+
+//router.use(express.json());
+//router.use(express.urlencoded());
+//router.use(multer({ dest: './uploads/' }));
+
+// 1604
+var selectNetworkProfile = "SELECT network_type,technology FROM NETWORK_PROFILE ORDER BY network_type";
+
+var selectNbVlanRange = "SELECT vlan_plan_id,plan_type,purpose,LPAD(range_start,4,0) range_start,LPAD(range_end,4,0) range_end,generated from VLAN_RANGES ORDER BY vlan_plan_id";
+
+var selectNbVlanPool = "SELECT aic_site_id,availability_zone,vlan_plan_id,plan_type,purpose,LPAD(vlan_id,4,0) vlan_id,status FROM VLAN_POOL ORDER BY aic_site_id,availability_zone,vlan_plan_id,vlan_id";
+
+router.get('/getNetworkProfile', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getTable(req,res,selectNetworkProfile,'gamma/networkProfile',{code:'', msg:''}, req.session.loggedInAdmin);
+});
+router.get('/getNbVlanRange', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getTable(req,res,selectNbVlanRange,'gamma/nbVlanRange',{code:'', msg:''}, req.session.loggedInAdmin);
+});
+
+router.get('/getNbVlanPool', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ if (typeof req.query.vlan_plan_id == "undefined"){
+ dbRoutes.getTable(req,res,selectNbVlanPool,'gamma/nbVlanPool',{code:'', msg:''}, req.session.loggedInAdmin);
+ }else{
+ var sql = "SELECT aic_site_id,availability_zone,vlan_plan_id,plan_type,purpose,vlan_id,status FROM VLAN_POOL WHERE vlan_plan_id='" + req.query.vlan_plan_id + "' AND vlan_id BETWEEN "
+ + req.query.range_start + " AND " + req.query.range_end;
+ dbRoutes.getTable(req,res,sql,'gamma/nbVlanPool',{code:'', msg:''}, req.session.loggedInAdmin);
+ }
+});
+
+router.post('/addNetworkProfile', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var network_type = removeNL(req.body.nf_network_type);
+ var technology = removeNL(req.body.nf_technology);
+ var sql = "INSERT INTO NETWORK_PROFILE (network_type,technology) VALUES ("
+ + "'"+ network_type + "',"
+ + "'"+ technology + "')";
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.addRow(sql,req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err)
+ {
+ msgArray.push(err);
+ dbRoutes.getTable(req,res,ucpePhsCredentials, 'gamma/networkProfile', {code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else
+ {
+ if ( result == 1 )
+ {
+ msgArray.push('Successfully added Network Profile.');
+ dbRoutes.getTable(req,res,selectNetworkProfile, 'gamma/networkProfile', {code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ else
+ {
+ msgArray.push('Was not able to add Network Profile.');
+ dbRoutes.getTable(req,res,ucpePhsCredentials, 'gamma/networkProfile', {code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ }
+ });
+});
+
+router.post('/saveNbVlanRange', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var plan_type = req.body.nf_plan_type;
+ var purpose = req.body.nf_purpose;
+ var range_start = padLeft(removeNL(req.body.nf_range_start),4);
+ var range_end = padLeft(removeNL(req.body.nf_range_end),4);
+ var tasks = [];
+ var privilegeObj = req.session.loggedInAdmin;
+
+ tasks.push( function(callback) {
+ dbRoutes.saveNbVlanRange(range_start,range_end,plan_type,purpose,req,res,callback);
+ });
+
+ // will probably need to be a new call that is a transaction if i use a new
+ // plan_type-purpose-counter table.
+ //tasks.push( function(callback) { dbRoutes.addRow(sql,req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err)
+ {
+ msgArray.push(err);
+ dbRoutes.getTable(req,res,selectNbVlanRange, 'gamma/nbVlanRange', {code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else
+ {
+ msgArray.push('Successfully added VLAN Range.');
+ dbRoutes.getTable(req,res,selectNbVlanRange, 'gamma/nbVlanRange', {code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+router.get('/deleteNetworkProfile', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push(function(callback){
+ dbRoutes.executeSQL("DELETE FROM NETWORK_PROFILE WHERE network_type = '" + req.query.network_type + "'", req,res,callback);
+
+ });
+ async.series(tasks, function(err,result)
+ {
+ var msgArray = new Array();
+ if(err){
+ msgArray.push("Error: " + err);
+ dbRoutes.getTable(req,res,selectNetworkProfile, 'gamma/networkProfile', {code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else
+ {
+ if ( result[0] == 1 )
+ {
+ msgArray.push('Successfully deleted Network Profile.');
+ dbRoutes.getTable(req,res,selectNetworkProfile, 'gamma/networkProfile', {code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ else
+ {
+ msgArray.push('No rows removed.');
+ dbRoutes.getTable(req,res,selectNetworkProfile, 'gamma/networkProfile', {code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ }
+ });
+});
+
+router.get('/deleteNbVlanRange', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+
+ tasks.push(function(callback){
+ dbRoutes.deleteNbVlanRange(req.query.vlan_plan_id,req,res,callback);
+ });
+ async.series(tasks, function(err,result)
+ {
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getTable(req,res,selectNbVlanRange, 'gamma/nbVlanRange', {code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else
+ {
+ msgArray.push('Successfully deleted Range.');
+ dbRoutes.getTable(req,res,selectNbVlanRange, 'gamma/nbVlanRange', {code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+router.post('/updateNetworkProfile', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var sql = "UPDATE NETWORK_PROFILE SET "
+ + "network_type='"+ removeNL(req.body.uf_network_type) + "', "
+ + "technology='" + removeNL(req.body.uf_technology) + "' "
+ + "WHERE network_type='" + removeNL(req.body.uf_key_network_type) + "'";
+
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.executeSQL(sql,req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getTable(req,res,selectNetworkProfile, 'gamma/networkProfile', {code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully updated Network Profile.');
+ dbRoutes.getTable(req,res,selectNetworkProfile, 'gamma/networkProfile', {code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+router.post('/updateNbVlanPool', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var sql = "UPDATE VLAN_POOL SET "
+ + "status='"+ removeNL(req.body.uf_status) + "' "
+ + " WHERE aic_site_id='" + removeNL(req.body.uf_key_aic_site_id) + "'"
+ + " AND availability_zone='" + removeNL(req.body.uf_key_availability_zone) + "'"
+ + " AND vlan_plan_id='" + removeNL(req.body.uf_key_vlan_plan_id) + "'"
+ + " AND plan_type='" + removeNL(req.body.uf_key_plan_type) + "'"
+ + " AND purpose='" + removeNL(req.body.uf_key_purpose) + "'"
+ + " AND vlan_id=" + removeNL(req.body.uf_key_vlan_id);
+
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.executeSQL(sql,req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getTable(req,res,selectNbVlanPool, 'gamma/nbVlanPool', {code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully updated Network Profile.');
+ dbRoutes.getTable(req,res,selectNbVlanPool, 'gamma/nbVlanPool', {code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+router.post('/updateNbVlanPool', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+});
+router.get('/generateNbVlanPool', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var vlan_plan_id = req.query.vlan_plan_id;
+ var plan_type = req.query.plan_type;
+ var purpose = req.query.purpose;
+ var range_start = req.query.range_start;
+ var range_end = req.query.range_end;
+ var tasks = [];
+ var privilegeObj = req.session.loggedInAdmin;
+
+ tasks.push( function(callback) {
+ dbRoutes.generateNbVlanPool(range_start,range_end,plan_type,purpose,vlan_plan_id,req,res,callback);
+ });
+
+ // will probably need to be a new call that is a transaction if i use a new
+ // plan_type-purpose-counter table.
+ //tasks.push( function(callback) { dbRoutes.addRow(sql,req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err)
+ {
+ msgArray.push(err);
+ dbRoutes.getTable(req,res,selectNbVlanRange, 'gamma/nbVlanRange', {code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else
+ {
+ msgArray.push('Successfully added VLAN Range.');
+ dbRoutes.getTable(req,res,selectNbVlanRange, 'gamma/nbVlanRange', {code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+///// end 1604
+
+
+// GET
+router.get('/getServiceHoming', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getServiceHoming(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+router.get('/getServiceHomingRollback', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getServiceHomingRollback(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+router.get('/getVlanPool', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getVlanPool(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+router.get('/getAicSite', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getAicSite(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+router.get('/getAicSwitch', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getAicSwitch(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+router.get('/getAicAvailZone', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getAicAvailZone(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+router.get('/getVpePool', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getVpePool(req,res,{code:'', msg:''}, req.session.loggedInAdmin);
+});
+router.get('/getVplspePool', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getVplspePool(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+
+// ROLLBACK SERVICE_HOMING
+router.get('/rollbackServiceHoming', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push(function(callback) {
+ dbRoutes.rollbackServiceHoming(req,res,callback);
+ });
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getServiceHomingRollback(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('SERVICE_HOMING table successfully restored.');
+ dbRoutes.getServiceHoming(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// DELETE SERVICE_HOMING
+router.get('/deleteServiceHoming', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push(function(callback) {
+ dbRoutes.deleteServiceHoming(req,res,callback);
+ });
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getServiceHoming(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from SERVICE_HOMING table.');
+ dbRoutes.getServiceHoming(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+// DELETE AIC_SITE
+router.get('/deleteSite', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push(function(callback) {
+ dbRoutes.deleteSite(req,res,callback);
+ });
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getAicSite(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from AIC_SITE table.');
+ dbRoutes.getAicSite(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// DELETE AIC_SWITCH
+router.get('/deleteSwitch', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push(function(callback) {
+ dbRoutes.deleteSwitch(req,res,callback);
+ });
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getAicSwitch(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from AIC_SWITCH table.');
+ dbRoutes.getAicSwitch(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// DELETE AIC_AVAIL_ZONE_POOL
+router.get('/deleteZone', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push(function(callback) {
+ dbRoutes.deleteZone(req,res,callback);
+ });
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getAicAvailZone(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from AIC_AVAIL_ZONE_POOL table.');
+ dbRoutes.getAicAvailZone(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// DELETE VLAN_ID_POOL
+router.get('/deleteVlanPool', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push(function(callback) {
+ dbRoutes.deleteVlanPool(req,res,callback);
+ });
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVlanPool(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from VLAN_ID_POOL table.');
+ dbRoutes.getVlanPool(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// DELETE VPE_POOL
+router.get('/deleteVpePool', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push(function(callback) {
+ dbRoutes.deleteVpePool(req,res,callback);
+ });
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVpePool(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from VPE_POOL table.');
+ dbRoutes.getVpePool(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+// DELETE VPE_POOL
+router.get('/deleteVplspePool', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push(function(callback) {
+ dbRoutes.deleteVplspePool(req,res,callback);
+ });
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVplspePool(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from VPLSPE_POOL table.');
+ dbRoutes.getVplspePool(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// POST
+router.post('/addServiceHoming', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.addWebServiceHoming(req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getServiceHoming(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully added SERVICE_HOMING');
+ dbRoutes.getServiceHoming(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+// gamma - updateProvStatus
+router.post('/updateProvStatus', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.updateProvStatus(req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVpePool(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully updated Provisioning Status');
+ dbRoutes.getVpePool(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// gamma - updateAicSite
+router.post('/updateAicSite', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.updateAicSite(req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getAicSite(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully updated AIC_SITE table.');
+ dbRoutes.getAicSite(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// gamma - updateAicSwitch
+router.post('/updateAicSwitch', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.updateAicSwitch(req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getAicSwitch(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully updated AIC_SWITCH table.');
+ dbRoutes.getAicSwitch(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// gamma - updateAicAvailZone
+router.post('/updateAicAvailZone', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.updateAicAvailZone(req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getAicAvailZone(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully updated AIC_AVAIL_ZONE_POOL table.');
+ dbRoutes.getAicAvailZone(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// gamma - updateVlanPool
+router.post('/updateVlanPool', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.updateVlanPool(req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVlanPool(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully updated VLAN_ID_POOL table.');
+ dbRoutes.getVlanPool(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// gamma - updateVpePool
+router.post('/updateVpePool', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.updateVpePool(req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVpePool(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully updated VPE_POOL table.');
+ dbRoutes.getVpePool(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// gamma - updateVplspePool
+router.post('/updateVplspePool', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.updateVplspePool(req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVplspePool(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully updated VPLSPE_POOL table.');
+ dbRoutes.getVplspePool(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+// gamma - updateServiceHoming
+router.post('/updateServiceHoming', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.updateServiceHoming(req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getServiceHoming(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully updated SERVICE_HOMING table.');
+ dbRoutes.getServiceHoming(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+router.post('/uploadVLAN', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res, next){
+
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ if(req.file.originalname){
+ if (req.file.originalname.size == 0) {
+ dbRoutes.getVlanPool(req,res,{code:'danger', msg:'There was an error uploading the file, please try again.'},privilegeObj);
+ return;
+ }
+ fs.exists(req.file.path, function(exists) {
+ if(exists) {
+
+ var str = req.file.originalname;
+
+ // check for valid filename format
+ var tagpos = str.search("_ctag_pool");
+ var csvpos = str.search(".csv");
+ if(tagpos != 13 || csvpos != 23){
+ var msgArray = new Array();
+ msgArray.push('Not a valid filename, format must be pp_YYYYMMDDHH_ctag_pool.csv');
+ dbRoutes.getVlanPool(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+
+ try {
+ var csv = require('csv');
+
+ // the job of the parser is to convert a CSV file
+ // to a list of rows (array of rows)
+ var parser = csv.parse({
+ columns: function(line) {
+ // By defining this callback, we get handed the
+ // first line of the spreadsheet. Which we'll
+ // ignore and effectively skip this line from processing
+ },
+ skip_empty_lines: true
+ });
+
+ var row = 0;
+ var f = new Array();
+ var transformer = csv.transform(function(data){
+ // this will get row by row data, so for example,
+ //logger.debug(data[0]+','+data[1]+','+data[2]);
+ f[row] = new Array();
+ for ( col=0; col<data.length; col++ )
+ {
+ f[row][col] = data[col];
+ }
+ row++;
+ });
+
+
+ // called when done with processing the CSV
+ transformer.on("finish", function() {
+
+ var funcArray = new Array();
+
+ function createFunction(lrow,res)
+ {
+ return function(callback) { dbRoutes.addVLAN(lrow,res,callback); }
+ }
+
+ // loop for each row and create an array of callbacks for async.parallelLimit
+ // had to create a function above 'createFunction' to get
+ for (var x=0; x<f.length; x++)
+ {
+ funcArray.push( createFunction(f[x],res) );
+ }
+
+ // make db calls in parrallel
+ //async.parallelLimit(funcArray, 5, function(err,result){
+ async.series(funcArray, function(err,result){
+
+ if ( err ) {
+ dbRoutes.getVlanPool(req,res, result,privilegeObj);
+ return;
+ }
+ else {
+ // result array has an entry in it, success entries are blank, figure out
+ // how many are not blank, aka errors.
+ var rowError = 0;
+ for(var i=0;i<result.length;i++){
+ if ( result[i].length > 0 )
+ {
+ rowError++;
+ }
+ }
+
+ var rowsProcessed = f.length - rowError;
+ result.push(rowsProcessed + ' of ' + f.length + ' rows processed.');
+ if ( rowError > 0 )
+ {
+ result = {code:'failure', msg:result};
+ }
+ else
+ {
+ result = {code:'success', msg:result};
+ }
+ dbRoutes.getVlanPool(req,res,result,privilegeObj);
+ return;
+ }
+ });
+ });
+
+
+ var stream = fs.createReadStream(req.file.path, "utf8");
+ stream.pipe(parser).pipe(transformer);
+
+
+ } catch(ex) {
+ console.error('error:'+ex);
+ msgArray = [];
+ msgArray.push('There was an error uploading the file. '+ex);
+ dbRoutes.getVlanPool(req,res, {code:'danger', msg:msgArray}, privilegeObj);
+ return;
+ }
+
+ } else {
+ msgArray = [];
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVlanPool(req,res, {code:'danger', msg:msgArray}, privilegeObj);
+ return;
+ }
+ });
+ }
+ else {
+ msgArray = [];
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVlanPool(req,res, {code:'danger', msg:msgArray}, privilegeObj);
+ return;
+ }
+
+});
+
+
+// POST
+router.post('/uploadAicSite', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res){
+
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ if(req.file.originalname){
+ if (req.file.originalname.size == 0) {
+ dbRoutes.getAicSite(req,res, {code:'danger', msg:'There was an error uploading the file, please try again.'}, privilegeObj);
+ return;
+ }
+ fs.exists(req.file.path, function(exists) {
+ if(exists) {
+
+ var str = req.file.originalname;
+
+ // check for valid filename format
+ var tagpos = str.search("_site");
+ var csvpos = str.search(".csv");
+ if(tagpos != 13 || csvpos != 18){
+ msgArray.length = 0;
+ msgArray.push('Not a valid filename, format must be pp_YYYYMMDDHH_site.csv');
+ dbRoutes.getAicSite(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+
+ try {
+ var csv = require('csv');
+
+ // the job of the parser is to convert a CSV file
+ // to a list of rows (array of rows)
+ var parser = csv.parse({
+ columns: function(line) {
+ // By defining this callback, we get handed the
+ // first line of the spreadsheet. Which we'll
+ // ignore and effectively skip this line from processing
+ },
+ skip_empty_lines: true
+ });
+
+ var row = 0;
+ var f = new Array();
+ var transformer = csv.transform(function(data){
+ // this will get row by row data, so for example,
+ //logger.debug(data[0]+','+data[1]+','+data[2]);
+
+ // build an array of rows
+ f[row] = new Array();
+ for ( col=0; col<data.length; col++ )
+ {
+ f[row][col] = data[col];
+ }
+ row++;
+ });
+
+ // called when done with processing the CSV
+ transformer.on("finish", function() {
+
+ var funcArray = new Array();
+
+ function createFunction(lrow,res)
+ {
+ return function(callback) { dbRoutes.addAicSite(lrow,res,callback); }
+ }
+
+ // loop for each row and create an array of callbacks for async.parallelLimit
+ // had to create a function above 'createFunction' to get
+ for (var x=0; x<f.length; x++)
+ {
+ funcArray.push( createFunction(f[x],res) );
+ }
+
+ // make db calls in parrallel
+ async.parallelLimit(funcArray, 50, function(err,result){
+
+ if ( err ) {
+ dbRoutes.getAicSite(req,res, result,privilegeObj);
+ return;
+ }
+ else {
+ // result array has an entry in it, success entries are blank, figure out
+ // how many are not blank, aka errors.
+ var rowError = 0;
+ for(var i=0;i<result.length;i++){
+ if ( result[i].length > 0 )
+ {
+ rowError++;
+ }
+ }
+
+ var rowsProcessed = f.length - rowError;
+ result.push(rowsProcessed + ' of ' + f.length + ' rows processed.');
+ if ( rowError > 0 )
+ {
+ result = {code:'failure', msg:result};
+ }
+ else
+ {
+ result = {code:'success', msg:result};
+ }
+ dbRoutes.getAicSite(req,res,result,privilegeObj);
+ return;
+ }
+ });
+ });
+
+ var stream = fs.createReadStream(req.file.path, "utf8");
+ stream.pipe(parser).pipe(transformer);
+
+
+ } catch(ex) {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file. '+ex);
+ dbRoutes.getAicSite(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+ } else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getAicSite(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getAicSite(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ }
+
+} );
+
+// POST
+router.post('/uploadAicSwitch', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res){
+
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ if(req.file.originalname){
+ if (req.file.originalname.size == 0) {
+ dbRoutes.getAicSwitch(req,res,{code:'danger', msg:'There was an error uploading the file, please try again.'},privilegeObj);
+ return;
+ }
+ fs.exists(req.file.path, function(exists) {
+
+ if(exists) {
+
+ var str = req.file.orignalname;
+
+ // check for valid filename format
+ var tagpos = str.search("_switch");
+ var csvpos = str.search(".csv");
+ if(tagpos != 13 || csvpos != 20){
+ msgArray.length = 0;
+ msgArray.push('Not a valid filename, format must be pp_YYYYMMDDHH_switch.csv');
+ dbRoutes.getAicSwitch(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+
+ try {
+ var csv = require('csv');
+
+ // the job of the parser is to convert a CSV file
+ // to a list of rows (array of rows)
+ var parser = csv.parse({
+ columns: function(line) {
+ // By defining this callback, we get handed the
+ // first line of the spreadsheet. Which we'll
+ // ignore and effectively skip this line from processing
+ },
+ skip_empty_lines: true
+ });
+
+ var row = 0;
+ var f = new Array();
+ var transformer = csv.transform(function(data){
+ // this will get row by row data, so for example,
+ //logger.debug(data[0]+','+data[1]+','+data[2]);
+
+ // build an array of rows
+ f[row] = new Array();
+ for ( col=0; col<data.length; col++ )
+ {
+ f[row][col] = data[col];
+ }
+ row++;
+ });
+
+ // called when done with processing the CSV
+ transformer.on("finish", function() {
+
+ var funcArray = new Array();
+
+ function createFunction(lrow,res)
+ {
+ return function(callback) { dbRoutes.addAicSwitch(lrow,res,callback); }
+ }
+
+ // loop for each row and create an array of callbacks for async.parallelLimit
+ // had to create a function above 'createFunction' to get
+ for (var x=0; x<f.length; x++)
+ {
+ funcArray.push( createFunction(f[x],res) );
+ }
+
+ // make db calls in parrallel
+ async.parallelLimit(funcArray, 50, function(err,result){
+
+ if ( err ) {
+ dbRoutes.getAicSwitch(req,res,result,privilegeObj);
+ return;
+ }
+ else {
+ // result array has an entry in it, success entries are blank, figure out
+ // how many are not blank, aka errors.
+ var rowError = 0;
+ for(var i=0;i<result.length;i++){
+ if ( result[i].length > 0 )
+ {
+ rowError++;
+ }
+ }
+
+ var rowsProcessed = f.length - rowError;
+ result.push(rowsProcessed + ' of ' + f.length + ' rows processed.');
+ if ( rowError > 0 )
+ {
+ result = {code:'failure', msg:result};
+ }
+ else
+ {
+ result = {code:'success', msg:result};
+ }
+ dbRoutes.getAicSwitch(req,res,result,privilegeObj);
+ return;
+ }
+ });
+ });
+
+ var stream = fs.createReadStream(req.file.path, "utf8");
+ stream.pipe(parser).pipe(transformer);
+
+
+ } catch(ex) {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file. '+ex);
+ dbRoutes.getAicSwitch(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+ } else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getAicSwitch(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getAicSwitch(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+} );
+
+// POST
+router.post('/uploadAicAvailZone', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res){
+
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ if(req.file.originalname){
+ if (req.file.originalname.size == 0) {
+ dbRoutes.getAicAvailZone(req,res,{code:'failure', msg:'There was an error uploading the file, please try again.'},privilegeObj);
+ return;
+ }
+ fs.exists(req.file.path, function(exists) {
+
+ if(exists) {
+
+ var str = req.file.originalname;
+
+ // check for valid filename format
+ var tagpos = str.search("_availabilityzone");
+ var csvpos = str.search(".csv");
+ if(tagpos != 13 || csvpos != 30){
+ msgArray.length = 0;
+ msgArray.push('Not a valid filename, format must be pp_YYYYMMDDHH_availabilityzone.csv');
+ dbRoutes.getAicAvailZone(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+
+ try {
+ var csv = require('csv');
+
+ // the job of the parser is to convert a CSV file
+ // to a list of rows (array of rows)
+ var parser = csv.parse({
+ columns: function(line) {
+ // By defining this callback, we get handed the
+ // first line of the spreadsheet. Which we'll
+ // ignore and effectively skip this line from processing
+ },
+ skip_empty_lines: true
+ });
+
+ var row = 0;
+ var f = new Array();
+ var transformer = csv.transform(function(data){
+ // this will get row by row data, so for example,
+ //logger.debug(data[0]+','+data[1]+','+data[2]);
+
+ // build an array of rows
+ f[row] = new Array();
+ for ( col=0; col<data.length; col++ )
+ {
+ f[row][col] = data[col];
+ }
+ row++;
+ });
+
+ // called when done with processing the CSV
+ transformer.on("finish", function() {
+
+ var funcArray = new Array();
+
+ function createFunction(lrow,res)
+ {
+ return function(callback) { dbRoutes.addAicAvailZone(lrow,res,callback); }
+ }
+
+ // loop for each row and create an array of callbacks for async.parallelLimit
+ // had to create a function above 'createFunction' to get
+ for (var x=0; x<f.length; x++)
+ {
+ funcArray.push( createFunction(f[x],res) );
+ }
+
+ // make db calls in parrallel
+ async.parallelLimit(funcArray, 50, function(err,result){
+
+ if ( err ) {
+ dbRoutes.getAicAvailZone(req,res,result,privilegeObj);
+ return;
+ }
+ else {
+ // result array has an entry in it, success entries are blank, figure out
+ // how many are not blank, aka errors.
+ var rowError = 0;
+ for(var i=0;i<result.length;i++){
+ if ( result[i].length > 0 )
+ {
+ rowError++;
+ }
+ }
+
+ var rowsProcessed = f.length - rowError;
+ result.push(rowsProcessed + ' of ' + f.length + ' rows processed.');
+ if ( rowError > 0 )
+ {
+ result = {code:'failure', msg:result};
+ }
+ else
+ {
+ result = {code:'success', msg:result};
+ }
+ dbRoutes.getAicAvailZone(req,res,result,privilegeObj);
+ return;
+ }
+ });
+ });
+
+ var stream = fs.createReadStream(req.file.path, "utf8");
+ stream.pipe(parser).pipe(transformer);
+
+
+ } catch(ex) {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file. '+ex);
+ dbRoutes.getAicAvailZone(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+ } else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getAicAvailZone(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getAicAvailZone(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+} );
+
+// POST
+router.post('/uploadVpePool', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res){
+
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ if(req.file.originalname){
+ if (req.file.originalname.size == 0) {
+ dbRoutes.getVpePool(req,res,{code:'failure', msg:'There was an error uploading the file, please try again.'},privilegeObj);
+ return;
+ }
+ fs.exists(req.file.path, function(exists) {
+
+ if(exists) {
+
+ var str = req.file.originalname;
+
+ // check for valid filename format
+ var tagpos = str.search("_vpe");
+ var csvpos = str.search(".csv");
+ if(tagpos != 13 || csvpos != 17){
+ msgArray.length = 0;
+ msgArray.push('Not a valid filename, format must be pp_YYYYMMDDHH_vpe.csv');
+ var resultObj = {code:'failure', msg:msgArray};
+ dbRoutes.getVpePool(req,res,resultObj,privilegeObj);
+ return;
+ }
+
+ try {
+ var csv = require('csv');
+
+ // the job of the parser is to convert a CSV file
+ // to a list of rows (array of rows)
+ var parser = csv.parse({
+ columns: function(line) {
+ // By defining this callback, we get handed the
+ // first line of the spreadsheet. Which we'll
+ // ignore and effectively skip this line from processing
+ },
+ skip_empty_lines: true
+ });
+
+ var row = 0;
+ var f = new Array();
+ var transformer = csv.transform(function(data){
+ // this will get row by row data, so for example,
+ //logger.debug(data[0]+','+data[1]+','+data[2]);
+
+ // build an array of rows
+ f[row] = new Array();
+ for ( col=0; col<data.length; col++ )
+ {
+ f[row][col] = data[col];
+ }
+ row++;
+ });
+
+ // called when done with processing the CSV
+ transformer.on("finish", function() {
+
+ var funcArray = new Array();
+
+ function createFunction(lrow,res)
+ {
+ return function(callback) { dbRoutes.addVpePool(lrow,res,callback); }
+ }
+
+ // loop for each row and create an array of callbacks for async.parallelLimit
+ // had to create a function above 'createFunction' to get
+ for (var x=0; x<f.length; x++)
+ {
+ funcArray.push( createFunction(f[x],res) );
+ }
+
+ // make db calls in parrallel
+ async.parallelLimit(funcArray, 50, function(err,result){
+
+ if ( err ) {
+ dbRoutes.getVpePool(req,res,result,privilegeObj);
+ return;
+ }
+ else {
+ // result array has an entry in it, success entries are blank, figure out
+ // how many are not blank, aka errors.
+ var rowError = 0;
+ for(var i=0;i<result.length;i++){
+ if ( result[i].length > 0 )
+ {
+ rowError++;
+ }
+ }
+
+ var rowsProcessed = f.length - rowError;
+ result.push(rowsProcessed + ' of ' + f.length + ' rows processed.');
+ if ( rowError > 0 )
+ {
+ result = {code:'failure', msg:result};
+ }
+ else
+ {
+ result = {code:'success', msg:result};
+ }
+ dbRoutes.getVpePool(req,res,result,privilegeObj);
+ return;
+ }
+ });
+ });
+
+ var stream = fs.createReadStream(req.file.path, "utf8");
+ stream.pipe(parser).pipe(transformer);
+
+
+ } catch(ex) {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file. '+ex);
+ dbRoutes.getVpePool(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+ } else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVpePool(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVpePool(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+} );
+
+// POST
+router.post('/uploadVplspePool', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res){
+
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ if(req.file.originalname){
+ if (req.file.originalname.size == 0) {
+ dbRoutes.getVplspePool(req,res,{code:'failure', msg:'There was an error uploading the file, please try again.'},privilegeObj);
+ return;
+ }
+ fs.exists(req.file.path, function(exists) {
+
+ if(exists) {
+
+ var str = req.file.originalname;
+
+ // check for valid filename format
+ var tagpos = str.search("_vpls");
+ var csvpos = str.search(".csv");
+ if(tagpos != 13 || csvpos != 18){
+ msgArray.length = 0;
+ msgArray.push('Not a valid filename, format must be pp_YYYYMMDDHH_vpls.csv');
+ dbRoutes.getVplspePool(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+
+ try {
+ var csv = require('csv');
+
+ // the job of the parser is to convert a CSV file
+ // to a list of rows (array of rows)
+ var parser = csv.parse({
+ columns: function(line) {
+ // By defining this callback, we get handed the
+ // first line of the spreadsheet. Which we'll
+ // ignore and effectively skip this line from processing
+ },
+ skip_empty_lines: true
+ });
+
+ var row = 0;
+ var f = new Array();
+ var transformer = csv.transform(function(data){
+ // this will get row by row data, so for example,
+ //logger.debug(data[0]+','+data[1]+','+data[2]);
+
+ // build an array of rows
+ f[row] = new Array();
+ for ( col=0; col<data.length; col++ )
+ {
+ f[row][col] = data[col];
+ }
+ row++;
+ });
+
+ // called when done with processing the CSV
+ transformer.on("finish", function() {
+
+ var funcArray = new Array();
+
+ function createFunction(lrow,res)
+ {
+ return function(callback) { dbRoutes.addVplspePool(lrow,res,callback); }
+ }
+ // loop for each row and create an array of callbacks for async.parallelLimit
+ // had to create a function above 'createFunction' to get
+ for (var x=0; x<f.length; x++)
+ {
+ funcArray.push( createFunction(f[x],res) );
+ }
+
+ // make db calls in parrallel
+ async.parallelLimit(funcArray, 50, function(err,result){
+
+ if ( err ) {
+ dbRoutes.getVplspePool(req,res,result,privilegeObj);
+ return;
+ }
+ else {
+ // result array has an entry in it, success entries are blank, figure out
+ // how many are not blank, aka errors.
+ var rowError = 0;
+ for(var i=0;i<result.length;i++){
+ if ( result[i].length > 0 )
+ {
+ rowError++;
+ }
+ }
+ var rowsProcessed = f.length - rowError;
+ result.push(rowsProcessed + ' of ' + f.length + ' rows processed.');
+ if ( rowError > 0 )
+ {
+ result = {code:'failure', msg:result};
+ }
+ else
+ {
+ result = {code:'success', msg:result};
+ }
+ dbRoutes.getVplspePool(req,res,result,privilegeObj);
+ return;
+ }
+ });
+ });
+
+ var stream = fs.createReadStream(req.file.path, "utf8");
+ stream.pipe(parser).pipe(transformer);
+
+
+ } catch(ex) {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file. '+ex);
+ dbRoutes.getVplspePool(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+ } else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVplspePool(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVplspePool(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+} );
+
+// POST
+router.post('/uploadServiceHoming', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res)
+{
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ if(req.file.originalname)
+ {
+ if (req.file.originalname.size == 0) {
+ dbRoutes.getServiceHoming(req,res,{code:'failure', msg:'There was an error uploading the file, please try again.'},privilegeObj);
+ return;
+ }
+ fs.exists(req.file.path, function(exists)
+ {
+ if(exists)
+ {
+ var str = req.file.originalname;
+
+ // check for valid filename format
+ var csvpos = str.search(".csv");
+ if( (l_.startsWith(str,'aichoming_') != true) || csvpos != 18)
+ {
+ msgArray.length = 0;
+ msgArray.push('Not a valid filename, format must be aichoming_mmddYYYY.csv');
+ //msgArray.push('Not a valid filename, format must be pp_YYYYMMDDHH_vpls.csv');
+ dbRoutes.getServiceHoming(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+
+ try
+ {
+ var csv = require('csv');
+
+ // the job of the parser is to convert a CSV file
+ // to a list of rows (array of rows)
+ var parser = csv.parse({
+ columns: function(line) {
+ // By defining this callback, we get handed the
+ // first line of the spreadsheet. Which we'll
+ // ignore and effectively skip this line from processing
+ },
+ skip_empty_lines: true
+ });
+
+ var row = 0;
+ var f = new Array();
+ var csvrows = new Array();
+ var transformer = csv.transform(function(data){
+ // this will get row by row data, so for example,
+ //logger.debug(data[0]+','+data[1]+','+data[2]);
+
+ // build an array of rows
+ f[row] = new Array();
+ for ( col=0; col<data.length; col++ )
+ {
+ f[row][col] = data[col];
+ }
+ row++;
+ });
+
+ // called when done with processing the CSV
+ transformer.on("finish", function()
+ {
+ var funcArray = new Array();
+
+ function createFunction(lrow,res)
+ {
+ return function(callback) { dbRoutes.addServiceHoming(lrow,req,res,callback); }
+ }
+ funcArray.push(function(callback) {
+ dbRoutes.saveServiceHoming(req,res,callback);
+ });
+ // loop for each row and create an array of callbacks for async.parallelLimit
+ // had to create a function above 'createFunction' to get
+ for (var x=0; x<f.length; x++)
+ {
+ funcArray.push( createFunction(f[x],res) );
+ }
+
+ // make db calls in series
+ async.series(funcArray, function(err,result)
+ {
+ if ( err )
+ {
+ result = {code:'failure', msg:result};
+ dbRoutes.getServiceHoming(req,res,result,privilegeObj);
+ return;
+ }
+ else
+ { // result array has an entry in it, success entries are blank, figure out
+ // how many are not blank, aka errors.
+ var rowError = 0;
+ for(var i=0;i<result.length;i++)
+ {
+ if ( result[i].length > 0 )
+ {
+ rowError++;
+ }
+ }
+ var rowsProcessed = f.length - rowError;
+ result.push(rowsProcessed + ' of ' + f.length + ' rows processed.');
+ if ( rowError > 0 )
+ {
+ result = {code:'failure', msg:result};
+ }
+ else
+ {
+ result = {code:'success', msg:result};
+ }
+ dbRoutes.getServiceHoming(req,res,result,privilegeObj);
+ return;
+ }
+ });
+ });
+
+ var stream = fs.createReadStream(req.file.path, "utf8");
+ stream.pipe(parser).pipe(transformer);
+
+
+ } catch(ex) {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file. '+ex);
+ dbRoutes.getServiceHoming(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+ } else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getServiceHoming(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ else
+ {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getServiceHoming(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+} );
+function removeNL(s) {
+ /*
+ ** Remove NewLine, CarriageReturn and Tab characters from a String
+ ** s string to be processed
+ ** returns new string
+ */
+ r = "";
+ for (i=0; i < s.length; i++)
+ {
+ if (s.charAt(i) != '\n' &&
+ s.charAt(i) != '\r' &&
+ s.charAt(i) != '\t')
+ {
+ r += s.charAt(i);
+ }
+ }
+ return r;
+}
+function padLeft(nr, n, str){
+ return Array(n-String(nr).length+1).join(str||'0')+nr;
+}
+
+
+module.exports = router;
diff --git a/admportal/server/router/routes/helpers.js b/admportal/server/router/routes/helpers.js
new file mode 100644
index 0000000..6ac8215
--- /dev/null
+++ b/admportal/server/router/routes/helpers.js
@@ -0,0 +1,66 @@
+
+var _ = require('lodash');
+var csvtojson = require('csvtojson');
+var async = require('async');
+var uuid = require('node-uuid'); // generate a uuid with "uuid.v1()"
+var path = require('path');
+var fs = require("fs");
+var moment = require('moment');
+
+var helpers = module.exports;
+
+function puts(obj) { console.log(obj); }
+function putd(obj) { console.log(obj); }
+helpers.puts = puts;
+helpers.putd = putd;
+
+
+helpers.readCsv = function(filedir, filename, callback) {
+
+
+ var Converter=csvtojson.Converter;
+ var csvFileName=path.join(filedir,filename);
+ var fileStream=fs.createReadStream(csvFileName);
+ fileStream.on('error', function(err){
+ callback(err, null);
+ });
+ var param={noheader:true, checkType:false};
+ var csvConverter=new Converter(param);
+ csvConverter.on("end_parsed",function(jsonObj){
+ var returnValue = jsonObj;
+ callback(null, returnValue);
+ });
+ fileStream.on('error', function(err) {
+ putd(err);
+ callback(err,"");
+ });
+ fileStream.pipe(csvConverter);
+}
+
+helpers.getParam = function(csv, matchField, matchValue, returnField) {
+ dataRow=_.find(csv, matchField, matchValue);
+ dataValue=dataRow[returnField];
+ return dataValue;
+}
+
+helpers.writeOutput = function(req, filename, jsonOutput, callback) {
+ try {
+ fs.writeFileSync(filename, jsonOutput);
+ }
+ catch(err){
+ callback(err);
+ }
+}
+
+helpers.getFileName = function(req, defFilename) {
+
+ var fileObj = null;
+ for (var x=0; x < req.files.length; x++)
+ {
+ var fileObj = req.files[x];
+ if ( fileObj.filename.indexOf(defFilename) != -1 ){
+ return fileObj.filename;
+ }
+ }
+ return null;
+}
diff --git a/admportal/server/router/routes/mobility.js b/admportal/server/router/routes/mobility.js
new file mode 100644
index 0000000..1c45452
--- /dev/null
+++ b/admportal/server/router/routes/mobility.js
@@ -0,0 +1,1339 @@
+var express = require('express');
+var router = express.Router();
+var exec = require('child_process').exec;
+var util = require('util');
+var fs = require('fs.extra');
+var dbRoutes = require('./dbRoutes');
+var csp = require('./csp');
+var multer = require('multer');
+var bodyParser = require('body-parser');
+var sax = require('sax'),strict=true,parser = sax.parser(strict);
+var async = require('async');
+var l_ = require('lodash');
+var dateFormat = require('dateformat');
+var properties = require(process.env.SDNC_CONFIG_DIR + '/admportal.json');
+
+
+// pass host, username and password to ODL
+// target host for ODL request
+var username = properties.odlUser;
+var password = properties.odlPasswd;
+var auth = 'Basic ' + new Buffer(username + ':' + password).toString('base64');
+var host = properties.odlHost;
+var port = properties.odlPort;
+
+var header = {'Host': host, 'Authorization': auth, 'Content-Type': 'application/json'};
+var options = {
+ host : host,
+ headers : header,
+ port : port,
+ rejectUnauthorized:false,
+ strictSSL: false
+};
+
+// Connection to OpenDaylight
+Odl = require('./Odl');
+
+// used for file upload button, retain original file name
+//router.use(bodyParser());
+//router.use(bodyParser.urlencoded({
+ //extended: true
+//}));
+
+//var upload = multer({ dest: process.cwd() + '/uploads/', rename: function(fieldname,filename){ return filename; } });
+
+// multer 1.1
+var storage = multer.diskStorage({
+ destination: function (req, file, cb) {
+ cb(null, process.cwd() + '/uploads/')
+ },
+ filename: function (req, file, cb) {
+ cb(null, file.originalname )
+ }
+});
+
+var upload = multer({
+ storage: storage
+});
+
+
+
+
+// GET
+router.get('/getVnfData', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getVnfData(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+router.get('/getVmNetworks', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getVmNetworks(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+router.get('/getVnfProfile', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getVnfProfile(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+router.get('/getVnfNetworks', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getVnfNetworks(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+router.get('/getVmProfile', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getVmProfile(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+////////
+router.get('/getVnfNetworkData', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.getVnfNetworkData(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+
+router.get('/viewVnfNetworkData', csp.checkAuth, function(req,res)
+{
+ var privilegeObj = req.session.loggedInAdmin;
+ var resp_msg = '';
+ var network_name = req.query.network_name;
+ var network_type = req.query.network_type;
+ var tasks = [];
+
+ tasks.push(function(callback){
+ Odl.GetPreloadVnfData('/restconf/config/VNF-API:preload-vnfs/vnf-preload-list/'
+ + encodeURIComponent(network_name) + '/' + encodeURIComponent(network_type) + '/', options,res,callback);
+
+ });
+ async.series(tasks, function(err,result)
+ {
+ var msgArray = new Array();
+ if(err){
+ resp_msg = err;
+ res.render('mobility/displayVnfNetworkData', {result:{code:'failure', msg:resp_msg}, header:process.env.MAIN_MENU});
+ return;
+ }
+ else{
+ resp_msg = JSON.stringify(JSON.parse(result[0],null,4));
+ res.render('mobility/displayVnfNetworkData', {result:{code:'success', msg:JSON.parse(result[0])}, header:process.env.MAIN_MENU});
+ return;
+ }
+ });
+
+});
+
+router.get('/viewVnfData', csp.checkAuth, function(req,res)
+{
+ var privilegeObj = req.session.loggedInAdmin;
+ var resp_msg = '';
+ var vnf_name = req.query.vnf_name;
+ var vnf_type = req.query.vnf_type;
+ var tasks = [];
+
+ tasks.push(function(callback){
+ Odl.GetPreloadVnfData('/restconf/config/VNF-API:preload-vnfs/vnf-preload-list/'
+ + encodeURIComponent(vnf_name) + '/' + encodeURIComponent(vnf_type) + '/', options,res,callback);
+
+ });
+ async.series(tasks, function(err,result)
+ {
+ var msgArray = new Array();
+ if(err){
+ resp_msg = err;
+ res.render('mobility/displayVnfData', {result:{code:'failure', msg:resp_msg}, header:process.env.MAIN_MENU});
+ return;
+ }
+ else{
+ resp_msg = JSON.stringify(JSON.parse(result[0],null,4));
+ res.render('mobility/displayVnfData', {result:{code:'success', msg:JSON.parse(result[0])}, header:process.env.MAIN_MENU});
+ return;
+ }
+ });
+
+});
+
+router.get('/loadVnfNetworkData', csp.checkAuth, dbRoutes.checkDB, function(req,res)
+{
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var msgArray = new Array();
+
+ if ( req.query.status != 'pending' )
+ {
+ msgArray.push("Upload Status must be in 'pending' state.");
+ dbRoutes.getVnfNetworkData(req,res, {code:'failure', msg:msgArray}, privilegeObj);
+ return;
+ }
+
+ // build request-id
+ var now = new Date();
+ var df = dateFormat(now,"isoDateTime");
+ var rnum = Math.floor((Math.random() * 9999) +1);
+ var svc_req_id = req.query.id + "-" + df + "-" + rnum;
+
+ var tasks = [];
+
+ // first get the contents of the file from the db
+ tasks.push(function(callback){
+ dbRoutes.getVnfPreloadData(req,res,"PRE_LOAD_VNF_NETWORK_DATA",callback);
+ });
+
+ // then format the request and send it using the arg1 parameter
+ // which is the contents of the file returned from the previous function
+ // call in the tasks array
+ tasks.push(function(arg1,callback){
+
+ var s_file = JSON.stringify(arg1);
+
+ // remove the last two braces, going to add the headers there
+ // will add them back later.
+ s_file = s_file.substring(0, (s_file.length-2));
+
+ // add the request-information header
+ s_file = s_file.concat(',"request-information": {"request-action": "PreloadNetworkRequest"}');
+
+ // add the sdnc-request-header
+ s_file = s_file.concat(',"sdnc-request-header": {"svc-request-id":"');
+ s_file = s_file.concat(svc_req_id);
+ s_file = s_file.concat('","svc-action": "reserve"}');
+
+ // add the two curly braces at the end that we stripped off
+ s_file = s_file.concat('}}');
+
+ Odl.Post('/restconf/operations/VNF-API:preload-network-topology-operation',
+ options,s_file,res,callback);
+ });
+
+ // if successful then update the status
+ tasks.push(function(arg1,callback){
+ dbRoutes.executeSQL("UPDATE PRE_LOAD_VNF_NETWORK_DATA SET status='uploaded',svc_request_id='"
+ + svc_req_id + "',svc_action='reserve' WHERE id="+req.query.id,req,res,callback);
+ });
+
+ // use the waterfall method of making calls
+ async.waterfall(tasks, function(err,result)
+ {
+ var msgArray = new Array();
+ if(err){
+ msgArray.push("Error posting pre-load data to ODL: "+err);
+ dbRoutes.getVnfNetworkData(req,res, {code:'failure', msg:msgArray}, privilegeObj);
+ return;
+ }
+ else{
+ msgArray.push('Successfully loaded VNF pre-loaded data.');
+ dbRoutes.getVnfNetworkData(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+router.get('/loadVnfData', csp.checkAuth, dbRoutes.checkDB, function(req,res)
+{
+ var privilegeObj = req.session.loggedInAdmin;
+ var full_path_file_name = process.cwd() + "/uploads/" + req.query.filename
+ var msgArray = new Array();
+
+ if ( req.query.status != 'pending' )
+ {
+ msgArray.push("Upload Status must be in 'pending' state.");
+ dbRoutes.getVnfData(req,res, {code:'failure', msg:msgArray}, privilegeObj);
+ return;
+ }
+
+ // build request-id
+ var now = new Date();
+ var df = dateFormat(now,"isoDateTime");
+ var rnum = Math.floor((Math.random() * 9999) +1);
+ var svc_req_id = req.query.id + "-" + df + "-" + rnum;
+
+ var tasks = [];
+
+ // first get the contents of the file from the db
+ tasks.push(function(callback){
+ dbRoutes.getVnfPreloadData(req,res,"PRE_LOAD_VNF_DATA",callback);
+ });
+
+ // then format the request and send it using the arg1 parameter
+ // which is the contents of the file returned from the previous function
+ // call in the tasks array
+ tasks.push(function(arg1,callback){
+
+ var s1_file = JSON.stringify(arg1);
+ var s_file = decodeURI(s1_file);
+
+
+ // remove the last two braces, going to add the headers there
+ // will add them back later.
+ s_file = s_file.substring(0, (s_file.length-2));
+
+ // add the request-information header
+ s_file = s_file.concat(',"request-information": {"request-action": "PreloadVNFRequest"}');
+
+ // add the sdnc-request-header
+ s_file = s_file.concat(',"sdnc-request-header": {"svc-request-id":"');
+ s_file = s_file.concat(svc_req_id);
+ s_file = s_file.concat('","svc-action": "reserve"}');
+
+ // add the two curly braces at the end that we stripped off
+ s_file = s_file.concat('}}');
+
+ Odl.Post('/restconf/operations/VNF-API:preload-vnf-topology-operation',
+ options,s_file,res,callback);
+ });
+
+ // if successful then update the status
+ tasks.push(function(arg1,callback){
+ dbRoutes.executeSQL("UPDATE PRE_LOAD_VNF_DATA SET status='uploaded',svc_request_id='"
+ + svc_req_id + "',svc_action='reserve' WHERE id="+req.query.id,req,res,callback);
+ });
+
+ // use the waterfall method of making calls
+ async.waterfall(tasks, function(err,result)
+ {
+ var msgArray = new Array();
+ if(err){
+ msgArray.push("Error posting pre-load data to ODL: "+err);
+ dbRoutes.getVnfData(req,res, {code:'failure', msg:msgArray}, privilegeObj);
+ return;
+ }
+ else{
+ msgArray.push('Successfully loaded VNF pre-loaded data.');
+ dbRoutes.getVnfData(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+router.get('/deleteVnfNetworkData', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ var sql = 'DELETE FROM PRE_LOAD_VNF_NETWORK_DATA WHERE id=' + req.query.id;
+
+ // if status is pending, then we do not have to call
+ // ODL, just remove from db
+ if (req.query.status == 'pending'){
+ tasks.push(function(callback) {
+ dbRoutes.executeSQL(sql,req,res,callback);
+ });
+ } else {
+ // format the request to ODL
+ var inputString = '{"input":{"network-topology-information":{"network-topology-identifier":{"service-type":"SDN-MOBILITY","network-name": "';
+ inputString = inputString.concat(req.query.network_name);
+ inputString = inputString.concat('","network-type":"');
+ inputString = inputString.concat(req.query.network_type);
+ inputString = inputString.concat('"}},');
+
+ // add the request-information header
+ inputString = inputString.concat('"request-information": {"request-action": "DeletePreloadNetworkRequest"},');
+
+ // add the sdnc-request-header
+ inputString = inputString.concat('"sdnc-request-header": {"svc-request-id":"');
+ inputString = inputString.concat(req.query.svc_request_id);
+ inputString = inputString.concat('","svc-action": "delete"}}}');
+
+ tasks.push(function(callback) {
+ Odl.Post('/restconf/operations/VNF-API:preload-network-topology-operation',
+ options,inputString,res,callback);
+ });
+ tasks.push(function(callback) {
+ dbRoutes.executeSQL(sql,req,res,callback);
+ });
+ }
+ async.series(tasks, function(err,result){
+
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVnfNetworkData(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from PRE_LOAD_VNF_NETWORK_DATA table and ODL.');
+ dbRoutes.getVnfNetworkData(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+router.get('/deleteVnfData', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ var sql = 'DELETE FROM PRE_LOAD_VNF_DATA WHERE id=' + req.query.id;
+
+ // if status is pending, then we do not have to call
+ // ODL, just remove from db
+ if (req.query.status == 'pending'){
+ tasks.push(function(callback) {
+ dbRoutes.executeSQL(sql,req,res,callback);
+ });
+ } else {
+ var inputString = '{"input":{"vnf-topology-information":{"vnf-topology-identifier":{"service-type":"SDN-MOBILITY","vnf-name": "';
+ inputString = inputString.concat(req.query.vnf_name);
+ inputString = inputString.concat('","vnf-type":"');
+ inputString = inputString.concat(req.query.vnf_type);
+ inputString = inputString.concat('"}},');
+
+ // add the request-information header
+ inputString = inputString.concat('"request-information": {"request-action": "DeletePreloadVNFRequest"},');
+
+ // add the request-information header
+ //inputString = inputString.concat('"request-information": {"request-id": "259c0f93-23cf-46ad-84dc-162ea234fff1",');
+ //inputString = inputString.concat('"source": "ADMINPORTAL",');
+ //inputString = inputString.concat('"order-version": "1",');
+ //inputString = inputString.concat('"notification-url": "notused-this would be infrastructure portal",');
+ //inputString = inputString.concat('"order-number": "1",');
+ //inputString = inputString.concat('"request-action": "DeletePreloadVNFRequest"},');
+
+ // add the sdnc-request-header
+ inputString = inputString.concat('"sdnc-request-header": {"svc-request-id":"');
+ inputString = inputString.concat(req.query.svc_request_id);
+ inputString = inputString.concat('","svc-action": "delete"}}}');
+
+ //inputString = inputString.concat('"sdnc-request-header":{');
+ //inputString = inputString.concat('"svc-request-id": "2015-01-15T14:34:54.st1101a",');
+ //inputString = inputString.concat('"svc-notification-url": "not used",');
+ //inputString = inputString.concat('"svc-action": "delete"}}}');
+
+ tasks.push(function(callback) {
+ Odl.Post('/restconf/operations/VNF-API:preload-vnf-topology-operation',
+ options,inputString,res,callback);
+ });
+ tasks.push(function(callback) {
+ dbRoutes.executeSQL(sql,req,res,callback);
+ });
+ }
+ async.series(tasks, function(err,result){
+
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVnfData(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from PRE_LOAD_VNF_DATA table and ODL.');
+ dbRoutes.getVnfData(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+router.get('/deleteVmProfile', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ var sql = '';
+
+ sql = "DELETE FROM VM_PROFILE WHERE vnf_type='" + req.query.vnf_type + "'"
+ + " AND vm_type='" + req.query.vm_type + "'";
+
+ tasks.push(function(callback) {
+ dbRoutes.executeSQL(sql,req,res,callback);
+ });
+ async.series(tasks, function(err,result)
+ {
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVmProfile(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from VM_PROFILE table.');
+ dbRoutes.getVmProfile(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+router.get('/deleteVnfNetwork', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ var sql = '';
+
+ sql = "DELETE FROM VNF_NETWORKS WHERE vnf_type='" + req.query.vnf_type + "'"
+ + " AND network_role='" + req.query.network_role + "'";
+
+ tasks.push(function(callback) {
+ dbRoutes.executeSQL(sql,req,res,callback);
+ });
+ async.series(tasks, function(err,result)
+ {
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVnfNetwork(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from VNF_NETWORKS table.');
+ dbRoutes.getVnfNetworks(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+router.get('/deleteVnfProfile', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ var sql = '';
+
+ sql = "DELETE FROM VNF_PROFILE WHERE vnf_type='" + req.query.vnf_type + "'";
+
+ tasks.push(function(callback) {
+ dbRoutes.executeSQL(sql,req,res,callback);
+ });
+ async.series(tasks, function(err,result)
+ {
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVnfProfile(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from VNF_PROFILE table.');
+ dbRoutes.getVnfProfile(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+router.get('/deleteVmNetwork', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ var sql = '';
+
+ sql = "DELETE FROM VM_NETWORKS WHERE vnf_type='" + req.query.vnf_type
+ + "' AND vm_type='" + req.query.vm_type + "' AND network_role='"
+ + req.query.network_role + "'";
+
+ tasks.push(function(callback) {
+ dbRoutes.executeSQL(sql,req,res,callback);
+ });
+ async.series(tasks, function(err,result)
+ {
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVmNetworks(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from VM_NETWORKS table.');
+ dbRoutes.getVmNetworks(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+// POST
+router.post('/addVmProfile', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ var sql;
+
+
+ if ( req.body.nf_vm_count.length > 0 )
+ {
+ sql = "INSERT INTO VM_PROFILE (vnf_type,vm_type,vm_count) VALUES ("
+ + "'" + req.body.nf_vnf_type + "',"
+ + "'" + req.body.nf_vm_type + "',"
+ + req.body.nf_vm_count + ")";
+ }
+ else
+ {
+ sql = "INSERT INTO VM_PROFILE (vnf_type,vm_type) VALUES ("
+ + "'" + req.body.nf_vnf_type + "',"
+ + "'" + req.body.nf_vm_type + "')";
+ }
+
+
+ console.log("SQL: " + sql);
+
+ tasks.push( function(callback) { dbRoutes.executeSQL(sql,req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVmProfile(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully added VM Profile');
+ dbRoutes.getVmProfile(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+
+router.post('/addVnfNetwork', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+
+ var sql = "INSERT INTO VNF_NETWORKS (vnf_type,network_role) VALUES ("
+ + "'" + req.body.nf_vnf_type + "',"
+ + "'" + req.body.nf_network_role + "')";
+
+ console.log("SQL: " + sql);
+
+ tasks.push( function(callback) { dbRoutes.executeSQL(sql,req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVnfNetworks(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully added VNF Network');
+ dbRoutes.getVnfNetworks(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+router.post('/addVnfProfile', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ var sql;
+
+ sql = "INSERT INTO VNF_PROFILE (vnf_type,availability_zone_count,equipment_role) VALUES ("
+ + "'" + req.body.nf_vnf_type + "',"
+ + req.body.nf_availability_zone_count
+ + ",'" + req.body.nf_equipment_role + "')";
+
+console.log(sql);
+
+ tasks.push( function(callback) { dbRoutes.executeSQL(sql,req,res,callback); } );
+ async.series(tasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVnfProfile(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully added VNF Profile');
+ dbRoutes.getVnfProfile(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+router.post('/addVmNetwork', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ var msgArray = new Array();
+
+ // convert true|false to 1|0
+ var assign_ips = (req.body.nf_assign_ips == 'true') ? 1 : 0;
+ var assign_macs = (req.body.nf_assign_macs == 'true') ? 1 : 0;
+ var assign_floating_ip = (req.body.nf_assign_floating_ip == 'true') ? 1 : 0;
+
+
+ if ((req.body.nf_assign_ips == 'true' &&
+ (typeof req.body.nf_ip_count == 'undefined' || req.body.nf_ip_count.length <=0)))
+ {
+ msgArray.push("If assign_ips equals 'true', ip_count must be populated with a number.");
+ dbRoutes.getVmNetworks(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+
+
+ if ( req.body.nf_ip_count.length >0 )
+ {
+ var sql = "INSERT INTO VM_NETWORKS (vnf_type,vm_type,network_role,ip_count,assign_ips,assign_macs,assign_floating_ip) VALUES ("
+ + "'" + req.body.nf_vnf_type + "',"
+ + "'" + req.body.nf_vm_type + "',"
+ + "'" + req.body.nf_network_role + "',"
+ + req.body.nf_ip_count + ","
+ + assign_ips + ","
+ + assign_macs + ","
+ + assign_floating_ip + ")";
+ }
+ else
+ {
+ var sql = "INSERT INTO VM_NETWORKS (vnf_type,vm_type,network_role,assign_ips,assign_macs,assign_floating_ip) VALUES ("
+ + "'" + req.body.nf_vnf_type + "',"
+ + "'" + req.body.nf_vm_type + "',"
+ + "'" + req.body.nf_network_role + "',"
+ + assign_ips + ","
+ + assign_macs + ","
+ + assign_floating_ip + ")";
+ }
+
+ tasks.push( function(callback) { dbRoutes.executeSQL(sql,req,res,callback); } );
+ async.series(tasks, function(err,result){
+ msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVmNetworks(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully added VM Network');
+ var message = '';
+ if (req.body.nf_ip_count.length >0)
+ {
+ message = req.body.nf_vnf_type
+ + ',' + req.body.nf_vm_type
+ + ',' + req.body.nf_network_role
+ + ',' + req.body.nf_ip_count
+ + ',' + req.body.nf_assign_ips
+ + ',' + req.body.nf_assign_macs
+ + ',' + req.body.nf_assign_floating_ip;
+ }
+ else
+ {
+ message = req.body.nf_vnf_type
+ + ',' + req.body.nf_vm_type
+ + ',' + req.body.nf_network_role
+ + ',' + req.body.nf_assign_ips
+ + ',' + req.body.nf_assign_macs
+ + ',' + req.body.nf_assign_floating_ip;
+ }
+ dbRoutes.getVmNetworks(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+});
+
+// POST
+router.post('/uploadVnfData', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res)
+{
+console.log('filename:'+ JSON.stringify(req.file.originalname));
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ if(req.file.originalname)
+ {
+ if (req.file.originalname.size == 0) {
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVnfData(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ fs.exists(req.file.path, function(exists)
+ {
+ if(exists)
+ {
+ var str = req.file.originalname;
+ var content;
+ var enc_content;
+
+ try{
+ content = fs.readFileSync(req.file.path);
+ enc_content = encodeURI(content);
+
+
+ var sql = "INSERT INTO PRE_LOAD_VNF_DATA "
+ + "(filename,preload_data) VALUES ("
+ + "'"+ str + "'," + "'" + enc_content + "')";
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.addRow(sql,req,res,callback); } );
+ async.series(tasks, function(err,result)
+ {
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVnfData(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully uploaded ' + str);
+ dbRoutes.getVnfData(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ catch(error){
+ fs.removeSync(req.file.path); // remove bad file that was uploaded
+ console.error("There was an error reading the file '"+str+"'. Error: " + error);
+ msgArray.push("There was an error reading the file '"+str+"'. Error: " + error);
+ dbRoutes.getVnfData(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ } else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVnfData(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ else
+ {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVnfData(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+} );
+
+router.post('/uploadVnfNetworkData', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res)
+{
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ if(req.file.originalname)
+ {
+ if (req.file.originalname.size == 0) {
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVnfData(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ fs.exists(req.file.path, function(exists)
+ {
+ if(exists)
+ {
+ var str = req.file.originalname;
+ var content;
+ var enc_content;
+
+ try{
+ content = fs.readFileSync(req.file.path);
+ enc_content = encodeURI(content);
+
+ var sql = "INSERT INTO PRE_LOAD_VNF_NETWORK_DATA "
+ + "(filename,preload_data) VALUES ("
+ + "'"+ str + "'," + "'" + enc_content + "')";
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.addRow(sql,req,res,callback); } );
+ async.series(tasks, function(err,result)
+ {
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVnfNetworkData(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ msgArray.push('Successfully uploaded ' + str);
+ dbRoutes.getVnfNetworkData(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ catch(error){
+ fs.removeSync(req.file.path); // remove bad file that was uploaded
+ msgArray.push("There was an error reading the file '"+str+"'. Error: " + error);
+ dbRoutes.getVnfNetworkData(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ } else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVnfNetworkData(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ else
+ {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVnfNetworkData(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+} );
+
+
+router.post('/uploadVmNetworks', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res){
+
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ if(req.file.originalname){
+ if (req.file.originalname.size == 0) {
+ dbRoutes.getVmNetworks(req,res,{code:'failure', msg:'There was an error uploading the file, please try again.'},privilegeObj);
+ return;
+ }
+ fs.exists(req.file.path, function(exists) {
+
+ if(exists) {
+
+ var str = req.file.originalname;
+
+ try {
+ var csv = require('csv');
+
+ // the job of the parser is to convert a CSV file
+ // to a list of rows (array of rows)
+ var parser = csv.parse({
+ columns: function(line) {
+ // By defining this callback, we get handed the
+ // first line of the spreadsheet. Which we'll
+ // ignore and effectively skip this line from processing
+ },
+ skip_empty_lines: true
+ });
+
+ var row = 0;
+ var f = new Array();
+ var transformer = csv.transform(function(data){
+ // this will get row by row data, so for example,
+ //logger.debug(data[0]+','+data[1]+','+data[2]);
+
+ // build an array of rows
+ f[row] = new Array();
+ for ( col=0; col<data.length; col++ )
+ {
+ f[row][col] = data[col];
+ }
+ row++;
+ });
+
+ // called when done with processing the CSV
+ transformer.on("finish", function() {
+
+ var funcArray = new Array();
+
+ function createFunction(lrow,res)
+ {
+ return function(callback) { dbRoutes.addVmNetwork(lrow,res,callback); }
+ }
+ // loop for each row and create an array of callbacks for async.parallelLimit
+ // had to create a function above 'createFunction' to get
+ for (var x=0; x<f.length; x++)
+ {
+ funcArray.push( createFunction(f[x],res) );
+ }
+
+ // make db calls in parrallel
+ async.parallelLimit(funcArray, 50, function(err,result){
+
+ if ( err ) {
+ dbRoutes.getVmNetworks(req,res,result,privilegeObj);
+ return;
+ }
+ else {
+ // result array has an entry in it, success entries are blank, figure out
+ // how many are not blank, aka errors.
+ var rowError = 0;
+ for(var i=0;i<result.length;i++){
+ if ( result[i].length > 0 )
+ {
+ rowError++;
+ }
+ }
+ var rowsProcessed = f.length - rowError;
+ result.push(rowsProcessed + ' of ' + f.length + ' rows processed.');
+ if ( rowError > 0 )
+ {
+ result = {code:'failure', msg:result};
+ }
+ else
+ {
+ result = {code:'success', msg:result};
+ }
+ dbRoutes.getVmNetworks(req,res,result,privilegeObj);
+ return;
+ }
+ });
+ });
+
+ var stream = fs.createReadStream(req.file.path, "utf8");
+ stream.pipe(parser).pipe(transformer);
+
+ } catch(ex) {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file. '+ex);
+ dbRoutes.getVmNetworks(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+ } else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVmNetworks(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVmNetworks(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+
+} );
+
+router.post('/uploadVnfProfile', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res){
+
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ if(req.file.originalname)
+ {
+ if (req.file.originalname.size == 0) {
+ dbRoutes.getVnfProfile(req,res,{code:'failure', msg:'There was an error uploading the file, please try again.'},privilegeObj);
+ return;
+ }
+ fs.exists(req.file.path, function(exists) {
+
+ if(exists) {
+
+ var str = req.file.originalname;
+
+ try {
+ var csv = require('csv');
+
+ // the job of the parser is to convert a CSV file
+ // to a list of rows (array of rows)
+ var parser = csv.parse({
+ columns: function(line) {
+ // By defining this callback, we get handed the
+ // first line of the spreadsheet. Which we'll
+ // ignore and effectively skip this line from processing
+ },
+ skip_empty_lines: true
+ });
+
+ var row = 0;
+ var f = new Array();
+ var transformer = csv.transform(function(data){
+ // this will get row by row data, so for example,
+ //logger.debug(data[0]+','+data[1]+','+data[2]);
+
+ // build an array of rows
+ f[row] = new Array();
+ for ( col=0; col<data.length; col++ )
+ {
+ f[row][col] = data[col];
+ }
+ row++;
+ });
+
+ // called when done with processing the CSV
+ transformer.on("finish", function() {
+
+ var funcArray = new Array();
+
+ function createFunction(lrow,res)
+ {
+ return function(callback) { dbRoutes.addVnfProfile(lrow,res,callback); }
+ }
+ // loop for each row and create an array of callbacks for async.parallelLimit
+ // had to create a function above 'createFunction' to get
+ for (var x=0; x<f.length; x++)
+ {
+ funcArray.push( createFunction(f[x],res) );
+ }
+
+ // make db calls in parrallel
+ async.series(funcArray, function(err,result){
+
+ if ( err ) {
+ dbRoutes.getVnfProfile(req,res,result,privilegeObj);
+ return;
+ }
+ else {
+ // result array has an entry in it, success entries are blank, figure out
+ // how many are not blank, aka errors.
+ var rowError = 0;
+ for(var i=0;i<result.length;i++){
+ if ( result[i].length > 0 )
+ {
+ rowError++;
+ }
+ }
+console.log('rowError='+rowError);
+ var rowsProcessed = f.length - rowError;
+console.log('rowsProcessed='+rowsProcessed);
+ result.push(rowsProcessed + ' of ' + f.length + ' rows processed.');
+ if ( rowError > 0 )
+ {
+ result = {code:'failure', msg:result};
+ }
+ else
+ {
+ result = {code:'success', msg:result};
+ }
+console.log('result='+JSON.stringify(result));
+ dbRoutes.getVnfProfile(req,res,result,privilegeObj);
+ return;
+ }
+ });
+ });
+
+ var stream = fs.createReadStream(req.file.path, "utf8");
+ stream.pipe(parser).pipe(transformer);
+
+ } catch(ex) {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file. '+ex);
+ console.error('There was an error uploading the file. '+ex);
+ dbRoutes.getVnfProfile(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ } else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVnfProfile(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVnfProfile(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+} );
+
+
+router.post('/uploadVnfNetworks', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res){
+
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ if(req.file.originalname)
+ {
+ if (req.file.originalname.size == 0) {
+ dbRoutes.getVnfProfile(req,res,
+ {code:'failure', msg:'There was an error uploading the file, please try again.'},
+ privilegeObj);
+ return;
+ }
+ fs.exists(req.file.path, function(exists) {
+
+ if(exists) {
+
+ var str = req.file.originalname;
+
+ try {
+ var csv = require('csv');
+
+ // the job of the parser is to convert a CSV file
+ // to a list of rows (array of rows)
+ var parser = csv.parse({
+ columns: function(line) {
+ // By defining this callback, we get handed the
+ // first line of the spreadsheet. Which we'll
+ // ignore and effectively skip this line from processing
+ },
+ skip_empty_lines: true
+ });
+
+ var row = 0;
+ var f = new Array();
+ var transformer = csv.transform(function(data){
+ // this will get row by row data, so for example,
+ //logger.debug(data[0]+','+data[1]+','+data[2]);
+
+ // build an array of rows
+ f[row] = new Array();
+ for ( col=0; col<data.length; col++ )
+ {
+ f[row][col] = data[col];
+ }
+ row++;
+ });
+
+ // called when done with processing the CSV
+ transformer.on("finish", function() {
+
+ var funcArray = new Array();
+
+ function createFunction(lrow,res)
+ {
+ return function(callback) { dbRoutes.addVnfNetwork(lrow,res,callback); }
+ }
+ // loop for each row and create an array of callbacks for async.parallelLimit
+ // had to create a function above 'createFunction' to get
+ for (var x=0; x<f.length; x++)
+ {
+ funcArray.push( createFunction(f[x],res) );
+ }
+
+ // make db calls in parrallel
+ async.series(funcArray, function(err,result){
+
+ if ( err ) {
+ dbRoutes.getVnfNetworks(req,res,result,privilegeObj);
+ return;
+ }
+ else {
+ // result array has an entry in it, success entries are blank, figure out
+ // how many are not blank, aka errors.
+ var rowError = 0;
+ for(var i=0;i<result.length;i++){
+ if ( result[i].length > 0 )
+ {
+ rowError++;
+ }
+ }
+ var rowsProcessed = f.length - rowError;
+ result.push(rowsProcessed + ' of ' + f.length + ' rows processed.');
+ if ( rowError > 0 )
+ {
+ result = {code:'failure', msg:result};
+ }
+ else
+ {
+ result = {code:'success', msg:result};
+ }
+ dbRoutes.getVnfNetworks(req,res,result,privilegeObj);
+ return;
+ }
+ });
+ });
+
+ var stream = fs.createReadStream(req.file.path, "utf8");
+ stream.pipe(parser).pipe(transformer);
+
+ } catch(ex) {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file. '+ex);
+ dbRoutes.getVnfNetworks(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ } else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVnfNetworks(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVnfNetworks(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+} );
+
+router.post('/uploadVmProfile', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res){
+
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ if(req.file.originalname)
+ {
+ if (req.file.originalname.size == 0) {
+ dbRoutes.getVmProfile(req,res,
+ {code:'failure', msg:'There was an error uploading the file, please try again.'},
+ privilegeObj);
+ return;
+ }
+ fs.exists(req.file.path, function(exists) {
+
+ if(exists) {
+
+ var str = req.file.originalname;
+
+ try {
+ var csv = require('csv');
+
+ // the job of the parser is to convert a CSV file
+ // to a list of rows (array of rows)
+ var parser = csv.parse({
+ columns: function(line) {
+ // By defining this callback, we get handed the
+ // first line of the spreadsheet. Which we'll
+ // ignore and effectively skip this line from processing
+ },
+ skip_empty_lines: true
+ });
+
+ var row = 0;
+ var f = new Array();
+ var transformer = csv.transform(function(data){
+ // this will get row by row data, so for example,
+ //logger.debug(data[0]+','+data[1]+','+data[2]);
+
+ // build an array of rows
+ f[row] = new Array();
+ for ( col=0; col<data.length; col++ )
+ {
+ f[row][col] = data[col];
+ }
+ row++;
+ });
+
+ // called when done with processing the CSV
+ transformer.on("finish", function() {
+
+ var funcArray = new Array();
+
+ function createFunction(lrow,res)
+ {
+ return function(callback) { dbRoutes.addVmProfile(lrow,res,callback); }
+ }
+ // loop for each row and create an array of callbacks for async.parallelLimit
+ // had to create a function above 'createFunction' to get
+ for (var x=0; x<f.length; x++)
+ {
+ funcArray.push( createFunction(f[x],res) );
+ }
+
+ // make db calls in parrallel
+ async.series(funcArray, function(err,result){
+
+ if ( err ) {
+ dbRoutes.getVmProfile(req,res,result,privilegeObj);
+ return;
+ }
+ else {
+ // result array has an entry in it, success entries are blank, figure out
+ // how many are not blank, aka errors.
+ var rowError = 0;
+ for(var i=0;i<result.length;i++){
+ if ( result[i].length > 0 )
+ {
+ rowError++;
+ }
+ }
+ var rowsProcessed = f.length - rowError;
+ result.push(rowsProcessed + ' of ' + f.length + ' rows processed.');
+ if ( rowError > 0 )
+ {
+ result = {code:'failure', msg:result};
+ }
+ else
+ {
+ result = {code:'success', msg:result};
+ }
+ dbRoutes.getVmProfile(req,res,result,privilegeObj);
+ return;
+ }
+ });
+ });
+
+ var stream = fs.createReadStream(req.file.path, "utf8");
+ stream.pipe(parser).pipe(transformer);
+
+ } catch(ex) {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file. '+ex);
+ dbRoutes.getVmProfile(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ } else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVmProfile(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+ }
+ else {
+ msgArray.length = 0;
+ msgArray.push('There was an error uploading the file.');
+ dbRoutes.getVmProfile(req,res,{code:'danger', msg:msgArray},privilegeObj);
+ return;
+ }
+} );
+
+module.exports = router;
diff --git a/admportal/server/router/routes/network.js b/admportal/server/router/routes/network.js
new file mode 100644
index 0000000..c64beae
--- /dev/null
+++ b/admportal/server/router/routes/network.js
@@ -0,0 +1,400 @@
+
+// Helper functions for processing a NETWORK worksheet
+
+var helpers = require('./helpers.js');
+var _ = require('lodash');
+var csvtojson = require('csvtojson');
+var async = require('async');
+var uuid = require('node-uuid'); // generate a uuid with "uuid.v1()"
+var path = require('path');
+var fs = require("fs");
+var moment = require("moment");
+
+var network = module.exports;
+var getParam = helpers.getParam;
+
+var indir;
+var csvGeneral, csvSubnets, csvVpnBindings, csvPolicies, csvNetRoutes;
+var rawJson={}
+var finalJson={};
+var platform;
+var req,res;
+var preloadVersion; // 1607, 1610, etc...
+
+puts = helpers.puts;
+putd = helpers.putd;
+
+network.go = function(lreq,lres,cb,dir) {
+ puts("Processing NETWORK workbook");
+ req = lreq;
+ res = lres;
+ callback = cb;
+ if (dir!="") {
+ platform="pc";
+ indir=dir;
+ } else {
+ platform="portal";
+ indir=process.cwd() + "/uploads/";
+ }
+ doGeneral();
+}
+
+// READ WORKSHEET: GENERAL
+
+function doGeneral() {
+ puts("Reading General worksheet");
+ var csvFilename="General.csv";
+ var newFileName = helpers.getFileName(req, csvFilename);
+ if ( newFileName != null ) {
+ helpers.readCsv(indir, newFileName, gotGeneral);
+ }
+ else {
+ callback(csvFilename + ' file is missing from upload.');
+ }
+}
+
+function gotGeneral(err, jsonObj) {
+ if (err) {
+ puts("\nError!");
+ putd(err);
+ callback('General.csv file is missing from upload.');
+ return;
+ }
+ csvGeneral = jsonObj;
+ puts("\nRead this: ");
+ putd(csvGeneral);
+ puts("\n");
+ doSubnets();
+}
+
+// READ WORKSHEET: SUBNETS
+
+function doSubnets() {
+ puts("Reading Subnets worksheet");
+ var csvFilename="Subnets.csv";
+ var newFileName = helpers.getFileName(req, csvFilename);
+ if ( newFileName != null ) {
+ helpers.readCsv(indir, newFileName, gotSubnets);
+ }
+ else {
+ callback(csvFilename + ' file is missing from upload.');
+ }
+}
+
+function gotSubnets(err, jsonObj) {
+ if (err) {
+ puts("\nError!");
+ putd(err);
+ callback('Subnets.csv file is missing from upload.');
+ return;
+ }
+ csvSubnets = jsonObj;
+ csvSubnets = _.reject(csvSubnets, 'field2', 'Subnets');
+ csvSubnets = _.reject(csvSubnets, 'field2', 'start-address');
+ csvSubnets = _.reject(csvSubnets, 'field2', '');
+ puts("\nRead this: ");
+ putd(csvSubnets);
+ puts("\n");
+ doVpnBindings();
+}
+
+// READ WORKSHEET: VPN-BINDINGS
+
+function doVpnBindings() {
+ puts("Reading VPN-Bindings worksheet");
+ var csvFilename="VPN-Bindings.csv";
+ var newFileName = helpers.getFileName(req, csvFilename);
+ if ( newFileName != null ) {
+ helpers.readCsv(indir, newFileName, gotVpnBindings);
+ }
+ else {
+ callback(csvFilename + ' file is missing from upload.');
+ }
+}
+
+function gotVpnBindings(err, jsonObj) {
+ if (err) {
+ puts("\nError!");
+ putd(err);
+ callback('VPN-Bindings.csv file is missing from upload.');
+ return;
+ }
+ csvVpnBindings = jsonObj;
+ csvVpnBindings = _.reject(csvVpnBindings, 'field2', 'VPN-Bindings');
+ csvVpnBindings = _.reject(csvVpnBindings, 'field2', 'vpn-binding-id');
+ csvVpnBindings = _.reject(csvVpnBindings, function(o) { return (_.trim(o.field2)=="") && (_.trim(o.field3)==""); } );
+ puts("\nRead this: ");
+ putd(csvVpnBindings);
+ puts("\n");
+ doPolicies();
+}
+
+
+// READ WORKSHEET: POLICIES
+
+function doPolicies() {
+ puts("Reading Policies worksheet");
+ var csvFilename="Policies.csv";
+ var newFileName = helpers.getFileName(req, csvFilename);
+ if ( newFileName != null ) {
+ helpers.readCsv(indir, newFileName, gotPolicies);
+ }
+ else {
+ callback(csvFilename + ' file is missing from upload.');
+ }
+}
+
+function gotPolicies(err, jsonObj) {
+ if (err) {
+ puts("\nError!");
+ putd(err);
+ callback('Policies.csv file is missing from upload.');
+ return;
+ }
+ csvPolicies = jsonObj;
+ csvPolicies = _.reject(csvPolicies, 'field2', 'Policies');
+ csvPolicies = _.reject(csvPolicies, 'field2', 'network-policy-fqdn');
+ csvPolicies = _.reject(csvPolicies, 'field2', '');
+ puts("\nRead this: ");
+ putd(csvPolicies);
+ puts("\n");
+ doNetRoutes();
+}
+
+
+// READ WORKSHEET: NETWORK-ROUTES
+
+function doNetRoutes() {
+ puts("Reading Network-Routes worksheet");
+ var csvFilename="Network-Routes.csv";
+ var newFileName = helpers.getFileName(req, csvFilename);
+ preloadVersion = getParam(csvGeneral, 'field2', 'preload-version', 'field3');
+ if ( preloadVersion == '1607' ) {
+ puts("This is a 1607 spreadsheet. Skipping Network-Routes.csv.");
+ gotNetRoutes(null,{});
+ return;
+ }
+ if ( newFileName != null ) {
+ helpers.readCsv(indir, newFileName, gotNetRoutes);
+ }
+ else {
+ callback(csvFilename + ' file is missing from upload.');
+ }
+}
+
+function gotNetRoutes(err, jsonObj) {
+ if (err) {
+ puts("\nError!");
+ putd(err);
+ callback('Network-Routes.csv file is missing from upload.');
+ return;
+ }
+ csvNetRoutes = jsonObj;
+ csvNetRoutes = _.reject(csvNetRoutes, 'field2', 'Network-Routes');
+ csvNetRoutes = _.reject(csvNetRoutes, 'field2', 'route-table-reference-fqdn');
+ csvNetRoutes = _.reject(csvNetRoutes, 'field2', '');
+ puts("\nRead this: ");
+ putd(csvNetRoutes);
+ puts("\n");
+ doneReadingFiles();
+}
+
+
+// DONE READING FILES
+
+function doneReadingFiles() {
+ puts("\n");
+ puts("DONE READING FILES!");
+ puts("\n");
+ processJson();
+}
+
+
+// PROCESS THE CSV FILES INTO OBJECTS TO BE ASSEMBLED INTO FINAL OUTPUT
+function processJson() {
+ processGeneral();
+ processSubnets();
+ processVpnBindings();
+ processPolicies();
+ processNetRoutes();
+ assembleJson();
+}
+
+// ASSEMBLE AND OUTPUT RESULTS
+
+function assembleJson() {
+ puts("\n");
+ puts("Using raw JSON and assembling final ouptut JSON.");
+ puts("\n");
+
+ networkTopoID = { "network-name": rawJson['network-name'],
+ "network-role": rawJson['network-role'],
+ "network-type": rawJson['network-type'],
+ "network-technology": rawJson['network-technology'] };
+
+ providerInfo = { "physical-network-name": rawJson['physical-network-name'],
+ "is-provider-network": rawJson['is-provider-network'],
+ "is-shared-network": rawJson['is-shared-network'],
+ "is-external-network": rawJson['is-external-network'] };
+
+ networkSubnets = rawJson['subnets'];
+
+ networkVpnBindings = rawJson['vpn-bindings'];
+
+ networkPolicies = rawJson['network-policy-fqdns'];
+
+ networkRoutes = rawJson['route-table-reference'];
+
+ networkTopo = { "network-topology-identifier": networkTopoID,
+ "provider-network-information": providerInfo,
+ "subnets": networkSubnets,
+ "vpn-bindings": networkVpnBindings,
+ "network-policy": networkPolicies,
+ "route-table-reference": networkRoutes};
+
+ networkInput = {'network-topology-information': networkTopo};
+
+ finalJson = {"input": networkInput};
+
+ outputJson();
+}
+
+function outputJson() {
+ puts("\n");
+ puts("\n");
+ puts(JSON.stringify(finalJson,null,2));
+ puts("\n");
+ puts("\n");
+ var unixTime, fullpath_filename, filename;
+ unixTime = moment().unix();
+ if (platform=='portal') {
+ fullpath_filename = process.cwd() + "/uploads/" + unixTime + ".net_worksheet.json";
+ filename = unixTime + ".net_worksheet.json.";
+ } else {
+ fullpath_filename = "./output.json."+unixTime;
+ filename = "output.json." + unixTime;
+ }
+ helpers.writeOutput(req, fullpath_filename, JSON.stringify(finalJson,null,2), callback);
+ callback(null, finalJson, filename);
+}
+
+
+// Gather functions that actually process data after it is all read
+
+function processGeneral() {
+ preloadVersion = getParam(csvGeneral, 'field2', 'preload-version', 'field3');
+ rawJson['preload-version'] = preloadVersion;
+ puts("Preload version: " + preloadVersion);
+
+ if ( (preloadVersion!='1607') && (preloadVersion!='1610') ) {
+ puts("\nError - incorrect version of preload worksheet.");
+ callback('Error - incorrect version of preload worksheet.');
+ }
+
+ rawJson['network-name'] = getParam(csvGeneral, 'field2', 'network-name', 'field3');
+ rawJson['network-role'] = getParam(csvGeneral, 'field2', 'network-role', 'field3');
+ rawJson['network-type'] = getParam(csvGeneral, 'field2', 'network-type', 'field3');
+ rawJson['network-technology'] = getParam(csvGeneral, 'field2', 'network-technology', 'field3');
+
+ if ( preloadVersion!='1607' ) {
+ rawJson['physical-network-name'] = getParam(csvGeneral, 'field2', 'physical-network-name', 'field3');
+ rawJson['is-provider-network'] = getParam(csvGeneral, 'field2', 'is-provider-network', 'field3');
+ rawJson['is-shared-network'] = getParam(csvGeneral, 'field2', 'is-shared-network', 'field3');
+ rawJson['is-external-network'] = getParam(csvGeneral, 'field2', 'is-external-network', 'field3');
+ }
+
+ rawJson['request-action'] = "PreloadNetworkRequest";
+ rawJson['svc-request-id'] = uuid.v1();
+ rawJson['svc-action'] = "reserve";
+ puts('rawJson:');
+ putd(rawJson);
+ puts("\n");
+}
+
+function processSubnets() {
+ var newSubnets = [];
+ csvSubnets.forEach( function(subnet) {
+ var subnetJson = {};
+ subnetJson["start-address"] = subnet.field2;
+ if (subnet.field3!='') {
+ subnetJson["dhcp-start-address"] = subnet.field3;
+ }
+ if (subnet.field4!='') {
+ subnetJson["dhcp-end-address"] = subnet.field4;
+ }
+ if (subnet.field5!='') {
+ subnetJson["gateway-address"] = subnet.field5;
+ }
+ subnetJson["cidr-mask"] = subnet.field6;
+ subnetJson["ip-version"] = subnet.field7;
+ subnetJson["dhcp-enabled"] = subnet.field8;
+ subnetJson["subnet-name"] = subnet.field9;
+ newSubnets.push(subnetJson);
+ }
+ );
+ puts("subnets:");
+ putd(newSubnets);
+ puts("\n");
+ rawJson["subnets"] = newSubnets;
+}
+
+function processVpnBindings() {
+ var newVpnBindings = [];
+
+ csvVpnBindings.forEach( function(vpn) {
+ var vpnJson = {};
+ bindid = _.trim(vpn.field2);
+ vpnJson["vpn-binding-id"] = bindid;
+ if (bindid!="") {
+ newVpnBindings.push(vpnJson);
+ }
+ });
+
+ puts("VPN-Bindings:");
+ putd(newVpnBindings);
+ puts("\n");
+ rawJson["vpn-bindings"] = newVpnBindings;
+}
+
+function processPolicies() {
+ var newPolicies = [];
+
+ csvPolicies.forEach( function(policy) {
+ var policyJson = {};
+ fqdn = _.trim(policy.field2);
+ if (fqdn != "") {
+ policyJson["network-policy-fqdn"] = fqdn;
+ newPolicies.push(policyJson);
+ }
+
+ }
+ );
+
+ puts("Policies:");
+ putd(newPolicies);
+ puts("\n");
+ rawJson["network-policy-fqdns"] = newPolicies;
+}
+
+function processNetRoutes() {
+ var newNetRoutes = [];
+
+ csvNetRoutes.forEach( function(netroute) {
+ var netrouteJson = {};
+ fqdn = _.trim(netroute.field2);
+ if (fqdn != "") {
+ netrouteJson["route-table-reference-fqdn"] = fqdn;
+ newNetRoutes.push(netrouteJson);
+ }
+
+ }
+ );
+
+ puts("Network-Routes:");
+ putd(newNetRoutes);
+ puts("\n");
+ rawJson["route-table-reference"] = newNetRoutes;
+}
+
+
+
diff --git a/admportal/server/router/routes/odl.js b/admportal/server/router/routes/odl.js
new file mode 100644
index 0000000..fba646f
--- /dev/null
+++ b/admportal/server/router/routes/odl.js
@@ -0,0 +1,258 @@
+var express = require('express');
+var router = express.Router();
+var csp = require('./csp');
+var properties = require(process.env.SDNC_CONFIG_DIR + '/admportal.json');
+var async = require('async');
+
+
+// pass host, username and password to ODL
+var username = properties.odlUser;
+var password = properties.odlPasswd;
+var auth = 'Basic ' + new Buffer(username + ':' + password).toString('base64');
+
+// target host for ODL request
+var host = properties.odlHost;
+var port = properties.odlPort;
+var header = {'Host': host, 'Authorization': auth, 'Content-Type': 'application/yang.data+json'};
+var options = {
+ host: host,
+ headers : header,
+ port : port,
+ rejectUnauthorized: false,
+ strictSSL : false
+};
+
+// Connection to OpenDaylight
+Odl = require('./Odl');
+
+function handleResult(err, response_str, res) {
+ if (err) {
+ console.error( String(err) );
+ res.render('pages/err', {result:{code:'failure', msg:String(err)}, header:process.env.MAIN_MENU});
+ } else {
+ // make sure response starts with JSON string
+ if (response_str && response_str.indexOf('{') == 0) {
+ //console.log("response: ", result);
+ res.render('odl/listWklst', { response_obj: JSON.parse(response_str), header:process.env.MAIN_MENU });
+ } else {
+ res.render('pages/err', {result:{code:'failure', msg:String(err) }, header:process.env.MAIN_MENU});
+ }
+ }
+}
+
+// / index page
+// calls restconf to get information
+router.get('/listWklst', csp.checkAuth, function(req, res) {
+ options.strictSSL = true; // used to test SSL certificate
+ Odl.Get('/restconf/config/L3SDN-API:services',options, handleResult,req,res);
+});
+
+router.get('/pageWklst', csp.checkAuth, function(req,res) {
+ pageWklst(req,res, {code:'', msg:''}, req.session.loggedInAdmin);
+});
+
+
+function pageWklst(req,res,resultObj,privilegeObj)
+{
+ if(req.session == null || req.session == undefined
+ || req.session.l3sdnPageInfo == null || req.session.l3sdnPageInfo == undefined)
+ {
+ res.render("pages/err",
+ { result: {code:'error', msg:"Unable to read session information. "+ String(err) }, header:process.env.MAIN_MENU});
+ return;
+ }
+
+ var l3sdnPageInfo = req.session.l3sdnPageInfo;
+ var currentPage=1;
+ if (typeof req.query.page != 'undefined')
+ {
+ currentPage = +req.query.page;
+ }
+ l3sdnPageInfo.currentPage = currentPage;
+ l3sdnPageInfo.rows = l3sdnPageInfo.pages[currentPage-1];
+ req.session.l3sdnPageInfo = l3sdnPageInfo;
+ res.render('odl/listWklst',
+ {
+ pageInfo : l3sdnPageInfo,
+ result : resultObj,
+ privilege : privilegeObj, header:process.env.MAIN_MENU
+ });
+ return;
+}
+
+
+router.post('/update_vr_lan_interface', function(req,res){
+ var svc_instance_id = encodeURIComponent(req.body.svc_instance_id);
+
+ // format msg
+ var msgRsp =
+ {
+ "vr-lan-interface" :
+ [
+ {
+ "vr-designation" : req.body.uf_vr_designation,
+ "v6-vr-lan-prefix" : req.body.uf_vr_lan_prefix,
+ "v6-vr-lan-prefix-length": req.body.uf_vr_lan_prefix_length,
+ "v6-vce-wan-address" : req.body.uf_vce_wan_address,
+ "v4-vr-lan-prefix" : req.body.uf_vr_lan_prefix,
+ "v4-vr-lan-prefix-length": req.body.uf_vr_lan_prefix_length,
+ "v4-vce-loopback-address": req.body.uf_vce_loopback_address
+ }
+ ]
+ };
+ var tasks = [];
+ tasks.push(function(callback){
+ Odl.put_vr_lan_interface('/restconf/config/L3SDN-API:services/layer3-service-list/'
+ + svc_instance_id
+ + '/service-data/vr-lan/', options, callback);
+ });
+ async.series(tasks, function(err,result){
+
+ if(err){
+ }
+ else{
+ var msgArray = new Array();
+ //result:{code:'error', msg:"got vr-lan information: "+ String(result)}
+ msgArray.push('vr-lan-interface successfully updated.');
+ res.render("odl/listVRlan",
+ {
+ svc_instance_id: req.body.svc_instance_id,
+ response_obj : JSON.parse(result), header:process.env.MAIN_MENU
+ });
+ return;
+ }
+ });
+});
+
+
+// sendData submits form data to ODL
+// Data is read from URL params and converted to JSON
+router.get('/svc-topology-operation', function(req, res) {
+ var formData = '{"input":{'
+ + '"svc-request-id":"'+ new Date().toISOString() + '"' +','
+ + '"svc-notification-url":"'+ req.query['svc-notification-url']+ '"' + ','
+ + '"svc-action":"'+ req.query['svc-action']+ '"' + ','
+ + '"svc-vnf-type":"'+ req.query['svc-vnf-type']+ '"' + ','
+ + '"svc-instance-id":"'+ req.query['svc-instance-id']+ '"' + ','
+ + '"svc-aic-site-id":"'+ req.query['svc-aic-site-id']+ '"'
+ +' } }';
+ Odl.Post('/restconf/operations/L3SDN-API:svc-topology-operation', options, formData, handleResult, res);
+});
+
+// delete request
+router.get('/wklist-delete', function(req, res) {
+ //console.dir(req.query);
+ Odl.Delete('/restconf/config/L3SDN-API:l3sdn-api-worklist/requests/'+req.query['request'], options, handleResult, res);
+});
+
+// get request
+router.get('/getid',function(req, res) {
+ //console.dir(req.query);
+ Odl.GetID('/restconf/config/L3SDN-API:l3sdn-api-worklist/requests/'+req.query['request'], options, res);
+});
+
+router.get('/getvnf', function(req,res) {
+ //console.log("/getvnf "+req.query);
+ Odl.GetVNF('/restconf/config/L3SDN-API:l3sdn-api-worklist/requests/'+req.query['request']+'/vnf/',options,req,res);
+});
+router.get('/getvrlan', function(req,res) {
+ var vrtasks = [];
+ var reqstr = encodeURIComponent(req.query['request']);
+ vrtasks.push(function(callback) {
+ Odl.GetVRlan('/restconf/config/L3SDN-API:services/layer3-service-list/'+reqstr+'/service-data/vr-lan/',options,callback);
+ });
+ async.series(vrtasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ Odl.Get('/restconf/config/L3SDN-API:services',options, handleResult,res);
+ //res.render("pages/err",
+ //{result:{code:'error', msg:"Unable to get vr-lan information: "+ String(err) }});
+ return;
+ }
+ else {
+ msgArray.push('Row successfully deleted from AIC_SITE table.');
+ res.render("odl/listVRlan",
+ {
+ svc_instance_id: req.query['request'],
+ response_obj : JSON.parse(result), header:process.env.MAIN_MENU
+ });
+ return;
+ }
+ });
+});
+router.get('/getClusterStatus', function(req,res) {
+
+
+ var urltasks = [];
+ var _header = {'Host': host, 'Authorization': auth, 'Content-Type': 'application/yang.data+json'};
+ var _options = null;
+
+ var slist = properties.shard_list;
+ var hlist = properties.hostnameList;
+ var port = properties.clusterPort;
+ var prefix_url = properties.clusterPrefixURL;
+ var mid_url = properties.clusterMidURL;
+ var suffix_url = properties.clusterSuffixURL;
+ var urlArray = new Array();
+ var url_request='';
+ var shard=null, hostname=null;
+
+ // build array of urls from properties
+ for(var x=0; x<slist.length; x++)
+ {
+ shard = slist[x];
+ for(var y=0; y<hlist.length; y++)
+ {
+ hostname = hlist[y];
+
+ url_request = properties.odlProtocol + '://'
+ + hostname.hname + ':'
+ + port
+ + prefix_url
+ + (y+1)
+ + mid_url
+ + shard.shard_name
+ + suffix_url;
+
+ _options = {
+ method : "GET",
+ path : url_request,
+ host : hostname.hname,
+ headers : _header,
+ port : port,
+ rejectUnauthorized: false,
+ strictSSL : false
+ };
+ urlArray.push(_options);
+ }
+ }
+
+ urlArray.forEach(function(request){
+ urltasks.push(function(callback) {
+ Odl.GetClusterStatus(request,callback);
+ });
+ });
+ async.series(urltasks, function(err,result){
+ var msgArray = new Array();
+ if(err){
+ msgArray.push(err);
+ res.render("pages/err",
+ {result:{code:'error', msg:"Unable to get status: "+ String(err) }, header:process.env.MAIN_MENU});
+ return;
+ }
+ else {
+ var msgArray = new Array();
+ msgArray.push('Sucess');
+ res.render("odl/cluster_status",
+ {
+ result : {code:'success', msg:msgArray},
+ response_obj : result, header:process.env.MAIN_MENU
+ });
+ return;
+ }
+ });
+});
+
+
+module.exports = router;
diff --git a/admportal/server/router/routes/preload.js b/admportal/server/router/routes/preload.js
new file mode 100644
index 0000000..1a63ec0
--- /dev/null
+++ b/admportal/server/router/routes/preload.js
@@ -0,0 +1,154 @@
+var express = require('express');
+var router = express.Router();
+var exec = require('child_process').exec;
+var util = require('util');
+var fs = require('fs.extra');
+var dbRoutes = require('./dbRoutes');
+var csp = require('./csp');
+var multer = require('multer');
+var bodyParser = require('body-parser');
+var sax = require('sax'),strict=true,parser = sax.parser(strict);
+var async = require('async');
+var l_ = require('lodash');
+var dateFormat = require('dateformat');
+var properties = require(process.env.SDNC_CONFIG_DIR + '/admportal.json');
+var vnf = require('./vnf');
+var network = require('./network');
+var moment = require('moment');
+
+
+
+// pass host, username and password to ODL
+// target host for ODL request
+var username = properties.odlUser;
+var password = properties.odlPasswd;
+var auth = 'Basic ' + new Buffer(username + ':' + password).toString('base64');
+var host = properties.odlHost;
+var port = properties.odlPort;
+
+var header = {'Host': host, 'Authorization': auth, 'Content-Type': 'application/json'};
+var options = {
+ host : host,
+ headers : header,
+ port : port,
+ rejectUnauthorized:false,
+ strictSSL: false
+};
+
+// Connection to OpenDaylight
+Odl = require('./Odl');
+
+// multer 1.1
+var unixTime = moment().unix();
+var storage = multer.diskStorage({
+ destination: function (req, file, cb) {
+ cb(null, process.cwd() + '/uploads/')
+ },
+ filename: function (req, file, cb) {
+ cb(null, unixTime + "." + file.originalname )
+ }
+});
+
+var upload = multer({
+ storage: storage,
+ fileFilter: function(req,file,cb) {
+ var type = file.mimetype;
+ if ( type.indexOf('ms-excel') == -1 ) {
+ return cb(null,false);
+ }
+ cb(null,true);
+ }
+});
+
+router.post('/uploadVnfCsv', csp.checkAuth, dbRoutes.checkDB, upload.array('filename'), function(req, res)
+{
+ console.log('files:'+ JSON.stringify(req.files,null,4));
+
+ var tasks = []
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+
+ tasks.push ( function(callback) { vnf.go(req,res,callback,''); } );
+ tasks.push ( function(arg1,arg2,callback) { formatVnfInsertStatement(arg1,arg2,req,res,callback); } );
+ tasks.push( function(arg1, callback) { dbRoutes.addRow(arg1,req,res,callback); } );
+ async.waterfall(tasks, function(err,result)
+ {
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVnfData(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ //logger.debug('Successfully uploaded ' + req.session.worksheetFilename);
+ msgArray.push('Successfully uploaded file.' );
+ dbRoutes.getVnfData(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+
+});
+
+router.post('/uploadNetworkCsv', csp.checkAuth, dbRoutes.checkDB, upload.array('filename'), function(req, res)
+{
+ console.log('files:'+ JSON.stringify(req.files,null,4));
+
+ var tasks = []
+ var msgArray = new Array();
+ var privilegeObj = req.session.loggedInAdmin;
+
+ var privilegeObj = req.session.loggedInAdmin;
+ var tasks = [];
+
+ tasks.push ( function(callback) { network.go(req,res,callback,''); } );
+ tasks.push ( function(arg1,arg2,callback) { formatNetworkInsertStatement(arg1,arg2,req,res,callback); } );
+ tasks.push( function(arg1, callback) { dbRoutes.addRow(arg1,req,res,callback); } );
+ async.waterfall(tasks, function(err,result)
+ {
+ if(err){
+ msgArray.push(err);
+ dbRoutes.getVnfNetworkData(req,res,{code:'failure', msg:msgArray},privilegeObj);
+ return;
+ }
+ else {
+ //logger.debug('Successfully uploaded ' + req.session.worksheetFilename);
+ msgArray.push('Successfully uploaded file.' );
+ dbRoutes.getVnfNetworkData(req,res,{code:'success', msg:msgArray},privilegeObj);
+ return;
+ }
+ });
+
+});
+
+
+function formatVnfInsertStatement(content,filename,req,res,callback)
+{
+ //var newstr = JSON.stringify(content).replace(/\\\"/g,'\\\\\\"');
+ //var ins_str = newstr.replace("\r\n ", "\\r\\n");
+ var newstr = JSON.stringify(content);
+ var enc_str = encodeURI(newstr);
+ var sql = "INSERT INTO PRE_LOAD_VNF_DATA "
+ + "(filename,preload_data) VALUES ("
+ + "'"+ filename + "',"
+ + "'" + enc_str + "')";
+
+ callback(null,sql);
+}
+
+function formatNetworkInsertStatement(content,filename,req,res,callback)
+{
+ var newstr = JSON.stringify(content);
+ var enc_str = encodeURI(newstr);
+ var sql = "INSERT INTO PRE_LOAD_VNF_NETWORK_DATA "
+ + "(filename,preload_data) VALUES ("
+ + "'"+ filename + "',"
+ + "'" + enc_str + "')";
+
+ callback(null,sql);
+}
+
+
+
+module.exports = router;
diff --git a/admportal/server/router/routes/root.js b/admportal/server/router/routes/root.js
new file mode 100644
index 0000000..f586892
--- /dev/null
+++ b/admportal/server/router/routes/root.js
@@ -0,0 +1,111 @@
+var express = require('express');
+var router = express.Router();
+var csp = require('./csp.js');
+var dbRoutes = require('./dbRoutes.js');
+var sla = require('./sla');
+var os = require('os');
+var async = require('async');
+var Odl = require('./Odl');
+var properties = require(process.env.SDNC_CONFIG_DIR + '/admportal.json');
+
+
+
+router.use('/healthcheck', function(req,res){
+ res.render('pages/healthcheck');
+});
+router.get('/test', function(req,res){
+
+//console.log('port='+ req.socket.localPort);
+//console.log('port='+ req.protocol);
+
+ // pass host, username and password to ODL
+ var username = properties.odlUser;
+ var password = properties.odlPasswd;
+ var auth = 'Basic ' + new Buffer(username + ':' + password).toString('base64');
+
+ // target host for ODL request
+ var host = properties.odlHost;
+ var header = {'Host': host, 'Authorization': auth, 'Content-Type': 'application/yang.data+json'};
+ var c_header = {'Host': properties.odlConexusHost, 'Authorization': auth, 'Content-Type': 'application/yang.data+json'};
+
+// path = '/restconf/config/SLI-API:healthcheck',
+ var _options = {
+ method : 'POST',
+ host : host,
+ headers : header,
+ port : '8443',
+ path : '/restconf/operations/SLI-API:healthcheck',
+ rejectUnauthorized: false,
+ strictSSL : false
+ };
+ var c_options = {
+ method : 'POST',
+ host : properties.odlConexusHost,
+ headers : c_header,
+ port : '8543',
+ path : '/restconf/operations/SLI-API:healthcheck',
+ rejectUnauthorized: false,
+ strictSSL : false
+ };
+
+
+ var tasks = [];
+ //tasks.push( function(callback) { dbRoutes.testdb(req,res,callback); } );
+
+ tasks.push ( createFunctionObj(_options) );
+
+ tasks.push ( createFunctionObj(c_options) );
+
+ async.series(tasks, function(err,result){
+ if(err) {
+ res.status(400).send(err);
+ return;
+ }
+ res.status(200).send(result);
+ return;
+ });
+});
+
+function createFunctionObj( loptions ) {
+ return function(callback) { Odl.Healthcheck(loptions,callback); };
+}
+
+router.get('/mytree', function(req,res) {
+ res.render('pages/tree');
+});
+router.get('/setuplogin', function(req,res) {
+ res.render('pages/setuplogin');
+});
+router.post('/formSetupLogin', dbRoutes.checkDB, function(req,res) {
+ dbRoutes.saveSetupLogin(req,res);
+});
+router.post('/formSignUp', dbRoutes.checkDB, function(req,res) {
+ dbRoutes.saveUser(req,res);
+});
+router.post('/formlogin', csp.login, dbRoutes.checkDB, function(req,res) {
+});
+router.get('/login', function(req,res) {
+ res.render('pages/login');
+ // handle get
+});
+router.get('/signup', function(req,res) {
+ res.render('pages/signup');
+ // handle get
+});
+router.get('/info', function(req,res) {
+ // handle get
+ res.send("login info");
+});
+router.get('/logout', csp.logout, function(req,res) {
+ // handle get
+});
+router.get('/csplogout', function(req,res) {
+ // handle get
+ res.render("pages/csplogout", {result:{code:'success', msg:'You have been successfylly logged out.'},header:process.env.MAIN_MENU});
+});
+router.get('/getuser', function(req,res) {
+ // handle get
+ res.render("pages/home");
+});
+
+module.exports = router;
diff --git a/admportal/server/router/routes/sla.js b/admportal/server/router/routes/sla.js
new file mode 100644
index 0000000..92fa846
--- /dev/null
+++ b/admportal/server/router/routes/sla.js
@@ -0,0 +1,369 @@
+var express = require('express');
+var router = express.Router();
+var exec = require('child_process').exec;
+//var util = require('util');
+var fs = require('fs');
+var dbRoutes = require('./dbRoutes');
+var csp = require('./csp');
+var multer = require('multer');
+var bodyParser = require('body-parser');
+//var sax = require('sax'),strict=true,parser = sax.parser(strict);
+var async = require('async');
+
+
+// SVC_LOGIC table columns
+var _module=''; // cannot use module its a reserved word
+var version='';
+var rpc='';
+var mode='';
+var xmlfile='';
+
+
+// used for file upload button, retain original file name
+//router.use(bodyParser());
+router.use(bodyParser.urlencoded({
+ extended: true
+}));
+//var upload = multer({ dest: process.cwd() + '/uploads/', rename: function(fieldname,filename){ return filename; } });
+
+// multer 1.1
+var storage = multer.diskStorage({
+ destination: function (req, file, cb) {
+ cb(null, process.cwd() + '/uploads/')
+ },
+ filename: function (req, file, cb) {
+ cb(null, file.originalname )
+ }
+});
+
+var upload = multer({
+ storage: storage
+});
+
+
+/*
+router.use(multer({
+ dest: process.cwd() + '/uploads/',
+ rename: function(fieldname,filename){
+ return filename;
+ }
+}));
+*/
+
+
+//router.use(express.json());
+//router.use(express.urlencoded());
+//router.use(multer({ dest: './uploads/' }));
+
+
+// GET
+router.get('/listSLA', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.listSLA(req,res,{code:'', msg:''} );
+});
+
+router.get('/activate', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var _module = req.query.module;
+ var rpc = req.query.rpc;
+ var version = req.query.version;
+ var mode = req.query.mode;
+
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.global_deactivate(req,res,_module,rpc,mode,callback); } );
+ tasks.push( function(callback) { dbRoutes.activate(req,res,_module,rpc,version,mode,callback); } );
+ async.series(tasks, function(err,result){
+
+ if ( err ) {
+ dbRoutes.listSLA(req,res,{code:'failure', msg:'Failed to activate, '+ String(err) });
+ }
+ else {
+ dbRoutes.listSLA(req,res,{ code:'success', msg:'Successfully activated directed graph.'});
+ }
+ });
+});
+
+router.get('/deactivate', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var _module = req.query.module;
+ var rpc = req.query.rpc;
+ var version = req.query.version;
+ var mode = req.query.mode;
+
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.deactivate(req,res,_module,rpc,version,mode,callback); } );
+ async.series(tasks, function(err,result){
+
+ if ( err ) {
+ dbRoutes.listSLA(req,res,{code:'failure', msg:'There was an error uploading the file. '+ err });
+ }
+ else {
+ dbRoutes.listSLA(req,res,{ code:'success', msg:'Successfully deactivated directed graph.'});
+ }
+ });
+});
+
+router.get('/deleteDG', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ var _module = req.query.module;
+ var rpc = req.query.rpc;
+ var version = req.query.version;
+ var mode = req.query.mode;
+
+ var tasks = [];
+ tasks.push( function(callback) { dbRoutes.deleteDG(req,res,_module,rpc,version,mode,callback); } );
+ async.series(tasks, function(err,result){
+
+ if ( err ) {
+ dbRoutes.listSLA(req,res,{ code:'failure', msg:'There was an error uploading the file. '+ err });
+ }
+ else {
+ dbRoutes.listSLA(req,res,{ code:'success', msg:'Successfully deleted directed graph.'});
+ }
+ });
+});
+
+router.post('/dgUpload', dbRoutes.checkDB, upload.single('filename'), function(req, res, next){
+
+ if(req.file.originalname){
+ if (req.file.originalname == 0) {
+
+ dbRoutes.listSLA(req,res,{ code:'danger', msg:'There was an error uploading the file, please try again.'});
+ }
+ fs.exists(req.file.path, function(exists) {
+ if(exists) {
+
+ // parse xml
+ try {
+ //dbRoutes.checkSvcLogic(req,res);
+
+ var file_buf = fs.readFileSync(req.file.path, "utf8");
+
+ // call Dan's svclogic shell script from here
+ var currentDB = dbRoutes.getCurrentDB();
+ var commandToExec = process.cwd()
+ + "/shell/svclogic.sh load "
+ + req.file.path + " "
+ + process.env.SDNC_CONFIG_DIR + "/svclogic.properties." + currentDB;
+
+ console.log("commandToExec:" + commandToExec);
+ child = exec(commandToExec ,function (error,stdout,stderr){
+ if(error){
+ console.error("error:" + error);
+ //res.type('text/html').status(400).send( error);
+ //return;
+ }
+ if(stderr){
+ res.status(400).send(stderr);
+ return;
+ }
+ if(stdout){
+ res.status(200).send( new Buffer('Success'));
+ return;
+ }
+
+ // remove the grave accents, the sax parser does not like them
+ //parser.write(file_buf.replace(/\`/g,'').toString('utf8')).close();
+ //dbRoutes.addDG(_module,version,rpc,mode,file_buf,req,res);
+ //dbRoutes.listSLA(req,res, resultObj);
+ });
+ } catch(ex) {
+ // keep 'em silent
+ console.error('sax error:'+ex);
+ res.status(400).send(ex);
+ return;
+ }
+
+ } else {
+ res.status(400).send(new Buffer('Cannot find file.'));
+ return;
+
+ }
+ });
+ }
+ else {
+ res.status(400).send(new Buffer('file does not exist\n'));
+ }
+ return;
+});
+
+
+// POST
+router.post('/upload', csp.checkAuth, dbRoutes.checkDB, upload.single('filename'), function(req, res, next){
+
+console.log('file:'+ JSON.stringify(req.file));
+
+ if(req.file.originalname){
+ if (req.file.originalname.size == 0) {
+ dbRoutes.listSLA(req,res,{ code:'danger', msg:'There was an error uploading the file, please try again.'});
+ }
+ fs.exists(req.file.path, function(exists) {
+ if(exists) {
+
+ // parse xml
+ try {
+ //dbRoutes.checkSvcLogic(req,res);
+
+ var currentDB = dbRoutes.getCurrentDB();
+ var file_buf = fs.readFileSync(req.file.path, "utf8");
+
+ // call Dan's svclogic shell script from here
+ var commandToExec = process.cwd()
+ + "/shell/svclogic.sh load "
+ + req.file.path + " "
+ + process.env.SDNC_CONFIG_DIR + "/svclogic.properties." + currentDB;
+
+ console.log("commandToExec:" + commandToExec);
+ child = exec(commandToExec ,function (error,stdout,stderr){
+ if(error){
+ console.error("error:" + error);
+ dbRoutes.listSLA(req,res,{code:'failure',msg:error} );
+ return;
+ }
+ if(stderr){
+ console.error("stderr:" + JSON.stringify(stderr,null,2));
+ var s_stderr = JSON.stringify(stderr);
+ if ( s_stderr.indexOf("Saving") > -1 )
+ {
+ dbRoutes.listSLA(req,res,{code:'success', msg:'File sucessfully uploaded.'});
+ }else {
+ dbRoutes.listSLA(req,res,{code:'failure', msg:stderr});
+ }
+ return;
+ }
+ if(stdout){
+ console.log("stderr:" + stdout);
+ dbRoutes.listSLA(req,res,{code:'success', msg:'File sucessfully uploaded.'});
+ return;
+ }
+
+ // remove the grave accents, the sax parser does not like them
+ //parser.write(file_buf.replace(/\`/g,'').toString('utf8')).close();
+ //dbRoutes.addDG(_module,version,rpc,mode,file_buf,req,res);
+ //dbRoutes.listSLA(req,res, resultObj);
+ });
+ } catch(ex) {
+ // keep 'em silent
+ console.error("error:" + ex);
+ dbRoutes.listSLA(req,res,{code:'failure',msg:ex} );
+ }
+
+ } else {
+ dbRoutes.listSLA(req,res,{ code:'danger', msg:'There was an error uploading the file, please try again.'});
+ }
+ });
+ }
+ else {
+ dbRoutes.listSLA(req,res,{ code:'danger', msg:'There was an error uploading the file, please try again.'});
+ }
+});
+
+router.get('/printAsXml', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ try {
+ //dbRoutes.checkSvcLogic(req,res);
+
+ var _module = req.query.module;
+ var rpc = req.query.rpc;
+ var version = req.query.version;
+ var mode = req.query.mode;
+ var currentDB = dbRoutes.getCurrentDB();
+
+ // call Dan's svclogic shell script from here
+ var commandToExec = process.cwd()
+ + "/shell/svclogic.sh get-source "
+ + _module + " "
+ + rpc + " "
+ + mode + " "
+ + version + " "
+ + process.env.SDNC_CONFIG_DIR + "/svclogic.properties." + currentDB;
+
+ console.log("commandToExec:" + commandToExec);
+
+ child = exec(commandToExec , {maxBuffer: 1024*5000}, function (error,stdout,stderr){
+ if(error){
+ console.error("error:" + error);
+ dbRoutes.listSLA(req,res,{code:'failure',msg:error} );
+ return;
+ }
+ //if(stderr){
+ //logger.info("stderr:" + stderr);
+ //}
+ if(stdout){
+ console.log("OUTPUT:" + stdout);
+ res.render('sla/printasxml', {result:{code:'success',
+ msg:'Module : ' + _module + '\n' +
+ 'RPC : ' + rpc + '\n' +
+ 'Mode : ' + mode + '\n' +
+ 'Version: ' + version + '\n\n' + stdout}, header:process.env.MAIN_MENU});
+ }
+
+ // remove the grave accents, the sax parser does not like them
+ //parser.write(file_buf.replace(/\`/g,'').toString('utf8')).close();
+ //dbRoutes.addDG(_module,version,rpc,mode,file_buf,req,res);
+ //dbRoutes.listSLA(req,res, resultObj);
+ });
+ } catch(ex) {
+ console.error("error:" + ex);
+ dbRoutes.listSLA(req,res,{code:'failure',msg:ex} );
+ }
+});
+
+
+router.get('/printAsGv', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ try {
+ //dbRoutes.checkSvcLogic(req,res);
+
+ var _module = req.query.module;
+ var rpc = req.query.rpc;
+ var version = req.query.version;
+ var mode = req.query.mode;
+ var currentDB = dbRoutes.getCurrentDB();
+console.log('currentDB='+currentDB);
+
+ // call Dan's svclogic shell script from here
+ var commandToExec = process.cwd()
+ + "/shell/svclogic.sh print "
+ + _module + " "
+ + rpc + " "
+ + mode + " "
+ + version + " "
+ + process.env.SDNC_CONFIG_DIR + "/svclogic.properties." + currentDB
+ + " | dot -Tpng";
+
+ console.log("commandToExec:" + commandToExec);
+
+ child = exec(commandToExec ,
+ {encoding:'base64',maxBuffer:5000*1024}, function (error,stdout,stderr){
+ if(error){
+ console.error("error:" + error);
+ dbRoutes.listSLA(req,res,{code:'failure',msg:error} );
+ return;
+ }
+ if(stderr){
+ console.error("stderr:" + stderr);
+ }
+ if(stdout){
+ //logger.info("OUTPUT:" + stdout);
+ //res.render('sla/printasgv', result = {code:'success',
+ //msg:new Buffer(stdout,'base64')} );
+ res.render('sla/printasgv', {result:{code:'success',
+ module: _module,
+ rpc: rpc,
+ version: version,
+ mode:mode,
+ msg:stdout}, header:process.env.MAIN_MENU});
+ }
+
+ // remove the grave accents, the sax parser does not like them
+ //parser.write(file_buf.replace(/\`/g,'').toString('utf8')).close();
+ //dbRoutes.addDG(_module,version,rpc,mode,file_buf,req,res);
+ //dbRoutes.listSLA(req,res, resultObj);
+ });
+ } catch(ex) {
+ console.error("error:" + ex);
+ dbRoutes.listSLA(req,res,{code:'failure',msg:ex} );
+ }
+
+});
+module.exports = router;
diff --git a/admportal/server/router/routes/user.js b/admportal/server/router/routes/user.js
new file mode 100644
index 0000000..116bf93
--- /dev/null
+++ b/admportal/server/router/routes/user.js
@@ -0,0 +1,169 @@
+var express = require('express');
+var router = express.Router();
+var exec = require('child_process').exec;
+var util = require('util');
+var fs = require('fs');
+var dbRoutes = require('./dbRoutes');
+var csp = require('./csp');
+var bodyParser = require('body-parser');
+var sax = require('sax'),strict=true,parser = sax.parser(strict);
+
+// SVC_LOGIC table columns
+var _module=''; // cannot use module its a reserved word
+var version='';
+var rpc='';
+var mode='';
+var xmlfile='';
+
+
+//router.use(bodyParser());
+router.use(bodyParser.urlencoded({
+ extended: true
+}));
+
+
+// GET
+router.get('/listUsers', csp.checkAuth, function(req,res) {
+ dbRoutes.listUsers(req,res, {user:req.session.loggedInAdmin,code:'', msg:''} );
+});
+router.get('/deleteUser', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.deleteUser(req,res, {code:'', msg:''} );
+});
+
+//router.get('/activate', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ //var _module = req.query.module;
+ //var rpc = req.query.rpc;
+ //var version = req.query.version;
+ //var mode = req.query.mode;
+
+ //dbRoutes.activate(req,res,_module,rpc,version,mode);
+//});
+
+//router.get('/deactivate', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ //var _module = req.query.module;
+ //var rpc = req.query.rpc;
+ //var version = req.query.version;
+ //var mode = req.query.mode;
+//
+ //dbRoutes.deactivate(req,res,_module,rpc,version,mode);
+//});
+
+//router.get('/deleteDG', csp.checkAuth, dbRoutes.checkDB, function(req,res){
+
+ //var _module = req.query.module;
+ //var rpc = req.query.rpc;
+ //var version = req.query.version;
+ //var mode = req.query.mode;
+
+ //dbRoutes.deleteDG(req,res,_module,rpc,version,mode);
+//});
+/*
+// SAX
+parser.onerror = function (e) {
+ logger.debug('onerror');
+ // an error happened.
+};
+parser.ontext = function (t) {
+ // got some text. t is the string of text.
+ logger.debug('ontext:'+t);
+};
+parser.onopentag = function (node) {
+ // opened a tag. node has "name" and "attributes"
+ if ( node.name == 'service-logic' )
+ {
+ _module = node.attributes.module;
+ version = node.attributes.version;
+ }
+ if ( node.name == 'method' )
+ {
+ rpc = node.attributes.rpc;
+ mode = node.attributes.mode;
+ }
+};
+parser.onattribute = function (attr) {
+ // an attribute. attr has "name" and "value"
+ logger.debug('onattribute:'+attr);
+};
+parser.onend = function () {
+ // parser stream is done, and ready to have more stuff written to it.
+ logger.debug('onend:');
+};
+*/
+
+
+// POST
+router.post('/updateUser', csp.checkAuth, dbRoutes.checkDB, function(req,res,next){
+ dbRoutes.updateUser(req,res,{code:'',msg:''});
+});
+router.post('/addUser', csp.checkAuth, dbRoutes.checkDB, function(req,res) {
+ dbRoutes.addUser(req,res, {code:'', msg:''} );
+});
+
+//router.post('/upload', csp.checkAuth, dbRoutes.checkDB, function(req, res, next){
+
+/*
+logger.debug("upload");
+ if(req.files.filename){
+ if (req.files.filename.size == 0) {
+ resultObj =
+ {code:'danger', msg:'There was an error uploading the file, please try again.'};
+ dbRoutes.listSLA(req,res, resultObj);
+ }
+ fs.exists(req.files.filename.path, function(exists) {
+ if(exists) {
+ resultObj = {code:'success', msg:'File sucessfully uploaded.'};
+
+ // parse xml
+ try {
+ var file_buf = fs.readFileSync(req.files.filename.path, "utf8");
+logger.debug('file '+req.files.filename);
+
+
+ // call Dan's svclogic shell script from here
+ var commandToExec = process.cwd()
+ + "/shell/svclogic.sh load "
+ + req.files.filename.path + " "
+ + process.cwd()
+ + "/config/svclogic.properties";
+
+ logger.debug("commandToExec:" + commandToExec);
+ child = exec(commandToExec ,function (error,stdout,stderr){
+ if(error){
+ logger.info("error:" + error);
+ }
+ if(stderr){
+ logger.info("stderr:" + stderr);
+ }
+ if(stdout){
+ logger.info("OUTPUT:" + stdout);
+ dbRoutes.listSLA(req,res, resultObj);
+ }
+
+ // remove the grave accents, the sax parser does not like them
+ //parser.write(file_buf.replace(/\`/g,'').toString('utf8')).close();
+ //dbRoutes.addDG(_module,version,rpc,mode,file_buf,req,res);
+ //dbRoutes.listSLA(req,res, resultObj);
+ });
+ } catch(ex) {
+ // keep 'em silent
+ logger.debug('sax error:'+ex);
+ }
+
+ } else {
+ resultObj =
+ {code:'danger', msg:'There was an error uploading the file, please try again.'};
+ dbRoutes.listSLA(req,res, resultObj);
+ }
+ });
+ }
+ else {
+ resultObj =
+ {code:'danger', msg:'There was an error uploading the file, please try again.'};
+ dbRoutes.listSLA(req,res, resultObj);
+ }
+});
+*/
+
+module.exports = router;
diff --git a/admportal/server/router/routes/vnf.js b/admportal/server/router/routes/vnf.js
new file mode 100644
index 0000000..be004fe
--- /dev/null
+++ b/admportal/server/router/routes/vnf.js
@@ -0,0 +1,603 @@
+
+// Helper functions for processing a VNF worksheet
+
+var helpers = require('./helpers.js');
+var _ = require('lodash');
+var csvtojson = require('csvtojson');
+var async = require('async');
+var uuid = require('node-uuid'); // generate a uuid with "uuid.v1()"
+var path = require('path');
+var fs = require("fs");
+var moment = require("moment");
+
+var vnf = module.exports;
+var getParam = helpers.getParam;
+
+var callback;
+var indir;
+var csvGeneral, csvZones, csvNetworks, csvVMs, csvVMnetworks, csvVMnetworkIPs, csvVMnetworkMACs, csvTagValues;
+var rawJson={}
+var finalJson={};
+var platform;
+var req, res;
+var preloadVersion; // 1607, 1610, etc...
+
+puts = helpers.puts;
+putd = helpers.putd;
+
+vnf.go = function(lreq,lres,cb,dir){
+ puts("Processing VNF workbook");
+ req = lreq;
+ res = lres;
+ callback = cb;
+ if (dir!="") {
+ platform="pc";
+ indir=dir;
+ } else {
+ platform="portal";
+ indir=process.cwd() + "/uploads/";
+ }
+ doGeneral();
+}
+
+
+// READ WORKSHEET: GENERAL
+
+function doGeneral() {
+ puts("Reading General worksheet");
+ var csvFilename="General.csv";
+ var newFileName = helpers.getFileName(req, csvFilename);
+ if ( newFileName != null ) {
+ helpers.readCsv(indir, newFileName, gotGeneral);
+ }
+ else {
+ callback(csvFilename + ' file is missing from upload.');
+ }
+}
+
+function gotGeneral(err, jsonObj) {
+ if (err) {
+ puts("\nError!");
+ putd(err);
+ callback('General.csv file is missing from upload.');
+ return;
+ }
+ csvGeneral = jsonObj;
+ puts("\nRead this: ");
+ putd(csvGeneral);
+ puts("\n");
+ doAvailZones();
+}
+
+// READ WORKSHEET: AVAILABILITY ZONES
+
+function doAvailZones() {
+ puts("Reading Availability-zones worksheet");
+ var csvFilename="Availability-zones.csv";
+ var newFileName = helpers.getFileName(req, csvFilename);
+ if ( newFileName != null ) {
+ helpers.readCsv(indir, newFileName, gotAvailZones);
+ }
+ else {
+ callback(csvFilename + ' file is missing from upload.');
+ }
+}
+
+function gotAvailZones(err, jsonObj) {
+ if (err) {
+ puts("\nError!");
+ putd(err);
+ callback('Availability-zones.csv file is missing from upload.');
+ return;
+ }
+ csvZones = jsonObj;
+ csvZones = _.reject(csvZones, 'field2', 'Availability Zones');
+ csvZones = _.reject(csvZones, 'field2', 'List the availability zones for this VNF');
+ csvZones = _.reject(csvZones, 'field2', '');
+ puts("\nRead this: ");
+ putd(csvZones);
+ puts("\n");
+ doNetworks();
+}
+
+// READ WORKSHEET: NETWORKS
+
+function doNetworks() {
+ puts("Reading Networks worksheet");
+ var csvFilename="Networks.csv";
+ var newFileName = helpers.getFileName(req, csvFilename);
+ if ( newFileName != null ) {
+ helpers.readCsv(indir, newFileName, gotNetworks);
+ }
+ else {
+ callback(csvFilename + ' file is missing from upload.');
+ }
+}
+
+function gotNetworks(err, jsonObj) {
+ if (err) {
+ puts("\nError!");
+ putd(err);
+ callback('Networks.csv file is missing from upload.');
+ return;
+ }
+ csvNetworks = jsonObj;
+ csvNetworks = _.reject(csvNetworks, 'field2', 'Networks');
+ csvNetworks = _.reject(csvNetworks, 'field2', 'List the VNF networks. (VM-networks are on a different worksheet.)');
+ csvNetworks = _.reject(csvNetworks, 'field2', 'network-role');
+ csvNetworks = _.reject(csvNetworks, 'field2', '');
+ puts("\nRead this: ");
+ putd(csvNetworks);
+ puts("\n");
+ doVMs();
+}
+
+// READ WORKSHEET: VMs
+
+function doVMs() {
+ puts("Reading VMs worksheet");
+ var csvFilename="VMs.csv";
+ var newFileName = helpers.getFileName(req, csvFilename);
+ if ( newFileName != null ) {
+ helpers.readCsv(indir, newFileName, gotVMs);
+ }
+ else {
+ callback(csvFilename + ' file is missing from upload.');
+ }
+}
+
+function gotVMs(err, jsonObj) {
+ if (err) {
+ puts("\nError!");
+ putd(err);
+ callback('VMs.csv file is missing from upload.');
+ return;
+ }
+ csvVMs = jsonObj;
+ csvVMs = _.reject(csvVMs, 'field2', 'VMs');
+ csvVMs = _.reject(csvVMs, 'field2', 'List the VM types for this VNF');
+ csvVMs = _.reject(csvVMs, 'field2', 'vm-type');
+ csvVMs = _.reject(csvVMs, 'field2', '');
+ puts("\nRead this: ");
+ putd(csvVMs);
+ puts("\n");
+ doVMnetworks();
+}
+
+// READ WORKSHEET: VM-NETWORKS
+
+function doVMnetworks() {
+ puts("Reading VM-networks worksheet");
+ var csvFilename="VM-networks.csv";
+ var newFileName = helpers.getFileName(req, csvFilename);
+ if ( newFileName != null ) {
+ helpers.readCsv(indir, newFileName, gotVMnetworks);
+ }
+ else {
+ callback(csvFilename + ' file is missing from upload.');
+ }
+}
+
+function gotVMnetworks(err, jsonObj) {
+ if (err) {
+ puts("\nError!");
+ putd(err);
+ callback('VM-networks.csv file is missing from upload.');
+ return;
+ }
+ csvVMnetworks = jsonObj;
+ csvVMnetworks = _.reject(csvVMnetworks, 'field2', 'VM-networks');
+ csvVMnetworks = _.reject(csvVMnetworks, 'field2', 'List the VM-networks for each VM type');
+ csvVMnetworks = _.reject(csvVMnetworks, 'field2', 'vm-type');
+ csvVMnetworks = _.reject(csvVMnetworks, 'field2', '');
+ puts("\nRead this: ");
+ putd(csvVMnetworks);
+ puts("\n");
+ doVMnetworkIPs();
+}
+
+// READ WORKSHEET: VM-NETWORK-IPS
+
+function doVMnetworkIPs() {
+ puts("Reading VM-network-IPs worksheet");
+ var csvFilename="VM-network-IPs.csv";
+ var newFileName = helpers.getFileName(req, csvFilename);
+ if ( newFileName != null ) {
+ helpers.readCsv(indir, newFileName, gotVMnetworkIPs);
+ }
+ else {
+ callback(csvFilename + ' file is missing from upload.');
+ }
+}
+
+function gotVMnetworkIPs(err, jsonObj) {
+ if (err) {
+ puts("\nError!");
+ putd(err);
+ callback('VM-network-IPs.csv file is missing from upload.');
+ return;
+ }
+ csvVMnetworkIPs = jsonObj;
+ csvVMnetworkIPs = _.reject(csvVMnetworkIPs, 'field2', 'VM-network-IPs');
+ csvVMnetworkIPs = _.reject(csvVMnetworkIPs, 'field2', 'List the IPs assigned to each VM-network');
+ csvVMnetworkIPs = _.reject(csvVMnetworkIPs, 'field2', 'vm-type');
+ csvVMnetworkIPs = _.reject(csvVMnetworkIPs, 'field2', '');
+ puts("\nRead this: ");
+ putd(csvVMnetworkIPs);
+ puts("\n");
+ doVMnetworkMACs();
+}
+
+// READ WORKSHEET: VM-NETWORK-MACS
+
+function doVMnetworkMACs() {
+ puts("Reading VM-network-MACs worksheet");
+ var csvFilename="VM-network-MACs.csv";
+ var newFileName = helpers.getFileName(req, csvFilename);
+ if ( newFileName != null ) {
+ helpers.readCsv(indir, newFileName, gotVMnetworkMACs);
+ }
+ else {
+ callback(csvFilename + ' file is missing from upload.');
+ }
+}
+
+function gotVMnetworkMACs(err, jsonObj) {
+ if (err) {
+ puts("\nError!");
+ putd(err);
+ callback('VM-network-MACs.csv file is missing from upload.');
+ return;
+ }
+ csvVMnetworkMACs = jsonObj;
+ csvVMnetworkMACs = _.reject(csvVMnetworkMACs, 'field2', 'VM-network-MACs');
+ csvVMnetworkMACs = _.reject(csvVMnetworkMACs, 'field2', 'List the MACs assigned to each VM-network');
+ csvVMnetworkMACs = _.reject(csvVMnetworkMACs, 'field2', 'vm-type');
+ csvVMnetworkMACs = _.reject(csvVMnetworkMACs, 'field2', '');
+ puts("\nRead this: ");
+ putd(csvVMnetworkMACs);
+ puts("\n");
+ doTagValues();
+}
+
+// READ WORKSHEET: TAG-VALUES
+
+function doTagValues() {
+ puts("Reading Tag-values worksheet");
+ var csvFilename="Tag-values.csv";
+ var newFileName = helpers.getFileName(req, csvFilename);
+ if ( newFileName != null ) {
+ helpers.readCsv(indir, newFileName, gotTagValues);
+ }
+ else {
+ callback(csvFilename + ' file is missing from upload.');
+ }
+}
+
+function gotTagValues(err, jsonObj) {
+ if (err) {
+ puts("\nError!");
+ putd(err);
+ callback('Tag-values.csv file is missing from upload.');
+ return;
+ }
+ csvTagValues = jsonObj;
+ csvTagValues = _.reject(csvTagValues, 'field2', 'Tag-values');
+ csvTagValues = _.reject(csvTagValues, 'field2', 'Extra data to be passed into the HEAT template for this VNF');
+ csvTagValues = _.reject(csvTagValues, 'field2', 'vnf-parameter-name');
+ csvTagValues = _.reject(csvTagValues, 'field2', 'vnf-parameter-value');
+ csvTagValues = _.reject(csvTagValues, 'field2', '');
+ puts("\nRead this: ");
+ putd(csvTagValues);
+ puts("\n");
+ doneReadingFiles();
+}
+
+
+
+
+function doneReadingFiles() {
+ puts("\n");
+ puts("DONE READING FILES!");
+ puts("\n");
+ processJson();
+}
+
+
+// PROCESS THE CSV FILES INTO OBJECTS TO BE ASSEMBLED INTO FINAL OUTPUT
+function processJson() {
+ processGeneral();
+ processAvailZones();
+ processNetworks();
+ processVMnetworks();
+ processVMnetips();
+ processVMnetmacs();
+ processVMs();
+ processTagValues();
+ assembleJson();
+}
+
+// ASSEMBLE AND OUTPUT RESULTS
+
+function assembleJson() {
+ puts("\n");
+ puts("Using raw JSON and assembling final ouptut JSON.");
+ puts("\n");
+
+ vnfTopoID = { "service-type": "SDN-MOBILITY",
+ "vnf-name": rawJson['vf-module-name'],
+ "vnf-type": rawJson['vf-module-model-name'],
+ "generic-vnf-name": rawJson['generic-vnf-name'],
+ "generic-vnf-type": rawJson['generic-vnf-type'] };
+
+ vnfZones = rawJson['availability-zones'];
+
+ vnfNetworks = rawJson['networks'];
+
+ vnfVMs = rawJson['vms'];
+
+ vnfParams = rawJson['tag-values'];
+
+ vnfAssignments = { "availability-zones": vnfZones,
+ "vnf-networks": vnfNetworks,
+ "vnf-vms": vnfVMs};
+
+ vnfTopo = { "vnf-topology-identifier": vnfTopoID,
+ "vnf-assignments": vnfAssignments,
+ "vnf-parameters": vnfParams };
+
+ vnfInput = {'vnf-topology-information': vnfTopo};
+
+ finalJson = {"input": vnfInput};
+
+ outputJson();
+}
+
+function outputJson() {
+ puts("\n");
+ puts("\n");
+ puts(JSON.stringify(finalJson,null,2));
+ puts("\n");
+ puts("\n");
+ var unixTime, fullpath_filename, filename;
+ unixTime = moment().unix();
+ if (platform=='portal') {
+ fullpath_filename = process.cwd() + "/uploads/" + unixTime + ".vnf_worksheet.json";
+ filename = unixTime + ".vnf_worksheet.json.";
+ } else {
+ fullpath_filename = "./output.json."+unixTime;
+ filename = "output.json." + unixTime;
+ }
+ helpers.writeOutput(req, fullpath_filename, JSON.stringify(finalJson,null,2), callback);
+ callback(null, finalJson, filename);
+}
+
+
+// Gather functions that actually process data after it is all read
+
+function processGeneral() {
+
+ preloadVersion = getParam(csvGeneral, 'field2', 'preload-version', 'field3');
+ rawJson['preload-version'] = preloadVersion;
+ puts("Preload version: " + preloadVersion);
+
+ if ( (preloadVersion!='1607') && (preloadVersion!='1610') ) {
+ puts("\nError - incorrect version of preload worksheet.");
+ callback('Error - incorrect version of preload worksheet.');
+ }
+
+ rawJson['vf-module-name'] = getParam(csvGeneral, 'field2', 'vf-module-name', 'field3');
+ // rawJson['vf-module-type'] = getParam(csvGeneral, 'field2', 'vf-module-type', 'field3');
+ try {
+ rawJson['vf-module-model-name'] = getParam(csvGeneral, 'field2', 'vf-module-model-name', 'field3');
+ } catch (e) {
+ puts("\n\n");
+ puts("ERROR ERROR ERROR ERROR ERROR\n");
+ puts("Failed to find data field 'vf-module-model-name'. Maybe this preload worksheet is older?")
+ puts("If on the 'general' tab there is a field called 'vf-module-type' please rename it to 'vf-module-model-name'");
+ puts("\n\n");
+ process.exit();
+ }
+ rawJson['generic-vnf-name'] = getParam(csvGeneral, 'field2', 'vnf-name', 'field3');
+ rawJson['generic-vnf-type'] = getParam(csvGeneral, 'field2', 'vnf-type', 'field3');
+ rawJson['request-id'] = uuid.v1();
+ rawJson['source'] = "ADMINPORTAL";
+ rawJson['request-action'] = "PreloadVNFRequest";
+ rawJson['svc-request-id'] = uuid.v1();
+ rawJson['svc-action'] = "reserve";
+ puts('rawJson:');
+ putd(rawJson);
+ puts("\n");
+}
+
+function processAvailZones() {
+ var newZones = _.map(csvZones, function(x) { return {'availability-zone': x['field2']}; } );
+ rawJson['availability-zones'] = newZones;
+ puts("Availability zones read:");
+ putd(rawJson['availability-zones']);
+ puts("\n");
+}
+
+function processNetworks() {
+ var newNetworks = [];
+ csvNetworks.forEach( function(network) {
+ var netJson = {};
+ netJson["network-role"] = network.field2;
+ netJson["network-name"] = network.field3;
+ netJson["network-id"] = network.field4;
+ netJson["contrail-network-fqdn"] = network.field5;
+ netJson["subnet-name"] = network.field6;
+ netJson["subnet-id"] = network.field7;
+ netJson["ipv6-subnet-name"] = network.field8;
+ netJson["ipv6-subnet-id"] = network.field9;
+ newNetworks.push(netJson);
+ }
+ );
+ puts("networks:");
+ putd(newNetworks);
+ rawJson["networks"] = newNetworks;
+}
+
+function processVMs() {
+ var newVMs = [];
+ csvVMs.forEach( function(vm) {
+ var vmJson = {};
+ vmJson["vm-type"] = vm.field2;
+ vmJson["vm-name"] = vm.field3;
+ newVMs.push(vmJson);
+ }
+ );
+
+ puts("VMs:");
+ putd(newVMs);
+
+ // OK, now for each type, get count and then build vm-names array of the names
+ var vnfvms=[]
+ vmTypes = _.uniq(_.pluck(newVMs,'vm-type'));
+ vmTypes.forEach( function(vmType) {
+ puts(vmType);
+ var vmJson={};
+ var vmThisType;
+ var vmCount;
+ var vmNames=[];
+ var tmpNames;
+ vmThisType=_.select(newVMs, 'vm-type', vmType);
+ vmCount=vmThisType.length;
+ vmJson["vm-type"] = vmType;
+ vmJson["vm-count"] = vmCount;
+ tmpNames = _.pluck(vmThisType,'vm-name');
+ vmJson["vm-names"] = _.map(tmpNames, function(nam) { return {"vm-name": nam}; } );
+ netroles = _.select( rawJson["vm-networks"], "vm-type", vmType );
+ newnetroles=[]
+ netroles.forEach( function(netrole) {
+ tmpNetDetails = {};
+ tmpNetDetails["network-role"] = netrole["network-role"];
+ tmpNetDetails["use-dhcp"] = netrole["use-dhcp"];
+
+ var tmpipsThisVmType=[];
+ tmpipsThisVmType = _.select( rawJson["vm-net-ips"], "vm-type", vmType);
+ var tmpips=[];
+ tmpips = _.select( tmpipsThisVmType, "network-role", netrole["network-role"]);
+ tmpipsJson = _.map(tmpips, function(ip) { return {"ip-address": ip["ip-address"]} } );
+ tmpipsJson = _.reject(tmpipsJson, function(o) { return (o["ip-address"]==undefined); } );
+ tmpNetDetails["network-ips"] = tmpipsJson;
+
+ var tmpipsv6ThisVmType=[];
+ tmpipsv6ThisVmType = _.select( rawJson["vm-net-ips"], "vm-type", vmType);
+ var tmpipsv6=[];
+ tmpipsv6 = _.select( tmpipsv6ThisVmType, "network-role", netrole["network-role"]);
+ tmpipsv6Json = _.map(tmpipsv6, function(ip) { return {"ip-address-ipv6": ip["ipv6-address"]} } );
+ tmpipsv6Json = _.reject(tmpipsv6Json, function(o) { return (o["ip-address-ipv6"]==undefined); } );
+ tmpNetDetails["network-ips-v6"] = tmpipsv6Json;
+
+ var tmpirpThisVmType=[];
+ tmpirpThisVmType = _.select( rawJson["vm-net-ips"], "vm-type", vmType);
+ var tmpirp=[];
+ tmpirp = _.select( tmpirpThisVmType, "network-role", netrole["network-role"]);
+ tmpirpJson = _.map(tmpirp, function(irp) { return {"interface-route-prefix-cidr": irp["interface-route-prefix"]} } );
+ tmpirpJson = _.reject(tmpirpJson, function(o) { return (o["interface-route-prefix-cidr"]==undefined); } );
+ tmpNetDetails["interface-route-prefixes"] = tmpirpJson;
+
+ var tmpmacsThisVmType=[];
+ tmpmacsThisVmType = _.select( rawJson["vm-net-macs"], "vm-type", vmType);
+ var tmpmacs=[];
+ tmpmacs = _.select( tmpmacsThisVmType, "network-role", netrole["network-role"]);
+ tmpmacsJson = _.map(tmpmacs, function(mac) { return {"mac-address": mac["mac-address"]} } );
+ tmpNetDetails["network-macs"] = tmpmacsJson;
+
+ var fip='';
+ fip = netrole["floating-ip"];
+ fip = _.trim(fip);
+ if (fip != '') {
+ tmpNetDetails["floating-ip"] = netrole["floating-ip"];
+ }
+
+ var fipv6='';
+ fipv6 = netrole["floating-ip-v6"];
+ fipv6 = _.trim(fipv6);
+ if (fipv6 != '') {
+ tmpNetDetails["floating-ip-v6"] = netrole["floating-ip-v6"];
+ }
+
+ newnetroles.push(tmpNetDetails);
+ }
+ );
+ vmJson["vm-networks"] = newnetroles;
+ putd(vmJson);
+ vnfvms.push(vmJson);
+ }
+ );
+ rawJson["vms"] = vnfvms;
+}
+
+function processVMnetworks() {
+ // For each VM type, for each Network role, get details like use-dhcp
+ var newVMnetworks = [];
+ csvVMnetworks.forEach( function(vm) {
+ var newvmJson = {};
+ newvmJson["vm-type"] = vm.field2;
+ newvmJson["network-role"] = vm.field3;
+ newvmJson["use-dhcp"] = vm.field4;
+ newvmJson["floating-ip"] = vm.field5;
+ newvmJson["floating-ip-v6"] = vm.field6;
+ newVMnetworks.push(newvmJson);
+ }
+ );
+ rawJson["vm-networks"] = newVMnetworks;
+ puts("rawJson for vm-networks...");
+ putd( rawJson["vm-networks"] );
+}
+
+
+function processVMnetips() {
+ // For each VM type, for each network role, get the set of network IPs
+ puts("Processing VM-net-ips");
+ var newVMnetips = [];
+ csvVMnetworkIPs.forEach( function(vm) {
+ var newvmnetipsJson = {};
+ newvmnetipsJson["vm-type"] = vm.field2;
+ newvmnetipsJson["network-role"] = vm.field3;
+ if (_.trim(vm.field4)!="") {
+ newvmnetipsJson["ip-address"] = vm.field4;
+ }
+ if (_.trim(vm.field5)!="") {
+ newvmnetipsJson["ipv6-address"] = vm.field5;
+ }
+ if (_.trim(vm.field6)!="") {
+ newvmnetipsJson["interface-route-prefix"] = vm.field6;
+ }
+ newVMnetips.push(newvmnetipsJson);
+ }
+ );
+ rawJson["vm-net-ips"] = newVMnetips;
+ puts("rawJson for vm-net-ips");
+ putd(rawJson["vm-net-ips"]);
+}
+
+function processVMnetmacs() {
+ // For each VM type, for each network role, get the set of MACs
+ puts("Processing VM-net-macs");
+ var newVMnetmacs = [];
+ csvVMnetworkMACs.forEach( function(vm) {
+ var newvmnetmacsJson = {};
+ newvmnetmacsJson["vm-type"] = vm.field2;
+ newvmnetmacsJson["network-role"] = vm.field3;
+ newvmnetmacsJson["mac-address"] = vm.field4;
+ newVMnetmacs.push(newvmnetmacsJson);
+ }
+ );
+ rawJson["vm-net-macs"] = newVMnetmacs;
+ puts("rawJson for vm-net-macs");
+ putd(rawJson["vm-net-macs"]);
+}
+
+function processTagValues() {
+ var newTagValues = _.map(csvTagValues, function(x) { return {'vnf-parameter-name': x['field2'],
+ 'vnf-parameter-value': x['field3']}; } );
+ rawJson['tag-values'] = newTagValues;
+ puts("Tag-values read:");
+ putd(rawJson['tag-values']);
+ puts("\n");
+}
+
+
diff --git a/admportal/shell/getAdmPortalProp.py b/admportal/shell/getAdmPortalProp.py
new file mode 100755
index 0000000..2e0ea79
--- /dev/null
+++ b/admportal/shell/getAdmPortalProp.py
@@ -0,0 +1,13 @@
+#!/usr/bin/python
+
+import json
+import sys
+import os
+
+propfile = os.getenv('SDNC_CONFIG_DIR') + '/admportal.json'
+
+from pprint import pprint
+
+with open(propfile) as data_file:
+ data = json.load(data_file)
+pprint( str(data[sys.argv[1]]))
diff --git a/admportal/shell/start.sh b/admportal/shell/start.sh
new file mode 100755
index 0000000..d8cb0fc
--- /dev/null
+++ b/admportal/shell/start.sh
@@ -0,0 +1,11 @@
+#. ./set-http-env.sh
+#cd ../bin
+#cp ../config/config.json.http ../config/config.json
+. /etc/attappl.env
+. ${PROJECT_HOME}/etc/default.env
+
+MAIN_MENU=`python printMainMenu.py | sed -e 's|['\'']||g'`
+export MAIN_MENU
+
+cd ..
+pm2 startOrRestart process.http.json
diff --git a/admportal/shell/start_netdb.sh b/admportal/shell/start_netdb.sh
new file mode 100755
index 0000000..4a3d75a
--- /dev/null
+++ b/admportal/shell/start_netdb.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+. /etc/attappl.env
+. ${PROJECT_HOME}/etc/default.env
+. ${PROJECT_HOME}/siteconfig/siteconf.info
+
+# only run on primary adm vm
+# ${Rank} comes from siteconf.info
+if [ ${Rank} == '1' ]; then
+ cd /opt/admportal/server
+ node ./netdb_updater.js -t ${1} -d ${2} >/dev/null 2>&1
+fi
diff --git a/admportal/shell/start_portal.sh b/admportal/shell/start_portal.sh
new file mode 100755
index 0000000..976502c
--- /dev/null
+++ b/admportal/shell/start_portal.sh
@@ -0,0 +1,32 @@
+#. ./set-https-env.sh
+#cd ../bin
+#cp ../config/config.json.https ../config/config.json
+export PROJECT_HOME=/opt/openecomp/sdnc
+export PROJECT_RUNTIME_BASE=/opt/openecomp/sdnc
+#export JAVA_HOME=/usr/lib/jvm/java-7-oracle
+export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
+export SSL_ENABLED=false
+export SDNC_CONFIG_DIR=${PROJECT_HOME}/data/properties
+export NODE_ENV=production
+export CLASSPATH=$PROJECT_HOME/admportal/lib:$CLASSPATH
+
+PATH=${PATH}:${JAVA_HOME}/bin
+
+#. ${PROJECT_HOME}/etc/default.env
+
+MAIN_MENU=`python $PROJECT_HOME/admportal/shell/getAdmPortalProp.py MainMenu | sed -e 's|['\'']||g'`
+export MAIN_MENU
+SSL_ENABLED=`python $PROJECT_HOME/admportal/shell/getAdmPortalProp.py sslEnabled | sed -e 's|['\'']||g'`
+export SSL_ENABLED
+
+if [ ! -d /opt/openecomp/sdnc/admportal/node_modules ]; then
+ cd /opt/openecomp/sdnc/admportal && npm install
+fi
+
+cd /opt/openecomp/sdnc/admportal
+node shell/www
+#if [ "true" == "${SSL_ENABLED}" ]; then
+ #pm2 startOrRestart process.https.json
+#else
+ #pm2 startOrRestart process.http.json
+#fi
diff --git a/admportal/shell/startssl.sh b/admportal/shell/startssl.sh
new file mode 100755
index 0000000..a56570e
--- /dev/null
+++ b/admportal/shell/startssl.sh
@@ -0,0 +1,28 @@
+#. ./set-https-env.sh
+#cd ../bin
+#cp ../config/config.json.https ../config/config.json
+export PROJECT_HOME=/opt/openecomp/sdnc
+export PROJECT_RUNTIME_BASE=/opt/openecomp/sdnc
+#export JAVA_HOME=/usr/lib/jvm/java-7-oracle
+export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
+export SSL_ENABLED=false
+export SDNC_CONFIG_DIR=${PROJECT_HOME}/data/properties
+export NODE_ENV=production
+export CLASSPATH=$PROJECT_HOME/admportal/lib:$CLASSPATH
+
+PATH=${PATH}:${JAVA_HOME}/bin
+
+#. ${PROJECT_HOME}/etc/default.env
+
+MAIN_MENU=`python $PROJECT_HOME/admportal/shell/getAdmPortalProp.py MainMenu | sed -e 's|['\'']||g'`
+export MAIN_MENU
+SSL_ENABLED=`python $PROJECT_HOME/admportal/shell/getAdmPortalProp.py sslEnabled | sed -e 's|['\'']||g'`
+export SSL_ENABLED
+
+cd ..
+node bin/www
+#if [ "true" == "${SSL_ENABLED}" ]; then
+ #pm2 startOrRestart process.https.json
+#else
+ #pm2 startOrRestart process.http.json
+#fi
diff --git a/admportal/shell/stop.sh b/admportal/shell/stop.sh
new file mode 100644
index 0000000..404c2fb
--- /dev/null
+++ b/admportal/shell/stop.sh
@@ -0,0 +1,2 @@
+pm2 stop http_admportal
+pm2 kill
diff --git a/admportal/shell/stopssl.sh b/admportal/shell/stopssl.sh
new file mode 100755
index 0000000..a71de61
--- /dev/null
+++ b/admportal/shell/stopssl.sh
@@ -0,0 +1,13 @@
+. /etc/attappl.env
+. ${PROJECT_HOME}/etc/default.env
+
+SSL_ENABLED=`python /opt/admportal/shell/getAdmPortalProp.py sslEnabled | sed -e 's|['\'']||g'`
+export SSL_ENABLED
+
+cd ..
+if [ "true" == "${SSL_ENABLED}" ]; then
+ pm2 stop admportal8443
+else
+ pm2 stop http_admportal
+fi
+pm2 kill
diff --git a/admportal/shell/svclogic.sh b/admportal/shell/svclogic.sh
new file mode 100644
index 0000000..aca6bf1
--- /dev/null
+++ b/admportal/shell/svclogic.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
+JARDIR=${BASEDIR}/lib
+
+for jar in $JARDIR/*.jar
+do
+ CLASSPATH=$CLASSPATH:${jar}
+done
+
+java -cp ${CLASSPATH}:${MYSQL_JDBC_DRIVER} org.openecomp.sdnc.sli.SvcLogicParser $*
diff --git a/admportal/shell/www b/admportal/shell/www
new file mode 100755
index 0000000..29710db
--- /dev/null
+++ b/admportal/shell/www
@@ -0,0 +1,14 @@
+#!/usr/bin/env node
+var debug = require('debug')('admportal');
+var app = require('../server/app');
+var properties = require(process.env.SDNC_CONFIG_DIR + '/admportal.json');
+var out_file = "/opt/openecomp/sdnc/admportal/logs/http_admportal.log";
+var error_file = "/opt/openecomp/sdnc/admportal/logs/error_http_admportal.log";
+var cwd = "/opt/openecomp/sdnc/admportal";
+
+app.set('port', properties.nonSslPort || 8181 );
+
+var server = app.listen(app.get('port'), function() {
+ console.log('Express server listening on port ' + server.address().port);
+ debug('Express server listening on port ' + server.address().port);
+});
diff --git a/admportal/src/assembly/assemble_zip.xml b/admportal/src/assembly/assemble_zip.xml
new file mode 100644
index 0000000..46763c8
--- /dev/null
+++ b/admportal/src/assembly/assemble_zip.xml
@@ -0,0 +1,101 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>bin</directory>
+ <outputDirectory>admportal/bin</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>certs</directory>
+ <outputDirectory>admportal/certs</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>config</directory>
+ <outputDirectory>admportal/config</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>lib</directory>
+ <outputDirectory>admportal/lib</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>node_modules</directory>
+ <outputDirectory>admportal/node_modules</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>public</directory>
+ <outputDirectory>admportal/public</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>routes</directory>
+ <outputDirectory>admportal/routes</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>server</directory>
+ <outputDirectory>admportal/server</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>shell</directory>
+ <outputDirectory>admportal/shell</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>uploads</directory>
+ <outputDirectory>admportal/uploads</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>test</directory>
+ <outputDirectory>admportal/test</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>views</directory>
+ <outputDirectory>admportal/views</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>.</directory>
+ <outputDirectory>admportal/</outputDirectory>
+ <includes>
+ <include>*.json</include>
+ <include>README</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>target/lib</directory>
+ <outputDirectory>admportal/lib</outputDirectory>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+
+</assembly>
diff --git a/admportal/src/main/swm/deinstall/postproc/post_proc b/admportal/src/main/swm/deinstall/postproc/post_proc
new file mode 100644
index 0000000..09e4ca8
--- /dev/null
+++ b/admportal/src/main/swm/deinstall/postproc/post_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exit 0;
+
diff --git a/admportal/src/main/swm/deinstall/preproc/pre_proc b/admportal/src/main/swm/deinstall/preproc/pre_proc
new file mode 100644
index 0000000..09e4ca8
--- /dev/null
+++ b/admportal/src/main/swm/deinstall/preproc/pre_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exit 0;
+
diff --git a/admportal/src/main/swm/fallback/postproc/post_proc b/admportal/src/main/swm/fallback/postproc/post_proc
new file mode 100644
index 0000000..09e4ca8
--- /dev/null
+++ b/admportal/src/main/swm/fallback/postproc/post_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exit 0;
+
diff --git a/admportal/src/main/swm/fallback/preproc/pre_proc b/admportal/src/main/swm/fallback/preproc/pre_proc
new file mode 100644
index 0000000..09e4ca8
--- /dev/null
+++ b/admportal/src/main/swm/fallback/preproc/pre_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exit 0;
+
diff --git a/admportal/src/main/swm/initinst/postproc/post_proc b/admportal/src/main/swm/initinst/postproc/post_proc
new file mode 100644
index 0000000..09e4ca8
--- /dev/null
+++ b/admportal/src/main/swm/initinst/postproc/post_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exit 0;
+
diff --git a/admportal/src/main/swm/initinst/preproc/pre_proc b/admportal/src/main/swm/initinst/preproc/pre_proc
new file mode 100644
index 0000000..09e4ca8
--- /dev/null
+++ b/admportal/src/main/swm/initinst/preproc/pre_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exit 0;
+
diff --git a/admportal/src/main/swm/install/postproc/post_proc b/admportal/src/main/swm/install/postproc/post_proc
new file mode 100644
index 0000000..09e4ca8
--- /dev/null
+++ b/admportal/src/main/swm/install/postproc/post_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exit 0;
+
diff --git a/admportal/src/main/swm/install/preproc/pre_proc b/admportal/src/main/swm/install/preproc/pre_proc
new file mode 100644
index 0000000..a8f5979
--- /dev/null
+++ b/admportal/src/main/swm/install/preproc/pre_proc
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exit 0;
diff --git a/admportal/src/main/swm/notes.txt b/admportal/src/main/swm/notes.txt
new file mode 100644
index 0000000..7fd88fb
--- /dev/null
+++ b/admportal/src/main/swm/notes.txt
@@ -0,0 +1,3 @@
+${groupId} ${artifactId} ${project.version}-${build.number}
+${SWM_VERSION}
+
diff --git a/admportal/test/YYYYMMDDHH_ctag_pool.csv b/admportal/test/YYYYMMDDHH_ctag_pool.csv
new file mode 100644
index 0000000..80102f7
--- /dev/null
+++ b/admportal/test/YYYYMMDDHH_ctag_pool.csv
@@ -0,0 +1,1501 @@
+#vlan_id,aic_site_id,azone,vplspe,purpose
+2001,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2002,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2003,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2004,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2005,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2006,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2007,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2008,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2009,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2010,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2011,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2012,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2013,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2014,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2015,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2016,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2017,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2018,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2019,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2020,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2021,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2022,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2023,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2024,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2025,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2026,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2027,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2028,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2029,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2030,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2031,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2032,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2033,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2034,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2035,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2036,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2037,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2038,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2039,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2040,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2041,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2042,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2043,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2044,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2045,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2046,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2047,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2048,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2049,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2050,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2051,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2052,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2053,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2054,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2055,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2056,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2057,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2058,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2059,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2060,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2061,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2062,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2063,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2064,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2065,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2066,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2067,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2068,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2069,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2070,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2071,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2072,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2073,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2074,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2075,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2076,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2077,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2078,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2079,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2080,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2081,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2082,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2083,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2084,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2085,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2086,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2087,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2088,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2089,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2090,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2091,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2092,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2093,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2094,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2095,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2096,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2097,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2098,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2099,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2100,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2101,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2102,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2103,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2104,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2105,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2106,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2107,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2108,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2109,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2110,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2111,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2112,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2113,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2114,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2115,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2116,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2117,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2118,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2119,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2120,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2121,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2122,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2123,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2124,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2125,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2126,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2127,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2128,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2129,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2130,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2131,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2132,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2133,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2134,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2135,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2136,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2137,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2138,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2139,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2140,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2141,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2142,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2143,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2144,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2145,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2146,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2147,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2148,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2149,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2150,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2151,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2152,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2153,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2154,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2155,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2156,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2157,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2158,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2159,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2160,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2161,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2162,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2163,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2164,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2165,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2166,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2167,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2168,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2169,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2170,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2171,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2172,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2173,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2174,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2175,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2176,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2177,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2178,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2179,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2180,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2181,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2182,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2183,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2184,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2185,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2186,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2187,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2188,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2189,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2190,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2191,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2192,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2193,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2194,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2195,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2196,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2197,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2198,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2199,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2200,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2201,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2202,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2203,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2204,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2205,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2206,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2207,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2208,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2209,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2210,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2211,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2212,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2213,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2214,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2215,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2216,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2217,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2218,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2219,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2220,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2221,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2222,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2223,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2224,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2225,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2226,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2227,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2228,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2229,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2230,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2231,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2232,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2233,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2234,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2235,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2236,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2237,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2238,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2239,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2240,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2241,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2242,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2243,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2244,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2245,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2246,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2247,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2248,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2249,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2250,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2251,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2252,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2253,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2254,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2255,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2256,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2257,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2258,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2259,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2260,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2261,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2262,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2263,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2264,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2265,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2266,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2267,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2268,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2269,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2270,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2271,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2272,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2273,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2274,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2275,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2276,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2277,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2278,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2279,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2280,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2281,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2282,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2283,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2284,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2285,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2286,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2287,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2288,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2289,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2290,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2291,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2292,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2293,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2294,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2295,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2296,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2297,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2298,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2299,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2300,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2301,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2302,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2303,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2304,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2305,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2306,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2307,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2308,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2309,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2310,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2311,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2312,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2313,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2314,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2315,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2316,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2317,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2318,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2319,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2320,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2321,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2322,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2323,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2324,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2325,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2326,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2327,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2328,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2329,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2330,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2331,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2332,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2333,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2334,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2335,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2336,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2337,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2338,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2339,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2340,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2341,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2342,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2343,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2344,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2345,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2346,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2347,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2348,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2349,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2350,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2351,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2352,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2353,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2354,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2355,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2356,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2357,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2358,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2359,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2360,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2361,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2362,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2363,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2364,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2365,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2366,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2367,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2368,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2369,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2370,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2371,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2372,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2373,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2374,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2375,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2376,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2377,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2378,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2379,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2380,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2381,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2382,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2383,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2384,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2385,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2386,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2387,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2388,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2389,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2390,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2391,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2392,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2393,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2394,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2395,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2396,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2397,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2398,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2399,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2400,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2401,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2402,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2403,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2404,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2405,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2406,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2407,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2408,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2409,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2410,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2411,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2412,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2413,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2414,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2415,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2416,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2417,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2418,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2419,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2420,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2421,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2422,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2423,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2424,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2425,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2426,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2427,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2428,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2429,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2430,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2431,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2432,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2433,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2434,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2435,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2436,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2437,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2438,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2439,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2440,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2441,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2442,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2443,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2444,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2445,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2446,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2447,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2448,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2449,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2450,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2451,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2452,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2453,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2454,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2455,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2456,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2457,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2458,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2459,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2460,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2461,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2462,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2463,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2464,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2465,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2466,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2467,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2468,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2469,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2470,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2471,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2472,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2473,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2474,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2475,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2476,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2477,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2478,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2479,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2480,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2481,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2482,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2483,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2484,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2485,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2486,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2487,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2488,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2489,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2490,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2491,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2492,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2493,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2494,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2495,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2496,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2497,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2498,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2499,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2500,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2501,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2502,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2503,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2504,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2505,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2506,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2507,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2508,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2509,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2510,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2511,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2512,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2513,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2514,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2515,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2516,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2517,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2518,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2519,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2520,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2521,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2522,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2523,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2524,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2525,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2526,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2527,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2528,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2529,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2530,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2531,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2532,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2533,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2534,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2535,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2536,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2537,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2538,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2539,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2540,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2541,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2542,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2543,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2544,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2545,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2546,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2547,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2548,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2549,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2550,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2551,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2552,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2553,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2554,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2555,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2556,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2557,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2558,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2559,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2560,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2561,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2562,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2563,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2564,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2565,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2566,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2567,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2568,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2569,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2570,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2571,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2572,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2573,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2574,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2575,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2576,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2577,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2578,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2579,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2580,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2581,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2582,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2583,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2584,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2585,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2586,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2587,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2588,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2589,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2590,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2591,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2592,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2593,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2594,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2595,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2596,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2597,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2598,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2599,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2600,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2601,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2602,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2603,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2604,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2605,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2606,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2607,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2608,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2609,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2610,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2611,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2612,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2613,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2614,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2615,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2616,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2617,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2618,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2619,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2620,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2621,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2622,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2623,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2624,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2625,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2626,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2627,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2628,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2629,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2630,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2631,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2632,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2633,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2634,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2635,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2636,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2637,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2638,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2639,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2640,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2641,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2642,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2643,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2644,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2645,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2646,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2647,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2648,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2649,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2650,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2651,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2652,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2653,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2654,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2655,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2656,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2657,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2658,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2659,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2660,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2661,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2662,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2663,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2664,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2665,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2666,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2667,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2668,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2669,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2670,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2671,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2672,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2673,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2674,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2675,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2676,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2677,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2678,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2679,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2680,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2681,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2682,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2683,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2684,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2685,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2686,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2687,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2688,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2689,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2690,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2691,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2692,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2693,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2694,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2695,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2696,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2697,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2698,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2699,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2700,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2701,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2702,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2703,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2704,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2705,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2706,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2707,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2708,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2709,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2710,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2711,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2712,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2713,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2714,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2715,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2716,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2717,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2718,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2719,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2720,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2721,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2722,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2723,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2724,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2725,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2726,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2727,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2728,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2729,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2730,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2731,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2732,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2733,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2734,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2735,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2736,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2737,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2738,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2739,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2740,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2741,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2742,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2743,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2744,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2745,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2746,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2747,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2748,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2749,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2750,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2751,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2752,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2753,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2754,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2755,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2756,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2757,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2758,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2759,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2760,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2761,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2762,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2763,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2764,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2765,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2766,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2767,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2768,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2769,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2770,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2771,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2772,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2773,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2774,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2775,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2776,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2777,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2778,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2779,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2780,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2781,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2782,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2783,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2784,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2785,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2786,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2787,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2788,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2789,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2790,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2791,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2792,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2793,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2794,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2795,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2796,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2797,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2798,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2799,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2800,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2801,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2802,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2803,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2804,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2805,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2806,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2807,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2808,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2809,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2810,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2811,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2812,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2813,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2814,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2815,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2816,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2817,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2818,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2819,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2820,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2821,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2822,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2823,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2824,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2825,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2826,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2827,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2828,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2829,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2830,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2831,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2832,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2833,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2834,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2835,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2836,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2837,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2838,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2839,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2840,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2841,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2842,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2843,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2844,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2845,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2846,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2847,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2848,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2849,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2850,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2851,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2852,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2853,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2854,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2855,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2856,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2857,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2858,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2859,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2860,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2861,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2862,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2863,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2864,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2865,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2866,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2867,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2868,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2869,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2870,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2871,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2872,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2873,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2874,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2875,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2876,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2877,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2878,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2879,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2880,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2881,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2882,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2883,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2884,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2885,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2886,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2887,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2888,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2889,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2890,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2891,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2892,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2893,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2894,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2895,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2896,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2897,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2898,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2899,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2900,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2901,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2902,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2903,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2904,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2905,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2906,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2907,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2908,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2909,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2910,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2911,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2912,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2913,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2914,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2915,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2916,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2917,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2918,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2919,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2920,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2921,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2922,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2923,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2924,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2925,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2926,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2927,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2928,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2929,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2930,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2931,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2932,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2933,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2934,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2935,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2936,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2937,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2938,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2939,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2940,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2941,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2942,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2943,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2944,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2945,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2946,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2947,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2948,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2949,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2950,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2951,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2952,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2953,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2954,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2955,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2956,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2957,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2958,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2959,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2960,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2961,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2962,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2963,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2964,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2965,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2966,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2967,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2968,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2969,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2970,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2971,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2972,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2973,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2974,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2975,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2976,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2977,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2978,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2979,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2980,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2981,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2982,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2983,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2984,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2985,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2986,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2987,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2988,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2989,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2990,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2991,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2992,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2993,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2994,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2995,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2996,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2997,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2998,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+2999,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3000,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3001,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3002,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3003,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3004,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3005,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3006,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3007,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3008,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3009,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3010,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3011,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3012,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3013,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3014,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3015,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3016,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3017,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3018,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3019,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3020,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3021,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3022,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3023,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3024,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3025,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3026,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3027,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3028,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3029,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3030,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3031,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3032,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3033,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3034,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3035,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3036,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3037,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3038,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3039,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3040,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3041,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3042,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3043,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3044,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3045,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3046,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3047,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3048,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3049,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3050,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3051,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3052,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3053,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3054,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3055,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3056,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3057,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3058,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3059,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3060,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3061,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3062,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3063,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3064,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3065,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3066,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3067,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3068,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3069,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3070,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3071,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3072,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3073,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3074,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3075,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3076,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3077,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3078,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3079,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3080,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3081,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3082,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3083,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3084,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3085,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3086,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3087,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3088,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3089,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3090,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3091,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3092,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3093,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3094,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3095,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3096,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3097,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3098,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3099,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3100,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3101,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3102,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3103,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3104,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3105,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3106,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3107,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3108,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3109,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3110,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3111,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3112,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3113,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3114,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3115,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3116,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3117,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3118,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3119,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3120,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3121,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3122,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3123,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3124,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3125,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3126,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3127,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3128,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3129,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3130,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3131,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3132,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3133,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3134,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3135,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3136,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3137,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3138,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3139,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3140,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3141,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3142,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3143,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3144,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3145,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3146,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3147,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3148,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3149,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3150,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3151,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3152,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3153,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3154,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3155,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3156,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3157,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3158,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3159,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3160,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3161,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3162,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3163,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3164,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3165,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3166,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3167,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3168,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3169,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3170,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3171,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3172,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3173,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3174,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3175,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3176,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3177,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3178,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3179,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3180,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3181,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3182,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3183,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3184,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3185,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3186,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3187,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3188,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3189,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3190,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3191,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3192,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3193,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3194,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3195,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3196,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3197,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3198,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3199,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3200,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3201,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3202,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3203,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3204,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3205,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3206,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3207,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3208,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3209,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3210,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3211,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3212,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3213,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3214,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3215,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3216,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3217,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3218,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3219,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3220,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3221,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3222,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3223,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3224,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3225,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3226,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3227,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3228,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3229,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3230,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3231,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3232,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3233,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3234,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3235,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3236,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3237,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3238,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3239,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3240,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3241,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3242,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3243,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3244,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3245,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3246,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3247,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3248,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3249,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3250,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3251,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3252,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3253,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3254,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3255,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3256,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3257,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3258,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3259,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3260,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3261,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3262,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3263,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3264,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3265,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3266,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3267,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3268,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3269,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3270,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3271,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3272,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3273,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3274,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3275,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3276,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3277,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3278,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3279,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3280,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3281,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3282,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3283,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3284,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3285,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3286,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3287,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3288,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3289,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3290,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3291,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3292,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3293,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3294,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3295,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3296,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3297,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3298,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3299,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3300,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3301,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3302,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3303,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3304,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3305,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3306,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3307,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3308,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3309,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3310,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3311,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3312,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3313,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3314,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3315,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3316,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3317,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3318,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3319,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3320,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3321,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3322,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3323,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3324,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3325,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3326,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3327,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3328,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3329,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3330,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3331,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3332,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3333,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3334,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3335,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3336,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3337,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3338,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3339,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3340,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3341,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3342,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3343,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3344,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3345,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3346,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3347,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3348,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3349,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3350,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3351,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3352,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3353,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3354,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3355,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3356,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3357,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3358,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3359,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3360,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3361,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3362,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3363,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3364,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3365,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3366,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3367,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3368,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3369,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3370,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3371,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3372,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3373,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3374,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3375,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3376,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3377,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3378,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3379,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3380,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3381,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3382,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3383,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3384,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3385,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3386,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3387,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3388,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3389,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3390,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3391,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3392,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3393,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3394,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3395,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3396,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3397,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3398,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3399,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3400,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3401,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3402,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3403,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3404,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3405,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3406,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3407,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3408,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3409,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3410,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3411,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3412,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3413,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3414,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3415,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3416,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3417,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3418,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3419,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3420,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3421,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3422,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3423,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3424,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3425,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3426,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3427,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3428,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3429,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3430,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3431,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3432,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3433,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3434,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3435,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3436,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3437,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3438,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3439,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3440,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3441,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3442,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3443,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3444,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3445,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3446,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3447,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3448,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3449,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3450,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3451,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3452,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3453,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3454,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3455,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3456,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3457,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3458,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3459,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3460,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3461,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3462,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3463,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3464,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3465,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3466,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3467,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3468,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3469,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3470,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3471,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3472,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3473,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3474,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3475,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3476,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3477,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3478,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3479,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3480,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3481,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3482,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3483,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3484,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3485,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3486,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3487,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3488,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3489,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3490,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3491,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3492,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3493,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3494,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3495,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3496,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3497,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3498,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3499,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+3500,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
diff --git a/admportal/test/eipam/sample.xml b/admportal/test/eipam/sample.xml
new file mode 100644
index 0000000..c058ecf
--- /dev/null
+++ b/admportal/test/eipam/sample.xml
@@ -0,0 +1,36 @@
+<aw:PurchaseOrder
+ aw:PurchaseOrderNumber="99503"
+ aw:OrderDate="1999-10-20"
+ xmlns:aw="http://www.adventure-works.com">
+ <aw:Address aw:Type="Shipping">
+ <aw:Name>Ellen Adams</aw:Name>
+ <aw:Street>123 Maple Street</aw:Street>
+ <aw:City>Mill Valley</aw:City>
+ <aw:State>CA</aw:State>
+ <aw:Zip>10999</aw:Zip>
+ <aw:Country>USA</aw:Country>
+ </aw:Address>
+ <aw:Address aw:Type="Billing">
+ <aw:Name>Tai Yee</aw:Name>
+ <aw:Street>8 Oak Avenue</aw:Street>
+ <aw:City>Old Town</aw:City>
+ <aw:State>PA</aw:State>
+ <aw:Zip>95819</aw:Zip>
+ <aw:Country>USA</aw:Country>
+ </aw:Address>
+ <aw:DeliveryNotes>Please leave packages in shed by driveway.</aw:DeliveryNotes>
+ <aw:Items>
+ <aw:Item aw:PartNumber="872-AA">
+ <aw:ProductName>Lawnmower</aw:ProductName>
+ <aw:Quantity>1</aw:Quantity>
+ <aw:USPrice>148.95</aw:USPrice>
+ <aw:Comment>Confirm this is electric</aw:Comment>
+ </aw:Item>
+ <aw:Item aw:PartNumber="926-AA">
+ <aw:ProductName>Baby Monitor</aw:ProductName>
+ <aw:Quantity>2</aw:Quantity>
+ <aw:USPrice>39.98</aw:USPrice>
+ <aw:ShipDate>1999-05-21</aw:ShipDate>
+ </aw:Item>
+ </aw:Items>
+</aw:PurchaseOrder>
diff --git a/admportal/test/gen.sh b/admportal/test/gen.sh
new file mode 100755
index 0000000..8c7928d
--- /dev/null
+++ b/admportal/test/gen.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+for i in `seq 2001 3500`;do
+ echo $i,MDTWNJ21A401,a2stx,auttx301vr1,IPAG-CTAG
+done
diff --git a/admportal/uploads/temp b/admportal/uploads/temp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/admportal/uploads/temp
diff --git a/admportal/views/admin/list_usertrace.ejs b/admportal/views/admin/list_usertrace.ejs
new file mode 100644
index 0000000..799288a
--- /dev/null
+++ b/admportal/views/admin/list_usertrace.ejs
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <title>SDN-C AdminPortal</title>
+</head>
+
+<body>
+
+<div class="actions" style="padding:0px 25px;">
+<h2>User Trace</h2>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'><%=result.msg %></div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'><%=result.msg %></div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <div class="actions" style="padding:15px 0px;">
+
+ </div>
+ <div class="content">
+ <table class="table table-hover">
+ <thead>
+ <tr>
+ <th>Date</th>
+ <th>ATTUID</th>
+ <th>Action</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% if (rows) {
+ rows.forEach(function(row) { %>
+ <tr>
+ <td><%= row.date %></td>
+ <td><%= row.attuid %></td>
+ <td><%= row.action %></td>
+ <td><%= row.description %></td>
+ </tr>
+ <% }); }; %>
+ </tbody>
+ </table>
+ </div>
+
+ <footer>
+ <% include ../partials/footer %>
+ </footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/admin/parameters.ejs b/admportal/views/admin/parameters.ejs
new file mode 100644
index 0000000..247abc5
--- /dev/null
+++ b/admportal/views/admin/parameters.ejs
@@ -0,0 +1,181 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#params').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Parameters</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary btn-md" data-toggle="modal" data-target="#new_parameter">
+ Add Parameter
+ </button>
+</div>
+
+ <table id="params" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*Name</th>
+ <th>*Value</th>
+ <th>Category</th>
+ <th>Memo</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.name %></td>
+ <td><%= row.value %></td>
+ <td><%= row.category %></td>
+ <td><%= row.memo %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateParameter('<%=row.name %>','<%= row.value %>','<%= row.category %>','<%= row.memo %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteParameter('<%= row.name %>','<%=row.value %>','<%= row.category %>','<%= row.memo %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+</div>
+
+<% include ../partials/new_parameter %>
+<% include ../partials/update_parameter %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitParam(form)
+{
+ var errorMsg='';
+ var name = '';
+ var value = '';
+ var category = '';
+ var memo = '';
+
+ if ( form.name == 'addForm' )
+ {
+ name = form.nf_name;
+ value = form.nf_value;
+ category = form.nf_category;
+ memo = form.nf_memo;
+ }
+ else
+ {
+ name = form.uf_name;
+ value = form.uf_value;
+ category = form.uf_category;
+ memo = form.uf_memo;
+ }
+
+ if ( (name.value == null) || (name.value == "") || isblank(name.value) )
+ {
+ errorMsg += 'Name is required.<br>';
+ }
+ if ( (value.value == null) || (value.value == "") || isblank(value.value) )
+ {
+ errorMsg += 'Value is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+ form.submit();
+}
+
+
+function updateParameter(name,value,category,memo) {
+
+ document.getElementById('uf_name').value=name;
+ document.getElementById('uf_value').value=value
+ document.getElementById('uf_category').value=category;
+ document.getElementById('uf_memo').value=memo;
+
+ document.getElementById('uf_key_name').value=name;
+
+ $('#update_parameter').modal('show');
+}
+
+function deleteParameter(name,value,category,memo) {
+
+ var url_string = encodeURI("/admin/deleteParameter?name=" + name
+ + "&value=" + value
+ + "&category=" + category
+ + "&memo=" + memo);
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete PARAMETER [" + name + "][" + value + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign(url_string);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/css_delete/bootstrap-theme.min.css b/admportal/views/css_delete/bootstrap-theme.min.css
new file mode 100644
index 0000000..4c3e7ba
--- /dev/null
+++ b/admportal/views/css_delete/bootstrap-theme.min.css
@@ -0,0 +1,5 @@
+/*!
+ * Bootstrap v3.3.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-default .badge,.btn-primary .badge,.btn-success .badge,.btn-info .badge,.btn-warning .badge,.btn-danger .badge{text-shadow:none}.btn:active,.btn.active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:hover,.btn-primary:focus{background-color:#265a88;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#265a88;border-color:#245580}.btn-primary:disabled,.btn-primary[disabled]{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:hover .badge,.list-group-item.active:focus .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
\ No newline at end of file
diff --git a/admportal/views/css_delete/bootstrap.min.css b/admportal/views/css_delete/bootstrap.min.css
new file mode 100644
index 0000000..b6fe4e0
--- /dev/null
+++ b/admportal/views/css_delete/bootstrap.min.css
@@ -0,0 +1,5 @@
+/*!
+ * Bootstrap v3.3.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:before,:after{color:#000!important;text-shadow:none!important;background:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before,.glyphicon-eur:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:hover,a:focus{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}mark,.mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px}input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{position:absolute;margin-top:4px \9;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],input[type=radio].disabled,input[type=checkbox].disabled,fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm,.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm,select.form-group-sm .form-control{height:30px;line-height:30px}textarea.input-sm,textarea.form-group-sm .form-control,select[multiple].input-sm,select[multiple].form-group-sm .form-control{height:auto}.input-lg,.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg,select.form-group-lg .form-control{height:46px;line-height:46px}textarea.input-lg,textarea.form-group-lg .form-control,select[multiple].input-lg,select[multiple].form-group-lg .form-control{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default.focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary:hover,.btn-primary:focus,.btn-primary.focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success.focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info.focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning.focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger.focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none;visibility:hidden}.collapse.in{display:block;visibility:visible}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none;visibility:hidden}.tab-content>.active{display:block;visibility:visible}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important;visibility:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#333}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#fff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-right:15px;padding-left:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body,.panel-group .panel-heading+.panel-collapse>.list-group{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:absolute;top:0;right:0;left:0;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.4;visibility:visible;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:400;line-height:1.42857143;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000}.carousel-inner>.item.next,.carousel-inner>.item.active.right{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.prev,.carousel-inner>.item.active.left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right,.carousel-inner>.item.active{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{display:table;content:" "}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
\ No newline at end of file
diff --git a/admportal/views/error.ejs b/admportal/views/error.ejs
new file mode 100644
index 0000000..7cf94ed
--- /dev/null
+++ b/admportal/views/error.ejs
@@ -0,0 +1,3 @@
+<h1><%= message %></h1>
+<h2><%= error.status %></h2>
+<pre><%= error.stack %></pre>
diff --git a/admportal/views/gamma/list.ejs b/admportal/views/gamma/list.ejs
new file mode 100644
index 0000000..cf89a09
--- /dev/null
+++ b/admportal/views/gamma/list.ejs
@@ -0,0 +1,162 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vlan_id_pool').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>NoD VLAN ID POOL</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+<div class="container-fluid">
+ <table id="vlan_id_pool" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>AIC Site ID</th>
+ <th>Purpose</th>
+ <th>VLAN ID</th>
+ <th>VLPSPE Name</th>
+ <th>Availability Zone</th>
+ <th>Status</th>
+ <th>Svc Instance ID</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.purpose %></td>
+ <td><%= row.vlan_id %></td>
+ <td><%= row.vplspe_name %></td>
+ <td><%= row.availability_zone %></td>
+ <td><%= row.status %></td>
+ <td><%= row.svc_instance_id %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateVlanPool('<%=row.aic_site_id %>','<%= row.availability_zone %>',
+ '<%= row.purpose %>','<%= row.vlan_id %>','<%= row.status %>',
+ '<%= row.svc_instance_id %>','<%= row.vplspe_name %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteVlanPool('<%=row.aic_site_id %>', '<%= row.purpose %>',
+ '<%= row.vlan_id %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+<!--
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadVLAN" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+ </form>
+ </div>
+ <% } %>
+-->
+</div>
+
+<% include ../partials/update_vlan_id_pool %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function updateVlanPool(aic_site_id,availability_zone,purpose,vlan_id,status,svc_instance_id,vplspe_name) {
+
+ document.getElementById('uf_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_availability_zone').value=availability_zone
+ document.getElementById('uf_purpose').value=purpose;
+ document.getElementById('uf_vlan_id').value=vlan_id;
+ document.getElementById('uf_status').value=status;
+ document.getElementById('uf_svc_instance_id').value=svc_instance_id;
+ document.getElementById('uf_vplspe_name').value=vplspe_name;
+
+ document.getElementById('uf_key_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_key_purpose').value=purpose;
+ document.getElementById('uf_key_vlan_id').value=vlan_id;
+ $('#update_vlan_id_pool_modal').modal('show');
+}
+
+function deleteVlanPool(aic_site_id,purpose,vlan_id) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete VLAN Id [" + aic_site_id + "][" + purpose + "][" + vlan_id + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteVlanPool?aic_site_id=" + aic_site_id + "&purpose=" + purpose + "&vlan_id=" + vlan_id);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listAicAvailZone.ejs b/admportal/views/gamma/listAicAvailZone.ejs
new file mode 100644
index 0000000..7d0b7bd
--- /dev/null
+++ b/admportal/views/gamma/listAicAvailZone.ejs
@@ -0,0 +1,166 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+<script class="init">
+ $(document).ready(function() {
+ $('#availability_zone').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>AIC Availabilty Zone Pool</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <table id="availability_zone" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>AIC Site ID</th>
+ <th>Availability Zone</th>
+ <th>Token</th>
+ <th>Service Type</th>
+ <th>Status</th>
+ <th>VNF ID</th>
+ <th>VNF Type</th>
+ <th>Hypervisor</th>
+ <% if(priv == 'A') { %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.availability_zone %></td>
+ <td><%= row.token %></td>
+ <td><%= row.service_type %></td>
+ <td><%= row.status %></td>
+ <td><%= row.vnf_id %></td>
+ <td><%= row.vnf_type %></td>
+ <td><%= row.hypervisor %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateAicAvailZone('<%=row.aic_site_id %>','<%= row.availability_zone %>','<%= row.token %>','<%= row.service_type %>','<%= row.status %>','<%= row.vnf_id %>','<%= row.vnf_type %>','<%= row.hypervisor %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteZone('<%=row.aic_site_id %>','<%= row.availability_zone %>', '<%= row.token %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+
+<!--
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadAicAvailZone" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+ </form>
+ </div>
+ <% } %>
+-->
+</div>
+
+<% include ../partials/update_aic_avail_zone %>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function updateAicAvailZone(aic_site_id,availability_zone,token,service_type,status,vnf_id,vnf_type,hypervisor) {
+
+ document.getElementById('uf_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_availability_zone').value=availability_zone
+ document.getElementById('uf_token').value=token;
+ document.getElementById('uf_service_type').value=service_type;
+ document.getElementById('uf_status').value=status;
+ document.getElementById('uf_vnf_id').value=vnf_id;
+ document.getElementById('uf_vnf_type').value=vnf_type;
+ document.getElementById('uf_hypervisor').value=hypervisor;
+ document.getElementById('uf_key_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_key_availability_zone').value=availability_zone
+ document.getElementById('uf_key_token').value=token;
+ $('#update_aic_avail_zone_modal').modal('show');
+}
+
+function deleteZone(siteid,azone,token) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete zone [" + siteid + "][" + azone + "][" + token + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteZone?siteid=" + siteid + "&azone=" + azone + "&token=" + token);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+</script>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listAicSwitch.ejs b/admportal/views/gamma/listAicSwitch.ejs
new file mode 100644
index 0000000..659652c
--- /dev/null
+++ b/admportal/views/gamma/listAicSwitch.ejs
@@ -0,0 +1,156 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+ <script class="init">
+ $(document).ready(function() {
+ $('#switch').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+ } );
+ </script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>AIC Switch</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <table id="switch" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Physical Network Name</th>
+ <th>Switch Name</th>
+ <th>AIC Site ID</th>
+ <th>UUID</th>
+ <th>Availability Zone</th>
+ <% if(priv == 'A') { %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.physical_network_name %></td>
+ <td><%= row.switch_name %></td>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.uuid %></td>
+ <td><%= row.availability_zone %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateAicSwitch('<%= row.physical_network_name %>','<%= row.switch_name %>','<%=row.aic_site_id %>','<%= row.uuid %>','<%=row.availability_zone %>');">Update</button>
+
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteSwitch('<%=row.physical_network_name %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+
+<!--
+ <% if(priv == 'A') { %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadAicSwitch" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+ </form>
+ </div>
+ <% } %>
+-->
+</div>
+
+<% include ../partials/update_aic_switch %>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function updateAicSwitch(physical_network_name,switch_name,aic_site_id,uuid,availability_zone) {
+
+ document.getElementById('uf_physical_network_name').value=physical_network_name;
+ document.getElementById('uf_switch_name').value=switch_name;
+ document.getElementById('uf_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_uuid').value=uuid;
+ document.getElementById('uf_availability_zone').value=availability_zone;
+ document.getElementById('uf_key_physical_network_name').value=physical_network_name;
+ $('#update_aic_switch_modal').modal('show');
+}
+function deleteSwitch(pnetwork_name) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete this switch [" + pnetwork_name + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteSwitch?phy_network_name=" + pnetwork_name);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listServiceHoming.ejs b/admportal/views/gamma/listServiceHoming.ejs
new file mode 100644
index 0000000..e25777a
--- /dev/null
+++ b/admportal/views/gamma/listServiceHoming.ejs
@@ -0,0 +1,241 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Service Homing</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_service_homing">
+ Add Service Homing
+ </button>
+ </div>
+ <% } %>
+
+ <table class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*Service Type</th>
+ <th>*LATA</th>
+ <th>*Hubbing City Type</th>
+ <th>Latitude</th>
+ <th>Longitude</th>
+ <th>*Primary Site Name</th>
+ <th>Secondary Site Name</th>
+ <th>Tertiary Site Name</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% var i=0; rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.service_type %></td>
+ <td><%= row.lata %></td>
+ <td><%= row.hubbing_city_type%></td>
+ <td><%= row.latitude %></td>
+ <td><%= row.longitude %></td>
+ <td><%= row.primary_aic_site_name %></td>
+ <td><%= row.secondary_aic_site_name %></td>
+ <td><%= row.tertiary_aic_site_name %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateServiceHoming('<%=row.service_type %>','<%= row.lata %>','<%= row.hubbing_city_type %>','<%= row.latitude %>','<%= row.longitude %>','<%= row.primary_aic_site_name %>','<%= row.secondary_aic_site_name %>','<%= row.tertiary_aic_site_name %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteServiceHoming('<%= row.service_type %>','<%=row.lata %>','<%= row.hubbing_city_type %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% i++; }); %>
+ </tbody>
+ </table>
+
+ <div class container>
+ <p><%= i %> rows in table.</p>
+ </div>
+
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadServiceHoming" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+
+ </form>
+ </div>
+ <% } %>
+</div>
+
+<% include ../partials/add_service_homing %>
+<% include ../partials/update_service_homing %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+function submitServiceHoming(form)
+{
+ var errorMsg='';
+ var lata='';
+ var hubbing_city_type='';
+ var primary_aic_site_name='';
+ var latitude='';
+ var longitude='';
+
+ if ( form.name == 'addForm' )
+ {
+ lata = form.nf_lata;
+ hubbing_city_type = form.nf_hubbing_city_type;
+ primary_aic_site_name = form.nf_primary_aic_site_name;
+ latitude = form.nf_latitude;
+ longitude = form.nf_longitude;
+ }
+ else
+ {
+ lata = form.uf_lata;
+ hubbing_city_type = form.uf_hubbing_city_type;
+ primary_aic_site_name = form.uf_primary_aic_site_name;
+ latitude = form.uf_latitude;
+ longitude = form.uf_longitude;
+ }
+
+
+ if ( (lata.value == null) || (lata.value == "") || isblank(lata.value) )
+ {
+ errorMsg += 'LATA is required.<br>';
+ }
+ if ( (hubbing_city_type.value == null) || (hubbing_city_type.value == "") || isblank(hubbing_city_type.value) )
+ {
+ errorMsg += 'Hubbing City Type is required.<br>';
+ }
+ if ( (primary_aic_site_name.value == null) || (primary_aic_site_name.value == "") || isblank(primary_aic_site_name.value) ){
+ errorMsg += 'Primary Site Name is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+
+ if ( !isDigit(lata.value) )
+ {
+ bootbox.alert('LATA must be a number.');
+ return;
+ }
+ if ( latitude.length > 0 )
+ {
+ if ( !isFloat(latitude.value) )
+ {
+ bootbox.alert('Latitude must be a float.');
+ return;
+ }
+ }
+ if ( longitude.length > 0 )
+ {
+ if ( !isFloat(longitude.value) )
+ {
+ bootbox.alert('Longitude must be a float.');
+ return;
+ }
+ }
+ form.submit();
+}
+
+function updateServiceHoming(service_type,lata,hubbing_city_type,latitude,longitude,primary_aic_site_name,secondary_aic_site_name,tertiary_aic_site_name) {
+
+ document.getElementById('uf_service_type').value=service_type;
+ document.getElementById('uf_lata').value=lata
+ document.getElementById('uf_hubbing_city_type').value=hubbing_city_type;
+ document.getElementById('uf_latitude').value=latitude;
+ document.getElementById('uf_longitude').value=longitude;
+ document.getElementById('uf_primary_aic_site_name').value=primary_aic_site_name;
+ document.getElementById('uf_secondary_aic_site_name').value=secondary_aic_site_name;
+ document.getElementById('uf_tertiary_aic_site_name').value=tertiary_aic_site_name;
+
+ document.getElementById('uf_key_service_type').value=service_type;
+ document.getElementById('uf_key_lata').value=lata
+ document.getElementById('uf_key_hubbing_city_type').value=hubbing_city_type;
+
+ $('#update_service_homing').modal('show');
+}
+
+function deleteServiceHoming(service_type,lata,hubbing_city_type) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete SERVICE_HOMING [" + service_type + "]" + "[" + lata + "][" + hubbing_city_type + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteServiceHoming?service_type=" + service_type + "&lata=" + lata + "&hubbing_city_type=" + hubbing_city_type);
+
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listServiceHomingRollback.ejs b/admportal/views/gamma/listServiceHomingRollback.ejs
new file mode 100644
index 0000000..a7b5ef5
--- /dev/null
+++ b/admportal/views/gamma/listServiceHomingRollback.ejs
@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Service Homing Rollback</h3>
+<p>(This table data was saved during the last import of SERVICE_HOMING data.)</p>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <table class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Service Type</th>
+ <th>LATA</th>
+ <th>Hubbing City Type</th>
+ <th>Latitude</th>
+ <th>Longitude</th>
+ <th>Primary Site Name</th>
+ <th>Secondary Site Name</th>
+ <th>Tertiary Site Name</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% var i=0; rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.service_type %></td>
+ <td><%= row.lata %></td>
+ <td><%= row.hubbing_city_type%></td>
+ <td><%= row.latitude %></td>
+ <td><%= row.longitude %></td>
+ <td><%= row.primary_aic_site_name %></td>
+ <td><%= row.secondary_aic_site_name %></td>
+ <td><%= row.tertiary_aic_site_name %></td>
+ </tr>
+ <% i++; }); %>
+ </tbody>
+ </table>
+
+ <div class container>
+ <p><%= i %> rows in table.</p>
+ </div>
+
+ <% if (priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="rollback();">Rollback</button>
+ <% } %>
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+<script type="text/javascript">
+
+function rollback()
+{
+ bootbox.confirm({
+ message: "This Rollback will overlay the current SERVICE_HOMING table. Are you sure you want to Rollback the SERVICE_HOMING table?",
+ callback: function(result){
+ if(result)
+ {
+ location.assign("/gamma/rollbackServiceHoming");
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm:{
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listSite.ejs b/admportal/views/gamma/listSite.ejs
new file mode 100644
index 0000000..9287ad5
--- /dev/null
+++ b/admportal/views/gamma/listSite.ejs
@@ -0,0 +1,171 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#site').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+ <h3>AIC Site</h3>
+</div>
+<!--
+<div class="actions" style="padding:0px 25px;">
+<h2>AIC SITE</h2>
+</div>
+-->
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+<div class="container-fluid">
+ <table id="site" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>AIC Site ID</th>
+ <th>VCenter URL</th>
+ <th>OAM Gateway Address</th>
+ <th>VCenter User</th>
+ <th>VCenter Passwd</th>
+ <th>City</th>
+ <th>State</th>
+ <th>Status</th>
+ <% if(priv == 'A') { %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.name %></td>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.vcenter_url %></td>
+ <td><%= row.oam_gateway_addr %></td>
+ <td><%= row.vcenter_username %></td>
+ <td>*****</td>
+ <td><%= row.city %></td>
+ <td><%= row.state %></td>
+ <td><%= row.operational_status %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateAicSite('<%= row.name %>','<%=row.aic_site_id %>',
+ '<%= row.vcenter_url %>','<%= JSON.stringify(row.vcenter_username).replace(/\"/g,'') %>',
+ '<%= row.vcenter_passwd %>', '<%= row.city %>','<%= row.state %>',
+ '<%= row.operational_status %>', '<%= row.oam_gateway_addr %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteSite('<%=row.aic_site_id %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+<!--
+ <% if(priv == 'A') { %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadAicSite" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+ </form>
+ </div>
+ <% } %>
+-->
+</div>
+
+<% include ../partials/update_aic_site %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function updateAicSite(name,aic_site_id,vcenter_url,vcenter_username,vcenter_passwd,city,state,operational_status,oam_gateway_addr)
+{
+ document.getElementById('uf_name').value=name
+ document.getElementById('uf_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_vcenter_url').value=vcenter_url;
+ document.getElementById('uf_vcenter_username').value=vcenter_username;
+ document.getElementById('uf_vcenter_passwd').value=vcenter_passwd;
+ document.getElementById('uf_city').value=city;
+ document.getElementById('uf_state').value=state;
+ document.getElementById('uf_operational_status').value=operational_status;
+ document.getElementById('uf_oam_gateway_addr').value=oam_gateway_addr;
+
+ document.getElementById('uf_key_aic_site_id').value=aic_site_id;
+ $('#update_aic_site_modal').modal('show');
+}
+
+function deleteSite(siteId) {
+
+ bootbox.confirm({
+ message: "Their may be SERVICE_HOMING entry pointing to this site. Are you sure you want to delete site [" + siteId + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteSite?siteid=" + siteId);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listVpePool.ejs b/admportal/views/gamma/listVpePool.ejs
new file mode 100644
index 0000000..51c2dfe
--- /dev/null
+++ b/admportal/views/gamma/listVpePool.ejs
@@ -0,0 +1,194 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+<script class="init">
+ $(document).ready(function() {
+ $('#vpe_pool').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>VPE Pool</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <table id="vpe_pool" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>AIC Site ID</th>
+ <th>VPE Name</th>
+ <th>Availability Zone</th>
+ <th>IPV4 OAM Address</th>
+ <th>Loopback IPV4 Address</th>
+ <th>Prov Status</th>
+ <th>VLAN ID Outer</th>
+ <th>Vendor</th>
+ <th>Interface Name</th>
+ <th>Interface Speed</th>
+ <th>Interface Units</th>
+ <th>VPE UUID</th>
+ <th>VPE ID</th>
+ <th>AS_NUMBER</th>
+ <th>Image Filename</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.vpe_name %></td>
+ <td><%= row.availability_zone %></td>
+ <td><%= row.ipv4_oam_address %></td>
+ <td><%= row.loopback0_ipv4_address %></td>
+ <td><%= row.provisioning_status %></td>
+ <td><%= row.vlan_id_outer %></td>
+ <td><%= row.vendor %></td>
+ <td><%= row.physical_intf_name %></td>
+ <td><%= row.physical_intf_speed %></td>
+ <td><%= row.physical_intf_units %></td>
+ <td><%= row.vpe_uuid %></td>
+ <td><%= row.vpe_id %></td>
+ <td><%= row.as_number %></td>
+ <td><%= row.image_filename %></td>
+ <td>
+<!--
+ <form name="rowform">
+ <input type="hidden" name="rf_aic_site_id" id="rf_aic_site_id" value="<%= row.aic_site_id %>"</input>
+ <input type="hidden" name="rf_vpe_name" id="rf_vpe_name" value="<%= row.vpe_name %>"</input>
+ <input type="hidden" name="rf_availability_zone" id="rf_availability_zone" value="<%= row.availability_zone %>"</input>
+ </form>
+-->
+ <!-- <% var _attuid = row.attuid %> -->
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateVpePool('<%=row.aic_site_id %>','<%=row.vpe_name %>', '<%=row.availability_zone %>','<%=row.provisioning_status %>','<%= row.ipv4_oam_address %>','<%= row.loopback0_ipv4_address %>','<%= row.vlan_id_outer %>','<%= row.vendor %>','<%= row.physical_intf_name %>','<%= row.physical_intf_speed %>','<%= row.physical_intf_units %>','<%= row.vpe_uuid %>','<%= row.vpe_id %>', '<%= row.image_filename %>', '<%= row.as_number %>' );">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteVpePool('<%= row.vpe_name %>','<%=row.aic_site_id %>','<%= row.availability_zone %>');">Delete</button>
+ <% } %>
+ </td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+<!--
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadVpePool" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+ </form>
+ </div>
+ <% } %>
+-->
+</div>
+
+<% include ../partials/update_vpe_pool %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function updateVpePool(aic_site_id,vpe_name,availability_zone,provisioning_status,ipv4_oam_address,loopback0_ipv4_address,vlan_id_outer,vendor,physical_intf_name,physical_intf_speed,physical_intf_units,vpe_uuid,vpe_id,image_filename, as_number) {
+
+ document.getElementById('uf_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_vpe_name').value=vpe_name;
+ document.getElementById('uf_availability_zone').value=availability_zone;
+ document.getElementById('uf_provisioning_status').value=provisioning_status;
+ document.getElementById('uf_ipv4_oam_address').value=ipv4_oam_address;
+ document.getElementById('uf_loopback0_ipv4_address').value=loopback0_ipv4_address;
+ document.getElementById('uf_vlan_id_outer').value=vlan_id_outer;
+ document.getElementById('uf_vendor').value=vendor;
+ document.getElementById('uf_physical_intf_name').value=physical_intf_name;
+ document.getElementById('uf_physical_intf_speed').value=physical_intf_speed;
+ document.getElementById('uf_physical_intf_units').value=physical_intf_units;
+ document.getElementById('uf_vpe_uuid').value=vpe_uuid;
+ document.getElementById('uf_vpe_id').value=vpe_id;
+ document.getElementById('uf_as_number').value=as_number;
+ document.getElementById('uf_image_filename').value=image_filename;
+
+ document.getElementById('uf_key_availability_zone').value=availability_zone;
+ document.getElementById('uf_key_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_key_vpe_name').value=vpe_name;
+ $('#update_vpe_pool_modal').modal('show');
+
+}
+function deleteVpePool(vpe_name,aic_site_id,availability_zone) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete VPE [" + aic_site_id + "][" + vpe_name + "][" + availability_zone + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteVpePool?aic_site_id=" + aic_site_id + "&vpe_name=" + vpe_name + "&availability_zone=" + availability_zone);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listVplspePool.ejs b/admportal/views/gamma/listVplspePool.ejs
new file mode 100644
index 0000000..b49c2a3
--- /dev/null
+++ b/admportal/views/gamma/listVplspePool.ejs
@@ -0,0 +1,178 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+<script class="init">
+ $(document).ready(function() {
+ $('#vplspe_pool').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>VPLSPE Pool</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+<div class="container-fluid">
+ <table id="vplspe_pool" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>VPLSPE Name</th>
+ <th>AIC Site ID</th>
+ <th>Availability Zone</th>
+ <th>Interface Name</th>
+ <th>Interface Speed</th>
+ <th>Interface Units</th>
+ <th>Loopback IPV4 Address</th>
+ <th>VLAN ID Outer</th>
+ <th>VPLSPE UUID</th>
+ <th>Image Filename</th>
+ <th>Prov Status</th>
+ <th>Vendor</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.vplspe_name %></td>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.availability_zone %></td>
+ <td><%= row.physical_intf_name %></td>
+ <td><%= row.physical_intf_speed %></td>
+ <td><%= row.physical_intf_units %></td>
+ <td><%= row.loopback0_ipv4_address %></td>
+ <td><%= row.vlan_id_outer %></td>
+ <td><%= row.vplspe_uuid %></td>
+ <td><%= row.image_filename %></td>
+ <td><%= row.provisioning_status %></td>
+ <td><%= row.vendor %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateVplspePool('<%=row.aic_site_id %>','<%= row.availability_zone %>','<%= row.vplspe_name %>','<%= row.physical_intf_name %>','<%= row.physical_intf_speed %>','<%= row.physical_intf_units %>','<%= row.loopback0_ipv4_address %>','<%= row.vlan_id_outer %>','<%= row.vplspe_uuid %>','<%= row.image_filename %>','<%= row.provisioning_status %>','<%= row.vendor %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteVplspePool('<%= row.vplspe_name %>','<%=row.aic_site_id %>','<%= row.availability_zone %>','<%= row.physical_intf_name %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+<!--
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadVplspePool" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+
+ </form>
+ </div>
+ <% } %>
+-->
+</div>
+
+<% include ../partials/update_vplspe_pool %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function updateVplspePool(aic_site_id,availability_zone,vplspe_name,physical_intf_name,physical_intf_speed,physical_intf_units,loopback0_ipv4_address,vlan_id_outer,vplspe_uuid,image_filename,provisioning_status,vendor) {
+
+ document.getElementById('uf_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_availability_zone').value=availability_zone
+ document.getElementById('uf_vplspe_name').value=vplspe_name;
+ document.getElementById('uf_physical_intf_name').value=physical_intf_name;
+ document.getElementById('uf_physical_intf_speed').value=physical_intf_speed;
+ document.getElementById('uf_physical_intf_units').value=physical_intf_units;
+ document.getElementById('uf_loopback0_ipv4_address').value=loopback0_ipv4_address;
+ document.getElementById('uf_vlan_id_outer').value=vlan_id_outer;
+ document.getElementById('uf_vplspe_uuid').value=vplspe_uuid;
+ document.getElementById('uf_image_filename').value=image_filename;
+ document.getElementById('uf_provisioning_status').value=provisioning_status;
+ document.getElementById('uf_vendor').value=vendor;
+
+ document.getElementById('uf_key_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_key_vplspe_name').value=vplspe_name;
+ document.getElementById('uf_key_availability_zone').value=availability_zone
+ document.getElementById('uf_key_physical_intf_name').value=physical_intf_name;
+ $('#update_vplspe_pool_modal').modal('show');
+}
+
+function deleteVplspePool(vplspe_name,aic_site_id,availability_zone,physical_intf_name) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete VPLSPE [" + vplspe_name + "][" + aic_site_id + "][" + availability_zone + "][" + physical_intf_name + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteVplspePool?aic_site_id=" + aic_site_id + "&vplspe_name=" + vplspe_name + "&availability_zone=" + availability_zone + "&physical_intf_name=" + physical_intf_name);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/nbVlanPool.ejs b/admportal/views/gamma/nbVlanPool.ejs
new file mode 100644
index 0000000..9d3a8d1
--- /dev/null
+++ b/admportal/views/gamma/nbVlanPool.ejs
@@ -0,0 +1,124 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+<script class="init">
+ $(document).ready(function() {
+ $('#nb_vlan_pool').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>NetBond VLAN Pools</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+<div class="container-fluid">
+
+ <table id="nb_vlan_pool" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>AIC Site Id</th>
+ <th>Availability Zone</th>
+ <th>VLAN Plan Id</th>
+ <th>Plan Type</th>
+ <th>Purpose</th>
+ <th>VLAN Id</th>
+ <th>Status</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.availability_zone %></td>
+ <td><%= row.vlan_plan_id %></td>
+ <td><%= row.plan_type %></td>
+ <td><%= row.purpose %></td>
+ <td><%= row.vlan_id %></td>
+ <td><%= row.status %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateNbVlanPool('<%= row.aic_site_id %>', '<%= row.availability_zone %>',
+ '<%= row.vlan_plan_id %>', '<%= row.plan_type %>', '<%= row.purpose %>',
+ '<%= row.vlan_id %>', '<%= row.status %>');">Update</button>
+ </td>
+ <% } else { %>
+ <td> </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+</div>
+
+<% include ../partials/nb_vlan_pool %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+function updateNbVlanPool(aic_site_id,availability_zone,vlan_plan_id,plan_type,purpose,vlan_id,pstatus) {
+
+ document.getElementById('uf_key_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_key_availability_zone').value=availability_zone;
+ document.getElementById('uf_key_vlan_plan_id').value=vlan_plan_id;
+ document.getElementById('uf_key_plan_type').value=plan_type;
+ document.getElementById('uf_key_purpose').value=purpose;
+ document.getElementById('uf_key_vlan_id').value=vlan_id;
+ document.getElementById('uf_status').value=pstatus;
+
+ $('#update_nb_vlan_pool').modal('show');
+}
+
+function saveNbVlanPool(form)
+{
+ form.submit();
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/nbVlanRange.ejs b/admportal/views/gamma/nbVlanRange.ejs
new file mode 100644
index 0000000..748dbbe
--- /dev/null
+++ b/admportal/views/gamma/nbVlanRange.ejs
@@ -0,0 +1,205 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+<script class="init">
+ $(document).ready(function() {
+ $('#nb_vlan_ranges').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>NetBond VLAN Ranges</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vlan_range">
+ Add Range
+ </button>
+ </div>
+ <% } %>
+
+ <table id="nb_vlan_ranges" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Vlan Plan Id</th>
+ <th>Purpose</th>
+ <th>Range Start</th>
+ <th>Range End</th>
+ <th>Plan Type</th>
+ <th>Pool Generated</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.vlan_plan_id %></td>
+ <td><%= row.purpose %></td>
+ <td><%= row.range_start %></td>
+ <td><%= row.range_end %></td>
+ <td><%= row.plan_type %></td>
+ <td><%= row.generated %></td>
+ <td>
+ <% if (row.generated == 'N' && priv == 'A'){ %>
+ <button type="button" class="btn btn-default btn-xs" onclick="generateVlanPool();">Generate Pool</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default btn-xs disabled"
+ onclick="generateVlanPool('<%= row.purpose %>', '<%= row.vlan_plan_id %>',
+ '<%= row.range_start %>', '<%= row.range_end %>',
+ '<%= row.plan_type %>');">Generate Pool</button>
+ <% } %>
+ <% if (row.generated == 'N'){ %>
+ <button type="button" class="btn btn-default btn-xs disabled" onclick="viewNbVlanPool('<%= row.vlan_plan_id %>','<%= row.range_start %>', '<%= row.range_end %>');">View Pool</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default btn-xs" onclick="viewNbVlanPool('<%= row.vlan_plan_id %>','<%= row.range_start %>', '<%= row.range_end %>');">View Pool</button>
+ <% } %>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteNbVlanRange('<%= row.vlan_plan_id %>',
+ '<%= row.plan_type %>', '<%= row.purpose %>', '<%= row.range_start %>',
+ '<%= row.range_end %>');">Delete</button>
+ <% } %>
+ </td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+</div>
+
+<% include ../partials/nb_vlan_range %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+function generateVlanPool(purpose,vlan_plan_id,range_start,range_end,plan_type)
+{
+ var url_string = encodeURI("/gamma/generateNbVlanPool?vlan_plan_id=" + vlan_plan_id
+ + "&range_start=" + range_start + "&range_end=" + range_end
+ + "&plan_type=" + plan_type + "&purpose=" + purpose);
+ location.assign(url_string);
+ return;
+}
+function viewNbVlanPool(vlan_plan_id, range_start, range_end)
+{
+ var url_string = encodeURI("/gamma/getNbVlanPool?vlan_plan_id=" + vlan_plan_id
+ + "&range_start=" + range_start + "&range_end=" + range_end);
+ location.assign(url_string);
+ return;
+}
+function deleteNbVlanRange(vlan_plan_id,plan_type,purpose,range_start,range_end) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete this VLAN Range[" + vlan_plan_id + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ var url_string = encodeURI(
+ "/gamma/deleteNbVlanRange?vlan_plan_id=" + vlan_plan_id
+ + "&plan_type=" + plan_type + "&purpose=" + purpose
+ + "&range_start=" + range_start + "&range_end=" + range_end);
+ location.assign(url_string);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+function saveNbVlanRange(form)
+{
+ var errorMsg='';
+ var plan_type = form.nf_plan_type.value;
+ var purpose = form.nf_purpose.value;
+ var range_start = form.nf_range_start.value;
+ var range_end = form.nf_range_end.value;
+
+ if ( (range_start == null) || (range_start == "") || isblank(range_start) )
+ {
+ errorMsg += 'Range Start is required.<br>';
+ }
+ if ( (range_end == null) || (range_end == "") || isblank(range_start) )
+ {
+ errorMsg += 'Range End is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+
+ if ( !$.isNumeric(range_start) ) {
+ bootbox.alert('Range Start is not a number.');
+ return;
+ }
+ if ( !$.isNumeric(range_end) ) {
+ bootbox.alert('Range End is not a number.');
+ return;
+ }
+ var r_start = Number(range_start);
+ var r_end = Number(range_end);
+
+ if ( r_end < r_start )
+ {
+ bootbox.alert('Range End must be greater than Range Start.');
+ return;
+ }
+
+ form.submit();
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/networkProfile.ejs b/admportal/views/gamma/networkProfile.ejs
new file mode 100644
index 0000000..1b54d67
--- /dev/null
+++ b/admportal/views/gamma/networkProfile.ejs
@@ -0,0 +1,164 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+<script class="init">
+ $(document).ready(function() {
+ $('#network_profile').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Network Profile</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary btn-md" data-toggle="modal" data-target="#add_network_profile">
+ Add Profile
+ </button>
+ </div>
+ <% } %>
+
+ <table id="network_profile" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*Network Type</th>
+ <th>Technology</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.network_type %></td>
+ <td><%= row.technology %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <% if (priv == 'A') { %>
+ <button type="button" class="btn btn-default btn-xs" onclick="updateNetworkProfile('<%= row.network_type %>', '<%= row.technology %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs" onclick="deleteNetworkProfile('<%= row.network_type %>');">Delete</button>
+ <% } %>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+</div>
+
+<% include ../partials/network_profile %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function saveNetworkProfile(form)
+{
+ var errorMsg='';
+ var network_type = '';
+ var technology = '';
+
+ if ( form.name == 'addForm' )
+ {
+ network_type = form.nf_network_type;
+ technology = form.nf_technology;
+ }
+ else
+ {
+ network_type = form.uf_network_type;
+ technology = form.uf_technology;
+ }
+
+
+ if ( (network_type.value == null) || (network_type.value == "") || isblank(network_type.value) )
+ {
+ errorMsg += 'Network Type is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+ form.submit();
+}
+
+function updateNetworkProfile(network_type,technology) {
+
+ document.getElementById('uf_network_type').value=network_type;
+ document.getElementById('uf_technology').value=technology;
+
+ document.getElementById('uf_key_network_type').value=network_type;
+
+ $('#update_network_profile').modal('show');
+}
+
+function deleteNetworkProfile(network_type) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete this Network Profile [" + network_type + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteNetworkProfile?network_type=" + network_type);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/javascript_delete/jquery.min.js b/admportal/views/javascript_delete/jquery.min.js
new file mode 100644
index 0000000..ab28a24
--- /dev/null
+++ b/admportal/views/javascript_delete/jquery.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
+if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"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 null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.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]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.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=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,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||(m.cssNumber[c]?"":"px")
+},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,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):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],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 kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.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){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
diff --git a/admportal/views/javascript_delete/sla.js b/admportal/views/javascript_delete/sla.js
new file mode 100644
index 0000000..e3819a8
--- /dev/null
+++ b/admportal/views/javascript_delete/sla.js
@@ -0,0 +1,11 @@
+<script>
+function uploadDG(form)
+{
+ if ( form.filename.value.length == 0)
+ {
+ alert('Must select a file.');
+ return false;
+ }
+ else { form.submit(); return; }
+}
+</script>
diff --git a/admportal/views/logs/accesslog.ejs b/admportal/views/logs/accesslog.ejs
new file mode 100644
index 0000000..0b4ea56
--- /dev/null
+++ b/admportal/views/logs/accesslog.ejs
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#access').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>HTTP Server Access Log</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <table id="access" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Date (UTC)</th>
+ <th>Method</th>
+ <th>Version</th>
+ <th>Status</th>
+ <th>URL</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% for(var x=0; x < rows.length; x++) { %>
+ <tr>
+ <td><%= rows[x].date %></td>
+ <td><%= rows[x].method %></td>
+ <td><%= rows[x].version %></td>
+ <td><%= rows[x].status %></td>
+ <td><%= rows[x].url %></td>
+ </tr>
+ <% } %>
+ </tbody>
+ </table>
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/logs/accesslog.ejs.0223 b/admportal/views/logs/accesslog.ejs.0223
new file mode 100644
index 0000000..77ece8f
--- /dev/null
+++ b/admportal/views/logs/accesslog.ejs.0223
@@ -0,0 +1,121 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#access').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>HTTP Server Access Log</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <table id="access" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Date (UTC)</th>
+ <th>Method</th>
+ <th>Version</th>
+ <th>Status</th>
+ <th>URL</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% for(var x=0; x<pageInfo.rows.length; x++) { %>
+ <tr>
+ <td><%= pageInfo.rows[x].date %></td>
+ <td><%= pageInfo.rows[x].method %></td>
+ <td><%= pageInfo.rows[x].version %></td>
+ <td><%= pageInfo.rows[x].status %></td>
+ <td><%= pageInfo.rows[x].url %></td>
+ </tr>
+ <% } %>
+ </tbody>
+ </table>
+</div>
+
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-1 text-left">
+ <p> Page <%= pageInfo.currentPage %> of <%= pageInfo.pageCount %></p>
+ </div>
+ <div class="col-md-11 text-left">
+ <% if (pageInfo.pageCount > 1) { %>
+ <ul class="pagination">
+ <% if (pageInfo.currentPage > 1) { %>
+ <li><a href="/logs/pageAccessLog?page=1">«</a></li>
+ <% } %>
+ <% var i = 1;
+ if (pageInfo.currentPage > 10) {
+ i = +pageInfo.currentPage - 9;
+ } %>
+ <% if (i !== 1) { %>
+ <!--<li class="disabled"><a href="#">...</a></li>-->
+ <% } %>
+ <% for (i; i<=pageInfo.pageCount; i++) { %>
+ <% if (pageInfo.currentPage == i) { %>
+ <li class="active"><span><%= i %> <span class="sr-only">(current)</span></span></li>
+ <% } else { %>
+ <li><a href="/logs/pageAccessLog?page=<%= i %>"><%= i %></a></li>
+ <% } %>
+ <% if (i == (+pageInfo.currentPage + 9)) { %>
+ <!--<li class="disabled"><a href="#">...</a></li>-->
+ <% break; } %>
+ <% } %>
+ <% if (pageInfo.currentPage != pageInfo.pageCount) { %>
+ <li><a href="/logs/pageAccessLog?page=<%= pageInfo.pageCount %>">»</a></li>
+ <% } %>
+ </ul>
+ <% } %>
+ </div><!-- col-md-10 -->
+ </div><!-- row -->
+ </div><!-- container-fluid -->
+
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/logs/usertrace.ejs b/admportal/views/logs/usertrace.ejs
new file mode 100644
index 0000000..cca003b
--- /dev/null
+++ b/admportal/views/logs/usertrace.ejs
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#usertrace').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>User Trace</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <div class="table-responsive">
+ <table id="usertrace" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Date (UTC)</th>
+ <th>ATTUID</th>
+ <th>Action</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody id="myTable">
+ <% for (var x=0; x < rows.length; x++) { %>
+ <tr>
+ <td><%= rows[x].date %></td>
+ <td><%= rows[x].attuid %></td>
+ <td><%= rows[x].action %></td>
+ <td><%= rows[x].desc %></td>
+ </tr>
+ <% } %>
+ </tbody>
+ </table>
+ </div>
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/logs/usertrace.ejs.0223 b/admportal/views/logs/usertrace.ejs.0223
new file mode 100644
index 0000000..8a099ed
--- /dev/null
+++ b/admportal/views/logs/usertrace.ejs.0223
@@ -0,0 +1,122 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#usertrace').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>User Trace</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <div class="table-responsive">
+ <table id="usertrace" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Date (UTC)</th>
+ <th>ATTUID</th>
+ <th>Action</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody id="myTable">
+ <% for (var x=0; x<pageInfo.rows.length; x++) { %>
+ <tr>
+ <td><%= pageInfo.rows[x].date %></td>
+ <td><%= pageInfo.rows[x].attuid %></td>
+ <td><%= pageInfo.rows[x].action %></td>
+ <td><%= pageInfo.rows[x].desc %></td>
+ </tr>
+ <% } %>
+ </tbody>
+ </table>
+ </div>
+</div>
+
+
+
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-1 text-left">
+ <p> Page <%= pageInfo.currentPage %> of <%= pageInfo.pageCount %></p>
+ </div>
+ <div class="col-md-11 text-left">
+ <% if (pageInfo.pageCount > 1) { %>
+ <ul class="pagination">
+ <% if (pageInfo.currentPage > 1) { %>
+ <li><a href="/logs/pageUserTrace?page=1">«</a></li>
+ <% } %>
+ <% var i = 1;
+ if (pageInfo.currentPage > 10) {
+ i = +pageInfo.currentPage - 9;
+ } %>
+ <% if (i !== 1) { %>
+ <!--<li class="disabled"><a href="#">...</a></li>-->
+ <% } %>
+ <% for (i; i<=pageInfo.pageCount; i++) { %>
+ <% if (pageInfo.currentPage == i) { %>
+ <li class="active"><span><%= i %> <span class="sr-only">(current)</span></span></li>
+ <% } else { %>
+ <li><a href="/logs/pageUserTrace?page=<%= i %>"><%= i %></a></li>
+ <% } %>
+ <% if (i == (+pageInfo.currentPage + 9)) { %>
+ <!--<li class="disabled"><a href="#">...</a></li>-->
+ <% break; } %>
+ <% } %>
+ <% if (pageInfo.currentPage != pageInfo.pageCount) { %>
+ <li><a href="/logs/pageUserTrace?page=<%= pageInfo.pageCount %>">»</a></li>
+ <% } %>
+ </ul>
+ <% } %>
+ </div><!-- col-md-10 -->
+ </div><!-- row -->
+ </div><!-- container-fluid -->
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/mobility/displayVnfData.ejs b/admportal/views/mobility/displayVnfData.ejs
new file mode 100644
index 0000000..596feb6
--- /dev/null
+++ b/admportal/views/mobility/displayVnfData.ejs
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>SDN-C AdminPortal</title>
+ <meta charset="UTF-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+</head>
+<body>
+
+
+<div class="actions" style="padding:0px 25px;">
+<h2>VNF Data</h2>
+</div>
+
+<div class="container-fluid">
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <pre class='alert alert-success' role='alert'><%=JSON.stringify(result.msg,null,4) %></pre>
+ <% } else { %>
+ <pre class='alert alert-danger' role='danger'><%=result.msg %></pre>
+ <% } %>
+ <% } %>
+<% } %>
+</div>
+
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/mobility/displayVnfNetworkData.ejs b/admportal/views/mobility/displayVnfNetworkData.ejs
new file mode 100644
index 0000000..e2bcd63
--- /dev/null
+++ b/admportal/views/mobility/displayVnfNetworkData.ejs
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>SDN-C AdminPortal</title>
+ <meta charset="UTF-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+</head>
+<body>
+
+
+<div class="actions" style="padding:0px 25px;">
+<h2>VNF Network Data</h2>
+</div>
+
+<div class="container-fluid">
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <pre class='alert alert-success' role='alert'><%=JSON.stringify(result.msg,null,4) %></pre>
+ <% } else { %>
+ <pre class='alert alert-danger' role='danger'><%=result.msg %></pre>
+ <% } %>
+ <% } %>
+<% } %>
+</div>
+
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/mobility/vmNetworks.ejs b/admportal/views/mobility/vmNetworks.ejs
new file mode 100644
index 0000000..6394c44
--- /dev/null
+++ b/admportal/views/mobility/vmNetworks.ejs
@@ -0,0 +1,198 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vm_networks').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>VM Networks </h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary btn-md" data-toggle="modal" data-target="#add_vm_network">
+ Add VM Network
+ </button>
+ </div>
+ <% } %>
+
+ <table id="vm_networks" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*VNF_TYPE</th>
+ <th>*VM_TYPE</th>
+ <th>*NETWORK_ROLE</th>
+ <th>IP_COUNT</th>
+ <th>ASSIGN_IPS</th>
+ <th>ASSIGN_MACS</th>
+ <th>ASSIGN_FLOATING_IP</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.vnf_type %></td>
+ <td><%= row.vm_type %></td>
+ <td><%= row.network_role %></td>
+ <td><%= row.ip_count %></td>
+ <td><%= (row.assign_ips == '1') ? 'true' : 'false' %></td>
+ <td><%= (row.assign_macs == '1') ? 'true' : 'false' %></td>
+ <td><%= (row.assign_floating_ip == '1') ? 'true' : 'false' %></td>
+ <% if(priv == 'A' ) { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteVmNetwork('<%= row.vnf_type %>', '<%= row.vm_type %>', '<%= row.network_role %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/mobility/uploadVmNetworks" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ </form>
+ </div>
+ <% } %>
+</div>
+
+<% include ../partials/vm_networks %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+function addVmNetwork(form)
+{
+ var errorMsg='';
+ var vnf_type='';
+ var vm_type='';
+ var network_role='';
+ var ip_count = '';
+ var assign_ips='';
+ var assign_macs='';
+ var assign_floating_ip='';
+
+ if ( form.name == 'addForm' )
+ {
+ vnf_type = form.nf_vnf_type;
+ vm_type = form.nf_vm_type;
+ network_role = form.nf_network_role;
+ ip_count = form.nf_ip_count;
+ assign_ips = form.nf_assign_ips;
+ assign_macs = form.nf_assign_macs;
+ assign_floating_ip = form.nf_assign_floating_ip;
+ }
+
+ if ( (vnf_type.value == null) || (vnf_type.value == "") || isblank(vnf_type.value) )
+ {
+ errorMsg += 'VNF Type is required.<br>';
+ }
+ if ( (vm_type.value == null) || (vm_type.value == "") || isblank(vm_type.value) )
+ {
+ errorMsg += 'VM Type is required.<br>';
+ }
+ if ( (network_role.value == null) || (network_role.value == "") || isblank(network_role.value) ){
+ errorMsg += 'Network Role is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+ if (ip_count.value.length >0 && !isDigit(ip_count.value) )
+ {
+ bootbox.alert('VM Count must be a number.');
+ return;
+ }
+ if (assign_ips.value == 'true' && ip_count.value.length == 0)
+ {
+ bootbox.alert("If ASSIGN IPS equals 'true', IP COUNT must be populated with a number.");
+ return;
+ }
+
+ form.submit();
+}
+
+function deleteVmNetwork(vnf_type,vm_type,network_role) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete VM_NETWORK [" + vnf_type + "]" + "[" + vm_type + "][" + network_role + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/mobility/deleteVmNetwork?vnf_type=" + vnf_type + "&vm_type=" + vm_type + "&network_role=" + network_role);
+
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/mobility/vmProfile.ejs b/admportal/views/mobility/vmProfile.ejs
new file mode 100644
index 0000000..f702e51
--- /dev/null
+++ b/admportal/views/mobility/vmProfile.ejs
@@ -0,0 +1,173 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vm_profile').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>VM Profile </h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary btn-md" data-toggle="modal" data-target="#add_vm_profile">
+ Add VM Profile
+ </button>
+ </div>
+ <% } %>
+
+ <table id="vm_profile" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*VNF_TYPE</th>
+ <th>*VM_TYPE</th>
+ <th>VM_COUNT</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.vnf_type %></td>
+ <td><%= row.vm_type %></td>
+ <td><%= row.vm_count %></td>
+ <% if(priv == 'A' ) { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteVmProfile('<%= row.vnf_type %>', '<%= row.vm_type %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/mobility/uploadVmProfile" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ </form>
+ </div>
+ <% } %>
+</div>
+
+<% include ../partials/vm_profile %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+function addVmProfile(form)
+{
+ var errorMsg='';
+ var vnf_type='';
+ var vm_type='';
+ var vm_count='';
+
+ if ( form.name == 'addForm' )
+ {
+ vnf_type = form.nf_vnf_type;
+ vm_type = form.nf_vm_type;
+ vm_count = form.nf_vm_count;
+ }
+
+ if ( (vnf_type.value == null) || (vnf_type.value == "") || isblank(vnf_type.value) )
+ {
+ errorMsg += 'VNF Type is required.<br>';
+ }
+ if ( (vm_type.value == null) || (vm_type.value == "") || isblank(vm_type.value) )
+ {
+ errorMsg += 'VM Type is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+
+ if ( vm_count.value.length > 0 && !isDigit(vm_count.value) )
+ {
+ bootbox.alert('VM Count must be a number.');
+ return;
+ }
+ form.submit();
+}
+
+function deleteVmProfile(vnf_type, vm_type) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete VM_PROFILE [" + vnf_type + "][" + vm_type + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/mobility/deleteVmProfile?vnf_type=" + vnf_type + "&vm_type=" + vm_type);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/mobility/vnfNetworks.ejs b/admportal/views/mobility/vnfNetworks.ejs
new file mode 100644
index 0000000..a4a9f17
--- /dev/null
+++ b/admportal/views/mobility/vnfNetworks.ejs
@@ -0,0 +1,163 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vnf_networks').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>VNF Networks </h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary btn-md" data-toggle="modal" data-target="#add_vnf_network">
+ Add VNF Network
+ </button>
+ </div>
+ <% } %>
+
+ <table id="vnf_networks" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*VNF_TYPE</th>
+ <th>*NETWORK_ROLE</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.vnf_type %></td>
+ <td><%= row.network_role %></td>
+ <% if(priv == 'A' ) { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteVnfNetwork('<%= row.vnf_type %>', '<%= row.network_role %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/mobility/uploadVnfNetworks" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ </form>
+ </div>
+ <% } %>
+</div>
+
+<% include ../partials/vnf_network %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+function addVnfNetwork(form)
+{
+ var errorMsg='';
+ var vnf_type='';
+ var network_role='';
+
+ if ( form.name == 'addForm' )
+ {
+ vnf_type = form.nf_vnf_type;
+ network_role = form.nf_network_role;
+ }
+
+ if ( (vnf_type.value == null) || (vnf_type.value == "") || isblank(vnf_type.value) )
+ {
+ errorMsg += 'VNF Type is required.<br>';
+ }
+ if ( (network_role.value == null) || (network_role.value == "") || isblank(network_role.value) )
+ {
+ errorMsg += 'Network Role is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+ form.submit();
+}
+
+function deleteVnfNetwork(vnf_type, network_role) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete VNF_NETWORK [" + vnf_type + "][" + network_role + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/mobility/deleteVnfNetwork?vnf_type=" + vnf_type + "&network_role=" + network_role);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/mobility/vnfPreloadData.ejs b/admportal/views/mobility/vnfPreloadData.ejs
new file mode 100644
index 0000000..69f02e5
--- /dev/null
+++ b/admportal/views/mobility/vnfPreloadData.ejs
@@ -0,0 +1,244 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vnf_data').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Pre-load VNF Data</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <table id="vnf_data" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>ID</th>
+ <th>SVC_REQUEST_ID</th>
+ <th>VNF_NAME</th>
+ <th>VNF_TYPE</th>
+ <th>SVC_ACTION</th>
+ <th>UPLOAD STATUS</th>
+ <th>FILENAME</th>
+ <th>IMPORT/UPLOAD TIMESTAMP</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% var i=0; retData.forEach( function(rowObj) { %>
+ <tr>
+ <td><%= rowObj.row.id %></td>
+ <td><a href="javascript:getVnfData('<%= rowObj.vnf_name %>','<%= rowObj.vnf_type %>');"><%= rowObj.row.svc_request_id %></a></td>
+ <td><%= rowObj.vnf_name %></td>
+ <td><%= rowObj.vnf_type %></td>
+ <td><%= rowObj.row.svc_action %></td>
+ <td><%= rowObj.row.status %></td>
+ <td>
+ <a data-toggle="collapse"
+ href="#collapseExample<%= i %>" aria-expanded="false"
+ aria-controls="collapseExample"><%= rowObj.row.filename %>
+ </a>
+ <div class="collapse" id="collapseExample<%= i %>">
+ <div class="well">
+ <pre><%= JSON.stringify(rowObj.filecontent,null,4) %></pre>
+ </div>
+ </div>
+ </td>
+
+ <td><%= rowObj.row.ts %></td>
+ <% if(priv == 'A' ) { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteVnfData('<%= rowObj.row.id %>','<%= rowObj.row.svc_request_id %>','<%= rowObj.row.filename %>','<%= rowObj.row.status %>','<%= rowObj.vnf_name %>','<%= rowObj.vnf_type %>');">Delete</button>
+ <% if (typeof rowObj.vnf_name != 'undefined' || typeof rowObj.vnf_type != 'undefined'){ %>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="loadVnfData('<%= rowObj.row.id %>','<%= rowObj.row.svc_request_id %>','<%= rowObj.row.svc_action %>','<%= rowObj.row.status %>','<%= rowObj.row.filename %>','<%= rowObj.row.ts %>');">Load Data</button>
+ <% } %>
+ </td>
+ <% } %>
+ </tr>
+ <% i++; }); %>
+ </tbody>
+ </table>
+
+ <% if(priv == 'A'){ %>
+ <div class="row">
+ <div class="col-md-8 col-md-push-4">
+ <form method="POST" action="/mobility/uploadVnfData" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">Upload pre processed JSON file.</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a JSON file to upload.</p>
+ <button type="button" class="btn btn-default"
+ data-toggle="tooltip" data-placement="bottom"
+ title="Upload a JSON file that has already been pre processed."
+ onclick="uploadFile(this.form);">Upload JSON File</button>
+ </div>
+ </form>
+ </div>
+ <div class="col-md-4 col-md-pull-8">
+ <form method="POST" action="/preload/uploadVnfCsv" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">Upload Worksheet CSV files from the <%= preloadImportDirectory %> directory.</label>
+ <input name="filename" type="file" id="dest" multiple>
+ <p class="help-block">Choose Worksheet CSV files to upload.</p>
+ <button type="button" class="btn btn-default"
+ data-toggle="tooltip" data-placement="bottom"
+ title="Must upload all the VNF CSV files from <%= preloadImportDirectory %>"
+ onclick="importWorksheet(this.form);">Upload VNF Worksheet CSV files
+ </button>
+ </div>
+ </form>
+ </div>
+ </div>
+ <% } %>
+</div>
+
+<% include ../partials/add_service_homing %>
+<% include ../partials/update_service_homing %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+function importWorksheet(form)
+{
+ if ( form.filename.value.length == 0)
+ {
+ bootbox.alert('Must select a file.');
+ return false;
+ }
+ else {
+
+ bootbox.confirm({
+ message: "Are you sure you want to import VNF WORKSHEET .csv files from <%= preloadImportDirectory %>",
+ callback: function(result) {
+ if ( result )
+ {
+ form.submit();
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+ }
+}
+
+
+function getVnfData(vnf_name,vnf_type,svc_request_id)
+{
+ location.assign("/mobility/viewVnfData?vnf_name=" + vnf_name + "&vnf_type=" + vnf_type );
+ return;
+}
+function loadVnfData(id,svc_request_id,svc_action,status,filename,ts)
+{
+ if ( status != 'pending' )
+ {
+ bootbox.alert("Upload Status must be in 'pending' state.");
+ return;
+ }
+ bootbox.confirm({
+ message: "Are you sure you want to load file [" + filename + "]? ",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/mobility/loadVnfData?id=" + id + "&svc_request_id=" + svc_request_id + "&filename=" + filename + "&status=" + status);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+function deleteVnfData(id,svc_request_id,filename,status,vnf_name,vnf_type) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete uploaded file [" + filename + "]? ",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/mobility/deleteVnfData?id="
+ + id
+ + "&svc_request_id=" + svc_request_id
+ + "&filename=" + filename
+ + "&status=" + status
+ + "&vnf_name=" + vnf_name
+ + "&vnf_type=" + vnf_type);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/mobility/vnfPreloadNetworkData.ejs b/admportal/views/mobility/vnfPreloadNetworkData.ejs
new file mode 100644
index 0000000..099dcba
--- /dev/null
+++ b/admportal/views/mobility/vnfPreloadNetworkData.ejs
@@ -0,0 +1,242 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#preload_vnf_data').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Pre-load VNF Network Data</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <table id="preload_vnf_data" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>ID</th>
+ <th>SVC_REQUEST_ID</th>
+ <th>NETWORK_NAME</th>
+ <th>NETWORK_TYPE</th>
+ <th>SVC_ACTION</th>
+ <th>UPLOAD STATUS</th>
+ <th>FILENAME</th>
+ <th>IMPORT/UPLOAD TIMESTAMP</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% var i=0; retData.forEach( function(rowObj) { %>
+ <tr>
+ <td><%= rowObj.row.id %></td>
+ <td><a href="javascript:getVnfNetworkData('<%= rowObj.network_name %>','<%= rowObj.network_type %>');"><%= rowObj.row.svc_request_id %></a></td>
+ <td><%= rowObj.network_name %></td>
+ <td><%= rowObj.network_type %></td>
+ <td><%= rowObj.row.svc_action %></td>
+ <td><%= rowObj.row.status %></td>
+ <td>
+ <a data-toggle="collapse"
+ href="#collapseExample<%= i %>" aria-expanded="false"
+ aria-controls="collapseExample"><%= rowObj.row.filename %>
+ </a>
+ <div class="collapse" id="collapseExample<%= i %>">
+ <div class="well">
+ <pre><%= JSON.stringify(rowObj.filecontent,null,4) %></pre>
+ </div>
+ </div>
+ </td>
+
+ <td><%= rowObj.row.ts %></td>
+ <% if(priv == 'A' ) { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteVnfNetworkData('<%= rowObj.row.id %>','<%= rowObj.row.svc_request_id %>','<%= rowObj.row.filename %>','<%= rowObj.row.status %>','<%= rowObj.network_name %>','<%= rowObj.network_type %>');">Delete</button>
+ <% if (typeof rowObj.network_name != 'undefined' || typeof rowObj.network_type != 'undefined'){ %>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="loadVnfNetworkData('<%= rowObj.row.id %>','<%= rowObj.row.svc_request_id %>','<%= rowObj.row.svc_action %>','<%= rowObj.row.status %>','<%= rowObj.row.filename %>','<%= rowObj.row.ts %>');">Load Data</button>
+ <% } %>
+ </td>
+ <% } %>
+ </tr>
+ <% i++; }); %>
+ </tbody>
+ </table>
+
+ <% if(priv == 'A'){ %>
+<div class="row">
+ <div class="col-md-8 col-md-push-4">
+ <form method="POST" action="/mobility/uploadVnfNetworkData" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">Upload pre processed JSON file.</label>
+ <input name="filename" type="file" id="dest"></input>
+ <p class="help-block">Choose a JSON file to upload.</p>
+ <button type="button" class="btn btn-default"
+ data-toggle="tooltip" data-placement="bottom"
+ title="Upload a JSON file that has already been pre processed."
+ onclick="uploadFile(this.form);">Upload JSON File
+ </button>
+ </div>
+ </form>
+ </div>
+ <div class="col-md-4 col-md-pull-8">
+ <form method="POST" action="/preload/uploadNetworkCsv" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">Upload Worksheet CSV files from the <%= preloadImportDirectory %> directory.</label>
+ <input name="filename" type="file" id="dest" multiple></input>
+ <p class="help-block">Choose Worksheet CSV files to upload.</p>
+ <button type="button" class="btn btn-default"
+ data-toggle="tooltip" data-placement="bottom"
+ title="Must upload all the VNF CSV files from <%= preloadImportDirectory %>"
+ onclick="importWorksheet(this.form);">Upload Network Worksheet CSV files
+ </button>
+ </div>
+ </form>
+ </div>
+</div>
+ <% } %>
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+function importWorksheet(form)
+{
+ if ( form.filename.value.length == 0)
+ {
+ bootbox.alert('Must select a file.');
+ return false;
+ }
+ else {
+
+ bootbox.confirm({
+ message: "Are you sure you want to import Network WORKSHEET .csv files from <%= preloadImportDirectory %>",
+ callback: function(result) {
+ if ( result )
+ {
+ form.submit();
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+ }
+}
+
+function getVnfNetworkData(network_name,network_type)
+{
+ location.assign("/mobility/viewVnfNetworkData?network_name=" + network_name + "&network_type=" + network_type );
+ return;
+}
+function loadVnfNetworkData(id,svc_request_id,svc_action,status,filename,ts)
+{
+ if ( status != 'pending' )
+ {
+ bootbox.alert("Upload Status must be in 'pending' state.");
+ return;
+ }
+ bootbox.confirm({
+ message: "Are you sure you want to load file [" + filename + "]? ",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/mobility/loadVnfNetworkData?id=" + id + "&svc_request_id=" + svc_request_id + "&filename=" + filename + "&status=" + status);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+function deleteVnfNetworkData(id,svc_request_id,filename,status,network_name,network_type) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete uploaded file [" + filename + "]? ",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/mobility/deleteVnfNetworkData?id="
+ + id
+ + "&svc_request_id=" + svc_request_id
+ + "&filename=" + filename
+ + "&status=" + status
+ + "&network_name=" + network_name
+ + "&network_type=" + network_type);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/mobility/vnfProfile.ejs b/admportal/views/mobility/vnfProfile.ejs
new file mode 100644
index 0000000..1a49498
--- /dev/null
+++ b/admportal/views/mobility/vnfProfile.ejs
@@ -0,0 +1,177 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vnf_profile').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>VNF Profile </h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary btn-md" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+
+ <table id="vnf_profile" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*VNF_TYPE</th>
+ <th>AVAILABILITY_ZONE_COUNT</th>
+ <th>EQUIPMENT_ROLE</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.vnf_type %></td>
+ <td><%= row.availability_zone_count %></td>
+ <td><%= row.equipment_role %></td>
+ <% if(priv == 'A' ) { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteVnfProfile('<%= row.vnf_type %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/mobility/uploadVnfProfile" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ </form>
+ </div>
+ <% } %>
+</div>
+
+<% include ../partials/vnf_profile %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+function addVnfProfile(form)
+{
+ var errorMsg='';
+ var vnf_type='';
+ var availability_zone_count='';
+ var equipment_role='';
+
+ if ( form.name == 'addForm' )
+ {
+ vnf_type = form.nf_vnf_type;
+ availability_zone_count = form.nf_availability_zone_count;
+ equipment_role = form.nf_equipment_role;
+ }
+
+ if ( (vnf_type.value == null) || (vnf_type.value == "") || isblank(vnf_type.value) )
+ {
+ errorMsg += 'VNF Type is required.<br>';
+ }
+ if ( (availability_zone_count.value == null) || (availability_zone_count.value == "") || isblank(availability_zone_count.value) )
+ {
+ errorMsg += 'Availability Zone Count is a required field.<br>';
+ }
+ if ( (equipment_role.value == null) || (equipment_role.value == "") || isblank(equipment_role.value) )
+ {
+ errorMsg += 'Equipment Role is a required field.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+ if ( availability_zone_count.value.length > 0 && !isDigit(availability_zone_count.value) )
+ {
+ bootbox.alert('Availability Zone Count must be a number.');
+ return;
+ }
+ form.submit();
+}
+
+function deleteVnfProfile(vnf_type) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete VNF_PROFILE [" + vnf_type + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/mobility/deleteVnfProfile?vnf_type=" + vnf_type);
+
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/odl/cluster_status.ejs b/admportal/views/odl/cluster_status.ejs
new file mode 100644
index 0000000..e7590df
--- /dev/null
+++ b/admportal/views/odl/cluster_status.ejs
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>SDN-C Cluster Status</h3>
+</div>
+
+
+<div class="container-fluid">
+ <table class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>ShardName</th>
+ <th>Status</th>
+ <th>Leader</th>
+ <th>RaftState</th>
+ <th>View Response</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% var i=0; if (response_obj != 'undefined' ) {
+ response_obj.forEach(function(request) { %>
+
+ <% if ( request.status == '200' ){ %>
+
+ <tr>
+ <td><%= request['value']['ShardName'] %></td>
+ <td><%= request.status %></td>
+ <td><%= request['value']['Leader'] %></td>
+ <td><%= request['value']['RaftState'] %></td>
+ <td>
+ <a class="btn btn-link" data-toggle="collapse"
+ href="#collapseExample<%= i %>" aria-expanded="false"
+ aria-controls="collapseExample"><%= request['value']['ShardName'] %>
+ </a>
+ <div class="collapse" id="collapseExample<%= i %>">
+ <div class="well">
+ <pre><%= JSON.stringify(request,null,4) %></pre>
+ </div>
+ </div>
+ </td>
+ </tr>
+ <% } else { %>
+ <tr>
+ <td> </td>
+ <td><%= request.status %></td>
+ <td> </td>
+ <td> </td>
+ <td>
+ <a class="btn btn-link" data-toggle="collapse"
+ href="#collapseExample<%= i %>" aria-expanded="false"
+ aria-controls="collapseExample">View
+ </a>
+ <div class="collapse" id="collapseExample<%= i %>">
+ <div class="well">
+ <pre><%= JSON.stringify(request,null,4) %></pre>
+ </div>
+ </div>
+ </td>
+ </tr>
+
+ <% } %>
+ <% i++; }); }; %>
+
+ </tbody>
+ </table>
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/odl/listVRlan.ejs b/admportal/views/odl/listVRlan.ejs
new file mode 100644
index 0000000..93eedac
--- /dev/null
+++ b/admportal/views/odl/listVRlan.ejs
@@ -0,0 +1,1069 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>SDN-C AdminPortal</title>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+</head>
+<body>
+
+<h2>VR-LAN</h2>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+<div class="container-fluid">
+<div class="content">
+
+<% if ( typeof response_obj['vr-lan']['routing-protocol'] != 'undefined' ){ %>
+ <div class="content">
+ service-instance-id: <%= svc_instance_id %><br>
+ routing-protocol : <%= response_obj['vr-lan']['routing-protocol'] %>
+ </div>
+<% } %>
+
+<table class="tree">
+
+<% var i=1; root_node=1;
+if ( typeof response_obj['vr-lan'] != 'undefined' )
+{
+ if( typeof response_obj['vr-lan']['vr-lan-interface'] != 'undefined' )
+ {
+ response_obj['vr-lan']['vr-lan-interface'].forEach(function(request) {
+ var root_node = i %>
+
+ <tr class="treegrid-<%= i %>">
+ <td>vr-lan-interface</td>
+ </tr>
+ <% i++; %>
+
+ <% if ( request['vr-designation'] != 'undefined')
+ {
+ var vr_designation = request['vr-designation'];
+ } %>
+
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= root_node %>">
+ <td>
+ <a href="javascript:vrlan_interface(
+ '<%= svc_instance_id %>',
+ '<%= request['vr-designation'] %>',
+ '<%= request['v6-vr-lan-prefix'] %>',
+ '<%= request['v6-vr-lan-prefix-length'] %>',
+ '<%= request['v6-vce-wan-address'] %>',
+ '<%= request['v4-vr-lan-prefix-length'] %>',
+ '<%= request['v4-vr-lan-prefix'] %>',
+ '<%= request['t-defaulted-v6-vrlan'] %>',
+ '<%= request['v4-vce-loopback-address'] %>');">vr-lan-interface</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( (typeof request['v6-public-lan-prefixes'] != 'undefined') && (typeof request['v6-public-lan-prefixes']['t-provided-v6-lan-public-prefixes'] != 'undefined') )
+ { %>
+ <% request['v6-public-lan-prefixes']['t-provided-v6-lan-public-prefixes'].forEach(function(trequest){ var t_v6_root = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= root_node %>">
+ <td>v6-public-lan-prefixes</td>
+ </tr>
+ <% i++; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= t_v6_root %>">
+ <td>
+ <a href="javascript:t_provided_v6_prefixes(
+ '<%= svc_instance_id %>',
+ '<%= trequest['request-index'] %>',
+ '<%= trequest['v6-next-hop-address'] %>',
+ '<%= trequest['v6-lan-public-prefix-length'] %>',
+ '<%= trequest['v6-lan-public-prefix'] %>');">t-provided-v6-lan-public-prefixes</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+
+ <% if ( typeof request['dhcp'] != 'undefined' )
+ { %>
+ <% var dhcp_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= root_node %>">
+ <td>dhcp</td>
+ </tr>
+ <% i++; %>
+
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= dhcp_node %>">
+ <td>
+ <a href="javascript:dhcp(
+ '<%= svc_instance_id %>',
+ '<%= request['dhcp']['use-v4-default-pool'] %>',
+ '<%= request['dhcp']['use-v6-default-pool'] %>',
+ '<%= request['dhcp']['v4-dhcp-server-enabled'] %>',
+ '<%= request['dhcp']['v6-dhcp-server-enabled'] %>',
+ '<%= request['dhcp']['v6-dhcp-default-pool-prefix'] %>',
+ '<%= request['dhcp']['v6-dhcp-default-pool-prefix-length'] %>',
+ '<%= request['dhcp']['v4-dhcp-default-pool-prefix'] %>',
+ '<%= request['dhcp']['v4-dhcp-default-pool-prefix-length'] %>');">dhcp</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof request['dhcp']['v4-dhcp-pools'] != 'undefined' )
+ { %>
+ <% var v4_dhcp_pools_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= dhcp_node %>">
+ <td>v4-dhcp-pool</td>
+ </tr>
+ <% i++; %>
+
+ <% request['dhcp']['v4-dhcp-pools'].forEach(function(v4request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= dhcp_node %>">
+ <td>
+ <a href="javascript:v4_dhcp_pools(
+ '<%= svc_instance_id %>',
+ '<%= v4request['v4-dhcp-relay-next-hop-address'] %>',
+ '<%= v4request['v4-dhcp-pool-prefix'] %>',
+ '<%= v4request['v4-dhcp-pool-prefix-length'] %>',
+ '<%= v4request['v4-dhcp-relay-gateway-address'] %>');">v4-dhcp-pools</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof v4request['excluded-v4-address'] != 'undefined' )
+ { %>
+ <% var excluded_v4_address_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v4_dhcp_node %>">
+ <td>exluded-v4-address</td>
+ </tr>
+ <% i++; %>
+
+ <% v4request['excluded-v4-addresses'].forEach(function(ex_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= excluded_v4_address_node %>">
+ <td>
+ <a href="javascript:excluded_v4_address(
+ '<%= svc_instance_id %>',
+ '<%= ex_request['excluded-v4-address'] %>');">excluded-v4-address</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% }); %>
+ <% } %>
+
+ <% if ( typeof request['dhcp']['excluded-v4-dhcp-addresses-from-default-pool'] != 'undefined' )
+ { %>
+ <% var exc_v4_address_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= dhcp_node %>">
+ <td>excluded-v4-dhcp-addresses-from-default-pool</td>
+ </tr>
+ <% i++; %>
+
+ <% request['dhcp']['excluded-v4-dhcp-addresses-from-default-pool'].forEach(function(ex_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= exc_v4_address_node %>">
+ <td>
+ <a href="javascript:excluded_v4_addresses_from_default_pool(
+ '<%= svc_instance_id %>',
+ '<%= ex_request['excluded-v4-address'] %>');">excluded-v4-dhcp-addresses-from-default-pool</a>
+ </td>
+ </tr>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+
+ <% if ( typeof request['dhcp']['v6-dhcp-pools'] != 'undefined' )
+ { %>
+ <% var v6_dhcp_pools_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= dhcp_node %>">
+ <td>v6-dhcp-pool</td>
+ </tr>
+ <% i++; %>
+
+ <% request['dhcp']['v6-dhcp-pools'].forEach(function(v6request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= dhcp_node %>">
+ <td>
+ <a href="javascript:v6_dhcp_pools(
+ '<%= svc_instance_id %>',
+ '<%= v6request['v6-dhcp-relay-next-hop-address'] %>',
+ '<%= v6request['v6-dhcp-pool-prefix'] %>',
+ '<%= v6request['v6-dhcp-pool-prefix-length'] %>',
+ '<%= v6request['v6-dhcp-relay-gateway-address'] %>');">v6-dhcp-pools</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof v4request['excluded-v6-addresses'] != 'undefined' )
+ { %>
+ <% var excluded_v6_address_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v6_dhcp_node %>">
+ <td>exluded-v6-address</td>
+ </tr>
+ <% i++; %>
+
+ <% v6request['excluded-v6-addresses'].forEach(function(ex_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= excluded_v6_address_node %>">
+ <td>
+ <a href="javascript:excluded_v6_address(
+ '<%= svc_instance_id %>',
+ '<%= ex_request['excluded-v6-address'] %>');">excluded-v6-address</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% }); %>
+ <% } %>
+
+ <% if ( typeof request['dhcp']['excluded-v6-dhcp-addresses-from-default-pool'] != 'undefined' )
+ { %>
+ <% var exc_v6_address_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= dhcp_node %>">
+ <td>excluded-v6-dhcp-addresses-from-default-pool</td>
+ </tr>
+ <% i++; %>
+
+ <% request['dhcp']['excluded-v6-dhcp-addresses-from-default-pool'].forEach(function(ex_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= exc_v6_address_node %>">
+ <td>
+ <a href="javascript:excluded_v6_addresses_from_default_pool(
+ '<%= svc_instance_id %>',
+ '<%= ex_request['excluded-v6-address'] %>');">excluded-v6-dhcp-addresses-from-default-pool</a>
+ </td>
+ </tr>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% } %>
+
+ <% if ( typeof request['firewall-lite'] != 'undefined' )
+ { %>
+ <% var firewall_lite_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= root_node %>">
+ <td>firewall-lite</td>
+ </tr>
+ <% i++; %>
+
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= firewall_lite_node %>">
+ <td>
+ <a href="javascript:firewall_lite(
+ '<%= svc_instance_id %>',
+ '<%= vr_designation %>',
+ '<%= request['firewall-lite']['stateful-firewall-lite-v6-enabled'] %>',
+ '<%= request['firewall-lite']['stateful-firewall-lite-v4-enabled'] %>');">firewall-lite</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof request['firewall-lite']['v6-firewall-packet-filters'] != 'undefined' )
+ {
+ var v6_firewall_packet_filters_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= firewall_lite_node %>">
+ <td>v6-firewall-packet-filters</td>
+ </tr>
+ <% i++; %>
+
+ <% request['firewall-lite']['v6-firewall-packet-filters'].forEach(function(v6request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v6_firewall_packet_filters_node %>">
+ <td>
+ <a href="javascript:v6_firewall_packet_filters(
+ '<%= svc_instance_id %>',
+ '<%= v6request['v6-firewall-prefix'] %>',
+ '<%= v6request['v6-firewall-prefix-length'] %>',
+ '<%= v6request['allow-icmp-ping'] %>');">v6-firewall-packet-filters</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof v6request['udp-port-list'] != 'undefined' )
+ { %>
+ <% v6request['udp-port-list'].forEach(function(udp_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v6_firewall_packet_filters_node %>">
+ <td>
+ <a href="javascript:udp_port_list(
+ '<%= svc_instance_id %>',
+ '<%= udp_request['port-number'] %>');">udp-port-list</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% if ( typeof v6p_request['tcp-port-list'] != 'undefined' )
+ { %>
+ <% v6request['tcp-port-list'].forEach(function(tcp_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v6_firewall_packet_filters_node %>">
+ <td>
+ <a href="javascript:tcp_port_list(
+ '<%= svc_instance_id %>',
+ '<%= tcp_request['port-number'] %>');">tcp-port-list</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% }); %>
+ <% } %>
+ <% if ( typeof request['firewall-lite']['v4-firewall-packet-filters'] != 'undefined' )
+ {
+ var v4_firewall_packet_filters_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= firewall_lite_node %>">
+ <td>v4-firewall-packet-filters</td>
+ </tr>
+ <% i++; %>
+
+ <% request['firewall-lite']['v4-firewall-packet-filters'].forEach(function(v4request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v4_firewall_packet_filters_node %>">
+ <td>
+ <a href="javascript:v4_firewall_packet_filters(
+ '<%= svc_instance_id %>',
+ '<%= v4request['v4-firewall-prefix'] %>',
+ '<%= v4request['v4-firewall-prefix-length'] %>',
+ '<%= v4request['allow-icmp-ping'] %>');">v4-firewall-packet-filters</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof v4request['udp-port-list'] != 'undefined' )
+ { %>
+ <% v4request['udp-port-list'].forEach(function(udp_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v4_firewall_packet_filters_node %>">
+ <td>
+ <a href="javascript:udp_port_list(
+ '<%= svc_instance_id %>',
+ '<%= udp_request['port-number'] %>');">udp-port-list</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% if ( typeof v4p_request['tcp-port-list'] != 'undefined' )
+ { %>
+ <% v4request['tcp-port-list'].forEach(function(tcp_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v4_firewall_packet_filters_node %>">
+ <td>
+ <a href="javascript:tcp_port_list(
+ '<%= svc_instance_id %>',
+ '<%= tcp_request['port-number'] %>');">tcp-port-list</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% }); %>
+ <% } %>
+
+ <% } %>
+
+ <% if ( typeof request['static-routes'] != 'undefined' )
+ {
+ var static_route_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= root_node %>">
+ <td>static-routes</td>
+ </tr>
+ <% i++; %>
+ <% if ( typeof request['static-routes']['v6-static-routes'] != 'undefined' )
+ { %>
+ <% v6_static_route = i %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= static_route_node %>">
+ <td>v6-static-routes</td>
+ </tr>
+ <% i++; %>
+
+ <% request['static-routes']['v6-static-routes'].forEach(function(strequest){ %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v6_static_route %>">
+ <td>
+ <a href="javascript:v6_static_routes(
+ '<%= svc_instance_id %>',
+ '<%= strequest['v6-static-route-prefix'] %>',
+ '<%= strequest['v6-next-hop-address'] %>',
+ '<%= strequest['v6-static-route-prefix-length'] %>');">v6-static-routes</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% if ( typeof request['static-routes']['v4-static-routes'] != 'undefined' )
+ { %>
+ <% v4_static_route = i %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= static_route_node %>">
+ <td>v4-static-routes</td>
+ </tr>
+ <% i++; %>
+ <% request['static-routes']['v4-static-routes'].forEach(function(v4request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v4_static_route %>">
+ <td>
+ <a href="javascript:v4_static_routes(
+ '<%= svc_instance_id %>',
+ '<%= v4request['v4-static-route-prefix'] %>',
+ '<%= v4request['v4-next-hop-address'] %>',
+ '<%= v4request['v4-static-route-prefix-length'] %>');">v4-static-routes</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% } %>
+ <% if ( typeof request['pat'] != 'undefined' )
+ { %>
+ <% var pat_node = i %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= root_node %>">
+ <td>pat</td>
+ </tr>
+ <% i++; %>
+
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= pat_node %>">
+ <td>
+ <a href="javascript:pat(
+ '<%= svc_instance_id %>',
+ '<%= request['pat']['v4-pat-default-pool-prefix-length'] %>',
+ '<%= request['pat']['use-v4-default-pool'] %>',
+ '<%= request['pat']['v4-pat-enabled'] %>',
+ '<%= request['pat']['v4-pat-default-pool-prefix'] %>');">pat</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof request['pat']['v4-pat-pools'] != 'undefined' )
+ {
+ var pat_pools_node = i %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= pat_node %>">
+ <td>v4-pat-pools</td>
+ </tr>
+ <% i++; %>
+
+ <% request['pat']['v4-pat-pools'].forEach(function(trequest)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= pat_pools_node %>">
+ <td>
+ <a href="javascript:pat_pools(
+ '<%= svc_instance_id %>',
+ '<%= trequest['v4-pat-pool-next-hop-address'] %>',
+ '<%= trequest['v4-pat-pool-prefix-length'] %>',
+ '<%= trequest['v4-pat-pool-prefix'] %>');">v4-pat-pools</a>
+ </td>
+ </tr>
+ <% }); %>
+ <% i++; %>
+
+ <% } %>
+ <% } %>
+ <% if ( typeof request['nat'] != 'undefined' )
+ { %>
+ <% var nat_node = i %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= root_node %>">
+ <td>nat</td>
+ </tr>
+ <% i++; %>
+
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= nat_node %>">
+ <td>
+ <a href="javascript:nat(
+ '<%= svc_instance_id %>',
+ '<%= request['pat']['v4-nat-enabled'] %>');">nat</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof request['nat']['v4-nat-mapping-entries'] != 'undefined' )
+ {
+ var nat_mapping_node = i %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= nat_node %>">
+ <td>v4-nat-mapping-entries</td>
+ </tr>
+ <% i++; %>
+
+ <% request['nat']['v4-nat-mapping-entries'].forEach(function(trequest)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= nat_mapping_node %>">
+ <td>
+ <a href="javascript:v4_nat_mapping_entries(
+ '<%= svc_instance_id %>',
+ '<%= trequest['v4-nat-external'] %>',
+ '<%= trequest['v4-nat-next-hop-address'] %>',
+ '<%= trequest['v4-nat-internal'] %>');">v4-nat-mapping-entries</a>
+ </td>
+ </tr>
+ <% }); %>
+ <% i++; %>
+
+ <% } %>
+ <% } %>
+
+ <% if ( (typeof request['v4-public-lan-prefixes'] != 'undefined') && (typeof request['v4-public-lan-prefixes']['t-provided-v4-lan-public-prefixes'] != 'undefined') )
+ { %>
+ <% request['v4-public-lan-prefixes']['t-provided-v4-lan-public-prefixes'].forEach(function(trequest){
+ var v4_public_root = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= root_node %>">
+ <td>v4-public-lan-prefixes</td>
+ </tr>
+ <% i++; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v4_public_root %>">
+ <td>
+ <a href="javascript:t_provided_v4_prefixes(
+ '<%= svc_instance_id %>',
+ '<%= trequest['request-index'] %>',
+ '<%= trequest['v4-lan-public-prefix-length'] %>',
+ '<%= trequest['v4-lan-public-prefix'] %>');">t-provided-v4-lan-public-prefixes</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% });
+ }
+} else { %>
+ <div><pre>no data</pre></div>
+<% } %>
+</table>
+</div>
+</div>
+
+ <% include ../partials/vr_lan_interface %>
+ <% include ../partials/dhcp %>
+ <% include ../partials/v4_dhcp_pools %>
+ <% include ../partials/v6_dhcp_pools %>
+ <% include ../partials/excluded_v4_address %>
+ <% include ../partials/excluded_v4_address_from_default_pool %>
+ <% include ../partials/excluded_v6_address_from_default_pool %>
+ <% include ../partials/t_provided_v6_lan_public_prefixes %>
+ <% include ../partials/firewall_lite %>
+ <% include ../partials/v6_static_routes %>
+ <% include ../partials/v4_static_routes %>
+ <% include ../partials/pat %>
+ <% include ../partials/pat_pools %>
+ <% include ../partials/nat %>
+ <% include ../partials/v4_nat_mapping_entries %>
+ <% include ../partials/t_provided_v4_lan_public_prefixes %>
+ <% include ../partials/v6_firewall_packet_filters %>
+ <% include ../partials/v4_firewall_packet_filters %>
+ <% include ../partials/udp_port_list %>
+ <% include ../partials/tcp_port_list %>
+ <footer>
+ <% include ../partials/footer %>
+ </footer>
+
+<script type="text/javascript">
+
+$(document).ready(function() {
+ $('.tree').treegrid( { initialState: 'collapsed' } );
+});
+
+function excluded_v4_addresses_from_default_pool(svc_instance_id, excluded_v4_address)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('excluded_v4_address_from_default_pool');
+ if( excluded_v4_address != 'undefined' ){
+ lvalue.value=excluded_v4_address;
+ } else {
+ lvalue.value='';
+ }
+ $('#excluded-v4-address-from-default-pool-modal').modal('show');
+}
+function excluded_v6_addresses_from_default_pool(svc_instance_id, excluded_v6_address)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('excluded_v6_address');
+ if( excluded_v6_address != 'undefined' ){
+ lvalue.value=excluded_v6_address;
+ } else {
+ lvalue.value='';
+ }
+ $('#excluded-v6-address-modal').modal('show');
+}
+function excluded_v4_addresses_from_default_pool(svc_instance_id, excluded_v4_address)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('excluded_v4_address');
+ if( excluded_v4_address != 'undefined' ){
+ lvalue.value=excluded_v4_address;
+ } else {
+ lvalue.value='';
+ }
+ $('#excluded-v4-address-modal').modal('show');
+}
+function exluded_v4_address(svc_instance_id, excluded_v4_address)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('excluded_v4_address');
+ if( excluded_v4_address != 'undefined' ){
+ lvalue.value=excluded_v4_address;
+ } else {
+ lvalue.value='';
+ }
+ $('#excluded-v4-address-modal').modal('show');
+}
+
+function v6_dhcp_pools(svc_instance_id,v6_dhcp_relay_next_hop_address,v6_dhcp_pool_prefix,v6_dhcp_pool_prefix_length,v6_dhcp_relay_gateway_address)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v6_dhcp_relay_next_hop_address');
+ if( v6_dhcp_relay_next_hop_address != 'undefined' ){
+ lvalue.value=v6_dhcp_relay_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_dhcp_pool_prefix');
+ if( v6_dhcp_pool_prefix != 'undefined' ){
+ lvalue.value=v6_dhcp_pool_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_dhcp_pool_prefix_length');
+ if( v6_dhcp_pool_prefix_length != 'undefined' ){
+ lvalue.value=v6_dhcp_pool_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_dhcp_relay_gateway_address');
+ if( v6_dhcp_relay_gateway_address != 'undefined' ){
+ lvalue.value=v6_dhcp_relay_gateway_address;
+ } else {
+ lvalue.value='';
+ }
+ $('#v6-dhcp-pools-modal').modal('show');
+}
+
+function v4_dhcp_pools(svc_instance_id,v4_dhcp_relay_next_hop_address,v4_dhcp_pool_prefix,v4_dhcp_pool_prefix_length,v4_dhcp_relay_gateway_address)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_dhcp_relay_next_hop_address');
+ if( v4_dhcp_relay_next_hop_address != 'undefined' ){
+ lvalue.value=v4_dhcp_relay_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_dhcp_pool_prefix');
+ if( v4_dhcp_pool_prefix != 'undefined' ){
+ lvalue.value=v4_dhcp_pool_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_dhcp_pool_prefix_length');
+ if( v4_dhcp_pool_prefix_length != 'undefined' ){
+ lvalue.value=v4_dhcp_pool_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_dhcp_relay_gateway_address');
+ if( v4_dhcp_relay_gateway_address != 'undefined' ){
+ lvalue.value=v4_dhcp_relay_gateway_address;
+ } else {
+ lvalue.value='';
+ }
+ $('#v4-dhcp-pools-modal').modal('show');
+}
+
+function dhcp(svc_instance_id,use_v4_default_pool,use_v6_default_pool,v4_dhcp_server_enabled,v6_dhcp_server_enabled,v6_dhcp_default_pool_prefix,v6_dhcp_default_pool_prefix_length,v4_dhcp_default_pool_prefix,v4_dhcp_default_pool_prefix_length)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('use_v4_default_pool');
+ if( use_v4_default_pool != 'undefined' ){
+ lvalue.value=use_v4_default_pool;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('use_v6_default_pool');
+ if( use_v6_default_pool != 'undefined' ){
+ lvalue.value=use_v6_default_pool;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_dhcp_server_enabled');
+ if( v4_dhcp_server_enabled != 'undefined' ){
+ lvalue.value=v4_dhcp_server_enabled;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_dhcp_server_enabled');
+ if( v6_dhcp_server_enabled != 'undefined' ){
+ lvalue.value=v6_dhcp_server_enabled;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_dhcp_default_pool_prefix');
+ if( v6_dhcp_default_pool_prefix != 'undefined' ){
+ lvalue.value=v6_dhcp_default_pool_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_dhcp_default_pool_prefix_length');
+ if( v6_dhcp_default_pool_prefix_length != 'undefined' ){
+ lvalue.value=v6_dhcp_default_pool_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_dhcp_default_pool_prefix');
+ if( v4_dhcp_default_pool_prefix != 'undefined' ){
+ lvalue.value=v4_dhcp_default_pool_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_dhcp_default_pool_prefix_length');
+ if( v4_dhcp_default_pool_prefix_length != 'undefined' ){
+ lvalue.value=v4_dhcp_default_pool_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ $('#dhcp-modal').modal('show');
+}
+
+function tcp_port_list(svc_instance_id,tcp_port_number)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('tcp_port_number');
+ if( tcp_port_number != 'undefined' ){
+ lvalue.value=tcp_port_number;
+ } else {
+ lvalue.value='';
+ }
+ $('#tcp-port-list-modal').modal('show');
+}
+function udp_port_list(svc_instance_id,udp_port_number)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('udp_port_number');
+ if( udp_port_number != 'undefined' ){
+ lvalue.value=udp_port_number;
+ } else {
+ lvalue.value='';
+ }
+ $('#udp-port-list-modal').modal('show');
+}
+function v4_firewall_packet_filters(svc_instance_id,v4_firewall_prefix,v4_firewall_prefix_length,v4_allow_icmp_ping)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_firewall_prefix');
+ if( v4_firewall_prefix != 'undefined' ){
+ lvalue.value=v4_firewall_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_firewall_prefix_length');
+ if( v4_firewall_prefix_length != 'undefined' ){
+ lvalue.value=v4_firewall_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_allow_icmp_ping');
+ if( v4_allow_icmp_ping != 'undefined' ){
+ lvalue.value=v4_allow_icmp_ping;
+ } else {
+ lvalue.value='';
+ }
+ $('#v4-firewall-packet-filters-modal').modal('show');
+}
+
+function v6_firewall_packet_filters(svc_instance_id,v6_firewall_prefix,v6_firewall_prefix_length,v6_allow_icmp_ping)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v6_firewall_prefix');
+ if( v6_firewall_prefix != 'undefined' ){
+ lvalue.value=v6_firewall_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_firewall_prefix_length');
+ if( v6_firewall_prefix_length != 'undefined' ){
+ lvalue.value=v6_firewall_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_allow_icmp_ping');
+ if( v6_allow_icmp_ping != 'undefined' ){
+ lvalue.value=v6_allow_icmp_ping;
+ } else {
+ lvalue.value='';
+ }
+ $('#v6-firewall-packet-filters-modal').modal('show');
+} function nat(svc_instance_id,v4_nat_enabled) {
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_nat_enabled');
+ if( v4_nat_enabled != 'undefined' ){
+ lvalue.value=v4_nat_enabled;
+ } else {
+ lvalue.value='';
+ }
+ $('#nat-modal').modal('show');
+}
+function v4_nat_mapping_entries(svc_instance_id,v4_nat_external,v4_nat_next_hop_address,v4_nat_internal)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_nat_external');
+ if( v4_nat_external != 'undefined' ){
+ lvalue.value=v4_nat_external;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_nat_next_hop_address');
+ if( v4_nat_next_hop_address != 'undefined' ){
+ lvalue.value=v4_nat_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_nat_internal');
+ if( v4_nat_internal != 'undefined' ){
+ lvalue.value=v4_nat_internal;
+ } else {
+ lvalue.value='';
+ }
+ $('#v4-nat-mapping-entries-modal').modal('show');
+}
+function pat_pools(svc_instance_id,v4_pat_pool_next_hop_address,v4_pat_pool_prefix_length,v4_pat_pool_prefix)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_pat_pool_next_hop_address');
+ if( v4_pat_pool_next_hop_address != 'undefined' ){
+ lvalue.value=v4_pat_pool_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_pat_pool_prefix_length');
+ if( v4_pat_pool_prefix_length != 'undefined' ){
+ lvalue.value=v4_pat_pool_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_pat_pool_prefix');
+ if( v4_pat_pool_prefix != 'undefined' ){
+ lvalue.value=v4_pat_pool_prefix;
+ } else {
+ lvalue.value='';
+ }
+ $('#pat-pools-modal').modal('show');
+}
+function pat(svc_instance_id,v4_pat_default_pool_prefix_length,use_v4_default_pool,v4_pat_enabled,v4_pat_default_pool_prefix)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_pat_default_pool_prefix_length');
+ if( v4_pat_default_pool_prefix_length != 'undefined' ){
+ lvalue.value=v4_pat_default_pool_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+
+ lvalue = document.getElementById('use_v4_default_pool');
+ if( use_v4_default_pool != 'undefined' ){
+ lvalue.value = use_v4_default_pool;
+ } else {
+ lvalue.value = '';
+ }
+
+ lvalue = document.getElementById('v4_pat_enabled');
+ if( v4_pat_enabled != 'undefined' ){
+ lvalue.value = v4_pat_enabled;
+ } else {
+ lvalue.value = '';
+ }
+
+ lvalue = document.getElementById('v4_pat_default_pool_prefix');
+ if( v4_pat_default_pool_prefix != 'undefined' ){
+ lvalue.value = v4_pat_default_pool_prefix;
+ } else {
+ lvalue.value = '';
+ }
+ $('#pat-modal').modal('show');
+}
+function v4_static_routes(svc_instance_id,v4_static_route_prefix,static_v4_next_hop_address,v4_static_route_prefix_length)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_static_route_prefix');
+ if( v4_static_route_prefix != 'undefined' ){
+ lvalue.value=v4_static_route_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('static_v4_next_hop_address');
+ if( static_v4_next_hop_address != 'undefined' ){
+ lvalue.value=static_v4_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_static_route_prefix_length');
+ if( v4_static_route_prefix_length != 'undefined' ){
+ lvalue.value=v4_static_route_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ $('#v4-static-routes-modal').modal('show');
+}
+
+function v6_static_routes(svc_instance_id,v6_static_route_prefix,static_v6_next_hop_address,v6_static_route_prefix_length)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v6_static_route_prefix');
+ if( v6_static_route_prefix != 'undefined' ){
+ lvalue.value=v6_static_route_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('static_v6_next_hop_address');
+ if( static_v6_next_hop_address != 'undefined' ){
+ lvalue.value=static_v6_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_static_route_prefix_length');
+ if( v6_static_route_prefix_length != 'undefined' ){
+ lvalue.value=v6_static_route_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ $('#v6-static-routes-modal').modal('show');
+}
+function firewall_lite(svc_instance_id,firewall_lite_vr_designation,stateful_firewall_lite_v4_enabled,stateful_firewall_lite_v6_enabled)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ document.getElementById('firewall_lite_vr_designation').value = firewall_lite_vr_designation;
+ var lvalue = document.getElementById('stateful_firewall_lite_v4_enabled');
+ if( stateful_firewall_lite_v4_enabled != 'undefined' ){
+ lvalue.value=stateful_firewall_lite_v4_enabled;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('stateful_firewall_lite_v6_enabled');
+ if( stateful_firewall_lite_v6_enabled != 'undefined' ){
+ lvalue.value=stateful_firewall_lite_v6_enabled;
+ } else {
+ lvalue.value='';
+ }
+ $('#firewall-lite-modal').modal('show');
+}
+function t_provided_v6_prefixes(svc_instance_id,v6_request_index,v6_lan_public_prefix_length,v6_lan_public_prefix)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v6_request_index');
+ if( v6_request_index != 'undefined' ){
+ lvalue.value=v6_request_index;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_lan_public_prefix_length');
+ if( v6_lan_public_prefix_length != 'undefined' ){
+ lvalue.value=v6_lan_public_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_lan_public_prefix');
+ if( v6_lan_public_prefix != 'undefined' ){
+ lvalue.value=v6_lan_public_prefix;
+ } else {
+ lvalue.value='';
+ }
+ $('#t-provided-v6-lan-public-prefixes-modal').modal('show');
+}
+function t_provided_v4_prefixes(svc_instance_id,v4_request_index,v4_lan_public_prefix_length,v4_lan_public_prefix)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_request_index');
+ if( v4_request_index != 'undefined' ){
+ lvalue.value=v4_request_index;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_lan_public_prefix_length');
+ if( v4_lan_public_prefix_length != 'undefined' ){
+ lvalue.value=v4_lan_public_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_lan_public_prefix');
+ if( v4_lan_public_prefix != 'undefined' ){
+ lvalue.value=v4_lan_public_prefix;
+ } else {
+ lvalue.value='';
+ }
+ $('#t-provided-v4-lan-public-prefixes-modal').modal('show');
+}
+
+function vrlan_interface(svc_instance_id,vr_designation,v6_vr_lan_prefix, v6_vr_lan_prefix_length, v6_vce_wan_address, v4_vr_lan_prefix_length, v4_vr_lan_prefix, t_defaulted_v6_vrlan,v4_vce_loopback_address)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('vr_designation');
+ if( vr_designation != 'undefined' ){
+ lvalue.value=vr_designation;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_vr_lan_prefix');
+ if( v6_vr_lan_prefix != 'undefined' ){
+ lvalue.value=v6_vr_lan_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_vr_lan_prefix_length');
+ if( v6_vr_lan_prefix_length != 'undefined' ){
+ lvalue.value=v6_vr_lan_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_vce_wan_address');
+ if( v6_vce_wan_address != 'undefined' ){
+ lvalue.value=v6_vce_wan_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_vr_lan_prefix_length');
+ if( v4_vr_lan_prefix_length != 'undefined' ){
+ lvalue.value=v4_vr_lan_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_vr_lan_prefix');
+ if( v4_vr_lan_prefix != 'undefined' ){
+ lvalue.value=v4_vr_lan_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_vce_loopback_address');
+ if( v4_vce_loopback_address != 'undefined' ){
+ lvalue.value=v4_vce_loopback_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('t_defaulted_v6_vrlan');
+ if( t_defaulted_v6_vrlan != 'undefined' ){
+ lvalue.value=t_defaulted_v6_vrlan;
+ } else {
+ lvalue.value='';
+ }
+ $('#vr-lan-interface-modal').modal('show');
+}
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/odl/listWklst.ejs b/admportal/views/odl/listWklst.ejs
new file mode 100644
index 0000000..432c207
--- /dev/null
+++ b/admportal/views/odl/listWklst.ejs
@@ -0,0 +1,2224 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>SDN-C AdminPortal</title>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+
+<script type="text/javascript">
+$(document).ready(function() {
+ $('.tree').treegrid( { initialState: 'collapsed' } );
+});
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>L3SDN-API Services</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'><%=result.msg %></div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'><%=result.msg %></div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<div class="container-fluid">
+<div class="content">
+
+<table class="table tree table-hover table-condensed">
+<% var i=1; root_node=1;
+pageInfo.rows.forEach(function(request)
+{
+ root_node = i; %>
+
+ <tr class="treegrid-<%= i %>">
+ <td><%= request['service-instance-id'] %></td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof request['service-status'] != 'undefined' )
+ { %>
+ <tr class="treegrid-<%= i %>> treegrid-parent-<%= root_node %>">
+ <td>
+ <a class=""
+ href="javascript:serviceStatus(
+ '<%= request['service-status']['rpc-name'] %>',
+ '<%= request['service-status']['final-indicator'] %>',
+ '<%= request['service-status']['request-status'] %>',
+ '<%= request['service-status']['rpc-action'] %>',
+ '<%= request['service-status']['l3sdn-action'] %>',
+ '<%= request['service-status']['l3sdn-subaction'] %>',
+ '<%= request['service-status']['response-message'] %>',
+ '<%= request['service-status']['response-code'] %>',
+ '<%= request['service-status']['response-timestamp'] %>' );">service-status</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% } %>
+ <% if ( typeof request['service-data'] != 'undefined' )
+ { %>
+ <% var service_data_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= root_node %>">
+ <td> service-data</td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof request['service-data']['internet-evc-access-information'] != 'undefined' )
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= service_data_node %>">
+ <td>
+ <a class=""
+ href="javascript:internetInfo(
+ '<%= request['service-data']['internet-evc-access-information']['ip-version'] %>',
+ '<%= request['service-data']['internet-evc-access-information']['internet-evc-speed-value'] %>',
+ '<%= request['service-data']['internet-evc-access-information']['internet-evc-speed-units'] %>');">internet-evc-access-information</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% } %>
+ <% if ( typeof request['service-data']['oper-status'] != 'undefined' )
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= service_data_node %>">
+ <td>
+ <a class=""
+ href="javascript:operStatus(
+ '<%= request['service-data']['oper-status']['order-status'] %>',
+ '<%= request['service-data']['oper-status']['modify-timestamp'] %>',
+ '<%= request['service-data']['oper-status']['last-svc-request-id'] %>',
+ '<%= request['service-data']['oper-status']['last-sub-action'] %>',
+ '<%= request['service-data']['oper-status']['t-defaulted-v6-vrlan'] %>',
+ '<%= request['service-data']['oper-status']['last-action'] %>',
+ '<%= request['service-data']['oper-status']['create-timestamp'] %>',
+ '<%= request['service-data']['oper-status']['maintenance-indicator'] %>',
+ '<%= request['service-data']['oper-status']['last-order-status'] %>');">oper-status</a>
+ </td>
+ </tr>
+ <% i = i+1; %>
+ <% } %>
+ <% if ( typeof request['service-data']['svc-topology-additional-data'] != 'undefined' )
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= service_data_node %>">
+ <td>
+ <a class=""
+ href="javascript:svcTopo(
+ '<%= request['service-data']['svc-topology-additional-data']['svc-vnf-type'] %>');">svc-topology-additional-data</a>
+ </td>
+ </tr>
+ <% i = i+1; %>
+ <% } %>
+ <% if ( typeof request['service-data']['request-information'] != 'undefined' )
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= service_data_node %>">
+ <td>
+ <a class=""
+ href="javascript:reqInfo(
+ '<%= request['service-data']['request-information']['notification-url'] %>',
+ '<%= request['service-data']['request-information']['source'] %>',
+ '<%= request['service-data']['request-information']['order-number'] %>',
+ '<%= request['service-data']['request-information']['request-id'] %>',
+ '<%= request['service-data']['request-information']['order-version'] %>',
+ '<%= request['service-data']['request-information']['request-action'] %>',
+ '<%= request['service-data']['request-information']['request-sub-action'] %>');">request-information</a>
+ </td>
+ </tr>
+ <% i = i+1; %>
+ <% } %>
+ <% if ( typeof request['service-data']['sdnc-request-header'] != 'undefined' )
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= service_data_node %>">
+ <td>
+ <a class=""
+ href="javascript:reqHeader(
+ '<%= request['service-data']['sdnc-request-header']['svc-notification-url'] %>',
+ '<%= request['service-data']['sdnc-request-header']['svc-request-id'] %>',
+ '<%= request['service-data']['sdnc-request-header']['svc-action'] %>');">sdnc-request-header</a>
+ </td>
+ </tr>
+ <% i = i+1; %>
+ <% } %>
+ <% if ( typeof request['service-data']['l2-homing-information'] != 'undefined' )
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= service_data_node %>">
+ <td>
+ <a class=""
+ href="javascript:l2Homing(
+ '<%= request['service-data']['l2-homing-information']['evc-name'] %>',
+ '<%= request['service-data']['l2-homing-information']['preferred-aic-clli'] %>',
+ '<%= request['service-data']['l2-homing-information']['topology'] %>');">l2-homing-information</a>
+ </td>
+ </tr>
+ <% i = i+1; %>
+ <% } %>
+ <% if ( typeof request['service-data']['service-information'] != 'undefined' )
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= service_data_node %>">
+ <td>
+ <a class=""
+ href="javascript:svcInfo(
+ '<%= request['service-data']['service-information']['service-instance-id'] %>',
+ '<%= request['service-data']['service-information']['subscriber-name'] %>',
+ '<%= request['service-data']['service-information']['service-type'] %>');">service-information</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% } %>
+ <% if ( typeof request['service-data']['feature-list'] != 'undefined' )
+ { %>
+ <% var feature_list_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= service_data_node %>">
+ <td> feature-list</td>
+ </tr>
+ <% i++; %>
+
+ <% request['service-data']['feature-list'].forEach(function(request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= feature_list_node %>">
+ <td>
+ <a class=""
+ href="javascript:feature_list(
+ '<%= request['feature-instance-id'] %>',
+ '<%= request['feature-instance-xpath'] %>',
+ '<%= request['feature-sub-type'] %>',
+ '<%= request['feature-type'] %>');">feature-list</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% if ( typeof request['service-data']['svc-config-additional-data'] != 'undefined' )
+ { %>
+ <% var svc_config_additional_data_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= service_data_node %>">
+ <td> svc-config-additional-data</td>
+ </tr>
+ <% i++; %>
+
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= svc_config_additional_data_node %>">
+ <td>
+ <a class=""
+ href="javascript:svc_config_additional_data(
+ '<%= request['service-data']['svc-config-additional-data']['management-ip'] %>');">management-ip</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% } %>
+ <% if ( typeof request['service-data']['equipment'] != 'undefined' )
+ { %>
+ <% var equipment_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= service_data_node %>">
+ <td> equipment</td>
+ </tr>
+ <% i++; %>
+
+ <% request['service-data']['equipment'].forEach(function(equip)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= equipment_node %>">
+ <td>
+ <a class=""
+ href="javascript:equipment(
+ '<%= equip['equipment-role'] %>',
+ '<%= equip['ipv4-oam-address'] %>',
+ '<%= equip['ipv4-oam-gateway-address-prefix-length'] %>',
+ '<%= equip['ptnii-name'] %>',
+ '<%= equip['v4-loopback0-ip-address'] %>',
+ '<%= equip['ipv4-oam-gateway-address'] %>');">equipment</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof equip['ipv4-infrastructure-static-route'] != 'undefined' )
+ { %>
+ <% ipv4_infrastructure_static_route_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= equipment_node %>">
+ <td> ipv4-infrastructure-static-route</td>
+ </tr>
+ <% i++; %>
+
+ <% equip['ipv4-infrastructure-static-route'].forEach(function(eroute)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= ipv4_infrastructure_static_route_node %>">
+ <td>
+ <a class=""
+ href="javascript:ipv4_infrastructure_static_route(
+ '<%= eroute['ipv4-outgoing-interface'] %>',
+ '<%= eroute['ipv4-next-hop-address'] %>',
+ '<%= eroute['ipv4-dest-prefix'] %>',
+ '<%= eroute['ipv4-dest-prefix-length'] %>');">ipv4_infrastructure_static_route</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% if ( typeof equip['ipv6-infrastructure-static-route'] != 'undefined' )
+ { %>
+ <% ipv6_infrastructure_static_route_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= equipment_node %>">
+ <td> ipv6-infrastructure-static-route</td>
+ </tr>
+ <% i++; %>
+
+ <% equip['ipv6-infrastructure-static-route'].forEach(function(eroute)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= ipv6_infrastructure_static_route_node %>">
+ <td>
+ <a class=""
+ href="javascript:ipv6_infrastructure_static_route(
+ '<%= eroute['ipv6-outgoing-interface'] %>',
+ '<%= eroute['ipv6-next-hop-address'] %>',
+ '<%= eroute['ipv6-dest-prefix'] %>',
+ '<%= eroute['ipv6-dest-prefix-length'] %>');">ipv6_infrastructure_static_route</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% if ( typeof equip['interface'] != 'undefined' )
+ { %>
+ <% interface_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= equipment_node %>">
+ <td> interface</td>
+ </tr>
+ <% i++; %>
+
+ <% equip['interface'].forEach(function(interface)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= interface_node %>">
+ <td>
+ <a class=""
+ href="javascript:interface(
+ '<%= interface['interface-name'] %>',
+ '<%= interface['interface-role'] %>');">interface</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof interface['vlan'] != 'undefined' )
+ { %>
+ <% vlan_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= interface_node %>">
+ <td> vlan</td>
+ </tr>
+ <% i++; %>
+
+ <% interface['vlan'].forEach(function(vlan)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= vlan_node %>">
+ <td>
+ <a class=""
+ href="javascript:vlan(
+ '<%= vlan['vlan-interface'] %>',
+ '<%= vlan['vlan-id-outer'] %>',
+ '<%= vlan['vlan-id-inner'] %>');">vlan</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof vlan['l3-interface-ipv4-address-list'] != 'undefined' )
+ { %>
+ <% ipv4_address_list_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= interface_node %>">
+ <td> l3-interface-ipv4-address-list</td>
+ </tr>
+ <% i++; %>
+
+ <% vlan['l3-interface-ipv4-address-list'].forEach(function(v4)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= ipv4_address_list_node %>">
+ <td>
+ <a class=""
+ href="javascript:l3_interface_ipv4_address_list(
+ '<%= v4['l3-interface-ipv4-address'] %>',
+ '<%= v4['l3-interface-ipv4-prefix-length'] %>');">l3-interface-ipv4-address-list</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% }); %>
+ <% }; %>
+
+ <% if ( typeof vlan['l3-interface-ipv6-address-list'] != 'undefined' )
+ { %>
+ <% ipv6_address_list_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= interface_node %>">
+ <td> l3-interface-ipv6-address-list</td>
+ </tr>
+ <% i++; %>
+
+ <% vlan['l3-interface-ipv6-address-list'].forEach(function(v6)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= ipv6_address_list_node %>">
+ <td>
+ <a class=""
+ href="javascript:l3_interface_ipv6_address_list(
+ '<%= v6['l3-interface-ipv6-address'] %>',
+ '<%= v6['l3-interface-ipv6-prefix-length'] %>');">l3-interface-ipv6-address-list</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% }; %>
+ <% }); %>
+ <% }; %>
+ <% }); %>
+ <% } %>
+
+
+
+ <% }); %>
+ <% } %>
+
+ <% if ( typeof request['service-data']['l3sdn-vnf-fields'] != 'undefined' )
+ { %>
+ <% l3sdn_vnf_fields_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= service_data_node %>">
+ <td> l3sdn-vnf-fields</td>
+ </tr>
+ <% i++; %>
+
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= l3sdn_vnf_fields_node %>">
+ <td>
+ <a class=""
+ href="javascript:l3sdn_vnf_fields(
+ '<%= request['service-data']['l3sdn-vnf-fields']['availability-zone'] %>',
+ '<%= request['service-data']['l3sdn-vnf-fields']['vnf-stack-id'] %>',
+ '<%= request['service-data']['l3sdn-vnf-fields']['vnf-name'] %>',
+ '<%= request['service-data']['l3sdn-vnf-fields']['vnf-name2'] %>',
+ '<%= request['service-data']['l3sdn-vnf-fields']['vnf-type'] %>',
+ '<%= request['service-data']['l3sdn-vnf-fields']['vnf-status'] %>',
+ '<%= request['service-data']['l3sdn-vnf-fields']['vnf-id'] %>',
+ '<%= request['service-data']['l3sdn-vnf-fields']['oam-network-name'] %>',
+ '<%= request['service-data']['l3sdn-vnf-fields']['aic_site_id'] %>');">l3sdn-vnf-fields</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof request['service-data']['l3sdn-vnf-fields']['network-connections'] != 'undefined' )
+ { %>
+ <% network_connections_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= l3sdn_vnf_fields_node %>">
+ <td> network-connections</td>
+ </tr>
+ <% i++; %>
+
+ <% request['service-data']['l3sdn-vnf-fields']['network-connections'].forEach(function(nconn)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= network_connections_node %>">
+ <td>
+ <a class=""
+ href="javascript:network_connections(
+ '<%= nconn['stack-id'] %>',
+ '<%= nconn['net-status'] %>',
+ '<%= nconn['connection-type'] %>',
+ '<%= nconn['provider-network'] %>',
+ '<%= nconn['interface-id'] %>',
+ '<%= nconn['vlan'] %>',
+ '<%= nconn['port-group-name'] %>',
+ '<%= nconn['neutron-network-id'] %>');">network-connections</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+
+ <% if ( typeof request['service-data']['l3sdn-vnf-fields']['vnf-vm-information'] != 'undefined' )
+ { %>
+ <% vnf_vm_information_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= l3sdn_vnf_fields_node %>">
+ <td> vnf-vm-information</td>
+ </tr>
+ <% i++; %>
+
+ <% request['service-data']['l3sdn-vnf-fields']['vnf-vm-information'].forEach(function(info)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= vnf_vm_information_node %>">
+ <td>
+ <a class=""
+ href="javascript:vnf_vm_information(
+ '<%= info['vserver-type'] %>',
+ '<%= info['vserver-name'] %>');">vnf-vm-information</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+
+
+ <% } %>
+
+ <% if ( typeof request['service-data']['vr-lan'] != 'undefined' )
+ { %>
+ <% if ( typeof request['service-instance-id'] != 'undefined' )
+ {
+ var svc_instance_id = request['service-instance-id'];
+ } %>
+
+ <% vr_lan_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= service_data_node %>">
+ <td> vr-lan</td>
+ </tr>
+ <% i++; %>
+
+
+ <% if ( request['service-data']['vr-lan']['routing-protocol'] != 'undefined' )
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= vr_lan_node %>">
+ <td>
+ <a href="javascript:routing_protocol('<%= svc_instance_id %>',
+ '<%= request['service-data']['vr-lan']['routing-protocol'] %>');">routing-protocol</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% } %>
+ <% vr_lan_interface_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= vr_lan_node %>">
+ <td> vr-lan-interface</td>
+ </tr>
+ <% i++; %>
+
+ <% if( typeof request['service-data']['vr-lan']['vr-lan-interface'] != 'undefined' )
+ { %>
+
+ <% request['service-data']['vr-lan']['vr-lan-interface'].forEach(function(request)
+ { %>
+
+ <% if ( request['vr-designation'] != 'undefined')
+ {
+ var vr_designation = request['vr-designation'];
+ } %>
+
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= vr_lan_interface_node %>">
+ <td>
+ <a href="javascript:vrlan_interface(
+ '<%= svc_instance_id %>',
+ '<%= request['vr-designation'] %>',
+ '<%= request['v6-vr-lan-prefix'] %>',
+ '<%= request['v6-vr-lan-prefix-length'] %>',
+ '<%= request['v6-vce-wan-address'] %>',
+ '<%= request['v4-vr-lan-prefix-length'] %>',
+ '<%= request['v4-vr-lan-prefix'] %>',
+ '<%= request['t-defaulted-v6-vrlan'] %>',
+ '<%= request['v4-vce-loopback-address'] %>');">vr-lan-interface</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof request['dhcp'] != 'undefined' )
+ { %>
+ <% var dhcp_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= vr_lan_interface_node %>">
+ <td> dhcp</td>
+ </tr>
+ <% i++; %>
+
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= dhcp_node %>">
+ <td>
+ <a href="javascript:dhcp(
+ '<%= svc_instance_id %>',
+ '<%= request['dhcp']['use-v4-default-pool'] %>',
+ '<%= request['dhcp']['use-v6-default-pool'] %>',
+ '<%= request['dhcp']['v4-dhcp-server-enabled'] %>',
+ '<%= request['dhcp']['v6-dhcp-server-enabled'] %>',
+ '<%= request['dhcp']['v6-dhcp-default-pool-prefix'] %>',
+ '<%= request['dhcp']['v6-dhcp-default-pool-prefix-length'] %>',
+ '<%= request['dhcp']['v4-dhcp-default-pool-prefix'] %>',
+ '<%= request['dhcp']['v4-dhcp-default-pool-prefix-length'] %>');">dhcp</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof request['dhcp']['v4-dhcp-pools'] != 'undefined' )
+ { %>
+ <% var v4_dhcp_pools_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= dhcp_node %>">
+ <td>v4-dhcp-pool</td>
+ </tr>
+ <% i++; %>
+
+ <% request['dhcp']['v4-dhcp-pools'].forEach(function(v4request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v4_dhcp_pools_node %>">
+ <td>
+ <a href="javascript:v4_dhcp_pools(
+ '<%= svc_instance_id %>',
+ '<%= v4request['v4-dhcp-relay-next-hop-address'] %>',
+ '<%= v4request['v4-dhcp-pool-prefix'] %>',
+ '<%= v4request['v4-dhcp-pool-prefix-length'] %>',
+ '<%= v4request['v4-dhcp-relay-gateway-address'] %>');">v4-dhcp-pools</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof v4request['excluded-v4-address'] != 'undefined' )
+ { %>
+ <% var excluded_v4_address_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v4_dhcp_pools_node %>">
+ <td>exluded-v4-address</td>
+ </tr>
+ <% i++; %>
+
+ <% v4request['excluded-v4-addresses'].forEach(function(ex_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= excluded_v4_address_node %>">
+ <td>
+ <a href="javascript:excluded_v4_address(
+ '<%= svc_instance_id %>',
+ '<%= ex_request['excluded-v4-address'] %>');">excluded-v4-address</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% }); %>
+ <% } %>
+
+ <% if ( typeof request['dhcp']['excluded-v4-dhcp-addresses-from-default-pool'] != 'undefined' )
+ { %>
+ <% var exc_v4_address_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= dhcp_node %>">
+ <td>excluded-v4-dhcp-addresses-from-default-pool</td>
+ </tr>
+ <% i++; %>
+
+ <% request['dhcp']['excluded-v4-dhcp-addresses-from-default-pool'].forEach(function(ex_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= exc_v4_address_node %>">
+ <td>
+ <a href="javascript:excluded_v4_addresses_from_default_pool(
+ '<%= svc_instance_id %>',
+ '<%= ex_request['excluded-v4-address'] %>');">excluded-v4-dhcp-addresses-from-default-pool</a>
+ </td>
+ </tr>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% if ( typeof request['dhcp']['v6-dhcp-pools'] != 'undefined' )
+ { %>
+ <% var v6_dhcp_pools_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= dhcp_node %>">
+ <td>v6-dhcp-pool</td>
+ </tr>
+ <% i++; %>
+
+ <% request['dhcp']['v6-dhcp-pools'].forEach(function(v6request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v6_dhcp_pools_node %>">
+ <td>
+ <a href="javascript:v6_dhcp_pools(
+ '<%= svc_instance_id %>',
+ '<%= v6request['v6-dhcp-relay-next-hop-address'] %>',
+ '<%= v6request['v6-dhcp-pool-prefix'] %>',
+ '<%= v6request['v6-dhcp-pool-prefix-length'] %>',
+ '<%= v6request['v6-dhcp-relay-gateway-address'] %>');">v6-dhcp-pools</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof v6request['excluded-v6-addresses'] != 'undefined' )
+ { %>
+ <% var excluded_v6_address_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v6_dhcp_pools_node %>">
+ <td>exluded-v6-address</td>
+ </tr>
+ <% i++; %>
+
+ <% v6request['excluded-v6-addresses'].forEach(function(ex_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= excluded_v6_address_node %>">
+ <td>
+ <a href="javascript:excluded_v6_addresses(
+ '<%= svc_instance_id %>',
+ '<%= ex_request['excluded-v6-address'] %>');">excluded-v6-address</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% }); %>
+ <% } %>
+
+ <% if ( typeof request['dhcp']['excluded-v6-dhcp-addresses-from-default-pool'] != 'undefined' )
+ { %>
+ <% var exc_v6_address_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= dhcp_node %>">
+ <td>excluded-v6-dhcp-addresses-from-default-pool</td>
+ </tr>
+ <% i++; %>
+
+ <% request['dhcp']['excluded-v6-dhcp-addresses-from-default-pool'].forEach(function(ex_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= exc_v6_address_node %>">
+ <td>
+ <a href="javascript:excluded_v6_addresses_from_default_pool(
+ '<%= svc_instance_id %>',
+ '<%= ex_request['excluded-v6-address'] %>');">excluded-v6-dhcp-addresses-from-default-pool</a>
+ </td>
+ </tr>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% } %>
+ <% if ( typeof request['firewall-lite'] != 'undefined' )
+ { %>
+ <% var firewall_lite_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= vr_lan_interface_node %>">
+ <td> firewall-lite</td>
+ </tr>
+ <% i++; %>
+
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= firewall_lite_node %>">
+ <td>
+ <a href="javascript:firewall_lite(
+ '<%= svc_instance_id %>',
+ '<%= vr_designation %>',
+ '<%= request['firewall-lite']['stateful-firewall-lite-v6-enabled'] %>',
+ '<%= request['firewall-lite']['stateful-firewall-lite-v4-enabled'] %>');">firewall-lite</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof request['firewall-lite']['v6-firewall-packet-filters'] != 'undefined' )
+ { %>
+ <% var v6_firewall_packet_filters_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= firewall_lite_node %>">
+ <td>v6_firewall_packet_filters</td>
+ </tr>
+ <% i++; %>
+
+ <% request['firewall-lite']['v6-firewall-packet-filters'].forEach(function(v6request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v6_firewall_packet_filters_node %>">
+ <td>
+ <a href="javascript:v6_firewall_packet_filters(
+ '<%= svc_instance_id %>',
+ '<%= v6request['v6-firewall-prefix'] %>',
+ '<%= v6request['v6-firewall-prefix-length'] %>',
+ '<%= v6request['allow-icmp-ping'] %>');">v6-firewall-packet-filters</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof v6request['udp-port-list'] != 'undefined' )
+ { %>
+ <% var udp_port_list_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v6_firewall_packet_filters_node %>">
+ <td>udp_port_list</td>
+ </tr>
+ <% i++; %>
+
+ <% v6request['udp-port-list'].forEach(function(udp_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= udp_port_list_node %>">
+ <td>
+ <a href="javascript:udp_port_list(
+ '<%= svc_instance_id %>',
+ '<%= udp_request['port-number'] %>');">udp-port-list</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% if ( typeof v6request['tcp-port-list'] != 'undefined' )
+ { %>
+ <% var tcp_port_list_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v6_firewall_packet_filters_node %>">
+ <td>tcp_port_list</td>
+ </tr>
+ <% i++; %>
+ <% v6request['tcp-port-list'].forEach(function(tcp_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= tcp_port_list_node %>">
+ <td>
+ <a href="javascript:tcp_port_list(
+ '<%= svc_instance_id %>',
+ '<%= tcp_request['port-number'] %>');">tcp-port-list</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% }); %>
+
+ <% } %>
+ <% if ( typeof request['firewall-lite']['v4-firewall-packet-filters'] != 'undefined' )
+ { %>
+ <% var v4_firewall_packet_filters_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= firewall_lite_node %>">
+ <td>v4_firewall_packet_filters</td>
+ </tr>
+ <% i++; %>
+
+ <% request['firewall-lite']['v4-firewall-packet-filters'].forEach(function(v4request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v4_firewall_packet_filters_node %>">
+ <td>
+ <a href="javascript:v4_firewall_packet_filters(
+ '<%= svc_instance_id %>',
+ '<%= v4request['v4-firewall-prefix'] %>',
+ '<%= v4request['v4-firewall-prefix-length'] %>',
+ '<%= v4request['allow-icmp-ping'] %>');">v4-firewall-packet-filters</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof v4request['udp-port-list'] != 'undefined' )
+ { %>
+ <% var udp_port_list_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v4_firewall_packet_filters_node %>">
+ <td>udp_port_list</td>
+ </tr>
+ <% i++; %>
+
+ <% v4request['udp-port-list'].forEach(function(udp_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= udp_port_list_node %>">
+ <td>
+ <a href="javascript:udp_port_list(
+ '<%= svc_instance_id %>',
+ '<%= udp_request['port-number'] %>');">udp-port-list</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% if ( typeof v4request['tcp-port-list'] != 'undefined' )
+ { %>
+ <% var tcp_port_list_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v4_firewall_packet_filters_node %>">
+ <td>tcp_port_list</td>
+ </tr>
+ <% i++; %>
+ <% v4request['tcp-port-list'].forEach(function(tcp_request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= tcp_port_list_node %>">
+ <td>
+ <a href="javascript:tcp_port_list(
+ '<%= svc_instance_id %>',
+ '<%= tcp_request['port-number'] %>');">tcp-port-list</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% }); %>
+
+ <% } %>
+
+ <% } %>
+
+
+ <% if ( typeof request['v4-public-lan-prefixes'] != 'undefined')
+ { %>
+ <% var v4_public_lan_prefixes_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= vr_lan_interface_node %>">
+ <td> v4-public-lan-prefixes</td>
+ </tr>
+ <% i++; %>
+
+ <% if (typeof request['v4-public-lan-prefixes']['t-provided-v4-lan-public-prefixes'] != 'undefined')
+ { %>
+
+ <% request['v4-public-lan-prefixes']['t-provided-v4-lan-public-prefixes'].forEach(function(trequest)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v4_public_lan_prefixes_node %>">
+ <td>
+ <a href="javascript:t_provided_v4_prefixes(
+ '<%= svc_instance_id %>',
+ '<%= trequest['request-index'] %>',
+ '<%= trequest['v4-lan-public-prefix-length'] %>',
+ '<%= trequest['v4-lan-public-prefix'] %>');">t-provided-v4-lan-public-prefixes</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% } %>
+ <% if ( typeof request['v6-public-lan-prefixes'] != 'undefined')
+ { %>
+ <% var v6_public_lan_prefixes_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= vr_lan_interface_node %>">
+ <td> v6-public-lan-prefixes</td>
+ </tr>
+ <% i++; %>
+
+ <% if (typeof request['v6-public-lan-prefixes']['t-provided-v6-lan-public-prefixes'] != 'undefined')
+ { %>
+
+ <% request['v6-public-lan-prefixes']['t-provided-v6-lan-public-prefixes'].forEach(function(trequest)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v6_public_lan_prefixes_node %>">
+ <td>
+ <a href="javascript:t_provided_v6_prefixes(
+ '<%= svc_instance_id %>',
+ '<%= trequest['request-index'] %>',
+ '<%= trequest['v6-lan-public-prefix-length'] %>',
+ '<%= trequest['v6-lan-public-prefix'] %>');">t-provided-v6-lan-public-prefixes</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% } %>
+
+ <% if ( typeof request['nat'] != 'undefined' )
+ { %>
+ <% var nat_node = i %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= vr_lan_interface_node %>">
+ <td> nat</td>
+ </tr>
+ <% i++; %>
+
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= nat_node %>">
+ <td>
+ <a href="javascript:nat(
+ '<%= svc_instance_id %>',
+ '<%= request['nat']['v4-nat-enabled'] %>');">nat</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof request['nat']['v4-nat-mapping-entries'] != 'undefined' )
+ {
+ var nat_mapping_node = i %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= nat_node %>">
+ <td>v4-nat-mapping-entries</td>
+ </tr>
+ <% i++; %>
+
+ <% request['nat']['v4-nat-mapping-entries'].forEach(function(trequest)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= nat_mapping_node %>">
+ <td>
+ <a href="javascript:v4_nat_mapping_entries(
+ '<%= svc_instance_id %>',
+ '<%= trequest['v4-nat-external'] %>',
+ '<%= trequest['v4-nat-next-hop-address'] %>',
+ '<%= trequest['v4-nat-internal'] %>');">v4-nat-mapping-entries</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% } %>
+
+ <% if ( typeof request['static-routes'] != 'undefined' )
+ { %>
+ <% var static_route_node = i; %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= vr_lan_interface_node %>">
+ <td> static-routes</td>
+ </tr>
+ <% i++; %>
+ <% if ( typeof request['static-routes']['v6-static-routes'] != 'undefined' )
+ { %>
+ <% v6_static_route = i %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= static_route_node %>">
+ <td>v6-static-routes</td>
+ </tr>
+ <% i++; %>
+
+ <% request['static-routes']['v6-static-routes'].forEach(function(strequest){ %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v6_static_route %>">
+ <td>
+ <a href="javascript:v6_static_routes(
+ '<%= svc_instance_id %>',
+ '<%= strequest['v6-static-route-prefix'] %>',
+ '<%= strequest['v6-next-hop-address'] %>',
+ '<%= strequest['v6-static-route-prefix-length'] %>');">v6-static-routes</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% if ( typeof request['static-routes']['v4-static-routes'] != 'undefined' )
+ { %>
+ <% v4_static_route = i %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= static_route_node %>">
+ <td> v4-static-routes</td>
+ </tr>
+ <% i++; %>
+ <% request['static-routes']['v4-static-routes'].forEach(function(v4request)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= v4_static_route %>">
+ <td>
+ <a href="javascript:v4_static_routes(
+ '<%= svc_instance_id %>',
+ '<%= v4request['v4-static-route-prefix'] %>',
+ '<%= v4request['v4-next-hop-address'] %>',
+ '<%= v4request['v4-static-route-prefix-length'] %>');">v4-static-routes</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% } %>
+
+ <% if ( typeof request['pat'] != 'undefined' )
+ { %>
+ <% var pat_node = i %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= vr_lan_interface_node %>">
+ <td> pat</td>
+ </tr>
+ <% i++; %>
+
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= pat_node %>">
+ <td>
+ <a href="javascript:pat(
+ '<%= svc_instance_id %>',
+ '<%= request['pat']['v4-pat-default-pool-prefix-length'] %>',
+ '<%= request['pat']['use-v4-default-pool'] %>',
+ '<%= request['pat']['v4-pat-enabled'] %>',
+ '<%= request['pat']['v4-pat-default-pool-prefix'] %>');">pat</a>
+ </td>
+ </tr>
+ <% i++; %>
+
+ <% if ( typeof request['pat']['v4-pat-pools'] != 'undefined' )
+ { %>
+ <% var pat_pools_node = i %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= pat_node %>">
+ <td> v4-pat-pools</td>
+ </tr>
+ <% i++; %>
+
+ <% request['pat']['v4-pat-pools'].forEach(function(trequest)
+ { %>
+ <tr class="treegrid-<%= i %> treegrid-parent-<%= pat_pools_node %>">
+ <td>
+ <a href="javascript:pat_pools(
+ '<%= svc_instance_id %>',
+ '<%= trequest['v4-pat-pool-next-hop-address'] %>',
+ '<%= trequest['v4-pat-pool-prefix-length'] %>',
+ '<%= trequest['v4-pat-pool-prefix'] %>');">v4-pat-pools</a>
+ </td>
+ </tr>
+ <% i++; %>
+ <% }); %>
+ <% } %>
+ <% } %>
+
+
+
+
+
+
+ <% }); %>
+ <% } %>
+ <% } %>
+
+ <% } %>
+ <% }); %>
+</table>
+</div>
+</div>
+
+<div class="container-fluid">
+ <div class="row">
+ <div class="col-md-1 text-left">
+ <p> Page <%= pageInfo.currentPage %> of <%= pageInfo.pageCount %></p>
+ </div>
+ <div class="col-md-11 text-left">
+ <% if (pageInfo.pageCount > 1) { %>
+ <ul class="pagination">
+ <% if (pageInfo.currentPage > 1) { %>
+ <li><a href="/odl/pageWklst?page=1">«</a></li>
+ <% } %>
+ <% var i = 1;
+ if (pageInfo.currentPage > 10) {
+ i = +pageInfo.currentPage - 9;
+ } %>
+ <% if (i !== 1) { %>
+ <!--<li class="disabled"><a href="#">...</a></li>-->
+ <% } %>
+ <% for (i; i<=pageInfo.pageCount; i++) { %>
+ <% if (pageInfo.currentPage == i) { %>
+ <li class="active"><span><%= i %> <span class="sr-only">(current)</span></span></li>
+ <% } else { %>
+ <li><a href="/odl/pageWklst?page=<%= i %>"><%= i %></a></li>
+ <% } %>
+ <% if (i == (+pageInfo.currentPage + 9)) { %>
+ <!--<li class="disabled"><a href="#">...</a></li>-->
+ <% break; } %>
+ <% } %>
+ <% if (pageInfo.currentPage != pageInfo.pageCount) { %>
+ <li><a href="/odl/pageWklst?page=<%= pageInfo.pageCount %>">»</a></li>
+ <% } %>
+ </ul>
+ <% } %>
+ </div><!-- col-md-10 -->
+ </div><!-- row -->
+ </div><!-- container-fluid -->
+
+
+
+<% include ../partials/vnf_vm_information %>
+<% include ../partials/network_connections %>
+<% include ../partials/l3sdn_vnf_fields %>
+<% include ../partials/l3_interface_ipv4_address_list %>
+<% include ../partials/l3_interface_ipv6_address_list %>
+<% include ../partials/vlan %>
+<% include ../partials/interface %>
+<% include ../partials/ipv6_infrastructure_static_route %>
+<% include ../partials/ipv4_infrastructure_static_route %>
+<% include ../partials/equipment %>
+<% include ../partials/svc_config_additional_data %>
+<% include ../partials/feature_list %>
+<% include ../partials/pat %>
+<% include ../partials/pat_pools %>
+<% include ../partials/v6_static_routes %>
+<% include ../partials/v4_static_routes %>
+<% include ../partials/nat %>
+<% include ../partials/v4_nat_mapping_entries %>
+<% include ../partials/t_provided_v4_lan_public_prefixes %>
+<% include ../partials/v4_firewall_packet_filters %>
+<% include ../partials/udp_port_list %>
+<% include ../partials/tcp_port_list %>
+<% include ../partials/v6_firewall_packet_filters %>
+<% include ../partials/firewall_lite %>
+<% include ../partials/excluded_v6_addresses %>
+<% include ../partials/excluded_v6_address_from_default_pool %>
+<% include ../partials/v6_dhcp_pools %>
+<% include ../partials/excluded_v4_address_from_default_pool %>
+<% include ../partials/excluded_v4_address %>
+<% include ../partials/v4_dhcp_pools %>
+<% include ../partials/dhcp %>
+<% include ../partials/routing_protocol %>
+<% include ../partials/t_provided_v6_lan_public_prefixes %>
+<% include ../partials/vr_lan_interface %>
+<% include ../partials/service_information_modal %>
+<% include ../partials/l2_homing_information_modal %>
+<% include ../partials/sdnc_request_header_modal %>
+<% include ../partials/request_information_modal %>
+<% include ../partials/svc_topology_additional_data_modal %>
+<% include ../partials/service_status_modal %>
+<% include ../partials/oper_status_modal %>
+<% include ../partials/internet_evc_modal %>
+
+<footer>
+<% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+
+
+function vnf_vm_information(vserver_type,vserver_name)
+{
+ var lvalue = document.getElementById('vserver_type');
+ if( vserver_type != 'undefined' ){
+ lvalue.value=vserver_type;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('vserver_name');
+ if( vserver_name != 'undefined' ){
+ lvalue.value=vserver_name;
+ } else {
+ lvalue.value='';
+ }
+ $('#vnf-vm-information-modal').modal('show');
+}
+function network_connections (stack_id,net_status,connection_type,provider_network,interface_id,vlan,port_group_name,neutron_network_id)
+{
+ var lvalue = document.getElementById('stack_id');
+ if( stack_id != 'undefined' ){
+ lvalue.value=stack_id;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('net_status');
+ if( net_status != 'undefined' ){
+ lvalue.value=net_status;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('connection_type');
+ if( connection_type != 'undefined' ){
+ lvalue.value=connection_type;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('provider_network');
+ if( provider_network != 'undefined' ){
+ lvalue.value=provider_network;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('interface_id');
+ if( interface_id != 'undefined' ){
+ lvalue.value=interface_id;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('vlan');
+ if( vlan != 'undefined' ){
+ lvalue.value=vlan;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('port_group_name');
+ if( port_group_name != 'undefined' ){
+ lvalue.value=port_group_name;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('neutron_network_id');
+ if( neutron_network_id != 'undefined' ){
+ lvalue.value=neutron_network_id;
+ } else {
+ lvalue.value='';
+ }
+ $('#network-connections-modal').modal('show');
+}
+
+function l3sdn_vnf_fields(availability_zone,vnf_stack_id,vnf_name,vnf_name2,vnf_type,vnf_status,vnf_id,oam_network_name,aic_site_id)
+{
+ var lvalue = document.getElementById('availability_zone');
+ if( availability_zone != 'undefined' ){
+ lvalue.value=availability_zone;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('vnf_stack_id');
+ if( vnf_stack_id != 'undefined' ){
+ lvalue.value=vnf_stack_id;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('vnf_name');
+ if( vnf_name != 'undefined' ){
+ lvalue.value=vnf_name;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('vnf_name2');
+ if( vnf_name2 != 'undefined' ){
+ lvalue.value=vnf_name2;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('vnf_type');
+ if( vnf_type != 'undefined' ){
+ lvalue.value=vnf_type;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('vnf_status');
+ if( vnf_status != 'undefined' ){
+ lvalue.value=vnf_status;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('vnf_id');
+ if( vnf_id != 'undefined' ){
+ lvalue.value=vnf_id;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('oam_network_name');
+ if( oam_network_name != 'undefined' ){
+ lvalue.value=oam_network_name;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('aic_site_id');
+ if( aic_site_id != 'undefined' ){
+ lvalue.value=aic_site_id;
+ } else {
+ lvalue.value='';
+ }
+ $('#l3sdn-vnf-fields-modal').modal('show');
+}
+function l3_interface_ipv4_address_list(l3_interface_ipv4_address,l3_interface_ipv4_prefix_length)
+{
+ var lvalue = document.getElementById('l3_interface_ipv4_address');
+ if( l3_interface_ipv4_address != 'undefined' ){
+ lvalue.value=l3_interface_ipv4_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('l3_interface_ipv4_prefix_length');
+ if( l3_interface_ipv4_prefix_length != 'undefined' ){
+ lvalue.value=l3_interface_ipv4_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ $('#l3-interface-ipv4-address-list-modal').modal('show');
+}
+
+function l3_interface_ipv6_address_list(l3_interface_ipv6_address,l3_interface_ipv6_prefix_length)
+{
+ var lvalue = document.getElementById('l3_interface_ipv6_address');
+ if( l3_interface_ipv6_address != 'undefined' ){
+ lvalue.value=l3_interface_ipv6_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('l3_interface_ipv6_prefix_length');
+ if( l3_interface_ipv6_prefix_length != 'undefined' ){
+ lvalue.value=l3_interface_ipv6_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ $('#l3-interface-ipv6-address-list-modal').modal('show');
+}
+
+
+function vlan(vlan_interface,vlan_id_inner,vlan_id_outer)
+{
+ var lvalue = document.getElementById('vlan_interface');
+ if( vlan_interface != 'undefined' ){
+ lvalue.value=vlan_interface;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('vlan_id_inner');
+ if( vlan_id_inner != 'undefined' ){
+ lvalue.value=vlan_id_inner;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('vlan_id_outer');
+ if( vlan_id_outer != 'undefined' ){
+ lvalue.value=vlan_id_outer;
+ } else {
+ lvalue.value='';
+ }
+ $('#vlan-modal').modal('show');
+}
+
+function interface(interface_name,interface_role)
+{
+ var lvalue = document.getElementById('interface_name');
+ if( interface_name != 'undefined' ){
+ lvalue.value=interface_name;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('interface_role');
+ if( interface_role != 'undefined' ){
+ lvalue.value=interface_role;
+ } else {
+ lvalue.value='';
+ }
+ $('#interface-modal').modal('show');
+}
+
+function ipv4_infrastructure_static_route(ipv4_outgoing_interface,ipv4_next_hop_address,ipv4_dest_prefix,ipv4_dest_prefix_length)
+{
+ var lvalue = document.getElementById('ipv4_outgoing_interface');
+ if( ipv4_outgoing_interface != 'undefined' ){
+ lvalue.value=ipv4_outgoing_interface;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('ipv4_next_hop_address');
+ if( ipv4_next_hop_address != 'undefined' ){
+ lvalue.value=ipv4_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('ipv4_dest_prefix');
+ if( ipv4_dest_prefix != 'undefined' ){
+ lvalue.value=ipv4_dest_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('ipv4_dest_prefix_length');
+ if( ipv4_dest_prefix_length != 'undefined' ){
+ lvalue.value=ipv4_dest_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ $('#ipv4-infrastructure-static-route-modal').modal('show');
+}
+
+function ipv6_infrastructure_static_route(ipv6_outgoing_interface,ipv6_next_hop_address,ipv6_dest_prefix,ipv6_dest_prefix_length)
+{
+ var lvalue = document.getElementById('ipv6_outgoing_interface');
+ if( ipv6_outgoing_interface != 'undefined' ){
+ lvalue.value=ipv6_outgoing_interface;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('ipv6_next_hop_address');
+ if( ipv6_next_hop_address != 'undefined' ){
+ lvalue.value=ipv6_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('ipv6_dest_prefix');
+ if( ipv6_dest_prefix != 'undefined' ){
+ lvalue.value=ipv6_dest_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('ipv6_dest_prefix_length');
+ if( ipv6_dest_prefix_length != 'undefined' ){
+ lvalue.value=ipv6_dest_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ $('#ipv6-infrastructure-static-route-modal').modal('show');
+}
+
+function equipment(equipment_role,ipv4_oam_address,ipv4_oam_gateway_address_prefix_length,ptnii_name,v4_loopback0_ip_address,ipv4_oam_gateway_address)
+{
+ var lvalue = document.getElementById('equipment_role');
+ if( equipment_role != 'undefined' ){
+ lvalue.value=equipment_role;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('ipv4_oam_address');
+ if( ipv4_oam_address != 'undefined' ){
+ lvalue.value=ipv4_oam_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('ipv4_oam_gateway_address_prefix_length');
+ if( ipv4_oam_gateway_address_prefix_length != 'undefined' ){
+ lvalue.value=ipv4_oam_gateway_address_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('ptnii_name');
+ if( ptnii_name != 'undefined' ){
+ lvalue.value=ptnii_name;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_loopback0_ip_address');
+ if( v4_loopback0_ip_address != 'undefined' ){
+ lvalue.value=v4_loopback0_ip_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('ipv4_oam_gateway_address');
+ if( ipv4_oam_gateway_address != 'undefined' ){
+ lvalue.value=ipv4_oam_gateway_address;
+ } else {
+ lvalue.value='';
+ }
+ $('#equipment-modal').modal('show');
+}
+function svc_config_additional_data(management_ip)
+{
+ var lvalue = document.getElementById('management_ip');
+ if( management_ip != 'undefined' ){
+ lvalue.value=management_ip;
+ } else {
+ lvalue.value='';
+ }
+ $('#svc-config-additional-data-modal').modal('show');
+}
+function feature_list(feature_instance_id,feature_instance_xpath,feature_sub_type,feature_type)
+{
+ var lvalue = document.getElementById('feature_instance_id');
+ if( feature_instance_id != 'undefined' ){
+ lvalue.value=feature_instance_id;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('feature_instance_xpath');
+ if( feature_instance_xpath != 'undefined' ){
+ lvalue.value=feature_instance_xpath;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('feature_sub_type');
+ if( feature_sub_type != 'undefined' ){
+ lvalue.value=feature_sub_type;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('feature_type');
+ if( feature_type != 'undefined' ){
+ lvalue.value=feature_type;
+ } else {
+ lvalue.value='';
+ }
+ $('#feature-list-modal').modal('show');
+}
+function pat_pools(svc_instance_id,v4_pat_pool_next_hop_address,v4_pat_pool_prefix_length,v4_pat_pool_prefix)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_pat_pool_next_hop_address');
+ if( v4_pat_pool_next_hop_address != 'undefined' ){
+ lvalue.value=v4_pat_pool_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_pat_pool_prefix_length');
+ if( v4_pat_pool_prefix_length != 'undefined' ){
+ lvalue.value=v4_pat_pool_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_pat_pool_prefix');
+ if( v4_pat_pool_prefix != 'undefined' ){
+ lvalue.value=v4_pat_pool_prefix;
+ } else {
+ lvalue.value='';
+ }
+ $('#pat-pools-modal').modal('show');
+}
+function pat(svc_instance_id,v4_pat_default_pool_prefix_length,use_v4_default_pool,v4_pat_enabled,v4_pat_default_pool_prefix)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_pat_default_pool_prefix_length');
+ if( v4_pat_default_pool_prefix_length != 'undefined' ){
+ lvalue.value=v4_pat_default_pool_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+
+ lvalue = document.getElementById('use_v4_default_pool');
+ if( use_v4_default_pool != 'undefined' ){
+ lvalue.value = use_v4_default_pool;
+ } else {
+ lvalue.value = '';
+ }
+
+ lvalue = document.getElementById('v4_pat_enabled');
+ if( v4_pat_enabled != 'undefined' ){
+ lvalue.value = v4_pat_enabled;
+ } else {
+ lvalue.value = '';
+ }
+
+ lvalue = document.getElementById('v4_pat_default_pool_prefix');
+ if( v4_pat_default_pool_prefix != 'undefined' ){
+ lvalue.value = v4_pat_default_pool_prefix;
+ } else {
+ lvalue.value = '';
+ }
+ $('#pat-modal').modal('show');
+}
+
+function v4_static_routes(svc_instance_id,v4_static_route_prefix,static_v4_next_hop_address,v4_static_route_prefix_length)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_static_route_prefix');
+ if( v4_static_route_prefix != 'undefined' ){
+ lvalue.value=v4_static_route_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('static_v4_next_hop_address');
+ if( static_v4_next_hop_address != 'undefined' ){
+ lvalue.value=static_v4_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_static_route_prefix_length');
+ if( v4_static_route_prefix_length != 'undefined' ){
+ lvalue.value=v4_static_route_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ $('#v4-static-routes-modal').modal('show');
+}
+
+function v6_static_routes(svc_instance_id,v6_static_route_prefix,static_v6_next_hop_address,v6_static_route_prefix_length)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v6_static_route_prefix');
+ if( v6_static_route_prefix != 'undefined' ){
+ lvalue.value=v6_static_route_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('static_v6_next_hop_address');
+ if( static_v6_next_hop_address != 'undefined' ){
+ lvalue.value=static_v6_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_static_route_prefix_length');
+ if( v6_static_route_prefix_length != 'undefined' ){
+ lvalue.value=v6_static_route_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ $('#v6-static-routes-modal').modal('show');
+}
+
+function nat(svc_instance_id,v4_nat_enabled) {
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_nat_enabled');
+ if( v4_nat_enabled != 'undefined' ){
+ lvalue.value=v4_nat_enabled;
+ } else {
+ lvalue.value='';
+ }
+ $('#nat-modal').modal('show');
+}
+function v4_nat_mapping_entries(svc_instance_id,v4_nat_external,v4_nat_next_hop_address,v4_nat_internal)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_nat_external');
+ if( v4_nat_external != 'undefined' ){
+ lvalue.value=v4_nat_external;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_nat_next_hop_address');
+ if( v4_nat_next_hop_address != 'undefined' ){
+ lvalue.value=v4_nat_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_nat_internal');
+ if( v4_nat_internal != 'undefined' ){
+ lvalue.value=v4_nat_internal;
+ } else {
+ lvalue.value='';
+ }
+ $('#v4-nat-mapping-entries-modal').modal('show');
+}
+
+function v4_firewall_packet_filters(svc_instance_id,v4_firewall_prefix,v4_firewall_prefix_length,v4_allow_icmp_ping)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_firewall_prefix');
+ if( v4_firewall_prefix != 'undefined' ){
+ lvalue.value=v4_firewall_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_firewall_prefix_length');
+ if( v4_firewall_prefix_length != 'undefined' ){
+ lvalue.value=v4_firewall_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_allow_icmp_ping');
+ if( v4_allow_icmp_ping != 'undefined' ){
+ lvalue.value=v4_allow_icmp_ping;
+ } else {
+ lvalue.value='';
+ }
+ $('#v4-firewall-packet-filters-modal').modal('show');
+}
+
+function v6_firewall_packet_filters(svc_instance_id,v6_firewall_prefix,v6_firewall_prefix_length,v6_allow_icmp_ping)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v6_firewall_prefix');
+ if( v6_firewall_prefix != 'undefined' ){
+ lvalue.value=v6_firewall_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_firewall_prefix_length');
+ if( v6_firewall_prefix_length != 'undefined' ){
+ lvalue.value=v6_firewall_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_allow_icmp_ping');
+ if( v6_allow_icmp_ping != 'undefined' ){
+ lvalue.value=v6_allow_icmp_ping;
+ } else {
+ lvalue.value='';
+ }
+ $('#v6-firewall-packet-filters-modal').modal('show');
+}
+
+function tcp_port_list(svc_instance_id,tcp_port_number)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('tcp_port_number');
+ if( tcp_port_number != 'undefined' ){
+ lvalue.value=tcp_port_number;
+ } else {
+ lvalue.value='';
+ }
+ $('#tcp-port-list-modal').modal('show');
+}
+function udp_port_list(svc_instance_id,udp_port_number)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('udp_port_number');
+ if( udp_port_number != 'undefined' ){
+ lvalue.value=udp_port_number;
+ } else {
+ lvalue.value='';
+ }
+ $('#udp-port-list-modal').modal('show');
+}
+
+function firewall_lite(svc_instance_id,firewall_lite_vr_designation,stateful_firewall_lite_v4_enabled,stateful_firewall_lite_v6_enabled)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ document.getElementById('firewall_lite_vr_designation').value = firewall_lite_vr_designation;
+ var lvalue = document.getElementById('stateful_firewall_lite_v4_enabled');
+ if( stateful_firewall_lite_v4_enabled != 'undefined' ){
+ lvalue.value=stateful_firewall_lite_v4_enabled;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('stateful_firewall_lite_v6_enabled');
+ if( stateful_firewall_lite_v6_enabled != 'undefined' ){
+ lvalue.value=stateful_firewall_lite_v6_enabled;
+ } else {
+ lvalue.value='';
+ }
+ $('#firewall-lite-modal').modal('show');
+}
+
+function excluded_v6_addresses(svc_instance_id, excluded_v6_address)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('excluded_v6_address');
+ if( excluded_v6_address != 'undefined' ){
+ lvalue.value=excluded_v6_address;
+ } else {
+ lvalue.value='';
+ }
+ $('#excluded-v6-addresses-modal').modal('show');
+}
+
+
+function excluded_v6_addresses_from_default_pool(svc_instance_id, excluded_v6_address_from_default_pool)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('excluded_v6_address_from_default_pool');
+ if( excluded_v6_address_from_default_pool != 'undefined' ){
+ lvalue.value=excluded_v6_address_from_default_pool;
+ } else {
+ lvalue.value='';
+ }
+ $('#excluded-v6-address-from-default-pool-modal').modal('show');
+}
+
+
+function v6_dhcp_pools(svc_instance_id,v6_dhcp_relay_next_hop_address,v6_dhcp_pool_prefix,v6_dhcp_pool_prefix_length,v6_dhcp_relay_gateway_address)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v6_dhcp_relay_next_hop_address');
+ if( v6_dhcp_relay_next_hop_address != 'undefined' ){
+ lvalue.value=v6_dhcp_relay_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_dhcp_pool_prefix');
+ if( v6_dhcp_pool_prefix != 'undefined' ){
+ lvalue.value=v6_dhcp_pool_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_dhcp_pool_prefix_length');
+ if( v6_dhcp_pool_prefix_length != 'undefined' ){
+ lvalue.value=v6_dhcp_pool_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_dhcp_relay_gateway_address');
+ if( v6_dhcp_relay_gateway_address != 'undefined' ){
+ lvalue.value=v6_dhcp_relay_gateway_address;
+ } else {
+ lvalue.value='';
+ }
+ $('#v6-dhcp-pools-modal').modal('show');
+}
+
+function excluded_v4_addresses_from_default_pool(svc_instance_id, excluded_v4_address)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('excluded_v4_address_from_default_pool');
+ if( excluded_v4_address != 'undefined' ){
+ lvalue.value=excluded_v4_address;
+ } else {
+ lvalue.value='';
+ }
+ $('#excluded-v4-address-from-default-pool-modal').modal('show');
+}
+
+
+function exluded_v4_address(svc_instance_id, excluded_v4_address)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('excluded_v4_address');
+ if( excluded_v4_address != 'undefined' ){
+ lvalue.value=excluded_v4_address;
+ } else {
+ lvalue.value='';
+ }
+ $('#excluded-v4-address-modal').modal('show');
+}
+
+function v4_dhcp_pools(svc_instance_id,v4_dhcp_relay_next_hop_address,v4_dhcp_pool_prefix,v4_dhcp_pool_prefix_length,v4_dhcp_relay_gateway_address)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_dhcp_relay_next_hop_address');
+ if( v4_dhcp_relay_next_hop_address != 'undefined' ){
+ lvalue.value=v4_dhcp_relay_next_hop_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_dhcp_pool_prefix');
+ if( v4_dhcp_pool_prefix != 'undefined' ){
+ lvalue.value=v4_dhcp_pool_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_dhcp_pool_prefix_length');
+ if( v4_dhcp_pool_prefix_length != 'undefined' ){
+ lvalue.value=v4_dhcp_pool_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_dhcp_relay_gateway_address');
+ if( v4_dhcp_relay_gateway_address != 'undefined' ){
+ lvalue.value=v4_dhcp_relay_gateway_address;
+ } else {
+ lvalue.value='';
+ }
+ $('#v4-dhcp-pools-modal').modal('show');
+}
+
+function dhcp(svc_instance_id,use_v4_default_pool,use_v6_default_pool,v4_dhcp_server_enabled,v6_dhcp_server_enabled,v6_dhcp_default_pool_prefix,v6_dhcp_default_pool_prefix_length,v4_dhcp_default_pool_prefix,v4_dhcp_default_pool_prefix_length)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('use_v4_default_pool');
+ if( use_v4_default_pool != 'undefined' ){
+ lvalue.value=use_v4_default_pool;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('use_v6_default_pool');
+ if( use_v6_default_pool != 'undefined' ){
+ lvalue.value=use_v6_default_pool;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_dhcp_server_enabled');
+ if( v4_dhcp_server_enabled != 'undefined' ){
+ lvalue.value=v4_dhcp_server_enabled;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_dhcp_server_enabled');
+ if( v6_dhcp_server_enabled != 'undefined' ){
+ lvalue.value=v6_dhcp_server_enabled;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_dhcp_default_pool_prefix');
+ if( v6_dhcp_default_pool_prefix != 'undefined' ){
+ lvalue.value=v6_dhcp_default_pool_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_dhcp_default_pool_prefix_length');
+ if( v6_dhcp_default_pool_prefix_length != 'undefined' ){
+ lvalue.value=v6_dhcp_default_pool_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_dhcp_default_pool_prefix');
+ if( v4_dhcp_default_pool_prefix != 'undefined' ){
+ lvalue.value=v4_dhcp_default_pool_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_dhcp_default_pool_prefix_length');
+ if( v4_dhcp_default_pool_prefix_length != 'undefined' ){
+ lvalue.value=v4_dhcp_default_pool_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ $('#dhcp-modal').modal('show');
+}
+
+function routing_protocol(svc_instance_id, routing_protocol)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('routing_protocol');
+ if( routing_protocol != 'undefined' ){
+ lvalue.value=routing_protocol;
+ } else {
+ lvalue.value='';
+ }
+ $('#routing-protocol-modal').modal('show');
+}
+function t_provided_v4_prefixes(svc_instance_id,v4_request_index,v4_lan_public_prefix_length,v4_lan_public_prefix)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v4_request_index');
+ if( v4_request_index != 'undefined' ){
+ lvalue.value=v4_request_index;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_lan_public_prefix_length');
+ if( v4_lan_public_prefix_length != 'undefined' ){
+ lvalue.value=v4_lan_public_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_lan_public_prefix');
+ if( v4_lan_public_prefix != 'undefined' ){
+ lvalue.value=v4_lan_public_prefix;
+ } else {
+ lvalue.value='';
+ }
+ $('#t-provided-v4-lan-public-prefixes-modal').modal('show');
+}
+
+function t_provided_v6_prefixes(svc_instance_id,v6_request_index,v6_lan_public_prefix_length,v6_lan_public_prefix)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('v6_request_index');
+ if( v6_request_index != 'undefined' ){
+ lvalue.value=v6_request_index;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_lan_public_prefix_length');
+ if( v6_lan_public_prefix_length != 'undefined' ){
+ lvalue.value=v6_lan_public_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_lan_public_prefix');
+ if( v6_lan_public_prefix != 'undefined' ){
+ lvalue.value=v6_lan_public_prefix;
+ } else {
+ lvalue.value='';
+ }
+ $('#t-provided-v6-lan-public-prefixes-modal').modal('show');
+}
+
+function vrlan_interface(svc_instance_id,vr_designation,v6_vr_lan_prefix, v6_vr_lan_prefix_length, v6_vce_wan_address, v4_vr_lan_prefix_length, v4_vr_lan_prefix, t_defaulted_v6_vrlan,v4_vce_loopback_address)
+{
+ document.getElementById('svc_instance_id').value = svc_instance_id;
+ var lvalue = document.getElementById('vr_designation');
+ if( vr_designation != 'undefined' ){
+ lvalue.value=vr_designation;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_vr_lan_prefix');
+ if( v6_vr_lan_prefix != 'undefined' ){
+ lvalue.value=v6_vr_lan_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_vr_lan_prefix_length');
+ if( v6_vr_lan_prefix_length != 'undefined' ){
+ lvalue.value=v6_vr_lan_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v6_vce_wan_address');
+ if( v6_vce_wan_address != 'undefined' ){
+ lvalue.value=v6_vce_wan_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_vr_lan_prefix_length');
+ if( v4_vr_lan_prefix_length != 'undefined' ){
+ lvalue.value=v4_vr_lan_prefix_length;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_vr_lan_prefix');
+ if( v4_vr_lan_prefix != 'undefined' ){
+ lvalue.value=v4_vr_lan_prefix;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('v4_vce_loopback_address');
+ if( v4_vce_loopback_address != 'undefined' ){
+ lvalue.value=v4_vce_loopback_address;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('t_defaulted_v6_vrlan');
+ if( t_defaulted_v6_vrlan != 'undefined' ){
+ lvalue.value=t_defaulted_v6_vrlan;
+ } else {
+ lvalue.value='';
+ }
+ $('#vr-lan-interface-modal').modal('show');
+}
+
+function getvrlan(svc_instance_id)
+{
+location.assign("/odl/getvrlan?request=" + svc_instance_id);
+return;
+}
+
+function svcInfo(service_instance_id,subscriber_name,service_type){
+ var lvalue = document.getElementById('service_instance_id');
+ if( service_instance_id != 'undefined' ){
+ lvalue.value=service_instance_id;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('subscriber_name');
+ if( subscriber_name != 'undefined' ){
+ lvalue.value=subscriber_name;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('service_type');
+ if( service_type != 'undefined' ){
+ lvalue.value=service_type;
+ } else {
+ lvalue.value='';
+ }
+ $('#service-information-modal').modal('show');
+}
+function l2Homing(evc_name,preferred_aic_clli,topology){
+ var lvalue = document.getElementById('evc_name');
+ if( evc_name != 'undefined' ){
+ lvalue.value=evc_name;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('preferred_aic_clli');
+ if( preferred_aic_clli != 'undefined' ){
+ lvalue.value=preferred_aic_clli;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('topology');
+ if( topology != 'undefined' ){
+ lvalue.value=topology;
+ } else {
+ lvalue.value='';
+ }
+ $('#l2-homing-information-modal').modal('show');
+}
+function reqHeader(svc_notification_url, svc_request_id, svc_action){
+ var lvalue = document.getElementById('svc_notification_url');
+ if( svc_notification_url != 'undefined' ){
+ lvalue.value=svc_notification_url;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('svc_request_id');
+ if( svc_request_id != 'undefined' ){
+ lvalue.value=svc_request_id;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('svc_action');
+ if( svc_action != 'undefined' ){
+ lvalue.value=svc_action;
+ } else {
+ lvalue.value='';
+ }
+ $('#sdnc-request-header-modal').modal('show');
+}
+function reqInfo(notification_url, source, order_number, request_id, order_version,
+ request_action, request_sub_action){
+
+ var lvalue = document.getElementById('notification_url');
+ if( notification_url != 'undefined' ){
+ lvalue.value=notification_url;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('source');
+ if( source != 'undefined' ){
+ lvalue.value=source;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('order_number');
+ if( order_number != 'undefined' ){
+ lvalue.value=order_number;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('request_id');
+ if( request_id != 'undefined' ){
+ lvalue.value=request_id;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('order_version');
+ if( order_version != 'undefined' ){
+ lvalue.value=order_version;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('request_action');
+ if( request_action != 'undefined' ){
+ lvalue.value=request_action;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('request_sub_action');
+ if( request_sub_action != 'undefined' ){
+ lvalue.value=request_sub_action;
+ } else {
+ lvalue.value='';
+ }
+ $('#request-information-modal').modal('show');
+}
+function svcTopo(svc_vnf_type){
+ var lvalue = document.getElementById('svc_vnf_type');
+ if( svc_vnf_type != 'undefined' ){
+ lvalue.value=svc_vnf_type;
+ } else {
+ lvalue.value='';
+ }
+ $('#svc-topology-additional-data-modal').modal('show');
+}
+function operStatus(order_status, modify_timestamp,last_svc_request_id,last_sub_action,
+ t_defaulted_v6_vrlan, last_action, create_timestamp, maintenance_indicator, last_order_status){
+ var lvalue = document.getElementById('order_status');
+ if( order_status != 'undefined' ){
+ lvalue.value=order_status;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('modify_timestamp');
+ if( modify_timestamp != 'undefined' ){
+ lvalue.value=modify_timestamp;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('last_svc_request_id');
+ if( last_svc_request_id != 'undefined' ){
+ lvalue.value=last_svc_request_id;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('last_sub_action');
+ if( last_sub_action != 'undefined' ){
+ lvalue.value=last_sub_action;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('t_defaulted_v6_vrlan');
+ if( t_defaulted_v6_vrlan != 'undefined' ){
+ lvalue.value=t_defaulted_v6_vrlan;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('last_action');
+ if( last_action != 'undefined' ){
+ lvalue.value=last_action;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('create_timestamp');
+ if( create_timestamp != 'undefined' ){
+ lvalue.value=create_timestamp;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('maintenance_indicator');
+ if( maintenance_indicator != 'undefined' ){
+ lvalue.value=maintenance_indicator;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('last_order_status');
+ if( last_order_status != 'undefined' ){
+ lvalue.value=last_order_status;
+ } else {
+ lvalue.value='';
+ }
+ $('#oper-status-modal').modal('show');
+}
+function internetInfo(ip_version,internet_evc_speed_value,internet_evc_speed_units){
+
+ var lvalue = document.getElementById('ip_version');
+ if( ip_version != 'undefined' ){
+ lvalue.value=ip_version;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('internet_evc_speed_value');
+ if( internet_evc_speed_value != 'undefined' ){
+ lvalue.value=internet_evc_speed_value;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('internet_evc_speed_units');
+ if( internet_evc_speed_units != 'undefined' ){
+ lvalue.value=internet_evc_speed_units;
+ } else {
+ lvalue.value='';
+ }
+ $('#internet-evc-modal').modal('show');
+}
+function serviceStatus( rpc_name, final_indicator, request_status, rpc_action, l3sdn_action, l3sdn_subaction, response_message, response_code, response_timestamp){
+
+ var lvalue = document.getElementById('rpc_name');
+ if( rpc_name != 'undefined' ){
+ lvalue.value=rpc_name;
+ } else {
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('final_indicator');
+ if( final_indicator != 'undefined' ){
+ lvalue.value=final_indicator;
+ }else{
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('request_status');
+ if( request_status != 'undefined' ){
+ lvalue.value=request_status;
+ }else{
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('rpc_action');
+ if( rpc_action != 'undefined' ){
+ lvalue.value=rpc_action;
+ }else{
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('l3sdn_action');
+ if( l3sdn_action != 'undefined' ){
+ lvalue.value=l3sdn_action;
+ }else{
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('l3sdn_subaction');
+ if( l3sdn_subaction != 'undefined' ){
+ lvalue.value=l3sdn_subaction;
+ }else{
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('response_message');
+ if( response_message != 'undefined' ){
+ lvalue.value=response_message;
+ }else{
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('response_code');
+ if( lvalue != 'undefined' ){
+ response_code.value=response_code;
+ }else{
+ lvalue.value='';
+ }
+ lvalue = document.getElementById('response_timestamp');
+ if( response_timestamp != 'undefined' ){
+ lvalue.value=response_timestamp;
+ }else{
+ lvalue.value='';
+ }
+ $('#service-status-modal').modal('show');
+}
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/odl/view.ejs b/admportal/views/odl/view.ejs
new file mode 100644
index 0000000..34d7d93
--- /dev/null
+++ b/admportal/views/odl/view.ejs
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>SDN-C AdminPortal</title>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+</head>
+<body class="container">
+
+<div class="actions" style="padding:0px 25px;">
+<h2>Worklist Orders - Request ID: <%= response_obj.requests[0]['svc-request-id'] %></h2>
+</div>
+
+<div class="actions" style="padding:15px 0px;">
+ <button type="button" class="btn btn-primary aria-expanded="false"
+ onclick="viewVNF('/odl/getvnf?request=<%= response_obj.requests[0]['svc-request-id'] %>')">VNF</button>
+</div>
+
+
+<div class="table-responsive">
+ <table class="table table-bordered">
+ <colgroup>
+ <col class="col-xs-1">
+ <col class="col-xs-7">
+ </colgroup>
+ <tbody>
+ <tr>
+ <th scope="row">Instance ID</th>
+ <td><%= response_obj.requests[0]['svc-instance-id'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">Action</th>
+ <td><%= response_obj.requests[0]['svc-action'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">VNF Type</th>
+ <td><%= response_obj.requests[0]['svc-vnf-type'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">Notification URL</th>
+ <td><%= response_obj.requests[0]['svc-notification-url'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">VNF Name</th>
+ <td><%= response_obj.requests[0].vnf['vnf-name'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">VNF IPv4 Addr</th>
+ <td><%= response_obj.requests[0].vnf['vnf-oam-ipv4-addr'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">VNF Type</th>
+ <td><%= response_obj.requests[0].vnf['vnf-type'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">VNF Status</th>
+ <td><%= response_obj.requests[0].vnf['vnf-status'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">AIC Site ID</th>
+ <td><%= response_obj.requests[0].vnf['aic-site-id'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">Availability Zone</th>
+ <td><%= response_obj.requests[0].vnf['availability-zone'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">Network Connection(s)</th>
+ <td><pre><%= JSON.stringify(response_obj.requests[0].vnf['network-connections'],null,4) %></pre></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <% include ../partials/form %>
+
+ <footer>
+ <% include ../partials/footer %>
+ </footer>
+<script type="text/javascript">
+function viewVNF( requestid ) {
+alert(requestid);
+ location.assign(requestid);
+}
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/odl/viewvnf.ejs b/admportal/views/odl/viewvnf.ejs
new file mode 100644
index 0000000..dd2e05c
--- /dev/null
+++ b/admportal/views/odl/viewvnf.ejs
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>SDN-C AdminPortal</title>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+</head>
+
+<body class="container">
+
+<div class="actions" style="padding:0px 25px;">
+<h2>Worklist Orders - VNF - Request ID <%= request_id %></h2>
+</div>
+
+<div class="table-responsive">
+ <table class="table table-bordered">
+ <colgroup>
+ <col class="col-xs-1">
+ <col class="col-xs-7">
+ </colgroup>
+ <tbody>
+ <tr>
+ <th scope="row">VNF OAM IPv4 Addr</th>
+ <td><%= vnf_obj.vnf['vnf-oam-ipv4-addr'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">AIC Site ID</th>
+ <td><%= vnf_obj.vnf['aic-site-id'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">VNF Name</th>
+ <td><%= vnf_obj.vnf['vnf-name'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">VNF Type</th>
+ <td><%= vnf_obj.vnf['vnf-type'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">VNF Status</th>
+ <td><%= vnf_obj.vnf['vnf-status'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">Availability Zone</th>
+ <td><%= vnf_obj.vnf['availability-zone'] %></td>
+ </tr>
+ <tr>
+ <th scope="row">Network Connection(s)</th>
+ <td><pre><%= JSON.stringify(vnf_obj.vnf['network-connections'],null,4) %></pre></td>
+ </tr>
+
+ </tbody>
+ </table>
+ </div>
+
+ <footer>
+ <% include ../partials/footer %>
+ </footer>
+</body>
+</html>
+
diff --git a/admportal/views/pages/csplogout.ejs b/admportal/views/pages/csplogout.ejs
new file mode 100644
index 0000000..971feda
--- /dev/null
+++ b/admportal/views/pages/csplogout.ejs
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+
+<% if (header == 'gamma') { %>
+ <title>SDN-C AdminPortal</title>
+<% } else if(header == 'sdn-mlc'){ %>
+ <title>SDNC-MLC AdminPortal</title>
+<% } else { %>
+ <title>SDN-C AdminPortal</title>
+<% } %>
+
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+</head>
+<body class="container">
+
+<div class="actions" style="padding:0px 25px;">
+<% if (header == 'gamma') { %>
+ <h2>SDN-C Admin Portal</h2>
+<% } else if(header == 'sdn-mlc'){ %>
+ <h2>SDNC-MLC Admin Portal</h2>
+<% } else { %>
+ <h2>SDN-C Admin Portal</h2>
+<% } %>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'><%=result.msg %></div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'><%=result.msg %></div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<p><a href="/login">Click here to login</a></p>
+
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
diff --git a/admportal/views/pages/err.ejs b/admportal/views/pages/err.ejs
new file mode 100644
index 0000000..8ed51c6
--- /dev/null
+++ b/admportal/views/pages/err.ejs
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>SDN-C AdminPortal</title>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+</head>
+<body class="container">
+
+<div class="actions" style="padding:0px 25px;">
+<h2>System Error</h2>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'><%=result.msg %></div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'><%=result.msg %></div>
+ <% } %>
+ <% } %>
+<% } %>
+
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/pages/home.ejs b/admportal/views/pages/home.ejs
new file mode 100644
index 0000000..3eb4a0a
--- /dev/null
+++ b/admportal/views/pages/home.ejs
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>SDN-C AdminPortal</title>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+</head>
+<body class="container">
+
+<div class="actions" style="padding:0px 25px;">
+<h2>SDN-C Admin Portal</h2>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <pre class='alert alert-success' role='alert'><%=result.msg %></pre>
+ <% } else { %>
+ <pre class='alert alert-danger' role='danger'><%=result.msg %></pre>
+ <% } %>
+ <% } %>
+<% } %>
+
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/pages/home.ejs.orig b/admportal/views/pages/home.ejs.orig
new file mode 100644
index 0000000..353bc45
--- /dev/null
+++ b/admportal/views/pages/home.ejs.orig
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>SDN-C Admin Portal</title>
+ </head>
+ <body>
+ <h1>SDN-C Admin Portal</h1>
+ <p>Welcome to SDN-C Admin Portal</p>
+<% if ( typeof loggedInAdmin != 'undefined') { %>
+ <p><%= loggedInAdmin.firstName %></p>
+<% } %>
+<% if ( typeof result != 'undefined') { %>
+ <p><%= result %></p>
+<% } %>
+<% if ( typeof errmsg != 'undefined') { %>
+ <p><%= errmsg %></p>
+<% } %>
+
+ </body>
+</html>
diff --git a/admportal/views/pages/login.ejs b/admportal/views/pages/login.ejs
new file mode 100644
index 0000000..3a3e5e4
--- /dev/null
+++ b/admportal/views/pages/login.ejs
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
+ <title>AdminPortal</title>
+
+
+ <!-- Bootstrap core CSS -->
+ <% include ../partials/head %>
+
+ <!-- Custom styles for this template -->
+ <link rel="stylesheet" href="/stylesheets/signin.css">
+
+ </head>
+
+ <body>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'><%=result.msg %></div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'><%=result.msg %></div>
+ <% } %>
+ <% } %>
+<% } %>
+
+ <div class="container">
+
+ <form class="form-signin" method="POST" action="/formlogin">
+ <h3 class="form-signin-heading">AdminPortal Login</h3>
+
+ <input type="text" name="email" id="email" class="form-control" placeholder="Email" required>
+ <input type="password" name="password" id="password" class="form-control" placeholder="Password" required>
+
+ <button class="btn btn-lg btn-primary btn-block" type="submit">Submit</button>
+ </form>
+
+ </div> <!-- /container -->
+
+ </body>
+</html>
diff --git a/admportal/views/pages/setuplogin.ejs b/admportal/views/pages/setuplogin.ejs
new file mode 100644
index 0000000..ef75e84
--- /dev/null
+++ b/admportal/views/pages/setuplogin.ejs
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
+ <title>SDN-C AdminPortal</title>
+
+
+ <!-- Bootstrap core CSS -->
+ <% include ../partials/head %>
+
+ <!-- Custom styles for this template -->
+ <link rel="stylesheet" href="/stylesheets/signin.css">
+
+ </head>
+
+ <body>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'><%=result.msg %></div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'><%=result.msg %></div>
+ <% } %>
+ <% } %>
+<% } %>
+
+ <div class="container">
+
+ <form class="form-signin" method="POST" action="/formSetupLogin">
+ <h3 class="form-signin-heading">Enter Initial User Information</h3>
+
+ <label for="firstName" class="sr-only">First Name</label>
+ <input type="text" name="firstName" id="firstName" class="form-control" placeholder="First Name" required autofocus>
+
+ <label for="lastName" class="sr-only">Last Name</label>
+ <input type="text" name="lastName" id="lastName" class="form-control" placeholder="Last Name" required>
+
+ <label for="attuid" class="sr-only">ATTUID</label>
+ <input type="text" name="attuid" id="attuid" class="form-control" placeholder="ATTUID" required>
+
+ <button class="btn btn-lg btn-primary btn-block" type="submit">Setup Login</button>
+ </form>
+
+ </div> <!-- /container -->
+
+ </body>
+</html>
diff --git a/admportal/views/pages/signup.ejs b/admportal/views/pages/signup.ejs
new file mode 100644
index 0000000..03ac7bc
--- /dev/null
+++ b/admportal/views/pages/signup.ejs
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
+ <title>AdminPortal</title>
+
+
+ <!-- Bootstrap core CSS -->
+ <% include ../partials/head %>
+
+ <!-- Custom styles for this template -->
+ <link rel="stylesheet" href="/stylesheets/signin.css">
+
+ </head>
+
+ <body>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'><%=result.msg %></div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'><%=result.msg %></div>
+ <% } %>
+ <% } %>
+<% } %>
+
+ <div class="container">
+
+ <form class="form-signin" method="POST" action="/formSignUp">
+ <h3 class="form-signin-heading">AdminPortal Signup</h3>
+
+ <input type="email" name="nf_email" id="nf_email" class="form-control" placeholder="Email Address" required>
+ <input type="password" name="nf_password" id="nf_password" class="form-control" placeholder="Password" required>
+
+ <button class="btn btn-lg btn-primary btn-block" type="submit">Submit</button>
+ </form>
+
+ </div> <!-- /container -->
+
+ </body>
+</html>
diff --git a/admportal/views/pages/testdb.ejs b/admportal/views/pages/testdb.ejs
new file mode 100644
index 0000000..837b479
--- /dev/null
+++ b/admportal/views/pages/testdb.ejs
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>SDN-C AdminPortal</title>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/ro_header %>
+</head>
+<body class="container">
+
+<div class="actions" style="padding:0px 25px;">
+<h2>SDN-C AdminPortal Healthcheck</h2>
+</div>
+
+<% if (typeof osObj != 'undefined')
+{ %>
+ <pre>
+ Hostname : <%= osObj.hostname %>
+ Type : <%= osObj.type %>
+ Platform : <%= osObj.platform %>
+ Architecture : <%= osObj.arch %>
+ Release : <%= osObj.release %>
+ Uptime : <%= osObj.uptime %>
+ Total Memory : <%= osObj.totalmem %>
+
+ <%= osObj.dbhealth %>
+ </pre>
+<% } %>
+
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/partials/add_service_homing.ejs b/admportal/views/partials/add_service_homing.ejs
new file mode 100644
index 0000000..4a75125
--- /dev/null
+++ b/admportal/views/partials/add_service_homing.ejs
@@ -0,0 +1,52 @@
+ <div class="modal fade" id="add_service_homing" tabindex="-1" role="dialog"
+ aria-labelledby="add_service_homing_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add Service Homing</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/gamma/addServiceHoming" method="POST">
+ <div class="form-group">
+ <label for="nf_service_type">*Service Type</label>
+ <input readonly type="text" class="form-control" name="nf_service_type" id="nf_service_type" value="SDN-ETHERNET-INTERNET">
+ </div>
+ <div class="form-group">
+ <label for="nf_lata">*LATA</label>
+ <input type="text" class="form-control" name="nf_lata" id="nf_lata" maxlength="12" placeholder="int(3)">
+ </div>
+ <div class="form-group">
+ <label for="nf_hubbing_city_type">*Hubbing City Type</label>
+ <input maxlength="40" type="text" class="form-control" name="nf_hubbing_city_type" id="nf_hubbing_city_type" placeholder="varchar(40)">
+ </div>
+ <div class="form-group">
+ <label for="nf_latitude">Latitude</label>
+ <input type="text" class="form-control" name="nf_latitude" id="nf_latitude" maxlength="24" placeholder="float">
+ </div>
+ <div class="form-group">
+ <label for="nf_longitude">Longitude</label>
+ <input type="text" class="form-control" name="nf_longitude" id="nf_longitude" maxlength="24" placeholder="float">
+ </div>
+ <div class="form-group">
+ <label for="nf_primary_aic_site_name">*Primary Site Name</label>
+ <input maxlength="100" type="text" class="form-control" name="nf_primary_aic_site_name" id="nf_primary_aic_site_name" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <label for="nf_secondary_aic_site_name">Secondary Site Name</label>
+ <input maxlength="100" type="text" class="form-control" name="nf_secondary_aic_site_name" id="nf_secondary_aic_site_name" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <label for="nf_tertiary_aic_site_name">Tertiary Site Name</label>
+ <input maxlength="100" type="text" class="form-control" name="nf_tertiary_aic_site_name" id="nf_tertiary_aic_site_name" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitServiceHoming(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/alts_credentials.ejs b/admportal/views/partials/alts_credentials.ejs
new file mode 100644
index 0000000..6d5f113
--- /dev/null
+++ b/admportal/views/partials/alts_credentials.ejs
@@ -0,0 +1,65 @@
+<div class="modal fade" id="add_alts_credentials" tabindex="-1" role="dialog"
+ aria-labelledby="add_alts_credentials_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add ALTS Credentials</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/ucpe/addAltsCredentials" method="POST">
+ <div class="form-group">
+ <label for="nf_alts_username">*ALTS Username</label>
+ <input type="text" class="form-control" maxlength="255" name="nf_alts_username" id="nf_alts_username" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_alts_password">*ALTS Password</label>
+ <input type="password" class="form-control" maxlength="255" name="nf_alts_password" id="nf_alts_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_alts_password">*Confirm ALTS Password</label>
+ <input type="password" class="form-control" maxlength="255" name="nf_confirm_alts_password" id="nf_confirm_alts_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitAltsCredentials(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal fade" id="update_alts_credentials" tabindex="-1" role="dialog"
+ aria-labelledby="update_alts_credentials_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update ALTS Credentials</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/ucpe/updateAltsCredentials" method="POST">
+ <div class="form-group">
+ <label for="uf_alts_username">*ALTS Username</label>
+ <input type="text" class="form-control" maxlength="255" name="uf_alts_username" id="uf_alts_username">
+ </div>
+ <div class="form-group">
+ <label for="uf_alts_password">*ALTS Password</label>
+ <input type="password" class="form-control" maxlength="255" name="uf_alts_password" id="uf_alts_password">
+ </div>
+ <div class="form-group">
+ <label for="uf_alts_password">*Confirm ALTS Password</label>
+ <input type="password" class="form-control" maxlength="255" name="uf_confirm_alts_password" id="uf_confirm_alts_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submitAltsCredentials(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/dhcp.ejs b/admportal/views/partials/dhcp.ejs
new file mode 100644
index 0000000..a290c32
--- /dev/null
+++ b/admportal/views/partials/dhcp.ejs
@@ -0,0 +1,66 @@
+ <div class="modal fade" id="dhcp-modal" tabindex="-1" role="dialog"
+ aria-labelledby="dhcp-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">dhcp</h4>
+ </div>
+ <div class="modal-body">
+ <form id="dhcp_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="use_v4_default_pool">use-v4-default-pool</label>
+ <input type="text" class="form-control" name="use_v4_default_pool" id="use_v4_default_pool">
+ </div>
+ <div class="form-group">
+ <label for="use_v6_default_pool">use-v6-default-pool</label>
+ <input type="text" class="form-control" name="use_v6_default_pool" id="use_v6_default_pool">
+ </div>
+ <div class="form-group">
+ <label for="v4_dhcp_server_enabled">v4-dhcp-server-enabled</label>
+ <input type="text" class="form-control" name="v4_dhcp_server_enabled" id="v4_dhcp_server_enabled">
+ </div>
+ <div class="form-group">
+ <label for="v6_dhcp_server_enabled">v6-dhcp-server-enabled</label>
+ <input type="text" class="form-control" name="v6_dhcp_server_enabled" id="v6_dhcp_server_enabled">
+ </div>
+ <div class="form-group">
+ <label for="v6_dhcp_default_pool_prefix">v6-dhcp-default-pool-prefix</label>
+ <input type="text" class="form-control" name="v6_dhcp_default_pool_prefix" id="v6_dhcp_default_pool_prefix">
+ </div>
+ <div class="form-group">
+ <label for="v6_dhcp_default_pool_prefix_length">v6-dhcp-default-pool-prefix-length</label>
+ <input type="text" class="form-control" name="v6_dhcp_default_pool_prefix_length" id="v6_dhcp_default_pool_prefix_length">
+ </div>
+ <div class="form-group">
+ <label for="v4_dhcp_default_pool_prefix">v4-dhcp-default-pool-prefix</label>
+ <input type="text" class="form-control" name="v4_dhcp_default_pool_prefix" id="v4_dhcp_default_pool_prefix">
+ </div>
+ <div class="form-group">
+ <label for="v4_dhcp_default_pool_prefix_length">v4-dhcp-default-pool-prefix-length</label>
+ <input type="text" class="form-control" name="v4_dhcp_default_pool_prefix_length" id="v4_dhcp_default_pool_prefix_length">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#dhcp-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/env.ejs b/admportal/views/partials/env.ejs
new file mode 100644
index 0000000..249a707
--- /dev/null
+++ b/admportal/views/partials/env.ejs
@@ -0,0 +1 @@
+-dev
diff --git a/admportal/views/partials/equipment.ejs b/admportal/views/partials/equipment.ejs
new file mode 100644
index 0000000..5f4d798
--- /dev/null
+++ b/admportal/views/partials/equipment.ejs
@@ -0,0 +1,58 @@
+ <div class="modal fade"
+ id="equipment-modal" tabindex="-1" role="dialog"
+ aria-labelledby="equipment-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">equipment</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="equipment_role">equipment-role</label>
+ <input type="text" class="form-control" name="equipment_role" id="equipment_role">
+ </div>
+ <div class="form-group">
+ <label for="ptnii_name">ptnii-name</label>
+ <input type="text" class="form-control" name="ptnii_name" id="ptnii_name">
+ </div>
+ <div class="form-group">
+ <label for="ipv4_oam_address">ipv4-oam-address</label>
+ <input type="text" class="form-control" name="ipv4_oam_address" id="ipv4_oam_address">
+ </div>
+ <div class="form-group">
+ <label for="ipv4_oam_gateway_address">ipv4-oam-gateway-address</label>
+ <input type="text" class="form-control" name="ipv4_oam_gateway_address" id="ipv4_oam_gateway_address">
+ </div>
+ <div class="form-group">
+ <label for="v4_loopback0_ip_address">v4-loopback0-ip-address</label>
+ <input type="text" class="form-control" name="v4_loopback0_ip_address" id="v4_loopback0_ip_address">
+ </div>
+ <div class="form-group">
+ <label for="ipv4_oam_gateway_address_prefix_length">ipv4-oam-gateway-address-prefix-length</label>
+ <input type="text" class="form-control" name="ipv4_oam_gateway_address_prefix_length" id="ipv4_oam_gateway_address_prefix_length">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#equipment-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/excluded_v4_address.ejs b/admportal/views/partials/excluded_v4_address.ejs
new file mode 100644
index 0000000..e74d324
--- /dev/null
+++ b/admportal/views/partials/excluded_v4_address.ejs
@@ -0,0 +1,38 @@
+ <div class="modal fade" id="excluded-v4-address-modal" tabindex="-1" role="dialog"
+ aria-labelledby="excluded-v4-address-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">dhcp</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="exclded_v4_address">exclded-v4-address</label>
+ <input type="text" class="form-control" name="exclded_v4_address" id="exclded_v4_address">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#excluded-v4-address-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/excluded_v4_address_from_default_pool.ejs b/admportal/views/partials/excluded_v4_address_from_default_pool.ejs
new file mode 100644
index 0000000..442fd34
--- /dev/null
+++ b/admportal/views/partials/excluded_v4_address_from_default_pool.ejs
@@ -0,0 +1,38 @@
+ <div class="modal fade" id="excluded-v4-address-from-default-pool-modal" tabindex="-1" role="dialog"
+ aria-labelledby="excluded-v4-address-from-default-pool-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">excluded-v4-addresses-from-default-pool</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="excluded_v4_address_from_default_pool">excluded-v4-address</label>
+ <input type="text" class="form-control" name="excluded_v4_address_from_default_pool" id="excluded_v4_address_from_default_pool">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#excluded-v4-address-from-default-pool-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/excluded_v6_address_from_default_pool.ejs b/admportal/views/partials/excluded_v6_address_from_default_pool.ejs
new file mode 100644
index 0000000..a91d0a7
--- /dev/null
+++ b/admportal/views/partials/excluded_v6_address_from_default_pool.ejs
@@ -0,0 +1,38 @@
+ <div class="modal fade" id="excluded-v6-address-from-default-pool-modal" tabindex="-1" role="dialog"
+ aria-labelledby="excluded-v6-address-from-default-pool-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">excluded-v6-addresses-from-default-pool</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="excluded_v6_address_from_default_pool">excluded-v6-address</label>
+ <input type="text" class="form-control" name="excluded_v6_address_from_default_pool" id="excluded_v6_address_from_default_pool">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#excluded-v6-address-from-default-pool-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/excluded_v6_addresses.ejs b/admportal/views/partials/excluded_v6_addresses.ejs
new file mode 100644
index 0000000..d155383
--- /dev/null
+++ b/admportal/views/partials/excluded_v6_addresses.ejs
@@ -0,0 +1,38 @@
+ <div class="modal fade" id="excluded-v6-addresses-modal" tabindex="-1" role="dialog"
+ aria-labelledby="excluded-v6-addresses-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">excluded-v6-addresses</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="excluded_v6_address">excluded-v6-address</label>
+ <input type="text" class="form-control" name="excluded_v6_address" id="excluded_v6_address">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#excluded-v6-addresses-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/feature_list.ejs b/admportal/views/partials/feature_list.ejs
new file mode 100644
index 0000000..95ebf87
--- /dev/null
+++ b/admportal/views/partials/feature_list.ejs
@@ -0,0 +1,50 @@
+ <div class="modal fade"
+ id="feature-list-modal" tabindex="-1" role="dialog"
+ aria-labelledby="feature-list-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">feature-list</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="feature_instance_id">feature-instance-id</label>
+ <input type="text" class="form-control" name="feature_instance_id" id="feature_instance_id">
+ </div>
+ <div class="form-group">
+ <label for="feature_instance_xpath">feature-instance-xpath</label>
+ <input type="text" class="form-control" name="feature_instance_xpath" id="feature_instance_xpath">
+ </div>
+ <div class="form-group">
+ <label for="feature_sub_type">feature-sub-type</label>
+ <input type="text" class="form-control" name="feature_sub_type" id="feature_sub_type">
+ </div>
+ <div class="form-group">
+ <label for="feature_type">feature-type</label>
+ <input type="text" class="form-control" name="feature_type" id="feature_type">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#feature-list-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/firewall_lite.ejs b/admportal/views/partials/firewall_lite.ejs
new file mode 100644
index 0000000..b26d078
--- /dev/null
+++ b/admportal/views/partials/firewall_lite.ejs
@@ -0,0 +1,43 @@
+ <div class="modal fade" id="firewall-lite-modal" tabindex="-1" role="dialog"
+ aria-labelledby="firewall-lite-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">firewall-lite</h4>
+ </div>
+ <div class="modal-body">
+ <form id="firewall_lite_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="stateful_firewall_lite_v4_enabled">stateful-firewall-lite-v4-enabled</label>
+ <input type="text" class="form-control" name="stateful_firewall_lite_v4_enabled" id="stateful_firewall_lite_v4_enabled">
+ </div>
+ <div class="form-group">
+ <label for="stateful_firewall_lite_v6_enabled">stateful-firewall-lite-v6-enabled</label>
+ <input type="text" class="form-control" name="stateful_firewall_lite_v6_enabled" id="stateful_firewall_lite_v6_enabled">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="firewall_lite_vr_designation" id="firewall_lite_vr_designation">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#firewall-lite-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/footer.ejs b/admportal/views/partials/footer.ejs
new file mode 100644
index 0000000..c04e26d
--- /dev/null
+++ b/admportal/views/partials/footer.ejs
@@ -0,0 +1,5 @@
+
+<!-- views/partials/footer.ejs -->
+
+<p class="text-center text-muted">© Copyright 2017 AT&T Intellectual Property</p>
+
diff --git a/admportal/views/partials/form.ejs b/admportal/views/partials/form.ejs
new file mode 100644
index 0000000..00d3c0c
--- /dev/null
+++ b/admportal/views/partials/form.ejs
@@ -0,0 +1,55 @@
+ <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="myModalLabel">New Request</h4>
+ </div>
+ <div class="modal-body">
+ <form id="addEntry" role="form" action="svc-topology-operation">
+ <!--
+ <div class="form-group">
+ <label for="svc-request-id">svc-request-id</label>
+ <input type="text" class="form-control" name="svc-request-id" id="svc-request-id" value="req-0001">
+ </div>
+ -->
+ <div class="form-group">
+ <label for="svc-instance-id">svc-instance-id</label>
+ <input type="text" class="form-control" name="svc-instance-id" id="svc-instance-id" value="siid-0001">
+ </div>
+ <div class="form-group">
+ <label for="svc-vnf-type">svc-vnf-type</label>
+ <select class="form-control" name="svc-vnf-type" id="svc-vnf-type">
+ <option value=vce>"vce"</option>
+ <option value=Unknown>"Unknown"</option>
+ </select>
+ </div>
+ <div class="form-group">
+ <label for="svc-action">svc-action</label>
+ <select class="form-control" name="svc-action" id="svc-action">
+ <option value=reserve>"reserve"</option>
+ <option value=create>"create"</option>
+ <option value=activate>"activate"</option>
+ <option value=query>"query"</option>
+ <option value=update>"update"</option>
+ <option value=delete>"delete"</option>
+ </select>
+ </div>
+ <div class="form-group">
+ <label for="svc-notification-url">svc-notification-url</label>
+ <input type="text" class="form-control" name="svc-notification-url" id="svc-notification-url" value="">
+ </div>
+ <div class="form-group">
+ <label for="desc">svc-aic-site-id</label>
+ <input type="text" class="form-control" name="svc-aic-site-id" id="svc-aic-site-id" value="att-0001">
+ </div>
+ <div class="form-group">
+ <button type="submit" class="btn btn-primary">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
diff --git a/admportal/views/partials/gammaHeader.ejs b/admportal/views/partials/gammaHeader.ejs
new file mode 100644
index 0000000..8af8396
--- /dev/null
+++ b/admportal/views/partials/gammaHeader.ejs
@@ -0,0 +1,63 @@
+
+<!-- views/partials/header.ejs -->
+<nav class="navbar navbar-default" role="navigation">
+ <div class="container-fluid">
+
+
+ <div class="navbar-header">
+ <a class="navbar-brand" href="#"> AdminPortal</a>
+ </div>
+
+ <div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
+
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn "
+ onclick="location.assign('/sla/listSLA');">SLA</button>
+
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn dropdown-toggle"
+ data-toggle="dropdown"
+ aria-expanded="false">Profiles <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="/mobility/getVnfProfile">VNF Profile</a></li>
+ </ul>
+ </div>
+
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn dropdown-toggle"
+ data-toggle="dropdown"
+ aria-expanded="false">Preload Tools <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="/mobility/getVnfData">Pre-load VNF Data</a></li>
+ <li><a href="/mobility/getVnfNetworkData">Pre-load VNF Network Data</a></li>
+ </ul>
+ </div>
+
+ <!-- LOGS
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn dropdown-toggle"
+ data-toggle="dropdown"
+ aria-expanded="false">Logs <span class="caret"></span></button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="/logs/getUserTrace">User Trace</a></li>
+ <li><a href="/logs/getAccessLog">Access Log</a></li>
+ </ul>
+ </div>
+ -->
+
+ <button type="button" class="btn btn-default navbar-btn"
+ onclick="location.assign('/user/listUsers');">User Admin</button>
+ <button type="button" class="btn btn-default navbar-btn"
+ onclick="location.assign('/logout');">Logout</button>
+ </div>
+ </div>
+ </div>
+
+</nav>
+
+<script type="text/javascript">
+$('[data-submenu]').submenupicker();
+$('[vlanidpool-submenu]').submenupicker();
+</script>
diff --git a/admportal/views/partials/head.ejs b/admportal/views/partials/head.ejs
new file mode 100644
index 0000000..066bf3c
--- /dev/null
+++ b/admportal/views/partials/head.ejs
@@ -0,0 +1,20 @@
+<!-- Latest compiled and minified CSS -->
+<link rel="stylesheet" href="/stylesheets/bootstrap.min.css">
+<link rel="stylesheet" href="/stylesheets/bootstrap-theme.min.css">
+<link rel="stylesheet" href="/stylesheets/dataTables.bootstrap.min.css">
+<!-- <link rel="stylesheet" href="/stylesheets/bootstrap-table.css"> -->
+<link rel="stylesheet" href="/stylesheets/bootstrap-submenu.min.css">
+<link rel="stylesheet" href="/stylesheets/jquery.treegrid.css">
+
+<!-- jquery downloaded from jquery.com/download -->
+<!-- <script src="/javascripts/jquery.min.js"></script> -->
+<script src="/javascripts/jquery-2.2.0.min.js"></script>
+<script src="/javascripts/jquery.dataTables.min.js"></script>
+<script src="/javascripts/jquery.treegrid.js"></script>
+<script src="/javascripts/jquery.treegrid.bootstrap3.js"></script>
+<script src="/javascripts/bootstrap.min.js"></script>
+<!-- <script src="/javascripts/bootstrap-table.js"></script> -->
+<script src="/javascripts/bootstrap-submenu.min.js"></script>
+<script src="/javascripts/bootbox.min.js"></script>
+<script src="/javascripts/dataTables.bootstrap.min.js"></script>
+
diff --git a/admportal/views/partials/head.ejs.orig b/admportal/views/partials/head.ejs.orig
new file mode 100644
index 0000000..2f6f537
--- /dev/null
+++ b/admportal/views/partials/head.ejs.orig
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<meta charset="UTF-8">
+<title>SDN-C AdminPortal</title>
+
+<!-- Latest compiled and minified CSS -->
+<link rel="stylesheet" href="/stylesheets/bootstrap.min.css">
+
+<!-- Optional theme -->
+<link rel="stylesheet" href="/stylesheets/bootstrap-theme.min.css">
+<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
+<script src="/javascripts/jquery.min.js"></script>
+<!-- Latest compiled and minified JavaScript -->
+<script src="/javascripts/bootstrap.min.js"></script>
diff --git a/admportal/views/partials/header.ejs b/admportal/views/partials/header.ejs
new file mode 100644
index 0000000..6342154
--- /dev/null
+++ b/admportal/views/partials/header.ejs
@@ -0,0 +1,11 @@
+<% if (header == 'gamma') { %>
+ <% include ../partials/gammaHeader %>
+<% } else if(header == 'sdn-mlc'){ %>
+ <% include ../partials/sdnmlcHeader %>
+<% } else if(header == 'sdn-fc'){ %>
+ <% include ../partials/sdnfcHeader %>
+<% } else { %>
+ <% include ../partials/gammaHeader %>
+<% } %>
+
+
diff --git a/admportal/views/partials/header.ejs.orig b/admportal/views/partials/header.ejs.orig
new file mode 100644
index 0000000..830bd27
--- /dev/null
+++ b/admportal/views/partials/header.ejs.orig
@@ -0,0 +1,55 @@
+<!-- views/partials/header.ejs -->
+<nav class="navbar navbar-default" role="navigation">
+ <div class="container-fluid">
+
+ <div class="navbar-header">
+ <a class="navbar-brand" href="#"> SDN-C AdminPortal</a>
+ </div>
+
+ <div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
+
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn"
+ onclick="location.assign('/sla/listSLA');">SLA</button>
+
+<div class="btn-group">
+ <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Default <span class="caret"></span></button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="#">Action</a></li>
+ <li><a href="#">Another action</a></li>
+ <li><a href="#">Something else here</a></li>
+ <li class="divider"></li>
+ <li><a href="#">Separated link</a></li>
+ </ul>
+ </div>
+
+ <button type="button" class="btn btn-default navbar-btn">Interfaces</button>
+ <button type="button" class="btn btn-default navbar-btn">VMs</button>
+ <button type="button" class="btn btn-default navbar-btn"
+ onclick="location.assign('/odl/listWklst');">Worklist Orders</button>
+ <button type="button" class="btn btn-default navbar-btn">Connections</button>
+ <button type="button" class="btn btn-default navbar-btn">VNFs</button>
+ <button type="button" class="btn btn-default navbar-btn">VLANs</button>
+ <button type="button" class="btn btn-default navbar-btn"
+ onclick="location.assign('/user/listUsers');">User Admin</button>
+ <button type="button" class="btn btn-default navbar-btn navbar-btn"
+ onclick="location.assign('/logout');">Logout</button>
+ <!-- <p class="btn-toolbar" role="group">ar3165 | Al Rotundo</p> -->
+ </div>
+ </div>
+ </div>
+</nav>
+
+<!-- Single button -->
+<div class="btn-group">
+ <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
+ Action <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="#">Action</a></li>
+ <li><a href="#">Another action</a></li>
+ <li><a href="#">Something else here</a></li>
+ <li class="divider"></li>
+ <li><a href="#">Separated link</a></li>
+ </ul>
+</div>
diff --git a/admportal/views/partials/interface.ejs b/admportal/views/partials/interface.ejs
new file mode 100644
index 0000000..c8afce9
--- /dev/null
+++ b/admportal/views/partials/interface.ejs
@@ -0,0 +1,42 @@
+ <div class="modal fade"
+ id="interface-modal" tabindex="-1" role="dialog"
+ aria-labelledby="interface-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">interface</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="interface_name">interface-name</label>
+ <input type="text" class="form-control" name="interface_name" id="interface_name">
+ </div>
+ <div class="form-group">
+ <label for="interface_role">interface_role</label>
+ <input type="text" class="form-control" name="interface_role" id="interface_role">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#interface-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/internet_evc_modal.ejs b/admportal/views/partials/internet_evc_modal.ejs
new file mode 100644
index 0000000..70848ba
--- /dev/null
+++ b/admportal/views/partials/internet_evc_modal.ejs
@@ -0,0 +1,44 @@
+ <div class="modal fade" id="internet-evc-modal" tabindex="-1" role="dialog" aria-labelledby="internet-evc-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="internet-evc-modal-label">Internet EVC Access Information</h4>
+ </div>
+ <div class="modal-body">
+ <form id="internet_evc_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="ip_version">ip-version</label>
+ <input type="text" class="form-control" name="ip_version" id="ip_version">
+ </div>
+ <div class="form-group">
+ <label for="internet_evc_speed_value">internet-evc-speed-value</label>
+ <input type="text" class="form-control" name="internet_evc_speed_value" id="internet_evc_speed_value">
+ </div>
+ <div class="form-group">
+ <label for="internet_evc_speed_units">internet-evc-speed-units</label>
+ <input type="text" class="form-control" name="internet_evc_speed_units" id="internet_evc_speed_units">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#service-status-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/ipv4_infrastructure_static_route.ejs b/admportal/views/partials/ipv4_infrastructure_static_route.ejs
new file mode 100644
index 0000000..b9b9208
--- /dev/null
+++ b/admportal/views/partials/ipv4_infrastructure_static_route.ejs
@@ -0,0 +1,50 @@
+ <div class="modal fade"
+ id="ipv4-infrastructure-static-route-modal" tabindex="-1" role="dialog"
+ aria-labelledby="ipv4-infrastructure-static-route-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">ipv4-infrastructure-static-route</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="ipv4_outgoing_interface">ipv4-outgoing-interface</label>
+ <input type="text" class="form-control" name="ipv4_outgoing_interface" id="ipv4_outgoing_interface">
+ </div>
+ <div class="form-group">
+ <label for="ipv4_next_hop_address">ipv4-next-hop-address</label>
+ <input type="text" class="form-control" name="ipv4_next_hop_address" id="ipv4_next_hop_address">
+ </div>
+ <div class="form-group">
+ <label for="ipv4_dest_prefix">ipv4-dest-prefix</label>
+ <input type="text" class="form-control" name="ipv4_dest_prefix" id="ipv4_dest_prefix">
+ </div>
+ <div class="form-group">
+ <label for="ipv4_dest_prefix_length">ipv4-dest-prefix-length</label>
+ <input type="text" class="form-control" name="ipv4_dest_prefix_length" id="ipv4_dest_prefix_length">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#ipv4-infrastructure-static-route-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/ipv6_infrastructure_static_route.ejs b/admportal/views/partials/ipv6_infrastructure_static_route.ejs
new file mode 100644
index 0000000..4921e2e
--- /dev/null
+++ b/admportal/views/partials/ipv6_infrastructure_static_route.ejs
@@ -0,0 +1,50 @@
+ <div class="modal fade"
+ id="ipv6-infrastructure-static-route-modal" tabindex="-1" role="dialog"
+ aria-labelledby="ipv6-infrastructure-static-route-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">ipv6-infrastructure-static-route</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="ipv6_outgoing_interface">ipv6-outgoing-interface</label>
+ <input type="text" class="form-control" name="ipv6_outgoing_interface" id="ipv6_outgoing_interface">
+ </div>
+ <div class="form-group">
+ <label for="ipv6_next_hop_address">ipv6-next-hop-address</label>
+ <input type="text" class="form-control" name="ipv6_next_hop_address" id="ipv6_next_hop_address">
+ </div>
+ <div class="form-group">
+ <label for="ipv6_dest_prefix">ipv6-dest-prefix</label>
+ <input type="text" class="form-control" name="ipv6_dest_prefix" id="ipv6_dest_prefix">
+ </div>
+ <div class="form-group">
+ <label for="ipv6_dest_prefix_length">ipv6-dest-prefix-length</label>
+ <input type="text" class="form-control" name="ipv6_dest_prefix_length" id="ipv6_dest_prefix_length">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#ipv6-infrastructure-static-route-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/l2_homing_information_modal.ejs b/admportal/views/partials/l2_homing_information_modal.ejs
new file mode 100644
index 0000000..03af054
--- /dev/null
+++ b/admportal/views/partials/l2_homing_information_modal.ejs
@@ -0,0 +1,46 @@
+ <div class="modal fade"
+ id="l2-homing-information-modal" tabindex="-1" role="dialog"
+ aria-labelledby="l2-homing-information-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="l2-homing-information-modal-label">l2-homing-information</h4>
+ </div>
+ <div class="modal-body">
+ <form id="l2_homing_information_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="evc_name">evc-name</label>
+ <input type="text" class="form-control" name="evc_name" id="evc_name">
+ </div>
+ <div class="form-group">
+ <label for="preferred_aic_clli">preferred-aic-clli</label>
+ <input type="text" class="form-control" name="preferred_aic_clli" id="preferred_aic_clli">
+ </div>
+ <div class="form-group">
+ <label for="topology">topology</label>
+ <input type="text" class="form-control" name="topology" id="topology">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#service-status-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/l3_interface_ipv4_address_list.ejs b/admportal/views/partials/l3_interface_ipv4_address_list.ejs
new file mode 100644
index 0000000..50c66cd
--- /dev/null
+++ b/admportal/views/partials/l3_interface_ipv4_address_list.ejs
@@ -0,0 +1,42 @@
+ <div class="modal fade"
+ id="l3-interface-ipv4-address-list-modal" tabindex="-1" role="dialog"
+ aria-labelledby="l3-interface-ipv4-address-list-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">l3-interface-ipv4-address-list</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="l3_interface_ipv4_address">l3-interface-ipv4-address</label>
+ <input type="text" class="form-control" name="l3_interface_ipv4_address" id="l3_interface_ipv4_address">
+ </div>
+ <div class="form-group">
+ <label for="l3_interface_ipv4_prefix_length">l3-interface-ipv4-prefix-length</label>
+ <input type="text" class="form-control" name="l3_interface_ipv4_prefix_length" id="l3_interface_ipv4_prefix_length">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#l3-interface-ipv4-address-list-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/l3_interface_ipv6_address_list.ejs b/admportal/views/partials/l3_interface_ipv6_address_list.ejs
new file mode 100644
index 0000000..9faec4c
--- /dev/null
+++ b/admportal/views/partials/l3_interface_ipv6_address_list.ejs
@@ -0,0 +1,42 @@
+ <div class="modal fade"
+ id="l3-interface-ipv6-address-list-modal" tabindex="-1" role="dialog"
+ aria-labelledby="l3-interface-ipv6-address-list-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">l3-interface-ipv6-address-list</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="l3_interface_ipv6_address">l3-interface-ipv6-address</label>
+ <input type="text" class="form-control" name="l3_interface_ipv6_address" id="l3_interface_ipv6_address">
+ </div>
+ <div class="form-group">
+ <label for="l3_interface_ipv6_prefix_length">l3-interface-ipv6-prefix-length</label>
+ <input type="text" class="form-control" name="l3_interface_ipv6_prefix_length" id="l3_interface_ipv6_prefix_length">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#l3-interface-ipv6-address-list-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/l3sdn_vnf_fields.ejs b/admportal/views/partials/l3sdn_vnf_fields.ejs
new file mode 100644
index 0000000..e3d842e
--- /dev/null
+++ b/admportal/views/partials/l3sdn_vnf_fields.ejs
@@ -0,0 +1,70 @@
+ <div class="modal fade"
+ id="l3sdn-vnf-fields-modal" tabindex="-1" role="dialog"
+ aria-labelledby="l3sdn-vnf-fields-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">l3sdn-vnf-fields</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="availability_zone">availability_zone</label>
+ <input type="text" class="form-control" name="availability_zone" id="availability_zone">
+ </div>
+ <div class="form-group">
+ <label for="vnf_stack_id">vnf-stack-id</label>
+ <input type="text" class="form-control" name="vnf_stack_id" id="vnf_stack_id">
+ </div>
+ <div class="form-group">
+ <label for="vnf_name">vnf-name</label>
+ <input type="text" class="form-control" name="vnf_name" id="vnf_name">
+ </div>
+ <div class="form-group">
+ <label for="vnf_name2">vnf-name2</label>
+ <input type="text" class="form-control" name="vnf_name2" id="vnf_name2">
+ </div>
+ <div class="form-group">
+ <label for="vnf_type">vnf-type</label>
+ <input type="text" class="form-control" name="vnf_type" id="vnf_type">
+ </div>
+ <div class="form-group">
+ <label for="vnf_status">vnf-status</label>
+ <input type="text" class="form-control" name="vnf_status" id="vnf_status">
+ </div>
+ <div class="form-group">
+ <label for="vnf_id">vnf-id</label>
+ <input type="text" class="form-control" name="vnf_id" id="vnf_id">
+ </div>
+ <div class="form-group">
+ <label for="oam_network_name">oam-network-name</label>
+ <input type="text" class="form-control" name="oam_network_name" id="oam_network_name">
+ </div>
+ <div class="form-group">
+ <label for="aic_site_id">aic_site_id</label>
+ <input type="text" class="form-control" name="aic_site_id" id="aic_site_id">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#l3sdn-vnf-fields-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/link_latency_master.ejs b/admportal/views/partials/link_latency_master.ejs
new file mode 100644
index 0000000..83e87f0
--- /dev/null
+++ b/admportal/views/partials/link_latency_master.ejs
@@ -0,0 +1,100 @@
+<div class="modal fade" id="add_link_latency_master" tabindex="-1" role="dialog"
+ aria-labelledby="add_link_latency_master_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add Link Latency Master</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/tunnel/addLinkLatencyMaster" method="POST">
+ <div class="form-group">
+ <label for="nf_source_crs_name">*Source CRS Name</label>
+ <input type="text" class="form-control" maxlength="20" name="nf_source_crs_name" id="nf_source_crs_name" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_destination_crs_name">*Destination CRS Name</label>
+ <input type="text" class="form-control" maxlength="20" name="nf_destination_crs_name" id="nf_destination_crs_name" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_bundle_name">*Bundle Name</label>
+ <input type="text" class="form-control" maxlength="50" name="nf_bundle_name" id="nf_bundle_name" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="nf_latency">*Latency</label>
+ <input type="text" class="form-control" maxlength="10" name="nf_latency" id="nf_latency" placeholder="varchar(10)">
+ </div>
+ <div class="form-group">
+ <label for="nf_intra_inter_snrc">*Intra Inter SNRC</label>
+ <input type="text" class="form-control" maxlength="10" name="nf_intra_inter_snrc" id="nf_intra_inter_snrc" placeholder="varchar(10)">
+ </div>
+ <div class="form-group">
+ <label for="nf_final_latency">*Final Latency</label>
+ <input type="text" class="form-control" maxlength="10" name="nf_final_latency" id="nf_final_latency" placeholder="varchar(10)">
+ </div>
+ <div class="form-group">
+ <label for="nf_augmentable">*Augmentable</label>
+ <input type="text" class="form-control" maxlength="1" name="nf_augmentable" id="nf_augmentable" placeholder="varchar(1)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitLinkLatencyMaster(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal fade" id="update_link_latency_master" tabindex="-1" role="dialog"
+ aria-labelledby="update_link_latency_master_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Link Latency Master</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/tunnel/updateLinkLatencyMaster" method="POST">
+ <div class="form-group">
+ <label for="uf_source_crs_name">*Source CRS Name</label>
+ <input type="text" class="form-control" maxlength="20" name="uf_source_crs_name" id="uf_source_crs_name" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_destination_crs_name">*Destination CRS Name</label>
+ <input type="text" class="form-control" maxlength="20" name="uf_destination_crs_name" id="uf_destination_crs_name" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_bundle_name">*Bundle Name</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_bundle_name" id="uf_bundle_name" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="uf_latency">*Latency</label>
+ <input type="text" class="form-control" maxlength="10" name="uf_latency" id="uf_latency" placeholder="varchar(10)">
+ </div>
+ <div class="form-group">
+ <label for="uf_intra_inter_snrc">*Intra Inter SNRC</label>
+ <input type="text" class="form-control" maxlength="10" name="uf_intra_inter_snrc" id="uf_intra_inter_snrc" placeholder="varchar(10)">
+ </div>
+ <div class="form-group">
+ <label for="uf_final_latency">*Final Latency</label>
+ <input type="text" class="form-control" maxlength="10" name="uf_final_latency" id="uf_final_latency" placeholder="varchar(10)">
+ </div>
+ <div class="form-group">
+ <label for="uf_augmentable">*Augmentable</label>
+ <input type="text" class="form-control" maxlength="1" name="uf_augmentable" id="uf_augmentable" placeholder="varchar(1)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_source_crs_name" id="uf_key_source_crs_name">
+ <input type="hidden" name="uf_key_destination_crs_name" id="uf_key_destination_crs_name">
+ <input type="hidden" name="uf_key_bundle_name" id="uf_key_bundle_name">
+ <button type="button" class="btn btn-primary" onclick="submitLinkLatencyMaster(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/link_master.ejs b/admportal/views/partials/link_master.ejs
new file mode 100644
index 0000000..5ece82d
--- /dev/null
+++ b/admportal/views/partials/link_master.ejs
@@ -0,0 +1,109 @@
+<div class="modal fade" id="add_link_master" tabindex="-1" role="dialog"
+ aria-labelledby="add_link_master_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add Link Master</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/tunnel/addLinkMaster" method="POST">
+ <div class="form-group">
+ <label for="nf_link_interface_ip">*Link Interface IP</label>
+ <input type="text" class="form-control" name="nf_link_interface_ip" id="nf_link_interface_ip" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_source_crs_name">*Source CRS Name</label>
+ <input type="text" class="form-control" name="nf_source_crs_name" id="nf_source_crs_name" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_destination_crs_name">*Destination CRS Name</label>
+ <input type="text" class="form-control" name="nf_destination_crs_name" id="nf_destination_crs_name" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_link_speed">Link Speed</label>
+ <input type="text" class="form-control" name="nf_link_speed" id="nf_link_speed" maxlength="11" placeholder="int(11)">
+ </div>
+ <div class="form-group">
+ <label for="nf_default_cost">Default Cost</label>
+ <input type="text" class="form-control" name="nf_default_cost" id="nf_default_cost" maxlength="11" placeholder="int(11)">
+ </div>
+ <div class="form-group">
+ <label for="nf_bundle_name">Bundle Name</label>
+ <input type="text" class="form-control" name="nf_bundle_name" id="nf_bundle_name" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_shutdown">Shutdown</label>
+ <select class="form-control" name="nf_shutdown" id="nf_shutdown">
+ <option value='N'>False</option>
+ <option value='Y'>True</option>
+ </select>
+ </div>
+
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="saveLinkMaster(this.form);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div class="modal fade" id="update_link_master" tabindex="-1" role="dialog"
+ aria-labelledby="update_link_master_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Link Master</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/tunnel/updateLinkMaster" method="POST">
+ <div class="form-group">
+ <label for="uf_link_interface_ip">*Link Interface IP</label>
+ <input type="text" class="form-control" name="uf_link_interface_ip" id="uf_link_interface_ip" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_source_crs_name">*Source CRS Name</label>
+ <input type="text" class="form-control" name="uf_source_crs_name" id="uf_source_crs_name" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_destination_crs_name">*Destination CRS Name</label>
+ <input type="text" class="form-control" name="uf_destination_crs_name" id="uf_destination_crs_name" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_link_speed">Link Speed</label>
+ <input type="text" class="form-control" name="uf_link_speed" id="uf_link_speed" maxlength="11" placeholder="int(11)">
+ </div>
+ <div class="form-group">
+ <label for="uf_default_cost">Default Cost</label>
+ <input type="text" class="form-control" name="uf_default_cost" id="uf_default_cost" maxlength="11" placeholder="int(11)">
+ </div>
+ <div class="form-group">
+ <label for="uf_bundle_name">Bundle Name</label>
+ <input type="text" class="form-control" name="uf_bundle_name" id="uf_bundle_name" maxlength="20" placeholder="varchar(20)">
+ </div>
+
+ <div class="form-group">
+ <label for="uf_shutdown">Shutdown</label>
+ <select class="form-control" name="uf_shutdown" id="uf_shutdown">
+ <option value='N'>False</option>
+ <option value='Y'>True</option>
+ </select>
+ </div>
+
+
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_link_interface_ip" id="uf_key_link_interface_ip">
+ <button type="button" class="btn btn-primary" onclick="saveLinkMaster(this.form);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
+
diff --git a/admportal/views/partials/max_port_speed.ejs b/admportal/views/partials/max_port_speed.ejs
new file mode 100644
index 0000000..a578308
--- /dev/null
+++ b/admportal/views/partials/max_port_speed.ejs
@@ -0,0 +1,86 @@
+ <div class="modal fade" id="add_max_port_speed" tabindex="-1" role="dialog"
+ aria-labelledby="add_max_port_speed_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add Max Port Speed</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/resalloc/addMaxPortSpeed" method="POST">
+ <div class="form-group">
+ <label for="nf_image_file_name">*Image File Name</label>
+ <input type="text" class="form-control" maxlength="50" name="nf_image_file_name" id="nf_image_file_name" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="nf_end_point_position">*End Point Position</label>
+ <input type="text" class="form-control" maxlength="50" name="nf_end_point_position" id="nf_end_point_position" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="nf_interface_name">*Interface Name</label>
+ <input type="text" class="form-control" maxlength="100" name="nf_interface_name" id="nf_interface_name" placeholder="varchar(100)" >
+ </div>
+ <div class="form-group">
+ <label for="nf_max_speed">*Max Speed</label>
+ <input type="text" class="form-control" maxlength="50" name="nf_max_speed" id="nf_max_speed" placeholder="bigint(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_unit">*Unit</label>
+ <input type="text" class="form-control" maxlength="10" name="nf_unit" id="nf_unit" placeholder="varchar(10)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitMaxPortSpeed(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal fade" id="update_max_port_speed" tabindex="-1" role="dialog"
+ aria-labelledby="update_max_port_speed_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Max Port Speed</h4>
+ </div>
+ <div class="modal-body">
+ <form name="updateForm" role="form" action="/resalloc/updateMaxPortSpeed" method="POST">
+ <div class="form-group">
+ <label for="uf_max_port_speed_id">*ID</label>
+ <input readonly type="text" class="form-control" name="uf_max_port_speed_id" id="uf_max_port_speed_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_image_file_name">*Image File Name</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_image_file_name" id="uf_image_file_name" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="uf_end_point_position">*End Point Position</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_end_point_position" id="uf_end_point_position" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="uf_interface_name">*Interface Name</label>
+ <input type="text" class="form-control" maxlength="100" name="uf_interface_name" id="uf_interface_name" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <label for="uf_max_speed">*Max Speed</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_max_speed" id="uf_max_speed" placeholder="bigint(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_unit">*Unit</label>
+ <input type="text" class="form-control" maxlength="10" name="uf_unit" id="uf_unit" placeholder="varchar(10)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_max_port_speed_id" id="uf_key_max_port_speed_id">
+ <button type="button" class="btn btn-primary" onclick="submitMaxPortSpeed(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/max_server_speed.ejs b/admportal/views/partials/max_server_speed.ejs
new file mode 100644
index 0000000..6212414
--- /dev/null
+++ b/admportal/views/partials/max_server_speed.ejs
@@ -0,0 +1,88 @@
+<div class="modal fade" id="add_max_server_speed" tabindex="-1" role="dialog"
+ aria-labelledby="add_max_server_speed_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add Max Server Speed</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/resalloc/addMaxServerSpeed" method="POST">
+ <div class="form-group">
+ <label for="nf_server_model">*Server ModelName</label>
+ <input type="text" class="form-control" maxlength="50" name="nf_server_model" id="nf_server_model" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="nf_evc_count">*EVC Count</label>
+ <input type="text" class="form-control" maxlength="50" name="nf_evc_count" id="nf_evc_count" placeholder="smallint(6)">
+ </div>
+ <div class="form-group">
+ <label for="nf_max_speed">*Max Speed</label>
+ <input type="text" class="form-control" maxlength="100" name="nf_max_speed" id="nf_max_speed" placeholder="bigint(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_unit">*Unit</label>
+ <input type="text" class="form-control" maxlength="10" name="nf_unit" id="nf_unit" placeholder="varchar(10)">
+ </div>
+ <div class="form-group">
+ <label for="nf_description">Description</label>
+ <input type="text" class="form-control" maxlength="500" name="nf_description" id="nf_description" placeholder="varchar(500)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <input type="hidden" name="nf_key_max_server_speed_id" id="nf_key_max_server_speed_id">
+ <button type="button" class="btn btn-primary" onclick="submitMaxServerSpeed(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+ <div class="modal fade" id="update_max_server_speed" tabindex="-1" role="dialog"
+ aria-labelledby="max_server_speed_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Max Server Speed</h4>
+ </div>
+ <div class="modal-body">
+ <form name="updateForm" role="form" action="/resalloc/updateMaxServerSpeed" method="POST">
+ <div class="form-group">
+ <label for="uf_max_server_speed_id">*ID</label>
+ <input readonly type="text" class="form-control" name="uf_max_server_speed_id" id="uf_max_server_speed_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_server_model">*Server Model</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_server_model" id="uf_server_model" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="uf_evc_count">*EVC Count</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_evc_count" id="uf_evc_count" placeholder="smallint(6)">
+ </div>
+ <div class="form-group">
+ <label for="uf_max_speed">*Max Speed</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_max_speed" id="uf_max_speed" placeholder="bigint(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_unit">*Unit</label>
+ <input type="text" class="form-control" maxlength="10" name="uf_unit" id="uf_unit" placeholder="varchar(10)">
+ </div>
+ <div class="form-group">
+ <label for="uf_description">Description</label>
+ <input type="text" class="form-control" maxlength="500" name="uf_description" id="uf_description" placeholder="varchar(500)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_max_server_speed_id" id="uf_key_max_server_speed_id">
+ <button type="button" class="btn btn-primary" onclick="submitMaxServerSpeed(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/metroroadm_service_request.ejs b/admportal/views/partials/metroroadm_service_request.ejs
new file mode 100644
index 0000000..e198f7f
--- /dev/null
+++ b/admportal/views/partials/metroroadm_service_request.ejs
@@ -0,0 +1,170 @@
+<div class="modal fade" id="add_metroroadm_service_request" tabindex="-1" role="dialog"
+ aria-labelledby="add_metroroadm_service_request_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add Metro ROADM Service Request</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/tunnel/addMetroRoadmServiceRequest" method="POST">
+ <div class="form-group">
+ <label for="nf_request_id">*Request ID</label>
+ <input type="text" class="form-control" maxlength="75" name="nf_request_id" id="nf_request_id" placeholder="varchar(75)">
+ </div>
+ <div class="form-group">
+ <label for="nf_request_source">Request Source</label>
+ <input type="text" class="form-control" maxlength="20" name="nf_request_source" id="nf_request_source" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_notification_url">Notification URL</label>
+ <input type="text" class="form-control" maxlength="255" name="nf_notification_url" id="nf_notification_url" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_l_action">*Action</label>
+ <input type="text" class="form-control" maxlength="10" name="nf_l_action" id="nf_l_action" placeholder="varchar(10)">
+ </div>
+ <div class="form-group">
+ <label for="nf_request_timestamp">*Request Timestamp</label>
+ <input type="text" class="form-control" maxlength="80" name="nf_request_timestamp" id="nf_request_timestamp" placeholder="YYYY-MM-DD HH:MM:SS">
+ </div>
+ <div class="form-group">
+ <label for="nf_update_timestamp">Update Timestamp</label>
+ <input type="text" class="form-control" maxlength="80" name="nf_update_timestamp" id="nf_update_timestamp" placeholder="varchar(80)">
+ </div>
+ <div class="form-group">
+ <label for="nf_request_status">*Request Status</label>
+ <input type="text" class="form-control" maxlength="20" name="nf_request_status" id="nf_request_status" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_processing_status">*Processing Status</label>
+ <input type="text" class="form-control" maxlength="40" name="nf_processing_status" id="nf_processing_status" placeholder="varchar(40)">
+ </div>
+ <div class="form-group">
+ <label for="nf_reason_code">Reason Code</label>
+ <input type="text" class="form-control" maxlength="255" name="nf_reason_code" id="nf_reason_code" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_reason_message">Reason Message</label>
+ <input type="text" class="form-control" maxlength="255" name="nf_reason_message" id="nf_reason_message" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_service_id">*Service Id</label>
+ <input type="text" class="form-control" maxlength="50" name="nf_service_id" id="nf_service_id" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="nf_common_id">Common Id</label>
+ <input type="text" class="form-control" maxlength="12" name="nf_common_id" id="nf_common_id" placeholder="varchar(12)">
+ </div>
+ <div class="form-group">
+ <label for="nf_clli_a">CLLI A</label>
+ <input type="text" class="form-control" maxlength="20" name="nf_clli_a" id="nf_clli_a" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_clli_z">CLLI Z</label>
+ <input type="text" class="form-control" maxlength="20" name="nf_clli_z" id="nf_clli_z" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_customer">Customer</label>
+ <input type="text" class="form-control" maxlength="255" name="nf_customer" id="nf_customer" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_controller_id">*Controller Id</label>
+ <input type="text" class="form-control" maxlength="255" name="nf_controller_id" id="nf_controller_id" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitMetroRoadmServiceRequest(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal fade" id="update_metroroadm_service_request" tabindex="-1" role="dialog"
+ aria-labelledby="update_metroroadm_service_request_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Metro ROADM Service Request</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/tunnel/updateMetroRoadmServiceRequest" method="POST">
+ <div class="form-group">
+ <label for="uf_request_id">*Request ID</label>
+ <input type="text" class="form-control" maxlength="75" name="uf_request_id" id="uf_request_id" placeholder="varchar(75)">
+ </div>
+ <div class="form-group">
+ <label for="uf_request_source">Request Source</label>
+ <input type="text" class="form-control" maxlength="20" name="uf_request_source" id="uf_request_source" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_notification_url">Notification URL</label>
+ <input type="text" class="form-control" maxlength="255" name="uf_notification_url" id="uf_notification_url" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="uf_l_action">*Action</label>
+ <input type="text" class="form-control" maxlength="10" name="uf_l_action" id="uf_l_action" placeholder="varchar(10)">
+ </div>
+ <div class="form-group">
+ <label for="uf_request_timestamp">*Request Timestamp</label>
+ <input type="text" class="form-control" maxlength="80" name="uf_request_timestamp" id="uf_request_timestamp" placeholder="varchar(80)">
+ </div>
+ <div class="form-group">
+ <label for="uf_update_timestamp">Update Timestamp</label>
+ <input type="text" class="form-control" maxlength="80" name="uf_update_timestamp" id="uf_update_timestamp" placeholder="varchar(80)">
+ </div>
+ <div class="form-group">
+ <label for="uf_request_status">*Request Status</label>
+ <input type="text" class="form-control" maxlength="20" name="uf_request_status" id="uf_request_status" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_processing_status">*Processing Status</label>
+ <input type="text" class="form-control" maxlength="40" name="uf_processing_status" id="uf_processing_status" placeholder="varchar(40)">
+ </div>
+ <div class="form-group">
+ <label for="uf_reason_code">Reason Code</label>
+ <input type="text" class="form-control" maxlength="255" name="uf_reason_code" id="uf_reason_code" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="uf_reason_message">Reason Message</label>
+ <input type="text" class="form-control" maxlength="255" name="uf_reason_message" id="uf_reason_message" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="uf_service_id">*Service Id</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_service_id" id="uf_service_id" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="uf_common_id">Common Id</label>
+ <input type="text" class="form-control" maxlength="12" name="uf_common_id" id="uf_common_id" placeholder="varchar(12)">
+ </div>
+ <div class="form-group">
+ <label for="uf_clli_a">CLLI A</label>
+ <input type="text" class="form-control" maxlength="20" name="uf_clli_a" id="uf_clli_a" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_clli_z">CLLI Z</label>
+ <input type="text" class="form-control" maxlength="20" name="uf_clli_z" id="uf_clli_z" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_customer">Customer</label>
+ <input type="text" class="form-control" maxlength="255" name="uf_customer" id="uf_customer" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="uf_controller_id">*Controller Id</label>
+ <input type="text" class="form-control" maxlength="255" name="uf_controller_id" id="uf_controller_id" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_request_id" id="uf_key_request_id">
+ <button type="button" class="btn btn-primary" onclick="submitMetroRoadmServiceRequest(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/nat.ejs b/admportal/views/partials/nat.ejs
new file mode 100644
index 0000000..973c254
--- /dev/null
+++ b/admportal/views/partials/nat.ejs
@@ -0,0 +1,38 @@
+ <div class="modal fade" id="nat-modal" tabindex="-1" role="dialog"
+ aria-labelledby="nat-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">nat</h4>
+ </div>
+ <div class="modal-body">
+ <form id="nat_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="v4_nat_enabled">v4-nat-enabled</label>
+ <input type="text" class="form-control" name="v4_nat_enabled" id="v4_nat_enabled">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#nat-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/nb_vlan_pool.ejs b/admportal/views/partials/nb_vlan_pool.ejs
new file mode 100644
index 0000000..d5e8973
--- /dev/null
+++ b/admportal/views/partials/nb_vlan_pool.ejs
@@ -0,0 +1,38 @@
+ <div class="modal fade" id="update_nb_vlan_pool" tabindex="-1" role="dialog"
+ aria-labelledby="update_nb_vlan_pool_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update NetBond VLAN Pool</h4>
+ </div>
+ <div class="modal-body">
+ <form name="updateForm" role="form" action="/gamma/updateNbVlanPool" method="POST">
+
+ <div class="form-group">
+ <label for="nf_plan_type">Status</label>
+ <select class="form-control" name="uf_status" id="uf_status">
+ <option value="AVAILABLE">AVAILABLE</option>
+ <option value="RESERVED">RESERVED</option>
+ <option value="IN-USE">IN-USE</option>
+ </select>
+ </div>
+
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_aic_site_id" id="uf_key_aic_site_id">
+ <input type="hidden" name="uf_key_availability_zone" id="uf_key_availability_zone">
+ <input type="hidden" name="uf_key_vlan_plan_id" id="uf_key_vlan_plan_id">
+ <input type="hidden" name="uf_key_plan_type" id="uf_key_plan_type">
+ <input type="hidden" name="uf_key_purpose" id="uf_key_purpose">
+ <input type="hidden" name="uf_key_vlan_id" id="uf_key_vlan_id">
+
+ <button type="button" class="btn btn-primary"
+ onclick="saveNbVlanPool(this.form);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/nb_vlan_range.ejs b/admportal/views/partials/nb_vlan_range.ejs
new file mode 100644
index 0000000..4cc24a2
--- /dev/null
+++ b/admportal/views/partials/nb_vlan_range.ejs
@@ -0,0 +1,45 @@
+ <div class="modal fade" id="add_vlan_range" tabindex="-1" role="dialog"
+ aria-labelledby="add_vlan_range_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add NetBond VLAN Range</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/gamma/saveNbVlanRange" method="POST">
+
+ <div class="form-group">
+ <label for="nf_plan_type">*Plan Type</label>
+ <select class="form-control" name="nf_plan_type" id="nf_plan_type">
+ <option value="NB VNAT">NB VNAT</option>
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="nf_purpose">*Purpose</label>
+ <select class="form-control" name="nf_purpose" id="nf_purpose">
+ <option value=CUSTOMER>CUSTOMER</option>
+ <option value=PARTNER>PARTNER</option>
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="nf_range_start">*Range Start</label>
+ <input type="text" class="form-control" name="nf_range_start" id="nf_range_start" maxlength="4" placeholder="int(4)">
+ </div>
+
+ <div class="form-group">
+ <label for="nf_range_end">*Range End</label>
+ <input type="text" class="form-control" name="nf_range_end" id="nf_range_end" maxlength="4" placeholder="int(4)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="saveNbVlanRange(this.form);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/ncs_credentials.ejs b/admportal/views/partials/ncs_credentials.ejs
new file mode 100644
index 0000000..a35b7e4
--- /dev/null
+++ b/admportal/views/partials/ncs_credentials.ejs
@@ -0,0 +1,74 @@
+<div class="modal fade" id="add_ncs_credentials" tabindex="-1" role="dialog"
+ aria-labelledby="add_ncs_credentials_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add NCS Credentials</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/ucpe/addNcsCredentials" method="POST">
+ <div class="form-group">
+ <label for="nf_customer_name">*Customer Name</label>
+ <input type="text" class="form-control" maxlength="255" aria-describedby="helpCName" name="nf_customer_name" id="nf_customer_name" placeholder="varchar(255)">
+ <span id="helpCName" class="help-block">The Customer Name must match exactly whats in the NCS Servers table.</span>
+ </div>
+ <div class="form-group">
+ <label for="nf_ncs_username">*NCS Username</label>
+ <input type="text" class="form-control" maxlength="255" name="nf_ncs_username" id="nf_ncs_username" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_ncs_password">*NCS Password</label>
+ <input type="password" class="form-control" maxlength="255" name="nf_ncs_password" id="nf_ncs_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_phs_password">*Confirm NCS Password</label>
+ <input type="password" class="form-control" maxlength="255" name="nf_confirm_ncs_password" id="nf_confirm_ncs_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitNcsCredentials(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal fade" id="update_ncs_credentials" tabindex="-1" role="dialog"
+ aria-labelledby="update_ncs_credentials_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update NCS Credentials</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/ucpe/updateNcsCredentials" method="POST">
+ <div class="form-group">
+ <label for="uf_customer_name">*Customer Name</label>
+ <input readonly type="text" class="form-control" name="uf_customer_name" id="uf_customer_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_ncs_username">*NCS Username</label>
+ <input type="text" class="form-control" maxlength="255" name="uf_ncs_username" id="uf_ncs_username">
+ </div>
+ <div class="form-group">
+ <label for="uf_ncs_password">*NCS Password</label>
+ <input type="password" class="form-control" maxlength="255" name="uf_ncs_password" id="uf_ncs_password">
+ </div>
+ <div class="form-group">
+ <label for="nf_phs_password">*Confirm NCS Password</label>
+ <input type="password" class="form-control" maxlength="255" name="uf_confirm_ncs_password" id="uf_confirm_ncs_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submitNcsCredentials(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/network_connections.ejs b/admportal/views/partials/network_connections.ejs
new file mode 100644
index 0000000..7209323
--- /dev/null
+++ b/admportal/views/partials/network_connections.ejs
@@ -0,0 +1,66 @@
+ <div class="modal fade"
+ id="network-connections-modal" tabindex="-1" role="dialog"
+ aria-labelledby="network-connections-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">network-connections</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="stack_id">stack-id</label>
+ <input type="text" class="form-control" name="stack_id" id="stack_id">
+ </div>
+ <div class="form-group">
+ <label for="net_status">net-status</label>
+ <input type="text" class="form-control" name="net_status" id="net_status">
+ </div>
+ <div class="form-group">
+ <label for="connection_type">connection-type</label>
+ <input type="text" class="form-control" name="connection_type" id="connection_type">
+ </div>
+ <div class="form-group">
+ <label for="provider_network">provider-network</label>
+ <input type="text" class="form-control" name="provider_network" id="provider_network">
+ </div>
+ <div class="form-group">
+ <label for="interface_id">interface-id</label>
+ <input type="text" class="form-control" name="interface_id" id="interface_id">
+ </div>
+ <div class="form-group">
+ <label for="vlan">vlan</label>
+ <input type="text" class="form-control" name="vlan" id="vlan">
+ </div>
+ <div class="form-group">
+ <label for="port_group_name">port-group-name</label>
+ <input type="text" class="form-control" name="port_group_name" id="port_group_name">
+ </div>
+ <div class="form-group">
+ <label for="neutron_network_id">neutron-network-id</label>
+ <input type="text" class="form-control" name="neutron_network_id" id="neutron_network_id">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#network-connections-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/network_profile.ejs b/admportal/views/partials/network_profile.ejs
new file mode 100644
index 0000000..81d7f32
--- /dev/null
+++ b/admportal/views/partials/network_profile.ejs
@@ -0,0 +1,59 @@
+ <div class="modal fade" id="add_network_profile" tabindex="-1" role="dialog"
+ aria-labelledby="add_network_profile" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add Network Profile</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/gamma/addNetworkProfile" method="POST">
+ <div class="form-group">
+ <label for="nf_network_type">*Network Type</label>
+ <input type="text" class="form-control" name="nf_network_type" id="nf_network_type" maxlength="100" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <label for="nf_technology">Technology</label>
+ <input type="text" class="form-control" name="nf_technology" id="nf_technology" maxlength="100" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="saveNetworkProfile(this.form);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<div class="modal fade" id="update_network_profile" tabindex="-1" role="dialog"
+ aria-labelledby="update_network_profile_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Network Profile</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/gamma/updateNetworkProfile" method="POST">
+ <div class="form-group">
+ <label for="uf_network_type">*Network Type</label>
+ <input type="text" class="form-control" maxlength="100" name="uf_network_type" id="uf_network_type" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <label for="uf_technology">Technology</label>
+ <input type="text" class="form-control" maxlength="100" name="uf_technology" id="uf_technology" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_network_type" id="uf_key_network_type">
+ <button type="button" class="btn btn-primary" onclick="saveNetworkProfile(this.form);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
diff --git a/admportal/views/partials/new_parameter.ejs b/admportal/views/partials/new_parameter.ejs
new file mode 100644
index 0000000..b6d1f5b
--- /dev/null
+++ b/admportal/views/partials/new_parameter.ejs
@@ -0,0 +1,36 @@
+ <div class="modal fade" id="new_parameter" tabindex="-1" role="dialog"
+ aria-labelledby="new_parameter_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add Parameter</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/admin/addParameter" method="POST">
+ <div class="form-group">
+ <label for="nf_name">*Name</label>
+ <input maxlength="100" type="text" class="form-control" name="nf_name" id="nf_name" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <label for="nf_value">*Value</label>
+ <input maxlength="100" type="text" class="form-control" name="nf_value" id="nf_value" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <label for="nf_category">Category</label>
+ <input maxlength="24" type="text" class="form-control" name="nf_category" id="nf_category" placeholder="varchar(24)">
+ </div>
+ <div class="form-group">
+ <label for="nf_memo">Memo</label>
+ <input maxlength="128" type="text" class="form-control" name="nf_memo" id="nf_memo" placeholder="varchar(128)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitParam(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/newuserform.ejs b/admportal/views/partials/newuserform.ejs
new file mode 100644
index 0000000..6045994
--- /dev/null
+++ b/admportal/views/partials/newuserform.ejs
@@ -0,0 +1,37 @@
+<div class="modal fade" id="newUserModal" tabindex="-1" role="dialog" aria-labelledby="newUserModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="newUserModalLabel">New User</h4>
+ </div>
+ <div class="modal-body">
+ <form id="addForm" name="addForm" role="form" action="/user/addUser" method="POST">
+ <div class="form-group">
+ <label for="email">Email</label>
+ <input type="email" class="form-control" name="nf_email" id="nf_email">
+ </div>
+ <div class="form-group">
+ <label for="nf_password">Password</label>
+ <input type="password" class="form-control" name="nf_password" id="nf_password">
+ </div>
+ <div class="form-group">
+ <label for="nf_confirm_password">Confirm Password</label>
+ <input type="password" class="form-control" name="nf_confirm_password" id="nf_confirm_password">
+ </div>
+ <div class="form-group">
+ <label for="privilege">Privilege</label>
+ <select class="form-control" name="nf_privilege" id="nf_privilege">
+ <option value=admin>Administrator</option>
+ <option value=readonly>Readonly</option>
+ </select>
+ </div>
+ <div class="form-group">
+ <button type="button" class="btn btn-primary" onclick="submitUserAdmin(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/admportal/views/partials/oper_status_modal.ejs b/admportal/views/partials/oper_status_modal.ejs
new file mode 100644
index 0000000..ae6cbe0
--- /dev/null
+++ b/admportal/views/partials/oper_status_modal.ejs
@@ -0,0 +1,68 @@
+ <div class="modal fade" id="oper-status-modal" tabindex="-1" role="dialog" aria-labelledby="oper-status-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="oper-status-modal-label">oper-status</h4>
+ </div>
+ <div class="modal-body">
+ <form id="oper_status_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="order_status">order-status</label>
+ <input type="text" class="form-control" name="order_status" id="order_status">
+ </div>
+ <div class="form-group">
+ <label for="modify_timestamp">modify-timestamp</label>
+ <input type="text" class="form-control" name="modify_timestamp" id="modify_timestamp">
+ </div>
+ <div class="form-group">
+ <label for="last_svc_request_id">last-svc-request-id</label>
+ <input type="text" class="form-control" name="last_svc_request_id" id="last_svc_request_id">
+ </div>
+ <div class="form-group">
+ <label for="last_sub_action">last-sub-action</label>
+ <input type="text" class="form-control" name="last_sub_action" id="last_sub_action">
+ </div>
+ <div class="form-group">
+ <label for="t_defaulted_v6_vrlan">t-defaulted-v6-vrlan</label>
+ <input type="text" class="form-control" name="t_defaulted_v6_vrlan" id="t_defaulted_v6_vrlan">
+ </div>
+ <div class="form-group">
+ <label for="last_action">last-action</label>
+ <input type="text" class="form-control" name="last_action" id="last_action">
+ </div>
+ <div class="form-group">
+ <label for="create_timestamp">create-timestamp</label>
+ <input type="text" class="form-control" name="create_timestamp" id="create_timestamp">
+ </div>
+ <div class="form-group">
+ <label for="maintenance_indicator">maintenance-indicator</label>
+ <input type="text" class="form-control" name="maintenance_indicator" id="maintenance_indicator">
+ </div>
+ <div class="form-group">
+ <label for="last_order_status">last-order-status</label>
+ <input type="text" class="form-control" name="last_order_status" id="last_order_status">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#service-status-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/owbc_properties.ejs b/admportal/views/partials/owbc_properties.ejs
new file mode 100644
index 0000000..0d64032
--- /dev/null
+++ b/admportal/views/partials/owbc_properties.ejs
@@ -0,0 +1,98 @@
+<div class="modal fade" id="add_owbc_properties" tabindex="-1" role="dialog"
+ aria-labelledby="add_owbc_properties_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add OWBC Properties</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/tunnel/addOwbcProperties" method="POST">
+ <div class="form-group">
+ <label for="nf_controller_id">*Controller ID</label>
+ <input type="text" class="form-control" maxlength="255" name="nf_controller_id" id="nf_controller_id" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_base_uri">*Base URL</label>
+ <input type="text" class="form-control" maxlength="255" name="nf_base_uri" id="nf_base_uri" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_service_create_extension">*Service Create Extension</label>
+ <input type="text" class="form-control" maxlength="255" name="nf_service_create_extension" id="nf_service_create_extension" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_service_delete_extension">*Service Delete Extension</label>
+ <input type="text" class="form-control" maxlength="255" name="nf_service_delete_extension" id="nf_service_delete_extension" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_auth_username">*Auth Username</label>
+ <input type="text" class="form-control" maxlength="80" name="nf_auth_username" id="nf_auth_username" placeholder="varchar(80)">
+ </div>
+ <div class="form-group">
+ <label for="nf_auth_password">*Auth Password</label>
+ <input type="password" class="form-control" maxlength="80" name="nf_auth_password" id="nf_auth_password" placeholder="varbinary(80)">
+ </div>
+ <div class="form-group">
+ <label for="nf_confirm_auth_password">*Confirm Auth Password</label>
+ <input type="password" class="form-control" maxlength="80" name="nf_confirm_auth_password" id="nf_confirm_auth_password" placeholder="varbinary(80)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitOwbcProperties(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal fade" id="update_owbc_properties" tabindex="-1" role="dialog"
+ aria-labelledby="update_owbc_properties_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update OWBC Properties</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/tunnel/updateOwbcProperties" method="POST">
+ <div class="form-group">
+ <label for="uf_controller_id">*Controller ID</label>
+ <input type="text" class="form-control" maxlength="255" name="uf_controller_id" id="uf_controller_id" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="uf_base_uri">*Base URL</label>
+ <input type="text" class="form-control" maxlength="255" name="uf_base_uri" id="uf_base_uri" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="uf_service_create_extension">*Service Create Extension</label>
+ <input type="text" class="form-control" maxlength="255" name="uf_service_create_extension" id="uf_service_create_extension" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="uf_service_delete_extension">*Service Delete Extension</label>
+ <input type="text" class="form-control" maxlength="255" name="uf_service_delete_extension" id="uf_service_delete_extension" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="uf_auth_username">*Auth Username</label>
+ <input type="text" class="form-control" maxlength="80" name="uf_auth_username" id="uf_auth_username" placeholder="varchar(80)">
+ </div>
+ <div class="form-group">
+ <label for="uf_auth_password">*Auth Password</label>
+ <input type="password" class="form-control" maxlength="80" name="uf_auth_password" id="uf_auth_password" placeholder="varbinary(80)">
+ </div>
+ <div class="form-group">
+ <label for="uf_confirm_auth_password">*Confirm Auth Password</label>
+ <input type="password" class="form-control" maxlength="80" name="uf_confirm_auth_password" id="uf_confirm_auth_password" placeholder="varbinary(80)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_controller_id" id="uf_key_controller_id">
+ <button type="button" class="btn btn-primary" onclick="submitOwbcProperties(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/partner_properties.ejs b/admportal/views/partials/partner_properties.ejs
new file mode 100644
index 0000000..1f1d601
--- /dev/null
+++ b/admportal/views/partials/partner_properties.ejs
@@ -0,0 +1,74 @@
+<div class="modal fade" id="add_partner_properties" tabindex="-1" role="dialog"
+ aria-labelledby="add_partner_properties_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add Partner Properties</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/tunnel/addPartnerProperties" method="POST">
+ <div class="form-group">
+ <label for="nf_partner">*Partner</label>
+ <input type="text" class="form-control" maxlength="100" name="nf_partner" id="nf_partner" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <label for="nf_auth_username">*Auth Username</label>
+ <input type="text" class="form-control" maxlength="80" name="nf_auth_username" id="nf_auth_username" placeholder="varchar(80)">
+ </div>
+ <div class="form-group">
+ <label for="nf_auth_password">*Auth Password</label>
+ <input type="password" class="form-control" maxlength="255" name="nf_auth_password" id="nf_auth_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_confirm_auth_password">*Confirm Auth Password</label>
+ <input type="password" class="form-control" maxlength="255" name="nf_confirm_auth_password" id="nf_confirm_auth_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitPartnerProperties(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal fade" id="update_partner_properties" tabindex="-1" role="dialog"
+ aria-labelledby="update_partner_properties_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Partner Properties</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/tunnel/updatePartnerProperties" method="POST">
+ <div class="form-group">
+ <label for="uf_partner">*Partner</label>
+ <input type="text" class="form-control" maxlength="100" name="uf_partner" id="uf_partner" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <label for="uf_auth_username">*Auth Username</label>
+ <input type="text" class="form-control" maxlength="80" name="uf_auth_username" id="uf_auth_username" placeholder="varchar(80)">
+ </div>
+ <div class="form-group">
+ <label for="uf_auth_password">*Auth Password</label>
+ <input type="password" class="form-control" maxlength="255" name="uf_auth_password" id="uf_auth_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <label for="uf_confirm_auth_password">*Confirm Auth Password</label>
+ <input type="password" class="form-control" maxlength="255" name="uf_confirm_auth_password" id="uf_confirm_auth_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_partner" id="uf_key_partner">
+ <button type="button" class="btn btn-primary" onclick="submitPartnerProperties(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/pat.ejs b/admportal/views/partials/pat.ejs
new file mode 100644
index 0000000..8cc9155
--- /dev/null
+++ b/admportal/views/partials/pat.ejs
@@ -0,0 +1,50 @@
+ <div class="modal fade" id="pat-modal" tabindex="-1" role="dialog"
+ aria-labelledby="pat-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">pat</h4>
+ </div>
+ <div class="modal-body">
+ <form id="pat_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="v4_pat_default_pool_prefix_length">v4-pat-default-pool-prefix-length</label>
+ <input type="text" class="form-control" name="v4_pat_default_pool_prefix_length" id="v4_pat_default_pool_prefix_length">
+ </div>
+ <div class="form-group">
+ <label for="use_v4_default_pool">use-v4-default-pool</label>
+ <input type="text" class="form-control" name="use_v4_default_pool" id="use_v4_default_pool">
+ </div>
+ <div class="form-group">
+ <label for="v4_pat_enabled">v4-pat-enabled</label>
+ <input type="text" class="form-control" name="v4_pat_enabled" id="v4_pat_enabled">
+ </div>
+ <div class="form-group">
+ <label for="v4_pat_default_pool_prefix">v4-pat-default-pool-prefix</label>
+ <input type="text" class="form-control" name="v4_pat_default_pool_prefix" id="v4_pat_default_pool_prefix">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#pat-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/pat_pools.ejs b/admportal/views/partials/pat_pools.ejs
new file mode 100644
index 0000000..5b0b3f0
--- /dev/null
+++ b/admportal/views/partials/pat_pools.ejs
@@ -0,0 +1,46 @@
+ <div class="modal fade" id="pat-pools-modal" tabindex="-1" role="dialog"
+ aria-labelledby="pat-pools-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">v4-pat-pools</h4>
+ </div>
+ <div class="modal-body">
+ <form id="pat_pools-form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="v4_pat__pool_next_hop_address">v4-pat-pool-next-hop-address</label>
+ <input type="text" class="form-control" name="v4_pat_pool_next_hop_address" id="v4_pat_pool_next_hop_address">
+ </div>
+ <div class="form-group">
+ <label for="v4_pat_pool_prefix_length">v4-pat-pool-prefix-length</label>
+ <input type="text" class="form-control" name="v4_pat_pool_prefix_length" id="v4_pat_pool_prefix_length">
+ </div>
+ <div class="form-group">
+ <label for="v4_pat_pool_prefix">v4-pat-pool-prefix</label>
+ <input type="text" class="form-control" name="v4_pat_pool_prefix" id="v4_pat_pool_prefix">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#pat-pools-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/phs_credentials.ejs b/admportal/views/partials/phs_credentials.ejs
new file mode 100644
index 0000000..4413dca
--- /dev/null
+++ b/admportal/views/partials/phs_credentials.ejs
@@ -0,0 +1,92 @@
+<div class="modal fade" id="add_phs_credentials" tabindex="-1" role="dialog"
+ aria-labelledby="add_phs_credentials_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add PHS Credentials</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/ucpe/addPhsCredentials" method="POST">
+ <div class="form-group">
+ <label for="nf_device_vendor_name">*Device Vendor Name</label>
+ <input type="text" class="form-control" maxlength="255" aria-describedby="helpVName" name="nf_device_vendor_name" id="nf_device_vendor_name" placeholder="varchar(255)">
+ <span id="helpVName" class="help-block">The Device Vendor Name must match exactly whats in the PHS Servers table.</span>
+ </div>
+ <div class="form-group">
+ <label for="nf_customer_name">*Customer Name</label>
+ <input type="text" class="form-control" maxlength="255" aria-describedby="helpCName" name="nf_customer_name" id="nf_customer_name" placeholder="varchar(255)">
+ <span id="helpCName" class="help-block">The Customer Name must match exactly whats in the PHS Servers table.</span>
+ </div>
+ <div class="form-group">
+ <label for="nf_ip_addresses">*IP Addresses</label>
+ <input type="text" class="form-control" maxlength="40" aria-describedby="helpIP" name="nf_ip_addresses" id="nf_ip_addresses" placeholder="varchar(40)">
+ <span id="helpIP" class="help-block">The IP Addresses must match exactly whats in the PHS Servers table.</span>
+ </div>
+ <div class="form-group">
+ <label for="nf_phs_username">*PHS Username</label>
+ <input type="text" class="form-control" maxlength="255" name="nf_phs_username" id="nf_phs_username" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_phs_password">*PHS Password</label>
+ <input type="password" class="form-control" maxlength="255" name="nf_phs_password" id="nf_phs_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_phs_password">*Confirm PHS Password</label>
+ <input type="password" class="form-control" maxlength="255" name="nf_confirm_phs_password" id="nf_confirm_phs_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitPhsCredentials(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal fade" id="update_phs_credentials" tabindex="-1" role="dialog"
+ aria-labelledby="update_phs_credentials_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update PHS Credentials</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/ucpe/updatePhsCredentials" method="POST">
+ <div class="form-group">
+ <label for="uf_device_vendor_name">*Device Vendor Name</label>
+ <input readonly type="text" class="form-control" name="uf_device_vendor_name" id="uf_device_vendor_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_customer_name">*Customer Name</label>
+ <input readonly type="text" class="form-control" name="uf_customer_name" id="uf_customer_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_ip_addresses">*IP Addresses</label>
+ <input readonly type="text" class="form-control" name="uf_ip_addresses" id="uf_ip_addresses">
+ </div>
+ <div class="form-group">
+ <label for="uf_phs_username">*PHS Username</label>
+ <input type="text" class="form-control" maxlength="255" name="uf_phs_username" id="uf_phs_username">
+ </div>
+ <div class="form-group">
+ <label for="uf_phs_password">*PHS Password</label>
+ <input type="password" class="form-control" maxlength="255" name="uf_phs_password" id="uf_phs_password">
+ </div>
+ <div class="form-group">
+ <label for="uf_phs_password">*Confirm PHS Password</label>
+ <input type="password" class="form-control" maxlength="255" name="uf_confirm_phs_password" id="uf_confirm_phs_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submitPhsCredentials(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/request_information_modal.ejs b/admportal/views/partials/request_information_modal.ejs
new file mode 100644
index 0000000..b5ee4a3
--- /dev/null
+++ b/admportal/views/partials/request_information_modal.ejs
@@ -0,0 +1,60 @@
+ <div class="modal fade" id="request-information-modal" tabindex="-1" role="dialog" aria-labelledby="request-information-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="request-information-modal-label">request-information</h4>
+ </div>
+ <div class="modal-body">
+ <form id="request_information_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="notification_url">notification-url</label>
+ <input type="text" class="form-control" name="notification_url" id="notification_url">
+ </div>
+ <div class="form-group">
+ <label for="source">source</label>
+ <input type="text" class="form-control" name="source" id="source">
+ </div>
+ <div class="form-group">
+ <label for="order_number">order-number</label>
+ <input type="text" class="form-control" name="order_number" id="order_number">
+ </div>
+ <div class="form-group">
+ <label for="request_id">request-id</label>
+ <input type="text" class="form-control" name="request_id" id="request_id">
+ </div>
+ <div class="form-group">
+ <label for="order_version">order-version</label>
+ <input type="text" class="form-control" name="order_version" id="order_version">
+ </div>
+ <div class="form-group">
+ <label for="request_action">request-action</label>
+ <input type="text" class="form-control" name="request_action" id="request_action">
+ </div>
+ <div class="form-group">
+ <label for="request_sub_action">request-sub-action</label>
+ <input type="text" class="form-control" name="request_sub_action" id="request_sub_action">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#service-status-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/resource_rule.ejs b/admportal/views/partials/resource_rule.ejs
new file mode 100644
index 0000000..05d0bf4
--- /dev/null
+++ b/admportal/views/partials/resource_rule.ejs
@@ -0,0 +1,118 @@
+<div class="modal fade" id="add_resource_rule" tabindex="-1" role="dialog"
+ aria-labelledby="add_resource_rule_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add Resource Rule</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/resalloc/addResourceRule" method="POST">
+ <div class="form-group">
+ <label for="nf_resource_name">*Name</label>
+ <input type="text" class="form-control" maxlength="50" name="nf_resource_name" id="nf_resource_name" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="nf_end_point_position">*End Point Position</label>
+ <input type="text" class="form-control" maxlength="50" name="nf_end_point_position" id="nf_end_point_position" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="nf_service_expression">*Service Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="nf_service_expression" id="nf_service_expression" placeholder="varchar(2000)">
+ </div>
+ <div class="form-group">
+ <label for="nf_equipment_level">*Equipment Level</label>
+ <input type="text" class="form-control" maxlength="50" name="nf_equipment_level" id="nf_equipment_level" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="nf_equipment_expression">*Equipment Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="nf_equipment_expression" id="nf_equipment_expression" placeholder="varchar(2000)">
+ </div>
+ <div class="form-group">
+ <label for="nf_allocation_expression">*Allocation Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="nf_allocation_expression" id="nf_allocation_expression" placeholder="varchar(2000)">
+ </div>
+ <div class="form-group">
+ <label for="nf_soft_limit_expression">*Soft Limit Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="nf_soft_limit_expression" id="nf_soft_limit_expression" placeholder="varchar(2000)">
+ </div>
+ <div class="form-group">
+ <label for="nf_hard_limit_expression">*Hard Limit Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="nf_hard_limit_expression" id="nf_hard_limit_expression" placeholder="varchar(2000)">
+ </div>
+ <div class="form-group">
+ <label for="nf_service_model">*Service Model</label>
+ <input type="text" class="form-control" maxlength="50" name="nf_service_model" id="nf_service_model" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitResourceRule(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal fade" id="update_resource_rule" tabindex="-1" role="dialog"
+ aria-labelledby="update_resource_rule_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Resource Rule</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/resalloc/updateResourceRule" method="POST">
+ <div class="form-group">
+ <label for="uf_resource_rule_id">*Rule ID</label>
+ <input readonly type="text" class="form-control" name="uf_resource_rule_id" id="uf_resource_rule_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_resource_name">*Name</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_resource_name" id="uf_resource_name" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="uf_end_point_position">*End Point Position</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_end_point_position" id="uf_end_point_position" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="uf_service_expression">*Service Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="uf_service_expression" id="uf_service_expression" placeholder="varchar(2000)">
+ </div>
+ <div class="form-group">
+ <label for="uf_equipment_level">*Equipment Level</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_equipment_level" id="uf_equipment_level" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="uf_equipment_expression">*Equipment Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="uf_equipment_expression" id="uf_equipment_expression" placeholder="varchar(2000)">
+ </div>
+ <div class="form-group">
+ <label for="uf_allocation_expression">*Allocation Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="uf_allocation_expression" id="uf_allocation_expression" placeholder="varchar(2000)">
+ </div>
+ <div class="form-group">
+ <label for="uf_soft_limit_expression">*Soft Limit Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="uf_soft_limit_expression" id="uf_soft_limit_expression" placeholder="varchar(2000)">
+ </div>
+ <div class="form-group">
+ <label for="uf_hard_limit_expression">*Hard Limit Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="uf_hard_limit_expression" id="uf_hard_limit_expression" placeholder="varchar(2000)">
+ </div>
+ <div class="form-group">
+ <label for="uf_service_model">*Service Model</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_service_model" id="uf_service_model" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_resource_rule_id" id="uf_key_resource_rule_id">
+ <button type="button" class="btn btn-primary" onclick="submitResourceRule(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/ro_header.ejs b/admportal/views/partials/ro_header.ejs
new file mode 100644
index 0000000..2e5624a
--- /dev/null
+++ b/admportal/views/partials/ro_header.ejs
@@ -0,0 +1,43 @@
+<!-- views/partials/header.ejs -->
+<nav class="navbar navbar-default" role="navigation">
+ <div class="container-fluid">
+
+
+ <div class="navbar-header">
+ <a class="navbar-brand" href="#"> SDN-C AdminPortal</a>
+ </div>
+
+ <div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
+
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn" disabled>SLA</button>
+
+ <div class="btn-group" role="group">
+ <button disabled type="button" class="btn btn-default navbar-btn dropdown-toggle"
+ data-toggle="dropdown" aria-expanded="false">Table Initialization <span class="caret"></span></button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="/gamma/getAicSite">AIC Site</a></li>
+ <li><a href="/gamma/getAicSwitch">AIC Switch</a></li>
+ <li><a href="/gamma/getAicAvailZone">AIC Availability Zone</a></li>
+ <li><a href="/gamma/getVlanPool">VLAN_ID Pool</a></li>
+ <li><a href="/gamma/getVpePool">VPE Pool</a></li>
+ <li><a href="/gamma/getVplspePool">VPLSPE Pool</a></li>
+ <!-- <li class="divider"></li> -->
+ </ul>
+ </div>
+
+ <button type="button" class="btn btn-default navbar-btn" disabled>Interfaces</button>
+ <button type="button" class="btn btn-default navbar-btn" disabled>VMs</button>
+ <button disabled type="button" class="btn btn-default navbar-btn"
+ onclick="location.assign('/odl/listWklst');">Worklist Orders</button>
+ <button type="button" class="btn btn-default navbar-btn" disabled>Connections</button>
+ <button type="button" class="btn btn-default navbar-btn" disabled>VNFs</button>
+ <button type="button" class="btn btn-default navbar-btn" disabled>VLANs</button>
+ <button disabled type="button" class="btn btn-default navbar-btn"
+ onclick="location.assign('/user/listUsers');">User Admin</button>
+ <button disabled type="button" class="btn btn-default navbar-btn"
+ onclick="location.assign('/logout');">Logout</button>
+ </div>
+ </div>
+ </div>
+</nav>
diff --git a/admportal/views/partials/roadm_mapping.ejs b/admportal/views/partials/roadm_mapping.ejs
new file mode 100644
index 0000000..0e3a6fb
--- /dev/null
+++ b/admportal/views/partials/roadm_mapping.ejs
@@ -0,0 +1,101 @@
+<div class="modal fade" id="add_roadm_mapping" tabindex="-1" role="dialog"
+ aria-labelledby="add_roadm_mapping_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add ROADM Mapping</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/tunnel/addRoadmMapping" method="POST">
+ <div class="form-group">
+ <label for="nf_router_name">*Router Name</label>
+ <input type="text" class="form-control" name="nf_router_name" id="nf_router_name" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_roadm_name">*ROADM Name</label>
+ <input type="text" class="form-control" name="nf_roadm_name" id="nf_roadm_name" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_clli">*CLLI</label>
+ <input type="text" class="form-control" name="nf_clli" id="nf_clli" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_city_name">*City Name</label>
+ <input type="text" class="form-control" name="nf_city_name" id="nf_city_name" maxlength="80" placeholder="varchar(80)">
+ </div>
+ <div class="form-group">
+ <label for="nf_lat">*Latitude</label>
+ <input type="text" class="form-control" name="nf_lat" id="nf_lat" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_lon">*Longitude</label>
+ <input type="text" class="form-control" name="nf_lon" id="nf_lon" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_snrc">*SNRC</label>
+ <input type="text" class="form-control" name="nf_snrc" id="nf_snrc" maxlength="20" placeholder="varchar(20)">
+ </div>
+
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="saveRoadmMapping(this.form);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div class="modal fade" id="update_roadm_mapping" tabindex="-1" role="dialog"
+ aria-labelledby="update_roadm_mapping_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update ROADM Mapping</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/tunnel/updateRoadmMapping" method="POST">
+ <div class="form-group">
+ <label for="uf_router_name">*Router Name</label>
+ <input type="text" class="form-control" name="uf_router_name" id="uf_router_name" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_roadm_name">*ROADM Name</label>
+ <input type="text" class="form-control" name="uf_roadm_name" id="uf_roadm_name" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_clli">*CLLI</label>
+ <input type="text" class="form-control" name="uf_clli" id="uf_clli" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_city_name">*City Name</label>
+ <input type="text" class="form-control" name="uf_city_name" id="uf_city_name" maxlength="80" placeholder="varchar(80)">
+ </div>
+ <div class="form-group">
+ <label for="uf_lat">*Latitude</label>
+ <input type="text" class="form-control" name="uf_lat" id="uf_lat" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_lon">*Longitude</label>
+ <input type="text" class="form-control" name="uf_lon" id="uf_lon" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_snrc">*SNRC</label>
+ <input type="text" class="form-control" name="uf_snrc" id="uf_snrc" maxlength="20" placeholder="varchar(20)">
+ </div>
+
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_router_name" id="uf_key_router_name">
+ <button type="button" class="btn btn-primary" onclick="saveRoadmMapping(this.form);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
+
diff --git a/admportal/views/partials/router_master.ejs b/admportal/views/partials/router_master.ejs
new file mode 100644
index 0000000..9b731b4
--- /dev/null
+++ b/admportal/views/partials/router_master.ejs
@@ -0,0 +1,59 @@
+ <div class="modal fade" id="add_router_master" tabindex="-1" role="dialog"
+ aria-labelledby="add_router_master_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add Router Master</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/tunnel/addRouterMaster" method="POST">
+ <div class="form-group">
+ <label for="nf_crs_name">*CRS Name</label>
+ <input type="text" class="form-control" name="nf_crs_name" id="nf_crs_name" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_loopback_ip">Loopback IP</label>
+ <input type="text" class="form-control" name="nf_loopback_ip" id="nf_loopback_ip" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="saveRouterMaster(this.form);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<div class="modal fade" id="update_router_master" tabindex="-1" role="dialog"
+ aria-labelledby="update_router_master_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Router Master</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/tunnel/updateRouterMaster" method="POST">
+ <div class="form-group">
+ <label for="uf_crs_name">*CRS Name</label>
+ <input type="text" class="form-control" name="uf_crs_name" id="uf_crs_name" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_loopback_ip">Loopback IP</label>
+ <input type="text" class="form-control" name="uf_loopback_ip" id="uf_loopback_ip" maxlength="20" placeholder="varchar(20)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_crs_name" id="uf_key_crs_name">
+ <button type="button" class="btn btn-primary" onclick="saveRouterMaster(this.form);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
diff --git a/admportal/views/partials/routing_protocol.ejs b/admportal/views/partials/routing_protocol.ejs
new file mode 100644
index 0000000..1bd647f
--- /dev/null
+++ b/admportal/views/partials/routing_protocol.ejs
@@ -0,0 +1,38 @@
+ <div class="modal fade" id="routing-protocol-modal" tabindex="-1" role="dialog"
+ aria-labelledby="routing-protocol-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">routing-protocol</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="routing_protocol">routing-protocol</label>
+ <input type="text" class="form-control" name="routing_protocol" id="routing_protocol">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#routing-protocol-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/sdnc_request_header_modal.ejs b/admportal/views/partials/sdnc_request_header_modal.ejs
new file mode 100644
index 0000000..08ae186
--- /dev/null
+++ b/admportal/views/partials/sdnc_request_header_modal.ejs
@@ -0,0 +1,46 @@
+ <div class="modal fade"
+ id="sdnc-request-header-modal" tabindex="-1" role="dialog"
+ aria-labelledby="sdnc-request-header-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="sdnc-request-header-modal-label">sdnc-request-header</h4>
+ </div>
+ <div class="modal-body">
+ <form id="sdnc_request_header_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="svc_notification_url">svc-notification-url</label>
+ <input type="text" class="form-control" name="svc_notification_url" id="svc_notification_url">
+ </div>
+ <div class="form-group">
+ <label for="svc_request_id">svc-request-id</label>
+ <input type="text" class="form-control" name="svc_request_id" id="svc_request_id">
+ </div>
+ <div class="form-group">
+ <label for="svc_action">svc-action</label>
+ <input type="text" class="form-control" name="svc_action" id="svc_action">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#service-status-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/sdnfcHeader.ejs b/admportal/views/partials/sdnfcHeader.ejs
new file mode 100644
index 0000000..ba963ab
--- /dev/null
+++ b/admportal/views/partials/sdnfcHeader.ejs
@@ -0,0 +1,61 @@
+<title>SDN-FC AdminPortal</title>
+
+<!-- views/partials/header.ejs -->
+<nav class="navbar navbar-default" role="navigation">
+ <div class="container-fluid">
+
+
+ <div class="navbar-header">
+ <a class="navbar-brand" href="#"> SDN-FC AdminPortal</a>
+ </div>
+
+ <div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
+
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn "
+ onclick="location.assign('/sla/listSLA');">SLA</button>
+
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn dropdown-toggle"
+ data-toggle="dropdown" aria-expanded="false" vlanidpool-submenu>Table Management <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="/sdnfc/getTables">View Tables</a></li>
+ <li class="divider"></li>
+ <li><a href="/sdnfc/getVrrCredentials">VRR Credentials</a></li>
+ <li><a href="/sdnfc/getBgpUpdates">BGP Updates</a></li>
+ <li><a href="/sdnfc/getCliUpdates">CLI Updates</a></li>
+ <li class="divider"></li>
+ <li><a href="/admin/getParameters">Parameters</a></li>
+ </ul>
+ </div>
+
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn dropdown-toggle"
+ data-toggle="dropdown"
+ aria-expanded="false">ODL <span class="caret"></span></button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="/odl/getClusterStatus">Get Cluster Status</a></li>
+ </ul>
+ </div>
+
+ <!-- LOGS -->
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn dropdown-toggle"
+ data-toggle="dropdown"
+ aria-expanded="false">Logs <span class="caret"></span></button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="/logs/getUserTrace">User Trace</a></li>
+ <li><a href="/logs/getAccessLog">Access Log</a></li>
+ </ul>
+ </div>
+
+ <button type="button" class="btn btn-default navbar-btn"
+ onclick="location.assign('/user/listUsers');">User Admin</button>
+ <button type="button" class="btn btn-default navbar-btn"
+ onclick="location.assign('/logout');">Logout</button>
+ </div>
+ </div>
+ </div>
+
+</nav>
diff --git a/admportal/views/partials/sdnmlcHeader.ejs b/admportal/views/partials/sdnmlcHeader.ejs
new file mode 100644
index 0000000..3dc768f
--- /dev/null
+++ b/admportal/views/partials/sdnmlcHeader.ejs
@@ -0,0 +1,63 @@
+<title>SDNC-MLC AdminPortal</title>
+
+<!-- views/partials/header.ejs -->
+<nav class="navbar navbar-default" role="navigation">
+ <div class="container-fluid">
+
+
+ <div class="navbar-header">
+ <a class="navbar-brand" href="#"> SDNC-MLC AdminPortal</a>
+ </div>
+
+ <div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
+
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn "
+ onclick="location.assign('/sla/listSLA');">SLA</button>
+
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn dropdown-toggle"
+ data-toggle="dropdown" aria-expanded="false" vlanidpool-submenu>Table Management <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="/tunnel/getRouterMaster">Router Master</a></li>
+ <li><a href="/tunnel/getLinkMaster">Link Master</a></li>
+ <li><a href="/tunnel/getRoadmMapping">ROADM Mapping</a></li>
+ <li><a href="/tunnel/getOwbcProperties">OWBC Properties</a></li>
+ <li><a href="/tunnel/getMetroRoadmServiceRequest">Metro ROADM Service Request</a></li>
+ <li><a href="/tunnel/getLinkLatencyMaster">Link Latency Master</a></li>
+ <li><a href="/tunnel/getPartnerProperties">Partner Properties</a></li>
+ <li class="divider"></li>
+ <li><a href="/admin/getParameters">Parameters</a></li>
+ </ul>
+ </div>
+
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn dropdown-toggle"
+ data-toggle="dropdown"
+ aria-expanded="false">ODL <span class="caret"></span></button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="/odl/getClusterStatus">Get Cluster Status</a></li>
+ </ul>
+ </div>
+
+ <!-- LOGS -->
+ <div class="btn-group" role="group">
+ <button type="button" class="btn btn-default navbar-btn dropdown-toggle"
+ data-toggle="dropdown"
+ aria-expanded="false">Logs <span class="caret"></span></button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="/logs/getUserTrace">User Trace</a></li>
+ <li><a href="/logs/getAccessLog">Access Log</a></li>
+ </ul>
+ </div>
+
+ <button type="button" class="btn btn-default navbar-btn"
+ onclick="location.assign('/user/listUsers');">User Admin</button>
+ <button type="button" class="btn btn-default navbar-btn"
+ onclick="location.assign('/logout');">Logout</button>
+ </div>
+ </div>
+ </div>
+
+</nav>
diff --git a/admportal/views/partials/service_information_modal.ejs b/admportal/views/partials/service_information_modal.ejs
new file mode 100644
index 0000000..7adf4aa
--- /dev/null
+++ b/admportal/views/partials/service_information_modal.ejs
@@ -0,0 +1,46 @@
+ <div class="modal fade"
+ id="service-information-modal" tabindex="-1" role="dialog"
+ aria-labelledby="service-information-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="service-information-modal-label">Service Information</h4>
+ </div>
+ <div class="modal-body">
+ <form id="service_information_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="service_instance_id">service-instance-id</label>
+ <input type="text" class="form-control" name="service_instance_id" id="service_instance_id">
+ </div>
+ <div class="form-group">
+ <label for="subscriber_name">subscriber-name</label>
+ <input type="text" class="form-control" name="subscriber_name" id="subscriber_name">
+ </div>
+ <div class="form-group">
+ <label for="service_type">service-type</label>
+ <input type="text" class="form-control" name="service_type" id="service_type">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#service-status-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/service_manager_credentials.ejs b/admportal/views/partials/service_manager_credentials.ejs
new file mode 100644
index 0000000..655d176
--- /dev/null
+++ b/admportal/views/partials/service_manager_credentials.ejs
@@ -0,0 +1,65 @@
+<div class="modal fade" id="add_service_manager_credentials" tabindex="-1" role="dialog"
+ aria-labelledby="add_service_manager_credentials_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add Service Manager Credentials</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/ucpe/addServiceManagerCredentials" method="POST">
+ <div class="form-group">
+ <label for="nf_service_manager_username">*Service Manager Username</label>
+ <input type="text" class="form-control" maxlength="255" name="nf_service_manager_username" id="nf_service_manager_username" placeholder="varchar(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_service_manager_password">*Service Manager Password</label>
+ <input type="password" class="form-control" maxlength="255" name="nf_service_manager_password" id="nf_service_manager_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_confirm_service_manager_password">*Confirm Service Manager Password</label>
+ <input type="password" class="form-control" maxlength="255" name="nf_confirm_service_manager_password" id="nf_confirm_service_manager_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitServiceManagerCredentials(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal fade" id="update_service_manager_credentials" tabindex="-1" role="dialog"
+ aria-labelledby="update_service_manager_credentials_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Service Manager Credentials</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/ucpe/updateServiceManagerCredentials" method="POST">
+ <div class="form-group">
+ <label for="uf_service_manager_username">*Service Manager Username</label>
+ <input type="text" class="form-control" maxlength="255" name="uf_service_manager_username" id="uf_service_manager_username">
+ </div>
+ <div class="form-group">
+ <label for="uf_service_manager_password">*Service Manager Password</label>
+ <input type="password" class="form-control" maxlength="255" name="uf_service_manager_password" id="uf_service_manager_password">
+ </div>
+ <div class="form-group">
+ <label for="uf_confirm_service_manager_password">*Confirm Service Manager Password</label>
+ <input type="password" class="form-control" maxlength="255" name="uf_confirm_service_manager_password" id="uf_confirm_service_manager_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submitServiceManagerCredentials(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/service_status_modal.ejs b/admportal/views/partials/service_status_modal.ejs
new file mode 100644
index 0000000..8da4fcb
--- /dev/null
+++ b/admportal/views/partials/service_status_modal.ejs
@@ -0,0 +1,68 @@
+ <div class="modal fade" id="service-status-modal" tabindex="-1" role="dialog" aria-labelledby="service-status-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="service-status-modal-label">SERVICE-STATUS</h4>
+ </div>
+ <div class="modal-body">
+ <form id="service_status_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="rpc_name">rpc-name</label>
+ <input type="text" class="form-control" name="rpc_name" id="rpc_name">
+ </div>
+ <div class="form-group">
+ <label for="final_indicator">final-indicator</label>
+ <input type="text" class="form-control" name="final_indicator" id="final_indicator">
+ </div>
+ <div class="form-group">
+ <label for="request_status">request-status</label>
+ <input type="text" class="form-control" name="request_status" id="request_status">
+ </div>
+ <div class="form-group">
+ <label for="rpc_action">rpc-action</label>
+ <input type="text" class="form-control" name="rpc_action" id="rpc_action">
+ </div>
+ <div class="form-group">
+ <label for="l3sdn_action">l3sdn-action</label>
+ <input type="text" class="form-control" name="l3sdn_action" id="l3sdn_action">
+ </div>
+ <div class="form-group">
+ <label for="l3sdn_subaction">l3sdn-subaction</label>
+ <input type="text" class="form-control" name="l3sdn_subaction" id="l3sdn_subaction">
+ </div>
+ <div class="form-group">
+ <label for="response_message">response-message</label>
+ <input type="text" class="form-control" name="response_message" id="response_message">
+ </div>
+ <div class="form-group">
+ <label for="response_code">response-code</label>
+ <input type="text" class="form-control" name="response_code" id="response_code">
+ </div>
+ <div class="form-group">
+ <label for="response_timestamp">response-timestamp</label>
+ <input type="text" class="form-control" name="response_timestamp" id="response_timestamp">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#service-status-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/startssl.sh b/admportal/views/partials/startssl.sh
new file mode 100755
index 0000000..a56570e
--- /dev/null
+++ b/admportal/views/partials/startssl.sh
@@ -0,0 +1,28 @@
+#. ./set-https-env.sh
+#cd ../bin
+#cp ../config/config.json.https ../config/config.json
+export PROJECT_HOME=/opt/openecomp/sdnc
+export PROJECT_RUNTIME_BASE=/opt/openecomp/sdnc
+#export JAVA_HOME=/usr/lib/jvm/java-7-oracle
+export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
+export SSL_ENABLED=false
+export SDNC_CONFIG_DIR=${PROJECT_HOME}/data/properties
+export NODE_ENV=production
+export CLASSPATH=$PROJECT_HOME/admportal/lib:$CLASSPATH
+
+PATH=${PATH}:${JAVA_HOME}/bin
+
+#. ${PROJECT_HOME}/etc/default.env
+
+MAIN_MENU=`python $PROJECT_HOME/admportal/shell/getAdmPortalProp.py MainMenu | sed -e 's|['\'']||g'`
+export MAIN_MENU
+SSL_ENABLED=`python $PROJECT_HOME/admportal/shell/getAdmPortalProp.py sslEnabled | sed -e 's|['\'']||g'`
+export SSL_ENABLED
+
+cd ..
+node bin/www
+#if [ "true" == "${SSL_ENABLED}" ]; then
+ #pm2 startOrRestart process.https.json
+#else
+ #pm2 startOrRestart process.http.json
+#fi
diff --git a/admportal/views/partials/svc_config_additional_data.ejs b/admportal/views/partials/svc_config_additional_data.ejs
new file mode 100644
index 0000000..14cfd03
--- /dev/null
+++ b/admportal/views/partials/svc_config_additional_data.ejs
@@ -0,0 +1,38 @@
+ <div class="modal fade"
+ id="svc-config-additional-data-modal" tabindex="-1" role="dialog"
+ aria-labelledby="svc-config-additional-data-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">svc-config-additional-data</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="management_ip">management-ip</label>
+ <input type="text" class="form-control" name="management_ip" id="management_ip">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#svc-config-additional-data-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/svc_topology_additional_data_modal.ejs b/admportal/views/partials/svc_topology_additional_data_modal.ejs
new file mode 100644
index 0000000..9117dd9
--- /dev/null
+++ b/admportal/views/partials/svc_topology_additional_data_modal.ejs
@@ -0,0 +1,36 @@
+ <div class="modal fade" id="svc-topology-additional-data-modal" tabindex="-1" role="dialog" aria-labelledby="svc_topology-additional-data-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="svc-topology-additional-data-modal-label">Service Topology Additional Data</h4>
+ </div>
+ <div class="modal-body">
+ <form id="svc_topology_additional_data_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="svc_vnf_type">svc-vnf-type</label>
+ <input type="text" class="form-control" name="svc_vnf_type" id="svc_vnf_type">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#service-status-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/t_provided_v4_lan_public_prefixes.ejs b/admportal/views/partials/t_provided_v4_lan_public_prefixes.ejs
new file mode 100644
index 0000000..d7ced07
--- /dev/null
+++ b/admportal/views/partials/t_provided_v4_lan_public_prefixes.ejs
@@ -0,0 +1,46 @@
+ <div class="modal fade" id="t-provided-v4-lan-public-prefixes-modal" tabindex="-1" role="dialog"
+ aria-labelledby="t-provided-v4-lan-public-prefixes-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">t-provided-v4-lan-public-prefixes</h4>
+ </div>
+ <div class="modal-body">
+ <form id="t_provided_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="request_index">request-index</label>
+ <input type="text" class="form-control" name="v4_request_index" id="v4_request_index">
+ </div>
+ <div class="form-group">
+ <label for="v4_lan_public_prefix_length">v4-lan-public-prefix-length</label>
+ <input type="text" class="form-control" name="v4_lan_public_prefix_length" id="v4_lan_public_prefix_length">
+ </div>
+ <div class="form-group">
+ <label for="v4_lan_public_prefix">v4-lan-public-prefix</label>
+ <input type="text" class="form-control" name="v4_lan_public_prefix" id="v4_lan_public_prefix">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#t-provided-v4-lan-public-prefixes-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/t_provided_v6_lan_public_prefixes.ejs b/admportal/views/partials/t_provided_v6_lan_public_prefixes.ejs
new file mode 100644
index 0000000..f044303
--- /dev/null
+++ b/admportal/views/partials/t_provided_v6_lan_public_prefixes.ejs
@@ -0,0 +1,46 @@
+ <div class="modal fade" id="t-provided-v6-lan-public-prefixes-modal" tabindex="-1" role="dialog"
+ aria-labelledby="t-provided-v6-lan-public-prefixes-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">t-provided-v6-lan-public-prefixes</h4>
+ </div>
+ <div class="modal-body">
+ <form id="t_provided_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="request_index">request-index</label>
+ <input type="text" class="form-control" name="v6_request_index" id="v6_request_index">
+ </div>
+ <div class="form-group">
+ <label for="v6_lan_public_prefix_length">v6-lan-public-prefix-length</label>
+ <input type="text" class="form-control" name="v6_lan_public_prefix_length" id="v6_lan_public_prefix_length">
+ </div>
+ <div class="form-group">
+ <label for="v6_lan_public_prefix">v6-lan-public-prefix</label>
+ <input type="text" class="form-control" name="v6_lan_public_prefix" id="v6_lan_public_prefix">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#t-provided-v6-lan-public-prefixes-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/tcp_port_list.ejs b/admportal/views/partials/tcp_port_list.ejs
new file mode 100644
index 0000000..efb4a43
--- /dev/null
+++ b/admportal/views/partials/tcp_port_list.ejs
@@ -0,0 +1,38 @@
+ <div class="modal fade" id="tcp-port-list-modal" tabindex="-1" role="dialog"
+ aria-labelledby="tcp-port-list-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">tcp-port-list</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="tcp_port_number">port-number</label>
+ <input type="text" class="form-control" name="tcp_port_number" id="tcp_port_number">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#tcp-port-list-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/threshold_alarm.ejs b/admportal/views/partials/threshold_alarm.ejs
new file mode 100644
index 0000000..f1df2ea
--- /dev/null
+++ b/admportal/views/partials/threshold_alarm.ejs
@@ -0,0 +1,71 @@
+<div class="modal fade" id="add_threshold_alarm" tabindex="-1" role="dialog"
+ aria-labelledby="add_threshold_alarm_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add Threshold Alarm</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/resalloc/addThresholdAlarm" method="POST">
+ <div class="form-group">
+ <label for="nf_resource_rule_id">*Resource Rule ID</label>
+ <input type="text" class="form-control" maxlength="20" name="nf_resource_rule_id" id="nf_resource_rule_id" placeholder="bigint(20)">
+ </div>
+ <div class="form-group">
+ <label for="nf_threshold_expression">*Threshold Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="nf_threshold_expression" id="nf_threshold_expression" placeholder="varchar(2000)">
+ </div>
+ <div class="form-group">
+ <label for="nf_threshold_message">*Threshold Message</label>
+ <input type="text" class="form-control" maxlength="500" name="nf_threshold_message" id="nf_threshold_message" placeholder="varchar(500)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitThresholdAlarm(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+ <div class="modal fade" id="update_threshold_alarm" tabindex="-1" role="dialog"
+ aria-labelledby="threshold_alarm_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Threshold Alarm</h4>
+ </div>
+ <div class="modal-body">
+ <form name="updateForm" role="form" action="/resalloc/updateThresholdAlarm" method="POST">
+ <div class="form-group">
+ <label for="uf_resource_threshold_id">*Resource Threshold ID</label>
+ <input readonly type="text" class="form-control" name="uf_resource_threshold_id" id="uf_resource_threshold_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_resource_rule_id">*Resource Rule ID</label>
+ <input type="text" class="form-control" maxlength="20" name="uf_resource_rule_id" id="uf_resource_rule_id" placeholder="bigint(20)">
+ </div>
+ <div class="form-group">
+ <label for="uf_threshold_expression">*Threshold Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="uf_threshold_expression" id="uf_threshold_expression" placeholder="varchar(2000)">
+ </div>
+ <div class="form-group">
+ <label for="uf_threshold_message">*Threshold Message</label>
+ <input type="text" class="form-control" maxlength="2000" name="uf_threshold_message" id="uf_threshold_message" placeholder="varchar(2000)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_resource_threshold_id" id="uf_key_resource_threshold_id">
+ <button type="button" class="btn btn-primary" onclick="submitThresholdAlarm(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/udp_port_list.ejs b/admportal/views/partials/udp_port_list.ejs
new file mode 100644
index 0000000..b4310b2
--- /dev/null
+++ b/admportal/views/partials/udp_port_list.ejs
@@ -0,0 +1,38 @@
+ <div class="modal fade" id="udp-port-list-modal" tabindex="-1" role="dialog"
+ aria-labelledby="udp-port-list-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">udp-port-list</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="udp_port_number">port-number</label>
+ <input type="text" class="form-control" name="udp_port_number" id="udp_port_number">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#udp-port-list-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/update_aic_avail_zone.ejs b/admportal/views/partials/update_aic_avail_zone.ejs
new file mode 100644
index 0000000..29528a0
--- /dev/null
+++ b/admportal/views/partials/update_aic_avail_zone.ejs
@@ -0,0 +1,54 @@
+ <div class="modal fade" id="update_aic_avail_zone_modal" tabindex="-1" role="dialog"
+ aria-labelledby="update_aic_avail_zone_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update AIC Availability Zone Pool</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/gamma/updateAicAvailZone" method="POST">
+ <div class="form-group">
+ <label for="uf_aic_site_id">AIC Site ID</label>
+ <input type="text" class="form-control" name="uf_aic_site_id" id="uf_aic_site_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_availability_zone">Availability Zone</label>
+ <input type="text" class="form-control" name="uf_availability_zone" id="uf_availability_zone">
+ </div>
+ <div class="form-group">
+ <label for="uf_token">Token</label>
+ <input type="text" class="form-control" name="uf_token" id="uf_token">
+ </div>
+ <div class="form-group">
+ <label for="uf_service_type">Service Type</label>
+ <input type="text" class="form-control" name="uf_service_type" id="uf_service_type">
+ </div>
+ <div class="form-group">
+ <label for="uf_status">Status</label>
+ <input type="text" class="form-control" name="uf_status" id="uf_status">
+ </div>
+ <div class="form-group">
+ <label for="uf_vnf_id">VNF ID</label>
+ <input type="text" class="form-control" name="uf_vnf_id" id="uf_vnf_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_vnf_type">VNF Type</label>
+ <input type="text" class="form-control" name="uf_vnf_type" id="uf_vnf_type">
+ </div>
+ <div class="form-group">
+ <label for="uf_hypervisor">Hypervisor</label>
+ <input type="text" class="form-control" name="uf_hypervisor" id="uf_hypervisor">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_key_aic_site_id" id="uf_key_aic_site_id">
+ <input type="hidden" name="uf_key_availability_zone" id="uf_key_availability_zone">
+ <input type="hidden" name="uf_key_token" id="uf_key_token">
+ <button type="submit" class="btn btn-primary">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/update_aic_site.ejs b/admportal/views/partials/update_aic_site.ejs
new file mode 100644
index 0000000..ffff9dc
--- /dev/null
+++ b/admportal/views/partials/update_aic_site.ejs
@@ -0,0 +1,57 @@
+ <div class="modal fade" id="update_aic_site_modal" tabindex="-1" role="dialog"
+ aria-labelledby="update_aic_site_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update AIC Site</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/gamma/updateAicSite" method="POST">
+ <div class="form-group">
+ <label for="uf_name">Name</label>
+ <input type="text" class="form-control" name="uf_name" id="uf_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_aic_site_id">AIC Site ID</label>
+ <input type="text" class="form-control" name="uf_aic_site_id" id="uf_aic_site_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_vcenter_url">VCenter URL</label>
+ <input type="text" class="form-control" name="uf_vcenter_url" id="uf_vcenter_url">
+ </div>
+ <div class="form-group">
+ <label for="uf_vcenter_username">VCenter User</label>
+ <input type="text" class="form-control" name="uf_vcenter_username" id="uf_vcenter_username">
+ </div>
+ <div class="form-group">
+ <label for="uf_vcenter_passwd">VCenter Password</label>
+ <input type="password" class="form-control" name="uf_vcenter_passwd" id="uf_vcenter_passwd">
+ </div>
+ <div class="form-group">
+ <label for="uf_oam_gateway_addr">OAM Gateway Address</label>
+ <input type="text" class="form-control" name="uf_oam_gateway_addr" id="uf_oam_gateway_addr">
+ </div>
+ <div class="form-group">
+ <label for="uf_city">City</label>
+ <input type="text" class="form-control" name="uf_city" id="uf_city">
+ </div>
+ <div class="form-group">
+ <label for="uf_state">State</label>
+ <input type="text" class="form-control" name="uf_state" id="uf_state">
+ </div>
+ <div class="form-group">
+ <label for="uf_operational_status">Operational Status</label>
+ <input type="text" class="form-control" name="uf_operational_status" id="uf_operational_status">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_aic_site_id" id="uf_key_aic_site_id">
+ <button type="submit" class="btn btn-primary">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/update_aic_switch.ejs b/admportal/views/partials/update_aic_switch.ejs
new file mode 100644
index 0000000..31f03d5
--- /dev/null
+++ b/admportal/views/partials/update_aic_switch.ejs
@@ -0,0 +1,41 @@
+ <div class="modal fade" id="update_aic_switch_modal" tabindex="-1" role="dialog"
+ aria-labelledby="update_aic_switch_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update AIC Switch</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/gamma/updateAicSwitch" method="POST">
+ <div class="form-group">
+ <label for="uf_physical_network_name">Physical Network Name</label>
+ <input type="text" class="form-control" name="uf_physical_network_name" id="uf_physical_network_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_switch_name">Switch Name</label>
+ <input type="text" class="form-control" name="uf_switch_name" id="uf_switch_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_aic_site_id">AIC Site ID</label>
+ <input type="text" class="form-control" name="uf_aic_site_id" id="uf_aic_site_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_uuid">UUID</label>
+ <input type="text" class="form-control" name="uf_uuid" id="uf_uuid">
+ </div>
+ <div class="form-group">
+ <label for="uf_availability_zone">Availability Zone</label>
+ <input type="text" class="form-control" name="uf_availability_zone" id="uf_availability_zone">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_physical_network_name" id="uf_key_physical_network_name">
+ <button type="submit" class="btn btn-primary">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/update_max_port_speed.ejs b/admportal/views/partials/update_max_port_speed.ejs
new file mode 100644
index 0000000..71c4a42
--- /dev/null
+++ b/admportal/views/partials/update_max_port_speed.ejs
@@ -0,0 +1,45 @@
+ <div class="modal fade" id="update_max_port_speed" tabindex="-1" role="dialog"
+ aria-labelledby="update_max_port_speed_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Max Port Speed</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/resalloc/updateMaxPortSpeed" method="POST">
+ <div class="form-group">
+ <label for="uf_max_port_speed_id">ID</label>
+ <input readonly type="text" class="form-control" name="uf_max_port_speed_id" id="uf_max_port_speed_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_image_file_name">Image File Name</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_image_file_name" id="uf_image_file_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_end_point_position">End Point Position</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_end_point_position" id="uf_end_point_position">
+ </div>
+ <div class="form-group">
+ <label for="uf_interface_name">Interface Name</label>
+ <input type="text" class="form-control" maxlength="100" name="uf_interface_name" id="uf_interface_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_max_speed">Max Speed</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_max_speed" id="uf_max_speed">
+ </div>
+ <div class="form-group">
+ <label for="uf_unit">Unit</label>
+ <input type="text" class="form-control" maxlength="10" name="uf_unit" id="uf_unit">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_max_port_speed_id" id="uf_key_max_port_speed_id">
+ <button type="submit" class="btn btn-primary">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/update_parameter.ejs b/admportal/views/partials/update_parameter.ejs
new file mode 100644
index 0000000..c0ef57d
--- /dev/null
+++ b/admportal/views/partials/update_parameter.ejs
@@ -0,0 +1,37 @@
+ <div class="modal fade" id="update_parameter" tabindex="-1" role="dialog"
+ aria-labelledby="parameter_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Parameter</h4>
+ </div>
+ <div class="modal-body">
+ <form name="updateForm" role="form" action="/admin/updateParameter" method="POST">
+ <div class="form-group">
+ <label for="uf_name">*Name</label>
+ <input maxlength="100" type="text" class="form-control" name="uf_name" id="uf_name" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <label for="uf_value">*Value</label>
+ <input maxlength="100" type="text" class="form-control" name="uf_value" id="uf_value" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <label for="uf_category">Category</label>
+ <input maxlength="24" type="text" class="form-control" name="uf_category" id="uf_category" placeholder="varchar(24)">
+ </div>
+ <div class="form-group">
+ <label for="uf_memo">Memo</label>
+ <input maxlength="128" type="text" class="form-control" name="uf_memo" id="uf_memo" placeholder="varchar(128)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <input type="hidden" name="uf_key_name" id="uf_key_name">
+ <button type="button" class="btn btn-primary" onclick="submitParam(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/update_resource_rule.ejs b/admportal/views/partials/update_resource_rule.ejs
new file mode 100644
index 0000000..69243b2
--- /dev/null
+++ b/admportal/views/partials/update_resource_rule.ejs
@@ -0,0 +1,57 @@
+ <div class="modal fade" id="update_resource_rule" tabindex="-1" role="dialog"
+ aria-labelledby="update_resource_rule_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Resource Rule</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/resalloc/updateResourceRule" method="POST">
+ <div class="form-group">
+ <label for="uf_resource_rule_id">Rule ID</label>
+ <input readonly type="text" class="form-control" name="uf_resource_rule_id" id="uf_resource_rule_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_resource_name">Name</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_resource_name" id="uf_resource_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_end_point_position">End Point Position</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_end_point_position" id="uf_end_point_position">
+ </div>
+ <div class="form-group">
+ <label for="uf_service_expression">Service Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="uf_service_expression" id="uf_service_expression">
+ </div>
+ <div class="form-group">
+ <label for="uf_equipment_level">Equipment Level</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_equipment_level" id="uf_equipment_level">
+ </div>
+ <div class="form-group">
+ <label for="uf_equipment_expression">Equipment Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="uf_equipment_expression" id="uf_equipment_expression">
+ </div>
+ <div class="form-group">
+ <label for="uf_allocation_expression">Allocation Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="uf_allocation_expression" id="uf_allocation_expression">
+ </div>
+ <div class="form-group">
+ <label for="uf_soft_limit_expression">Soft Limit Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="uf_soft_limit_expression" id="uf_soft_limit_expression">
+ </div>
+ <div class="form-group">
+ <label for="uf_hard_limit_expression">Hard Limit Expression</label>
+ <input type="text" class="form-control" maxlength="2000" name="uf_hard_limit_expression" id="uf_hard_limit_expression">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_resource_rule_id" id="uf_key_resource_rule_id">
+ <button type="submit" class="btn btn-primary">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/update_service_homing.ejs b/admportal/views/partials/update_service_homing.ejs
new file mode 100644
index 0000000..5697168
--- /dev/null
+++ b/admportal/views/partials/update_service_homing.ejs
@@ -0,0 +1,55 @@
+ <div class="modal fade" id="update_service_homing" tabindex="-1" role="dialog"
+ aria-labelledby="update_service_homing_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update Service Homing</h4>
+ </div>
+ <div class="modal-body">
+ <form name="updateForm" role="form" action="/gamma/updateServiceHoming" method="POST">
+ <div class="form-group">
+ <label for="uf_service_type">*Service Type</label>
+ <input readonly type="text" class="form-control" name="uf_service_type" id="uf_service_type">
+ </div>
+ <div class="form-group">
+ <label for="uf_lata">*LATA</label>
+ <input type="text" class="form-control" name="uf_lata" id="uf_lata" maxlength="12" placeholder="int(3)">
+ </div>
+ <div class="form-group">
+ <label for="uf_hubbing_city_type">*Hubbing City Type</label>
+ <input type="text" class="form-control" name="uf_hubbing_city_type" id="uf_hubbing_city_type" maxlength="40" placeholder="varchar(40)">
+ </div>
+ <div class="form-group">
+ <label for="uf_latitude">Latitude</label>
+ <input type="text" class="form-control" name="uf_latitude" id="uf_latitude" maxlength="24" placeholder="float">
+ </div>
+ <div class="form-group">
+ <label for="uf_longitude">Longitude</label>
+ <input type="text" class="form-control" name="uf_longitude" id="uf_longitude" maxlength="24" placeholder="float">
+ </div>
+ <div class="form-group">
+ <label for="uf_primary_aic_site_name">*Primary Site Name</label>
+ <input type="text" class="form-control" name="uf_primary_aic_site_name" id="uf_primary_aic_site_name" maxlength="100" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <label for="uf_secondary_aic_site_name">Secondary Site Name</label>
+ <input type="text" class="form-control" name="uf_secondary_aic_site_name" id="uf_secondary_aic_site_name" maxlength="100" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <label for="uf_tertiary_aic_site_name">Tertiary Site Name</label>
+ <input type="text" class="form-control" name="uf_tertiary_aic_site_name" id="uf_tertiary_aic_site_name" maxlength="100" placeholder="varchar(100)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_service_type" id="uf_key_service_type">
+ <input type="hidden" name="uf_key_lata" id="uf_key_lata">
+ <input type="hidden" name="uf_key_hubbing_city_type" id="uf_key_hubbing_city_type">
+ <button type="button" class="btn btn-primary" onclick="submitServiceHoming(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/update_vlan_id_pool.ejs b/admportal/views/partials/update_vlan_id_pool.ejs
new file mode 100644
index 0000000..d010672
--- /dev/null
+++ b/admportal/views/partials/update_vlan_id_pool.ejs
@@ -0,0 +1,51 @@
+ <div class="modal fade" id="update_vlan_id_pool_modal" tabindex="-1" role="dialog"
+ aria-labelledby="update_vlan_id_pool_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update VLAN ID Pool</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/gamma/updateVlanPool" method="POST">
+ <div class="form-group">
+ <label for="uf_aic_site_id">AIC Site ID</label>
+ <input type="text" class="form-control" name="uf_aic_site_id" id="uf_aic_site_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_purpose">Purpose</label>
+ <input type="text" class="form-control" name="uf_purpose" id="uf_purpose">
+ </div>
+ <div class="form-group">
+ <label for="uf_vlan_id">VLAN ID</label>
+ <input type="text" class="form-control" name="uf_vlan_id" id="uf_vlan_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_vplspe_name">VPLSPE Name</label>
+ <input type="text" class="form-control" name="uf_vplspe_name" id="uf_vplspe_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_availability_zone">Availability Zone</label>
+ <input type="text" class="form-control" name="uf_availability_zone" id="uf_availability_zone">
+ </div>
+ <div class="form-group">
+ <label for="uf_status">Status</label>
+ <input type="text" class="form-control" name="uf_status" id="uf_status">
+ </div>
+ <div class="form-group">
+ <label for="uf_svc_instance_id">Svc Instance ID</label>
+ <input type="text" class="form-control" name="uf_svc_instance_id" id="uf_svc_instance_id">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_aic_site_id" id="uf_key_aic_site_id">
+ <input type="hidden" name="uf_key_purpose" id="uf_key_purpose">
+ <input type="hidden" name="uf_key_vlan_id" id="uf_key_vlan_id">
+ <button type="submit" class="btn btn-primary">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/update_vpe_pool.ejs b/admportal/views/partials/update_vpe_pool.ejs
new file mode 100644
index 0000000..c583590
--- /dev/null
+++ b/admportal/views/partials/update_vpe_pool.ejs
@@ -0,0 +1,88 @@
+ <div class="modal fade" id="update_vpe_pool_modal" tabindex="-1" role="dialog"
+ aria-labelledby="update_vpe_pool_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update VPE Pool</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/gamma/updateVpePool" method="POST">
+ <div class="form-group">
+ <label for="uf_aic_site_id">AIC Site ID</label>
+ <input type="text" class="form-control" name="uf_aic_site_id" id="uf_aic_site_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_vpe_name">VPE Name</label>
+ <input type="text" class="form-control" name="uf_vpe_name" id="uf_vpe_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_availability_zone">Availability Zone</label>
+ <input type="text" class="form-control" name="uf_availability_zone" id="uf_availability_zone">
+ </div>
+ <div class="form-group">
+ <label for="uf_ipv4_oam_address">IPV4 OAM Address</label>
+ <input type="text" class="form-control" name="uf_ipv4_oam_address" id="uf_ipv4_oam_address">
+ </div>
+ <div class="form-group">
+ <label for="uf_loopback0_ipv4_address">Loopback IPV4 Address</label>
+ <input type="text" class="form-control" name="uf_loopback0_ipv4_address" id="uf_loopback0_ipv4_address">
+ </div>
+ <div class="form-group">
+ <label for="uf_provisioning_status">Provisioning Status</label>
+ <select class="form-control" name="uf_provisioning_status" id="uf_provisioning_status">
+ <option value=PREPROV>PREPROV</option>
+ <option value=NVTPROV>NVTPROV</option>
+ <option value=PROV>PROV</option>
+ <option value=CAPPED>CAPPED</option>
+ </select>
+ </div>
+ <div class="form-group">
+ <label for="uf_vlan_id_outer">VLAN ID Outer</label>
+ <input type="text" class="form-control" name="uf_vlan_id_outer" id="uf_vlan_id_outer">
+ </div>
+ <div class="form-group">
+ <label for="uf_vendor">Vendor</label>
+ <input type="text" class="form-control" name="uf_vendor" id="uf_vendor">
+ </div>
+ <div class="form-group">
+ <label for="uf_physical_intf_name">Interface Name</label>
+ <input type="text" class="form-control" name="uf_physical_intf_name" id="uf_physical_intf_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_physical_intf_speed">Interface Speed</label>
+ <input type="text" class="form-control" name="uf_physical_intf_speed" id="uf_physical_intf_speed">
+ </div>
+ <div class="form-group">
+ <label for="uf_physical_intf_units">Interface Units</label>
+ <input type="text" class="form-control" name="uf_physical_intf_units" id="uf_physical_intf_units">
+ </div>
+ <div class="form-group">
+ <label for="uf_vpe_uuid">VPE UUID</label>
+ <input type="text" class="form-control" name="uf_vpe_uuid" id="uf_vpe_uuid">
+ </div>
+ <div class="form-group">
+ <label for="uf_as_number">AS_NUMBER</label>
+ <input type="text" class="form-control" name="uf_as_number" id="uf_as_number">
+ </div>
+ <div class="form-group">
+ <label for="uf_vpe_id">VPE ID</label>
+ <input type="text" class="form-control" name="uf_vpe_id" id="uf_vpe_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_image_filename">Image Filename</label>
+ <input type="text" class="form-control" name="uf_image_filename" id="uf_image_filename">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_key_vpe_name" id="uf_key_vpe_name">
+ <input type="hidden" name="uf_key_availability_zone" id="uf_key_availability_zone">
+ <input type="hidden" name="uf_key_aic_site_id" id="uf_key_aic_site_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="submit" class="btn btn-primary">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/update_vplspe_pool.ejs b/admportal/views/partials/update_vplspe_pool.ejs
new file mode 100644
index 0000000..eb93052
--- /dev/null
+++ b/admportal/views/partials/update_vplspe_pool.ejs
@@ -0,0 +1,72 @@
+ <div class="modal fade" id="update_vplspe_pool_modal" tabindex="-1" role="dialog"
+ aria-labelledby="update_vplspe_pool_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update VPLSPE Pool</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/gamma/updateVplspePool" method="POST">
+ <div class="form-group">
+ <label for="uf_vplspe_name">VPLSPE Name</label>
+ <input type="text" class="form-control" name="uf_vplspe_name" id="uf_vplspe_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_aic_site_id">AIC Site ID</label>
+ <input type="text" class="form-control" name="uf_aic_site_id" id="uf_aic_site_id">
+ </div>
+ <div class="form-group">
+ <label for="uf_availability_zone">Availability Zone</label>
+ <input type="text" class="form-control" name="uf_availability_zone" id="uf_availability_zone">
+ </div>
+ <div class="form-group">
+ <label for="uf_physical_intf_name">Interface Name</label>
+ <input type="text" class="form-control" name="uf_physical_intf_name" id="uf_physical_intf_name">
+ </div>
+ <div class="form-group">
+ <label for="uf_physical_intf_speed">Interface Speed</label>
+ <input type="text" class="form-control" name="uf_physical_intf_speed" id="uf_physical_intf_speed">
+ </div>
+ <div class="form-group">
+ <label for="uf_physical_intf_units">Interface Units</label>
+ <input type="text" class="form-control" name="uf_physical_intf_units" id="uf_physical_intf_units">
+ </div>
+ <div class="form-group">
+ <label for="uf_loopback0_ipv4_address">Loopback IPV4 Address</label>
+ <input type="text" class="form-control" name="uf_loopback0_ipv4_address" id="uf_loopback0_ipv4_address">
+ </div>
+ <div class="form-group">
+ <label for="uf_vlan_id_outer">VLAN ID Outer</label>
+ <input type="text" class="form-control" name="uf_vlan_id_outer" id="uf_vlan_id_outer">
+ </div>
+ <div class="form-group">
+ <label for="uf_vplspe_uuid">VPLSPE UUID</label>
+ <input type="text" class="form-control" name="uf_vplspe_uuid" id="uf_vplspe_uuid">
+ </div>
+ <div class="form-group">
+ <label for="uf_image_filename">Image Filename</label>
+ <input type="text" class="form-control" name="uf_image_filename" id="uf_image_filename">
+ </div>
+ <div class="form-group">
+ <label for="uf_provisioning_status">Provisioning Status</label>
+ <input type="text" class="form-control" name="uf_provisioning_status" id="uf_provisioning_status">
+ </div>
+ <div class="form-group">
+ <label for="uf_vendor">Vendor</label>
+ <input type="text" class="form-control" name="uf_vendor" id="uf_vendor">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_key_availability_zone" id="uf_key_availability_zone">
+ <input type="hidden" name="uf_key_physical_intf_name" id="uf_key_physical_intf_name">
+ <input type="hidden" name="uf_key_vplspe_name" id="uf_key_vplspe_name">
+ <input type="hidden" name="uf_key_aic_site_id" id="uf_key_aic_site_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="submit" class="btn btn-primary">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/userform.ejs b/admportal/views/partials/userform.ejs
new file mode 100644
index 0000000..fae52ad
--- /dev/null
+++ b/admportal/views/partials/userform.ejs
@@ -0,0 +1,41 @@
+ <div class="modal fade" id="myUserModal" tabindex="-1" role="dialog" aria-labelledby="myUserModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="myUserModalLabel">Update User</h4>
+ </div>
+ <div class="modal-body">
+ <form id="updateForm" name="updateForm" role="form" action="/user/updateUser" method="POST">
+ <div class="form-group">
+ <label for="uf_email">attuid</label>
+ <input type="email" class="form-control" name="uf_email" id="uf_email">
+ </div>
+ <div class="form-group">
+ <label for="uf_password">Password</label>
+ <input type="password" class="form-control" name="uf_password" id="uf_password">
+ </div>
+ <div class="form-group">
+ <label for="uf_confirm_password">Confirm Password</label>
+ <input type="password" class="form-control" name="uf_confirm_password" id="uf_confirm_password">
+ </div>
+ <div class="form-group">
+ <label for="privilege">Privilege</label>
+ <select class="form-control" name="uf_privilege" id="uf_privilege">
+ <option value=admin>Administrator</option>
+ <option value=readonly>Readonly</option>
+ </select>
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_email" id="uf_key_email">
+ <button type="button" class="btn btn-primary" onclick="submitUserAdmin(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
diff --git a/admportal/views/partials/v4_dhcp_pools.ejs b/admportal/views/partials/v4_dhcp_pools.ejs
new file mode 100644
index 0000000..5a67aeb
--- /dev/null
+++ b/admportal/views/partials/v4_dhcp_pools.ejs
@@ -0,0 +1,50 @@
+ <div class="modal fade" id="v4-dhcp-pools-modal" tabindex="-1" role="dialog"
+ aria-labelledby="v4-dhcp-pools-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">dhcp</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="v4_dhcp_relay_next_hop_address">v4-dhcp-relay-next-hop-address</label>
+ <input type="text" class="form-control" name="v4_dhcp_relay_next_hop_address" id="v4_dhcp_relay_next_hop_address">
+ </div>
+ <div class="form-group">
+ <label for="v4_dhcp_pool_prefix">v4-dhcp-pool-prefix</label>
+ <input type="text" class="form-control" name="v4_dhcp_pool_prefix" id="v4_dhcp_pool_prefix">
+ </div>
+ <div class="form-group">
+ <label for="v4_dhcp_pool_prefix_length">v4-dhcp-pool-prefix-length</label>
+ <input type="text" class="form-control" name="v4_dhcp_pool_prefix_length" id="v4_dhcp_pool_prefix_length">
+ </div>
+ <div class="form-group">
+ <label for="v4_dhcp_relay_gateway_address">v4-dhcp-relay-gateway-address</label>
+ <input type="text" class="form-control" name="v4_dhcp_relay_gateway_address" id="v4_dhcp_relay_gateway_address">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#v4-dhcp-pools-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/v4_firewall_packet_filters.ejs b/admportal/views/partials/v4_firewall_packet_filters.ejs
new file mode 100644
index 0000000..0b091d1
--- /dev/null
+++ b/admportal/views/partials/v4_firewall_packet_filters.ejs
@@ -0,0 +1,46 @@
+ <div class="modal fade" id="v4-firewall-packet-filters-modal" tabindex="-1" role="dialog"
+ aria-labelledby="v4-firewall-packet-filters-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">v4-firewall-packet-filters</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="v4_firewall_prefix">v4-firewall-prefix</label>
+ <input type="text" class="form-control" name="v4_firewall_prefix" id="v4_firewall_prefix">
+ </div>
+ <div class="form-group">
+ <label for="v4_firewall_prefix_length">v4-firewall-prefix-length</label>
+ <input type="text" class="form-control" name="v4_firewall_prefix_length" id="v4_firewall_prefix_length">
+ </div>
+ <div class="form-group">
+ <label for="v4_allow_icmp_ping">allow-icmp-ping</label>
+ <input type="text" class="form-control" name="v4_allow_icmp_ping" id="v4_allow_icmp_ping">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#v4-firewall-packet-filters-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/v4_nat_mapping_entries.ejs b/admportal/views/partials/v4_nat_mapping_entries.ejs
new file mode 100644
index 0000000..ef80022
--- /dev/null
+++ b/admportal/views/partials/v4_nat_mapping_entries.ejs
@@ -0,0 +1,46 @@
+ <div class="modal fade" id="v4-nat-mapping-entries-modal" tabindex="-1" role="dialog"
+ aria-labelledby="v4-nat-mapping-entries-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">v4-nat-mapping-entries</h4>
+ </div>
+ <div class="modal-body">
+ <form id="v4_nat_mapping_entries_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="v4_nat_external">v4-nat-external</label>
+ <input type="text" class="form-control" name="v4_nat_external" id="v4_nat_external">
+ </div>
+ <div class="form-group">
+ <label for="v4_nat_next_hop_address">v4-nat-next-hop-address</label>
+ <input type="text" class="form-control" name="v4_nat_next_hop_address" id="v4_nat_next_hop_address">
+ </div>
+ <div class="form-group">
+ <label for="v4_nat_internal">v4-nat-internal</label>
+ <input type="text" class="form-control" name="v4_nat_internal" id="v4_nat_internal">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#v4-nat-mapping-entries-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/v4_static_routes.ejs b/admportal/views/partials/v4_static_routes.ejs
new file mode 100644
index 0000000..0474dd3
--- /dev/null
+++ b/admportal/views/partials/v4_static_routes.ejs
@@ -0,0 +1,46 @@
+ <div class="modal fade" id="v4-static-routes-modal" tabindex="-1" role="dialog"
+ aria-labelledby="v4-static-routes-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">v4-static-routes</h4>
+ </div>
+ <div class="modal-body">
+ <form id="v4_static_route_prefix_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="v4_static_route_prefix">v4-static-route-prefix</label>
+ <input type="text" class="form-control" name="v4_static_route_prefix" id="v4_static_route_prefix">
+ </div>
+ <div class="form-group">
+ <label for="v4_static_route_prefix_length">v4-static-route-prefix-length</label>
+ <input type="text" class="form-control" name="v4_static_route_prefix_length" id="v4_static_route_prefix_length">
+ </div>
+ <div class="form-group">
+ <label for="static_v4_next_hop_address">v4-next-hop-address</label>
+ <input type="text" class="form-control" name="static_v4_next_hop_address" id="static_v4_next_hop_address">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#v4-static-routes-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/v6_dhcp_pools.ejs b/admportal/views/partials/v6_dhcp_pools.ejs
new file mode 100644
index 0000000..7dc54ab
--- /dev/null
+++ b/admportal/views/partials/v6_dhcp_pools.ejs
@@ -0,0 +1,50 @@
+ <div class="modal fade" id="v6-dhcp-pools-modal" tabindex="-1" role="dialog"
+ aria-labelledby="v6-dhcp-pools-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">v6-dhcp-pools</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="v6_dhcp_relay_next_hop_address">v6-dhcp-relay-next-hop-address</label>
+ <input type="text" class="form-control" name="v6_dhcp_relay_next_hop_address" id="v6_dhcp_relay_next_hop_address">
+ </div>
+ <div class="form-group">
+ <label for="v6_dhcp_pool_prefix">v6-dhcp-pool-prefix</label>
+ <input type="text" class="form-control" name="v6_dhcp_pool_prefix" id="v6_dhcp_pool_prefix">
+ </div>
+ <div class="form-group">
+ <label for="v6_dhcp_pool_prefix_length">v6-dhcp-pool-prefix-length</label>
+ <input type="text" class="form-control" name="v6_dhcp_pool_prefix_length" id="v6_dhcp_pool_prefix_length">
+ </div>
+ <div class="form-group">
+ <label for="v6_dhcp_relay_gateway_address">v6-dhcp-relay-gateway-address</label>
+ <input type="text" class="form-control" name="v6_dhcp_relay_gateway_address" id="v6_dhcp_relay_gateway_address">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#v6-dhcp-pools-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/v6_firewall_packet_filters.ejs b/admportal/views/partials/v6_firewall_packet_filters.ejs
new file mode 100644
index 0000000..09e2e3d
--- /dev/null
+++ b/admportal/views/partials/v6_firewall_packet_filters.ejs
@@ -0,0 +1,46 @@
+ <div class="modal fade" id="v6-firewall-packet-filters-modal" tabindex="-1" role="dialog"
+ aria-labelledby="v6-firewall-packet-filters-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">v6-firewall-packet-filters</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="v6_firewall_prefix">v6-firewall-prefix</label>
+ <input type="text" class="form-control" name="v6_firewall_prefix" id="v6_firewall_prefix">
+ </div>
+ <div class="form-group">
+ <label for="v6_firewall_prefix_length">v6-firewall-prefix-length</label>
+ <input type="text" class="form-control" name="v6_firewall_prefix_length" id="v6_firewall_prefix_length">
+ </div>
+ <div class="form-group">
+ <label for="v6_allow_icmp_ping">allow-icmp-ping</label>
+ <input type="text" class="form-control" name="v6_allow_icmp_ping" id="v6_allow_icmp_ping">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#v6-firewall-packet-filters-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/v6_static_routes.ejs b/admportal/views/partials/v6_static_routes.ejs
new file mode 100644
index 0000000..bea721d
--- /dev/null
+++ b/admportal/views/partials/v6_static_routes.ejs
@@ -0,0 +1,46 @@
+ <div class="modal fade" id="v6-static-routes-modal" tabindex="-1" role="dialog"
+ aria-labelledby="v6-static-routes-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">v6-static-routes</h4>
+ </div>
+ <div class="modal-body">
+ <form id="v6_static_route_prefix_form" role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="v6_static_route_prefix">v6-static-route-prefix</label>
+ <input type="text" class="form-control" name="v6_static_route_prefix" id="v6_static_route_prefix">
+ </div>
+ <div class="form-group">
+ <label for="v6_static_route_prefix_length">v6-static-route-prefix-length</label>
+ <input type="text" class="form-control" name="v6_static_route_prefix_length" id="v6_static_route_prefix_length">
+ </div>
+ <div class="form-group">
+ <label for="static_v6_next_hop_address">v6-next-hop-address</label>
+ <input type="text" class="form-control" name="static_v6_next_hop_address" id="static_v6_next_hop_address">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#v6-static-routes-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/vlan.ejs b/admportal/views/partials/vlan.ejs
new file mode 100644
index 0000000..99cb802
--- /dev/null
+++ b/admportal/views/partials/vlan.ejs
@@ -0,0 +1,46 @@
+ <div class="modal fade"
+ id="vlan-modal" tabindex="-1" role="dialog"
+ aria-labelledby="vlan-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">vlan</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="vlan_interface">vlan-interface</label>
+ <input type="text" class="form-control" name="vlan_interface" id="vlan_interface">
+ </div>
+ <div class="form-group">
+ <label for="vlan_id_inner">vlan-id-inner</label>
+ <input type="text" class="form-control" name="vlan_id_inner" id="vlan_id_inner">
+ </div>
+ <div class="form-group">
+ <label for="vlan_id_outer">vlan-id-outer</label>
+ <input type="text" class="form-control" name="vlan_id_outer" id="vlan_id_outer">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#vlan-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/vm_networks.ejs b/admportal/views/partials/vm_networks.ejs
new file mode 100644
index 0000000..f0f7337
--- /dev/null
+++ b/admportal/views/partials/vm_networks.ejs
@@ -0,0 +1,57 @@
+ <div class="modal fade" id="add_vm_network" tabindex="-1" role="dialog"
+ aria-labelledby="add_vm_network" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add VM Network</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/mobility/addVmNetwork" method="POST">
+ <div class="form-group">
+ <label for="nf_vnf_type">*VNF Type</label>
+ <input type="text" class="form-control" name="nf_vnf_type" id="nf_vnf_type" maxlength="200" placeholder="varchar(200)">
+ </div>
+ <div class="form-group">
+ <label for="nf_vm_type">*VM Type</label>
+ <input type="text" class="form-control" name="nf_vm_type" id="nf_vm_type" maxlength="45" placeholder="varchar(45)">
+ </div>
+ <div class="form-group">
+ <label for="nf_network_role">*NETWORK ROLE</label>
+ <input maxlength="45" type="text" class="form-control" name="nf_network_role" id="nf_network_role" placeholder="varchar(45)">
+ </div>
+ <div class="form-group">
+ <label for="nf_ip_count">IP COUNT</label>
+ <input maxlength="3" type="text" class="form-control" name="nf_ip_count" id="nf_ip_count" placeholder="int(11)">
+ </div>
+ <div class="form-group">
+ <label for="nf_assign_ips">ASSIGN IPS</label>
+ <select class="form-control" name="nf_assign_ips" id="nf_assign_ips">
+ <option>true</option>
+ <option>false</option>
+ </select>
+ </div>
+ <div class="form-group">
+ <label for="nf_assign_macs">ASSIGN MACS</label>
+ <select class="form-control" name="nf_assign_macs" id="nf_assign_macs">
+ <option>true</option>
+ <option>false</option>
+ </select>
+ </div>
+ <div class="form-group">
+ <label for="nf_assign_floating_ip">ASSIGN FLOATING IP</label>
+ <select class="form-control" name="nf_assign_floating_ip" id="nf_assign_floating_ip">
+ <option>true</option>
+ <option>false</option>
+ </select>
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="addVmNetwork(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/vm_profile.ejs b/admportal/views/partials/vm_profile.ejs
new file mode 100644
index 0000000..5c437e9
--- /dev/null
+++ b/admportal/views/partials/vm_profile.ejs
@@ -0,0 +1,32 @@
+ <div class="modal fade" id="add_vm_profile" tabindex="-1" role="dialog"
+ aria-labelledby="add_vm_profile" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add VM Profile</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/mobility/addVmProfile" method="POST">
+ <div class="form-group">
+ <label for="nf_vnf_type">*VNF Type</label>
+ <input type="text" class="form-control" name="nf_vnf_type" id="nf_vnf_type" maxlength="200" placeholder="varchar(200)">
+ </div>
+ <div class="form-group">
+ <label for="nf_vm_type">*VM Type</label>
+ <input type="text" class="form-control" name="nf_vm_type" id="nf_vm_type" maxlength="45" placeholder="varchar(45)">
+ </div>
+ <div class="form-group">
+ <label for="nf_vm_count">VM Count</label>
+ <input type="text" class="form-control" name="nf_vm_count" id="nf_vm_count" maxlength="11" placeholder="int(11)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="addVmProfile(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/vnf_network.ejs b/admportal/views/partials/vnf_network.ejs
new file mode 100644
index 0000000..47580dc
--- /dev/null
+++ b/admportal/views/partials/vnf_network.ejs
@@ -0,0 +1,28 @@
+ <div class="modal fade" id="add_vnf_network" tabindex="-1" role="dialog"
+ aria-labelledby="add_vnf_network" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add VNF Network</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/mobility/addVnfNetwork" method="POST">
+ <div class="form-group">
+ <label for="nf_vnf_type">*VNF Type</label>
+ <input type="text" class="form-control" name="nf_vnf_type" id="nf_vnf_type" maxlength="200" placeholder="varchar(200)">
+ </div>
+ <div class="form-group">
+ <label for="nf_network_role">*Network Role</label>
+ <input type="text" class="form-control" name="nf_network_role" id="nf_network_role" maxlength="45" placeholder="varchar(45)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="addVnfNetwork(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/vnf_profile.ejs b/admportal/views/partials/vnf_profile.ejs
new file mode 100644
index 0000000..d67cf1a
--- /dev/null
+++ b/admportal/views/partials/vnf_profile.ejs
@@ -0,0 +1,32 @@
+ <div class="modal fade" id="add_vnf_profile" tabindex="-1" role="dialog"
+ aria-labelledby="add_vnf_profile" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add VNF Profile</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/mobility/addVnfProfile" method="POST">
+ <div class="form-group">
+ <label for="nf_vnf_type">*VNF Type</label>
+ <input type="text" class="form-control" name="nf_vnf_type" id="nf_vnf_type" maxlength="200" placeholder="varchar(200)">
+ </div>
+ <div class="form-group">
+ <label for="nf_availability_zone_count">Availability Zone Count</label>
+ <input type="text" class="form-control" name="nf_availability_zone_count" id="nf_availability_zone_count" maxlength="11" placeholder="int(11)">
+ </div>
+ <div class="form-group">
+ <label for="nf_equipment_role">Equipment Role</label>
+ <input type="text" class="form-control" name="nf_equipment_role" id="nf_equipment_role" maxlength="11" placeholder="varchar(80)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="addVnfProfile(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/partials/vnf_vm_information.ejs b/admportal/views/partials/vnf_vm_information.ejs
new file mode 100644
index 0000000..fb9af73
--- /dev/null
+++ b/admportal/views/partials/vnf_vm_information.ejs
@@ -0,0 +1,42 @@
+ <div class="modal fade"
+ id="vnf-vm-information-modal" tabindex="-1" role="dialog"
+ aria-labelledby="vnf-vm-information-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">vnf-vm-information</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="" method="POST">
+ <div class="form-group">
+ <label for="vserver_type">vserver-type</label>
+ <input type="text" class="form-control" name="vserver_type" id="vserver_type">
+ </div>
+ <div class="form-group">
+ <label for="vserver_name">vserver-name</label>
+ <input type="text" class="form-control" name="vserver_name" id="vserver_name">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#vnf-vm-information-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/vr_lan_interface.ejs b/admportal/views/partials/vr_lan_interface.ejs
new file mode 100644
index 0000000..45f7ec1
--- /dev/null
+++ b/admportal/views/partials/vr_lan_interface.ejs
@@ -0,0 +1,66 @@
+ <div class="modal fade" id="vr-lan-interface-modal" tabindex="-1" role="dialog"
+ aria-labelledby="vr-lan-interface-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">VR-LAN-INTERFACE</h4>
+ </div>
+ <div class="modal-body">
+ <form id="vr_lan_interface_form" role="form" action="/odl/update_vr_lan_interface" method="POST">
+ <div class="form-group">
+ <label for="vr_designation">vr-designation</label>
+ <input type="text" class="form-control" name="vr_designation" id="vr_designation">
+ </div>
+ <div class="form-group">
+ <label for="v6_vr_lan_prefix">v6-vr-lan-prefix</label>
+ <input type="text" class="form-control" name="v6_vr_lan_prefix" id="v6_vr_lan_prefix">
+ </div>
+ <div class="form-group">
+ <label for="v6_vr_lan_prefix_length">v6-vr-lan-prefix-length</label>
+ <input type="text" class="form-control" name="v6_vr_lan_prefix_length" id="v6_vr_lan_prefix_length">
+ </div>
+ <div class="form-group">
+ <label for="v6_vce_wan_address">v6-vce-wan-address</label>
+ <input type="text" class="form-control" name="v6_vce_wan_address" id="v6_vce_wan_address">
+ </div>
+ <div class="form-group">
+ <label for="v4_vr_lan_prefix">v4-vr-lan-prefix</label>
+ <input type="text" class="form-control" name="v4_vr_lan_prefix" id="v4_vr_lan_prefix">
+ </div>
+ <div class="form-group">
+ <label for="v4_vr_lan_prefix_length">v4-vr-lan-prefix-length</label>
+ <input type="text" class="form-control" name="v4_vr_lan_prefix_length" id="v4_vr_lan_prefix_length">
+ </div>
+ <div class="form-group">
+ <label for="t_defaulted_v6_vrlan">t-defaulted-v6-vrlan</label>
+ <input type="text" class="form-control" name="t_defaulted_v6_vrlan" id="t_defaulted_v6_vrlan">
+ </div>
+ <div class="form-group">
+ <label for="v4_vce_loopback_address">v4-vce-loopback-address</label>
+ <input type="text" class="form-control" name="v4_vce_loopback_address" id="v4_vce_loopback_address">
+ </div>
+
+<!--
+ <div class="form-group">
+ <input type="hidden" name="svc_instance_id" id="svc_instance_id">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <button type="button" class="btn btn-primary" onclick="submit(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+-->
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<script type="text/javascript">
+function submit(form){
+ $('#vr-lan-interface-modal').modal('hide');
+ form.action = form.uf_action.value;
+ form.submit();
+ return;
+}
+</script>
+
diff --git a/admportal/views/partials/vrr_credentials.ejs b/admportal/views/partials/vrr_credentials.ejs
new file mode 100644
index 0000000..620176d
--- /dev/null
+++ b/admportal/views/partials/vrr_credentials.ejs
@@ -0,0 +1,82 @@
+<div class="modal fade" id="add_vrr_credentials" tabindex="-1" role="dialog"
+ aria-labelledby="add_vrr_credentials_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Add VRR Credentials</h4>
+ </div>
+ <div class="modal-body">
+ <form name="addForm" role="form" action="/sdnfc/addVrrCredentials" method="POST">
+ <div class="form-group">
+ <label for="nf_server_name">*Server Name</label>
+ <input type="text" class="form-control" maxlength="50" name="nf_server_name" id="nf_server_name" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="nf_ip_address">*IP Address</label>
+ <input type="text" class="form-control" maxlength="15" name="nf_ip_address" id="nf_ip_address" placeholder="varchar(15)">
+ </div>
+ <div class="form-group">
+ <label for="nf_username">*Username</label>
+ <input type="text" class="form-control" maxlength="50" name="nf_username" id="nf_username" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="nf_password">*Password</label>
+ <input type="password" class="form-control" maxlength="255" name="nf_password" id="nf_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <label for="nf_confirm_password">*Confirm Password</label>
+ <input type="password" class="form-control" maxlength="255" name="nf_confirm_password" id="nf_confirm_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nf_action" id="nf_action">
+ <button type="button" class="btn btn-primary" onclick="submitVrrCredentials(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal fade" id="update_vrr_credentials" tabindex="-1" role="dialog"
+ aria-labelledby="update_vrr_credentials_label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Update VRR Credentials</h4>
+ </div>
+ <div class="modal-body">
+ <form role="form" action="/sdnfc/updateVrrCredentials" method="POST">
+ <div class="form-group">
+ <label for="uf_server_name">*Server Name</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_server_name" id="uf_server_name" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="uf_ip_address">*IP Address</label>
+ <input type="text" class="form-control" maxlength="15" name="uf_ip_address" id="uf_ip_address" placeholder="varchar(15)">
+ </div>
+ <div class="form-group">
+ <label for="uf_username">*Username</label>
+ <input type="text" class="form-control" maxlength="50" name="uf_username" id="uf_username" placeholder="varchar(50)">
+ </div>
+ <div class="form-group">
+ <label for="uf_password">*Password</label>
+ <input type="password" class="form-control" maxlength="255" name="uf_password" id="uf_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <label for="uf_confirm_password">*Confirm Password</label>
+ <input type="password" class="form-control" maxlength="255" name="uf_confirm_password" id="uf_confirm_password" placeholder="varbinary(255)">
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="uf_action" id="uf_action">
+ <input type="hidden" name="uf_key_server_name" id="uf_key_server_name">
+ <button type="button" class="btn btn-primary" onclick="submitVrrCredentials(this.form);">Submit</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
diff --git a/admportal/views/resalloc/max_port_speed.ejs b/admportal/views/resalloc/max_port_speed.ejs
new file mode 100644
index 0000000..b46b14d
--- /dev/null
+++ b/admportal/views/resalloc/max_port_speed.ejs
@@ -0,0 +1,205 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#max_port_speed').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Max Port Speed</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_max_port_speed">
+ Add Max Port Speed
+ </button>
+ </div>
+ <% } %>
+
+ <table id="max_port_speed" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*ID</th>
+ <th>*Image File Name</th>
+ <th>*End Point Position</th>
+ <th>*Interface Name</th>
+ <th>*Max Speed</th>
+ <th>*Unit</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.max_port_speed_id %></td>
+ <td><%= row.image_file_name %></td>
+ <td><%= row.end_point_position %></td>
+ <td><%= row.interface_name %></td>
+ <td><%= row.max_speed %></td>
+ <td><%= row.unit %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateMaxPortSpeed('<%=row.max_port_speed_id %>','<%= row.image_file_name %>','<%= row.end_point_position %>','<%= row.interface_name %>','<%= row.max_speed %>','<%= row.unit %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteMaxPortSpeed('<%= row.max_port_speed_id %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<% include ../partials/max_port_speed %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitMaxPortSpeed(form)
+{
+ var errorMsg='';
+ var image_file_name = '';
+ var end_point_position = '';
+ var interface_name = '';
+ var max_speed = '';
+ var unit = '';
+
+ if ( form.name == 'addForm' )
+ {
+ image_file_name = form.nf_image_file_name;
+ end_point_position = form.nf_end_point_position;
+ interface_name = form.nf_interface_name;
+ max_speed = form.nf_max_speed;
+ unit = form.nf_unit;
+ }
+ else
+ {
+ image_file_name = form.uf_image_file_name;
+ end_point_position = form.uf_end_point_position;
+ interface_name = form.uf_interface_name;
+ max_speed = form.uf_max_speed;
+ unit = form.uf_unit;
+ }
+
+
+ if ( (image_file_name.value == null) || (image_file_name.value == "") || isblank(image_file_name.value) )
+ {
+ errorMsg += 'Image File Name is required.<br>';
+ }
+ if ( (end_point_position.value == null) || (end_point_position.value == "") || isblank(end_point_position.value) )
+ {
+ errorMsg += 'End Point Position is required.<br>';
+ }
+ if ( (interface_name.value == null) || (interface_name.value == "") || isblank(interface_name.value) ){
+ errorMsg += 'Interface Name is required.<br>';
+ }
+ if ( (max_speed.value == null) || (max_speed.value == "") || isblank(max_speed.value) ){
+ errorMsg += 'Max Speed is required.<br>';
+ }
+ if ( (unit.value == null) || (unit.value == "") || isblank(unit.value) ){
+ errorMsg += 'Unit is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+
+ if ( !isDigit(max_speed.value) )
+ {
+ bootbox.alert('Max Speed must be a number.');
+ return;
+ }
+
+ form.submit();
+}
+
+function updateMaxPortSpeed(max_port_speed_id,image_file_name,end_point_position,interface_name,max_speed,unit) {
+
+ document.getElementById('uf_max_port_speed_id').value=max_port_speed_id;
+ document.getElementById('uf_image_file_name').value=image_file_name;
+ document.getElementById('uf_end_point_position').value=end_point_position;
+ document.getElementById('uf_interface_name').value=interface_name;
+ document.getElementById('uf_max_speed').value=max_speed;
+ document.getElementById('uf_unit').value=unit;
+
+ document.getElementById('uf_key_max_port_speed_id').value=max_port_speed_id;
+
+ $('#update_max_port_speed').modal('show');
+}
+
+function deleteMaxPortSpeed(max_port_speed_id) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete MAX_PORT_SPEED [" + max_port_speed_id + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/resalloc/deleteMaxPortSpeed?max_port_speed_id=" + max_port_speed_id);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/resalloc/max_server_speed.ejs b/admportal/views/resalloc/max_server_speed.ejs
new file mode 100644
index 0000000..c0848df
--- /dev/null
+++ b/admportal/views/resalloc/max_server_speed.ejs
@@ -0,0 +1,207 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#max_server_speed').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Max Server Speed</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_max_server_speed">
+ Add Max Server Speed
+ </button>
+ </div>
+ <% } %>
+
+ <table id="max_server_speed" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*ID</th>
+ <th>*Server Model</th>
+ <th>*EVC Count</th>
+ <th>*Max Speed</th>
+ <th>*Unit</th>
+ <th>Description</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.max_server_speed_id %></td>
+ <td><%= row.server_model %></td>
+ <td><%= row.evc_count %></td>
+ <td><%= row.max_speed %></td>
+ <td><%= row.unit %></td>
+ <td><%= row.description %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateMaxServerSpeed('<%=row.max_server_speed_id %>','<%= row.server_model %>','<%= row.evc_count %>','<%= row.max_speed %>','<%= row.unit %>', '<%= row.description %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteMaxServerSpeed('<%= row.max_server_speed_id %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<% include ../partials/max_server_speed %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitMaxServerSpeed(form)
+{
+ var errorMsg='';
+ var server_model = '';
+ var evc_count = '';
+ var max_speed = '';
+ var unit = '';
+ var description = '';
+
+ if ( form.name == 'addForm' )
+ {
+ server_model = form.nf_server_model;
+ evc_count = form.nf_evc_count;
+ max_speed = form.nf_max_speed;
+ unit = form.nf_unit;
+ description = form.nf_description;
+ }
+ else
+ {
+ server_model = form.uf_server_model;
+ evc_count = form.uf_evc_count;
+ max_speed = form.uf_max_speed;
+ unit = form.uf_unit;
+ description = form.uf_description;
+ }
+
+
+ if ( (server_model.value == null) || (server_model.value == "") || isblank(server_model.value) )
+ {
+ errorMsg += 'Server Model is required.<br>';
+ }
+ if ( (evc_count.value == null) || (evc_count.value == "") || isblank(evc_count.value) )
+ {
+ errorMsg += 'EVC Count is required.<br>';
+ }
+ if ( (max_speed.value == null) || (max_speed.value == "") || isblank(max_speed.value) ){
+ errorMsg += 'Max Speed is required.<br>';
+ }
+ if ( (unit.value == null) || (unit.value == "") || isblank(unit.value) ){
+ errorMsg += 'Unit is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+
+ if ( !isDigit(evc_count.value) )
+ {
+ bootbox.alert('EVC Count must be a number.');
+ return;
+ }
+ if ( !isDigit(max_speed.value) )
+ {
+ bootbox.alert('Max Speed must be a number.');
+ return;
+ }
+
+ form.submit();
+}
+
+function updateMaxServerSpeed(max_server_speed_id,server_model,evc_count,max_speed,unit,description) {
+
+ document.getElementById('uf_max_server_speed_id').value=max_server_speed_id;
+ document.getElementById('uf_server_model').value=server_model;
+ document.getElementById('uf_evc_count').value=evc_count;
+ document.getElementById('uf_max_speed').value=max_speed;
+ document.getElementById('uf_unit').value=unit;
+ document.getElementById('uf_description').value=description;
+
+ document.getElementById('uf_key_max_server_speed_id').value=max_server_speed_id;
+
+ $('#update_max_server_speed').modal('show');
+}
+
+function deleteMaxServerSpeed(max_server_speed_id) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete MAX_SERVER_SPEED [" + max_server_speed_id + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/resalloc/deleteMaxServerSpeed?max_server_speed_id=" + max_server_speed_id);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/resalloc/resource_rule.ejs b/admportal/views/resalloc/resource_rule.ejs
new file mode 100644
index 0000000..4171fc6
--- /dev/null
+++ b/admportal/views/resalloc/resource_rule.ejs
@@ -0,0 +1,228 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#resource_rule').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well wel-sm">
+<h3>Resource Rule</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_resource_rule">
+ Add Resource Rule
+ </button>
+ </div>
+ <% } %>
+
+ <table id="resource_rule" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*ID</th>
+ <th>*Name</th>
+ <th>*End Point Position</th>
+ <th>*Service Expression</th>
+ <th>*Equipment Level</th>
+ <th>*Equipment Expression</th>
+ <th>*Allocation Expression</th>
+ <th>*Soft Limit Expression</th>
+ <th>*Hard Limit Expression</th>
+ <th>*Service Model</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.resource_rule_id %></td>
+ <td><%= row.resource_name %></td>
+ <td><%= row.end_point_position %></td>
+ <td><%= row.service_expression %></td>
+ <td><%= row.equipment_level %></td>
+ <td><%= row.equipment_expression %></td>
+ <td><%= row.allocation_expression %></td>
+ <td><%= row.soft_limit_expression %></td>
+ <td><%= row.hard_limit_expression %></td>
+ <td><%= row.service_model %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateResourceRule('<%=row.resource_rule_id %>','<%= row.resource_name %>','<%= row.end_point_position %>','<%= row.service_expression %>','<%= row.equipment_level %>','<%= row.equipment_expression %>','<%= row.allocation_expression %>','<%= row.soft_limit_expression %>', '<%= row.hard_limit_expression %>','<%= row.service_model %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteResourceRule('<%= row.resource_rule_id %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<% include ../partials/resource_rule %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitResourceRule(form)
+{
+ var errorMsg='';
+ var resource_name = '';
+ var end_point_position = '';
+ var service_expression = '';
+ var equipment_level = '';
+ var equipment_expression = '';
+ var allocation_expression = '';
+ var soft_limit_expression = '';
+ var hard_limit_expression = '';
+ var service_model = '';
+
+ if ( form.name == 'addForm' )
+ {
+ resource_name = form.nf_resource_name;
+ end_point_position = form.nf_end_point_position;
+ service_expression = form.nf_service_expression;
+ equipment_level = form.nf_equipment_level;
+ allocation_expression = form.nf_allocation_expression;
+ soft_limit_expression = form.nf_soft_limit_expression;
+ hard_limit_expression = form.nf_hard_limit_expression;
+ service_model = form.nf_service_model;
+ }
+ else
+ {
+ resource_name = form.uf_resource_name;
+ end_point_position = form.uf_end_point_position;
+ service_expression = form.uf_service_expression;
+ equipment_level = form.uf_equipment_level;
+ allocation_expression = form.uf_allocation_expression;
+ soft_limit_expression = form.uf_soft_limit_expression;
+ hard_limit_expression = form.uf_hard_limit_expression;
+ service_model = form.uf_service_model;
+ }
+
+
+ if ( (resource_name.value == null) || (resource_name.value == "") || isblank(resource_name.value) )
+ {
+ errorMsg += 'Resource Name is required.<br>';
+ }
+ if ( (end_point_position.value == null) || (end_point_position.value == "") || isblank(end_point_position.value) )
+ {
+ errorMsg += 'End Point Position is required.<br>';
+ }
+ if ( (service_expression.value == null) || (service_expression.value == "") || isblank(service_expression.value) ){
+ errorMsg += 'Service Expression is required.<br>';
+ }
+ if ( (equipment_level.value == null) || (equipment_level.value == "") || isblank(equipment_level.value) ){
+ errorMsg += 'Equipment Level is required.<br>';
+ }
+ if ( (allocation_expression.value == null) || (allocation_expression.value == "") || isblank(allocation_expression.value) ){
+ errorMsg += 'Allocation Expression is required.<br>';
+ }
+ if ( (soft_limit_expression.value == null) || (soft_limit_expression.value == "") || isblank(soft_limit_expression.value) ){
+ errorMsg += 'Soft Limit Expression is required.<br>';
+ }
+ if ( (hard_limit_expression.value == null) || (hard_limit_expression.value == "") || isblank(hard_limit_expression.value) ){
+ errorMsg += 'Hard Limit Expression is required.<br>';
+ }
+ if ( (service_model.value == null) || (service_model.value == "") || isblank(service_model.value) ){
+ errorMsg += 'Service Model is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+ form.submit();
+}
+
+function updateResourceRule(resource_rule_id,resource_name,end_point_position,service_expression,equipment_level,equipment_expression,allocation_expression,soft_limit_expression,hard_limit_expression,service_model) {
+
+ document.getElementById('uf_resource_rule_id').value=resource_rule_id;
+ document.getElementById('uf_resource_name').value=resource_name;
+ document.getElementById('uf_end_point_position').value=end_point_position;
+ document.getElementById('uf_service_expression').value=service_expression;
+ document.getElementById('uf_equipment_level').value=equipment_level;
+ document.getElementById('uf_equipment_expression').value=equipment_expression;
+ document.getElementById('uf_allocation_expression').value=allocation_expression;
+ document.getElementById('uf_soft_limit_expression').value=soft_limit_expression;
+ document.getElementById('uf_hard_limit_expression').value=hard_limit_expression;
+ document.getElementById('uf_service_model').value=service_model;
+ document.getElementById('uf_key_resource_rule_id').value=resource_rule_id;
+
+ $('#update_resource_rule').modal('show');
+}
+
+function deleteResourceRule(resource_rule_id) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete RESOURCE_RULE [" + resource_rule_id + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/resalloc/deleteResourceRule?resource_rule_id=" + resource_rule_id);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/resalloc/threshold_alarms.ejs b/admportal/views/resalloc/threshold_alarms.ejs
new file mode 100644
index 0000000..f561bc4
--- /dev/null
+++ b/admportal/views/resalloc/threshold_alarms.ejs
@@ -0,0 +1,186 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#threshold_alarms').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Threshold Alarms</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_threshold_alarm">
+ Add Threshold Alarm
+ </button>
+ </div>
+ <% } %>
+
+ <table id="threshold_alarms" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*Resource Threshold ID</th>
+ <th>*Resource Rule ID</th>
+ <th>Threshold Expression</th>
+ <th>Threshold Message</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.resource_threshold_id %></td>
+ <td><%= row.resource_rule_id %></td>
+ <td><%= row.threshold_expression %></td>
+ <td><%= row.threshold_message %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateThresholdAlarm('<%= row.resource_threshold_id %>','<%=row.resource_rule_id %>','<%= row.threshold_expression %>','<%= row.threshold_message %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteThresholdAlarm('<%= row.resource_threshold_id %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<% include ../partials/threshold_alarm %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitThresholdAlarm(form)
+{
+ var resource_rule_id = '';
+ var threshold_expression = '';
+ var threshold_message = '';
+ var errorMsg = '';
+
+ if ( form.name == 'addForm' )
+ {
+ resource_rule_id = form.nf_resource_rule_id;
+ threshold_expression = form.nf_threshold_expression;
+ threshold_message = form.nf_threshold_message;
+ }
+ else
+ {
+ resource_rule_id = form.uf_resource_rule_id;
+ threshold_expression = form.uf_threshold_expression;
+ threshold_message = form.uf_threshold_message;
+ }
+ if ( (resource_rule_id.value == null) || (resource_rule_id.value == "") || isblank(resource_rule_id.value) )
+ {
+ errorMsg += 'Resource Rule ID is required.\n';
+ }
+ if ( (threshold_expression.value == null) || (threshold_expression.value == "") || isblank(threshold_expression.value) )
+ {
+ errorMsg += 'Threshold Expression is required.\n';
+ }
+ if ( (threshold_message.value == null) || (threshold_message.value == "") || isblank(threshold_message.value) )
+ {
+ errorMsg += 'Threshold Message is required.\n';
+ }
+ if( errorMsg.length > 0 ) {
+ alert(errorMsg);
+ return;
+ }
+
+ if ( !isDigit(resource_rule_id.value) )
+ {
+ alert('Resource Rule ID must be a number.');
+ return;
+ }
+
+ form.submit();
+}
+
+function updateThresholdAlarm(resource_threshold_id,resource_rule_id,threshold_expression,threshold_message) {
+
+ document.getElementById('uf_resource_threshold_id').value=resource_threshold_id;
+ document.getElementById('uf_resource_rule_id').value=resource_rule_id;
+ document.getElementById('uf_threshold_expression').value=threshold_expression;
+ document.getElementById('uf_threshold_message').value=threshold_message;
+
+ document.getElementById('uf_key_resource_threshold_id').value=resource_threshold_id;
+
+ $('#update_threshold_alarm').modal('show');
+}
+
+function deleteThresholdAlarm(resource_threshold_id) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete Threshold Alarm [" + resource_threshold_id + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/resalloc/deleteThresholdAlarm?resource_threshold_id=" + resource_threshold_id);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/sdnfc/viewTables.ejs b/admportal/views/sdnfc/viewTables.ejs
new file mode 100644
index 0000000..b950d8f
--- /dev/null
+++ b/admportal/views/sdnfc/viewTables.ejs
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+
+<meta charset="UTF-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<% include ../partials/head %>
+<% include ../partials/header %>
+<script type="text/javascript" src="/javascripts/admportal.js" async></script>
+<title>SDN-FC AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#viewTables').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+</head>
+
+<body>
+
+<div class="well well-sm">
+<h3>View Database Tables
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+<!-- Single button -->
+<nav class="navbar navbar-default">
+<div class="container-fluid">
+<div class="navbar-header">
+
+<div class="btn-group">
+ <button type="button" class="btn btn-primary dropdown-toggle navbar-btn" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Table <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu" role="menu">
+ <% for ( var i in vtables ){ %>
+ <li><a href="/sdnfc/getTables?tableName=<%= vtables[i] %>"><%= vtables[i] %></a></li>
+ <% } %>
+ </ul>
+</div>
+</div>
+</div>
+</nav>
+
+<% if (displayTable) { %>
+<div class="container-fluid">
+ <table id="viewTables" class="table table-hover table-condensed">
+ <caption class="text-primary"><%= fields[0].table %></caption>
+ <thead>
+ <tr>
+ <% fields.forEach( function(field) { %>
+ <th><%= field.name %></th>
+ <% }); %>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% for ( var x in rows ){ %>
+ <tr>
+ <% for ( var j in rows[x] ){ %>
+ <td><%= rows[x][j] %></td>
+ <% } %>
+ </tr>
+ <% } %>
+ </tbody>
+ </table>
+</div>
+<% } %>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/sdnfc/vrrCredentials.ejs b/admportal/views/sdnfc/vrrCredentials.ejs
new file mode 100644
index 0000000..85c9e95
--- /dev/null
+++ b/admportal/views/sdnfc/vrrCredentials.ejs
@@ -0,0 +1,223 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-FC AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vrr_credentials').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>VRR Credentials</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vrr_credentials">
+ Add VRR Credentials
+ </button>
+ </div>
+ <% } %>
+
+ <table id="vrr_CREDENTIALS" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*Server Name</th>
+ <th>*IP Address</th>
+ <th>*Username</th>
+ <th>*Password</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.server_name %></td>
+ <td><%= row.ip_address %></td>
+ <td><%= row.username %></td>
+ <td>*****</td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateVrrCredentials('<%= row.server_name %>', '<%= row.ip_address %>', '<%= row.username %>','<%= row.password %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteVrrCredentials('<%= row.server_name %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<% include ../partials/vrr_credentials %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitVrrCredentials(form)
+{
+ var errorMsg='';
+ var server_name = '';
+ var ip_address = '';
+ var username = '';
+ var password = '';
+ var confirm_password = '';
+
+ if ( form.name == 'addForm' )
+ {
+ server_name = form.nf_server_name;
+ ip_address = form.nf_ip_address;
+ username = form.nf_username;
+ password = form.nf_password;
+ confirm_password = form.nf_confirm_password;
+
+ if ( (server_name.value == null) || (server_name.value == "") || isblank(server_name.value) )
+ {
+ errorMsg += 'Server Name is required.<br>';
+ }
+ if ( (ip_address.value == null) || (ip_address.value == "") || isblank(ip_address.value) )
+ {
+ errorMsg += 'IP Address is required.<br>';
+ }
+ if ( (password.value == null) || (password.value == "") || isblank(password.value) )
+ {
+ errorMsg += 'Password is required.<br>';
+ }
+ if ( (confirm_password.value == null) || (confirm_password.value == "") || isblank(confirm_password.value) )
+ {
+ errorMsg += 'Confirm Password is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+ if ( password.value != confirm_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ else
+ {
+ server_name = form.uf_server_name;
+ ip_address = form.uf_ip_address;
+ username = form.uf_username;
+ password = form.uf_password;
+ confirm_password = form.uf_confirm_password;
+
+ if ( (server_name.value == null) || (server_name.value == "") || isblank(server_name.value) )
+ {
+ errorMsg += 'Server Name is required.<br>';
+ }
+ if ( (ip_address.value == null) || (ip_address.value == "") || isblank(ip_address.value) )
+ {
+ errorMsg += 'IP Address is required.<br>';
+ }
+ if ( (password.value == null) || (password.value == "") || isblank(password.value) )
+ {
+ errorMsg += 'Password is required.<br>';
+ }
+ if ( (confirm_password.value == null) || (confirm_password.value == "") || isblank(confirm_password.value) )
+ {
+ errorMsg += 'Confirm Password is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+
+ if ( password.value != confirm_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ form.submit();
+}
+
+function updateVrrCredentials(server_name,ip_address,username,password) {
+
+ document.getElementById('uf_server_name').value=server_name;
+ document.getElementById('uf_key_server_name').value=server_name;
+ document.getElementById('uf_ip_address').value=ip_address;
+ document.getElementById('uf_username').value=username;
+ document.getElementById('uf_password').value=password;
+ document.getElementById('uf_confirm_password').value=password;
+
+ $('#update_vrr_credentials').modal('show');
+}
+
+function deleteVrrCredentials(server_name) {
+
+ var url_string = encodeURI("/sdnfc/deleteVrrCredentials?server_name=" + server_name);
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete VRR Credential [ " + server_name + " ]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign(url_string);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/sla/list.ejs b/admportal/views/sla/list.ejs
new file mode 100644
index 0000000..10bd4f4
--- /dev/null
+++ b/admportal/views/sla/list.ejs
@@ -0,0 +1,189 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#sla').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Service Logic Administration</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'><%=result.msg %></div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'><%=result.msg %></div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+<div class="container-fluid">
+ <table id="sla" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Module</th>
+ <th>RPC</th>
+ <th>Version</th>
+ <th>Mode</th>
+ <th>Active</th>
+ <% if(priv == 'A') { %>
+ <th>Activate/Deactive</th>
+ <% } %>
+ <th>Display</th>
+ <th>XML code</th>
+ <% if(priv=='A') { %>
+ <th>Delete</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% var i=0; rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.module %></td>
+ <td><%= row.rpc %></td>
+ <td><%= row.version %></td>
+ <td><%= row.mode %></td>
+ <td><%= row.active %></td>
+ <% if ( priv == 'A' ) {
+ if (row.active == "Y") { %>
+ <td><button type="button" class="btn btn-default btn-xs" onclick="toggleState('deactivate','<%= row.module %>','<%= row.rpc %>','<%= row.version %>','<%= row.mode %>');" >Deactivate</button> </td>
+ <% } else { %>
+ <td><button type="button" class="btn btn-default btn-xs" onclick="toggleState('activate','<%= row.module %>','<%= row.rpc %>','<%= row.version %>','<%= row.mode %>');" >Activate</button></td>
+ <% } %>
+ <% } %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick='location.assign("/sla/printAsGv?module=<%= row.module %>&rpc=<%= row.rpc %>&version=<%= row.version %>&mode=<%= row.mode %>");'>Display</button>
+ </td>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick='location.assign("/sla/printAsXml?module=<%= row.module %>&rpc=<%= row.rpc %>&version=<%= row.version %>&mode=<%= row.mode %>");'>XML code</button>
+ </td>
+ <% if ( priv == 'A' ) { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteGraph('<%=row.module %>',
+ '<%=row.rpc %>', '<%=row.version %>','<%=row.mode %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% i++; }); %>
+ </tbody>
+ </table>
+
+ <% if(priv == 'A') { %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/sla/upload" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <%
+ if ( priv == 'A' )
+ {
+ %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+ </form>
+ </div>
+ <% } %>
+</div>
+
+
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function deleteGraph(_module,rpc,version,mode) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete Directed Graph [" + _module + "][" + rpc + "][" + version + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/sla/deleteDG?module=" + _module
+ + "&rpc=" + rpc + "&version=" + version + "&mode=" + mode );
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+function toggleState(laction,_module,rpc,version,mode)
+{
+ var myprompt = '';
+ var myaction = '';
+ if(laction == 'activate'){
+ myprompt = "Are you sure you want to Activate Directed Graph [" + _module + "] ?";
+ myaction = "/sla/activate"
+ + "?module=" + _module
+ + "&rpc=" + rpc
+ + "&version=" + version
+ + "&mode=" + mode;
+ } else {
+ myprompt = "Are you sure you want to Deactivate Directed Graph [" + _module + "] ?";
+ myaction = "/sla/deactivate"
+ + "?module=" + _module
+ + "&rpc=" + rpc
+ + "&version=" + version
+ + "&mode=" + mode;
+ }
+
+ bootbox.confirm({
+ message: myprompt,
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign(myaction);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+</script>
+</body>
+</html>
+
diff --git a/admportal/views/sla/printasgv.ejs b/admportal/views/sla/printasgv.ejs
new file mode 100644
index 0000000..66dca13
--- /dev/null
+++ b/admportal/views/sla/printasgv.ejs
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>SDN-C AdminPortal</title>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+</head>
+<body>
+
+
+
+<div class="well well-sm">
+<h3>Service Logic Graph</h3>
+</div>
+
+<div class="container-fluid">
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+<pre>
+Module : <%= result.module %>
+RPC : <%= result.rpc %>
+Mode : <%= result.mode %>
+Version : <%= result.version %>
+<br>
+<img src='data:image/png;base64,<%= result.msg %>' >
+</pre>
+ <% } else { %>
+ <pre class='alert alert-danger' role='danger'><%=result.msg %></pre>
+ <% } %>
+ <% } %>
+<% } %>
+
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/sla/printasxml.ejs b/admportal/views/sla/printasxml.ejs
new file mode 100644
index 0000000..48b5504
--- /dev/null
+++ b/admportal/views/sla/printasxml.ejs
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>SDN-C AdminPortal</title>
+ <meta charset="UTF-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Service Logic Code</h3>
+</div>
+
+<div class="container-fluid">
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <pre class='alert alert-success' role='alert'><%=result.msg %></pre>
+ <% } else { %>
+ <pre class='alert alert-danger' role='danger'><%=result.msg %></pre>
+ <% } %>
+ <% } %>
+<% } %>
+</div>
+
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+</body>
+</html>
+
diff --git a/admportal/views/tunnel/linkLatencyMaster.ejs b/admportal/views/tunnel/linkLatencyMaster.ejs
new file mode 100644
index 0000000..c09adc4
--- /dev/null
+++ b/admportal/views/tunnel/linkLatencyMaster.ejs
@@ -0,0 +1,240 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+
+<meta charset="UTF-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<% include ../partials/head %>
+<% include ../partials/header %>
+<script type="text/javascript" src="/javascripts/admportal.js" async></script>
+<title>SDNC-MLC AdminPortal</title>
+
+
+<script class="init">
+ $(document).ready(function() {
+ $('#linkLatencyMaster').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+</head>
+
+<body>
+
+<div class="well well-sm">
+<h3>Link Latency Master</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary btn-md" data-toggle="modal" data-target="#add_link_latency_master">Add Link Latency</button>
+ </div>
+ <% } %>
+
+ <table id="linkLatencyMaster" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*Src CRS Name</th>
+ <th>*Dest CRS Name</th>
+ <th>*Bundle Name</th>
+ <th>*Latency</th>
+ <th>*Intra Inter SNRC</th>
+ <th>*Final Latency</th>
+ <th>*Augmentable</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.source_crs_name %></td>
+ <td><%= row.destination_crs_name %></td>
+ <td><%= row.bundle_name %></td>
+ <td><%= row.latency %></td>
+ <td><%= row.intra_inter_snrc %></td>
+ <td><%= row.final_latency %></td>
+ <td><%= row.augmentable %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs" onclick="updateLinkLatencyMaster('<%= row.source_crs_name %>', '<%= row.destination_crs_name %>', '<%= row.bundle_name %>', '<%= row.latency %>', '<%= row.intra_inter_snrc %>', '<%= row.final_latency %>', '<%= row.augmentable %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs" onclick="deleteLinkLatencyMaster('<%= row.source_crs_name %>','<%= row.destination_crs_name %>','<%= row.bundle_name %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/tunnel/uploadLinkLatencyMaster" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <button type="button" class="btn btn-default" onclick="uploadFile(this.form);">Upload File</button>
+ </form>
+ </div>
+ <% } %>
+
+</div>
+
+<% include ../partials/link_latency_master %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitLinkLatencyMaster(form)
+{
+ var errorMsg='';
+ var source_crs_name = '';
+ var destination_crs_name = '';
+ var bundle_name = '';
+ var latency = '';
+ var intra_inter_snrc = '';
+ var final_latency = '';
+ var augmentable = '';
+
+ if ( form.name == 'addForm' )
+ {
+ source_crs_name = form.nf_source_crs_name;
+ destination_crs_name = form.nf_destination_crs_name;
+ bundle_name = form.nf_bundle_name;
+ latency = form.nf_latency;
+ intra_inter_snrc = form.nf_intra_inter_snrc;
+ final_latency = form.nf_final_latency;
+ augmentable = form.nf_augmentable;
+ }
+ else
+ {
+ source_crs_name = form.uf_source_crs_name;
+ destination_crs_name = form.uf_destination_crs_name;
+ bundle_name = form.uf_bundle_name;
+ latency = form.uf_latency;
+ intra_inter_snrc = form.uf_intra_inter_snrc;
+ final_latency = form.uf_final_latency;
+ augmentable = form.uf_augmentable;
+ }
+
+ if ( (source_crs_name.value == null) || (source_crs_name.value == "") || isblank(source_crs_name.value) )
+ {
+ errorMsg += 'Source CRS Name is required.<br>';
+ }
+ if ( (destination_crs_name.value == null) || (destination_crs_name.value == "") || isblank(destination_crs_name.value) )
+ {
+ errorMsg += 'Destination CRS Name is required.<br>';
+ }
+ if ( (bundle_name.value == null) || (bundle_name.value == "") || isblank(bundle_name.value) )
+ {
+ errorMsg += 'Bundle Name is required.<br>';
+ }
+ if ( (latency.value == null) || (latency.value == "") || isblank(latency.value) )
+ {
+ errorMsg += 'Latency is required.<br>';
+ }
+ if ( (intra_inter_snrc.value == null) || (intra_inter_snrc.value == "") || isblank(intra_inter_snrc.value) )
+ {
+ errorMsg += 'Intra Inter SNRC is required.<br>';
+ }
+ if ( (final_latency.value == null) || (final_latency.value == "") || isblank(final_latency.value) )
+ {
+ errorMsg += 'Final Latency is required.<br>';
+ }
+ if ( (augmentable.value == null) || (augmentable.value == "") || isblank(augmentable.value) )
+ {
+ errorMsg += 'Augmentable is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+
+ if (augmentable.value != 'Y' && augmentable.value != 'N'){
+ bootbox.alert('Augmentable must be Y or N');
+ return;
+ }
+
+ form.submit();
+}
+
+function updateLinkLatencyMaster(source_crs_name,destination_crs_name,bundle_name,latency,intra_inter_snrc,final_latency,augmentable) {
+
+ document.getElementById('uf_source_crs_name').value=source_crs_name;
+ document.getElementById('uf_destination_crs_name').value=destination_crs_name;
+ document.getElementById('uf_bundle_name').value=bundle_name;
+ document.getElementById('uf_latency').value=latency;
+ document.getElementById('uf_intra_inter_snrc').value=intra_inter_snrc;
+ document.getElementById('uf_final_latency').value=final_latency;
+ document.getElementById('uf_augmentable').value=augmentable;
+
+ document.getElementById('uf_key_source_crs_name').value=source_crs_name;
+ document.getElementById('uf_key_destination_crs_name').value=destination_crs_name;
+ document.getElementById('uf_key_bundle_name').value=bundle_name;
+
+ $('#update_link_latency_master').modal('show');
+}
+
+function deleteLinkLatencyMaster(source_crs_name,destination_crs_name,bundle_name) {
+
+ var url_string = encodeURI("/tunnel/deleteLinkLatencyMaster?source_crs_name=" + source_crs_name
+ + "&destination_crs_name=" + destination_crs_name
+ + "&bundle_name=" + bundle_name);
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete this Link Latency entry? [" + source_crs_name + ":" + destination_crs_name + ":" + bundle_name + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign(url_string);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/tunnel/linkMaster.ejs b/admportal/views/tunnel/linkMaster.ejs
new file mode 100644
index 0000000..160bb7e
--- /dev/null
+++ b/admportal/views/tunnel/linkMaster.ejs
@@ -0,0 +1,213 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+
+<meta charset="UTF-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<% include ../partials/head %>
+<% include ../partials/header %>
+<script type="text/javascript" src="/javascripts/admportal.js" async></script>
+<title>SDNC-MLC AdminPortal</title>
+
+
+<script class="init">
+ $(document).ready(function() {
+ $('#linkMaster').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+</head>
+
+<body>
+
+<div class="well well-sm">
+<h3>Link Master</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary btn-md" data-toggle="modal" data-target="#add_link_master">Add Link</button>
+ </div>
+ <% } %>
+
+ <table id="linkMaster" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*Link Interface IP</th>
+ <th>Source CRS Name</th>
+ <th>Destination CRS Name</th>
+ <th>Max Reserved BW</th>
+ <th>Default Cost</th>
+ <th>Bundle Name</th>
+ <th>Shutdown</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.link_interface_ip %></td>
+ <td><%= row.source_crs_name %></td>
+ <td><%= row.destination_crs_name %></td>
+ <td><%= row.link_speed %></td>
+ <td><%= row.default_cost %></td>
+ <td><%= row.bundle_name %></td>
+ <td><%= row.shutdown %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs" onclick="updateLinkMaster('<%= row.link_interface_ip %>',
+ '<%= row.source_crs_name %>', '<%= row.destination_crs_name %>', '<%= row.link_speed %>', '<%= row.default_cost %>',
+ '<%= row.bundle_name %>', '<%= row.shutdown %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs" onclick="deleteLinkMaster('<%= row.link_interface_ip %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+</div>
+
+<% include ../partials/link_master %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function saveLinkMaster(form)
+{
+ var errorMsg='';
+ var link_interface_ip = '';
+ var source_crs_name = '';
+ var destination_crs_name = '';
+ var link_speed = '';
+ var default_cost = '';
+ var bundle_name = '';
+ var shutdown = '';
+
+ if ( form.name == 'addForm' )
+ {
+ link_interface_ip = form.nf_link_interface_ip;
+ source_crs_name = form.nf_source_crs_name;
+ destination_crs_name = form.nf_destination_crs_name;
+ link_speed = form.nf_link_speed;
+ default_cost = form.nf_default_cost;
+ bundle_name = form.nf_bundle_name;
+ shutdown = form.nf_shutdown;
+ }
+ else
+ {
+ link_interface_ip = form.uf_link_interface_ip;
+ source_crs_name = form.uf_source_crs_name;
+ destination_crs_name = form.uf_destination_crs_name;
+ link_speed = form.uf_link_speed;
+ default_cost = form.uf_default_cost;
+ bundle_name = form.uf_bundle_name;
+ shutdown = form.uf_shutdown;
+ }
+
+
+ if ( (link_interface_ip.value == null) || (link_interface_ip.value == "") || isblank(link_interface_ip.value) )
+ {
+ errorMsg += 'Link Interface IP is required.<br>';
+ }
+ if ( (source_crs_name.value == null) || (source_crs_name.value == "") || isblank(source_crs_name.value) )
+ {
+ errorMsg += 'Source CRS Name is required.<br>';
+ }
+ if ( (destination_crs_name.value == null) || (destination_crs_name.value == "") || isblank(destination_crs_name.value) )
+ {
+ errorMsg += 'Destination CRS Name is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+
+ if ( link_speed.value.length >0 && !isDigit(link_speed.value) )
+ {
+ bootbox.alert('Max Reserved BW must be a number.');
+ return;
+ }
+ if ( default_cost.value.length >0 && !isDigit(default_cost.value) )
+ {
+ bootbox.alert('Default Cost must be a number.');
+ return;
+ }
+ form.submit();
+}
+
+function updateLinkMaster(link_interface_ip,source_crs_name,destination_crs_name,link_speed,default_cost,bundle_name,shutdown) {
+
+ document.getElementById('uf_link_interface_ip').value=link_interface_ip;
+ document.getElementById('uf_source_crs_name').value=source_crs_name;
+ document.getElementById('uf_destination_crs_name').value=destination_crs_name;
+ document.getElementById('uf_link_speed').value=link_speed;
+ document.getElementById('uf_default_cost').value=default_cost;
+ document.getElementById('uf_bundle_name').value=bundle_name;
+ document.getElementById('uf_shutdown').value=shutdown;
+ document.getElementById('uf_key_link_interface_ip').value=link_interface_ip;
+
+ $('#update_link_master').modal('show');
+}
+
+function deleteLinkMaster(link_interface_ip) {
+
+ var url_string = encodeURI("/tunnel/deleteLinkMaster?link_interface_ip=" + link_interface_ip);
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete this Link [" + link_interface_ip + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign(url_string);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/tunnel/metroRoadmServiceRequest.ejs b/admportal/views/tunnel/metroRoadmServiceRequest.ejs
new file mode 100644
index 0000000..efc81af
--- /dev/null
+++ b/admportal/views/tunnel/metroRoadmServiceRequest.ejs
@@ -0,0 +1,300 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#metroRoadmServiceRequest').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Metro ROADM Service Request</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <!--
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_metroroadm_service_request">
+ Add Metro ROADM Serice Request
+ </button>
+ </div>
+ <% } %>
+ -->
+
+ <table id="metroRoadmServiceRequest" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>ReqId</th>
+ <th>ReqSource</th>
+ <th>NotificationURL</th>
+ <th>Action</th>
+ <th>ReqTimestamp</th>
+ <th>UpdateTimestamp</th>
+ <th>ReqStatus</th>
+ <th>ProcStatus</th>
+ <th>ReasonCode</th>
+ <th>ReasonMsg</th>
+ <th>ServiceId</th>
+ <th>CommonId</th>
+ <th>Clli_A</th>
+ <th>Clli_Z</th>
+ <th>Customer</th>
+ <th>ControllerId</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.request_id %></td>
+ <td><%= row.request_source %></td>
+ <td><%= row.notification_url %></td>
+ <td><%= row.action %></td>
+ <td><%= row.request_timestamp %></td>
+ <td><%= row.update_timestamp %></td>
+ <td><%= row.request_status %></td>
+ <td><%= row.processing_status %></td>
+ <td><%= row.reason_code %></td>
+ <td><%= row.reason_message %></td>
+ <td><%= row.service_id %></td>
+ <td><%= row.common_id %></td>
+ <td><%= row.clli_a %></td>
+ <td><%= row.clli_z %></td>
+ <td><%= row.customer %></td>
+ <td><%= row.controller_id %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateMetroRoadmServiceRequest('<%=row.request_id %>','<%= row.request_source %>',
+ '<%=row.notification_url %>','<%= row.action %>','<%= row.request_timestamp %>',
+ '<%= row.update_timestamp %>','<%= row.request_status %>', '<%= row.processing_status %>',
+ '<%= row.reason_code %>', '<%= row.reason_message %>','<%= row.service_id %>',
+ '<%= row.common_id %>','<%= row.clli_a %>', '<%= row.clli_z %>','<%= row.customer %>',
+ '<%= row.controller_id %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteMetroRoadmServiceRequest('<%= row.request_id %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+</div>
+
+<% include ../partials/metroroadm_service_request %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitMetroRoadmServiceRequest(form)
+{
+ var errorMsg='';
+ var request_id='';
+ var request_source = '';
+ var notification_url = '';
+ var action = '';
+ var request_timestamp = '';
+ var update_timestamp = '';
+ var request_status = '';
+ var processing_status = '';
+ var reason_code = '';
+ var reason_message = '';
+ var service_id = '';
+ var common_id = '';
+ var clli_a = '';
+ var clli_z = '';
+ var customer = '';
+ var controller_id = '';
+
+ if ( form.name == 'addForm' )
+ {
+ request_id = form.nf_request_id;
+ request_source = form.nf_request_source;
+ notification_url = form.nf_notification_url;
+ action = form.nf_l_action;
+ request_timestamp = form.nf_request_timestamp;
+ update_timestamp = form.nf_update_timestamp;
+ request_status = form.nf_request_status;
+ processing_status = form.nf_processing_status;
+ reason_code = form.nf_reason_code;
+ reason_message = form.nf_reason_message;
+ service_id = form.nf_service_id;
+ common_id = form.nf_common_id;
+ clli_a = form.nf_clli_a;
+ clli_z = form.nf_clli_z;
+ customer = form.nf_customer;
+ controller_id = form.nf_controller_id;
+ }
+ else
+ {
+ request_id = form.uf_request_id;
+ request_source = form.uf_request_source;
+ notification_url = form.uf_notification_url;
+ action = form.uf_l_action;
+ request_timestamp = form.uf_request_timestamp;
+ update_timestamp = form.uf_update_timestamp;
+ request_status = form.uf_request_status;
+ processing_status = form.uf_processing_status;
+ reason_code = form.uf_reason_code;
+ reason_message = form.uf_reason_message;
+ service_id = form.uf_service_id;
+ common_id = form.uf_common_id;
+ clli_a = form.uf_clli_a;
+ clli_z = form.uf_clli_z;
+ customer = form.uf_customer;
+ controller_id = form.uf_controller_id;
+ }
+ if ( (request_id.value == null) || (request_id.value == "") || isblank(request_id.value) )
+ {
+ errorMsg += 'Request Id is required.\n';
+ }
+ if ( (action.value == null) || (action.value == "") || isblank(action.value) )
+ {
+ errorMsg += 'Action is required.\n';
+ }
+ if ( (request_timestamp.value == null) || (request_timestamp.value == "") || isblank(request_timestamp.value) )
+ {
+ errorMsg += 'Request Timestamp is required.\n';
+ }
+ if ( (request_status.value == null) || (request_status.value == "") || isblank(request_status.value) )
+ {
+ errorMsg += 'Request Status is required.\n';
+ }
+ if ( (processing_status.value == null) || (processing_status.value == "") || isblank(processing_status.value) )
+ {
+ errorMsg += 'Processing Status is required.\n';
+ }
+ if ( (service_id.value == null) || (service_id.value == "") || isblank(service_id.value) )
+ {
+ errorMsg += 'Service Id is required.\n';
+ }
+ if ( (controller_id.value == null) || (controller_id.value == "") || isblank(controller_id.value) )
+ {
+ errorMsg += 'Controller Id is required.\n';
+ }
+ if( errorMsg.length > 0 ) {
+ alert(errorMsg);
+ return;
+ }
+
+ // edit request_timestamp, update_timestamp
+ if (!isValid(request_timestamp.value)){
+ alert('Request Timestamp must be in format YYYY-MM-DD HH:MM:SS');
+ return;
+ }
+ if ( update_timestamp.length > 0 )
+ {
+ if (!isValid(update_timestamp.value)){
+ alert('Update Timestamp must be in format YYYY-MM-DD HH:MM:SS');
+ return;
+ }
+ }
+ form.submit();
+}
+
+function isValid(dateString) {
+ if (dateString == '0000-00-00 00:00:00'){
+ return(true);
+ }
+ var minDate = new Date('1970-01-01 00:00:01');
+ var maxDate = new Date('2038-01-19 03:14:07');
+ var date = new Date(dateString);
+ return date > minDate && date < maxDate;
+}
+
+function updateMetroRoadmServiceRequest(request_id,request_source,notification_url,action,request_timestamp,update_timestamp,
+ request_status,processing_status,reason_code,reason_message,service_id,common_id,clli_a,clli_z,customer,controller_id) {
+
+ document.getElementById('uf_request_id').value=request_id;
+ document.getElementById('uf_key_request_id').value=request_id;
+ document.getElementById('uf_request_source').value=request_source;
+ document.getElementById('uf_notification_url').value=notification_url;
+ document.getElementById('uf_l_action').value=action;
+ document.getElementById('uf_request_timestamp').value=request_timestamp;
+ document.getElementById('uf_update_timestamp').value=update_timestamp;
+ document.getElementById('uf_request_status').value=request_status;
+ document.getElementById('uf_processing_status').value=processing_status;
+ document.getElementById('uf_reason_code').value=reason_code;
+ document.getElementById('uf_reason_message').value=reason_message;
+ document.getElementById('uf_service_id').value=service_id;
+ document.getElementById('uf_common_id').value=common_id;
+ document.getElementById('uf_clli_a').value=clli_a;
+ document.getElementById('uf_clli_z').value=clli_z;
+ document.getElementById('uf_customer').value=customer;
+ document.getElementById('uf_controller_id').value=controller_id;
+
+ $('#update_metroroadm_service_request').modal('show');
+}
+
+function deleteMetroRoadmServiceRequest(request_id) {
+
+ var url_string = encodeURI("/tunnel/deleteMetroRoadmServiceRequest?request_id=" + request_id );
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete Metro ROADM Service Request? " + request_id,
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign(url_string);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/tunnel/owbcProperties.ejs b/admportal/views/tunnel/owbcProperties.ejs
new file mode 100644
index 0000000..37b02fe
--- /dev/null
+++ b/admportal/views/tunnel/owbcProperties.ejs
@@ -0,0 +1,223 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#owbc_properties').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>OWBC Properties</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_owbc_properties">
+ Add OWBC Properties
+ </button>
+ </div>
+ <% } %>
+
+ <table id="owbc_properties" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Controller ID</th>
+ <th>Base URL</th>
+ <th>Service Create Extension</th>
+ <th>Service Delete Extension</th>
+ <th>Auth Username</th>
+ <th>Auth Password</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.controller_id %></td>
+ <td><%= row.base_uri %></td>
+ <td><%= row.service_create_extension %></td>
+ <td><%= row.service_delete_extension %></td>
+ <td><%= row.auth_username %></td>
+ <td>*****</td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateOwbcProperties('<%=row.controller_id %>','<%= row.base_uri %>','<%= row.service_create_extension %>','<%= row.service_delete_extension %>','<%= row.auth_username %>','<%= row.auth_password %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteOwbcProperties('<%= row.controller_id %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<% include ../partials/owbc_properties %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitOwbcProperties(form)
+{
+ var errorMsg='';
+ var controller_id = '';
+ var base_uri = '';
+ var service_create_extension = '';
+ var service_delete_extension = '';
+ var auth_username = '';
+ var auth_password = '';
+ var confirm_auth_password = '';
+
+ if ( form.name == 'addForm' )
+ {
+ controller_id = form.nf_controller_id;
+ base_uri = form.nf_base_uri;
+ service_create_extension = form.nf_service_create_extension;
+ service_delete_extension = form.nf_service_delete_extension;
+ auth_username = form.nf_auth_username;
+ auth_password = form.nf_auth_password;
+ confirm_auth_password = form.nf_confirm_auth_password;
+
+ if ( auth_password.value != confirm_auth_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ else
+ {
+ controller_id = form.uf_controller_id;
+ base_uri = form.uf_base_uri;
+ service_create_extension = form.uf_service_create_extension;
+ service_delete_extension = form.uf_service_delete_extension;
+ auth_username = form.uf_auth_username;
+ auth_password = form.uf_auth_password;
+ confirm_auth_password = form.uf_confirm_auth_password;
+
+ if ( auth_password.value != confirm_auth_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ if ( (controller_id.value == null) || (controller_id.value == "") || isblank(controller_id.value) )
+ {
+ errorMsg += 'Controller Id is required.<br>';
+ }
+ if ( (base_uri.value == null) || (base_uri.value == "") || isblank(base_uri.value) )
+ {
+ errorMsg += 'Base URL is required.<br>';
+ }
+ if ( (service_create_extension.value == null) || (service_create_extension.value == "") || isblank(service_create_extension.value) )
+ {
+ errorMsg += 'Service Create Extension is required.<br>';
+ }
+ if ( (service_delete_extension.value == null) || (service_delete_extension.value == "") || isblank(service_delete_extension.value) )
+ {
+ errorMsg += 'Service Delete Extension is required.<br>';
+ }
+ if ( (auth_username.value == null) || (auth_username.value == "") || isblank(auth_username.value) )
+ {
+ errorMsg += 'Auth Username is required.<br>';
+ }
+ if ( (auth_password.value == null) || (auth_password.value == "") || isblank(auth_password.value) )
+ {
+ errorMsg += 'Auth Password is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+ form.submit();
+}
+
+function updateOwbcProperties(controller_id,base_uri,service_create_extension,service_delete_extension,auth_username,auth_password) {
+
+ document.getElementById('uf_controller_id').value=controller_id;
+ document.getElementById('uf_key_controller_id').value=controller_id;
+ document.getElementById('uf_base_uri').value=base_uri;
+ document.getElementById('uf_service_create_extension').value=service_create_extension;
+ document.getElementById('uf_service_delete_extension').value=service_delete_extension;
+ document.getElementById('uf_auth_username').value=auth_username;
+ document.getElementById('uf_auth_password').value=auth_password;
+ document.getElementById('uf_confirm_auth_password').value=auth_password;
+
+ $('#update_owbc_properties').modal('show');
+}
+
+function deleteOwbcProperties(controller_id) {
+
+ var url_string = encodeURI("/tunnel/deleteOwbcProperties?controller_id=" + controller_id );
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete OWBC Properties? " + controller_id,
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign(url_string);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/tunnel/partnerProperties.ejs b/admportal/views/tunnel/partnerProperties.ejs
new file mode 100644
index 0000000..af51c86
--- /dev/null
+++ b/admportal/views/tunnel/partnerProperties.ejs
@@ -0,0 +1,184 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDNC-MLC AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#partner_properties').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Partner Properties</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_partner_properties">
+ Add Partner Properties
+ </button>
+ </div>
+ <% } %>
+
+ <table id="partner_properties" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*Partner</th>
+ <th>*Username</th>
+ <th>*Password</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.partner %></td>
+ <td><%= row.auth_username %></td>
+ <td>*****</td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updatePartnerProperties('<%= row.partner %>','<%= row.auth_username %>','<%= row.auth_password %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deletePartnerProperties('<%= row.partner %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<% include ../partials/partner_properties %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitPartnerProperties(form)
+{
+ var errorMsg='';
+ var partner = '';
+ var auth_username = '';
+ var auth_password = '';
+ var confirm_auth_password = '';
+
+ if ( form.name == 'addForm' )
+ {
+ partner = form.nf_partner;
+ auth_username = form.nf_auth_username;
+ auth_password = form.nf_auth_password;
+ confirm_auth_password = form.nf_confirm_auth_password;
+
+ if ( (partner.value == null) || (partner.value == "") || isblank(partner.value) )
+ {
+ errorMsg += 'Partner is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+ if ( auth_password.value != confirm_auth_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ else
+ {
+ partner = form.uf_partner;
+ auth_username = form.uf_auth_username;
+ auth_password = form.uf_auth_password;
+ confirm_auth_password = form.uf_confirm_auth_password;
+ if ( auth_password.value != confirm_auth_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ form.submit();
+}
+
+function updatePartnerProperties(partner,auth_username,auth_password) {
+
+ document.getElementById('uf_partner').value=partner;
+ document.getElementById('uf_key_partner').value=partner;
+ document.getElementById('uf_auth_username').value=auth_username;
+ document.getElementById('uf_auth_password').value=auth_password;
+ document.getElementById('uf_confirm_auth_password').value=auth_password;
+
+ $('#update_partner_properties').modal('show');
+}
+
+function deletePartnerProperties(partner) {
+
+ var url_string = encodeURI("/tunnel/deletePartnerProperties?partner=" + partner);
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete Partner Property [ " + partner + " ]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign(url_string);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/tunnel/roadmMapping.ejs b/admportal/views/tunnel/roadmMapping.ejs
new file mode 100644
index 0000000..347cf03
--- /dev/null
+++ b/admportal/views/tunnel/roadmMapping.ejs
@@ -0,0 +1,230 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+
+<meta charset="UTF-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<% include ../partials/head %>
+<% include ../partials/header %>
+<script type="text/javascript" src="/javascripts/admportal.js" async></script>
+<title>SDNC-MLC AdminPortal</title>
+
+
+<script class="init">
+ $(document).ready(function() {
+ $('#roadmMapping').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+</head>
+
+<body>
+
+<div class="well well-sm">
+<h3>ROADM Mapping</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary btn-md" data-toggle="modal" data-target="#add_roadm_mapping">Add Mapping</button>
+ </div>
+ <% } %>
+
+ <table id="roadmMapping" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*Router Name</th>
+ <th>*ROADM Name</th>
+ <th>*CLLI</th>
+ <th>*City Name</th>
+ <th>*LAT</th>
+ <th>*LON</th>
+ <th>*SNRC</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.router_name %></td>
+ <td><%= row.roadm_name %></td>
+ <td><%= row.clli %></td>
+ <td><%= row.city_name %></td>
+ <td><%= row.lat %></td>
+ <td><%= row.lon %></td>
+ <td><%= row.snrc %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs" onclick="updateRoadmMapping('<%= row.router_name %>',
+ '<%= row.roadm_name %>', '<%= row.clli %>', '<%= row.city_name %>', '<%= row.lat %>', '<%= row.lon %>', '<%= row.snrc %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs" onclick="deleteRoadmMapping('<%= row.router_name %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/tunnel/uploadRoadmMapping" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <button type="button" class="btn btn-default" onclick="uploadFile(this.form);">Upload File</button>
+ </form>
+ </div>
+ <% } %>
+
+</div>
+
+<% include ../partials/roadm_mapping %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function saveRoadmMapping(form)
+{
+ var errorMsg='';
+ var router_name = '';
+ var roadm_name = '';
+ var clli = '';
+ var city_name = '';
+ var lat = '';
+ var lon = '';
+ var snrc = '';
+
+ if ( form.name == 'addForm' )
+ {
+ router_name = form.nf_router_name;
+ roadm_name = form.nf_roadm_name;
+ clli = form.nf_clli;
+ city_name = form.nf_city_name;
+ lat = form.nf_lat;
+ lon = form.nf_lon;
+ snrc = form.nf_snrc;
+ }
+ else
+ {
+ router_name = form.uf_router_name;
+ roadm_name = form.uf_roadm_name;
+ clli = form.uf_clli;
+ city_name = form.uf_city_name;
+ lat = form.uf_lat;
+ lon = form.uf_lon;
+ snrc = form.uf_snrc;
+ }
+
+ if ( (router_name.value == null) || (router_name.value == "") || isblank(router_name.value) )
+ {
+ errorMsg += 'Router Name is required.<br>';
+ }
+ if ( (roadm_name.value == null) || (roadm_name.value == "") || isblank(roadm_name.value) )
+ {
+ errorMsg += 'ROADM Name is required.<br>';
+ }
+ if ( (clli.value == null) || (clli.value == "") || isblank(clli.value) )
+ {
+ errorMsg += 'CLLI is required.<br>';
+ }
+ if ( (city_name.value == null) || (city_name.value == "") || isblank(city_name.value) )
+ {
+ errorMsg += 'City Name is required.<br>';
+ }
+ if ( (lat.value == null) || (lat.value == "") || isblank(lat.value) )
+ {
+ errorMsg += 'LAT (latitude) is required.<br>';
+ }
+ if ( (lon.value == null) || (lon.value == "") || isblank(lon.value) )
+ {
+ errorMsg += 'LON (longitude) is required.<br>';
+ }
+ if ( (snrc.value == null) || (snrc.value == "") || isblank(snrc.value) )
+ {
+ errorMsg += 'SNRC is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+ form.submit();
+}
+
+function updateRoadmMapping(router_name,roadm_name,clli,city_name,lat,lon,snrc) {
+
+ document.getElementById('uf_router_name').value=router_name;
+ document.getElementById('uf_roadm_name').value=roadm_name;
+ document.getElementById('uf_clli').value=clli;
+ document.getElementById('uf_city_name').value=city_name;
+ document.getElementById('uf_lat').value=lat;
+ document.getElementById('uf_lon').value=lon;
+ document.getElementById('uf_snrc').value=snrc;
+ document.getElementById('uf_key_router_name').value=router_name;
+
+ $('#update_roadm_mapping').modal('show');
+}
+
+function deleteRoadmMapping(router_name) {
+
+ var url_string = encodeURI("/tunnel/deleteRoadmMapping?router_name=" + router_name);
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete this mapping? [" + router_name + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign(url_string);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/tunnel/routerMaster.ejs b/admportal/views/tunnel/routerMaster.ejs
new file mode 100644
index 0000000..eada3f3
--- /dev/null
+++ b/admportal/views/tunnel/routerMaster.ejs
@@ -0,0 +1,167 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+
+<meta charset="UTF-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<% include ../partials/head %>
+<% include ../partials/header %>
+<script type="text/javascript" src="/javascripts/admportal.js" async></script>
+<title>SDN-C AdminPortal</title>
+
+
+<script class="init">
+ $(document).ready(function() {
+ $('#routerMaster').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+</head>
+
+<body>
+
+<div class="well well-sm">
+<h3>Router Master</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary btn-md" data-toggle="modal" data-target="#add_router_master">Add Router</button>
+ </div>
+ <% } %>
+
+ <table id="routerMaster" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*CRS Name</th>
+ <th>Loopback IP</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.crs_name %></td>
+ <td><%= row.loopback_ip %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs" onclick="updateRouterMaster('<%= row.crs_name %>',
+ '<%= row.loopback_ip %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs" onclick="deleteRouterMaster('<%= row.crs_name %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+</div>
+
+<% include ../partials/router_master %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function saveRouterMaster(form)
+{
+ var errorMsg='';
+ var crs_name = '';
+ var loopback_ip = '';
+
+ if ( form.name == 'addForm' )
+ {
+ crs_name = form.nf_crs_name;
+ loopback_ip = form.nf_loopback_ip;
+ }
+ else
+ {
+ crs_name = form.uf_crs_name;
+ loopback_ip = form.uf_loopback_ip;
+ }
+
+
+ if ( (crs_name.value == null) || (crs_name.value == "") || isblank(crs_name.value) )
+ {
+ errorMsg += 'CRS Name is required.<br>';
+ }
+ if ( (loopback_ip.value == null) || (loopback_ip.value == "") || isblank(loopback_ip.value) )
+ {
+ errorMsg += 'Loopback IP is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+ form.submit();
+}
+
+function updateRouterMaster(crs_name,loopback_ip) {
+
+ document.getElementById('uf_crs_name').value=crs_name;
+ document.getElementById('uf_loopback_ip').value=loopback_ip;
+ document.getElementById('uf_key_crs_name').value=crs_name;
+
+ $('#update_router_master').modal('show');
+}
+
+function deleteRouterMaster(crs_name) {
+
+ var url_string = encodeURI("/tunnel/deleteRouterMaster?crs_name=" + crs_name);
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete this Router [" + crs_name + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign(url_string);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/altsCredentials.ejs b/admportal/views/ucpe/altsCredentials.ejs
new file mode 100644
index 0000000..54ca020
--- /dev/null
+++ b/admportal/views/ucpe/altsCredentials.ejs
@@ -0,0 +1,171 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#alts_credentials').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>ALTS Credentials</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_alts_credentials">
+ Add ALTS Credentials
+ </button>
+ </div>
+ <% } %>
+
+ <table id="alts_credentials" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>ALTS Username</th>
+ <th>ALTS Password</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.alts_username %></td>
+ <td>*****</td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateAltsCredentials('<%=row.alts_username %>','<%= row.alts_password %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteAltsCredentials('<%= row.alts_username %>', '<%= row.alts_password %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<% include ../partials/alts_credentials %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitAltsCredentials(form)
+{
+ var errorMsg='';
+ var alts_username = '';
+ var alts_password = '';
+ var confirm_alts_password = '';
+
+ if ( form.name == 'addForm' )
+ {
+ alts_username = form.nf_alts_username;
+ alts_password = form.nf_alts_password;
+ confirm_alts_password = form.nf_confirm_alts_password;
+
+ if ( alts_password.value != confirm_alts_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ else
+ {
+ alts_username = form.uf_alts_username;
+ alts_password = form.uf_alts_password;
+ confirm_alts_password = form.uf_confirm_alts_password;
+
+ if ( alts_password.value != confirm_alts_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ form.submit();
+}
+
+function updateAltsCredentials(alts_username,alts_password) {
+
+ document.getElementById('uf_alts_username').value=alts_username;
+ document.getElementById('uf_alts_password').value=alts_password;
+
+ $('#update_alts_credentials').modal('show');
+}
+
+function deleteAltsCredentials(alts_username, alts_password) {
+
+ var url_string = encodeURI("/ucpe/deleteAltsCredentials?alts_username=" + alts_username
+ + "&alts_password=" + alts_password);
+
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete ALTS Credentials? " + alts_username,
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign(url_string);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/apiLogins.ejs b/admportal/views/ucpe/apiLogins.ejs
new file mode 100644
index 0000000..ddb50c8
--- /dev/null
+++ b/admportal/views/ucpe/apiLogins.ejs
@@ -0,0 +1,93 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#api_logins').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+
+<body>
+
+<div class="well well-sm">
+<h3>uCPE API Logins</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="api_logins" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*CUSTOMER_NAME</th>
+ <th>PHS_NCS_USERNAME</th>
+ <th>NCS_PUBLIC_SSH_KEY</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.customer_name %></td>
+ <td><%= row.phs_ncs_username %></td>
+ <td><%= row.ncs_public_ssh_key %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/chainingTopologies.ejs b/admportal/views/ucpe/chainingTopologies.ejs
new file mode 100644
index 0000000..2717062
--- /dev/null
+++ b/admportal/views/ucpe/chainingTopologies.ejs
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#chaining_topologies').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE Chaining Topologies</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="chaining_topologies" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*TOPOLOGY_NAME</th>
+ <th>*START_VNF_TYPE</th>
+ <th>*SEQUENCE_NUMBER</th>
+ <th>START_SERVIVE_PORT_NAME</th>
+ <th>VNF_TYPE</th>
+ <th>SERVICE_PORT_NAME</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.topology_name %></td>
+ <td><%= row.start_vnf_type %></td>
+ <td><%= row.sequence_number %></td>
+ <td><%= row.start_service_port_name %></td>
+ <td><%= row.vnf_type %></td>
+ <td><%= row.service_port_name %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/customerNcsServers.ejs b/admportal/views/ucpe/customerNcsServers.ejs
new file mode 100644
index 0000000..082384a
--- /dev/null
+++ b/admportal/views/ucpe/customerNcsServers.ejs
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#ncs_servers').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE Customer NCS Servers</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="ncs_servers" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*CUSTOMER_NAME</th>
+ <th>URL</th>
+ <th>NCS_SM_IP_ADDRESS</th>
+ <th>NCS_DM_V6_IP_ADDRESS</th>
+ <th>NCS_DM_V6_IP_NETWORK</th>
+ <th>DR_NCS_DM_V6_IP_NETWORK</th>
+ <th>NCS_DM_V4_IP_NETWORK</th>
+ <th>DR_NCS_DM_V4_IP_NETWORK</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.customer_name %></td>
+ <td><%= row.url %></td>
+ <td><%= row.ncs_sm_ip_address %></td>
+ <td><%= row.ncs_dm_v6_ip_address %></td>
+ <td><%= row.ncs_dm_v6_ip_network %></td>
+ <td><%= row.dr_ncs_dm_v6_ip_network %></td>
+ <td><%= row.ncs_dm_v4_ip_network %></td>
+ <td><%= row.dr_ncs_dm_v4_ip_network %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/mappedServicePort.ejs b/admportal/views/ucpe/mappedServicePort.ejs
new file mode 100644
index 0000000..1c55eb5
--- /dev/null
+++ b/admportal/views/ucpe/mappedServicePort.ejs
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#mapped_service_port').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE Mapped Service Port</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="mapped_service_port" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*DEVICE_VENDOR_NAME</th>
+ <th>*DEVICE_MODEL</th>
+ <th>*SERVICE_PORT_NAME</th>
+ <th>*VNF_VENDOR_NAME</th>
+ <th>*VNF_MODEL</th>
+ <th>*PORT_NAME</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.device_vendor_name %></td>
+ <td><%= row.device_model %></td>
+ <td><%= row.service_port_name %></td>
+ <td><%= row.vnf_vendor_name %></td>
+ <td><%= row.vnf_model %></td>
+ <td><%= row.port_name %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/mcapServers.ejs b/admportal/views/ucpe/mcapServers.ejs
new file mode 100644
index 0000000..a51abd0
--- /dev/null
+++ b/admportal/views/ucpe/mcapServers.ejs
@@ -0,0 +1,92 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#mcap_servers').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE MCAP Servers</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="mcap_servers" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*CUSTOMER_NAME</th>
+ <th>*MCAP_IP_ADDRESS</th>
+ <th>*MCAP_POLLER_IP_ADDRESS</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.customer_name %></td>
+ <td><%= row.mcap_ip_address %></td>
+ <td><%= row.mcap_poller_ip_address %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/ncsCredentials.ejs b/admportal/views/ucpe/ncsCredentials.ejs
new file mode 100644
index 0000000..f860b07
--- /dev/null
+++ b/admportal/views/ucpe/ncsCredentials.ejs
@@ -0,0 +1,180 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#ncs_server_credentials').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>NCS Server Credentials</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_ncs_credentials">
+ Add NCS Credentials
+ </button>
+ </div>
+ <% } %>
+
+ <table id="ncs_server_credentials" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*Customer Name</th>
+ <th>NCS Username</th>
+ <th>NCS Password</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.customer_name %></td>
+ <td><%= row.ncs_username %></td>
+ <td>*****</td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateNcsCredentials('<%= row.customer_name %>','<%= row.ncs_username %>','<%= row.ncs_password %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteNcsCredentials('<%= row.customer_name %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<% include ../partials/ncs_credentials %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitNcsCredentials(form)
+{
+ var errorMsg='';
+ var customer_name = '';
+ var ncs_username = '';
+ var ncs_password = '';
+ var confirm_ncs_password = '';
+
+ if ( form.name == 'addForm' )
+ {
+ customer_name = form.nf_customer_name;
+ ncs_username = form.nf_ncs_username;
+ ncs_password = form.nf_ncs_password;
+ confirm_ncs_password = form.nf_confirm_ncs_password;
+
+ if ( (customer_name.value == null) || (customer_name.value == "") || isblank(customer_name.value) )
+ {
+ errorMsg += 'Customer Name is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+ if ( ncs_password.value != confirm_ncs_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ else
+ {
+ customer_name = form.uf_customer_name;
+ ncs_username = form.uf_ncs_username;
+ ncs_password = form.uf_ncs_password;
+ confirm_ncs_password = form.uf_confirm_ncs_password;
+ if ( ncs_password.value != confirm_ncs_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ form.submit();
+}
+
+function updateNcsCredentials(customer_name,ncs_username,ncs_password) {
+
+ document.getElementById('uf_customer_name').value=customer_name;
+ document.getElementById('uf_ncs_username').value=ncs_username;
+ document.getElementById('uf_ncs_password').value=ncs_password;
+
+ $('#update_ncs_credentials').modal('show');
+}
+
+function deleteNcsCredentials(customer_name) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete NCS Credentials [ " + customer_name + " ]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/ucpe/deleteNcsCredentials?customer_name=" + customer_name);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/nmInterfaces.ejs b/admportal/views/ucpe/nmInterfaces.ejs
new file mode 100644
index 0000000..50b15c4
--- /dev/null
+++ b/admportal/views/ucpe/nmInterfaces.ejs
@@ -0,0 +1,96 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#nm_interfaces').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE NM Interfaces</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="nm_interfaces" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*DEVICE_VENDOR_NAME</th>
+ <th>*DEVICE_MODEL</th>
+ <th>NM_VLAN_NUMBER</th>
+ <th>DEVICE_MANAGER_NM_LAN_INTERFACE</th>
+ <th>SWITCH_MANAGER_NM_LAN_INTERFACE</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.device_vendor_name %></td>
+ <td><%= row.device_model %></td>
+ <td><%= row.nm_lan_vlan_number %></td>
+ <td><%= row.device_manager_nm_lan_interface %></td>
+ <td><%= row.switch_manager_nm_lan_interface %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/phsCredentials.ejs b/admportal/views/ucpe/phsCredentials.ejs
new file mode 100644
index 0000000..508b5a2
--- /dev/null
+++ b/admportal/views/ucpe/phsCredentials.ejs
@@ -0,0 +1,202 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#phs_server_credentials').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>PHS Server Credentials</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_phs_credentials">
+ Add PHS Credentials
+ </button>
+ </div>
+ <% } %>
+
+ <table id="phs_server_credentials" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*Device Vendor Name</th>
+ <th>*Customer Name</th>
+ <th>*IP Addresses</th>
+ <th>PHS Username</th>
+ <th>PHS Password</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.device_vendor_name %></td>
+ <td><%= row.customer_name %></td>
+ <td><%= row.ip_addresses %></td>
+ <td><%= row.phs_username %></td>
+ <td>*****</td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updatePhsCredentials('<%=row.device_vendor_name %>','<%= row.customer_name %>','<%= row.ip_addresses %>','<%= row.phs_username %>','<%= row.phs_password %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deletePhsCredentials('<%= row.device_vendor_name %>', '<%= row.customer_name %>', '<%= row.ip_addresses %>' );">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<% include ../partials/phs_credentials %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitPhsCredentials(form)
+{
+ var errorMsg='';
+ var device_vendor_name = '';
+ var customer_name = '';
+ var ip_addresses = '';
+ var phs_username = '';
+ var phs_password = '';
+ var confirm_phs_password = '';
+
+ if ( form.name == 'addForm' )
+ {
+ device_vendor_name = form.nf_device_vendor_name;
+ customer_name = form.nf_customer_name;
+ ip_addresses = form.nf_ip_addresses;
+ phs_username = form.nf_phs_username;
+ phs_password = form.nf_phs_password;
+ confirm_phs_password = form.nf_confirm_phs_password;
+
+ if ( (device_vendor_name.value == null) || (device_vendor_name.value == "") || isblank(device_vendor_name.value) )
+ {
+ errorMsg += 'Device Vendor Name is required.<br>';
+ }
+ if ( (customer_name.value == null) || (customer_name.value == "") || isblank(customer_name.value) )
+ {
+ errorMsg += 'Customer Name is required.<br>';
+ }
+ if ( (ip_addresses.value == null) || (ip_addresses.value == "") || isblank(ip_addresses.value) ){
+ errorMsg += 'IP Addresses is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+
+ if ( phs_password.value != confirm_phs_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ else
+ {
+ device_vendor_name = form.uf_device_vendor_name;
+ customer_name = form.uf_customer_name;
+ ip_addresses = form.uf_ip_addresses;
+ phs_username = form.uf_phs_username;
+ phs_password = form.uf_phs_password;
+ confirm_phs_password = form.uf_confirm_phs_password;
+
+ if ( phs_password.value != confirm_phs_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ form.submit();
+}
+
+function updatePhsCredentials(device_vendor_name,customer_name,ip_addresses,phs_username,phs_password) {
+
+ document.getElementById('uf_device_vendor_name').value=device_vendor_name;
+ document.getElementById('uf_customer_name').value=customer_name;
+ document.getElementById('uf_ip_addresses').value=ip_addresses;
+ document.getElementById('uf_phs_username').value=phs_username;
+ document.getElementById('uf_phs_password').value=phs_password;
+
+ $('#update_phs_credentials').modal('show');
+}
+
+function deletePhsCredentials(device_vendor_name, customer_name, ip_addresses) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete PHS Credentials " + device_vendor_name + "|" + customer_name + "|" + ip_addresses,
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/ucpe/deletePhsCredentials?device_vendor_name=" + device_vendor_name
+ + "&customer_name=" + customer_name + "&ip_addresses=" + ip_addresses);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/phsServers.ejs b/admportal/views/ucpe/phsServers.ejs
new file mode 100644
index 0000000..1f28dbb
--- /dev/null
+++ b/admportal/views/ucpe/phsServers.ejs
@@ -0,0 +1,92 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#phs_servers').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE PHS Servers</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="phs_servers" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*DEVICE_VENDOR_NAME</th>
+ <th>*CUSTOMER_NAME</th>
+ <th>IP_ADDRESSES</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.device_vendor_name %></td>
+ <td><%= row.customer_name %></td>
+ <td><%= row.ip_addresses %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/physicalDeviceLogins.ejs b/admportal/views/ucpe/physicalDeviceLogins.ejs
new file mode 100644
index 0000000..0dd78d4
--- /dev/null
+++ b/admportal/views/ucpe/physicalDeviceLogins.ejs
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#device_logins').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE Physical Device Logins</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="device_logins" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*CUSTOMER_NAME</th>
+ <th>*DEVICE_VENDOR_NAME</th>
+ <th>*DEVICE_MODEL</th>
+ <th>*DEVICE_MANAGER_HASHED_PASSWORD</th>
+ <th>*SWITCH_MANAGER_HASHED_PASSWORD</th>
+ <th>*OS_HASHED_PASSWORD</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.customer_name %></td>
+ <td><%= row.device_vendor_name %></td>
+ <td><%= row.device_model %></td>
+ <td><%= row.device_manager_hashed_password %></td>
+ <td><%= row.switch_manager_hashed_password %></td>
+ <td><%= row.os_hashed_password %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/referenceData.ejs b/admportal/views/ucpe/referenceData.ejs
new file mode 100644
index 0000000..6196c46
--- /dev/null
+++ b/admportal/views/ucpe/referenceData.ejs
@@ -0,0 +1,224 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#reference_data').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE Reference Data</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <table id="reference_data" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>REFERENCE_ID</th>
+ <th>STATUS</th>
+ <th>FILENAME</th>
+ <th>ATTUID</th>
+ <th>DATE</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% var i=0; retData.forEach( function(rowObj) { %>
+ <tr>
+ <td><%= rowObj.row.reference_id %></td>
+ <td><%= rowObj.row.status %></td>
+ <td>
+ <a data-toggle="collapse"
+ href="#collapseExample<%= i %>" aria-expanded="false"
+ aria-controls="collapseExample"><%= rowObj.row.filename %>
+ </a>
+ <div class="collapse" id="collapseExample<%= i %>">
+ <div class="well">
+ <pre><%= rowObj.filecontent %></pre>
+ </div>
+ </div>
+ </td>
+ <td><%= rowObj.row.attuid %></td>
+ <td><%= rowObj.row.ts %></td>
+ <% if(priv == 'A' ) { %>
+ <td>
+ <% if ( rowObj.row.status == 'pending' ) { %>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="importReferenceData('<%= rowObj.row.reference_id %>','<%= rowObj.row.status %>','<%= rowObj.row.filename %>','<%= rowObj.row.ts %>');">Import</button>
+ <% } %>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteReferenceData('<%= rowObj.row.reference_id %>','<%= rowObj.row.filename %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% i++; }); %>
+ </tbody>
+ </table>
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/ucpe/uploadReferenceData" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ </form>
+ </div>
+ <% } %>
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+function getVnfData(vnf_name,vnf_type,svc_request_id)
+{
+ location.assign("/mobility/viewVnfData?vnf_name=" + vnf_name + "&vnf_type=" + vnf_type );
+ return;
+}
+function importReferenceData(reference_id,status,filename,ts)
+{
+ var alertMessage = '';
+ if ( status != 'pending' )
+ {
+ bootbox.alert("Upload Status must be in 'pending' state.");
+ return;
+ }
+ if ( filename.substring(0,11) == 'ucpedevice_' ){
+ alertMessage = "Are you sure you want to import file:" + filename + " and replace the UCPE_MAPPED_SERVICE_PORT and UCPE_SERVICE_PORT tables?";
+ }else if ( filename.substring(0,14) == 'ucpeapilogins_' ){
+ alertMessage = "Are you sure you want to import file:" + filename + " and replace the UCPE_VNF_LOGINS, UCPE_PHYSICAL_DEVICE_LOGINS and UCPE_API_LOGINS tables?";
+ }else if ( filename.substring(0,17) == 'ucpenminterfaces_' ){
+ alertMessage = "Are you sure you want to import file:" + filename + " and replace the UCPE_VNF_NM_INTERFACES and UCPE_NM_INTERFACES tables?";
+ }else if ( filename.substring(0,15) == 'ucpephsservers_' ){
+ alertMessage = "Are you sure you want to import file:" + filename + " and replace the UCPE_PHS_SERVERS table?";
+ }else if ( filename.substring(0,15) == 'ucpencsservers_' ){
+ alertMessage = "Are you sure you want to import file:" + filename + " and replace the UCPE_CUSTOMER_NCS_SERVERS table?";
+ }else if ( filename.substring(0,15) == 'ucpevnfcatalog_' ){
+ alertMessage = "Are you sure you want to import file:" + filename + " and replace the UCPE_VNF_MODELS, UCPE_VNF_MODEL_SOFTWARE and UCPE_VNF_MODEL_FEATURES tables?";
+ }else if ( filename.substring(0,16) == 'ucpemcapservers_' ){
+ alertMessage = "Are you sure you want to import file:" + filename + " and replace the UCPE_MCAP_SERVERS table?";
+ }else if ( filename.substring(0,23) == 'ucpechainingtopologies_' ){
+ alertMessage = "Are you sure you want to import file:" + filename + " and replace the UCPE_CHAINING_TOPOLOGIES table?";
+ }else if ( filename.substring(0,16) == 'ucpevnfportinfo_' ){
+ alertMessage = "Are you sure you want to import file:" + filename + " and replace the UCPE_VNF_PORT and UCPE_MAP_TO_DEVICE tables?";
+ } else {
+ bootbox.alert('Invalid Filename in database: ' + filename);
+ return;
+ }
+ bootbox.confirm({
+ message: alertMessage,
+ callback: function(result) {
+ if ( result )
+ {
+ if ( filename.substring(0,11) == 'ucpedevice_' ){
+ location.assign("/ucpe/importUcpeDevices?id=" + reference_id + "&filename=" + filename + "&status=" + status);
+ }else if ( filename.substring(0,14) == 'ucpeapilogins_' ){
+ location.assign("/ucpe/importApiLogins?id=" + reference_id + "&filename=" + filename + "&status=" + status);
+ }else if ( filename.substring(0,17) == 'ucpenminterfaces_' ){
+ location.assign("/ucpe/importNmInterfaces?id=" + reference_id + "&filename=" + filename + "&status=" + status);
+ }else if ( filename.substring(0,15) == 'ucpephsservers_' ){
+ location.assign("/ucpe/importPhsServers?id=" + reference_id + "&filename=" + filename + "&status=" + status);
+ }else if ( filename.substring(0,15) == 'ucpencsservers_' ){
+ location.assign("/ucpe/importNcsServers?id=" + reference_id + "&filename=" + filename + "&status=" + status);
+ }else if ( filename.substring(0,15) == 'ucpevnfcatalog_' ){
+ location.assign("/ucpe/importVnfCatalog?id=" + reference_id + "&filename=" + filename + "&status=" + status);
+ }else if ( filename.substring(0,16) == 'ucpemcapservers_' ){
+ location.assign("/ucpe/importMcapServers?id=" + reference_id + "&filename=" + filename + "&status=" + status);
+ }else if ( filename.substring(0,23) == 'ucpechainingtopologies_' ){
+ location.assign("/ucpe/importChainTopo?id=" + reference_id + "&filename=" + filename + "&status=" + status);
+ }else if ( filename.substring(0,16) == 'ucpevnfportinfo_' ){
+ location.assign("/ucpe/importVnfPortInfo?id=" + reference_id + "&filename=" + filename + "&status=" + status);
+ } else {
+ bootbox.alert('Invalid Filename: ' + filename);
+ return;
+ }
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+function deleteReferenceData(reference_id,filename)
+{
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete uploaded file [" + filename + "]? (This action will not effect the database.)",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/ucpe/deleteReferenceData?id=" + reference_id + "&filename=" + filename);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/serviceManagerCredentials.ejs b/admportal/views/ucpe/serviceManagerCredentials.ejs
new file mode 100644
index 0000000..9e156f2
--- /dev/null
+++ b/admportal/views/ucpe/serviceManagerCredentials.ejs
@@ -0,0 +1,171 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#service_manager_credentials').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Service Manager Credentials</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_service_manager_credentials">
+ Add Service Manager Credentials
+ </button>
+ </div>
+ <% } %>
+
+ <table id="service_manager_credentials" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Service Manager Username</th>
+ <th>Service Manager Password</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.service_manager_username %></td>
+ <td>*****</td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateServiceManagerCredentials('<%=row.service_manager_username %>','<%= row.service_manager_password %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteServiceManagerCredentials('<%= row.service_manager_username %>', '<%= row.service_manager_password %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<% include ../partials/service_manager_credentials %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function submitServiceManagerCredentials(form)
+{
+ var errorMsg='';
+ var service_manager_username = '';
+ var service_manager_password = '';
+ var confirm_service_manager_password = '';
+
+ if ( form.name == 'addForm' )
+ {
+ service_manager_username = form.nf_service_manager_username;
+ service_manager_password = form.nf_service_manager_password;
+ confirm_service_manager_password = form.nf_confirm_service_manager_password;
+
+ if ( service_manager_password.value != confirm_service_manager_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ else
+ {
+ service_manager_username = form.uf_service_manager_username;
+ service_manager_password = form.uf_service_manager_password;
+ confirm_service_manager_password = form.uf_confirm_service_manager_password;
+
+ if ( service_manager_password.value != confirm_service_manager_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ form.submit();
+}
+
+function updateServiceManagerCredentials(service_manager_username,service_manager_password) {
+
+ document.getElementById('uf_service_manager_username').value=service_manager_username;
+ document.getElementById('uf_service_manager_password').value=service_manager_password;
+
+ $('#update_service_manager_credentials').modal('show');
+}
+
+function deleteServiceManagerCredentials(service_manager_username, service_manager_password) {
+
+ var url_string = encodeURI("/ucpe/deleteServiceManagerCredentials?service_manager_username=" + service_manager_username
+ + "&service_manager_password=" + service_manager_password);
+
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete Service Manager Credentials? " + service_manager_username,
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign(url_string);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/servicePort.ejs b/admportal/views/ucpe/servicePort.ejs
new file mode 100644
index 0000000..8053713
--- /dev/null
+++ b/admportal/views/ucpe/servicePort.ejs
@@ -0,0 +1,88 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#service_port').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE Service Port</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <table id="service_port" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*DEVICE_VENDOR_NAME</th>
+ <th>*DEVICE_MODEL</th>
+ <th>*SERVICE_PORT_NAME</th>
+ <th>PHYSICAL_PORT_NAME</th>
+ <th>PHYSICAL_SPEED</th>
+ <th>PHYSICAL_SPEED_UNITS</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.device_vendor_name %></td>
+ <td><%= row.device_model %></td>
+ <td><%= row.service_port_name %></td>
+ <td><%= row.physical_port_name %></td>
+ <td><%= row.physical_speed %></td>
+ <td><%= row.physical_speed_units %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/vnfLogins.ejs b/admportal/views/ucpe/vnfLogins.ejs
new file mode 100644
index 0000000..f5e8873
--- /dev/null
+++ b/admportal/views/ucpe/vnfLogins.ejs
@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vnf_logins').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE VNF Logins</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="vnf_logins" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*CUSTOMER_NAME</th>
+ <th>*VNF_VENDOR_NAME</th>
+ <th>*VNF_MODEL</th>
+ <th>HASHED_PASSWORD</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.customer_name %></td>
+ <td><%= row.vnf_vendor_name %></td>
+ <td><%= row.vnf_model %></td>
+ <td><%= row.hashed_password %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/vnfMapDevice.ejs b/admportal/views/ucpe/vnfMapDevice.ejs
new file mode 100644
index 0000000..fbfa2ba
--- /dev/null
+++ b/admportal/views/ucpe/vnfMapDevice.ejs
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vnf_map_to_device').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE VNF Map to Device</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="vnf_map_to_device" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*VNF_VENDOR_NAME</th>
+ <th>*VNF_MODEL</th>
+ <th>*SERVICE_PORT_NAME</th>
+ <th>*DEVICE_VENDOR_NAME</th>
+ <th>*DEVICE_MODEL</th>
+ <th>*MAPPED_SERVICE_PORT_NAME</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.vnf_vendor_name %></td>
+ <td><%= row.vnf_model %></td>
+ <td><%= row.service_port_name %></td>
+ <td><%= row.device_vendor_name %></td>
+ <td><%= row.device_model %></td>
+ <td><%= row.mapped_service_port_name %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/vnfModelFeatures.ejs b/admportal/views/ucpe/vnfModelFeatures.ejs
new file mode 100644
index 0000000..4015179
--- /dev/null
+++ b/admportal/views/ucpe/vnfModelFeatures.ejs
@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vnf_model_features').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE VNF Model Features</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="vnf_model_features" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*ATT PART NUMBER</th>
+ <th>*VNF_FEATURE</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.att_part_number %></td>
+ <td><%= row.vnf_feature %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/vnfModelSoftware.ejs b/admportal/views/ucpe/vnfModelSoftware.ejs
new file mode 100644
index 0000000..f82b5b8
--- /dev/null
+++ b/admportal/views/ucpe/vnfModelSoftware.ejs
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vnf_model_software').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE VNF Model Software</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="vnf_model_software" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*ATT PART NUMBER</th>
+ <th>*SOFTWARE_VERSION</th>
+ <th>SOFTWARE_VERSION_STATE</th>
+ <th>SOFTWARE_FILENAME</th>
+ <th>SOFTWARE_FILETYPE</th>
+ <th>FILE_MD5_VALUE</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.att_part_number %></td>
+ <td><%= row.software_version %></td>
+ <td><%= row.software_version_state %></td>
+ <td><%= row.software_filename %></td>
+ <td><%= row.software_filetype %></td>
+ <td><%= row.file_md5_value %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/vnfModels.ejs b/admportal/views/ucpe/vnfModels.ejs
new file mode 100644
index 0000000..df71306
--- /dev/null
+++ b/admportal/views/ucpe/vnfModels.ejs
@@ -0,0 +1,122 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vnf_models').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE VNF Models</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="vnf_models" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*ATT PART NUMBER</th>
+ <th>VNF_TYPE</th>
+ <th>VENDOR_NAME</th>
+ <th>VENDOR_PART_NUMBER</th>
+ <th>VENDOR_MODEL</th>
+ <th>VCPU_DEFAULT</th>
+ <th>VCPU_MIN</th>
+ <th>VCPU_MAX</th>
+ <th>VMEMORY_DEFAULT</th>
+ <th>VMEMORY_UNITS</th>
+ <th>VMEMORY_MIN</th>
+ <th>VMEMORY_MAX</th>
+ <th>VDISK_DEFAULT</th>
+ <th>VDISK_UNITS</th>
+ <th>VDISK_MIN</th>
+ <th>VDISK_MAX</th>
+ <th>SPEED_UNITS</th>
+ <th>SPEED</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.att_part_number %></td>
+ <td><%= row.vnf_type %></td>
+ <td><%= row.vendor_name %></td>
+ <td><%= row.vendor_part_number %></td>
+ <td><%= row.vendor_model %></td>
+ <td><%= row.vcpu_default %></td>
+ <td><%= row.vcpu_min %></td>
+ <td><%= row.vcpu_max %></td>
+ <td><%= row.vmemory_default %></td>
+ <td><%= row.vmemory_units %></td>
+ <td><%= row.vmemory_min %></td>
+ <td><%= row.vmemory_max %></td>
+ <td><%= row.vdisk_default %></td>
+ <td><%= row.vdisk_units %></td>
+ <td><%= row.vdisk_min %></td>
+ <td><%= row.vdisk_max %></td>
+ <td><%= row.speed_units %></td>
+ <td><%= row.speed %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/vnfNmInterfaces.ejs b/admportal/views/ucpe/vnfNmInterfaces.ejs
new file mode 100644
index 0000000..3430f6b
--- /dev/null
+++ b/admportal/views/ucpe/vnfNmInterfaces.ejs
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vnf_nm_interfaces').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE VNF NM Interfaces</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="vnf_nm_interfaces" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*DEVICE_VENDOR_NAME</th>
+ <th>*DEVICE_MODEL</th>
+ <th>*VNF_VENDOR_NAME</th>
+ <th>*VNF_MODEL</th>
+ <th>NM_LAN_INTERFACE</th>
+ <th>NM_LOOPBACK_INTERFACE</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.device_vendor_name %></td>
+ <td><%= row.device_model %></td>
+ <td><%= row.vnf_vendor_name %></td>
+ <td><%= row.vnf_model %></td>
+ <td><%= row.nm_lan_interface %></td>
+ <td><%= row.nm_loopback_interface %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/ucpe/vnfPorts.ejs b/admportal/views/ucpe/vnfPorts.ejs
new file mode 100644
index 0000000..834eada
--- /dev/null
+++ b/admportal/views/ucpe/vnfPorts.ejs
@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vnf_ports').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>uCPE VNF Ports</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+<!--
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vnf_profile">
+ Add VNF Profile
+ </button>
+ </div>
+ <% } %>
+-->
+
+ <table id="vnf_ports" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*VNF_VENDOR_NAME</th>
+ <th>*VNF_MODEL</th>
+ <th>*SERVICE_PORT_NAME</th>
+ <th>PHYSICAL_PORT_NAME</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.vnf_vendor_name %></td>
+ <td><%= row.vnf_model %></td>
+ <td><%= row.service_port_name %></td>
+ <td><%= row.physical_port_name %></td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/user/list.ejs b/admportal/views/user/list.ejs
new file mode 100644
index 0000000..4a4e909
--- /dev/null
+++ b/admportal/views/user/list.ejs
@@ -0,0 +1,194 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#user_admin').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+
+<body>
+
+<div class="well well-sm">
+<h3>User Administration</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'><%=result.msg %></div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'><%=result.msg %></div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <div class="actions" style="padding:15px 0px;">
+ <% if(priv == 'A') { %>
+ <button class="btn btn-primary" data-toggle="modal" data-target="#newUserModal">Add User</button>
+ <% } %>
+
+ </div>
+ <div class="content">
+ <table id="user_admin" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Email</th>
+ <th>Password</th>
+ <th>Privilege</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% if (rows) {
+ rows.forEach(function(row) { %>
+ <tr>
+ <td><%= row.email %></td>
+ <td>**********</td>
+ <td>
+ <% if(row.privilege == 'A'){ %>
+ Administrator
+ <% } else if (row.privilege == 'R') { %>
+ Readonly
+ <% } else { %>
+ unknown
+ <% } %>
+ </td>
+ <% if(priv == 'A') { %>
+ <td><form name="rowform">
+ <input type="hidden" name="rfemail" id="rfemail" value="<%= row.email %>"</input>
+ </form>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateRequest('<%=row.email %>', '<%=row.password %>', '<%=row.privilege %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteRequest('<%=row.email %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); }; %>
+ </tbody>
+ </table>
+ </div>
+
+ <% include ../partials/newuserform %>
+ <% include ../partials/userform %>
+
+ <footer>
+ <% include ../partials/footer %>
+ </footer>
+
+<script type="text/javascript">
+
+function submitUserAdmin(form)
+{
+ var errorMsg='';
+ var email = '';
+ var password = '';
+ var confirm_password = '';
+ var privilege = '';
+
+ if ( form.name == 'addForm' )
+ {
+ email = form.nf_email;
+ password = form.nf_password;
+ confirm_password = form.nf_confirm_password;
+ privilege = form.nf_privilege;
+
+ if ( (email.value == null) || (email.value == "") || isblank(email.value) )
+ {
+ errorMsg += 'Email is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+
+ if ( password.value != confirm_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ else
+ {
+ email = form.uf_email;
+ password = form.uf_password;
+ confirm_password = form.uf_confirm_password;
+ privilege = form.uf_privilege;
+
+ if ( (email.value == null) || (email.value == "") || isblank(email.value) )
+ {
+ errorMsg += 'Email is required.<br>';
+ }
+ if ( password.value != confirm_password.value )
+ {
+ bootbox.alert('Passwords do not match.');
+ return;
+ }
+ }
+ form.submit();
+}
+
+function deleteRequest(email) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete user [" + email + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/user/deleteUser?email=" + email);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+function updateRequest(email,password,privilege) {
+
+ document.getElementById('uf_email').value = email;
+ document.getElementById('uf_key_email').value = email;
+ document.getElementById('uf_password').value = password;
+ document.getElementById('uf_confirm_password').value = password;
+ if ( privilege == "A" ){
+ document.getElementById('uf_privilege').value = 'admin';
+ }else if (priv == "R"){
+ document.getElementById('uf_privilege').value = 'readonly';
+ }else{
+ document.getElementById('uf_privilege').value = 'admin';
+ }
+ document.getElementById('uf_action').value = "/user/updateUser";
+ $('#myUserModal').modal('show');
+
+}
+</script>
+
+</body>
+</html>
+
diff --git a/dgbuilder/.gitignore b/dgbuilder/.gitignore
new file mode 100644
index 0000000..1b8a6ba
--- /dev/null
+++ b/dgbuilder/.gitignore
@@ -0,0 +1,12 @@
+org.eclipse.core.resources.prefs
+.classpath
+.project
+.settings
+.idea
+.externalToolBuilders
+maven-eclipse.xml
+*.class
+target/
+MANIFEST.MF
+.DS_STORE
+.metadata
diff --git a/dgbuilder/CONTRIBUTING.md b/dgbuilder/CONTRIBUTING.md
new file mode 100644
index 0000000..52fe891
--- /dev/null
+++ b/dgbuilder/CONTRIBUTING.md
@@ -0,0 +1,82 @@
+# Contributing to Node-RED
+
+We welcome contributions, but request you follow these guidelines.
+
+## Raising issues
+
+Please raise any bug reports on the project's
+[issue tracker](https://github.com/node-red/node-red/issues?state=open). Be sure to
+search the list to see if your issue has already been raised.
+
+A good bug report is one that make it easy for us to understand what you were
+trying to do and what went wrong.
+
+Provide as much context as possible so we can try to recreate the issue.
+If possible, include the relevant part of your flow. To do this, select the
+relevant nodes, press Ctrl-E and copy the flow data from the Export dialog.
+
+At a minimum, please include:
+
+ - Version of Node-RED - either release number if you downloaded a zip, or the first few lines of `git log` if you are cloning the repository directly.
+ - Version of node.js - what does `node -v` say?
+
+
+## New features
+
+For feature requests, please raise them on the [mailing list](https://groups.google.com/forum/#!forum/node-red).
+
+## Pull-Requests
+
+### Changes to existing code
+if you want to raise a pull-request with a new feature, or a refactoring
+of existing code, it may well get rejected if you haven't discussed it on
+the [mailing list](https://groups.google.com/forum/#!forum/node-red) first.
+
+### New nodes
+
+The plugin nature of Node-RED means anyone can create a new node to extend
+its capabilities.
+
+We want to avoid duplication as that can lead to confusion. Many of our existing
+nodes offer a starting point of functionality. If they are missing features,
+we would rather extend them than add separate 'advanced' versions. But the key
+to that approach is getting the UX right to not lose the simplicity.
+
+To contribute a new node, please raise a pull-request against the
+`node-red-nodes` repository.
+
+Eventually, the nodes will be npm-installable, but we're not there yet. We'll
+also have some sort of registry of nodes to help with discoverability.
+
+### Coding standards
+
+Please ensure you follow the coding standards used through-out the existing
+code base. Some basic rules include:
+
+ - all files must have the Apache license in the header.
+ - indent with 4-spaces, no tabs. No arguments.
+ - opening brace on same line as `if`/`for`/`function`/etc, closing brace on its
+ own line.
+
+### Contributor License Aggreement
+
+In order for us to accept pull-requests, the contributor must first complete
+a Contributor License Agreement (CLA). This clarifies the intellectual
+property license granted with any contribution. It is for your protection as a
+Contributor as well as the protection of IBM and its customers; it does not
+change your rights to use your own Contributions for any other purpose.
+
+You can download the CLAs here:
+
+ - [individual](http://nodered.org/cla/node-red-cla-individual.pdf)
+ - [corporate](http://nodered.org/cla/node-red-cla-corporate.pdf)
+
+If you are an IBMer, please contact us directly as the contribution process is
+slightly different.
+
+
+
+
+
+
+
diff --git a/dgbuilder/Gruntfile.js b/dgbuilder/Gruntfile.js
new file mode 100644
index 0000000..62a553f
--- /dev/null
+++ b/dgbuilder/Gruntfile.js
@@ -0,0 +1,91 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(grunt) {
+
+ // Project configuration.
+ grunt.initConfig({
+ pkg: grunt.file.readJSON('package.json'),
+ simplemocha: {
+ options: {
+ globals: ['expect'],
+ timeout: 3000,
+ ignoreLeaks: false,
+ ui: 'bdd',
+ reporter: 'spec'
+ },
+ all: { src: ['test/**/*_spec.js'] },
+ core: { src: ["test/_spec.js","test/red/**/*_spec.js"]},
+ nodes: { src: ["test/nodes/**/*_spec.js"]}
+ },
+ jshint: {
+ options: {
+ // http://www.jshint.com/docs/options/
+ "asi": true, // allow missing semicolons
+ "curly": true, // require braces
+ "eqnull": true, // ignore ==null
+ "forin": true, // require property filtering in "for in" loops
+ "immed": true, // require immediate functions to be wrapped in ( )
+ "nonbsp": true, // warn on unexpected whitespace breaking chars
+ //"strict": true, // commented out for now as it causes 100s of warnings, but want to get there eventually
+ "loopfunc": true, // allow functions to be defined in loops
+ "sub": true // don't warn that foo['bar'] should be written as foo.bar
+ },
+ all: [
+ 'Gruntfile.js',
+ 'red.js',
+ 'red/**/*.js',
+ 'nodes/**/*.js',
+ 'public/red/**/*.js'
+ ],
+
+ core: {
+ files: {
+ src: [
+ 'Gruntfile.js',
+ 'red.js',
+ 'red/**/*.js'
+ ]
+ }
+ },
+ nodes: {
+ files: {
+ src: [ 'nodes/**/*.js' ]
+ }
+ },
+ editor: {
+ files: {
+ src: [ 'public/red/**/*.js' ]
+ }
+ },
+ tests: {
+ files: {
+ src: ['test/**/*.js']
+ },
+ options: {
+ "expr": true
+ }
+ }
+
+ }
+ });
+
+ grunt.loadNpmTasks('grunt-simple-mocha');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+
+ grunt.registerTask('default', ['jshint:core','jshint:tests','jshint:editor','simplemocha:core','simplemocha:nodes']);
+
+};
diff --git a/dgbuilder/INSTALL.md b/dgbuilder/INSTALL.md
new file mode 100644
index 0000000..90922e6
--- /dev/null
+++ b/dgbuilder/INSTALL.md
@@ -0,0 +1,57 @@
+Node-RED Install
+================
+
+## Install node.js
+
+You can get the latest version from <http://nodejs.org/download/>.
+
+Or, you may want to use a version from your operating system's package manager:
+ <https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager>
+
+## Get Node-RED
+
+Clone the repository from GitHub:
+
+ $ git clone git@github.com:node-red/node-red.git
+
+## Install the pre-requisite modules
+
+From the top-level directory of Node-RED, run:
+
+ $ npm install
+
+This will install the core pre-requisite modules.
+
+## Run Node-RED
+
+From the top-level directory, run:
+
+ $ node red.js
+
+You can then access Node-RED at <http://localhost:1880>.
+
+Online documentation is available at <http://nodered.org/docs>.
+
+## Installing individual node dependencies
+
+When Node-RED starts, it attempts to load the nodes from the `nodes/` directory.
+Each will have its own set of dependencies that will need to be installed before
+the node is available in the palette.
+
+To help identify the dependencies, Node-RED logs any modules it fails to find
+for a particular node. You don't have to install these unless you want or need
+that node to appear.
+
+Alternatively, a node's `.js` file can be examined to identify the modules it
+explicitly requires. For example, the Twitter node is defined in
+`nodes/social/27-twitter.js` and contains:
+
+ var RED = require("../../red/red");
+ var ntwitter = require('ntwitter');
+ var OAuth= require('oauth').OAuth;
+
+Of these, `ntwitter` and `oauth` are neither built-in modules nor ones provided
+by Node-RED itself. They can subsequently be installed by running:
+
+ $ npm install ntwitter oauth
+
diff --git a/dgbuilder/LICENSE b/dgbuilder/LICENSE
new file mode 100644
index 0000000..f433b1a
--- /dev/null
+++ b/dgbuilder/LICENSE
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
diff --git a/dgbuilder/core_nodes/analysis/72-sentiment.html b/dgbuilder/core_nodes/analysis/72-sentiment.html
new file mode 100644
index 0000000..c33b873
--- /dev/null
+++ b/dgbuilder/core_nodes/analysis/72-sentiment.html
@@ -0,0 +1,49 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="sentiment">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="sentiment">
+ <p>Analyses the <b>msg.payload</b> and adds a <b>msg.sentiment</b> object that contains the resulting AFINN-111 sentiment score as <b>msg.sentiment.score</b>.</p>
+ <p>A score greater than zero is positive and less than zero is negative.</p>
+ <p>The score typically ranges from -5 to +5, but can go higher and lower.</p>
+ <p>An object of word score overrides can be supplied as <b>msg.overrides</b>.</p>
+ <p>See <a href="https://github.com/thisandagain/sentiment/blob/master/README.md" target="_new">the Sentiment docs here</a>.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('sentiment',{
+ category: 'analysis-function',
+ color:"#E6E0F8",
+ defaults: {
+ name: {value:""},
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name||"sentiment";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/analysis/72-sentiment.js b/dgbuilder/core_nodes/analysis/72-sentiment.js
new file mode 100644
index 0000000..747e079
--- /dev/null
+++ b/dgbuilder/core_nodes/analysis/72-sentiment.js
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var sentiment = require('sentiment');
+
+ function SentimentNode(n) {
+ RED.nodes.createNode(this,n);
+ var node = this;
+
+ this.on("input", function(msg) {
+ sentiment(msg.payload, msg.overrides || null, function (err, result) {
+ msg.sentiment = result;
+ node.send(msg);
+ });
+ });
+ }
+ RED.nodes.registerType("sentiment",SentimentNode);
+}
diff --git a/dgbuilder/core_nodes/core/20-inject.html b/dgbuilder/core_nodes/core/20-inject.html
new file mode 100644
index 0000000..38aa6ef
--- /dev/null
+++ b/dgbuilder/core_nodes/core/20-inject.html
@@ -0,0 +1,437 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="inject">
+ <div class="form-row node-input-payload">
+ <label for="node-input-payloadType"><i class="fa fa-envelope"></i> Payload</label>
+ <select id="node-input-payloadType" style="width:125px !important">
+ <option value="date">timestamp</option>
+ <option value="none">blank</option>
+ <option value="string">string</option>
+ </select>
+ </div>
+
+ <div class="form-row" id="node-input-row-payload">
+ <label for="node-input-payload"></label>
+ <input type="text" id="node-input-payload" placeholder="payload">
+ </div>
+
+ <div class="form-row">
+ <label for="node-input-topic"><i class="fa fa-tasks"></i> Topic</label>
+ <input type="text" id="node-input-topic" placeholder="topic">
+ </div>
+
+ <div class="form-row">
+ <label for=""><i class="fa fa-repeat"></i> Repeat</label>
+ <select id="inject-time-type-select" style="width: 288px"><option value="none">none</option><option value="interval">interval</option><option value="interval-time">interval between times</option><option value="time">at a specific time</option></select>
+ <input type="hidden" id="node-input-repeat" placeholder="payload">
+ <input type="hidden" id="node-input-crontab" placeholder="payload">
+ </div>
+
+ <div class="form-row inject-time-row hidden" id="inject-time-row-interval">
+ every <input id="inject-time-interval-count" class="inject-time-count" value="1"></input>
+ <select style="width: 100px" id="inject-time-interval-units"><option value="s">seconds</option><option value="m">minutes</option><option value="h">hours</option></select><br/>
+ <!-- on <select disabled id="inject-time-interval-days" class="inject-time-days"></select> -->
+ </div>
+
+ <div class="form-row inject-time-row hidden" id="inject-time-row-interval-time">
+ at every <select style="width: 90px" id="inject-time-interval-time-units" class="inject-time-int-count" value="1">
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ <option value="4">4</option>
+ <option value="5">5</option>
+ <option value="6">6</option>
+ <option value="10">10</option>
+ <option value="12">12</option>
+ <option value="15">15</option>
+ <option value="20">20</option>
+ <option value="30">30</option>
+ <option value="0">60</option>
+ </select> minutes<br/>
+ between <select id="inject-time-interval-time-start" class="inject-time-times"></select>
+ and <select id="inject-time-interval-time-end" class="inject-time-times"></select><br/>
+ on <select id="inject-time-interval-time-days" class="inject-time-days"></select>
+ </div>
+
+ <div class="form-row inject-time-row hidden" id="inject-time-row-time">
+ at <input id="inject-time-time" value="12:00"></input><br/>
+ on <select id="inject-time-time-days" class="inject-time-days"></select>
+ </div>
+
+ <div class="form-row" id="node-once">
+ <label> </label>
+ <input type="checkbox" id="node-input-once" style="display: inline-block; width: auto; vertical-align: top;">
+ <label for="node-input-once" style="width: 70%;">Fire once at start ?</label>
+ </div>
+
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="name">
+ </div>
+
+ <div class="form-tips"><b>Note:</b> "interval between times" and "at a specific time" will use cron.<br/>See info box for details.</div>
+</script>
+<style>
+ .inject-time-row {
+ padding-left: 110px;
+ }
+ .inject-time-row select {
+ margin: 3px 0;
+ }
+ .inject-time-days {
+ width: 262px;
+ }
+ .inject-time-times {
+ width: 90px;
+ }
+ .inject-time-row > .ui-spinner {
+ height: 28px;
+ margin: 3px 0;
+ border-color: rgb(204, 204, 204);
+ }
+ #inject-time-time {
+ margin-top: 3px;
+ width: 75px;
+ }
+ .inject-time-count {
+ width: 40px !important;
+ }
+</style>
+<script type="text/x-red" data-help-name="inject">
+ <p>Pressing the button on the left side of the node allows a message on a topic to be injected into the flow. This is mainly for test purposes.</p>
+ <p>If no payload is specified the payload is set to the current time in millisecs since 1970. This allows subsequent functions to perform time based actions.</p>
+ <p>The repeat function does what it says on the tin and continuously sends the payload every x seconds.</p>
+ <p>The Fire once at start option actually waits 50mS before firing to give other nodes a chance to instantiate properly.</p>
+ <p><b>Note: </b>"Interval between times" and "at a specific time" will use cron. This means that 20 minutes will be at the next hour, 20 minutes past and 40 minutes past - not in 20 minutes time.
+ If you want every 20 minutes from now - use the basic "interval" option.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('inject',{
+ category: 'input',
+ color:"#a6bbcf",
+ defaults: {
+ name: {value:""},
+ topic: {value:""},
+ payload: {value:""},
+ payloadType: {value:"date"},
+ repeat: {value:""},
+ crontab: {value:""},
+ once: {value:false}
+ },
+ inputs:0,
+ outputs:1,
+ icon: "inject.png",
+ label: function() {
+ if (this.payloadType === "string") {
+ return this.name||this.topic||this.payload||"inject";
+ }
+ else { return this.name||this.topic||"inject"; }
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ $("#inject-time-type-select").change(function() {
+ $("#node-input-crontab").val('');
+ var id = $("#inject-time-type-select option:selected").val();
+ $(".inject-time-row").hide();
+ $("#inject-time-row-"+id).show();
+ if ((id == "none") || (id == "interval")) {
+ $("#node-once").show();
+ }
+ else {
+ $("#node-once").hide();
+ $("#node-input-once").prop('checked', false);
+ }
+ });
+
+ var days = [
+ {v:"*",t:"every day"},
+ {v:"1-5",t:"Mondays to Fridays"},
+ {v:"0,6",t:"Saturdays and Sundays"},
+ {v:"1",t:"Mondays"},
+ {v:"2",t:"Tuesdays"},
+ {v:"3",t:"Wednesdays"},
+ {v:"4",t:"Thursdays"},
+ {v:"5",t:"Fridays"},
+ {v:"6",t:"Saturdays"},
+ {v:"0",t:"Sundays"}
+ ];
+
+ $(".inject-time-days").each(function() {
+ for (var d in days) {
+ $(this).append($("<option></option>").val(days[d].v).text(days[d].t));
+ }
+ });
+
+ $(".inject-time-times").each(function() {
+ for (var i=0;i<24;i++) {
+ var l = (i<10?"0":"")+i+":00";
+ $(this).append($("<option></option>").val(i).text(l));
+ }
+ });
+
+ $(".inject-time-count").spinner({
+ //max:60,
+ min:1
+ });
+
+ $("#inject-time-interval-units").change(function() {
+ var units = $("#inject-time-interval-units option:selected").val();
+ //$("#inject-time-interval-days").prop("disabled",(units == "s")?"disabled":false);
+ //$(".inject-time-count").spinner("option","max",(units == "h")?24:60);
+ });
+
+ $.widget( "ui.injecttimespinner", $.ui.spinner, {
+ options: {
+ // seconds
+ step: 60 * 1000,
+ // hours
+ page: 60
+ },
+ _parse: function( value ) {
+ if ( typeof value === "string" ) {
+ // already a timestamp
+ if ( Number( value ) == value ) {
+ return Number( value );
+ }
+ var p = value.split(":");
+ var offset = new Date().getTimezoneOffset();
+ return (((Number(p[0])+1)*60)+Number(p[1])+offset)*60*1000;
+ }
+ return value;
+ },
+ _format: function( value ) {
+ var d = new Date(value);
+ var h = d.getHours();
+ var m = d.getMinutes();
+ return ((h < 10)?"0":"")+h+":"+((m < 10)?"0":"")+m;
+ }
+ });
+
+ $("#inject-time-time").injecttimespinner();
+
+ var repeattype = "none";
+ if (this.repeat != "" && this.repeat != 0) {
+ repeattype = "interval";
+ var r = "s";
+ var c = this.repeat;
+ if (this.repeat % 60 === 0) { r = "m"; c = c/60; }
+ if (this.repeat % 1440 === 0) { r = "h"; c = c/24; }
+ $("#inject-time-interval-count").val(c);
+ $("#inject-time-interval-units").val(r);
+ //$("#inject-time-interval-units option").filter(function() {return $(this).val() == "s";}).attr('selected',true);
+ $("#inject-time-interval-days").prop("disabled","disabled");
+ } else if (this.crontab) {
+ var cronparts = this.crontab.split(" ");
+ var days = cronparts[4];
+ if (!isNaN(cronparts[0]) && !isNaN(cronparts[1])) {
+ repeattype = "time";
+ // Fixed time
+ var time = cronparts[1]+":"+cronparts[0];
+ $("#inject-time-time").val(time);
+ $("#inject-time-type-select option").filter(function() {return $(this).val() == "s";}).attr('selected',true);
+ $("#inject-time-time-days option").filter(function() {return $(this).val() == days;}).attr('selected',true);
+ }
+ //else if (cronparts[0] == "0") {
+ // // interval - hours
+ // var hours = cronparts[1].slice(2);
+ // repeattype = "interval";
+ // $("#inject-time-interval-days").prop("disabled",false);
+ // $("#inject-time-interval-days option").filter(function() {return $(this).val() == days;}).attr('selected',true);
+ // $("#inject-time-interval-count").val(hours)
+ // $("#inject-time-interval-units option").filter(function() {return $(this).val() == "h";}).attr('selected',true);
+ //} else if (cronparts[1] == "*") {
+ // // interval - minutes
+ // var minutes = cronparts[0].slice(2);
+ // repeattype = "interval";
+ // $("#inject-time-interval-days").prop("disabled",false);
+ // $("#inject-time-interval-days option").filter(function() {return $(this).val() == days;}).attr('selected',true);
+ // $("#inject-time-interval-count").val(minutes)
+ // $("#inject-time-interval-units option").filter(function() {return $(this).val() == "m";}).attr('selected',true);
+ //}
+ else {
+ repeattype = "interval-time";
+ // interval - time period
+ var minutes = cronparts[0].slice(2);
+ if (minutes === "") { minutes = "0"; }
+ $("#inject-time-interval-time-units").val(minutes);
+ $("#inject-time-interval-time-days option").filter(function() {return $(this).val() == days;}).attr('selected',true);
+ var time = cronparts[1];
+ var timeparts = time.split(",");
+ var start;
+ var end;
+ if (timeparts.length == 1) {
+ // 0 or 0-10
+ var hours = timeparts[0].split("-");
+ if (hours.length == 1) {
+ if (hours[0] === "") {
+ start = "0";
+ end = "0";
+ }
+ else {
+ start = hours[0];
+ end = Number(hours[0])+1;
+ }
+ } else {
+ start = hours[0];
+ end = (Number(hours[1])+1)%24;
+ }
+ } else {
+ // 23,0 or 17-23,0-10 or 23,0-2 or 17-23,0
+ var startparts = timeparts[0].split("-");
+ start = startparts[0];
+
+ var endparts = timeparts[1].split("-");
+ if (endparts.length == 1) {
+ end = Number(endparts[0])+1;
+ } else {
+ end = Number(endparts[1])+1;
+ }
+ }
+ $("#inject-time-interval-time-start option").filter(function() {return $(this).val() == start;}).attr('selected',true);
+ $("#inject-time-interval-time-end option").filter(function() {return $(this).val() == end;}).attr('selected',true);
+
+ }
+ } else {
+ $("#inject-time-type-select option").filter(function() {return $(this).val() == "none";}).attr('selected',true);
+ }
+
+ $(".inject-time-row").hide();
+ $("#inject-time-type-select option").filter(function() {return $(this).val() == repeattype;}).attr('selected',true);
+ $("#inject-time-row-"+repeattype).show();
+
+ if (this.payloadType == null) {
+ if (this.payload == "") {
+ this.payloadType = "date";
+ } else {
+ this.payloadType = "string";
+ }
+ }
+
+ $("#node-input-payloadType").change(function() {
+ var id = $("#node-input-payloadType option:selected").val();
+ if (id == "string") {
+ $("#node-input-row-payload").show();
+ } else {
+ $("#node-input-row-payload").hide();
+ }
+ });
+ $("#node-input-payloadType").val(this.payloadType);
+ $("#node-input-payloadType").change();
+ $("#inject-time-type-select").change();
+
+ },
+ oneditsave: function() {
+ var repeat = "";
+ var crontab = "";
+ var type = $("#inject-time-type-select option:selected").val();
+ if (type == "none") {
+ // nothing
+ } else if (type == "interval") {
+ var count = $("#inject-time-interval-count").val();
+ var units = $("#inject-time-interval-units option:selected").val();
+ var days = $("#inject-time-interval-days option:selected").val();
+ if (units == "s") {
+ repeat = count;
+ } else {
+ if (units == "m") {
+ //crontab = "*/"+count+" * * * "+days;
+ repeat = count * 60;
+ } else if (units == "h") {
+ //crontab = "0 */"+count+" * * "+days;
+ repeat = count * 60 * 24;
+ }
+ }
+ } else if (type == "interval-time") {
+ var count = $("#inject-time-interval-time-units").val();
+ var startTime = Number($("#inject-time-interval-time-start option:selected").val());
+ var endTime = Number($("#inject-time-interval-time-end option:selected").val());
+ var days = $("#inject-time-interval-time-days option:selected").val();
+ var timerange = "*";
+ if (startTime == endTime) {
+ //TODO: invalid
+ repeat = "";
+ crontab = "";
+ } else if (endTime == 0) {
+ timerange = startTime+"-23";
+ } else if (startTime+1 < endTime) {
+ timerange = startTime+"-"+(endTime-1);
+ } else if (startTime+1 == endTime) {
+ timerange = startTime;
+ } else {
+ var startpart = "";
+ var endpart = "";
+ if (startTime == 23) {
+ startpart = "23";
+ } else {
+ startpart = startTime+"-23";
+ }
+ if (endTime == 1) {
+ endpart = "0";
+ } else {
+ endpart = "0-"+(endTime-1);
+ }
+ timerange = startpart+","+endpart;
+ }
+ repeat = "";
+ if (count === "0") {
+ crontab = count+" "+timerange+" * * "+days;
+ }
+ else {
+ crontab = "*/"+count+" "+timerange+" * * "+days;
+ }
+ } else if (type == "time") {
+ var time = $("#inject-time-time").val();
+ var days = $("#inject-time-time-days option:selected").val();
+ var parts = time.split(":");
+ repeat = "";
+ crontab = parts[1]+" "+parts[0]+" * * "+days;
+ }
+
+ $("#node-input-repeat").val(repeat);
+ $("#node-input-crontab").val(crontab);
+
+ },
+ button: {
+ onclick: function() {
+ var label = (this.name||this.payload).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
+ if (this.payloadType === "date") { label = "timestamp"; }
+ if (this.payloadType === "none") { label = "blank"; }
+ d3.xhr("inject/"+this.id).post(function(err,resp) {
+ if (err) {
+ if (err.status == 404) {
+ RED.notify("<strong>Error</strong>: inject node not deployed","error");
+ } else if (err.status == 500) {
+ RED.notify("<strong>Error</strong>: inject failed, see log for details.","error");
+ } else if (err.status == 0) {
+ RED.notify("<strong>Error</strong>: no response from server","error");
+ } else {
+ RED.notify("<strong>Error</strong>: unexpected error: ("+err.status+")"+err.response,"error");
+ }
+ } else if (resp.status == 200) {
+ RED.notify("Successfully injected: "+label,"success");
+ } else {
+ RED.notify("<strong>Error</strong>: unexpected response: ("+resp.status+") "+resp.response,"error");
+ }
+ });
+ }
+ }
+ });
+
+</script>
diff --git a/dgbuilder/core_nodes/core/20-inject.js b/dgbuilder/core_nodes/core/20-inject.js
new file mode 100644
index 0000000..dff0fb6
--- /dev/null
+++ b/dgbuilder/core_nodes/core/20-inject.js
@@ -0,0 +1,97 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ var cron = require("cron");
+
+ function InjectNode(n) {
+ RED.nodes.createNode(this,n);
+ this.topic = n.topic;
+ this.payload = n.payload;
+ this.payloadType = n.payloadType;
+ this.repeat = n.repeat;
+ this.crontab = n.crontab;
+ this.once = n.once;
+ var node = this;
+ this.interval_id = null;
+ this.cronjob = null;
+
+ if (this.repeat && !isNaN(this.repeat) && this.repeat > 0) {
+ this.repeat = this.repeat * 1000;
+ this.log("repeat = "+this.repeat);
+ this.interval_id = setInterval( function() {
+ node.emit("input",{});
+ }, this.repeat );
+ } else if (this.crontab) {
+ if (cron) {
+ this.log("crontab = "+this.crontab);
+ this.cronjob = new cron.CronJob(this.crontab,
+ function() {
+ node.emit("input",{});
+ },
+ null,true);
+ } else {
+ this.error("'cron' module not found");
+ }
+ }
+
+ if (this.once) {
+ setTimeout( function(){ node.emit("input",{}); }, 100);
+ }
+
+ this.on("input",function(msg) {
+ var msg = {topic:this.topic};
+ if ( (this.payloadType == null && this.payload == "") || this.payloadType == "date") {
+ msg.payload = Date.now();
+ } else if (this.payloadType == null || this.payloadType == "string") {
+ msg.payload = this.payload;
+ } else {
+ msg.payload = "";
+ }
+ this.send(msg);
+ msg = null;
+ });
+ }
+
+ RED.nodes.registerType("inject",InjectNode);
+
+ InjectNode.prototype.close = function() {
+ if (this.interval_id != null) {
+ clearInterval(this.interval_id);
+ this.log("inject: repeat stopped");
+ } else if (this.cronjob != null) {
+ this.cronjob.stop();
+ this.log("inject: cronjob stopped");
+ delete this.cronjob;
+ }
+ }
+
+ RED.httpAdmin.post("/inject/:id", function(req,res) {
+ var node = RED.nodes.getNode(req.params.id);
+ if (node != null) {
+ try {
+ node.receive();
+ res.send(200);
+ } catch(err) {
+ res.send(500);
+ node.error("Inject failed:"+err);
+ console.log(err.stack);
+ }
+ } else {
+ res.send(404);
+ }
+ });
+}
diff --git a/dgbuilder/core_nodes/core/58-debug.html b/dgbuilder/core_nodes/core/58-debug.html
new file mode 100644
index 0000000..04aa507
--- /dev/null
+++ b/dgbuilder/core_nodes/core/58-debug.html
@@ -0,0 +1,248 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="debug">
+ <div class="form-row">
+ <label for="node-input-complete"><i class="fa fa-list"></i> Output</label>
+ <select type="text" id="node-input-complete" style="display: inline-block; width: 250px; vertical-align: top;">
+ <option value="false">payload only</option>
+ <option value="true">complete msg object</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-console"><i class="fa fa-random"></i> to</label>
+ <select type="text" id="node-input-console" style="display: inline-block; width: 250px; vertical-align: top;">
+ <option value="false">debug tab</option>
+ <option value="true">debug tab and console</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="debug">
+ <p>The Debug node can be connected to the output of any node. It will display the timestamp, <b>msg.topic</b> and <b>msg.payload</b> fields of any messages it receives in the debug tab of the sidebar.
+ <br/>The sidebar can be accessed under the options drop-down in the top right corner.</p>
+ <p>The button to the right of the node will toggle it's output on and off so you can de-clutter the debug window.</p>
+ <p>If the payload is an object it will be stringified first for display and indicate that by saying "(Object) ".</p>
+ <p>If the payload is a buffer it will be stringified first for display and indicate that by saying "(Buffer) ".</p>
+ <p>Selecting any particular message will highlight (in red) the debug node that reported it. This is useful if you wire up multiple debug nodes.</p>
+ <p>Optionally can show the complete msg object - but the screen can get messy.</p>
+ <p>In addition any calls to node.warn or node.error will appear here.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('debug',{
+ category: 'output',
+ defaults: {
+ name: {value:""},
+ active: {value:true},
+ console: {value:"false"},
+ complete: {value:"false"}
+ },
+ label: function() {
+ return this.name||"debug";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ color:"#87a980",
+ inputs:1,
+ outputs:0,
+ icon: "debug.png",
+ align: "right",
+ button: {
+ toggle: "active",
+ onclick: function() {
+ var label = this.name||"debug";
+ d3.xhr("debug/"+this.id+"/"+(this.active?"enable":"disable")).post(function(err,resp) {
+ if (err) {
+ if (err.status == 404) {
+ RED.notify("<strong>Error</strong>: debug node not deployed","error");
+ } else if (err.status == 0) {
+ RED.notify("<strong>Error</strong>: no response from server","error");
+ } else {
+ RED.notify("<strong>Error</strong>: unexpected error: ("+err.status+")"+err.response,"error");
+ }
+ } else if (resp.status == 200) {
+ RED.notify("Successfully activated: "+label,"success");
+ } else if (resp.status == 201) {
+ RED.notify("Successfully deactivated: "+label,"success");
+ } else {
+ RED.notify("<strong>Error</strong>: unexpected response: ("+resp.status+") "+resp.response,"error");
+ }
+ });
+ }
+ },
+ onpaletteadd: function() {
+ var content = document.createElement("div");
+ content.id = "tab-debug";
+
+ var toolbar = document.createElement("div");
+ toolbar.id = "debug-toolbar";
+ content.appendChild(toolbar);
+
+ toolbar.innerHTML = '<div class="btn-group pull-right"><a id="debug-tab-clear" title="clear log" class="btn btn-mini" href="#"><i class="fa fa-trash"></i></a></div> ';
+
+ var messages = document.createElement("div");
+ messages.id = "debug-content";
+ content.appendChild(messages);
+
+ RED.sidebar.addTab("debug",content);
+
+ function getTimestamp() {
+ var d = new Date();
+ return d.toLocaleString();
+ }
+
+ var sbc = document.getElementById("debug-content");
+
+ var messageCount = 0;
+ var that = this;
+ RED._debug = function(msg) {
+ that.handleDebugMessage("",{
+ name:"debug",
+ msg:msg
+ });
+ }
+
+ this.handleDebugMessage = function(t,o) {
+ var msg = document.createElement("div");
+ msg.onmouseover = function() {
+ msg.style.borderRightColor = "#999";
+ var n = RED.nodes.node(o.id);
+ if (n) {
+ n.highlighted = true;
+ n.dirty = true;
+ }
+ RED.view.redraw();
+ };
+ msg.onmouseout = function() {
+ msg.style.borderRightColor = "";
+ var n = RED.nodes.node(o.id);
+ if (n) {
+ n.highlighted = false;
+ n.dirty = true;
+ }
+ RED.view.redraw();
+ };
+ msg.onclick = function() {
+ var node = RED.nodes.node(o.id);
+ if (node) {
+ RED.view.showWorkspace(node.z);
+ }
+
+ };
+ var name = (o.name?o.name:o.id).toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
+ var topic = (o.topic||"").toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
+ var payload = (o.msg||"").toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
+ msg.className = 'debug-message'+(o.level?(' debug-message-level-'+o.level):'');
+ msg.innerHTML = '<span class="debug-message-date">'+getTimestamp()+'</span>'+
+ '<span class="debug-message-name">['+name+']</span>'+
+ (o.topic?'<span class="debug-message-topic">'+topic+'</span>':'')+
+ '<span class="debug-message-payload">'+payload+'</span>';
+ var atBottom = (sbc.scrollHeight-messages.offsetHeight-sbc.scrollTop) < 5;
+ messageCount++;
+ $(messages).append(msg);
+
+ if (messageCount > 200) {
+ $("#debug-content .debug-message:first").remove();
+ messageCount--;
+ }
+ if (atBottom) {
+ $(sbc).scrollTop(sbc.scrollHeight);
+ }
+ };
+ RED.comms.subscribe("debug",this.handleDebugMessage);
+
+ $("#debug-tab-clear").click(function() {
+ $(".debug-message").remove();
+ messageCount = 0;
+ RED.nodes.eachNode(function(node) {
+ node.highlighted = false;
+ node.dirty = true;
+ });
+ RED.view.redraw();
+ });
+ },
+ onpaletteremove: function() {
+ RED.comms.unsubscribe("debug",this.handleDebugMessage);
+ RED.sidebar.removeTab("debug");
+ delete RED._debug;
+ }
+ });
+</script>
+
+<style>
+ #debug-content {
+ position: absolute;
+ top: 30px;
+ bottom: 0px;
+ left:0px;
+ right: 0px;
+ overflow-y: scroll;
+ }
+ #debug-toolbar {
+ padding: 3px 10px;
+ height: 24px;
+ background: #f3f3f3;
+ }
+ .debug-message {
+ cursor: pointer;
+ border-bottom: 1px solid #eee;
+ border-left: 8px solid #eee;
+ border-right: 8px solid #eee;
+ padding: 2px;
+ }
+ .debug-message-date {
+ background: #fff;
+ font-size: 9px;
+ color: #aaa;
+ padding: 1px 5px 1px 1px;
+ }
+ .debug-message-topic {
+ display: block;
+ background: #fff;
+ padding: 1px 5px;
+ font-size: 9px;
+ color: #a66;
+ }
+ .debug-message-name {
+ background: #fff;
+ padding: 1px 5px;
+ font-size: 9px;
+ color: #aac;
+ }
+ .debug-message-payload {
+ display: block;
+ padding: 2px;
+ background: #fff;
+ }
+ .debug-message-level-log {
+ border-left-color: #eee;
+ border-right-color: #eee;
+ }
+ .debug-message-level-warn {
+ border-left-color: #ffdf9d;
+ border-right-color: #ffdf9d;
+ }
+ .debug-message-level-error {
+ border-left-color: #f99;
+ border-right-color: #f99;
+ }
+</style>
diff --git a/dgbuilder/core_nodes/core/58-debug.js b/dgbuilder/core_nodes/core/58-debug.js
new file mode 100644
index 0000000..7436bf2
--- /dev/null
+++ b/dgbuilder/core_nodes/core/58-debug.js
@@ -0,0 +1,114 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ var util = require("util");
+ var events = require("events");
+ var debuglength = RED.settings.debugMaxLength||1000;
+ var useColors = false;
+ // util.inspect.styles.boolean = "red";
+
+ function DebugNode(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.complete = n.complete;
+ this.console = n.console;
+ this.active = (n.active == null)||n.active;
+ var node = this;
+
+ this.on("input",function(msg) {
+ if (this.complete == "true") { // debug complete msg object
+ if (this.console == "true") {
+ node.log("\n"+util.inspect(msg, {colors:useColors, depth:10}));
+ }
+ if (this.active) {
+ sendDebug({id:this.id,name:this.name,topic:msg.topic,msg:msg,_path:msg._path});
+ }
+ } else { // debug just the msg.payload
+ if (this.console == "true") {
+ if (typeof msg.payload === "string") {
+ node.log((msg.payload.indexOf("\n") != -1 ? "\n" : "") + msg.payload);
+ }
+ else if (typeof msg.payload === "object") { node.log("\n"+util.inspect(msg.payload, {colors:useColors, depth:10})); }
+ else { node.log(util.inspect(msg.payload, {colors:useColors})); }
+ }
+ if (this.active) {
+ sendDebug({id:this.id,name:this.name,topic:msg.topic,msg:msg.payload,_path:msg._path});
+ }
+ }
+ });
+ }
+
+ RED.nodes.registerType("debug",DebugNode);
+
+ function sendDebug(msg) {
+ if (msg.msg instanceof Error) {
+ msg.msg = msg.msg.toString();
+ } else if (msg.msg instanceof Buffer) {
+ msg.msg = "(Buffer) "+msg.msg.toString('hex');
+ } else if (typeof msg.msg === 'object') {
+ var seen = [];
+ var ty = "(Object) ";
+ if (util.isArray(msg.msg)) { ty = "(Array) "; }
+ msg.msg = ty + JSON.stringify(msg.msg, function(key, value) {
+ if (typeof value === 'object' && value !== null) {
+ if (seen.indexOf(value) !== -1) { return "[circular]"; }
+ seen.push(value);
+ }
+ return value;
+ }," ");
+ seen = null;
+ } else if (typeof msg.msg === "boolean") {
+ msg.msg = "(boolean) "+msg.msg.toString();
+ } else if (msg.msg === 0) {
+ msg.msg = "0";
+ } else if (msg.msg == null) {
+ msg.msg = "(undefined)";
+ }
+
+ if (msg.msg.length > debuglength) {
+ msg.msg = msg.msg.substr(0,debuglength) +" ....";
+ }
+
+ RED.comms.publish("debug",msg);
+ }
+
+ DebugNode.logHandler = new events.EventEmitter();
+ DebugNode.logHandler.on("log",function(msg) {
+ if (msg.level == "warn" || msg.level == "error") {
+ sendDebug(msg);
+ }
+ });
+ RED.log.addHandler(DebugNode.logHandler);
+
+ RED.httpAdmin.post("/debug/:id/:state", function(req,res) {
+ var node = RED.nodes.getNode(req.params.id);
+ var state = req.params.state;
+ if (node != null) {
+ if (state === "enable") {
+ node.active = true;
+ res.send(200);
+ } else if (state === "disable") {
+ node.active = false;
+ res.send(201);
+ } else {
+ res.send(404);
+ }
+ } else {
+ res.send(404);
+ }
+ });
+}
diff --git a/dgbuilder/core_nodes/core/75-exec.html b/dgbuilder/core_nodes/core/75-exec.html
new file mode 100644
index 0000000..567a34c
--- /dev/null
+++ b/dgbuilder/core_nodes/core/75-exec.html
@@ -0,0 +1,68 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="exec">
+ <div class="form-row">
+ <label for="node-input-command"><i class="fa fa-file"></i> Command</label>
+ <input type="text" id="node-input-command" placeholder="command">
+ </div>
+ <div class="form-row">
+ <label for="node-input-append"><i class="fa fa-list"></i> Append</label>
+ <input type="text" id="node-input-append" placeholder="extra input">
+ </div>
+ <div class="form-row">
+ <label> </label>
+ <input type="checkbox" id="node-input-useSpawn" placeholder="spawn" style="display: inline-block; width: auto; vertical-align: top;">
+ <label for="node-input-useSpawn" style="width: 70%;">Use spawn() instead of exec() ?</label>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips">Tip: <i>spawn</i> expects only one command word - and appended args to be comma separated.</div>
+</script>
+
+<script type="text/x-red" data-help-name="exec">
+ <p>Calls out to a system command.<br/></p>
+ <p>Provides 3 outputs... stdout, stderr, and return code.</p>
+ <p>By default uses exec() which calls the command, blocks while waiting for completion, and then returns the complete result in one go, along with any errors.</p>
+ <p>Optionally can use spawn() instead, which returns output from stdout and stderr as the command runs (ie one line at a time). On completion it then returns a return code (on the 3rd output).</p>
+ <p>Spawn only expect one command word, with all extra parameters to be comma separated and passed as the append.</p>
+ <p>The optional append gets added to the command after the <b>msg.payload</b> - so you can do things like pipe the result to another command.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('exec',{
+ category: 'advanced-function',
+ color:"darksalmon",
+ defaults: {
+ command: {value:"",required:true},
+ append: {value:""},
+ useSpawn: {value:""},
+ name: {value:""}
+ },
+ inputs:1,
+ outputs:3,
+ icon: "arrow-in.png",
+ align: "right",
+ label: function() {
+ return this.name||this.command;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/core/75-exec.js b/dgbuilder/core_nodes/core/75-exec.js
new file mode 100644
index 0000000..a07b140
--- /dev/null
+++ b/dgbuilder/core_nodes/core/75-exec.js
@@ -0,0 +1,84 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var spawn = require('child_process').spawn;
+ var exec = require('child_process').exec;
+
+ function ExecNode(n) {
+ RED.nodes.createNode(this,n);
+ this.cmd = n.command.trim();
+ this.append = n.append.trim() || "";
+ this.useSpawn = n.useSpawn;
+
+ var node = this;
+ this.on("input", function(msg) {
+ node.status({fill:"blue",shape:"dot"});
+ if (this.useSpawn === true) {
+ // make the extra args into an array
+ // then prepend with the msg.payload
+ if (typeof(msg.payload !== "string")) { msg.payload = msg.payload.toString(); }
+ var arg = [];
+ if (node.append.length > 0) { arg = node.append.split(","); }
+ if (msg.payload.trim() !== "") { arg.unshift(msg.payload); }
+ node.log(node.cmd+" ["+arg+"]");
+ if (node.cmd.indexOf(" ") == -1) {
+ var ex = spawn(node.cmd,arg);
+ ex.stdout.on('data', function (data) {
+ //console.log('[exec] stdout: ' + data);
+ msg.payload = data.toString();
+ node.send([msg,null,null]);
+ });
+ ex.stderr.on('data', function (data) {
+ //console.log('[exec] stderr: ' + data);
+ msg.payload = data.toString();
+ node.send([null,msg,null]);
+ });
+ ex.on('close', function (code) {
+ //console.log('[exec] result: ' + code);
+ msg.payload = code;
+ node.status({});
+ node.send([null,null,msg]);
+ });
+ ex.on('error', function (code) {
+ node.warn(code);
+ });
+ }
+ else { node.error("Spawn command must be just the command - no spaces or extra parameters"); }
+ }
+ else {
+ var cl = node.cmd+" "+msg.payload+" "+node.append;
+ node.log(cl);
+ var child = exec(cl, function (error, stdout, stderr) {
+ msg.payload = stdout;
+ var msg2 = {payload:stderr};
+ var msg3 = null;
+ //console.log('[exec] stdout: ' + stdout);
+ //console.log('[exec] stderr: ' + stderr);
+ if (error !== null) {
+ msg3 = {payload:error};
+ //console.log('[exec] error: ' + error);
+ }
+ node.status({});
+ node.send([msg,msg2,msg3]);
+ });
+ }
+ });
+ }
+
+ RED.nodes.registerType("exec",ExecNode);
+}
diff --git a/dgbuilder/core_nodes/core/80-function.html b/dgbuilder/core_nodes/core/80-function.html
new file mode 100644
index 0000000..442c391
--- /dev/null
+++ b/dgbuilder/core_nodes/core/80-function.html
@@ -0,0 +1,110 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="function">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-func"><i class="fa fa-wrench"></i> Function</label>
+ <input type="hidden" id="node-input-func" autofocus="autofocus">
+ <div style="height: 250px;" class="node-text-editor" id="node-input-func-editor" ></div>
+ </div>
+ <div class="form-row">
+ <label for="node-input-outputs"><i class="fa fa-random"></i> Outputs</label>
+ <input id="node-input-outputs" style="width: 60px; height: 1.7em;" value="1">
+ </div>
+ <div class="form-tips">See the Info tab for help writing functions.</div>
+</script>
+
+<script type="text/x-red" data-help-name="function">
+ <p>A function block where you can write code to do more interesting things.</p>
+ <p>The message is passed in as a JavaScript object called <code>msg</code>.</p>
+ <p>By convention it will have a <code>msg.payload</code> property containing
+ the body of the message.</p>
+ <p>The function should return the messages it wants to pass on to the next nodes
+ in the flow. It can return:</p>
+ <ul>
+ <li>a single message object - passed to nodes connected to the first output</li>
+ <li>an array of message objects - passed to nodes connected to the corresponding outputs</li>
+ </ul>
+ <p>If any element of the array is itself an array of messages, multiple
+ messages are sent to the corresponding output.</p>
+ <p>If null is returned, either by itself or as an element of the array, no
+ message is passed on.</p>
+ <p>See the <a target="_new" href="http://nodered.org/docs/writing-functions.html">online documentation</a> for more help.</p>
+
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('function',{
+ color:"#fdd0a2",
+ category: 'function',
+ defaults: {
+ name: {value:""},
+ func: {value:"\nreturn msg;"},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "function.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-func-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-func-editor'),
+ lang:"js",
+ contents: $("#node-input-func").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-func").val(this.editor.getText())
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/core/80-function.js b/dgbuilder/core_nodes/core/80-function.js
new file mode 100644
index 0000000..e1413a7
--- /dev/null
+++ b/dgbuilder/core_nodes/core/80-function.js
@@ -0,0 +1,79 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function FunctionNode(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.func = n.func;
+ var functionText = "var results = null; results = (function(msg){"+this.func+"\n})(msg);";
+ this.topic = n.topic;
+ var sandbox = {
+ console:console,
+ util:util,
+ Buffer:Buffer,
+ context: {
+ global:RED.settings.functionGlobalContext || {}
+ }
+ };
+ var context = vm.createContext(sandbox);
+ try {
+ this.script = vm.createScript(functionText);
+ this.on("input", function(msg) {
+ try {
+ var start = process.hrtime();
+ context.msg = msg;
+ this.script.runInContext(context);
+ var results = context.results;
+ if (results == null) {
+ results = [];
+ } else if (results.length == null) {
+ results = [results];
+ }
+ if (msg._topic) {
+ for (var m in results) {
+ if (results[m]) {
+ if (util.isArray(results[m])) {
+ for (var n=0; n < results[m].length; n++) {
+ results[m][n]._topic = msg._topic;
+ }
+ } else {
+ results[m]._topic = msg._topic;
+ }
+ }
+ }
+ }
+ this.send(results);
+ var duration = process.hrtime(start);
+ if (process.env.NODE_RED_FUNCTION_TIME) {
+ this.status({fill:"yellow",shape:"dot",text:""+Math.floor((duration[0]* 1e9 + duration[1])/10000)/100});
+ }
+ } catch(err) {
+ this.error(err.toString());
+ }
+ });
+ } catch(err) {
+ this.error(err);
+ }
+ }
+
+ RED.nodes.registerType("function",FunctionNode);
+ RED.library.register("functions");
+}
diff --git a/dgbuilder/core_nodes/core/80-template.html b/dgbuilder/core_nodes/core/80-template.html
new file mode 100644
index 0000000..dc014d3
--- /dev/null
+++ b/dgbuilder/core_nodes/core/80-template.html
@@ -0,0 +1,102 @@
+<!--
+ Copyright 2013,2014 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="template">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-template"><i class="fa fa-file-code-o"></i> Template</label>
+ <input type="hidden" id="node-input-template" autofocus="autofocus">
+ <div style="height: 250px;" class="node-text-editor" id="node-input-template-editor" ></div>
+ </div>
+ <div class="form-row">
+ <label for="node-input-field"><i class="fa fa-edit"></i> Property</label>
+ msg.<input type="text" id="node-input-field" placeholder="payload" style="width: 64%;">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="template">
+ <p>Creates a new message based on the provided template.</p>
+ <p>This uses the <i><a href="http://mustache.github.io/mustache.5.html" target="_new">mustache</a></i> format.</p>
+ <p>For example, when a template of:
+ <pre>Hello {{name}}. Today is {{date}}</pre>
+ <p>receives a message containing:
+ <pre>{
+ name: "Fred",
+ date: "Monday"
+ payload: ...
+}</pre>
+ <p>The resulting payload will be:
+ <pre>Hello Fred. Today is Monday</pre>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('template',{
+ color:"rgb(243, 181, 103)",
+ category: 'function',
+ defaults: {
+ name: {value:""},
+ field: {value:"payload"},
+ template: {value:"This is the payload: {{payload}}!"},
+ },
+ inputs:1,
+ outputs:1,
+ icon: "template.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+
+ function templateDialogResize(ev,ui) {
+ $("#node-input-template-editor").css("height",(ui.size.height-200)+"px");
+ };
+
+ $( "#dialog" ).on("dialogresize", templateDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-template');
+ if (size) {
+ templateDialogResize(null,{size:size});
+ }
+ });
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",templateDialogResize);
+ });
+
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-template-editor'),
+ lang:"html",
+ contents: $("#node-input-template").val()
+ });
+ RED.library.create({
+ url:"templates", // where to get the data from
+ type:"template", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','field']
+ });
+ $("#node-input-name").focus();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-template").val(this.editor.getText())
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/core/80-template.js b/dgbuilder/core_nodes/core/80-template.js
new file mode 100644
index 0000000..7c84142
--- /dev/null
+++ b/dgbuilder/core_nodes/core/80-template.js
@@ -0,0 +1,61 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var mustache = require("mustache");
+
+ function TemplateNode(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.field = n.field || "payload";
+ this.template = n.template;
+ var node = this;
+
+ var b = node.field.split(".");
+ var i = 0;
+ var m = null;
+ var rec = function(obj) {
+ i += 1;
+ if ((i < b.length) && (typeof obj[b[i-1]] === "object")) {
+ rec(obj[b[i-1]]); // not there yet - carry on digging
+ }
+ else {
+ if (i === b.length) { // we've finished so assign the value
+ obj[b[i-1]] = mustache.render(node.template,m);
+ node.send(m);
+ }
+ else {
+ obj[b[i-1]] = {}; // needs to be a new object so create it
+ rec(obj[b[i-1]]); // and carry on digging
+ }
+ }
+ }
+
+ node.on("input", function(msg) {
+ try {
+ m = msg;
+ i = 0;
+ rec(msg);
+ } catch(err) {
+ node.error(err.message);
+ }
+ });
+ }
+
+ RED.nodes.registerType("template",TemplateNode);
+ RED.library.register("templates");
+}
diff --git a/dgbuilder/core_nodes/core/89-delay.html b/dgbuilder/core_nodes/core/89-delay.html
new file mode 100644
index 0000000..dcb0a5b
--- /dev/null
+++ b/dgbuilder/core_nodes/core/89-delay.html
@@ -0,0 +1,167 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<!-- First, the content of the edit dialog is defined. -->
+<script type="text/x-red" data-template-name="delay">
+
+ <div class="form-row">
+ <label for="node-input-pauseType"><i class="fa fa-tasks"></i> Action</label>
+ <select id="node-input-pauseType" style="width:270px !important">
+ <option value="delay">Delay message</option>
+ <option value="rate">Limit rate to</option>
+ <option value="random">Random delay</option>
+ </select>
+ </div>
+ <div id="delay-details" class="form-row">
+ <label for="node-input-timeout"><i class="fa fa-clock-o"></i> For</label>
+ <input type="text" id="node-input-timeout" placeholder="Time" style="direction:rtl; width:50px !important">
+ <select id="node-input-timeoutUnits" style="width:200px !important">
+ <option value="milliseconds">Milliseconds</option>
+ <option value="seconds">Seconds</option>
+ <option value="minutes">Minutes</option>
+ <option value="hours">Hours</option>
+ <option value="days">Days</option>
+ </select>
+ </div>
+
+ <div id="rate-details" class="form-row">
+ <label for="node-input-rate"><i class="fa fa-clock-o"></i> To</label>
+ <input type="text" id="node-input-rate" placeholder="1" style="direction:rtl; width:30px !important">
+ <label for="node-input-reateUnits">msg(s) per</label>
+ <select id="node-input-rateUnits" style="width:140px !important">
+ <option value="second">Second</option>
+ <option value="minute">Minute</option>
+ <option value="hour">Hour</option>
+ <option value="day">Day</option>
+ </select>
+ <br/>
+ <input style="margin: 20px 0 20px 100px; width: 30px;" type="checkbox" id="node-input-drop"><label style="width: 250px;" for="node-input-drop">drop intermediate messages</label>
+ </div>
+
+ <div id="random-details" class="form-row">
+ <label for="node-input-randomFirst"><i class="fa fa-clock-o"></i> Between</label>
+ <input type="text" id="node-input-randomFirst" placeholder="" style="directon:rtl; width:30px !important">
+ <label for="node-input-randomLast" style="width:20px"> & </label>
+ <input type="text" id="node-input-randomLast" placeholder="" style="directon:rtl; width:30px !important">
+ <select id="node-input-randomUnits" style="width:140px !important">
+ <option value="milliseconds">Milliseconds</option>
+ <option value="seconds">Seconds</option>
+ <option value="minutes">Minutes</option>
+ <option value="hours">Hours</option>
+ <option value="days">Days</option>
+ </select>
+ </div>
+
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+
+</script>
+
+<!-- Next, some simple help text is provided for the node. -->
+<script type="text/x-red" data-help-name="delay">
+ <p>Introduces a delay into a flow or rate limts messges</p>
+ <p>Default delay is 5 seconds and rate limit of 1 msg/second, but both can be configured</p>
+</script>
+
+<!-- Finally, the node type is registered along with all of its properties -->
+<script type="text/javascript">
+ RED.nodes.registerType('delay',{
+ category: 'function', // the palette category
+ color:"#E6E0F8",
+ defaults: { // defines the editable properties of the node
+ name: {value:""}, // along with default values.
+ pauseType: {value:"delay", required:true},
+ timeout: {value:"5", required:true, validate:RED.validators.number()},
+ timeoutUnits: {value:"seconds"},
+ rate: {value:"1", required:true, validate:RED.validators.number()},
+ rateUnits: {value: "second"},
+ randomFirst: {value:"1", required:true, validate:RED.validators.number()},
+ randomLast: {value:"5", required:true, validate:RED.validators.number()},
+ randomUnits: {value: "seconds"},
+ drop: {value:false}
+ },
+ inputs:1, // set the number of inputs - only 0 or 1
+ outputs:1, // set the number of outputs - 0 to n
+ icon: "timer.png", // set the icon (held in public/icons)
+ label: function() { // sets the default label contents
+ if (this.pauseType == "delay") {
+ var units = this.timeoutUnits ? this.timeoutUnits.charAt(0) : "s";
+ if (this.timeoutUnits == "milliseconds") { units = "ms"; }
+ return this.name||"delay "+this.timeout+" " + units;
+ } else if (this.pauseType == "rate") {
+ var units = this.rateUnits ? this.rateUnits.charAt(0) : "s";
+ return this.name||"limit "+this.rate+" msg/"+ units;
+ } else if (this.pauseType == "random") {
+ return this.name || "random";
+ }
+ return "foo";
+ },
+ labelStyle: function() { // sets the class to apply to the label
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ $( "#node-input-timeout" ).spinner({min:1,max:60});
+ $( "#node-input-rate" ).spinner({min:1});
+
+ $( "#node-input-randomFirst" ).spinner({min:0});
+ $( "#node-input-randomLast" ).spinner({min:1});
+
+ if (this.pauseType == "delay") {
+ $("#delay-details").show();
+ $("#rate-details").hide();
+ $("#random-details").hide();
+ } else if (this.pauseType == "rate") {
+ $("#delay-details").hide();
+ $("#rate-details").show();
+ $("#random-details").hide();
+ } else if (this.pauseType == "random") {
+ $("#delay-details").hide();
+ $("#rate-details").hide();
+ $("#random-details").show();
+ }
+
+ if (!this.timeoutUnits) {
+ $("#node-input-timeoutUnits option").filter(function() {
+ return $(this).val() == 'seconds';
+ }).attr('selected', true);
+ }
+
+ if (!this.randomUnits) {
+ $("#node-input-randomUnits option").filter(function() {
+ return $(this).val() == 'seconds';
+ }).attr('selected', true);
+ }
+
+ $("#node-input-pauseType").on("change",function() {
+ if (this.value == "delay") {
+ $("#delay-details").show();
+ $("#rate-details").hide();
+ $("#random-details").hide();
+ } else if (this.value == "rate") {
+ $("#delay-details").hide();
+ $("#rate-details").show();
+ $("#random-details").hide();
+ } else if (this.value == "random") {
+ $("#delay-details").hide();
+ $("#rate-details").hide();
+ $("#random-details").show();
+ }
+ });
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/core/89-delay.js b/dgbuilder/core_nodes/core/89-delay.js
new file mode 100644
index 0000000..3c4e1c0
--- /dev/null
+++ b/dgbuilder/core_nodes/core/89-delay.js
@@ -0,0 +1,171 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+//Simple node to introduce a pause into a flow
+module.exports = function(RED) {
+ "use strict";
+
+ var MILLIS_TO_NANOS = 1000000;
+ var SECONDS_TO_NANOS = 1000000000;
+
+ function random(n) {
+ var wait = n.randomFirst + (n.diff * Math.random());
+ if (n.buffer.length > 0) {
+ n.send(n.buffer.pop());
+ n.randomID = setTimeout(function() {random(n);},wait);
+ } else {
+ n.randomID = -1;
+ }
+ }
+
+ function DelayNode(n) {
+ RED.nodes.createNode(this,n);
+
+ this.pauseType = n.pauseType;
+ this.timeoutUnits = n.timeoutUnits;
+ this.randomUnits = n.randomUnits;
+ this.rateUnits = n.rateUnits;
+
+ if (n.timeoutUnits === "milliseconds") {
+ this.timeout = n.timeout;
+ } else if (n.timeoutUnits === "seconds") {
+ this.timeout = n.timeout * 1000;
+ } else if (n.timeoutUnits === "minutes") {
+ this.timeout = n.timeout * (60 * 1000);
+ } else if (n.timeoutUnits === "hours") {
+ this.timeout = n.timeout * (60 * 60 * 1000);
+ } else if (n.timeoutUnits === "days") {
+ this.timeout = n.timeout * (24 * 60 * 60 * 1000);
+ }
+
+ if (n.rateUnits === "second") {
+ this.rate = 1000/n.rate;
+ } else if (n.rateUnits === "minute") {
+ this.rate = (60 * 1000)/n.rate;
+ } else if (n.rateUnits === "hour") {
+ this.rate = (60 * 60 * 1000)/n.rate;
+ } else if (n.rateUnits === "day") {
+ this.rate = (24 * 60 * 60 * 1000)/n.rate;
+ }
+
+ if (n.randomUnits === "milliseconds") {
+ this.randomFirst = n.randomFirst;
+ this.randomLast = n.randomLast;
+ } else if (n.randomUnits === "seconds") {
+ this.randomFirst = n.randomFirst * 1000;
+ this.randomLast = n.randomLast * 1000;
+ } else if (n.randomUnits === "minutes") {
+ this.randomFirst = n.randomFirst * (60 * 1000);
+ this.randomLast = n.randomLast * (60 * 1000);
+ } else if (n.randomUnits === "hours") {
+ this.randomFirst = n.randomFirst * (60 * 60 * 1000);
+ this.randomLast = n.randomLast * (60 * 60 * 1000);
+ } else if (n.randomUnits === "days") {
+ this.randomFirst = n.randomFirst * (24 * 60 * 60 * 1000);
+ this.randomLast = n.randomLast * (24 * 60 * 60 * 1000);
+ }
+
+ this.diff = this.randomLast - this.randomFirst;
+ this.name = n.name;
+ this.idList = [];
+ this.buffer = [];
+ this.intervalID = -1;
+ this.randomID = -1;
+ this.lastSent;
+ this.drop = n.drop;
+ var node = this;
+
+ if (this.pauseType === "delay") {
+ this.on("input", function(msg) {
+ var id;
+ id = setTimeout(function(){
+ node.idList.splice(node.idList.indexOf(id),1);
+ node.send(msg);
+ }, node.timeout);
+ this.idList.push(id);
+ });
+
+ this.on("close", function() {
+ for (var i=0; i<this.idList.length; i++ ) {
+ clearTimeout(this.idList[i]);
+ }
+ this.idList = [];
+ });
+
+ } else if (this.pauseType === "rate") {
+ this.on("input", function(msg) {
+ if (!node.drop) {
+ if ( node.intervalID !== -1) {
+ node.buffer.push(msg);
+ if (node.buffer.length > 0) {
+ node.status({text:node.buffer.length});
+ }
+ if (node.buffer.length > 1000) {
+ node.warn(this.name + " buffer exceeded 1000 messages");
+ }
+ } else {
+ node.send(msg);
+ node.intervalID = setInterval(function() {
+ if (node.buffer.length === 0) {
+ clearInterval(node.intervalID);
+ node.intervalID = -1;
+ node.status({text:""});
+ }
+
+ if (node.buffer.length > 0) {
+ node.send(node.buffer.shift());
+ node.status({text:node.buffer.length});
+ }
+ },node.rate);
+ }
+ } else {
+ var timeSinceLast;
+ if (node.lastSent) {
+ timeSinceLast = process.hrtime(node.lastSent);
+ }
+ if (!node.lastSent) { // ensuring that we always send the first message
+ node.lastSent = process.hrtime();
+ node.send(msg);
+ } else if ( ( (timeSinceLast[0] * SECONDS_TO_NANOS) + timeSinceLast[1] ) > (node.rate * MILLIS_TO_NANOS) ) {
+ node.lastSent = process.hrtime();
+ node.send(msg);
+ }
+ }
+ });
+
+ this.on("close", function() {
+ clearInterval(this.intervalID);
+ this.buffer = [];
+ });
+
+ } else if (this.pauseType === "random") {
+ this.on("input",function(msg){
+ node.buffer.push(msg);
+ if (node.randomID === -1) {
+ var wait = node.randomFirst + (node.diff * Math.random());
+ node.randomID = setTimeout(function() {random(node);},wait);
+ }
+ });
+
+ this.on("close", function (){
+ if (this.randomID !== -1) {
+ clearTimeout(this.randomID);
+ }
+ });
+ }
+ }
+ RED.nodes.registerType("delay",DelayNode);
+}
diff --git a/dgbuilder/core_nodes/core/89-trigger.html b/dgbuilder/core_nodes/core/89-trigger.html
new file mode 100644
index 0000000..f3ec530
--- /dev/null
+++ b/dgbuilder/core_nodes/core/89-trigger.html
@@ -0,0 +1,130 @@
+<!--
+ Copyright 2014 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="trigger">
+ <div class="form-row">
+ <label for="node-input-op1type"><i class="fa fa-arrow-up"></i> Output</label>
+ <select id="node-input-op1type" style="width:73% !important">
+ <option value="val">the value below</option>
+ <option value="pay">the existing payload</option>
+ <option value="nul">nothing (no output)</option>
+ </select>
+ </div>
+ <div class="form-row" id="node-op1">
+ <label for="node-input-op1"> </label>
+ <input type="text" id="node-input-op1">
+ </div>
+ <div class="form-row">
+ <label for="node-input-duration"><i class="fa fa-clock-o"></i> then wait</label>
+ <input type="text" id="node-input-duration" placeholder="250" style="direction:rtl; width:70px !important">
+ <select id="node-input-units" style="width:140px !important">
+ <option value="ms">Milliseconds</option>
+ <option value="s">Seconds</option>
+ <option value="min">Minutes</option>
+ <option value="hr">Hours</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-op2type"><i class="fa fa-arrow-down"></i> output</label>
+ <select id="node-input-op2type" style="width:73% !important">
+ <option value="val">the value below</option>
+ <option value="pay">the existing payload</option>
+ <option value="nul">nothing (no output)</option>
+ </select>
+ </div>
+ <div class="form-row" id="node-op2">
+ <label for="node-input-op2"> </label>
+ <input type="text" id="node-input-op2">
+ </div>
+ <div class="form-row">
+ <label for="node-input-extend"><i class="fa fa-repeat"></i> and</label>
+ <select id="node-input-extend" style="width:73% !important">
+ <option value="false">don't extend the timer if retriggered</option>
+ <option value="true">extend the timer if retriggered</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <!-- <div class="form-tips">Tip: Outputs can be values, null, {{templated}} or msg.payload<br/> -->
+ <div class="form-tips">Setting the timeout to 0 sets an infinite timeout = single shot.</div>
+ <script>
+ {
+ $("#node-input-op1type").change(function() {
+ if ($("#node-input-op1type").val() == "val") { $("#node-op1").show(); }
+ else { $("#node-op1").hide(); }
+ });
+ $("#node-input-op2type").change(function() {
+ if ($("#node-input-op2type").val() == "val") { $("#node-op2").show(); }
+ else { $("#node-op2").hide(); }
+ });
+ }
+ </script>
+</script>
+
+<script type="text/x-red" data-help-name="trigger">
+ <p>Creates two messages on the output separated by a timeout whenever ANY <b>msg</b> arrives on the input.</p>
+ <p>For example, this can be used to toggle a Raspberry PI GPIO pin on and off.</p>
+ <p>The two output states can be specified as can the duration of the timer.
+ Either output can be set to a value, or templated from the inbound
+ <b>msg</b> using mustache syntax. <pre>The payload is {{payload}}</pre></p>
+ <p>If the payload is an object then setting the output to <i>existing payload</i> will pass the complete payload object through.</p>
+ <p>Optionally the timer can be extended by being retriggered... or not.</p>
+ <p>By setting the first output to <i>nothing</i>, and selecting extend timer - a watchdog timer can be created.
+ No output will happen as long as repeated inputs occur within the timeout period.</p>
+ <p>Setting the timer to 0 creates an "infinite" timeout - the first output will happen but the second
+ never will, and neither can the first be retriggered - so a true one shot.</p>
+ <p>If a <b>msg.reset</b> property is present any timeout currently in progress
+ will be cleared and the second output will not happen.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('trigger',{
+ category: 'function',
+ color:"#E6E0F8",
+ defaults: {
+ op1: {value:"1"},
+ op2: {value:"0"},
+ op1type: {value:""},
+ op2type: {value:""},
+ duration: {value:"250",required:true,validate:RED.validators.number()},
+ extend: {value:"false"},
+ units: {value: "ms"},
+ name: {value:""}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "trigger.png",
+ label: function() {
+ if (this.duration > 0) {
+ return this.name||"trigger "+this.duration+this.units;
+ }
+ else {
+ return this.name||"trigger once ∞";
+ }
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ $( "#node-input-duration" ).spinner({
+ min:1,
+ increment:25
+ });
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/core/89-trigger.js b/dgbuilder/core_nodes/core/89-trigger.js
new file mode 100644
index 0000000..d86a213
--- /dev/null
+++ b/dgbuilder/core_nodes/core/89-trigger.js
@@ -0,0 +1,91 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var mustache = require("mustache");
+ function TriggerNode(n) {
+ RED.nodes.createNode(this,n);
+ this.op1 = n.op1 || "1";
+ this.op2 = n.op2 || "0";
+ this.op1type = n.op1type || "val";
+ this.op2type = n.op2type || "val";
+ this.extend = n.extend || false;
+ this.units = n.units || "ms";
+ this.duration = n.duration || 250;
+ if (this.duration <= 0) { this.duration = 0; }
+ else {
+ if (this.units == "s") { this.duration = this.duration * 1000; }
+ if (this.units == "min") { this.duration = this.duration * 1000 * 60; }
+ if (this.units == "hr") { this.duration = this.duration * 1000 *60 * 60; }
+ }
+ this.op1Templated = this.op1.indexOf("{{") != -1;
+ this.op2Templated = this.op2.indexOf("{{") != -1;
+ if (!isNaN(this.op1)) { this.op1 = Number(this.op1); }
+ if (!isNaN(this.op2)) { this.op2 = Number(this.op2); }
+ if (this.op1 == "true") { this.op1 = true; }
+ if (this.op2 == "true") { this.op1 = true; }
+ if (this.op1 == "false") { this.op2 = false; }
+ if (this.op2 == "false") { this.op2 = false; }
+ if (this.op1 == "null") { this.op1 = null; }
+ if (this.op2 == "null") { this.op1 = null; }
+ try { this.op1 = JSON.parse(this.op1); }
+ catch(e) { this.op1 = this.op1; }
+ try { this.op2 = JSON.parse(this.op2); }
+ catch(e) { this.op2 = this.op2; }
+
+ var node = this;
+ var tout = null;
+ var m2;
+ this.on("input", function(msg) {
+ if (msg.hasOwnProperty("reset")) {
+ clearTimeout(tout);
+ tout = null;
+ }
+ else {
+ if (!tout) {
+ if (node.op2type === "pay") { m2 = msg.payload; }
+ else if (node.op2Templated) { m2 = mustache.render(node.op2,msg); }
+ else { m2 = node.op2; }
+ if (node.op1type === "pay") { }
+ else if (node.op1Templated) { msg.payload = mustache.render(node.op1,msg); }
+ else { msg.payload = node.op1; }
+ if (node.op1type !== "nul") { node.send(msg); }
+ if (node.duration === 0) { tout = "infinite"; }
+ else {
+ tout = setTimeout(function() {
+ msg.payload = m2;
+ if (node.op2type !== "nul") { node.send(msg); }
+ tout = null;
+ },node.duration);
+ }
+ }
+ else if ((node.extend == "true") && (node.duration > 0)) {
+ clearTimeout(tout);
+ tout = setTimeout(function() {
+ msg.payload = m2;
+ if (node.op2type !== "nul") { node.send(msg); }
+ tout = null;
+ },node.duration);
+ }
+ }
+ });
+ this.on("close", function() {
+ if (tout) { clearTimeout(tout); }
+ });
+ }
+ RED.nodes.registerType("trigger",TriggerNode);
+}
diff --git a/dgbuilder/core_nodes/core/90-comment.html b/dgbuilder/core_nodes/core/90-comment.html
new file mode 100644
index 0000000..3638fda
--- /dev/null
+++ b/dgbuilder/core_nodes/core/90-comment.html
@@ -0,0 +1,86 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="comment">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-comment"></i> Comment</label>
+ <input type="text" id="node-input-name" placeholder="Comment">
+ </div>
+ <div class="form-row">
+ <label for="node-input-info" style="width: 100% !important;"><i class="fa fa-comments"></i> More</label>
+ <input type="hidden" id="node-input-info" autofocus="autofocus">
+ <div style="height: 250px;" class="node-text-editor" id="node-input-info-editor" ></div>
+ </div>
+ <div class="form-tips">Tip: this isn't meant for "War and Peace" - but useful notes can be kept here.</div>
+</script>
+
+<script type="text/x-red" data-help-name="comment">
+ <p>Simple comment block.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('comment',{
+ category: 'function',
+ color:"#ffffff",
+ defaults: {
+ name: {value:""},
+ info: {value:""}
+ },
+ inputs:0,
+ outputs:0,
+ icon: "comment.png",
+ label: function() {
+ return this.name||"";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+ function functionDialogResize(ev,ui) {
+ $("#node-input-info-editor").css("height",(ui.size.height-235)+"px");
+ };
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-info-editor'),
+ lang:"text",
+ showLinesRuler:false,
+ showFoldingRuler:false,
+ contents: $("#node-input-info").val()
+ });
+ $("#node-input-name").focus();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-info").val(this.editor.getText());
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/core/90-comment.js b/dgbuilder/core_nodes/core/90-comment.js
new file mode 100644
index 0000000..ef5f080
--- /dev/null
+++ b/dgbuilder/core_nodes/core/90-comment.js
@@ -0,0 +1,23 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ function CommentNode(n) {
+ RED.nodes.createNode(this,n);
+ }
+ RED.nodes.registerType("comment",CommentNode);
+}
diff --git a/dgbuilder/core_nodes/core/98-unknown.html b/dgbuilder/core_nodes/core/98-unknown.html
new file mode 100644
index 0000000..19a4ad5
--- /dev/null
+++ b/dgbuilder/core_nodes/core/98-unknown.html
@@ -0,0 +1,49 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="unknown">
+ <div class="form-tips"><p>This node is a type unknown to your installation of Node-RED.</p>
+ <p><i>If you deploy with the node in this state, it will lose all of its configuration.</i></p>
+ <p>See the Info side bar for more help</p></div>
+</script>
+
+<script type="text/x-red" data-help-name="unknown">
+ <p>This node is a type unknown to your installation of Node-RED.</p>
+ <p><i>If you deploy with the node in this state, it will lose all of its configuration.</i></p>
+ <p>It is possible this node type is already installed, but is missing a dependency. Check the Node-RED start-up log for
+ any error messages associated with the missing node type. Use <b>npm install <module></b> to install any missing modules
+ and restart Node-RED and reimport the nodes.</p>
+ <p>Otherwise, you should contact the author of the flow to obtain a copy of the missing node type.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('unknown',{
+ category: 'unknown',
+ color:"#fff0f0",
+ defaults: {
+ name: {value:""}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "",
+ label: function() {
+ return "("+this.name+")"||"unknown";
+ },
+ labelStyle: function() {
+ return "node_label_unknown";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/core/98-unknown.js b/dgbuilder/core_nodes/core/98-unknown.js
new file mode 100644
index 0000000..ed4716b
--- /dev/null
+++ b/dgbuilder/core_nodes/core/98-unknown.js
@@ -0,0 +1,23 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ function UnknownNode(n) {
+ RED.nodes.createNode(this,n);
+ }
+ RED.nodes.registerType("unknown",UnknownNode);
+}
diff --git a/dgbuilder/core_nodes/deprecated/61-imap.html b/dgbuilder/core_nodes/deprecated/61-imap.html
new file mode 100644
index 0000000..9702cd6
--- /dev/null
+++ b/dgbuilder/core_nodes/deprecated/61-imap.html
@@ -0,0 +1,56 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="imap">
+ <div class="form-row node-input-repeat">
+ <label for="node-input-repeat"><i class="fa fa-repeat"></i>Repeat (S)</label>
+ <input type="text" id="node-input-repeat" placeholder="300">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="imap">
+ <p>Repeatedly gets a <b>single email</b> from an IMAP server and forwards on as a msg if not already seen.</p>
+ <p>The subject is loaded into <b>msg.topic</b> and <b>msg.payload</b> is the plain text body.
+ If there is text/html then that is returned in <b>msg.html</b>. <b>msg.from</b> and <b>msg.date</b> are also set if you need them.</p>
+ <p>Uses the imap module - you also need to pre-configure your email settings in a file emailkeys.js as per below.</p>
+ <p><pre>module.exports = { service: "Gmail", user: "blahblah@gmail.com", pass: "password", server: "imap.gmail.com", port: "993" }</pre></p>
+ <p>This <b>must</b> be located in the directory <b>above</b> node-red.</p>
+ <p><b>Note:</b> this node <i>only</i> gets the most recent single email from the inbox, so set the repeat (polling) time appropriately.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('imap',{
+ category: 'deprecated',
+ color:"#c7e9c0",
+ defaults: {
+ repeat: {value:"300",required:true},
+ name: {value:""}
+ },
+ inputs:0,
+ outputs:1,
+ icon: "envelope.png",
+ label: function() {
+ return this.name||"IMAP";
+ },
+ labelStyle: function() {
+ return (this.name||!this.topic)?"node_label_italic":"";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/deprecated/61-imap.js b/dgbuilder/core_nodes/deprecated/61-imap.js
new file mode 100644
index 0000000..aa2b4be
--- /dev/null
+++ b/dgbuilder/core_nodes/deprecated/61-imap.js
@@ -0,0 +1,139 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+var RED = require(process.env.NODE_RED_HOME+"/red/red");
+var Imap = require('imap');
+var util = require('util');
+
+try {
+ var emailkey = RED.settings.email || require(process.env.NODE_RED_HOME+"/../emailkeys.js");
+} catch (err) {
+ //util.log("[61-imap.js] Info : No Email credentials found.");
+}
+
+if (emailkey) {
+ var imap = new Imap({
+ user: emailkey.user,
+ password: emailkey.pass,
+ host: emailkey.server||"imap.gmail.com",
+ port: emailkey.port||"993",
+ tls: true,
+ tlsOptions: { rejectUnauthorized: false }
+ });
+
+ function openInbox(cb) {
+ imap.openBox('INBOX', true, cb);
+ }
+}
+
+function ImapNode(n) {
+ RED.nodes.createNode(this,n);
+ this.warn("This node has been deprecated and will be deleted in a future release. Please update your flow to use the 'e-mail in' node.");
+ this.name = n.name;
+ this.repeat = n.repeat * 1000 || 300000;
+ var node = this;
+ this.interval_id = null;
+ var oldmail = {};
+
+ if (!isNaN(this.repeat) && this.repeat > 0) {
+ node.log("repeat = "+this.repeat);
+ this.interval_id = setInterval( function() {
+ node.emit("input",{});
+ }, this.repeat );
+ }
+
+ this.on("input", function(msg) {
+ if (imap) {
+ imap.once('ready', function() {
+ var pay = {};
+ openInbox(function(err, box) {
+ if (box.messages.total > 0) {
+ var f = imap.seq.fetch(box.messages.total + ':*', { bodies: ['HEADER.FIELDS (FROM SUBJECT DATE)','TEXT'] });
+ f.on('message', function(msg, seqno) {
+ node.log('message: #'+ seqno);
+ var prefix = '(#' + seqno + ') ';
+ msg.on('body', function(stream, info) {
+ var buffer = '';
+ stream.on('data', function(chunk) {
+ buffer += chunk.toString('utf8');
+ });
+ stream.on('end', function() {
+ if (info.which !== 'TEXT') {
+ pay.from = Imap.parseHeader(buffer).from[0];
+ pay.topic = Imap.parseHeader(buffer).subject[0];
+ pay.date = Imap.parseHeader(buffer).date[0];
+ } else {
+ var parts = buffer.split("Content-Type");
+ for (var p in parts) {
+ if (parts[p].indexOf("text/plain") >= 0) {
+ pay.payload = parts[p].split("\n").slice(1,-2).join("\n").trim();
+ }
+ if (parts[p].indexOf("text/html") >= 0) {
+ pay.html = parts[p].split("\n").slice(1,-2).join("\n").trim();
+ }
+ }
+ //pay.body = buffer;
+ }
+ });
+ });
+ msg.on('end', function() {
+ //node.log('Finished: '+prefix);
+ });
+ });
+ f.on('error', function(err) {
+ node.warn('fetch error: ' + err);
+ });
+ f.on('end', function() {
+ if (JSON.stringify(pay) !== oldmail) {
+ node.send(pay);
+ oldmail = JSON.stringify(pay);
+ node.log('sent new message: '+pay.topic);
+ }
+ else { node.log('duplicate not sent: '+pay.topic); }
+ imap.end();
+ });
+ }
+ else {
+ // node.log("you have achieved inbox zero");
+ imap.end();
+ }
+ });
+ });
+ imap.connect();
+ }
+ else { node.warn("No Email credentials found. See info panel."); }
+ });
+
+ if (imap) {
+ imap.on('error', function(err) {
+ util.log(err);
+ });
+ }
+
+ this.on("error", function(err) {
+ node.log("error: ",err);
+ });
+
+ this.on("close", function() {
+ if (this.interval_id != null) {
+ clearInterval(this.interval_id);
+ }
+ if (imap) { imap.destroy(); }
+ });
+
+ node.emit("input",{});
+}
+RED.nodes.registerType("imap",ImapNode);
diff --git a/dgbuilder/core_nodes/deprecated/73-parsexml.html b/dgbuilder/core_nodes/deprecated/73-parsexml.html
new file mode 100644
index 0000000..b6fc16f
--- /dev/null
+++ b/dgbuilder/core_nodes/deprecated/73-parsexml.html
@@ -0,0 +1,53 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="xml2js">
+ <!-- <div class="form-row">
+ <label>Use Console</label>
+ <input type="checkbox" id="node-input-useEyes" placeholder="Name" style="display: inline-block; width: auto; vertical-align: top;">
+ <label for="node-input-useEyes" style="width: 70%;">Debug output in console ?</label>
+ </div> -->
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <!-- <div class="form-tips">Uses xml2js to process xml into javascript object.</div> -->
+</script>
+
+<script type="text/x-red" data-help-name="xml2js">
+ <p>A function that parses the <b>msg.payload</b> using the xml2js library. Places the result in the payload.</p>
+ <p>See <a href="https://github.com/Leonidas-from-XIV/node-xml2js/blob/master/README.md" target="_new">the xml2js docs <i>here</i></a> for more information.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('xml2js',{
+ category: 'deprecated',
+ color:"#E6E0F8",
+ defaults: {
+ //useEyes: {value:false},
+ name: {value:""}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name||"xml2json";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/deprecated/73-parsexml.js b/dgbuilder/core_nodes/deprecated/73-parsexml.js
new file mode 100644
index 0000000..92850cb
--- /dev/null
+++ b/dgbuilder/core_nodes/deprecated/73-parsexml.js
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var parseString = require('xml2js').parseString;
+ var useColors = true;
+ //util.inspect.styles.boolean = "red";
+
+ function Xml2jsNode(n) {
+ RED.nodes.createNode(this,n);
+ this.warn("This node has been deprecated and will be deleted in a future release. Please update your flow to use the 'xml' node.");
+ this.useEyes = n.useEyes||false;
+ var node = this;
+ this.on("input", function(msg) {
+ try {
+ parseString(msg.payload, {strict:true,async:true}, function (err, result) {
+ //parseString(msg.payload, {strict:false,async:true}, function (err, result) {
+ if (err) { node.error(err); }
+ else {
+ msg.payload = result;
+ node.send(msg);
+ if (node.useEyes == true) {
+ node.log("\n"+util.inspect(msg, {colors:useColors, depth:10}));
+ }
+ }
+ });
+ }
+ catch(e) { util.log("[73-parsexml.js] "+e); }
+ });
+ }
+ RED.nodes.registerType("xml2js",Xml2jsNode);
+}
diff --git a/dgbuilder/core_nodes/deprecated/74-js2xml.html b/dgbuilder/core_nodes/deprecated/74-js2xml.html
new file mode 100644
index 0000000..f614579
--- /dev/null
+++ b/dgbuilder/core_nodes/deprecated/74-js2xml.html
@@ -0,0 +1,51 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="json2xml">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-list"></i> XML Root</label>
+ <input type="text" id="node-input-root" placeholder="object"></input>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name"></input>
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="json2xml">
+ <p>A function that parses the <b>msg.payload</b> using the js2xmlparser library. Places the result back in <b>msg.payload</b>.</p>
+ <p>See the <a href="https://github.com/michaelkourlas/node-js2xmlparser" target="_new">js2xmlparser docs</a> for more information.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('json2xml',{
+ category: 'deprecated',
+ color:"#E6E0F8",
+ defaults: {
+ name: {value:""},
+ root: {value:"object"},
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name||"json2xml";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/deprecated/74-js2xml.js b/dgbuilder/core_nodes/deprecated/74-js2xml.js
new file mode 100644
index 0000000..164bafa
--- /dev/null
+++ b/dgbuilder/core_nodes/deprecated/74-js2xml.js
@@ -0,0 +1,39 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var js2xmlparser = require("js2xmlparser");
+
+ function Js2XmlNode(n) {
+ RED.nodes.createNode(this,n);
+ this.warn("This node has been deprecated and will be deleted in a future release. Please update your flow to use the 'xml' node.");
+ this.root = n.root;
+ var node = this;
+
+ this.on("input", function(msg) {
+ try {
+ var root = node.root || typeof msg.payload;
+ if (typeof msg.payload !== "object") { msg.payload = '"'+msg.payload+'"'; }
+ console.log(root, typeof msg.payload,msg.payload);
+ msg.payload = js2xmlparser(root, msg.payload);
+ node.send(msg);
+ }
+ catch(e) { console.log(e); }
+ });
+ }
+ RED.nodes.registerType("json2xml",Js2XmlNode);
+}
diff --git a/dgbuilder/core_nodes/deprecated/90-httpget.html b/dgbuilder/core_nodes/deprecated/90-httpget.html
new file mode 100644
index 0000000..b1f2e08
--- /dev/null
+++ b/dgbuilder/core_nodes/deprecated/90-httpget.html
@@ -0,0 +1,61 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="httpget">
+ <div class="form-tips"><b>Deprecated</b>: please use the <i>http request</i> node.</div>
+ <br>
+ <div class="form-row">
+ <label for="node-input-baseurl"><i class="fa fa-tasks"></i> Base URL</label>
+ <input type="text" id="node-input-baseurl" placeholder="http(s)://url">
+ </div>
+ <div class="form-row">
+ <label for="node-input-append"><i class="fa fa-tasks"></i> Append</label>
+ <input type="text" id="node-input-append" placeholder="">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips">The <b>Base URL</b> gets prepended to whatever payload is passed in. Leave blank if you pass in a full url.<br/>The append gets added to the end after any payload.<br/>The output Topic is the same as the input Topic.</div>
+</script>
+
+<script type="text/x-red" data-help-name="httpget">
+ <p>Performs an HTTP or HTTPS GET and returns the fetched page.</p>
+ <p>The return code is placed in <b>msg.rc</b>, and the full text of the result is in <b>msg.payload</b>.</p>
+ <p>The <b>msg.payload</b> is added to the base url, and then the optional append is added after.</p>
+ <p>This is mostly suitable for small pages as large results will need a lot of parsing....</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('httpget',{
+ category: 'deprecated',
+ color:"rgb(231, 231, 174)",
+ defaults: {
+ name: {value:""},
+ baseurl: {value:""},
+ append: {value:""}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "white-globe.png",
+ label: function() {
+ return this.name||this.baseurl;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/deprecated/90-httpget.js b/dgbuilder/core_nodes/deprecated/90-httpget.js
new file mode 100644
index 0000000..63e16b9
--- /dev/null
+++ b/dgbuilder/core_nodes/deprecated/90-httpget.js
@@ -0,0 +1,53 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+var RED = require(process.env.NODE_RED_HOME+"/red/red");
+
+function HttpGet(n) {
+ RED.nodes.createNode(this,n);
+ this.warn("This node has been deprecated and will be deleted in a future release. Please update your flow to use the 'http request' node.");
+ this.baseurl = n.baseurl || "";
+ this.append = n.append || "";
+ var node = this;
+ if (this.baseurl.substring(0,5) === "https") { var http = require("https"); }
+ else { var http = require("http"); }
+ this.on("input", function(msg) {
+ msg._payload = msg.payload;
+ //util.log("[httpget] "+this.baseurl+msg.payload+this.append);
+ http.get(this.baseurl+msg.payload+this.append, function(res) {
+ node.log("Http response: " + res.statusCode);
+ msg.rc = res.statusCode;
+ msg.payload = "";
+ if ((msg.rc != 200) && (msg.rc != 404)) {
+ node.send(msg);
+ }
+ res.setEncoding('utf8');
+ res.on('data', function(chunk) {
+ msg.payload += chunk;
+ });
+ res.on('end', function() {
+ node.send(msg);
+ });
+ }).on('error', function(e) {
+ //node.error(e);
+ msg.rc = 503;
+ msg.payload = e;
+ node.send(msg);
+ });
+ });
+}
+
+RED.nodes.registerType("httpget",HttpGet);
diff --git a/dgbuilder/core_nodes/hardware/35-arduino.html b/dgbuilder/core_nodes/hardware/35-arduino.html
new file mode 100644
index 0000000..17f0289
--- /dev/null
+++ b/dgbuilder/core_nodes/hardware/35-arduino.html
@@ -0,0 +1,171 @@
+<!--
+ Copyright 2013,2014 IBM Corp.
+
+ 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.
+-->
+<script type="text/x-red" data-template-name="arduino in">
+ <div class="form-row">
+ <label for="node-input-arduino"><i class="fa fa-tasks"></i> Arduino</label>
+ <input type="text" id="node-input-arduino">
+ </div>
+ <div class="form-row">
+ <label for="node-input-pin"><i class="fa fa-circle"></i> Pin</label>
+ <input type="text" id="node-input-pin" placeholder="2">
+ </div>
+ <div class="form-row">
+ <label for="node-input-state"><i class="fa fa-wrench"></i> Type</label>
+ <select type="text" id="node-input-state" style="width: 150px;">
+ <option value="INPUT">Digital pin</option>
+ <option value="ANALOG">Analogue pin</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips"><b>Note:</b> You cannot use the same pin for both output and input.</div>
+</script>
+
+<script type="text/x-red" data-help-name="arduino in">
+ <p>Arduino input node. Connects to local Arduino and monitors the selected pin for changes. Uses <a href="http://firmata.org/" target="_new"><i>Firmata</i>.</a></p>
+ <p>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p>
+ <p>You can select either Digital or Analogue input. Outputs the value read as <b>msg.payload</b> and the pin number as <b>msg.topic</b>.</p>
+ <p>It only outputs on a change of value - fine for digital inputs, but you can get a lot of data from analogue pins which you must then handle.</p>
+ <p>You can set the sample rate in ms from 20 to 65535.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('arduino in',{
+ category: 'Arduino',
+ color:"#3fadb5",
+ defaults: {
+ name: {value:""},
+ pin: {value:"",required:true},
+ state: {value:"INPUT",required:true},
+ arduino: {type:"arduino-board"}
+ },
+ inputs:0,
+ outputs:1,
+ icon: "arduino.png",
+ label: function() {
+ var a = "";
+ if (this.state == "ANALOG") a = "A";
+ return this.name||"Pin: "+a+this.pin;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
+
+<script type="text/x-red" data-template-name="arduino out">
+ <div class="form-row">
+ <label for="node-input-arduino"><i class="fa fa-tasks"></i> Arduino</label>
+ <input type="text" id="node-input-arduino">
+ </div>
+ <div class="form-row">
+ <label for="node-input-pin"><i class="fa fa-circle"></i> Pin</label>
+ <input type="text" id="node-input-pin" placeholder="13">
+ </div>
+ <div class="form-row">
+ <label for="node-input-state"><i class="fa fa-wrench"></i> Type</label>
+ <select type="text" id="node-input-state" style="width: 200px;">
+ <option value="OUTPUT">Digital (0/1)</option>
+ <option value="PWM">Analogue (0-255)</option>
+ <option value="SERVO">Servo (0-180)</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips"><b>Note:</b> You cannot use the same pin for both output and input.</div>
+</script>
+
+<script type="text/x-red" data-help-name="arduino out">
+ <p>Arduino output node. Connects to local Arduino and writes to the selected digital pin. Uses <a href="http://firmata.org/" target="_new"><i>Firmata</i>.</a></p>
+ <p>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p>
+ <p>You can select Digital, Analogue (PWM) or Servo type outputs. Expects a numeric value in <b>msg.payload</b>. The pin number is set in the properties panel.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('arduino out',{
+ category: 'Arduino',
+ color:"#3fadb5",
+ defaults: {
+ name: {value:""},
+ pin: {value:"",required:true},
+ state: {value:"",required:true},
+ arduino: {type:"arduino-board"}
+ },
+ inputs:1,
+ outputs:0,
+ icon: "arduino.png",
+ align: "right",
+ label: function() {
+ return this.name||"Pin: "+this.pin;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
+
+
+<script type="text/x-red" data-template-name="arduino-board">
+ <div class="form-row">
+ <label for="node-config-input-device"><i class="fa fa-random"></i> Port</label>
+ <input type="text" id="node-config-input-device" style="width:60%;" placeholder="e.g. /dev/ttyUSB0 COM1"/>
+ <a id="node-config-lookup-serial" class="btn"><i id="node-config-lookup-serial-icon" class="fa fa-search"></i></a>
+ </div>
+ <div class="form-tips"><b>Tip:</b> Use search to try to auto-detect serial port.</div>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('arduino-board',{
+ category: 'config',
+ defaults: {
+ device: {value:"",required:true}
+ },
+ label: function() {
+ return this.device||"arduino";
+ },
+ oneditprepare: function() {
+ try {
+ $("#node-config-input-device").autocomplete( "destroy" );
+ } catch(err) { }
+ $("#node-config-lookup-serial").click(function() {
+ $("#node-config-lookup-serial-icon").removeClass('fa-search');
+ $("#node-config-lookup-serial-icon").addClass('spinner');
+ $("#node-config-lookup-serial").addClass('disabled');
+
+ $.getJSON('arduinoports',function(data) {
+ $("#node-config-lookup-serial-icon").addClass('fa-search');
+ $("#node-config-lookup-serial-icon").removeClass('spinner');
+ $("#node-config-lookup-serial").removeClass('disabled');
+ var ports = [];
+ $.each(data, function(i, port){
+ ports.push(port);
+ });
+ $("#node-config-input-device").autocomplete({
+ source:ports,
+ minLength:0,
+ close: function( event, ui ) {
+ $("#node-config-input-device").autocomplete( "destroy" );
+ }
+ }).autocomplete("search","");
+ });
+ });
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/hardware/35-arduino.js b/dgbuilder/core_nodes/hardware/35-arduino.js
new file mode 100644
index 0000000..795e990
--- /dev/null
+++ b/dgbuilder/core_nodes/hardware/35-arduino.js
@@ -0,0 +1,160 @@
+/**
+ * Copyright 2013,2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var ArduinoFirmata = require('arduino-firmata');
+ var fs = require('fs');
+ var plat = require('os').platform();
+ var portlist = ArduinoFirmata.list(function (err, ports) {
+ portlist = ports;
+ });
+
+ // The Board Definition - this opens (and closes) the connection
+ function ArduinoNode(n) {
+ RED.nodes.createNode(this,n);
+ this.device = n.device || null;
+ this.repeat = n.repeat||25;
+ //node.log("opening connection "+this.device);
+ var node = this;
+ node.board = new ArduinoFirmata();
+ if (portlist.indexOf(node.device) === -1) {
+ node.warn("Device "+node.device+" not found");
+ }
+ else {
+ node.board.connect(node.device);
+ }
+
+ node.board.on('boardReady', function(){
+ node.log("version "+node.board.boardVersion);
+ });
+
+ node.on('close', function() {
+ if (node.board) {
+ try {
+ node.board.close(function() {
+ node.log("port closed");
+ });
+ } catch(e) { }
+ }
+ });
+ }
+ RED.nodes.registerType("arduino-board",ArduinoNode);
+
+
+ // The Input Node
+ function DuinoNodeIn(n) {
+ RED.nodes.createNode(this,n);
+ this.buttonState = -1;
+ this.pin = n.pin;
+ this.state = n.state;
+ this.arduino = n.arduino;
+ this.serverConfig = RED.nodes.getNode(this.arduino);
+ if (typeof this.serverConfig === "object") {
+ this.board = this.serverConfig.board;
+ //this.repeat = this.serverConfig.repeat;
+ var node = this;
+ node.status({fill:"red",shape:"ring",text:"connecting"});
+
+ node.board.on('connect', function() {
+ node.status({fill:"green",shape:"dot",text:"connected"});
+ //console.log("i",node.state,node.pin);
+ if (node.state == "ANALOG") {
+ node.board.on('analogChange', function(e) {
+ if (e.pin == node.pin) {
+ var msg = {payload:e.value, topic:"A"+e.pin};
+ node.send(msg);
+ }
+ });
+
+ }
+ else {
+ node.board.pinMode(node.pin, ArduinoFirmata.INPUT);
+ node.board.on('digitalChange', function(e) {
+ if (e.pin == node.pin) {
+ var msg = {payload:e.value, topic:e.pin};
+ node.send(msg);
+ }
+ });
+ }
+ });
+ }
+ else {
+ util.log("[Firmata-arduino] port not configured");
+ }
+ }
+ RED.nodes.registerType("arduino in",DuinoNodeIn);
+
+
+ // The Output Node
+ function DuinoNodeOut(n) {
+ RED.nodes.createNode(this,n);
+ this.buttonState = -1;
+ this.pin = n.pin;
+ this.state = n.state;
+ this.arduino = n.arduino;
+ this.serverConfig = RED.nodes.getNode(this.arduino);
+ if (typeof this.serverConfig === "object") {
+ this.board = this.serverConfig.board;
+ var node = this;
+ node.status({fill:"red",shape:"ring",text:"connecting"});
+
+ node.board.on('connect', function() {
+ node.status({fill:"green",shape:"dot",text:"connected"});
+ //console.log("o",node.state,node.pin);
+ node.board.pinMode(node.pin, node.state);
+ node.on("input", function(msg) {
+ if (node.state == "OUTPUT") {
+ if ((msg.payload == true)||(msg.payload == 1)||(msg.payload.toString().toLowerCase() == "on")) {
+ node.board.digitalWrite(node.pin, true);
+ }
+ if ((msg.payload == false)||(msg.payload == 0)||(msg.payload.toString().toLowerCase() == "off")) {
+ node.board.digitalWrite(node.pin, false);
+ }
+ }
+ if (node.state == "PWM") {
+ msg.payload = msg.payload * 1;
+ if ((msg.payload >= 0) && (msg.payload <= 255)) {
+ //console.log(msg.payload, node.pin);
+ node.board.servoWrite(node.pin, msg.payload);
+ }
+ }
+ if (node.state == "SERVO") {
+ msg.payload = msg.payload * 1;
+ if ((msg.payload >= 0) && (msg.payload <= 180)) {
+ //console.log(msg.payload, node.pin);
+ node.board.servoWrite(node.pin, msg.payload);
+ }
+ }
+ });
+ });
+ }
+ else {
+ util.log("[Firmata-arduino] port not configured");
+ }
+ }
+ RED.nodes.registerType("arduino out",DuinoNodeOut);
+
+ RED.httpAdmin.get("/arduinoports",function(req,res) {
+ ArduinoFirmata.list(function (err, ports) {
+ //console.log(JSON.stringify(ports));
+ res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.write(JSON.stringify(ports));
+ res.end();
+ });
+ });
+}
diff --git a/dgbuilder/core_nodes/hardware/36-rpi-gpio.html b/dgbuilder/core_nodes/hardware/36-rpi-gpio.html
new file mode 100644
index 0000000..9e705c2
--- /dev/null
+++ b/dgbuilder/core_nodes/hardware/36-rpi-gpio.html
@@ -0,0 +1,182 @@
+<!--
+ Copyright 2013,2014 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="rpi-gpio in">
+ <div class="form-row">
+ <label for="node-input-pin"><i class="fa fa-circle"></i> GPIO Pin</label>
+ <select type="text" id="node-input-pin" style="width: 200px;">
+ <option value="-" disabled>select pin </option>
+ <option value="3">3 - SDA1 </option>
+ <option value="5">5 - SCL1 </option>
+ <option value="7">7 - GPIO7</option>
+ <option value="8">8 - TxD </option>
+ <option value="10">10 - RxD </option>
+ <option value="11">11 - GPIO0</option>
+ <option value="12">12 - GPIO1</option>
+ <option value="13">13 - GPIO2</option>
+ <option value="15">15 - GPIO3</option>
+ <option value="16">16 - GPIO4</option>
+ <option value="18">18 - GPIO5</option>
+ <option value="19">19 - MOSI </option>
+ <option value="21">21 - MISO </option>
+ <option value="22">22 - GPIO6</option>
+ <option value="23">23 - SCLK </option>
+ <option value="24">24 - CE0 </option>
+ <option value="26">26 - CE1 </option>
+ </select>
+ <span id="pitype"></span>
+ </div>
+ <div class="form-row">
+ <label for="node-input-intype"><i class="fa fa-long-arrow-up"></i> Resistor?</label>
+ <select type="text" id="node-input-intype" style="width: 150px;">
+ <option value="tri">none</option>
+ <option value="up">pullup</option>
+ <option value="down">pulldown</option>
+ <!--<option value="tri">tristate</option>-->
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips">Tip: Only Digital I/O is supported - input must be 0 or 1.</div>
+</script>
+
+<script type="text/x-red" data-help-name="rpi-gpio in">
+ <p>Raspberry Pi input node. Generates a <b>msg.payload</b> with either a 0 or 1 depending on the state of the input pin. Requires the gpio command to work.</p>
+ <p>You may also enable the input pullup resitor or the pulldown resistor.</p>
+ <p>The <b>msg.topic</b> is set to <i>pi/{the pin number}</i></p>
+ <p><b>Note:</b> we are using the actual physical pin numbers on connector P1 as they are easier to locate.</p>
+ <p><b>Note:</b> This node currently polls the pin every 250mS. This is not ideal as it loads the cpu, and will be rewritten shortly to try to use interrupts.</p>
+
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('rpi-gpio in',{
+ category: 'advanced-input',
+ color:"#c6dbef",
+ defaults: {
+ name: { value:"" },
+ intype: { value: "in" },
+ pin: { value:"",required:true,validate:RED.validators.number() },
+ },
+ inputs:0,
+ outputs:1,
+ icon: "rpi.png",
+ label: function() {
+ return this.name||"Pin: "+this.pin ;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ $.getJSON('rpi-gpio/'+this.id,function(data) {
+ $('#pitype').text(data.type);
+ if (data.type === "Model B+") {
+ $('#node-input-pin').append($("<option></option>").attr("value",27).text("27 - SDA0"));
+ $('#node-input-pin').append($("<option></option>").attr("value",28).text("28 - SCL0"));
+ $('#node-input-pin').append($("<option></option>").attr("value",29).text("29 - GPIO21"));
+ $('#node-input-pin').append($("<option></option>").attr("value",31).text("31 - GPIO22"));
+ $('#node-input-pin').append($("<option></option>").attr("value",32).text("32 - GPIO26"));
+ $('#node-input-pin').append($("<option></option>").attr("value",33).text("33 - GPIO23"));
+ $('#node-input-pin').append($("<option></option>").attr("value",35).text("35 - GPIO24"));
+ $('#node-input-pin').append($("<option></option>").attr("value",36).text("36 - GPIO27"));
+ $('#node-input-pin').append($("<option></option>").attr("value",37).text("37 - GPIO25"));
+ $('#node-input-pin').append($("<option></option>").attr("value",38).text("38 - GPIO28"));
+ $('#node-input-pin').append($("<option></option>").attr("value",40).text("40 - GPIO29"));
+ }
+ });
+ }
+ });
+</script>
+
+
+<script type="text/x-red" data-template-name="rpi-gpio out">
+ <div class="form-row">
+ <label for="node-input-pin"><i class="fa fa-circle"></i> GPIO Pin</label>
+ <select type="text" id="node-input-pin" style="width: 200px;">
+ <option value="-">select pin </option>
+ <option value="3">3 - SDA1 </option>
+ <option value="5">5 - SCL1 </option>
+ <option value="7">7 - GPIO7</option>
+ <option value="8">8 - TxD </option>
+ <option value="10">10 - RxD </option>
+ <option value="11">11 - GPIO0</option>
+ <option value="12">12 - GPIO1</option>
+ <option value="13">13 - GPIO2</option>
+ <option value="15">15 - GPIO3</option>
+ <option value="16">16 - GPIO4</option>
+ <option value="18">18 - GPIO5</option>
+ <option value="19">19 - MOSI </option>
+ <option value="21">21 - MISO </option>
+ <option value="22">22 - GPIO6</option>
+ <option value="23">23 - SCLK </option>
+ <option value="24">24 - CE0 </option>
+ <option value="26">26 - CE1 </option>
+ </select>
+ <span id="pitype"></span>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips">Tip: Only Digital I/O is supported - input must be 0 or 1.</div>
+</script>
+
+<script type="text/x-red" data-help-name="rpi-gpio out">
+ <p>Raspberry Pi output node. Expects a <b>msg.payload</b> with either a 0 or 1 (or true or false). Requires the gpio command to work.</p>
+ <p>Will set the selected physical pin high or low depending on the value passed in.</p>
+ <p><b>Note:</b> we are using the actual physical pin numbers on connector P1 as they are easier to locate.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('rpi-gpio out',{
+ category: 'advanced-output',
+ color:"#c6dbef",
+ defaults: {
+ name: { value:"" },
+ pin: { value:"",required:true,validate:RED.validators.number() },
+ },
+ inputs:1,
+ outputs:0,
+ icon: "rpi.png",
+ align: "right",
+ label: function() {
+ return this.name||"Pin: "+this.pin;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ $.getJSON('rpi-gpio/'+this.id,function(data) {
+ $('#pitype').text(data.type);
+ if (data.type === "Model B+") {
+ $('#node-input-pin').append($("<option></option>").attr("value",27).text("27 - SDA0"));
+ $('#node-input-pin').append($("<option></option>").attr("value",28).text("28 - SCL0"));
+ $('#node-input-pin').append($("<option></option>").attr("value",29).text("29 - GPIO21"));
+ $('#node-input-pin').append($("<option></option>").attr("value",31).text("31 - GPIO22"));
+ $('#node-input-pin').append($("<option></option>").attr("value",32).text("32 - GPIO26"));
+ $('#node-input-pin').append($("<option></option>").attr("value",33).text("33 - GPIO23"));
+ $('#node-input-pin').append($("<option></option>").attr("value",35).text("35 - GPIO24"));
+ $('#node-input-pin').append($("<option></option>").attr("value",36).text("36 - GPIO27"));
+ $('#node-input-pin').append($("<option></option>").attr("value",37).text("37 - GPIO25"));
+ $('#node-input-pin').append($("<option></option>").attr("value",38).text("38 - GPIO28"));
+ $('#node-input-pin').append($("<option></option>").attr("value",40).text("40 - GPIO29"));
+ }
+ });
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/hardware/36-rpi-gpio.js b/dgbuilder/core_nodes/hardware/36-rpi-gpio.js
new file mode 100644
index 0000000..93cbc4e
--- /dev/null
+++ b/dgbuilder/core_nodes/hardware/36-rpi-gpio.js
@@ -0,0 +1,185 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var exec = require('child_process').exec;
+ var fs = require('fs');
+
+ var gpioCommand = '/usr/local/bin/gpio';
+
+ if (!fs.existsSync("/dev/ttyAMA0")) { // unlikely if not on a Pi
+ throw "Info : Ignoring Raspberry Pi specific node.";
+ }
+
+ if (!fs.existsSync(gpioCommand)) { // gpio command not installed
+ throw "Info : Can't find Raspberry Pi wiringPi gpio command.";
+ }
+
+ // Map physical P1 pins to Gordon's Wiring-Pi Pins (as they should be V1/V2 tolerant)
+ var pintable = {
+ // Physical : WiringPi
+ "11":"0",
+ "12":"1",
+ "13":"2",
+ "15":"3",
+ "16":"4",
+ "18":"5",
+ "22":"6",
+ "7":"7",
+ "3":"8",
+ "5":"9",
+ "24":"10",
+ "26":"11",
+ "19":"12",
+ "21":"13",
+ "23":"14",
+ "8":"15",
+ "10":"16",
+ "27":"30",
+ "28":"31",
+ "29":"21",
+ "31":"22",
+ "32":"26",
+ "33":"23",
+ "35":"24",
+ "36":"27",
+ "37":"25",
+ "38":"28",
+ "40":"29"
+ }
+ var tablepin = {
+ // WiringPi : Physical
+ "0":"11",
+ "1":"12",
+ "2":"13",
+ "3":"15",
+ "4":"16",
+ "5":"18",
+ "6":"22",
+ "7":"7",
+ "8":"3",
+ "9":"5",
+ "10":"24",
+ "11":"26",
+ "12":"19",
+ "13":"21",
+ "14":"23",
+ "15":"8",
+ "16":"10",
+ "30":"27",
+ "31":"28",
+ "21":"29",
+ "22":"31",
+ "26":"32",
+ "23":"33",
+ "24":"35",
+ "27":"36",
+ "25":"37",
+ "28":"38",
+ "29":"40"
+ }
+
+ function GPIOInNode(n) {
+ RED.nodes.createNode(this,n);
+ this.buttonState = -1;
+ this.pin = pintable[n.pin];
+ this.intype = n.intype;
+ var node = this;
+
+ if (node.pin !== undefined) {
+ exec(gpioCommand+" mode "+node.pin+" "+node.intype, function(err,stdout,stderr) {
+ if (err) { node.error(err); }
+ else {
+ node._interval = setInterval( function() {
+ exec(gpioCommand+" read "+node.pin, function(err,stdout,stderr) {
+ if (err) { node.error(err); }
+ else {
+ if (node.buttonState !== Number(stdout)) {
+ var previousState = node.buttonState;
+ node.buttonState = Number(stdout);
+ if (previousState !== -1) {
+ var msg = {topic:"pi/"+tablepin[node.pin], payload:node.buttonState};
+ node.send(msg);
+ }
+ }
+ }
+ });
+ }, 250);
+ }
+ });
+ }
+ else {
+ node.error("Invalid GPIO pin: "+node.pin);
+ }
+
+ node.on("close", function() {
+ clearInterval(node._interval);
+ });
+ }
+
+ function GPIOOutNode(n) {
+ RED.nodes.createNode(this,n);
+ this.pin = pintable[n.pin];
+ var node = this;
+
+ if (node.pin !== undefined) {
+ process.nextTick(function() {
+ exec(gpioCommand+" mode "+node.pin+" out", function(err,stdout,stderr) {
+ if (err) { node.error(err); }
+ else {
+ node.on("input", function(msg) {
+ if (msg.payload === "true") { msg.payload = true; }
+ if (msg.payload === "false") { msg.payload = false; }
+ var out = Number(msg.payload);
+ if ((out === 0)|(out === 1)) {
+ exec(gpioCommand+" write "+node.pin+" "+out, function(err,stdout,stderr) {
+ if (err) { node.error(err); }
+ });
+ }
+ else { node.warn("Invalid input - not 0 or 1"); }
+ });
+ }
+ });
+ });
+ }
+ else {
+ node.error("Invalid GPIO pin: "+node.pin);
+ }
+
+ node.on("close", function() {
+ exec(gpioCommand+" mode "+node.pin+" in");
+ });
+ }
+
+ var pitype = { type:"" };
+ exec(gpioCommand+" -v | grep Type", function(err,stdout,stderr) {
+ if (err) {
+ util.log('[36-rpi-gpio.js] Error: "'+gpioCommand+' -v" command failed for some reason.');
+ }
+ else {
+ pitype = { type:(stdout.split(","))[0].split(": ")[1], rev:(stdout.split(","))[1].split(": ")[1] };
+ }
+ });
+
+ RED.nodes.registerType("rpi-gpio in",GPIOInNode);
+ RED.nodes.registerType("rpi-gpio out",GPIOOutNode);
+
+ RED.httpAdmin.get('/rpi-gpio/:id',function(req,res) {
+ res.send( JSON.stringify(pitype) );
+ });
+}
diff --git a/dgbuilder/core_nodes/io/10-mqtt.html b/dgbuilder/core_nodes/io/10-mqtt.html
new file mode 100644
index 0000000..2ff5eb2
--- /dev/null
+++ b/dgbuilder/core_nodes/io/10-mqtt.html
@@ -0,0 +1,157 @@
+<!--
+ Copyright 2013,2014 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="mqtt in">
+ <div class="form-row">
+ <label for="node-input-broker"><i class="fa fa-globe"></i> Broker</label>
+ <input type="text" id="node-input-broker">
+ </div>
+ <div class="form-row">
+ <label for="node-input-topic"><i class="fa fa-tasks"></i> Topic</label>
+ <input type="text" id="node-input-topic" placeholder="Topic">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="mqtt in">
+ <p>MQTT input node. Connects to a broker and subscribes to the specified topic. The topic may contain MQTT wildcards.</p>
+ <p>Outputs an object called <b>msg</b> containing <b>msg.topic, msg.payload, msg.qos</b> and <b>msg.retain</b>.</p>
+ <p><b>msg.payload</b> is a String.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('mqtt in',{
+ category: 'input',
+ defaults: {
+ name: {value:""},
+ topic: {value:"",required:true},
+ broker: {type:"mqtt-broker", required:true}
+ },
+ color:"#d8bfd8",
+ inputs:0,
+ outputs:1,
+ icon: "bridge.png",
+ label: function() {
+ return this.name||this.topic||"mqtt";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
+
+<script type="text/x-red" data-template-name="mqtt out">
+ <div class="form-row">
+ <label for="node-input-broker"><i class="fa fa-globe"></i> Broker</label>
+ <input type="text" id="node-input-broker">
+ </div>
+ <div class="form-row">
+ <label for="node-input-topic"><i class="fa fa-tasks"></i> Topic</label>
+ <input type="text" id="node-input-topic" placeholder="Topic">
+ </div>
+ <div class="form-row">
+ <label for="node-input-qos"><i class="fa fa-empire"></i> QoS</label>
+ <select id="node-input-qos" style="width:125px !important">
+ <option value=""></option>
+ <option value="0">0</option>
+ <option value="1">1</option>
+ <option value="2">2</option>
+ </select>
+ <i class="fa fa-history"></i> Retain <select id="node-input-retain" style="width:125px !important">
+ <option value=""></option>
+ <option value="false">false</option>
+ <option value="true">true</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips">Tip: Leave topic, qos or retain blank if you want to set them via msg properties.</div>
+</script>
+
+<script type="text/x-red" data-help-name="mqtt out">
+ <p>Connects to a MQTT broker and publishes <b>msg.payload</b> either to the <b>msg.topic</b> or to the topic specified in the edit window. The value in the edit window has precedence.</p>
+ <p>Likewise QoS and/or retain values in the edit panel will overwrite any <b>msg.qos</b> and <b>msg.retain</b> properties. If nothing is set they default to <i>0</i> and <i>false</i> respectively.</p>
+ <p>If <b>msg.payload</b> contains an object it will be stringified before being sent.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('mqtt out',{
+ category: 'output',
+ defaults: {
+ name: {value:""},
+ topic: {value:""},
+ qos: {value:""},
+ retain: {value:""},
+ broker: {type:"mqtt-broker", required:true}
+ },
+ color:"#d8bfd8",
+ inputs:1,
+ outputs:0,
+ icon: "bridge.png",
+ align: "right",
+ label: function() {
+ return this.name||this.topic||"mqtt";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
+
+<script type="text/x-red" data-template-name="mqtt-broker">
+ <div class="form-row node-input-broker">
+ <label for="node-config-input-broker"><i class="fa fa-globe"></i> Broker</label>
+ <input class="input-append-left" type="text" id="node-config-input-broker" placeholder="localhost" style="width: 40%;" >
+ <label for="node-config-input-port" style="margin-left: 10px; width: 35px; "> Port</label>
+ <input type="text" id="node-config-input-port" placeholder="Port" style="width:45px">
+ </div>
+ <div class="form-row">
+ <label for="node-config-input-clientid"><i class="fa fa-tag"></i> Client ID</label>
+ <input type="text" id="node-config-input-clientid" placeholder="Leave blank for auto generated">
+ </div>
+ <div class="form-row">
+ <label for="node-config-input-user"><i class="fa fa-user"></i> Username</label>
+ <input type="text" id="node-config-input-user">
+ </div>
+ <div class="form-row">
+ <label for="node-config-input-password"><i class="fa fa-lock"></i> Password</label>
+ <input type="password" id="node-config-input-password">
+ </div>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('mqtt-broker',{
+ category: 'config',
+ defaults: {
+ broker: {value:"",required:true},
+ port: {value:1883,required:true,validate:RED.validators.number()},
+ clientid: { value:"" }
+ },
+ credentials: {
+ user: {type:"text"},
+ password: {type: "password"}
+ },
+ label: function() {
+ if (this.broker == "") { this.broker = "localhost"; }
+ return (this.clientid?this.clientid+"@":"")+this.broker+":"+this.port;
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/io/10-mqtt.js b/dgbuilder/core_nodes/io/10-mqtt.js
new file mode 100644
index 0000000..c8bc490
--- /dev/null
+++ b/dgbuilder/core_nodes/io/10-mqtt.js
@@ -0,0 +1,119 @@
+/**
+ * Copyright 2013,2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var connectionPool = require("./lib/mqttConnectionPool");
+
+ function MQTTBrokerNode(n) {
+ RED.nodes.createNode(this,n);
+ this.broker = n.broker;
+ this.port = n.port;
+ this.clientid = n.clientid;
+ if (this.credentials) {
+ this.username = this.credentials.user;
+ this.password = this.credentials.password;
+ }
+ }
+ RED.nodes.registerType("mqtt-broker",MQTTBrokerNode,{
+ credentials: {
+ user: {type:"text"},
+ password: {type: "password"}
+ }
+ });
+
+ function MQTTInNode(n) {
+ RED.nodes.createNode(this,n);
+ this.topic = n.topic;
+ this.broker = n.broker;
+ this.brokerConfig = RED.nodes.getNode(this.broker);
+ if (this.brokerConfig) {
+ this.status({fill:"red",shape:"ring",text:"disconnected"});
+ this.client = connectionPool.get(this.brokerConfig.broker,this.brokerConfig.port,this.brokerConfig.clientid,this.brokerConfig.username,this.brokerConfig.password);
+ var node = this;
+ this.client.subscribe(this.topic,2,function(topic,payload,qos,retain) {
+ var msg = {topic:topic,payload:payload,qos:qos,retain:retain};
+ if ((node.brokerConfig.broker == "localhost")||(node.brokerConfig.broker == "127.0.0.1")) {
+ msg._topic = topic;
+ }
+ node.send(msg);
+ });
+ this.client.on("connectionlost",function() {
+ node.status({fill:"red",shape:"ring",text:"disconnected"});
+ });
+ this.client.on("connect",function() {
+ node.status({fill:"green",shape:"dot",text:"connected"});
+ });
+ this.client.connect();
+ } else {
+ this.error("missing broker configuration");
+ }
+ this.on('close', function() {
+ if (this.client) {
+ this.client.disconnect();
+ }
+ });
+ }
+ RED.nodes.registerType("mqtt in",MQTTInNode);
+
+ function MQTTOutNode(n) {
+ RED.nodes.createNode(this,n);
+ this.topic = n.topic;
+ this.qos = n.qos || null;
+ this.retain = n.retain;
+ this.broker = n.broker;
+ this.brokerConfig = RED.nodes.getNode(this.broker);
+
+ if (this.brokerConfig) {
+ this.status({fill:"red",shape:"ring",text:"disconnected"},true);
+ this.client = connectionPool.get(this.brokerConfig.broker,this.brokerConfig.port,this.brokerConfig.clientid,this.brokerConfig.username,this.brokerConfig.password);
+ var node = this;
+ this.on("input",function(msg) {
+ if (msg.qos) {
+ msg.qos = parseInt(msg.qos);
+ if ((msg.qos !== 0) && (msg.qos !== 1) && (msg.qos !== 2)) {
+ msg.qos = null;
+ }
+ }
+ msg.qos = Number(node.qos || msg.qos || 0);
+ msg.retain = node.retain || msg.retain || false;
+ msg.retain = ((msg.retain === true) || (msg.retain === "true")) || false;
+ if (node.topic) {
+ msg.topic = node.topic;
+ }
+ if ((msg.hasOwnProperty("topic")) && (typeof msg.topic === "string") && (msg.topic !== "")) { // topic must exist
+ this.client.publish(msg); // send the message
+ }
+ else { node.warn("Invalid topic specified"); }
+ });
+ this.client.on("connectionlost",function() {
+ node.status({fill:"red",shape:"ring",text:"disconnected"});
+ });
+ this.client.on("connect",function() {
+ node.status({fill:"green",shape:"dot",text:"connected"});
+ });
+ this.client.connect();
+ } else {
+ this.error("missing broker configuration");
+ }
+ this.on('close', function() {
+ if (this.client) {
+ this.client.disconnect();
+ }
+ });
+ }
+ RED.nodes.registerType("mqtt out",MQTTOutNode);
+}
diff --git a/dgbuilder/core_nodes/io/21-httpin.html b/dgbuilder/core_nodes/io/21-httpin.html
new file mode 100644
index 0000000..059b859
--- /dev/null
+++ b/dgbuilder/core_nodes/io/21-httpin.html
@@ -0,0 +1,254 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="http in">
+ <div class="form-row">
+ <label for="node-input-method"><i class="fa fa-tasks"></i> Method</label>
+ <select type="text" id="node-input-method" style="width:72%;">
+ <option value="get">GET</option>
+ <option value="post">POST</option>
+ <option value="put">PUT</option>
+ <option value="delete">DELETE</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-url"><i class="fa fa-globe"></i> url</label>
+ <input type="text" id="node-input-url" placeholder="/url">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div id="node-input-tip" class="form-tips">The url will be relative to <code><span id="node-input-path"></span></code>.</div>
+</script>
+
+<script type="text/x-red" data-help-name="http in">
+ <p>Provides an input node for http requests, allowing the creation of simple web services.</p>
+ <p>The resulting message has the following properties:
+ <ul>
+ <li>msg.req : <a href="http://expressjs.com/api.html#req">http request</a></li>
+ <li>msg.res : <a href="http://expressjs.com/api.html#res">http response</a></li>
+ </ul>
+ </p>
+ <p>For POST/PUT requests, the body is available under <code>msg.req.body</code>. This
+ uses the <a href="http://expressjs.com/api.html#bodyParser">Express bodyParser middleware</a> to parse the content to a JSON object.
+ </p>
+ <p>
+ By default, this expects the body of the request to be url encoded:
+ <pre>foo=bar&this=that</pre>
+ </p>
+ <p>
+ To send JSON encoded data to the node, the content-type header of the request must be set to
+ <code>application/json</code>.
+ </p>
+ <p>
+ <b>Note: </b>This node does not send any response to the http request. This should be done with
+ a subsequent HTTP Response node, or Function node.
+ In the case of a Function node, the <a href="http://expressjs.com/api.html#res">Express response documentation</a>
+ describes how this should be done. For example:
+ <pre>msg.res.send(200, 'Thanks for the request ');<br/>return msg;</pre>
+ </p>
+
+</script>
+
+<script type="text/x-red" data-template-name="http response">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips">The messages sent to this node <b>must</b> originate from an <i>http input</i> node</div>
+</script>
+
+<script type="text/x-red" data-help-name="http response">
+ <p>Sends responses back to http requests received from an HTTP Input node.</p>
+ <p>The response can be customised using the following message properties:</p>
+ <ul>
+ <li><code>payload</code> is sent as the body of the response</li>
+ <li><code>statusCode</code>, if set, is used as the response status code (default: 200)</li>
+ <li><code>headers</code>, if set, should be an object containing field/value
+ pairs to be added as response headers.</li>
+ </ul>
+</script>
+
+<script type="text/x-red" data-template-name="http request">
+ <div class="form-row">
+ <label for="node-input-method"><i class="fa fa-tasks"></i> Method</label>
+ <select type="text" id="node-input-method" style="width:72%;">
+ <option value="GET">GET</option>
+ <option value="POST">POST</option>
+ <option value="PUT">PUT</option>
+ <option value="DELETE">DELETE</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-url"><i class="fa fa-globe"></i> URL</label>
+ <input type="text" id="node-input-url" placeholder="http://">
+ </div>
+ <div class="form-row">
+ <label> </label>
+ <input type="checkbox" id="node-input-useAuth" style="display: inline-block; width: auto; vertical-align: top;">
+ <label for="node-input-useAuth" style="width: 70%;">Use basic authentication?</label>
+ </div>
+ <div class="form-row node-input-useAuth-row">
+ <label for="node-input-user"><i class="fa fa-user"></i> Username</label>
+ <input type="text" id="node-input-user">
+ </div>
+ <div class="form-row node-input-useAuth-row">
+ <label for="node-input-password"><i class="fa fa-lock"></i> Password</label>
+ <input type="password" id="node-input-password">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="http request">
+ <p>Provides a node for making http requests.</p>
+ <p>The URL and HTTP method can be configured in the node, but also
+ overridden by the incoming message:
+ <ul>
+ <li><code>url</code>, if set, is used as the url of the request. Must start with http: or https:</li>
+ <li><code>method</code>, if set, is used as the HTTP method of the request.
+ Must be one of <code>GET</code>, <code>PUT</code>, <code>POST</code> or <code>DELETE</code> (default: GET)</li>
+ <li><code>headers</code>, if set, should be an object containing field/value
+ pairs to be added as request headers</li>
+ <li><code>payload</code> is sent as the body of the request</li>
+ </ul>
+ <p>When configured within the node, the URL property can contain <a href="http://mustache.github.io/mustache.5.html" target="_new">mustache-style</a> tags. These allow the
+ url to be constructed using values of the incoming message. For example, if the url is set to
+ <code>example.com/{{topic}}</code>, it will have the value of <code>msg.topic</code> automatically inserted.</p>
+ <p>
+ The output message contains the following properties:
+ <ul>
+ <li><code>payload</code> is the body of the response</li>
+ <li><code>statusCode</code> is the status code of the response, or the error code if the request could not be completed</li>
+ <li><code>headers</code> is an object containing the response headers</li>
+ </ul>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('http in',{
+ category: 'input',
+ color:"rgb(231, 231, 174)",
+ defaults: {
+ name: {value:""},
+ url: {value:"",required:true},
+ method: {value:"get",required:true}
+ },
+ inputs:0,
+ outputs:1,
+ icon: "white-globe.png",
+ label: function() {
+ if (this.name) {
+ return this.name;
+ } else if (this.url) {
+ var root = RED.settings.httpNodeRoot;
+ if (root.slice(-1) != "/") {
+ root = root+"/";
+ }
+ if (this.url.charAt(0) == "/") {
+ root += this.url.slice(1);
+ } else {
+ root += this.url;
+ }
+ return "["+this.method+"] "+root;
+ } else {
+ return "http";
+ }
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ var root = RED.settings.httpNodeRoot;
+ if (root.slice(-1) == "/") {
+ root = root.slice(0,-1);
+ }
+ if (root == "") {
+ $("#node-input-tip").hide();
+ } else {
+ $("#node-input-path").html(root);
+ $("#node-input-tip").show();
+ }
+ //document.getElementById("node-config-wsdocpath").innerHTML=
+ }
+
+ });
+
+ RED.nodes.registerType('http response',{
+ category: 'output',
+ color:"rgb(231, 231, 174)",
+ defaults: {
+ name: {value:""}
+ },
+ inputs:1,
+ outputs:0,
+ align: "right",
+ icon: "white-globe.png",
+ label: function() {
+ return this.name||"http";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+
+ RED.nodes.registerType('http request',{
+ category: 'function',
+ color:"rgb(231, 231, 174)",
+ defaults: {
+ name: {value:""},
+ method:{value:"GET"},
+ url:{value:""},
+ //user -> credentials
+ //pass -> credentials
+ },
+ credentials: {
+ user: {type:"text"},
+ password: {type: "password"}
+ },
+ inputs:1,
+ outputs:1,
+ align: "right",
+ icon: "white-globe.png",
+ label: function() {
+ return this.name||"http request";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ if (this.credentials.user || this.credentials.has_password) {
+ $('#node-input-useAuth').prop('checked', true);
+ $(".node-input-useAuth-row").show();
+ } else {
+ $('#node-input-useAuth').prop('checked', false);
+ $(".node-input-useAuth-row").hide();
+ }
+
+ $("#node-input-useAuth").change(function() {
+ if ($(this).is(":checked")) {
+ $(".node-input-useAuth-row").show();
+ } else {
+ $(".node-input-useAuth-row").hide();
+ $('#node-input-user').val('');
+ $('#node-input-password').val('');
+ }
+ });
+ },
+ });
+</script>
diff --git a/dgbuilder/core_nodes/io/21-httpin.js b/dgbuilder/core_nodes/io/21-httpin.js
new file mode 100644
index 0000000..877ccc0
--- /dev/null
+++ b/dgbuilder/core_nodes/io/21-httpin.js
@@ -0,0 +1,241 @@
+/**
+ * Copyright 2013,2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var http = require("follow-redirects").http;
+ var https = require("follow-redirects").https;
+ var urllib = require("url");
+ var express = require("express");
+ var getBody = require('raw-body');
+ var mustache = require("mustache");
+ var querystring = require("querystring");
+
+ var cors = require('cors');
+ var jsonParser = express.json();
+ var urlencParser = express.urlencoded();
+
+ function rawBodyParser(req, res, next) {
+ if (req._body) { return next(); }
+ req.body = "";
+ req._body = true;
+ getBody(req, {
+ limit: '1mb',
+ length: req.headers['content-length'],
+ encoding: 'utf8'
+ }, function (err, buf) {
+ if (err) { return next(err); }
+ req.body = buf;
+ next();
+ });
+ }
+
+
+ function HTTPIn(n) {
+ RED.nodes.createNode(this,n);
+ if (RED.settings.httpNodeRoot !== false) {
+
+ this.url = n.url;
+ this.method = n.method;
+
+ var node = this;
+
+ this.errorHandler = function(err,req,res,next) {
+ node.warn(err);
+ res.send(500);
+ };
+
+ this.callback = function(req,res) {
+ if (node.method == "post") {
+ node.send({req:req,res:res,payload:req.body});
+ } else if (node.method == "get") {
+ node.send({req:req,res:res,payload:req.query});
+ } else {
+ node.send({req:req,res:res});
+ }
+ }
+
+ var corsHandler = function(req,res,next) { next(); }
+
+ if (RED.settings.httpNodeCors) {
+ corsHandler = cors(RED.settings.httpNodeCors);
+ RED.httpNode.options(this.url,corsHandler);
+ }
+
+ if (this.method == "get") {
+ RED.httpNode.get(this.url,corsHandler,this.callback,this.errorHandler);
+ } else if (this.method == "post") {
+ RED.httpNode.post(this.url,corsHandler,jsonParser,urlencParser,rawBodyParser,this.callback,this.errorHandler);
+ } else if (this.method == "put") {
+ RED.httpNode.put(this.url,corsHandler,jsonParser,urlencParser,rawBodyParser,this.callback,this.errorHandler);
+ } else if (this.method == "delete") {
+ RED.httpNode.delete(this.url,corsHandler,this.callback,this.errorHandler);
+ }
+
+ this.on("close",function() {
+ var routes = RED.httpNode.routes[this.method];
+ for (var i = 0; i<routes.length; i++) {
+ if (routes[i].path == this.url) {
+ routes.splice(i,1);
+ //break;
+ }
+ }
+ if (RED.settings.httpNodeCors) {
+ var route = RED.httpNode.route['options'];
+ for (var j = 0; j<route.length; j++) {
+ if (route[j].path == this.url) {
+ route.splice(j,1);
+ //break;
+ }
+ }
+ }
+ });
+ } else {
+ this.warn("Cannot create http-in node when httpNodeRoot set to false");
+ }
+ }
+ RED.nodes.registerType("http in",HTTPIn);
+
+
+ function HTTPOut(n) {
+ RED.nodes.createNode(this,n);
+ var node = this;
+ this.on("input",function(msg) {
+ if (msg.res) {
+ if (msg.headers) {
+ msg.res.set(msg.headers);
+ }
+ var statusCode = msg.statusCode || 200;
+ if (typeof msg.payload == "object" && !Buffer.isBuffer(msg.payload)) {
+ msg.res.jsonp(statusCode,msg.payload);
+ } else {
+ if (msg.res.get('content-length') == null) {
+ var len;
+ if (msg.payload == null) {
+ len = 0;
+ } else if (typeof msg.payload == "number") {
+ len = Buffer.byteLength(""+msg.payload);
+ } else {
+ len = Buffer.byteLength(msg.payload);
+ }
+ msg.res.set('content-length', len);
+ }
+ msg.res.send(statusCode,msg.payload);
+ }
+ } else {
+ node.warn("No response object");
+ }
+ });
+ }
+ RED.nodes.registerType("http response",HTTPOut);
+
+ function HTTPRequest(n) {
+ RED.nodes.createNode(this,n);
+ var nodeUrl = n.url;
+ var isTemplatedUrl = (nodeUrl||"").indexOf("{{") != -1;
+ var nodeMethod = n.method || "GET";
+ var node = this;
+ this.on("input",function(msg) {
+ node.status({fill:"blue",shape:"dot",text:"requesting"});
+ var url;
+ if (msg.url) {
+ url = msg.url;
+ } else if (isTemplatedUrl) {
+ url = mustache.render(nodeUrl,msg);
+ } else {
+ url = nodeUrl;
+ }
+ // url must start http:// or https:// so assume http:// if not set
+ if (!((url.indexOf("http://")===0) || (url.indexOf("https://")===0))) {
+ url = "http://"+url;
+ }
+
+ var method = (msg.method||nodeMethod).toUpperCase();
+ //node.log(method+" : "+url);
+ var opts = urllib.parse(url);
+ opts.method = method;
+ opts.headers = {};
+ if (msg.headers) {
+ for (var v in msg.headers) {
+ if (msg.headers.hasOwnProperty(v)) {
+ var name = v.toLowerCase();
+ if (name !== "content-type" && name !== "content-length") {
+ // only normalise the known headers used later in this
+ // function. Otherwise leave them alone.
+ name = v;
+ }
+ opts.headers[name] = msg.headers[v];
+ }
+ }
+ }
+ if (this.credentials && this.credentials.user) {
+ opts.auth = this.credentials.user+":"+(this.credentials.password||"");
+ }
+ var payload = null;
+
+ if (msg.payload && (method == "POST" || method == "PUT") ) {
+ if (typeof msg.payload === "string" || Buffer.isBuffer(msg.payload)) {
+ payload = msg.payload;
+ } else if (typeof msg.payload == "number") {
+ payload = msg.payload+"";
+ } else {
+ if (opts.headers['content-type'] == 'application/x-www-form-urlencoded') {
+ payload = querystring.stringify(msg.payload);
+ } else {
+ payload = JSON.stringify(msg.payload);
+ if (opts.headers['content-type'] == null) {
+ opts.headers['content-type'] = "application/json";
+ }
+ }
+ }
+ if (opts.headers['content-length'] == null) {
+ opts.headers['content-length'] = Buffer.byteLength(payload);
+ }
+ }
+
+ var req = ((/^https/.test(url))?https:http).request(opts,function(res) {
+ res.setEncoding('utf8');
+ msg.statusCode = res.statusCode;
+ msg.headers = res.headers;
+ msg.payload = "";
+ res.on('data',function(chunk) {
+ msg.payload += chunk;
+ });
+ res.on('end',function() {
+ node.send(msg);
+ node.status({});
+ });
+ });
+ req.on('error',function(err) {
+ msg.payload = err.toString() + " : " + url;
+ msg.statusCode = err.code;
+ node.send(msg);
+ node.status({fill:"red",shape:"ring",text:err.code});
+ });
+ if (payload) {
+ req.write(payload);
+ }
+ req.end();
+ });
+ }
+
+ RED.nodes.registerType("http request",HTTPRequest,{
+ credentials: {
+ user: {type:"text"},
+ password: {type: "password"}
+ }
+ });
+}
diff --git a/dgbuilder/core_nodes/io/22-websocket.html b/dgbuilder/core_nodes/io/22-websocket.html
new file mode 100644
index 0000000..ff6ed74
--- /dev/null
+++ b/dgbuilder/core_nodes/io/22-websocket.html
@@ -0,0 +1,163 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<!-- WebSocket Input Node -->
+<script type="text/x-red" data-template-name="websocket in">
+ <div class="form-row">
+ <label for="node-input-server"><i class="fa fa-bookmark"></i> Path</label>
+ <input type="text" id="node-input-server">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="websocket in">
+ <p>WebSocket input node.</p>
+ <p>By default, the data received from the WebSocket will be in <b>msg.payload</b>.
+ The listener can be configured to expect a properly formed JSON string, in which
+ case it will parse the JSON and send on the resulting object as the entire message.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('websocket in',{
+ category: 'input',
+ defaults: {
+ name: {value:""},
+ server: {type:"websocket-listener"}
+ },
+ color:"rgb(215, 215, 160)",
+ inputs:0,
+ outputs:1,
+ icon: "white-globe.png",
+ label: function() {
+ var wsNode = RED.nodes.node(this.server);
+ return this.name||(wsNode?"[ws] "+wsNode.label():"websocket");
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
+
+<!-- WebSocket out Node -->
+<script type="text/x-red" data-template-name="websocket out">
+ <div class="form-row">
+ <label for="node-input-server"><i class="fa fa-bookmark"></i> Path</label>
+ <input type="text" id="node-input-server">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="websocket out">
+ <p>WebSocket out node.</p>
+ <p>By default, <b>msg.payload</b> will be sent over the WebSocket. The listener
+ can be configured to encode the entire message object as a JSON string and send that
+ over the WebSocket.</p>
+
+ <p>If the message arriving at this node started at a WebSocket In node, the message
+ will be sent back to the client that triggered the flow. Otherwise, the message
+ will be broadcast to all connected clients.</p>
+ <p>If you want to broadcast a message that started at a WebSocket In node, you
+ should delete the <b>msg._session</b> property within the flow</p>.
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('websocket out',{
+ category: 'output',
+ defaults: {
+ name: {value:""},
+ server: {type:"websocket-listener", required:true}
+ },
+ color:"rgb(215, 215, 160)",
+ inputs:1,
+ outputs:0,
+ icon: "white-globe.png",
+ align: "right",
+ label: function() {
+ var wsNode = RED.nodes.node(this.server);
+ return this.name||(wsNode?"[ws] "+wsNode.label():"websocket");
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
+
+<!-- WebSocket Server configuration node -->
+<script type="text/x-red" data-template-name="websocket-listener">
+ <div class="form-row">
+ <label for="node-config-input-path"><i class="fa fa-bookmark"></i> Path</label>
+ <input type="text" id="node-config-input-path" placeholder="/ws/example">
+ </div>
+ <div class="form-row">
+ <label for="node-config-input-wholemsg"> </label>
+ <select type="text" id="node-config-input-wholemsg" style="width: 70%;">
+ <option value="false">Send/Receive payload</option>
+ <option value="true">Send/Receive entire message</option>
+ </select>
+ </div>
+ <div class="form-tips">
+ Be default, <code>payload</code> will contain the data to be sent over, or received from a websocket.
+ The listener can be configured to send or receive the entire message object as a JSON formatted string.
+ <p id="node-config-ws-tip">This path will be relative to <code><span id="node-config-ws-path"></span></code>.</p>
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="websocket-listener">
+ <p>This configuration node creates a WebSocket Server using the specified path</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('websocket-listener',{
+ category: 'config',
+ defaults: {
+ path: {value:"",required:true,validate:RED.validators.regex(/^((?!\/debug\/ws).)*$/) },
+ wholemsg: {value:"false"}
+ },
+ inputs:0,
+ outputs:0,
+ label: function() {
+ var root = RED.settings.httpNodeRoot;
+ if (root.slice(-1) != "/") {
+ root = root+"/";
+ }
+ if (this.path.charAt(0) == "/") {
+ root += this.path.slice(1);
+ } else {
+ root += this.path;
+ }
+ return root;
+ },
+ oneditprepare: function() {
+ var root = RED.settings.httpNodeRoot;
+ if (root.slice(-1) == "/") {
+ root = root.slice(0,-1);
+ }
+ if (root == "") {
+ $("#node-config-ws-tip").hide();
+ } else {
+ $("#node-config-ws-path").html(root);
+ $("#node-config-ws-tip").show();
+ }
+ //document.getElementById("node-config-wsdocpath").innerHTML=
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/io/22-websocket.js b/dgbuilder/core_nodes/io/22-websocket.js
new file mode 100644
index 0000000..72eda50
--- /dev/null
+++ b/dgbuilder/core_nodes/io/22-websocket.js
@@ -0,0 +1,185 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var ws = require("ws"),
+ inspect = require("sys").inspect;
+
+ // A node red node that sets up a local websocket server
+ function WebSocketListenerNode(n) {
+ // Create a RED node
+ RED.nodes.createNode(this,n);
+
+ var node = this;
+
+ // Store local copies of the node configuration (as defined in the .html)
+ node.path = n.path;
+ node.wholemsg = (n.wholemsg === "true");
+
+ node._inputNodes = []; // collection of nodes that want to receive events
+
+ var path = RED.settings.httpNodeRoot || "/";
+ path = path + (path.slice(-1) == "/" ? "":"/") + (node.path.charAt(0) == "/" ? node.path.substring(1) : node.path);
+
+ // Workaround https://github.com/einaros/ws/pull/253
+ // Listen for 'newListener' events from RED.server
+ node._serverListeners = {};
+
+ var storeListener = function(/*String*/event,/*function*/listener){
+ if(event == "error" || event == "upgrade" || event == "listening"){
+ node._serverListeners[event] = listener;
+ }
+ }
+
+ node._clients = {};
+
+ RED.server.addListener('newListener',storeListener);
+
+ // Create a WebSocket Server
+ node.server = new ws.Server({server:RED.server,path:path});
+
+ // Workaround https://github.com/einaros/ws/pull/253
+ // Stop listening for new listener events
+ RED.server.removeListener('newListener',storeListener);
+
+ node.server.on('connection', function(socket){
+ var id = (1+Math.random()*4294967295).toString(16);
+ node._clients[id] = socket;
+ socket.on('close',function() {
+ delete node._clients[id];
+ });
+ socket.on('message',function(data,flags){
+ node.handleEvent(id,socket,'message',data,flags);
+ });
+ socket.on('error', function(err) {
+ node.warn("An error occured on the ws connection: "+inspect(err));
+ });
+ });
+
+ node.on("close", function() {
+ // Workaround https://github.com/einaros/ws/pull/253
+ // Remove listeners from RED.server
+ var listener = null;
+ for(var event in node._serverListeners) {
+ if (node._serverListeners.hasOwnProperty(event)) {
+ listener = node._serverListeners[event];
+ if(typeof listener === "function"){
+ RED.server.removeListener(event,listener);
+ }
+ }
+ }
+ node._serverListeners = {};
+ node.server.close();
+ node._inputNodes = [];
+ });
+ }
+ RED.nodes.registerType("websocket-listener",WebSocketListenerNode);
+
+ WebSocketListenerNode.prototype.registerInputNode = function(/*Node*/handler){
+ this._inputNodes.push(handler);
+ }
+
+ WebSocketListenerNode.prototype.handleEvent = function(id,/*socket*/socket,/*String*/event,/*Object*/data,/*Object*/flags){
+ var msg;
+ if (this.wholemsg) {
+ try {
+ msg = JSON.parse(data);
+ }
+ catch(err) {
+ msg = { payload:data };
+ }
+ } else {
+ msg = {
+ payload:data
+ };
+ }
+ msg._session = {type:"websocket",id:id};
+
+ for (var i = 0; i < this._inputNodes.length; i++) {
+ this._inputNodes[i].send(msg);
+ }
+ }
+
+ WebSocketListenerNode.prototype.broadcast = function(data){
+ try {
+ for (var i = 0; i < this.server.clients.length; i++) {
+ this.server.clients[i].send(data);
+ }
+ }
+ catch(e) { // swallow any errors
+ this.warn("ws:"+i+" : "+e);
+ }
+ }
+
+ WebSocketListenerNode.prototype.send = function(id,data) {
+ var session = this._clients[id];
+ if (session) {
+ try {
+ session.send(data);
+ }
+ catch(e) { // swallow any errors
+ }
+ }
+ }
+
+ function WebSocketInNode(n) {
+ RED.nodes.createNode(this,n);
+ this.server = n.server;
+ var node = this;
+ this.serverConfig = RED.nodes.getNode(this.server);
+ if (this.serverConfig) {
+ this.serverConfig.registerInputNode(this);
+ } else {
+ this.error("Missing server configuration");
+ }
+ }
+ RED.nodes.registerType("websocket in",WebSocketInNode);
+
+ function WebSocketOutNode(n) {
+ RED.nodes.createNode(this,n);
+ var node = this;
+ this.server = n.server;
+ this.serverConfig = RED.nodes.getNode(this.server);
+ if (!this.serverConfig) {
+ this.error("Missing server configuration");
+ }
+ this.on("input", function(msg) {
+ var payload;
+ if (this.serverConfig.wholemsg) {
+ delete msg._session;
+ payload = JSON.stringify(msg);
+ } else {
+ if (!Buffer.isBuffer(msg.payload)) { // if it's not a buffer make sure it's a string.
+ payload = RED.util.ensureString(msg.payload);
+ }
+ else {
+ payload = msg.payload;
+ }
+ }
+ if (msg._session && msg._session.type == "websocket") {
+ node.serverConfig.send(msg._session.id,payload);
+ } else {
+ node.serverConfig.broadcast(payload,function(error){
+ if (!!error) {
+ node.warn("An error occurred while sending:" + inspect(error));
+ }
+ });
+ }
+ });
+ }
+ RED.nodes.registerType("websocket out",WebSocketOutNode);
+}
diff --git a/dgbuilder/core_nodes/io/23-watch.html b/dgbuilder/core_nodes/io/23-watch.html
new file mode 100644
index 0000000..8bf22be
--- /dev/null
+++ b/dgbuilder/core_nodes/io/23-watch.html
@@ -0,0 +1,57 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="watch">
+ <div class="form-row node-input-filename">
+ <label for="node-input-files"><i class="fa fa-file"></i> File(s)</label>
+ <input type="text" id="node-input-files" placeholder="File(s) or Directory">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div id="node-input-tip" class="form-tips">On Windows you must use double slashes \\ in any directory names.</div>
+</script>
+
+<script type="text/x-red" data-help-name="watch">
+ <p>Watches a directory or file for any changes.</p>
+ <p>You can enter a list of comma separated directories or files if you like. You will need to put " around any that have spaces in.</p>
+ <p>On Windows you must use double slashes \\ in any directory names.</p>
+ <p>The full filename of the file that actually changed is put into <b>msg.payload</b>, while a stringified version of the watched criteria is returned in <b>msg.topic</b>.</p>
+ <p><b>msg.file</b> contains just the short filename of the file that changed.</p>
+ <p>Of course in Linux, <i>everything</i> could be a file and thus watched...</p>
+ <p><b>Note: </b>The directory or file must exist in order to be watched. If the file or directory gets deleted it may no longer be monitored even if it gets re-created.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('watch',{
+ category: 'advanced-input',
+ defaults: {
+ name: {value:""},
+ files: {value:"",required:true}
+ },
+ color:"BurlyWood",
+ inputs:0,
+ outputs:1,
+ icon: "watch.png",
+ label: function() {
+ return this.name||this.files;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/io/23-watch.js b/dgbuilder/core_nodes/io/23-watch.js
new file mode 100644
index 0000000..8a17f5a
--- /dev/null
+++ b/dgbuilder/core_nodes/io/23-watch.js
@@ -0,0 +1,51 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var Notify = require("fs.notify");
+ var fs = require("fs");
+ var sep = require("path").sep;
+
+ function WatchNode(n) {
+ RED.nodes.createNode(this,n);
+
+ this.files = n.files.split(",");
+ for (var f =0; f < this.files.length; f++) {
+ this.files[f] = this.files[f].trim();
+ }
+ this.p = (this.files.length == 1) ? this.files[0] : JSON.stringify(this.files);
+ var node = this;
+
+ var notifications = new Notify(node.files);
+ notifications.on('change', function (file, event, path) {
+ try {
+ if (fs.statSync(path).isDirectory()) { path = path + sep + file; }
+ } catch(e) { }
+ var msg = { payload: path, topic: node.p, file: file };
+ node.send(msg);
+ });
+
+ notifications.on('error', function (error, path) {
+ node.warn(error);
+ });
+
+ this.close = function() {
+ notifications.close();
+ }
+ }
+ RED.nodes.registerType("watch",WatchNode);
+}
diff --git a/dgbuilder/core_nodes/io/25-serial.html b/dgbuilder/core_nodes/io/25-serial.html
new file mode 100644
index 0000000..225e4dc
--- /dev/null
+++ b/dgbuilder/core_nodes/io/25-serial.html
@@ -0,0 +1,265 @@
+<!--
+ Copyright 2013,2014 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="serial in">
+ <div class="form-row node-input-serial">
+ <label for="node-input-serial"><i class="fa fa-random"></i> Serial Port</label>
+ <input type="text" id="node-input-serial">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="serial in">
+ <p>Reads data from a local serial port.</p>
+ <p>Can either <ul><li>wait for a "split" character (default \n). Also accepts hex notation (0x0a).</li>
+ <li>Wait for a timeout in milliseconds for the first character received</li>
+ <li>Wait to fill a fixed sized buffer</li></ul></p>
+ <p>It then outputs <b>msg.payload</b> as either a UTF8 ascii string or a binary Buffer object.</p>
+ <p>If no split character is specified, or a timeout or buffer size of 0, then a stream of single characters is sent - again either as ascii chars or size 1 binary buffers.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('serial in',{
+ category: 'input',
+ defaults: {
+ name: {name:""},
+ serial: {type:"serial-port",required:true}
+ },
+ color:"BurlyWood",
+ inputs:0,
+ outputs:1,
+ icon: "serial.png",
+ label: function() {
+ var serialNode = RED.nodes.node(this.serial);
+ return this.name||(serialNode?serialNode.label().split(":")[0]:"serial");
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
+
+<script type="text/x-red" data-template-name="serial out">
+ <div class="form-row node-input-serial">
+ <label for="node-input-serial"><i class="fa fa-random"></i> Serial Port</label>
+ <input type="text" id="node-input-serial">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="serial out">
+ <p>Provides a connection to an outbound serial port.</p>
+ <p>Only the <b>msg.payload</b> is sent.</p>
+ <p>Optionally the new line character used to split the input can be appended to every message sent out to the serial port.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('serial out',{
+ category: 'output',
+ defaults: {
+ name: {name:""},
+ serial: {type:"serial-port",required:true}
+ },
+ color:"BurlyWood",
+ inputs:1,
+ outputs:0,
+ icon: "serial.png",
+ align: "right",
+ label: function() {
+ var serialNode = RED.nodes.node(this.serial);
+ return this.name||(serialNode?serialNode.label().split(":")[0]:"serial");
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
+
+
+<script type="text/x-red" data-template-name="serial-port">
+ <div class="form-row">
+ <label for="node-config-input-serialport"><i class="fa fa-random"></i> Serial Port</label>
+ <input type="text" id="node-config-input-serialport" style="width:60%;" placeholder="/dev/ttyUSB0"/>
+ <a id="node-config-lookup-serial" class="btn"><i id="node-config-lookup-serial-icon" class="fa fa-search"></i></a>
+ </div>
+ <div class="form-row">
+ <table><tr>
+ <td width = "102px"><i class="fa fa-wrench"></i> Settings</td>
+ <td width = "100px">Baud Rate</td>
+ <td width = "80px">Data Bits</td>
+ <td width = "80px">Parity</td>
+ <td width = "80px">Stop Bits</td>
+ </tr><tr><td> </td>
+ <td>
+ <select type="text" id="node-config-input-serialbaud" style="width: 100px;">
+ <option value="115200">115200</option>
+ <option value="57600">57600</option>
+ <option value="38400">38400</option>
+ <option value="19200">19200</option>
+ <option value="9600">9600</option>
+ <option value="4800">4800</option>
+ <option value="2400">2400</option>
+ <option value="1800">1800</option>
+ <option value="1200">1200</option>
+ <option value="600">600</option>
+ <option value="300">300</option>
+ <option value="200">200</option>
+ <option value="150">150</option>
+ <option value="134">134</option>
+ <option value="110">110</option>
+ <option value="75">75</option>
+ <option value="50">50</option>
+ </select>
+ </td><td>
+ <select type="text" id="node-config-input-databits" style="width: 80px;">
+ <option value="8">8</option>
+ <option value="7">7</option>
+ <option value="6">6</option>
+ <option value="5">5</option>
+ </select>
+ </td><td>
+ <select type="text" id="node-config-input-parity" style="width: 80px;">
+ <option value="none">None</option>
+ <option value="even">Even</option>
+ <option value="mark">Mark</option>
+ <option value="odd">Odd</option>
+ <option value="space">Space</option>
+ </select>
+ </td><td>
+ <select type="text" id="node-config-input-stopbits" style="width: 80px;">
+ <option value="2">2</option>
+ <option value="1">1</option>
+ </select>
+ </td>
+ </tr></table><br/>
+
+ <div class="form-row">
+ <label for="node-config-input-out"><i class="fa fa-cut"></i> Split input</label>
+ <select type="text" id="node-config-input-out" style="width:52%;">
+ <option value="char">when character received is</option>
+ <option value="time">after a fixed timeout of</option>
+ <option value="count">a fixed number of characters</option>
+ </select>
+ <input type="text" id="node-config-input-newline" style="width:50px;">
+ <span id="node-units"></span>
+ </div>
+
+ <div class="form-row">
+ <label for="node-config-input-bin"><i class="fa fa-sign-in"></i> and deliver</label>
+ <select type="text" id="node-config-input-bin" style="width: 77%;">
+ <option value="false">ascii strings</option>
+ <option value="bin">binary buffers</option>
+ </select>
+ </div>
+ <br/>
+ <div class="form-row" id="node-config-addchar">
+ <label for="node-config-input-addchar"><i class="fa fa-sign-out"></i> On output</label>
+ <select type="text" id="node-config-input-addchar" style="width: 77%;">
+ <option value="false">don't add 'split' character to output messages</option>
+ <option value="true">add 'split' character to output messages</option>
+ </select>
+ </div>
+ <div class="form-tips" id="tip-split">Tip: the "Split on" character is used to split the input into separate messages. It can also be added to every message sent out to the serial port.</div>
+ <div class="form-tips" id="tip-bin" hidden>Tip: In timeout mode timeout starts from arrival of first character.</div>
+ <script>
+ var previous = null;
+ $("#node-config-input-out").on('focus', function () { previous = this.value; }).change(function() {
+ if (previous == null) { previous = $("#node-config-input-out").val(); }
+ if ($("#node-config-input-out").val() == "char") {
+ if (previous != "char") { $("#node-config-input-newline").val("\\n"); }
+ $("#node-units").text("");
+ $("#node-config-addchar").show();
+ $("#tip-split").show();
+ $("#tip-bin").hide();
+ }
+ else if ($("#node-config-input-out").val() == "time") {
+ if (previous != "time") { $("#node-config-input-newline").val("0"); }
+ $("#node-units").text("ms");
+ $("#node-config-addchar").hide();
+ $("#node-config-input-addchar").val("false");
+ $("#tip-split").hide();
+ $("#tip-bin").show();
+ }
+ else {
+ if (previous != "count") { $("#node-config-input-newline").val("12"); }
+ $("#node-units").text("chars");
+ $("#node-config-addchar").hide();
+ $("#node-config-input-addchar").val("false");
+ $("#tip-split").hide();
+ $("#tip-bin").hide();
+ }
+ });
+
+ </script>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('serial-port',{
+ category: 'config',
+ defaults: {
+ //name: {value:""},
+ serialport: {value:"",required:true},
+ serialbaud: {value:57600,required:true},
+ databits: {value:8,required:true},
+ parity: {value:"none",required:true},
+ stopbits: {value:1,required:true},
+ newline: {value:"\\n"},
+ bin: {value:""},
+ out: {value:""},
+ addchar: {value:false}
+ },
+ label: function() {
+ this.serialbaud = this.serialbaud || 57600;
+ this.databits = this.databits || 8;
+ this.parity = this.parity || 'none';
+ this.stopbits = this.stopbits || 1;
+ return this.serialport+":"+this.serialbaud+"-"+this.databits+this.parity.charAt(0).toUpperCase()+this.stopbits;
+ },
+ oneditprepare: function() {
+ try {
+ $("#node-config-input-serialport").autocomplete( "destroy" );
+ } catch(err) {
+ }
+ $("#node-config-lookup-serial").click(function() {
+ //$("#node-config-lookup-serial-icon").removeClass('fa fa-search');
+ //$("#node-config-lookup-serial-icon").addClass('fa fa-spinner');
+ $("#node-config-lookup-serial").addClass('disabled');
+ $.getJSON('serialports',function(data) {
+ //$("#node-config-lookup-serial-icon").addClass('fa fa-search');
+ //$("#node-config-lookup-serial-icon").removeClass('fa fa-spinner');
+ $("#node-config-lookup-serial").removeClass('disabled');
+ var ports = [];
+ $.each(data, function(i, port){
+ ports.push(port.comName);
+ });
+ $("#node-config-input-serialport").autocomplete({
+ source:ports,
+ minLength:0,
+ close: function( event, ui ) {
+ $("#node-config-input-serialport").autocomplete( "destroy" );
+ }
+ }).autocomplete("search","");
+ });
+ });
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/io/25-serial.js b/dgbuilder/core_nodes/io/25-serial.js
new file mode 100644
index 0000000..96e4aca
--- /dev/null
+++ b/dgbuilder/core_nodes/io/25-serial.js
@@ -0,0 +1,310 @@
+/**
+* Copyright 2013,2014 IBM Corp.
+*
+* 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.
+**/
+
+module.exports = function(RED) {
+ "use strict";
+ var settings = RED.settings;
+ var events = require("events");
+ var util = require("util");
+ var serialp = require("serialport");
+ var bufMaxSize = 32768; // Max serial buffer size, for inputs...
+
+ // TODO: 'serialPool' should be encapsulated in SerialPortNode
+
+ function SerialPortNode(n) {
+ RED.nodes.createNode(this,n);
+ this.serialport = n.serialport;
+ this.newline = n.newline;
+ this.addchar = n.addchar || "false";
+ this.serialbaud = parseInt(n.serialbaud) || 57600;
+ this.databits = parseInt(n.databits) || 8;
+ this.parity = n.parity || "none";
+ this.stopbits = parseInt(n.stopbits) || 1;
+ this.bin = n.bin || "false";
+ this.out = n.out || "char";
+ }
+ RED.nodes.registerType("serial-port",SerialPortNode);
+
+ function SerialOutNode(n) {
+ RED.nodes.createNode(this,n);
+ this.serial = n.serial;
+ this.serialConfig = RED.nodes.getNode(this.serial);
+
+ if (this.serialConfig) {
+ var node = this;
+ node.port = serialPool.get(this.serialConfig.serialport,
+ this.serialConfig.serialbaud,
+ this.serialConfig.databits,
+ this.serialConfig.parity,
+ this.serialConfig.stopbits,
+ this.serialConfig.newline);
+ node.addCh = "";
+ if (node.serialConfig.addchar == "true") {
+ node.addCh = this.serialConfig.newline.replace("\\n","\n").replace("\\r","\r").replace("\\t","\t").replace("\\e","\e").replace("\\f","\f").replace("\\0","\0");
+ }
+ node.on("input",function(msg) {
+ var payload = msg.payload;
+ if (!Buffer.isBuffer(payload)) {
+ if (typeof payload === "object") {
+ payload = JSON.stringify(payload);
+ } else {
+ payload = payload.toString();
+ }
+ payload += node.addCh;
+ } else if (node.addCh !== "") {
+ payload = Buffer.concat([payload,new Buffer(node.addCh)]);
+ }
+ node.port.write(payload,function(err,res) {
+ if (err) {
+ node.error(err);
+ }
+ });
+ });
+ node.port.on('ready', function() {
+ node.status({fill:"green",shape:"dot",text:"connected"});
+ });
+ node.port.on('closed', function() {
+ node.status({fill:"red",shape:"ring",text:"not connected"});
+ });
+ } else {
+ this.error("missing serial config");
+ }
+
+ this.on("close", function(done) {
+ if (this.serialConfig) {
+ serialPool.close(this.serialConfig.serialport,done);
+ } else {
+ done();
+ }
+ });
+ }
+ RED.nodes.registerType("serial out",SerialOutNode);
+
+
+ function SerialInNode(n) {
+ RED.nodes.createNode(this,n);
+ this.serial = n.serial;
+ this.serialConfig = RED.nodes.getNode(this.serial);
+
+ if (this.serialConfig) {
+ var node = this;
+ node.tout = null;
+ var buf;
+ if (node.serialConfig.out != "count") { buf = new Buffer(bufMaxSize); }
+ else { buf = new Buffer(Number(node.serialConfig.newline)); }
+ var i = 0;
+ node.status({fill:"grey",shape:"dot",text:"unknown"});
+ node.port = serialPool.get(this.serialConfig.serialport,
+ this.serialConfig.serialbaud,
+ this.serialConfig.databits,
+ this.serialConfig.parity,
+ this.serialConfig.stopbits,
+ this.serialConfig.newline
+ );
+
+ var splitc;
+ if (node.serialConfig.newline.substr(0,2) == "0x") {
+ splitc = new Buffer([parseInt(node.serialConfig.newline)]);
+ } else {
+ splitc = new Buffer(node.serialConfig.newline.replace("\\n","\n").replace("\\r","\r").replace("\\t","\t").replace("\\e","\e").replace("\\f","\f").replace("\\0","\0"));
+ }
+
+ this.port.on('data', function(msg) {
+ // single char buffer
+ if ((node.serialConfig.newline === 0)||(node.serialConfig.newline === "")) {
+ if (node.serialConfig.bin !== "bin") { node.send({"payload": String.fromCharCode(msg)}); }
+ else { node.send({"payload": new Buffer([msg])}); }
+ }
+ else {
+ // do the timer thing
+ if (node.serialConfig.out === "time") {
+ if (node.tout) {
+ i += 1;
+ buf[i] = msg;
+ }
+ else {
+ node.tout = setTimeout(function () {
+ node.tout = null;
+ var m = new Buffer(i+1);
+ buf.copy(m,0,0,i+1);
+ if (node.serialConfig.bin !== "bin") { m = m.toString(); }
+ node.send({"payload": m});
+ m = null;
+ }, node.serialConfig.newline);
+ i = 0;
+ buf[0] = msg;
+ }
+ }
+ // count bytes into a buffer...
+ else if (node.serialConfig.out === "count") {
+ buf[i] = msg;
+ i += 1;
+ if ( i >= parseInt(node.serialConfig.newline)) {
+ var m = new Buffer(i);
+ buf.copy(m,0,0,i);
+ if (node.serialConfig.bin !== "bin") { m = m.toString(); }
+ node.send({"payload":m});
+ m = null;
+ i = 0;
+ }
+ }
+ // look to match char...
+ else if (node.serialConfig.out === "char") {
+ buf[i] = msg;
+ i += 1;
+ if ((msg === splitc[0]) || (i === bufMaxSize)) {
+ var m = new Buffer(i);
+ buf.copy(m,0,0,i);
+ if (node.serialConfig.bin !== "bin") { m = m.toString(); }
+ node.send({"payload":m});
+ m = null;
+ i = 0;
+ }
+ }
+ else { console.log("Should never get here"); }
+ }
+ });
+ this.port.on('ready', function() {
+ node.status({fill:"green",shape:"dot",text:"connected"});
+ });
+ this.port.on('closed', function() {
+ node.status({fill:"red",shape:"ring",text:"not connected"});
+ });
+ } else {
+ this.error("missing serial config");
+ }
+
+ this.on("close", function(done) {
+ if (this.serialConfig) {
+ serialPool.close(this.serialConfig.serialport,done);
+ } else {
+ done();
+ }
+ });
+ }
+ RED.nodes.registerType("serial in",SerialInNode);
+
+
+ var serialPool = function() {
+ var connections = {};
+ return {
+ get:function(port,baud,databits,parity,stopbits,newline,callback) {
+ var id = port;
+ if (!connections[id]) {
+ connections[id] = function() {
+ var obj = {
+ _emitter: new events.EventEmitter(),
+ serial: null,
+ _closing: false,
+ tout: null,
+ on: function(a,b) { this._emitter.on(a,b); },
+ close: function(cb) { this.serial.close(cb); },
+ write: function(m,cb) { this.serial.write(m,cb); },
+ }
+ //newline = newline.replace("\\n","\n").replace("\\r","\r");
+ var setupSerial = function() {
+ //if (newline == "") {
+ obj.serial = new serialp.SerialPort(port,{
+ baudrate: baud,
+ databits: databits,
+ parity: parity,
+ stopbits: stopbits,
+ parser: serialp.parsers.raw
+ },true, function(err, results) { if (err) { obj.serial.emit('error',err); } });
+ //}
+ //else {
+ // obj.serial = new serialp.SerialPort(port,{
+ // baudrate: baud,
+ // databits: databits,
+ // parity: parity,
+ // stopbits: stopbits,
+ // parser: serialp.parsers.readline(newline)
+ // },true, function(err, results) { if (err) obj.serial.emit('error',err); });
+ //}
+ obj.serial.on('error', function(err) {
+ util.log("[serial] serial port "+port+" error "+err);
+ obj._emitter.emit('closed');
+ obj.tout = setTimeout(function() {
+ setupSerial();
+ }, settings.serialReconnectTime);
+ });
+ obj.serial.on('close', function() {
+ if (!obj._closing) {
+ util.log("[serial] serial port "+port+" closed unexpectedly");
+ obj._emitter.emit('closed');
+ obj.tout = setTimeout(function() {
+ setupSerial();
+ }, settings.serialReconnectTime);
+ }
+ });
+ obj.serial.on('open',function() {
+ util.log("[serial] serial port "+port+" opened at "+baud+" baud "+databits+""+parity.charAt(0).toUpperCase()+stopbits);
+ if (obj.tout) { clearTimeout(obj.tout); }
+ //obj.serial.flush();
+ obj._emitter.emit('ready');
+ });
+ obj.serial.on('data',function(d) {
+ //console.log(Buffer.isBuffer(d),d.length,d);
+ //if (typeof d !== "string") {
+ // //d = d.toString();
+ for (var z=0; z<d.length; z++) {
+ obj._emitter.emit('data',d[z]);
+ }
+ //}
+ //else {
+ // obj._emitter.emit('data',d);
+ //}
+ });
+ obj.serial.on("disconnect",function() {
+ util.log("[serial] serial port "+port+" gone away");
+ });
+ }
+ setupSerial();
+ return obj;
+ }();
+ }
+ return connections[id];
+ },
+ close: function(port,done) {
+ if (connections[port]) {
+ if (connections[port].tout != null) {
+ clearTimeout(connections[port].tout);
+ }
+ connections[port]._closing = true;
+ try {
+ connections[port].close(function() {
+ util.log("[serial] serial port closed");
+ done();
+ });
+ }
+ catch(err) { }
+ delete connections[port];
+ } else {
+ done();
+ }
+ }
+ }
+ }();
+
+ RED.httpAdmin.get("/serialports",function(req,res) {
+ serialp.list(function (err, ports) {
+ //console.log(JSON.stringify(ports));
+ res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.write(JSON.stringify(ports));
+ res.end();
+ });
+ });
+}
diff --git a/dgbuilder/core_nodes/io/31-tcpin.html b/dgbuilder/core_nodes/io/31-tcpin.html
new file mode 100644
index 0000000..c8cec59
--- /dev/null
+++ b/dgbuilder/core_nodes/io/31-tcpin.html
@@ -0,0 +1,299 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="tcp in">
+ <div class="form-row">
+ <label for="node-input-server"><i class="fa fa-dot-circle-o"></i> Type</label>
+ <select id="node-input-server" style="width:120px; margin-right:5px;">
+ <option value="server">Listen on</option>
+ <option value="client">Connect to</option>
+ </select>
+ port <input type="text" id="node-input-port" style="width: 50px">
+ </div>
+ <div class="form-row hidden" id="node-input-host-row" style="padding-left: 110px;">
+ at host <input type="text" id="node-input-host" placeholder="localhost" style="width: 60%;">
+ </div>
+
+ <div class="form-row">
+ <label><i class="fa fa-sign-out"></i> Output</label>
+ a
+ <select id="node-input-datamode" style="width:110px;">
+ <option value="stream">stream of</option>
+ <option value="single">single</option>
+ </select>
+ <select id="node-input-datatype" style="width:140px;">
+ <option value="buffer">Buffer</option>
+ <option value="utf8">String</option>
+ <option value="base64">Base64 String</option>
+ </select>
+ payload<span id="node-input-datamode-plural">s</span>
+ </div>
+
+ <div id="node-row-newline" class="form-row hidden" style="padding-left: 110px;">
+ delimited by <input type="text" id="node-input-newline" style="width: 110px;">
+ </div>
+
+ <div class="form-row">
+ <label for="node-input-topic"><i class="fa fa-tasks"></i> Topic</label>
+ <input type="text" id="node-input-topic" placeholder="Topic">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="tcp in">
+ <p>Provides a choice of tcp inputs. Can either connect to a remote tcp port,
+ or accept incoming connections.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('tcp in',{
+ category: 'input',
+ color:"Silver",
+ defaults: {
+ server: {value:"server",required:true},
+ host: {value:"",validate:function(v) { return (this.server == "server")||v.length > 0;} },
+ port: {value:"",required:true,validate:RED.validators.number()},
+ datamode:{value:"stream"},
+ datatype:{value:"buffer"},
+ newline:{value:""},
+ topic: {value:""},
+ name: {value:""},
+ base64: {/*deprecated*/ value:false,required:true}
+ },
+ inputs:0,
+ outputs:1,
+ icon: "bridge-dash.png",
+ label: function() {
+ return this.name || "tcp:"+(this.host?this.host+":":"")+this.port;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ var updateOptions = function() {
+ var sockettype = $("#node-input-server option:selected").val();
+ if (sockettype == "client") {
+ $("#node-input-host-row").show();
+ } else {
+ $("#node-input-host-row").hide();
+ }
+ var datamode = $("#node-input-datamode option:selected").val();
+ var datatype = $("#node-input-datatype option:selected").val();
+ if (datamode == "stream") {
+ $("#node-input-datamode-plural").show();
+ if (datatype == "utf8") {
+ $("#node-row-newline").show();
+ } else {
+ $("#node-row-newline").hide();
+ }
+ } else {
+ $("#node-input-datamode-plural").hide();
+ $("#node-row-newline").hide();
+ }
+ };
+ updateOptions();
+ $("#node-input-server").change(updateOptions);
+ $("#node-input-datatype").change(updateOptions);
+ $("#node-input-datamode").change(updateOptions);
+ }
+ });
+</script>
+
+
+<script type="text/x-red" data-template-name="tcp out">
+ <div class="form-row">
+ <label for="node-input-beserver"><i class="fa fa-dot-circle-o"></i> Type</label>
+ <select id="node-input-beserver" style="width:150px; margin-right:5px;">
+ <option value="server">Listen on</option>
+ <option value="client">Connect to</option>
+ <option value="reply">Reply to TCP</option>
+ </select>
+ <span id="node-input-port-row">port <input type="text" id="node-input-port" style="width: 50px"></span>
+ </div>
+
+ <div class="form-row hidden" id="node-input-host-row" style="padding-left: 110px;">
+ at host <input type="text" id="node-input-host" placeholder="localhost" style="width: 60%;">
+ </div>
+
+ <div class="form-row hidden" id="node-input-end-row">
+ <label> </label>
+ <input type="checkbox" id="node-input-end" style="display: inline-block; width: auto; vertical-align: top;">
+ <label for="node-input-end" style="width: 70%;">Close connection after each message is sent ?</label>
+ </div>
+
+ <div class="form-row">
+ <label> </label>
+ <input type="checkbox" id="node-input-base64" placeholder="base64" style="display: inline-block; width: auto; vertical-align: top;">
+ <label for="node-input-base64" style="width: 70%;">Decode Base64 message ?</label>
+ </div>
+
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+
+ <div class="form-tips hidden" id="fin-tip">
+ <b>Note:</b> Closing the connection after each message is generally not a good thing - but is useful to indicate an end-of-file for example.
+ </div>
+ <div class="form-tips hidden" id="fin-tip2">
+ <b>Note:</b> Closing the connection after each message is generally not a good thing - but is useful to indicate an end-of-file for example. The receiving client will need to reconnect.
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="tcp out">
+ <p>Provides a choice of tcp outputs. Can either connect to a remote tcp port,
+ accept incoming connections, or reply to messages received from a TCP In node.</p>
+ <p>Only <b>msg.payload</b> is sent.</p>
+ <p>If <b>msg.payload</b> is a string containing a Base64 encoding of binary
+ data, the Base64 decoding option will cause it to be converted back to binary
+ before being sent.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('tcp out',{
+ category: 'output',
+ color:"Silver",
+ defaults: {
+ host: {value:"",validate:function(v) { return (this.beserver != "client")||v.length > 0;} },
+ port: {value:"",validate:function(v) { return (this.beserver == "reply")||RED.validators.number()(v) } },
+ beserver: {value:"client",required:true},
+ base64: {value:false,required:true},
+ end: {value:false,required:true},
+ name: {value:""}
+ },
+ inputs:1,
+ outputs:0,
+ icon: "bridge-dash.png",
+ align: "right",
+ label: function() {
+ return this.name || "tcp:"+(this.host?this.host+":":"")+this.port;
+ },
+ labelStyle: function() {
+ return (this.name)?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ var updateOptions = function() {
+ var sockettype = $("#node-input-beserver option:selected").val();
+ if (sockettype == "reply") {
+ $("#node-input-port-row").hide();
+ $("#node-input-host-row").hide();
+ $("#node-input-end-row").hide();
+ } else {
+ $("#node-input-port-row").show();
+ $("#node-input-end-row").show();
+ }
+
+ if (sockettype == "client") {
+ $("#node-input-host-row").show();
+ $("#fin-tip").show();
+ } else {
+ $("#node-input-host-row").hide();
+ $("#fin-tip").hide();
+ }
+
+ if (sockettype == "server") {
+ $("#fin-tip2").show();
+ }
+ else {
+ $("#fin-tip2").hide();
+ }
+
+ };
+ updateOptions();
+ $("#node-input-beserver").change(updateOptions);
+ }
+ });
+</script>
+
+
+<script type="text/x-red" data-template-name="tcp request">
+ <div class="form-row">
+ <label for="node-input-server"><i class="fa fa-globe"></i> Server</label>
+ <input type="text" id="node-input-server" placeholder="ip.address" style="width:50%">
+ port <input type="text" id="node-input-port" style="width:50px">
+ </div>
+ <div class="form-row">
+ <label for="node-input-out"><i class="fa fa-sign-out"></i> Return</label>
+ <select type="text" id="node-input-out" style="width:52%;">
+ <option value="time">after a fixed timeout of</option>
+ <option value="char">when character received is</option>
+ <option value="count">a fixed number of characters</option>
+ <option value="sit">never. Keep connection open</option>
+ </select>
+ <input type="text" id="node-input-splitc" style="width:50px;">
+ <span id="node-units"></span>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips"><b>Tip:</b> outputs a binary <b>Buffer</b>, so you may want to .toString() it.</div>
+ <script>
+ var previous = null;
+ $("#node-input-out").on('focus', function () { previous = this.value; }).change(function() {
+ if (previous == null) { previous = $("#node-input-out").val(); }
+ if ($("#node-input-out").val() == "char") {
+ if (previous != "char") $("#node-input-splitc").val("\\n");
+ $("#node-units").text("");
+ }
+ else if ($("#node-input-out").val() == "time") {
+ if (previous != "time") $("#node-input-splitc").val("0");
+ $("#node-units").text("ms");
+ }
+ else if ($("#node-input-out").val() == "count") {
+ if (previous != "count") $("#node-input-splitc").val("12");
+ $("#node-units").text("chars");
+ }
+ else {
+ if (previous != "sit") $("#node-input-splitc").val("0");
+ $("#node-units").text("");
+ }
+ });
+</script>
+
+<script type="text/x-red" data-help-name="tcp request">
+ <p>A simple TCP request node - sends the <b>msg.payload</b> to a server tcp port and expects a response.</p>
+ <p>Connects, sends the "request", reads the "response". It can either count a number of
+ returned characters into a fixed buffer, match a specified character before returning,
+ wait a fixed timeout from first reply and then return, or just sit and wait for data.</p>
+ <p>The response will be output in <b>msg.payload</b> as a buffer, so you may want to .toString() it.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('tcp request',{
+ category: 'function',
+ color:"Silver",
+ defaults: {
+ server: {value:"",required:true},
+ port: {value:"",required:true,validate:RED.validators.number()},
+ out: {value:"time",required:true},
+ splitc: {value:"0",required:true},
+ name: {value:""}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "bridge-dash.png",
+ label: function() {
+ return this.name || "tcp:"+(this.server?this.server+":":"")+this.port;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/io/31-tcpin.js b/dgbuilder/core_nodes/io/31-tcpin.js
new file mode 100644
index 0000000..2e4e5e7
--- /dev/null
+++ b/dgbuilder/core_nodes/io/31-tcpin.js
@@ -0,0 +1,472 @@
+/**
+ * Copyright 2013,2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var reconnectTime = RED.settings.socketReconnectTime||10000;
+ var socketTimeout = RED.settings.socketTimeout||null;
+ var net = require('net');
+
+ var connectionPool = {};
+
+ function TcpIn(n) {
+ RED.nodes.createNode(this,n);
+ this.host = n.host;
+ this.port = n.port * 1;
+ this.topic = n.topic;
+ this.stream = (!n.datamode||n.datamode=='stream'); /* stream,single*/
+ this.datatype = n.datatype||'buffer'; /* buffer,utf8,base64 */
+ this.newline = (n.newline||"").replace("\\n","\n").replace("\\r","\r");
+ this.base64 = n.base64;
+ this.server = (typeof n.server == 'boolean')?n.server:(n.server == "server");
+ this.closing = false;
+ var node = this;
+ var count = 0;
+
+ if (!node.server) {
+ var buffer = null;
+ var client;
+ var reconnectTimeout;
+ var end = false;
+ var setupTcpClient = function() {
+ node.log("connecting to "+node.host+":"+node.port);
+ node.status({fill:"grey",shape:"dot",text:"connecting"});
+ var id = (1+Math.random()*4294967295).toString(16);
+ client = net.connect(node.port, node.host, function() {
+ buffer = (node.datatype == 'buffer')? new Buffer(0):"";
+ node.log("connected to "+node.host+":"+node.port);
+ node.status({fill:"green",shape:"dot",text:"connected"});
+ });
+ connectionPool[id] = client;
+
+ client.on('data', function (data) {
+ if (node.datatype != 'buffer') {
+ data = data.toString(node.datatype);
+ }
+ if (node.stream) {
+ if ((node.datatype) === "utf8" && node.newline != "") {
+ buffer = buffer+data;
+ var parts = buffer.split(node.newline);
+ for (var i = 0;i<parts.length-1;i+=1) {
+ var msg = {topic:node.topic, payload:parts[i]};
+ msg._session = {type:"tcp",id:id};
+ node.send(msg);
+ }
+ buffer = parts[parts.length-1];
+ } else {
+ var msg = {topic:node.topic, payload:data};
+ msg._session = {type:"tcp",id:id};
+ node.send(msg);
+ }
+ } else {
+ if ((typeof data) === "string") {
+ buffer = buffer+data;
+ } else {
+ buffer = Buffer.concat([buffer,data],buffer.length+data.length);
+ }
+ }
+ });
+ client.on('end', function() {
+ if (!node.stream || (node.datatype == "utf8" && node.newline != "" && buffer.length > 0)) {
+ var msg = {topic:node.topic,payload:buffer};
+ msg._session = {type:"tcp",id:id};
+ if (buffer.length !== 0) {
+ end = true; // only ask for fast re-connect if we actually got something
+ node.send(msg);
+ }
+ buffer = null;
+ }
+ });
+ client.on('close', function() {
+ delete connectionPool[id];
+ node.status({fill:"red",shape:"ring",text:"disconnected"});
+ if (!node.closing) {
+ if (end) { // if we were asked to close then try to reconnect once very quick.
+ end = false;
+ reconnectTimeout = setTimeout(setupTcpClient, 20);
+ }
+ else {
+ node.log("connection lost to "+node.host+":"+node.port);
+ reconnectTimeout = setTimeout(setupTcpClient, reconnectTime);
+ }
+ }
+ });
+ client.on('error', function(err) {
+ node.log(err);
+ });
+ }
+ setupTcpClient();
+
+ this.on('close', function() {
+ this.closing = true;
+ client.end();
+ clearTimeout(reconnectTimeout);
+ });
+ } else {
+ var server = net.createServer(function (socket) {
+ if (socketTimeout !== null) { socket.setTimeout(socketTimeout); }
+ var id = (1+Math.random()*4294967295).toString(16);
+ connectionPool[id] = socket;
+ node.status({text:++count+" connections"});
+
+ var buffer = (node.datatype == 'buffer')? new Buffer(0):"";
+ socket.on('data', function (data) {
+ if (node.datatype != 'buffer') {
+ data = data.toString(node.datatype);
+ }
+ if (node.stream) {
+ if ((typeof data) === "string" && node.newline != "") {
+ buffer = buffer+data;
+ var parts = buffer.split(node.newline);
+ for (var i = 0;i<parts.length-1;i+=1) {
+ var msg = {topic:node.topic, payload:parts[i],ip:socket.remoteAddress,port:socket.remotePort};
+ msg._session = {type:"tcp",id:id};
+ node.send(msg);
+ }
+ buffer = parts[parts.length-1];
+ } else {
+ var msg = {topic:node.topic, payload:data};
+ msg._session = {type:"tcp",id:id};
+ node.send(msg);
+ }
+ } else {
+ if ((typeof data) === "string") {
+ buffer = buffer+data;
+ } else {
+ buffer = Buffer.concat([buffer,data],buffer.length+data.length);
+ }
+ }
+ });
+ socket.on('end', function() {
+ if (!node.stream || (node.datatype === "utf8" && node.newline !== "")) {
+ if (buffer.length > 0) {
+ var msg = {topic:node.topic,payload:buffer};
+ msg._session = {type:"tcp",id:id};
+ node.send(msg);
+ }
+ buffer = null;
+ }
+ });
+ socket.on('timeout', function() {
+ node.log('timeout closed socket port '+node.port);
+ socket.end();
+ });
+ socket.on('close', function() {
+ delete connectionPool[id];
+ node.status({text:--count+" connections"});
+ });
+ socket.on('error',function(err) {
+ node.log(err);
+ });
+ });
+ server.on('error', function(err) {
+ if (err) {
+ node.error('unable to listen on port '+node.port+' : '+err);
+ }
+ });
+ server.listen(node.port, function(err) {
+ if (err) {
+ node.error('unable to listen on port '+node.port+' : '+err);
+ } else {
+ node.log('listening on port '+node.port);
+
+ node.on('close', function() {
+ node.closing = true;
+ server.close();
+ node.log('stopped listening on port '+node.port);
+ });
+ }
+ });
+ }
+
+ }
+ RED.nodes.registerType("tcp in",TcpIn);
+
+ function TcpOut(n) {
+ RED.nodes.createNode(this,n);
+ this.host = n.host;
+ this.port = n.port * 1;
+ this.base64 = n.base64;
+ this.doend = n.end || false;
+ this.beserver = n.beserver;
+ this.name = n.name;
+ this.closing = false;
+ var node = this;
+
+ if (!node.beserver||node.beserver=="client") {
+ var reconnectTimeout;
+ var client = null;
+ var connected = false;
+ var end = false;
+
+ var setupTcpClient = function() {
+ node.log("connecting to "+node.host+":"+node.port);
+ node.status({fill:"grey",shape:"dot",text:"connecting"});
+ client = net.connect(node.port, node.host, function() {
+ connected = true;
+ node.log("connected to "+node.host+":"+node.port);
+ node.status({fill:"green",shape:"dot",text:"connected"});
+ });
+ client.on('error', function (err) {
+ node.log('error : '+err);
+ });
+ client.on('end', function (err) {
+ });
+ client.on('close', function() {
+ node.status({fill:"red",shape:"ring",text:"disconnected"});
+ connected = false;
+ client.destroy();
+ if (!node.closing) {
+ if (end) {
+ end = false;
+ reconnectTimeout = setTimeout(setupTcpClient,20);
+ }
+ else {
+ node.log("connection lost to "+node.host+":"+node.port);
+ reconnectTimeout = setTimeout(setupTcpClient,reconnectTime);
+ }
+ }
+ });
+ }
+ setupTcpClient();
+
+ node.on("input", function(msg) {
+ if (connected && msg.payload != null) {
+ if (Buffer.isBuffer(msg.payload)) {
+ client.write(msg.payload);
+ } else if (typeof msg.payload === "string" && node.base64) {
+ client.write(new Buffer(msg.payload,'base64'));
+ } else {
+ client.write(new Buffer(""+msg.payload));
+ }
+ if (node.doend === true) {
+ end = true;
+ client.end();
+ }
+ }
+ });
+
+ node.on("close", function() {
+ this.closing = true;
+ client.end();
+ clearTimeout(reconnectTimeout);
+ });
+
+ } else if (node.beserver == "reply") {
+ node.on("input",function(msg) {
+ if (msg._session && msg._session.type == "tcp") {
+ var client = connectionPool[msg._session.id];
+ if (client) {
+ if (Buffer.isBuffer(msg.payload)) {
+ client.write(msg.payload);
+ } else if (typeof msg.payload === "string" && node.base64) {
+ client.write(new Buffer(msg.payload,'base64'));
+ } else {
+ client.write(new Buffer(""+msg.payload));
+ }
+ }
+ }
+ });
+ } else {
+ var connectedSockets = [];
+ node.status({text:"0 connections"});
+ var server = net.createServer(function (socket) {
+ if (socketTimeout !== null) { socket.setTimeout(socketTimeout); }
+ var remoteDetails = socket.remoteAddress+":"+socket.remotePort;
+ node.log("connection from "+remoteDetails);
+ connectedSockets.push(socket);
+ node.status({text:connectedSockets.length+" connections"});
+ socket.on('timeout', function() {
+ node.log('timeout closed socket port '+node.port);
+ socket.end();
+ });
+ socket.on('close',function() {
+ node.log("connection closed from "+remoteDetails);
+ connectedSockets.splice(connectedSockets.indexOf(socket),1);
+ node.status({text:connectedSockets.length+" connections"});
+ });
+ socket.on('error',function() {
+ node.log("socket error from "+remoteDetails);
+ connectedSockets.splice(connectedSockets.indexOf(socket),1);
+ node.status({text:connectedSockets.length+" connections"});
+ });
+ });
+
+ node.on("input", function(msg) {
+ if (msg.payload != null) {
+ var buffer;
+ if (Buffer.isBuffer(msg.payload)) {
+ buffer = msg.payload;
+ } else if (typeof msg.payload === "string" && node.base64) {
+ buffer = new Buffer(msg.payload,'base64');
+ } else {
+ buffer = new Buffer(""+msg.payload);
+ }
+ for (var i = 0; i<connectedSockets.length;i+=1) {
+ if (node.doend === true) { connectedSockets[i].end(buffer); }
+ else { connectedSockets[i].write(buffer); }
+ }
+ }
+ });
+
+ server.on('error', function(err) {
+ if (err) {
+ node.error('unable to listen on port '+node.port+' : '+err);
+ }
+ });
+
+ server.listen(node.port, function(err) {
+ if (err) {
+ node.error('unable to listen on port '+node.port+' : '+err);
+ } else {
+ node.log('listening on port '+node.port);
+ node.on('close', function() {
+ server.close();
+ node.log('stopped listening on port '+node.port);
+ });
+ }
+ });
+ }
+ }
+ RED.nodes.registerType("tcp out",TcpOut);
+
+ function TcpGet(n) {
+ RED.nodes.createNode(this,n);
+ this.server = n.server;
+ this.port = Number(n.port);
+ this.out = n.out;
+ this.splitc = n.splitc;
+
+ if (this.out != "char") { this.splitc = Number(this.splitc); }
+ else { this.splitc.replace("\\n","\n").replace("\\r","\r").replace("\\t","\t").replace("\\e","\e").replace("\\f","\f").replace("\\0","\0"); }
+
+ var buf;
+ if (this.out == "count") { buf = new Buffer(this.splitc); }
+ else { buf = new Buffer(32768); } // set it to 32k... hopefully big enough for most.... but only hopefully
+
+ this.connected = false;
+ var node = this;
+ var client;
+
+ this.on("input", function(msg) {
+ var i = 0;
+ if ((!Buffer.isBuffer(msg.payload)) && (typeof msg.payload !== "string")) {
+ msg.payload = msg.payload.toString();
+ }
+ if (!node.connected) {
+ client = net.Socket();
+ client.setTimeout(socketTimeout);
+ node.status({});
+ client.connect(node.port, node.server, function() {
+ //node.log('client connected');
+ node.status({fill:"green",shape:"dot",text:"connected"});
+ node.connected = true;
+ client.write(msg.payload);
+ });
+
+ client.on('data', function(data) {
+ //node.log("data:"+ data.length+":"+ data);
+ if (node.splitc === 0) {
+ node.send({"payload": data});
+ }
+ else if (node.out === "sit") { // if we are staying connected just send the buffer
+ node.send({"payload": data});
+ }
+ else {
+ for (var j = 0; j < data.length; j++ ) {
+ if (node.out === "time") {
+ // do the timer thing
+ if (node.tout) {
+ i += 1;
+ buf[i] = data[j];
+ }
+ else {
+ node.tout = setTimeout(function () {
+ node.tout = null;
+ var m = new Buffer(i+1);
+ buf.copy(m,0,0,i+1);
+ node.send({"payload": m});
+ client.end();
+ m = null;
+ }, node.splitc);
+ i = 0;
+ buf[0] = data[j];
+ }
+ }
+ // count bytes into a buffer...
+ else if (node.out == "count") {
+ buf[i] = data[j];
+ i += 1;
+ if ( i >= node.serialConfig.count) {
+ node.send({"payload": buf});
+ client.end();
+ i = 0;
+ }
+ }
+ // look for a char
+ else {
+ buf[i] = data[j];
+ i += 1;
+ if (data[j] == node.splitc) {
+ var m = new Buffer(i);
+ buf.copy(m,0,0,i);
+ node.send({"payload": m});
+ client.end();
+ m = null;
+ i = 0;
+ }
+ }
+ }
+ }
+ });
+
+ client.on('end', function() {
+ //node.log('client disconnected');
+ node.connected = false;
+ node.status({});
+ client = null;
+ });
+
+ client.on('error', function() {
+ node.log('connect failed');
+ node.status({fill:"red",shape:"ring",text:"error"});
+ if (client) { client.end(); }
+ });
+
+ client.on('timeout',function() {
+ node.log('connect timeout');
+ if (client) {
+ client.end();
+ setTimeout(function() {
+ client.connect(node.port, node.server, function() {
+ //node.log('client connected');
+ node.connected = true;
+ client.write(msg.payload);
+ });
+ },reconnectTime);
+ }
+ });
+ }
+ else { client.write(msg.payload); }
+ });
+
+ this.on("close", function() {
+ if (client) { buf = null; client.end(); }
+ });
+
+ }
+ RED.nodes.registerType("tcp request",TcpGet);
+}
diff --git a/dgbuilder/core_nodes/io/32-udp.html b/dgbuilder/core_nodes/io/32-udp.html
new file mode 100644
index 0000000..1c2eed5
--- /dev/null
+++ b/dgbuilder/core_nodes/io/32-udp.html
@@ -0,0 +1,212 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<!-- The Input Node -->
+<script type="text/x-red" data-template-name="udp in">
+ <div class="form-row">
+ <label for="node-input-port"><i class="fa fa-sign-in"></i> Listen</label>
+ on port <input type="text" id="node-input-port" placeholder="Port" style="width: 45px">
+ for <select id="node-input-multicast" style='width:40%'>
+ <option value="false">udp messages</option>
+ <option value="true">multicast messages</option>
+ </select>
+ </div>
+ <div class="form-row node-input-group">
+ <label for="node-input-group"><i class="fa fa-list"></i> Group</label>
+ <input type="text" id="node-input-group" placeholder="225.0.18.83">
+ </div>
+ <div class="form-row node-input-iface">
+ <label for="node-input-iface"><i class="fa fa-random"></i> Interface</label>
+ <input type="text" id="node-input-iface" placeholder="(optional) ip address of eth0">
+ </div>
+ <div class="form-row">
+ <label for="node-input-datatype"><i class="fa fa-sign-out"></i> Output</label>
+ <select id="node-input-datatype" style="width: 70%;">
+ <option value="buffer">a Buffer</option>
+ <option value="utf8">a String</option>
+ <option value="base64">a Base64 encoded string</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips">Tip: Make sure your firewall will allow the data in.</div>
+ <script>
+ $("#node-input-multicast").change(function() {
+ var id = $("#node-input-multicast option:selected").val();
+ if (id == "false") {
+ $(".node-input-group").hide();
+ $(".node-input-iface").hide();
+ }
+ else {
+ $(".node-input-group").show();
+ $(".node-input-iface").show();
+ }
+ });
+ </script>
+</script>
+
+<script type="text/x-red" data-help-name="udp in">
+ <p>A udp input node, that produces a <b>msg.payload</b> containing a <i>BUFFER</i>, string, or base64 encoded string. Supports multicast.</p>
+ <p>It also provides <b>msg.ip</b> and <b>msg.port</b> to the ip address and port from which the message was received.</p>
+ <p>On some systems you may need to be root to use ports below 1024 and/or broadcast.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('udp in',{
+ category: 'input',
+ color:"Silver",
+ defaults: {
+ name: {value:""},
+ iface: {value:""},
+ port: {value:"",required:true,validate:RED.validators.number()},
+ datatype: {value:"buffer",required:true},
+ multicast: {value:"false"},
+ group: {value:"",validate:function(v) { return (this.multicast !== "true")||v.length > 0;} }
+ },
+ inputs:0,
+ outputs:1,
+ icon: "bridge-dash.png",
+ label: function() {
+ if (this.multicast=="false") {
+ return this.name||"udp "+this.port;
+ }
+ else return this.name||"udp "+(this.group+":"+this.port);
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
+
+
+<!-- The Output Node -->
+<script type="text/x-red" data-template-name="udp out">
+ <div class="form-row">
+ <label for="node-input-port"><i class="fa fa-envelope"></i> Send a</label>
+ <select id="node-input-multicast" style='width:40%'>
+ <option value="false">udp message</option>
+ <option value="broad">broadcast message</option>
+ <option value="multi">multicast message</option>
+ </select>
+ to port <input type="text" id="node-input-port" placeholder="port" style="width: 70px">
+ </div>
+ <div class="form-row node-input-addr">
+ <label for="node-input-addr" id="node-input-addr-label"><i class="fa fa-list"></i> Address</label>
+ <input type="text" id="node-input-addr" placeholder="destination ip" style="width: 70%;">
+ </div>
+ <div class="form-row node-input-iface">
+ <label for="node-input-iface"><i class="fa fa-random"></i> Interface</label>
+ <input type="text" id="node-input-iface" placeholder="(optional) ip address of eth0">
+ </div>
+ <div class="form-row">
+ <label for="node-input-outport-type"> </label>
+ <select id="node-input-outport-type">
+ <option id="node-input-outport-type-random" value="random">use random local port</option>
+ <option value="fixed">bind to local port</option>
+ </select>
+ <input type="text" id="node-input-outport" style="width: 70px;" placeholder="port">
+ </div>
+ <div class="form-row">
+ <label> </label>
+ <input type="checkbox" id="node-input-base64" style="display: inline-block; width: auto; vertical-align: top;">
+ <label for="node-input-base64" style="width: 70%;">Decode Base64 encoded payload ?</label>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips">Tip: leave address and port blank if you want to set using <b>msg.ip</b> and <b>msg.port</b>.</div>
+ <script>
+ $("#node-input-multicast").change(function() {
+ var id = $("#node-input-multicast option:selected").val();
+ if (id !== "multi") {
+ $(".node-input-iface").hide();
+ $("#node-input-addr-label").html('<i class="fa fa-list"></i> Address');
+ $("#node-input-addr")[0].placeholder = 'destination ip';
+ }
+ else {
+ $(".node-input-iface").show();
+ $("#node-input-addr-label").html('<i class="fa fa-list"></i> Group');
+ $("#node-input-addr")[0].placeholder = '225.0.18.83';
+ }
+ if (id === "broad") {
+ $("#node-input-addr")[0].placeholder = '255.255.255.255';
+ }
+ });
+ </script>
+</script>
+
+<script type="text/x-red" data-help-name="udp out">
+ <p>This node sends <b>msg.payload</b> to the designated udp host and port. Supports multicast.</p>
+ <p>You may also use <b>msg.ip</b> and <b>msg.port</b> to set the destination values.<br/><b>Note</b>: the statically configured values have precedence.</p>
+ <p>If you select broadcast either set the address to the local broadcast ip address, or maybe try 255.255.255.255, which is the global broadcast address.</p>
+ <p>On some systems you may need to be root to use ports below 1024 and/or broadcast.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('udp out',{
+ category: 'output',
+ color:"Silver",
+ defaults: {
+ name: {value:""},
+ addr: {value:""},
+ iface: {value:""},
+ port: {value:""},
+ outport: {value:""},
+ base64: {value:false,required:true},
+ multicast: {value:"false"}
+ },
+ inputs:1,
+ outputs:0,
+ icon: "bridge-dash.png",
+ align: "right",
+ label: function() {
+ return this.name||"udp "+(this.addr+":"+this.port);
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ var type = this.outport==""?"random":"fixed";
+ $("#node-input-outport-type option").filter(function() {
+ return $(this).val() == type;
+ }).attr('selected',true);
+
+ $("#node-input-outport-type").change(function() {
+ var type = $(this).children("option:selected").val();
+ if (type == "random") {
+ $("#node-input-outport").val("").hide();
+ } else {
+ $("#node-input-outport").show();
+ }
+ });
+
+ $("#node-input-outport-type").change();
+
+ $("#node-input-multicast").change(function() {
+ var type = $(this).children("option:selected").val();
+ if (type == "false") {
+ $("#node-input-outport-type-random").html("bind to random local port");
+ } else {
+ $("#node-input-outport-type-random").html("bind to target port");
+ }
+ });
+ $("#node-input-multicast").change();
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/io/32-udp.js b/dgbuilder/core_nodes/io/32-udp.js
new file mode 100644
index 0000000..a7968e3
--- /dev/null
+++ b/dgbuilder/core_nodes/io/32-udp.js
@@ -0,0 +1,171 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var dgram = require('dgram');
+
+ // The Input Node
+ function UDPin(n) {
+ RED.nodes.createNode(this,n);
+ this.group = n.group;
+ this.port = n.port;
+ this.datatype = n.datatype;
+ this.iface = n.iface || null;
+ this.multicast = n.multicast;
+ var node = this;
+
+ var server = dgram.createSocket('udp4');
+
+ server.on("error", function (err) {
+ if ((err.code == "EACCES") && (node.port < 1024)) {
+ node.error("UDP access error, you may need root access for ports below 1024");
+ } else {
+ node.error("UDP error : "+err.code);
+ }
+ server.close();
+ });
+
+ server.on('message', function (message, remote) {
+ var msg;
+ if (node.datatype =="base64") {
+ msg = { payload:message.toString('base64'), fromip:remote.address+':'+remote.port };
+ } else if (node.datatype =="utf8") {
+ msg = { payload:message.toString('utf8'), fromip:remote.address+':'+remote.port };
+ } else {
+ msg = { payload:message, fromip:remote.address+':'+remote.port, ip:remote.address, port:remote.port };
+ }
+ node.send(msg);
+ });
+
+ server.on('listening', function () {
+ var address = server.address();
+ node.log('udp listener at ' + address.address + ":" + address.port);
+ if (node.multicast == "true") {
+ server.setBroadcast(true);
+ try {
+ server.setMulticastTTL(128);
+ server.addMembership(node.group,node.iface);
+ node.log("udp multicast group "+node.group);
+ } catch (e) {
+ if (e.errno == "EINVAL") {
+ node.error("Bad Multicast Address");
+ } else if (e.errno == "ENODEV") {
+ node.error("Must be ip address of the required interface");
+ } else {
+ node.error("Error :"+e.errno);
+ }
+ }
+ }
+ });
+
+ node.on("close", function() {
+ try {
+ server.close();
+ node.log('udp listener stopped');
+ } catch (err) {
+ node.error(err);
+ }
+ });
+
+ server.bind(node.port,node.iface);
+ }
+ RED.nodes.registerType("udp in",UDPin);
+
+
+ // The Output Node
+ function UDPout(n) {
+ RED.nodes.createNode(this,n);
+ //this.group = n.group;
+ this.port = n.port;
+ this.outport = n.outport||"";
+ this.base64 = n.base64;
+ this.addr = n.addr;
+ this.iface = n.iface || null;
+ this.multicast = n.multicast;
+ var node = this;
+
+ var sock = dgram.createSocket('udp4'); // only use ipv4 for now
+
+ if (node.multicast != "false") {
+ if (node.outport == "") { node.outport = node.port; }
+ sock.bind(node.outport, function() { // have to bind before you can enable broadcast...
+ sock.setBroadcast(true); // turn on broadcast
+ if (node.multicast == "multi") {
+ try {
+ sock.setMulticastTTL(128);
+ sock.addMembership(node.addr,node.iface); // Add to the multicast group
+ node.log('udp multicast ready : '+node.outport+' -> '+node.addr+":"+node.port);
+ } catch (e) {
+ if (e.errno == "EINVAL") {
+ node.error("Bad Multicast Address");
+ } else if (e.errno == "ENODEV") {
+ node.error("Must be ip address of the required interface");
+ } else {
+ node.error("Error :"+e.errno);
+ }
+ }
+ } else {
+ node.log('udp broadcast ready : '+node.outport+' -> '+node.addr+":"+node.port);
+ }
+ });
+ } else if (node.outport != "") {
+ sock.bind(node.outport);
+ node.log('udp ready : '+node.outport+' -> '+node.addr+":"+node.port);
+ } else {
+ node.log('udp ready : '+node.addr+":"+node.port);
+ }
+
+ node.on("input", function(msg) {
+ if (msg.payload != null) {
+ var add = node.addr || msg.ip || "";
+ var por = node.port || msg.port || 0;
+ if (add == "") {
+ node.warn("udp: ip address not set");
+ } else if (por == 0) {
+ node.warn("udp: port not set");
+ } else if (isNaN(por) || (por < 1) || (por > 65535)) {
+ node.warn("udp: port number not valid");
+ } else {
+ var message;
+ if (node.base64) {
+ message = new Buffer(msg.payload, 'base64');
+ } else if (msg.payload instanceof Buffer) {
+ message = msg.payload;
+ } else {
+ message = new Buffer(""+msg.payload);
+ }
+ sock.send(message, 0, message.length, por, add, function(err, bytes) {
+ if (err) {
+ node.error("udp : "+err);
+ }
+ message = null;
+ });
+ }
+ }
+ });
+
+ node.on("close", function() {
+ try {
+ sock.close();
+ node.log('udp output stopped');
+ } catch (err) {
+ node.error(err);
+ }
+ });
+ }
+ RED.nodes.registerType("udp out",UDPout);
+}
diff --git a/dgbuilder/core_nodes/io/lib/mqtt.js b/dgbuilder/core_nodes/io/lib/mqtt.js
new file mode 100644
index 0000000..141a888
--- /dev/null
+++ b/dgbuilder/core_nodes/io/lib/mqtt.js
@@ -0,0 +1,254 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+var util = require("util");
+var mqtt = require("mqtt");
+var events = require("events");
+//var inspect = require("sys").inspect;
+
+//var Client = module.exports.Client = function(
+
+var port = 1883;
+var host = "localhost";
+
+function MQTTClient(port,host) {
+ this.port = port||1883;
+ this.host = host||"localhost";
+ this.messageId = 1;
+ this.pendingSubscriptions = {};
+ this.inboundMessages = {};
+ this.lastOutbound = (new Date()).getTime();
+ this.lastInbound = (new Date()).getTime();
+ this.connected = false;
+
+ this._nextMessageId = function() {
+ this.messageId += 1;
+ if (this.messageId > 0xFFFF) {
+ this.messageId = 1;
+ }
+ return this.messageId;
+ }
+ events.EventEmitter.call(this);
+}
+util.inherits(MQTTClient, events.EventEmitter);
+
+MQTTClient.prototype.connect = function(options) {
+ if (!this.connected) {
+ var self = this;
+ options = options||{};
+ self.options = options;
+ self.options.keepalive = options.keepalive||15;
+ self.options.clean = self.options.clean||true;
+ self.options.protocolId = 'MQIsdp';
+ self.options.protocolVersion = 3;
+
+ self.client = mqtt.createConnection(this.port,this.host,function(err,client) {
+ if (err) {
+ self.connected = false;
+ clearInterval(self.watchdog);
+ self.connectionError = true;
+ //util.log('[mqtt] ['+self.uid+'] connection error 1 : '+inspect(err));
+ self.emit('connectionlost',err);
+ return;
+ }
+ client.on('close',function(e) {
+ //util.log('[mqtt] ['+self.uid+'] on close');
+ clearInterval(self.watchdog);
+ if (!self.connectionError) {
+ if (self.connected) {
+ self.connected = false;
+ self.emit('connectionlost',e);
+ } else {
+ self.emit('disconnect');
+ }
+ }
+ });
+ client.on('error',function(e) {
+ //util.log('[mqtt] ['+self.uid+'] on error : '+inspect(e));
+ clearInterval(self.watchdog);
+ if (self.connected) {
+ self.connected = false;
+ self.emit('connectionlost',e);
+ }
+ });
+ client.on('connack',function(packet) {
+ if (packet.returnCode == 0) {
+ self.watchdog = setInterval(function(self) {
+ var now = (new Date()).getTime();
+
+ //util.log('[mqtt] ['+self.uid+'] watchdog '+inspect({connected:self.connected,connectionError:self.connectionError,pingOutstanding:self.pingOutstanding,now:now,lastOutbound:self.lastOutbound,lastInbound:self.lastInbound}));
+
+ if (now - self.lastOutbound > self.options.keepalive*500 || now - self.lastInbound > self.options.keepalive*500) {
+ if (self.pingOutstanding) {
+ //util.log('[mqtt] ['+self.uid+'] watchdog pingOustanding - disconnect');
+ try {
+ self.client.disconnect();
+ } catch (err) {
+ }
+ } else {
+ //util.log('[mqtt] ['+self.uid+'] watchdog pinging');
+ self.lastOutbound = (new Date()).getTime();
+ self.lastInbound = (new Date()).getTime();
+ self.pingOutstanding = true;
+ self.client.pingreq();
+ }
+ }
+
+ },self.options.keepalive*500,self);
+ self.pingOutstanding = false;
+ self.lastInbound = (new Date()).getTime()
+ self.lastOutbound = (new Date()).getTime()
+ self.connected = true;
+ self.connectionError = false;
+ self.emit('connect');
+ } else {
+ self.connected = false;
+ self.emit('connectionlost');
+ }
+ });
+ client.on('suback',function(packet) {
+ self.lastInbound = (new Date()).getTime()
+ var topic = self.pendingSubscriptions[packet.messageId];
+ self.emit('subscribe',topic,packet.granted[0]);
+ delete self.pendingSubscriptions[packet.messageId];
+ });
+ client.on('unsuback',function(packet) {
+ self.lastInbound = (new Date()).getTime()
+ var topic = self.pendingSubscriptions[packet.messageId];
+ self.emit('unsubscribe',topic,packet.granted[0]);
+ delete self.pendingSubscriptions[packet.messageId];
+ });
+ client.on('publish',function(packet) {
+ self.lastInbound = (new Date()).getTime()
+ if (packet.qos < 2) {
+ var p = packet;
+ self.emit('message',p.topic,p.payload,p.qos,p.retain);
+ } else {
+ self.inboundMessages[packet.messageId] = packet;
+ this.lastOutbound = (new Date()).getTime()
+ self.client.pubrec(packet);
+ }
+ if (packet.qos == 1) {
+ this.lastOutbound = (new Date()).getTime()
+ self.client.puback(packet);
+ }
+ });
+
+ client.on('pubrel',function(packet) {
+ self.lastInbound = (new Date()).getTime()
+ var p = self.inboundMessages[packet.messageId];
+ if (p) {
+ self.emit('message',p.topic,p.payload,p.qos,p.retain);
+ delete self.inboundMessages[packet.messageId];
+ }
+ self.lastOutbound = (new Date()).getTime()
+ self.client.pubcomp(packet);
+ });
+
+ client.on('puback',function(packet) {
+ self.lastInbound = (new Date()).getTime()
+ // outbound qos-1 complete
+ });
+
+ client.on('pubrec',function(packet) {
+ self.lastInbound = (new Date()).getTime()
+ self.lastOutbound = (new Date()).getTime()
+ self.client.pubrel(packet);
+ });
+ client.on('pubcomp',function(packet) {
+ self.lastInbound = (new Date()).getTime()
+ // outbound qos-2 complete
+ });
+ client.on('pingresp',function(packet) {
+ //util.log('[mqtt] ['+self.uid+'] received pingresp');
+ self.lastInbound = (new Date()).getTime()
+ self.pingOutstanding = false;
+ });
+
+ this.lastOutbound = (new Date()).getTime()
+ this.connectionError = false;
+ client.connect(self.options);
+ });
+ }
+}
+
+MQTTClient.prototype.subscribe = function(topic,qos) {
+ var self = this;
+ if (self.connected) {
+ var options = {
+ subscriptions:[{topic:topic,qos:qos}],
+ messageId: self._nextMessageId()
+ };
+ this.pendingSubscriptions[options.messageId] = topic;
+ this.lastOutbound = (new Date()).getTime()
+ self.client.subscribe(options);
+ }
+}
+MQTTClient.prototype.unsubscribe = function(topic) {
+ var self = this;
+ if (self.connected) {
+ var options = {
+ topic:topic,
+ messageId: self._nextMessageId()
+ };
+ this.pendingSubscriptions[options.messageId] = topic;
+ this.lastOutbound = (new Date()).getTime()
+ self.client.unsubscribe(options);
+ }
+}
+
+MQTTClient.prototype.publish = function(topic,payload,qos,retain) {
+ var self = this;
+ if (self.connected) {
+
+ if (!Buffer.isBuffer(payload)) {
+ if (typeof payload === "object") {
+ payload = JSON.stringify(payload);
+ } else if (typeof payload !== "string") {
+ payload = ""+payload;
+ }
+ }
+ var options = {
+ topic: topic,
+ payload: payload,
+ qos: qos||0,
+ retain:retain||false
+ };
+ if (options.qos != 0) {
+ options.messageId = self._nextMessageId();
+ }
+ this.lastOutbound = (new Date()).getTime()
+ self.client.publish(options);
+ }
+}
+
+MQTTClient.prototype.disconnect = function() {
+ var self = this;
+ if (this.connected) {
+ this.connected = false;
+ try {
+ this.client.disconnect();
+ } catch(err) {
+ }
+ }
+}
+MQTTClient.prototype.isConnected = function() {
+ return this.connected;
+}
+module.exports.createClient = function(port,host) {
+ var mqtt_client = new MQTTClient(port,host);
+ return mqtt_client;
+}
+
diff --git a/dgbuilder/core_nodes/io/lib/mqttConnectionPool.js b/dgbuilder/core_nodes/io/lib/mqttConnectionPool.js
new file mode 100644
index 0000000..d15f0fc
--- /dev/null
+++ b/dgbuilder/core_nodes/io/lib/mqttConnectionPool.js
@@ -0,0 +1,128 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+var util = require("util");
+var mqtt = require("./mqtt");
+var settings = require(process.env.NODE_RED_HOME+"/red/red").settings;
+
+var connections = {};
+
+function matchTopic(ts,t) {
+ if (ts == "#") {
+ return true;
+ }
+ var re = new RegExp("^"+ts.replace(/([\[\]\?\(\)\\\\$\^\*\.|])/g,"\\$1").replace(/\+/g,"[^/]+").replace(/\/#$/,"(\/.*)?")+"$");
+ return re.test(t);
+}
+
+module.exports = {
+ get: function(broker,port,clientid,username,password,will) {
+ var id = "["+(username||"")+":"+(password||"")+"]["+(clientid||"")+"]@"+broker+":"+port;
+ if (!connections[id]) {
+ connections[id] = function() {
+ var uid = (1+Math.random()*4294967295).toString(16);
+ var client = mqtt.createClient(port,broker);
+ client.uid = uid;
+ client.setMaxListeners(0);
+ var options = {keepalive:15};
+ options.clientId = clientid || 'mqtt_' + (1+Math.random()*4294967295).toString(16);
+ options.username = username;
+ options.password = password;
+ options.will = will;
+ var queue = [];
+ var subscriptions = [];
+ var connecting = false;
+ var obj = {
+ _instances: 0,
+ publish: function(msg) {
+ if (client.isConnected()) {
+ client.publish(msg.topic,msg.payload,msg.qos,msg.retain);
+ } else {
+ if (!connecting) {
+ connecting = true;
+ client.connect(options);
+ }
+ queue.push(msg);
+ }
+ },
+ subscribe: function(topic,qos,callback) {
+ subscriptions.push({topic:topic,qos:qos,callback:callback});
+ client.on('message',function(mtopic,mpayload,mqos,mretain) {
+ if (matchTopic(topic,mtopic)) {
+ callback(mtopic,mpayload,mqos,mretain);
+ }
+ });
+ if (client.isConnected()) {
+ client.subscribe(topic,qos);
+ }
+ },
+ on: function(a,b){
+ client.on(a,b);
+ },
+ once: function(a,b){
+ client.once(a,b);
+ },
+ connect: function() {
+ if (client && !client.isConnected() && !connecting) {
+ connecting = true;
+ client.connect(options);
+ }
+ },
+ disconnect: function() {
+ this._instances -= 1;
+ if (this._instances == 0) {
+ client.disconnect();
+ client = null;
+ delete connections[id];
+ }
+ }
+ };
+ client.on('connect',function() {
+ if (client) {
+ util.log('[mqtt] ['+uid+'] connected to broker tcp://'+broker+':'+port);
+ connecting = false;
+ for (var s in subscriptions) {
+ var topic = subscriptions[s].topic;
+ var qos = subscriptions[s].qos;
+ var callback = subscriptions[s].callback;
+ client.subscribe(topic,qos);
+ }
+ //console.log("connected - publishing",queue.length,"messages");
+ while(queue.length) {
+ var msg = queue.shift();
+ //console.log(msg);
+ client.publish(msg.topic,msg.payload,msg.qos,msg.retain);
+ }
+ }
+ });
+ client.on('connectionlost', function(err) {
+ util.log('[mqtt] ['+uid+'] connection lost to broker tcp://'+broker+':'+port);
+ connecting = false;
+ setTimeout(function() {
+ obj.connect();
+ }, settings.mqttReconnectTime||5000);
+ });
+ client.on('disconnect', function() {
+ connecting = false;
+ util.log('[mqtt] ['+uid+'] disconnected from broker tcp://'+broker+':'+port);
+ });
+
+ return obj
+ }();
+ }
+ connections[id]._instances += 1;
+ return connections[id];
+ }
+};
diff --git a/dgbuilder/core_nodes/logic/10-switch.html b/dgbuilder/core_nodes/logic/10-switch.html
new file mode 100644
index 0000000..4e02f44
--- /dev/null
+++ b/dgbuilder/core_nodes/logic/10-switch.html
@@ -0,0 +1,198 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="switch">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row" style="padding-top:10px;">
+ If msg.<input type="text" id="node-input-property" style="width: 200px;"/>
+ </div>
+ <div class="form-row">
+ <div id="node-input-rule-container-div" style="border-radius: 5px; height: 310px; padding: 5px; border: 1px solid #ccc; overflow-y:scroll;">
+ <ol id="node-input-rule-container" style=" list-style-type:none; margin: 0;">
+ </ol>
+ </div>
+ <a href="#" class="btn btn-mini" id="node-input-add-rule" style="margin-top: 4px;"><i class="fa fa-plus"></i> Add</a>
+ </div>
+ <div>
+ <select id="node-input-checkall" style="width:100%; margin-right:5px;">
+ <option value="true">checking all rules</option>
+ <option value="false">stopping after first match</option>
+ </select>
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="switch">
+ <p>A simple function node to route messages based on its properties.</p>
+ <p>When a message arrives, the selected property is evaluated against each
+ of the defined rules. The message is then sent to the output of <i>all</i>
+ rules that pass.</p>
+ <p>Note: the <i>otherwise</i> rule applies as a "not any of" the rules preceding it.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('switch', {
+ color: "#E2D96E",
+ category: 'function',
+ defaults: {
+ name: {value:""},
+ property: {value:"payload", required:true},
+ rules: {value:[{t:"eq", v:""}]},
+ checkall: {value:"true", required:true},
+ outputs: {value:1}
+ },
+ inputs: 1,
+ outputs: 1,
+ icon: "switch.png",
+ label: function() {
+ return this.name||"switch";
+ },
+ oneditprepare: function() {
+
+ var operators = [
+ {v:"eq",t:"=="},
+ {v:"neq",t:"!="},
+ {v:"lt",t:"<"},
+ {v:"lte",t:"<="},
+ {v:"gt",t:">"},
+ {v:"gte",t:">="},
+ {v:"btwn",t:"is between"},
+ {v:"cont",t:"contains"},
+ {v:"regex",t:"matches regex"},
+ {v:"true",t:"is true"},
+ {v:"false",t:"is false"},
+ {v:"null",t:"is null"},
+ {v:"nnull",t:"is not null"},
+ {v:"else",t:"otherwise"}
+ ];
+
+ function generateRule(i,rule) {
+ var container = $('<li/>',{style:"margin:0; padding:8px 0px; border-bottom: 1px solid #ccc;"});
+ var row = $('<div/>').appendTo(container);
+ var row2 = $('<div/>',{style:"padding-top: 5px; text-align: right;"}).appendTo(container);
+
+ var selectField = $('<select/>',{style:"width:120px; margin-left: 5px; text-align: center;"}).appendTo(row);
+ for (var d in operators) {
+ selectField.append($("<option></option>").val(operators[d].v).text(operators[d].t));
+ }
+
+ var valueField = $('<input/>',{class:"node-input-rule-value",type:"text",style:"margin-left: 5px; width: 145px;"}).appendTo(row);
+ var btwnField = $('<span/>').appendTo(row);
+ var btwnValueField = $('<input/>',{class:"node-input-rule-btwn-value",type:"text",style:"margin-left: 5px; width: 50px;"}).appendTo(btwnField);
+ btwnField.append(" and ");
+ var btwnValue2Field = $('<input/>',{class:"node-input-rule-btwn-value2",type:"text",style:"width: 50px;margin-left:2px;"}).appendTo(btwnField);
+
+ var finalspan = $('<span/>',{style:"float: right; margin-top: 3px;margin-right: 10px;"}).appendTo(row);
+ finalspan.append(' send to <span class="node-input-rule-index">'+i+'</span> ');
+
+ selectField.change(function() {
+ var type = selectField.children("option:selected").val();
+ if (type.length < 4) {
+ selectField.css({"width":"60px"});
+ } else if (type === "regex") {
+ selectField.css({"width":"147px"});
+ } else {
+ selectField.css({"width":"120px"});
+ }
+ if (type === "btwn") {
+ valueField.hide();
+ btwnField.show();
+ } else {
+ btwnField.hide();
+ if (type === "true" || type === "false" || type === "null" || type === "nnull" || type === "else") {
+ valueField.hide();
+ } else {
+ valueField.show();
+ }
+ }
+ });
+
+ var deleteButton = $('<a/>',{href:"#",class:"btn btn-mini", style:"margin-left: 5px;"}).appendTo(finalspan);
+ $('<i/>',{class:"fa fa-remove"}).appendTo(deleteButton);
+
+ deleteButton.click(function() {
+ container.css({"background":"#fee"});
+ container.fadeOut(300, function() {
+ $(this).remove();
+ $("#node-input-rule-container").children().each(function(i) {
+ $(this).find(".node-input-rule-index").html(i+1);
+ });
+
+ });
+ });
+
+ $("#node-input-rule-container").append(container);
+
+ selectField.find("option").filter(function() {return $(this).val() == rule.t;}).attr('selected',true);
+ if (rule.t == "btwn") {
+ btwnValueField.val(rule.v);
+ btwnValue2Field.val(rule.v2);
+ } else if (typeof rule.v != "undefined") {
+ valueField.val(rule.v);
+ }
+ selectField.change();
+ }
+
+ $("#node-input-add-rule").click(function() {
+ generateRule($("#node-input-rule-container").children().length+1,{t:"",v:"",v2:""});
+ $("#node-input-rule-container-div").scrollTop($("#node-input-rule-container-div").get(0).scrollHeight);
+ });
+
+ for (var i=0;i<this.rules.length;i++) {
+ var rule = this.rules[i];
+ generateRule(i+1,rule);
+ }
+
+ function switchDialogResize(ev,ui) {
+ $("#node-input-rule-container-div").css("height",(ui.size.height-260)+"px");
+ };
+
+ $( "#dialog" ).on("dialogresize", switchDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-switch');
+ if (size) {
+ switchDialogResize(null,{size:size});
+ }
+ });
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ $( "#dialog" ).off("dialogresize",switchDialogResize);
+ });
+ },
+ oneditsave: function() {
+ var rules = $("#node-input-rule-container").children();
+ var ruleset;
+ var node = this;
+ node.rules= [];
+ rules.each(function(i) {
+ var rule = $(this);
+ var type = rule.find("select option:selected").val();
+ var r = {t:type};
+ if (!(type === "true" || type === "false" || type === "null" || type === "nnull" || type === "else")) {
+ if (type === "btwn") {
+ r.v = rule.find(".node-input-rule-btwn-value").val();
+ r.v2 = rule.find(".node-input-rule-btwn-value2").val();
+ } else {
+ r.v = rule.find(".node-input-rule-value").val();
+ }
+ }
+ node.rules.push(r);
+ });
+ node.outputs = node.rules.length;
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/logic/10-switch.js b/dgbuilder/core_nodes/logic/10-switch.js
new file mode 100644
index 0000000..8bcb857
--- /dev/null
+++ b/dgbuilder/core_nodes/logic/10-switch.js
@@ -0,0 +1,78 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var operators = {
+ 'eq': function(a, b) { return a == b; },
+ 'neq': function(a, b) { return a != b; },
+ 'lt': function(a, b) { return a < b; },
+ 'lte': function(a, b) { return a <= b; },
+ 'gt': function(a, b) { return a > b; },
+ 'gte': function(a, b) { return a >= b; },
+ 'btwn': function(a, b, c) { return a >= b && a <= c; },
+ 'cont': function(a, b) { return (a + "").indexOf(b) != -1; },
+ 'regex': function(a, b) { return (a + "").match(new RegExp(b)); },
+ 'true': function(a) { return a === true; },
+ 'false': function(a) { return a === false; },
+ 'null': function(a) { return typeof a == "undefined"; },
+ 'nnull': function(a) { return typeof a != "undefined"; },
+ 'else': function(a) { return a === true; }
+ };
+
+ function SwitchNode(n) {
+ RED.nodes.createNode(this, n);
+ this.rules = n.rules;
+ this.property = n.property;
+ this.checkall = n.checkall || "true";
+ var propertyParts = n.property.split(".");
+ var node = this;
+
+ for (var i=0; i<this.rules.length; i+=1) {
+ var rule = this.rules[i];
+ if (!isNaN(Number(rule.v))) {
+ rule.v = Number(rule.v);
+ rule.v2 = Number(rule.v2);
+ }
+ }
+
+ this.on('input', function (msg) {
+ var onward = [];
+ try {
+ var prop = propertyParts.reduce(function (obj, i) {
+ return obj[i]
+ }, msg);
+ var elseflag = true;
+ for (var i=0; i<node.rules.length; i+=1) {
+ var rule = node.rules[i];
+ var test = prop;
+ if (rule.t == "else") { test = elseflag; elseflag = true; }
+ if (operators[rule.t](test,rule.v, rule.v2)) {
+ onward.push(msg);
+ elseflag = false;
+ if (node.checkall == "false") { break; }
+ } else {
+ onward.push(null);
+ }
+ }
+ this.send(onward);
+ } catch(err) {
+ node.warn(err);
+ }
+ });
+ }
+ RED.nodes.registerType("switch", SwitchNode);
+}
diff --git a/dgbuilder/core_nodes/logic/15-change.html b/dgbuilder/core_nodes/logic/15-change.html
new file mode 100644
index 0000000..702dd80
--- /dev/null
+++ b/dgbuilder/core_nodes/logic/15-change.html
@@ -0,0 +1,139 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="change">
+ <div>
+ <select id="node-input-action" style="width:95%; margin-right:5px;">
+ <option value="replace">Set the value of the message property</option>
+ <option value="change">Search/replace the value of the message property</option>
+ <option value="delete">Delete the message property</option>
+ </select>
+ </div>
+ <div class="form-row" style="padding-top:10px;" id="node-prop1-row">
+ <label for="node-input-property">called</label> msg.<input type="text" id="node-input-property" style="width: 63%;"/>
+ </div>
+ <div class="form-row" id="node-from-row">
+ <label for="node-input-from" id="node-input-f"></label>
+ <input type="text" id="node-input-from" placeholder="this"/>
+ </div>
+ <div class="form-row" id="node-to-row">
+ <label for="node-input-to" id="node-input-t"></label>
+ <input type="text" id="node-input-to" placeholder="that"/>
+ </div>
+ <div class="form-row" id="node-reg-row">
+ <label> </label>
+ <input type="checkbox" id="node-input-reg" style="display: inline-block; width: auto; vertical-align: top;">
+ <label for="node-input-reg" style="width: 70%;">Use regular expressions ?</label>
+ </div>
+ <div class="form-tips" id="node-tip"></div>
+ <br/>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="change">
+ <p>A simple function node to change, replace, add or delete properties of a message.</p>
+ <p>When a message arrives, the selected property is modified by the defined rules.
+ The message is then sent to the output.</p>
+ <p><b>Note:</b> Replace only operates on <b>strings</b>. Anything else will be passed straight through.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('change', {
+ color: "#E2D96E",
+ category: 'function',
+ defaults: {
+ action: {value:"replace",required:true},
+ property: {value:"payload",required:true},
+ from: {value:"",validate: function(v) {
+ if (this.action == "change" && this.reg) {
+ try {
+ var re = new RegExp(this.from, "g");
+ return true;
+ } catch(err) {
+ return false;
+ }
+ }
+ return true;
+ }},
+ to: {value:""},
+ reg: {value:false},
+ name: {value:""}
+ },
+ inputs: 1,
+ outputs: 1,
+ icon: "swap.png",
+ label: function() {
+ if (this.name) {
+ return this.name;
+ }
+ if (this.action == "replace") {
+ return "set msg."+this.property;
+ } else {
+ return this.action+" msg."+this.property
+ }
+ },
+ labelStyle: function() {
+ return this.name ? "node_label_italic" : "";
+ },
+ oneditprepare: function() {
+ if (this.reg === null) { $("#node-input-reg").prop('checked', true); }
+ $("#node-input-action").change( function() {
+ var a = $("#node-input-action").val();
+ if (a === "replace") {
+ $("#node-input-todo").html("called");
+ //$("#node-input-f").html("name");
+ $("#node-input-t").html("to");
+ $("#node-from-row").hide();
+ $("#node-to-row").show();
+ $("#node-reg-row").hide();
+ $("#node-tip").show();
+ $("#node-tip").html("Tip: expects a new property name and either a fixed value OR the full name of another message property eg: msg.sentiment.score");
+ }
+ if (a === "delete") {
+ $("#node-input-todo").html("called");
+ //$("#node-input-f").html("called");
+ //$("#node-input-t").html("to");
+ $("#node-from-row").hide();
+ $("#node-to-row").hide();
+ $("#node-reg-row").hide();
+ $("#node-tip").hide();
+ }
+ if (a === "change") {
+ $("#node-input-todo").html("called");
+ $("#node-input-f").html("Search for");
+ $("#node-input-t").html("replace with");
+ $("#node-from-row").show();
+ $("#node-to-row").show();
+ $("#node-reg-row").show();
+ $("#node-tip").show();
+ $("#node-tip").html("Tip: only works on string properties. If regular expressions are used, the <i>replace with</i> field can contain capture results, eg $1.");
+ }
+ //if (a === "replace") {
+ // $("#node-input-todo").html("called");
+ // //$("#node-input-f").html("with");
+ // $("#node-input-t").html("with");
+ // $("#node-from-row").hide();
+ // $("#node-to-row").show();
+ // $("#node-tip").html("Tip: accepts either a fixed value OR the full name of another msg.property eg: msg.sentiment.score");
+ //}
+ });
+ $("#node-input-action").change();
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/logic/15-change.js b/dgbuilder/core_nodes/logic/15-change.js
new file mode 100644
index 0000000..b7ef62e
--- /dev/null
+++ b/dgbuilder/core_nodes/logic/15-change.js
@@ -0,0 +1,74 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ function ChangeNode(n) {
+ RED.nodes.createNode(this, n);
+ this.action = n.action;
+ this.property = n.property || "";
+ this.from = n.from || " ";
+ this.to = n.to || " ";
+ this.reg = (n.reg === null || n.reg);
+ var node = this;
+ if (node.reg === false) {
+ this.from = this.from.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+ }
+ var makeNew = function( stem, path, value ) {
+ var lastPart = (arguments.length === 3) ? path.pop() : false;
+ for (var i = 0; i < path.length; i++) {
+ stem = stem[path[i]] = stem[path[i]] || {};
+ }
+ if (lastPart) { stem = stem[lastPart] = value; }
+ return stem;
+ };
+
+ this.on('input', function (msg) {
+ if (node.action == "change") {
+ try {
+ node.re = new RegExp(this.from, "g");
+ } catch (e) {
+ node.error(e.message);
+ }
+ if (typeof msg[node.property] === "string") {
+ msg[node.property] = (msg[node.property]).replace(node.re, node.to);
+ }
+ }
+ //else if (node.action == "replace") {
+ //if (node.to.indexOf("msg.") == 0) {
+ //msg[node.property] = eval(node.to);
+ //}
+ //else {
+ //msg[node.property] = node.to;
+ //}
+ //}
+ else if (node.action == "replace") {
+ if (node.to.indexOf("msg.") === 0) {
+ makeNew( msg, node.property.split("."), eval(node.to) );
+ }
+ else {
+ makeNew( msg, node.property.split("."), node.to );
+ }
+ //makeNew( msg, node.property.split("."), node.to );
+ }
+ else if (node.action == "delete") {
+ delete(msg[node.property]);
+ }
+ node.send(msg);
+ });
+ }
+ RED.nodes.registerType("change", ChangeNode);
+}
diff --git a/dgbuilder/core_nodes/logic/16-range.html b/dgbuilder/core_nodes/logic/16-range.html
new file mode 100644
index 0000000..5f87128
--- /dev/null
+++ b/dgbuilder/core_nodes/logic/16-range.html
@@ -0,0 +1,81 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="range">
+ <div class="form-row">
+ <label for="node-input-action"><i class="fa fa-dot-circle-o"></i> Action</label>
+ <select id="node-input-action" style="width:70%; margin-right:5px;">
+ <option value="scale">Scale msg.payload</option>
+ <option value="clamp">Scale and limit to the target range</option>
+ <option value="roll">Scale and wrap within the target range</option>
+ </select>
+ </div>
+ <br/>
+ <div class="form-row"><i class="fa fa-sign-in"></i> Map the input range:</div>
+ <div class="form-row"><label></label>
+ from: <input type="text" id="node-input-minin" placeholder="e.g. 0" style="width:100px;"/>
+ to: <input type="text" id="node-input-maxin" placeholder="e.g. 99" style="width:100px;"/>
+ </div>
+ <div class="form-row"><i class="fa fa-sign-out"></i> to the result range:</div>
+ <div class="form-row"><label></label>
+ from: <input type="text" id="node-input-minout" placeholder="e.g. 0" style="width:100px;"/>
+ to: <input type="text" id="node-input-maxout" placeholder="e.g. 255" style="width:100px;"/>
+ </div>
+ <br/>
+ <div class="form-row"><label></label>
+ <input type="checkbox" id="node-input-round" style="display: inline-block; width: auto; vertical-align: top;">
+ <label style="width: auto;" for="node-input-round">Round result to the nearest integer?</label></input>
+ </div>
+ <br/>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips" id="node-tip">Tip: This node ONLY works with numbers.</div>
+</script>
+
+<script type="text/x-red" data-help-name="range">
+ <p>A simple function node to remap numeric input values to another scale.</p>
+ <p>Currently only does a linear scaling.</p>
+ <p><b>Note:</b> This only operates on <b>numbers</b>. Anything else will try to be made into a number and rejected if that fails.</p>
+ <p><i>Scale and limit to target range</i> means that the result will never be outside the range specified within the result range.</p>
+ <p><i>Scale and wrap within the target range</i> means that the result will essentially be a "modulo-style" wrap-around within the result range.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('range', {
+ color: "#E2D96E",
+ category: 'function',
+ defaults: {
+ minin: {value:"",required:true,validate:RED.validators.number()},
+ maxin: {value:"",required:true,validate:RED.validators.number()},
+ minout: {value:"",required:true,validate:RED.validators.number()},
+ maxout: {value:"",required:true,validate:RED.validators.number()},
+ action: {value:"scale"},
+ round: {value:false},
+ name: {value:""}
+ },
+ inputs: 1,
+ outputs: 1,
+ icon: "range.png",
+ label: function() {
+ return this.name || "range";
+ },
+ labelStyle: function() {
+ return this.name ? "node_label_italic" : "";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/logic/16-range.js b/dgbuilder/core_nodes/logic/16-range.js
new file mode 100644
index 0000000..ec39342
--- /dev/null
+++ b/dgbuilder/core_nodes/logic/16-range.js
@@ -0,0 +1,48 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ function RangeNode(n) {
+ RED.nodes.createNode(this, n);
+ this.action = n.action;
+ this.round = n.round || false;
+ this.minin = Number(n.minin);
+ this.maxin = Number(n.maxin);
+ this.minout = Number(n.minout);
+ this.maxout = Number(n.maxout);
+ var node = this;
+
+ this.on('input', function (msg) {
+ var n = Number(msg.payload);
+ if (!isNaN(n)) {
+ if (node.action == "clamp") {
+ if (n < node.minin) { n = node.minin; }
+ if (n > node.maxin) { n = node.maxin; }
+ }
+ if (node.action == "roll") {
+ if (n >= node.maxin) { n = (n - node.minin) % (node.maxin - node.minin) + node.minin; }
+ if (n < node.minin) { n = (n - node.minin) % (node.maxin - node.minin) + node.maxin; }
+ }
+ msg.payload = ((n - node.minin) / (node.maxin - node.minin) * (node.maxout - node.minout)) + node.minout;
+ if (node.round) { msg.payload = Math.round(msg.payload); }
+ node.send(msg);
+ }
+ else { node.log("Not a number: "+msg.payload); }
+ });
+ }
+ RED.nodes.registerType("range", RangeNode);
+}
diff --git a/dgbuilder/core_nodes/parsers/70-CSV.html b/dgbuilder/core_nodes/parsers/70-CSV.html
new file mode 100644
index 0000000..5632246
--- /dev/null
+++ b/dgbuilder/core_nodes/parsers/70-CSV.html
@@ -0,0 +1,123 @@
+
+<!--
+ Copyright 2014 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="csv">
+ <div class="form-row">
+ <label for="node-input-temp"><i class="fa fa-list"></i> Columns</label>
+ <input type="text" id="node-input-temp" placeholder="comma-separated column names">
+ </div>
+ <div class="form-row">
+ <label for="node-input-select-sep"><i class="fa fa-text-width"></i> Separator</label>
+ <select style="width: 150px" id="node-input-select-sep">
+ <option value=",">comma</option>
+ <option value="\t">tab</option>
+ <option value=" ">space</option>
+ <option value=";">semicolon</option>
+ <option value=":">colon</option>
+ <option value="">other...</option>
+ </select>
+ <input style="width: 40px;" type="text" id="node-input-sep" pattern=".">
+ </div>
+
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <hr align="middle"/>
+ <div class="form-row">
+ <label style="width: 100%;"><i class="fa fa-gears"></i> CSV-to-Object options</label>
+ <label style="margin-left: 10px; margin-right: -10px;"><i class="fa fa-sign-in"></i> Input</label>
+ <input style="width: 30px" type="checkbox" id="node-input-hdrin"><label style="width: auto;" for="node-input-hdrin">first row contains column names</span>
+ </div>
+ <div class="form-row">
+ <label style="margin-left: 10px; margin-right: -10px;"><i class="fa fa-sign-out"></i> Output</label>
+ <select type="text" id="node-input-multi" style="width: 250px;">
+ <option value="one">a message per row</option>
+ <option value="mult">a single message [array]</option>
+ </select>
+ </div>
+ <hr align="middle"/>
+ <div class="form-row">
+ <label style="width: 100%;"><i class="fa fa-gears"></i> Object-to-CSV options</label>
+ <label style="margin-left: 10px; margin-right: -10px;"><i class="fa fa-sign-in"></i> Output</label>
+ <input style="width: 30px" type="checkbox" id="node-input-hdrout"><label style="width: auto;" for="node-input-hdrout">include column name row</span>
+ </div>
+ <div class="form-row">
+ <label style="margin-left: 10px; margin-right: -10px;"><i class="fa fa-align-left"></i> Newline</label>
+ <select style="width: 150px" id="node-input-ret">
+ <option value='\n'>Linux (\n)</option>
+ <option value='\r'>Mac (\r)</option>
+ <option value='\r\n'>Windows (\r\n)</option>
+ </select>
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="csv">
+ <p>A function that parses the <b>msg.payload</b> to convert csv to/from a javascript object.
+ Places the result in the payload.</p>
+ <p>If the input is a string it tries to parse it as CSV and creates a javascript object.</p>
+ <p>If the input is a javascript object it tries to build a CSV string.</p>
+ <p>The columns template should contain an ordered list of column headers. For csv input these become the property names.
+ For csv output these specify the properties to extract from the object and the order for the csv.</p>
+ <p><b>Note:</b> the columns should always be specified comma separated - even if another separator is chosen for the data.</p>
+ </script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('csv',{
+ category: 'function',
+ color:"#DEBD5C",
+ defaults: {
+ name: {value:""},
+ sep: {value:',',required:true,validate:RED.validators.regex(/^.{1,2}$/)},
+ //quo: {value:'"',required:true},
+ hdrin: {value:""},
+ hdrout: {value:""},
+ multi: {value:"one",required:true},
+ ret: {value:'\\n'},
+ temp: {value:""}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name||"csv";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ if (this.sep == "," || this.sep == "\\t" || this.sep == ";" || this.sep == ":" || this.sep == " ") {
+ $("#node-input-select-sep").val(this.sep);
+ $("#node-input-sep").hide();
+ } else {
+ $("#node-input-select-sep").val("");
+ $("#node-input-sep").val(this.sep);
+ $("#node-input-sep").show();
+ }
+ $("#node-input-select-sep").change(function() {
+ var v = $("#node-input-select-sep option:selected").val();
+ $("#node-input-sep").val(v);
+ if (v == "") {
+ $("#node-input-sep").val("");
+ $("#node-input-sep").show().focus();
+ } else {
+ $("#node-input-sep").hide();
+ }
+ });
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/parsers/70-CSV.js b/dgbuilder/core_nodes/parsers/70-CSV.js
new file mode 100644
index 0000000..56aa7c7
--- /dev/null
+++ b/dgbuilder/core_nodes/parsers/70-CSV.js
@@ -0,0 +1,157 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ function CSVNode(n) {
+ RED.nodes.createNode(this,n);
+ this.template = n.temp.split(",");
+ this.sep = (n.sep || ',').replace("\\t","\t").replace("\\n","\n").replace("\\r","\r");
+ this.quo = '"';
+ this.ret = (n.ret || "\n").replace("\\n","\n").replace("\\r","\r");
+ this.winflag = (this.ret === "\r\n");
+ this.lineend = "\n";
+ this.multi = n.multi || "one";
+ this.hdrin = n.hdrin || false;
+ this.hdrout = n.hdrout || false;
+ this.goodtmpl = true;
+ var node = this;
+
+ // pass in an array of column names to be trimed, de-quoted and retrimed
+ var clean = function(col) {
+ for (var t = 0; t < col.length; t++) {
+ col[t] = col[t].trim(); // remove leading and trailing whitespace
+ if (col[t].charAt(0) === '"' && col[t].charAt(col[t].length -1) === '"') {
+ // remove leading and trailing quotes (if they exist) - and remove whitepace again.
+ col[t] = col[t].substr(1,col[t].length -2).trim();
+ }
+ }
+ if ((col.length === 1) && (col[0] === "")) { node.goodtmpl = false; }
+ else { node.goodtmpl = true; }
+ return col;
+ }
+ node.template = clean(node.template);
+
+ this.on("input", function(msg) {
+ if (msg.hasOwnProperty("payload")) {
+ if (typeof msg.payload == "object") { // convert object to CSV string
+ try {
+ var ou = "";
+ if (node.hdrout) {
+ ou += node.template.join(node.sep) + node.ret;
+ }
+ if (!Array.isArray(msg.payload)) { msg.payload = [ msg.payload ]; }
+ for (var s = 0; s < msg.payload.length; s++) {
+ for (var t=0; t < node.template.length; t++) {
+
+ // aaargh - resorting to eval here - but fairly contained front and back.
+ var p = RED.util.ensureString(eval("msg.payload[s]."+node.template[t]));
+
+ if (p === "undefined") { p = ""; }
+ if (p.indexOf(node.sep) != -1) { // add quotes if any "commas"
+ ou += node.quo + p + node.quo + node.sep;
+ }
+ else if (p.indexOf(node.quo) != -1) { // add double quotes if any quotes
+ p = p.replace(/"/g, '""');
+ ou += node.quo + p + node.quo + node.sep;
+ }
+ else { ou += p + node.sep; } // otherwise just add
+ }
+ ou = ou.slice(0,-1) + node.ret; // remove final "comma" and add "newline"
+ }
+ node.send({payload:ou});
+ }
+ catch(e) { node.log(e); }
+ }
+ else if (typeof msg.payload == "string") { // convert CSV string to object
+ try {
+ var f = true; // flag to indicate if inside or outside a pair of quotes true = outside.
+ var j = 0; // pointer into array of template items
+ var k = [""]; // array of data for each of the template items
+ var o = {}; // output object to build up
+ var a = []; // output array is needed for multiline option
+ var first = true; // is this the first line
+ var tmp = "";
+
+ // For now we are just going to assume that any \r or \n means an end of line...
+ // got to be a weird csv that has singleton \r \n in it for another reason...
+
+ // Now process the whole file/line
+ for (var i = 0; i < msg.payload.length; i++) {
+ if ((node.hdrin === true) && first) { // if the template is in the first line
+ if ((msg.payload[i] === "\n")||(msg.payload[i] === "\r")) { // look for first line break
+ node.template = clean(tmp.split(node.sep));
+ first = false;
+ }
+ else { tmp += msg.payload[i]; }
+ }
+ else {
+ if (msg.payload[i] === node.quo) { // if it's a quote toggle inside or outside
+ f = !f;
+ if (msg.payload[i-1] === node.quo) { k[j] += '\"'; } // if it's a quotequote then it's actually a quote
+ }
+ else if ((msg.payload[i] === node.sep) && f) { // if we are outside of quote (ie valid separator
+ if (!node.goodtmpl) { node.template[j] = "col"+(j+1); }
+ if ( node.template[j] && (node.template[j] !== "") && (k[j] !== "" ) ) {
+ if (!isNaN(Number(k[j]))) { k[j] = Number(k[j]); }
+ o[node.template[j]] = k[j];
+ }
+ j += 1;
+ k[j] = "";
+ }
+ else if (f && ((msg.payload[i] === "\n") || (msg.payload[i] === "\r"))) { // handle multiple lines
+ //console.log(j,k,o,k[j]);
+ if ( node.template[j] && (node.template[j] !== "") && (k[j] !== "") ) {
+ if (!isNaN(Number(k[j]))) { k[j] = Number(k[j]); }
+ else { k[j].replace(/\r$/,''); }
+ o[node.template[j]] = k[j];
+ }
+ if (JSON.stringify(o) !== "{}") { // don't send empty objects
+ if (node.multi === "one") { node.send({payload:o}); } // either send
+ else { a.push(o); } // or add to the array
+ }
+ j = 0;
+ k = [""];
+ o = {};
+ }
+ else { // just add to the part of the message
+ k[j] += msg.payload[i];
+ }
+ }
+ }
+ // Finished so finalize and send anything left
+ //console.log(j,k,o,k[j]);
+ if (!node.goodtmpl) { node.template[j] = "col"+(j+1); }
+ if ( node.template[j] && (node.template[j] !== "") && (k[j] !== "") ) {
+ if (!isNaN(Number(k[j]))) { k[j] = Number(k[j]); }
+ else { k[j].replace(/\r$/,''); }
+ o[node.template[j]] = k[j];
+ }
+ msg.payload = o;
+ if (JSON.stringify(o) !== "{}") { // don't send empty objects
+ if (node.multi === "one") { node.send({payload:o}); } // either send
+ else { a.push(o); } // or add to the aray
+ }
+ if (node.multi !== "one") { node.send({payload:a}); } // finally send the array
+ }
+ catch(e) { node.log(e); }
+ }
+ else { node.log("This node only handles csv strings or js objects."); }
+ }
+ });
+ }
+ RED.nodes.registerType("csv",CSVNode);
+}
diff --git a/dgbuilder/core_nodes/parsers/70-HTML.html b/dgbuilder/core_nodes/parsers/70-HTML.html
new file mode 100644
index 0000000..2b73b49
--- /dev/null
+++ b/dgbuilder/core_nodes/parsers/70-HTML.html
@@ -0,0 +1,73 @@
+<!--
+ Copyright 2014 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="html">
+ <div class="form-row">
+ <label for="node-input-tag"><i class="fa fa-filter"></i> Select</label>
+ <input type="text" id="node-input-tag" placeholder="h1">
+ </div>
+ <div class="form-row">
+ <label for="node-input-ret"><i class="fa fa-sign-out"></i> Output</label>
+ <select id="node-input-ret" style="width:73% !important">
+ <option value="html">the html content of the elements</option>
+ <option value="text">only the text content of the elements</option>
+ <!-- <option value="attr">an object of any attributes</option> -->
+ <!-- <option value="val">return the value from a form element</option> -->
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-as"> </label>
+ <select id="node-input-as" style="width:73% !important">
+ <option value="single">as a single message containing an array</option>
+ <option value="multi">as multiple messages, one for each element</option>
+ </select>
+ </div>
+ <br/>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips">Tip: The <b>Select</b> value is a <a href="http://api.jquery.com/category/selectors/" target="_new"><i><u>jQuery</u></i></a> style selector.</div>
+</script>
+
+<script type="text/x-red" data-help-name="html">
+ <p>Extracts elements from an html document held in <b>msg.payload</b> using a selector.</p>
+ <p>The selector uses the <a href="http://api.jquery.com/category/selectors/" target="_new">jQuery syntax</a>.</p>
+ <p>The result is either a single message with a payload containing an array of the matched elements, or multiple
+ messages that each contain a matched element.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('html',{
+ category: 'function',
+ color:"#DEBD5C",
+ defaults: {
+ tag: {value:""},
+ ret: {value:"html"},
+ as: {value:"single"},
+ name: {value:""}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "jq.png",
+ label: function() {
+ return this.name||this.tag||"html";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/parsers/70-HTML.js b/dgbuilder/core_nodes/parsers/70-HTML.js
new file mode 100644
index 0000000..7a9450f
--- /dev/null
+++ b/dgbuilder/core_nodes/parsers/70-HTML.js
@@ -0,0 +1,60 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var cheerio = require('cheerio');
+
+ function CheerioNode(n) {
+ RED.nodes.createNode(this,n);
+ this.tag = n.tag || "h1";
+ this.ret = n.ret || "html";
+ this.as = n.as || "single";
+ var node = this;
+ this.on("input", function(msg) {
+ try {
+ var $ = cheerio.load(msg.payload);
+ var pay = [];
+ $(node.tag).each(function() {
+ if (node.as === "multi") {
+ var pay2 = null;
+ if (node.ret === "html") { pay2 = $(this).html(); }
+ if (node.ret === "text") { pay2 = $(this).text(); }
+ //if (node.ret === "attr") { pay2 = $(this)[0]["attribs"]; }
+ //if (node.ret === "val") { pay2 = $(this).val(); }
+ if (pay2) {
+ msg.payload = pay2;
+ node.send(msg);
+ }
+ }
+ if (node.as === "single") {
+ if (node.ret === "html") { pay.push( $(this).html() ); }
+ if (node.ret === "text") { pay.push( $(this).text() ); }
+ //if (node.ret === "attr") { pay.push( $(this)[0]["attribs"] ); }
+ //if (node.ret === "val") { pay.push( $(this).val() ); }
+ }
+ });
+ if ((node.as === "single") && (pay.length !== 0)) {
+ msg.payload = pay;
+ node.send(msg);
+ }
+ } catch (error) {
+ node.log('Error: '+error.message);
+ }
+ });
+ }
+ RED.nodes.registerType("html",CheerioNode);
+}
diff --git a/dgbuilder/core_nodes/parsers/70-JSON.html b/dgbuilder/core_nodes/parsers/70-JSON.html
new file mode 100644
index 0000000..864974a
--- /dev/null
+++ b/dgbuilder/core_nodes/parsers/70-JSON.html
@@ -0,0 +1,47 @@
+<!--
+ Copyright 2014 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="json">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="json">
+ <p>A function that parses the <b>msg.payload</b> to convert a JSON string to/from a javascript object. Places the result back into the payload.</p>
+ <p>If the input is a JSON string it tries to parse it to a javascript object.</p>
+ <p>If the input is a javascript object it creates a JSON string.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('json',{
+ category: 'function',
+ color:"#DEBD5C",
+ defaults: {
+ name: {value:""}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name||"json";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/parsers/70-JSON.js b/dgbuilder/core_nodes/parsers/70-JSON.js
new file mode 100644
index 0000000..e216bd4
--- /dev/null
+++ b/dgbuilder/core_nodes/parsers/70-JSON.js
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+
+ function JSONNode(n) {
+ RED.nodes.createNode(this,n);
+ var node = this;
+ this.on("input", function(msg) {
+ if (msg.hasOwnProperty("payload")) {
+ if (typeof msg.payload === "string") {
+ try {
+ msg.payload = JSON.parse(msg.payload);
+ node.send(msg);
+ }
+ catch(e) { node.log(e+ "\n"+msg.payload); }
+ }
+ else if (typeof msg.payload === "object") {
+ if (!Buffer.isBuffer(msg.payload) ) {
+ if (!util.isArray(msg.payload)) {
+ msg.payload = JSON.stringify(msg.payload);
+ node.send(msg);
+ }
+ }
+ }
+ else { node.log("dropped: "+msg.payload); }
+ }
+ });
+ }
+ RED.nodes.registerType("json",JSONNode);
+}
diff --git a/dgbuilder/core_nodes/parsers/70-XML.html b/dgbuilder/core_nodes/parsers/70-XML.html
new file mode 100644
index 0000000..8b0a284
--- /dev/null
+++ b/dgbuilder/core_nodes/parsers/70-XML.html
@@ -0,0 +1,48 @@
+<!--
+ Copyright 2014 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="xml">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="xml">
+ <p>A function that parses the <b>msg.payload</b> to convert xml to/from a javascript object. Places the result in the payload.</p>
+ <p>If the input is a string it tries to parse it as XML and creates a javascript object.</p>
+ <p>If the input is a javascript object it tries to build an XML string.</p>
+ <p>See <a href="https://github.com/Leonidas-from-XIV/node-xml2js/blob/master/README.md" target="_new">the xml2js docs <i>here</i></a> for more information.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('xml',{
+ category: 'function',
+ color:"#DEBD5C",
+ defaults: {
+ name: {value:""}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name||"xml";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/parsers/70-XML.js b/dgbuilder/core_nodes/parsers/70-XML.js
new file mode 100644
index 0000000..931de7f
--- /dev/null
+++ b/dgbuilder/core_nodes/parsers/70-XML.js
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var xml2js = require('xml2js');
+ var parseString = xml2js.parseString;
+ var builder = new xml2js.Builder({renderOpts:{pretty:false}});
+
+ function XMLNode(n) {
+ RED.nodes.createNode(this,n);
+ var node = this;
+ this.on("input", function(msg) {
+ if (msg.hasOwnProperty("payload")) {
+ if (typeof msg.payload == "object") {
+ msg.payload = builder.buildObject(msg.payload);
+ node.send(msg);
+ }
+ else if (typeof msg.payload == "string") {
+ parseString(msg.payload, {strict:true,async:true}, function (err, result) {
+ if (err) { node.error(err); }
+ else {
+ msg.payload = result;
+ node.send(msg);
+ }
+ });
+ }
+ else { node.log("This node only handles xml strings or js objects."); }
+ }
+ });
+ }
+ RED.nodes.registerType("xml",XMLNode);
+}
diff --git a/dgbuilder/core_nodes/social/27-twitter.html b/dgbuilder/core_nodes/social/27-twitter.html
new file mode 100644
index 0000000..99d4521
--- /dev/null
+++ b/dgbuilder/core_nodes/social/27-twitter.html
@@ -0,0 +1,223 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="twitter-credentials">
+ <div class="form-row" id="node-config-twitter-row"></div>
+ <input type="hidden" id="node-config-input-screen_name">
+</script>
+
+<script type="text/javascript">
+(function() {
+ var twitterConfigNodeId = null;
+ var twitterConfigNodeIntervalId = null;
+
+ function showTwitterAuthStart() {
+ var pathname = document.location.pathname;
+ if (pathname.slice(-1) != "/") {
+ pathname += "/";
+ }
+ var callback = encodeURIComponent(location.protocol+"//"+location.hostname+":"+location.port+pathname+"twitter-credentials/"+twitterConfigNodeId+"/auth/callback");
+ $("#node-config-dialog-ok").button("disable");
+ $("#node-config-twitter-row").html('<div style="text-align: center; margin-top: 20px; "><a class="btn" id="node-config-twitter-start" href="twitter-credentials/'+twitterConfigNodeId+'/auth?callback='+callback+'" target="_blank">Click here to authenticate with Twitter.</a></div>');
+ $("#node-config-twitter-start").click(function() {
+ twitterConfigNodeIntervalId = window.setTimeout(pollTwitterCredentials,2000);
+ });
+ }
+ function updateTwitterScreenName(sn) {
+ $("#node-config-input-screen_name").val(sn);
+ $("#node-config-twitter-row").html('<label><i class="fa fa-user"></i> Twitter ID</label><span class="input-xlarge uneditable-input">'+sn+'</span>');
+ }
+ function pollTwitterCredentials(e) {
+ $.getJSON('credentials/twitter-credentials/'+twitterConfigNodeId,function(data) {
+ if (data.screen_name) {
+ updateTwitterScreenName(data.screen_name);
+ twitterConfigNodeIntervalId = null;
+ $("#node-config-dialog-ok").button("enable");
+ } else {
+ twitterConfigNodeIntervalId = window.setTimeout(pollTwitterCredentials,2000);
+ }
+ })
+ }
+ RED.nodes.registerType('twitter-credentials',{
+ category: 'config',
+ defaults: {
+ screen_name: {value:""}
+ },
+ credentials: {
+ screen_name: {type:"text"},
+ access_token: {type: "password"},
+ access_token_secret: {type:"password"}
+ },
+
+ label: function() {
+ return this.screen_name;
+ },
+ exportable: false,
+ oneditprepare: function() {
+ twitterConfigNodeId = this.id;
+ if (!this.screen_name || this.screen_name == "") {
+ showTwitterAuthStart();
+ } else {
+ if (this.credentials.screen_name) {
+ updateTwitterScreenName(this.credentials.screen_name);
+ } else {
+ showTwitterAuthStart();
+ }
+ }
+ },
+ oneditsave: function() {
+ if (twitterConfigNodeIntervalId) {
+ window.clearTimeout(twitterConfigNodeIntervalId);
+ }
+ },
+ oneditcancel: function(adding) {
+ if (twitterConfigNodeIntervalId) {
+ window.clearTimeout(twitterConfigNodeIntervalId);
+ }
+ }
+ });
+})();
+</script>
+
+<script type="text/x-red" data-template-name="twitter in">
+ <div class="form-row">
+ <label for="node-input-twitter"><i class="fa fa-user"></i> Log in as</label>
+ <input type="text" id="node-input-twitter">
+ </div>
+ <div class="form-row">
+ <label for="node-input-user"><i class="fa fa-search"></i> Search</label>
+ <select type="text" id="node-input-user" style="display: inline-block; vertical-align: middle; width:60%;">
+ <option value="false">all public tweets</option>
+ <option value="true">the tweets of who you follow</option>
+ <option value="user">the tweets of specific users</option>
+ <option value="dm">your direct messages</option>
+ </select>
+ </div>
+ <div class="form-row" id="node-input-tags-row">
+ <label for="node-input-tags"><i class="fa fa-tags"></i> <span id="node-input-tags-label">for</span></label>
+ <input type="text" id="node-input-tags" placeholder="comma-separated words, @ids, #tags">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips">Tip: Use commas without spaces between multiple search terms. Comma = OR, Space = AND.
+ <br/>The Twitter API WILL NOT deliver 100% of all tweets.
+ <br/>Tweets of who you follow will include their retweets and favourites.</div>
+</script>
+
+<script type="text/x-red" data-help-name="twitter in">
+ <p>Twitter input node. Can be used to search either:
+ <ul><li>the public or a user's stream for tweets containing the configured search term</li>
+ <li>all tweets by specific users</li>
+ <li>direct messages received by the authenticated user</li>
+ </ul></p>
+ <p>Use space for <i>and</i> and comma , for <i>or</i> when searching for multiple terms.</p>
+ <p>Sets the <b>msg.topic</b> to <i>tweets/</i> and then appends the senders screen name.</p>
+ <p>Sets <b>msg.location</b> to the tweeters location if known.</p>
+ <p>Sets <b>msg.tweet</b> to the full tweet object as documented by <a href="https://dev.twitter.com/docs/platform-objects/tweets">Twitter</a>.
+ <p><b>Note:</b> when set to a specific user's tweets, or your direct messages, the node is subject to
+ Twitter's API rate limiting. If you deploy the flows multiple times within a 15 minute window, you may
+ exceed the limit and will see errors from the node. These errors will clear when the current 15 minute window
+ passes.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('twitter in',{
+ category: 'social-input',
+ color:"#C0DEED",
+ defaults: {
+ twitter: {type:"twitter-credentials",required:true},
+ tags: {value:"",validate:function(v) { return this.user == "dm" || v.length > 0;}},
+ user: {value:"false",required:true},
+ name: {value:""},
+ topic: {value:"tweets"}
+ },
+ inputs:0,
+ outputs:1,
+ icon: "twitter.png",
+ label: function() {
+ if (this.name) {
+ return this.name;
+ }
+ if (this.user == "dm") {
+ var user = RED.nodes.node(this.twitter);
+ return (user?user.label()+" ":"")+"DMs";
+ } else if (this.user == "user") {
+ return this.tags+" tweets";
+ }
+ return this.tags;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ $("#node-input-user").change(function() {
+ var type = $("#node-input-user option:selected").val();
+ if (type == "user") {
+ $("#node-input-tags-row").show();
+ $("#node-input-tags-label").html("User");
+ $("#node-input-tags").attr("placeholder","comma-separated @twitter handles");
+ } else if (type == "dm") {
+ $("#node-input-tags-row").hide();
+ } else {
+ $("#node-input-tags-row").show();
+ $("#node-input-tags-label").html("for");
+ $("#node-input-tags").attr("placeholder","comma-separated words, @ids, #hashtags");
+ }
+
+ });
+ $("#node-input-user").change();
+
+ }
+ });
+</script>
+
+
+<script type="text/x-red" data-template-name="twitter out">
+ <div class="form-row">
+ <label for="node-input-twitter"><i class="fa fa-user"></i> Twitter</label>
+ <input type="text" id="node-input-twitter">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="twitter out">
+ <p>Twitter out node. Tweets the <b>msg.payload</b>.</p>
+ <p>If <b>msg.media</b> exists and is a Buffer object, this node will treat it
+ as an image and attach it to the tweet.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('twitter out',{
+ category: 'social-output',
+ color:"#C0DEED",
+ defaults: {
+ twitter: {type:"twitter-credentials",required:true},
+ name: {value:"Tweet"}
+ },
+ inputs:1,
+ outputs:0,
+ icon: "twitter.png",
+ align: "right",
+ label: function() {
+ return this.name;
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/social/27-twitter.js b/dgbuilder/core_nodes/social/27-twitter.js
new file mode 100644
index 0000000..5cacd9e
--- /dev/null
+++ b/dgbuilder/core_nodes/social/27-twitter.js
@@ -0,0 +1,347 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var ntwitter = require('twitter-ng');
+ var OAuth= require('oauth').OAuth;
+ var request = require('request');
+
+ function TwitterNode(n) {
+ RED.nodes.createNode(this,n);
+ this.screen_name = n.screen_name;
+ }
+ RED.nodes.registerType("twitter-credentials",TwitterNode,{
+ credentials: {
+ screen_name: {type:"text"},
+ access_token: {type: "password"},
+ access_token_secret: {type:"password"}
+ }
+ });
+
+ function TwitterInNode(n) {
+ RED.nodes.createNode(this,n);
+ this.active = true;
+ this.user = n.user;
+ //this.tags = n.tags.replace(/ /g,'');
+ this.tags = n.tags;
+ this.twitter = n.twitter;
+ this.topic = n.topic||"tweets";
+ this.twitterConfig = RED.nodes.getNode(this.twitter);
+ var credentials = RED.nodes.getCredentials(this.twitter);
+
+ if (credentials && credentials.screen_name == this.twitterConfig.screen_name) {
+ var twit = new ntwitter({
+ consumer_key: "OKjYEd1ef2bfFolV25G5nQ",
+ consumer_secret: "meRsltCktVMUI8gmggpXett7WBLd1k0qidYazoML6g",
+ access_token_key: credentials.access_token,
+ access_token_secret: credentials.access_token_secret
+ });
+
+
+ //setInterval(function() {
+ // twit.get("/application/rate_limit_status.json",null,function(err,cb) {
+ // console.log("direct_messages:",cb["resources"]["direct_messages"]);
+ // });
+ //
+ //},10000);
+
+ var node = this;
+ if (this.user === "user") {
+ node.poll_ids = [];
+ node.since_ids = {};
+ var users = node.tags.split(",");
+ for (var i=0;i<users.length;i++) {
+ var user = users[i].replace(" ","");
+ twit.getUserTimeline({
+ screen_name:user,
+ trim_user:0,
+ count:1
+ },function() {
+ var u = user+"";
+ return function(err,cb) {
+ if (err) {
+ node.error(err);
+ return;
+ }
+ if (cb[0]) {
+ node.since_ids[u] = cb[0].id_str;
+ } else {
+ node.since_ids[u] = '0';
+ }
+ node.poll_ids.push(setInterval(function() {
+ twit.getUserTimeline({
+ screen_name:u,
+ trim_user:0,
+ since_id:node.since_ids[u]
+ },function(err,cb) {
+ if (cb) {
+ for (var t=cb.length-1;t>=0;t-=1) {
+ var tweet = cb[t];
+ var where = tweet.user.location||"";
+ var la = tweet.lang || tweet.user.lang;
+ //console.log(tweet.user.location,"=>",tweet.user.screen_name,"=>",pay);
+ var msg = { topic:node.topic+"/"+tweet.user.screen_name, payload:tweet.text, location:where, lang:la, tweet:tweet };
+ node.send(msg);
+ if (t == 0) {
+ node.since_ids[u] = tweet.id_str;
+ }
+ }
+ }
+ if (err) {
+ node.error(err);
+ }
+ });
+ },60000));
+ }
+ }());
+ }
+ } else if (this.user === "dm") {
+ node.poll_ids = [];
+ twit.getDirectMessages({
+ screen_name:node.twitterConfig.screen_name,
+ trim_user:0,
+ count:1
+ },function(err,cb) {
+ if (err) {
+ node.error(err);
+ return;
+ }
+ if (cb[0]) {
+ node.since_id = cb[0].id_str;
+ } else {
+ node.since_id = '0';
+ }
+ node.poll_ids.push(setInterval(function() {
+ twit.getDirectMessages({
+ screen_name:node.twitterConfig.screen_name,
+ trim_user:0,
+ since_id:node.since_id
+ },function(err,cb) {
+ if (cb) {
+ for (var t=cb.length-1;t>=0;t-=1) {
+ var tweet = cb[t];
+ var msg = { topic:node.topic+"/"+tweet.sender.screen_name, payload:tweet.text, tweet:tweet };
+ node.send(msg);
+ if (t == 0) {
+ node.since_id = tweet.id_str;
+ }
+ }
+ }
+ if (err) {
+ node.error(err);
+ }
+ });
+ },120000));
+ });
+
+ } else if (this.tags !== "") {
+ try {
+ var thing = 'statuses/filter';
+ if (this.user === "true") { thing = 'user'; }
+ var st = { track: [node.tags] };
+ var bits = node.tags.split(",");
+ if ((bits.length > 0) && (bits.length % 4 == 0)) {
+ if ((Number(bits[0]) < Number(bits[2])) && (Number(bits[1]) < Number(bits[3]))) {
+ st = { locations: node.tags };
+ }
+ else {
+ node.log("possible bad geo area format. Should be lower-left lon, lat, upper-right lon, lat");
+ }
+ }
+
+ var setupStream = function() {
+ if (node.active) {
+ twit.stream(thing, st, function(stream) {
+ //console.log(st);
+ //twit.stream('user', { track: [node.tags] }, function(stream) {
+ //twit.stream('site', { track: [node.tags] }, function(stream) {
+ //twit.stream('statuses/filter', { track: [node.tags] }, function(stream) {
+ node.stream = stream;
+ stream.on('data', function(tweet) {
+ //console.log(tweet.user);
+ if (tweet.user !== undefined) {
+ var where = tweet.user.location||"";
+ var la = tweet.lang || tweet.user.lang;
+ //console.log(tweet.user.location,"=>",tweet.user.screen_name,"=>",pay);
+ var msg = { topic:node.topic+"/"+tweet.user.screen_name, payload:tweet.text, location:where, lang:la, tweet:tweet };
+ node.send(msg);
+ }
+ });
+ stream.on('limit', function(tweet) {
+ node.log("tweet rate limit hit");
+ });
+ stream.on('error', function(tweet,rc) {
+ if (rc == 420) {
+ node.warn("Twitter rate limit hit");
+ } else {
+ node.warn("Stream error:"+tweet.toString()+" ("+rc+")");
+ }
+ setTimeout(setupStream,10000);
+ });
+ stream.on('destroy', function (response) {
+ if (this.active) {
+ node.warn("twitter ended unexpectedly");
+ setTimeout(setupStream,10000);
+ }
+ });
+ });
+ }
+ }
+ setupStream();
+ }
+ catch (err) {
+ node.error(err);
+ }
+ } else {
+ this.error("Invalid tag property");
+ }
+ } else {
+ this.error("missing twitter credentials");
+ }
+
+ this.on('close', function() {
+ if (this.stream) {
+ this.active = false;
+ this.stream.destroy();
+ }
+ if (this.poll_ids) {
+ for (var i=0;i<this.poll_ids.length;i++) {
+ clearInterval(this.poll_ids[i]);
+ }
+ }
+ });
+ }
+ RED.nodes.registerType("twitter in",TwitterInNode);
+
+
+ function TwitterOutNode(n) {
+ RED.nodes.createNode(this,n);
+ this.topic = n.topic;
+ this.twitter = n.twitter;
+ this.twitterConfig = RED.nodes.getNode(this.twitter);
+ var credentials = RED.nodes.getCredentials(this.twitter);
+ var node = this;
+
+ if (credentials && credentials.screen_name == this.twitterConfig.screen_name) {
+ var twit = new ntwitter({
+ consumer_key: "OKjYEd1ef2bfFolV25G5nQ",
+ consumer_secret: "meRsltCktVMUI8gmggpXett7WBLd1k0qidYazoML6g",
+ access_token_key: credentials.access_token,
+ access_token_secret: credentials.access_token_secret
+ });
+ node.on("input", function(msg) {
+ node.status({fill:"blue",shape:"dot",text:"tweeting"});
+
+ if (msg.payload.length > 140) {
+ msg.payload = msg.payload.slice(0,139);
+ node.warn("Tweet greater than 140 : truncated");
+ }
+
+ if (msg.media && Buffer.isBuffer(msg.media)) {
+ var apiUrl = "https://api.twitter.com/1.1/statuses/update_with_media.json";
+ var signedUrl = oa.signUrl(apiUrl,
+ credentials.access_token,
+ credentials.access_token_secret,
+ "POST");
+
+ var r = request.post(signedUrl,function(err,httpResponse,body) {
+ if (err) {
+ node.error(err.toString());
+ node.status({fill:"red",shape:"ring",text:"failed"});
+ } else {
+ var response = JSON.parse(body);
+ if (body.errors) {
+ var errorList = body.errors.map(function(er) { return er.code+": "+er.message }).join(", ");
+ node.error("tweet failed: "+errorList);
+ node.status({fill:"red",shape:"ring",text:"failed"});
+ } else {
+ node.status({});
+ }
+ }
+ });
+ var form = r.form();
+ form.append("status",msg.payload);
+ form.append("media[]",msg.media,{filename:"image"});
+
+ } else {
+ twit.updateStatus(msg.payload, function (err, data) {
+ if (err) {
+ node.status({fill:"red",shape:"ring",text:"failed"});
+ node.error(err);
+ }
+ node.status({});
+ });
+ }
+ });
+ }
+ }
+ RED.nodes.registerType("twitter out",TwitterOutNode);
+
+ var oa = new OAuth(
+ "https://api.twitter.com/oauth/request_token",
+ "https://api.twitter.com/oauth/access_token",
+ "OKjYEd1ef2bfFolV25G5nQ",
+ "meRsltCktVMUI8gmggpXett7WBLd1k0qidYazoML6g",
+ "1.0",
+ null,
+ "HMAC-SHA1"
+ );
+
+ RED.httpAdmin.get('/twitter-credentials/:id/auth', function(req, res){
+ var credentials = {};
+ oa.getOAuthRequestToken({
+ oauth_callback: req.query.callback
+ },function(error, oauth_token, oauth_token_secret, results){
+ if (error) {
+ var resp = '<h2>Oh no!</h2>'+
+ '<p>Something went wrong with the authentication process. The following error was returned:<p>'+
+ '<p><b>'+error.statusCode+'</b>: '+error.data+'</p>'+
+ '<p>One known cause of this type of failure is if the clock is wrong on system running Node-RED.';
+ res.send(resp)
+ } else {
+ credentials.oauth_token = oauth_token;
+ credentials.oauth_token_secret = oauth_token_secret;
+ res.redirect('https://twitter.com/oauth/authorize?oauth_token='+oauth_token)
+ RED.nodes.addCredentials(req.params.id,credentials);
+ }
+ });
+ });
+
+ RED.httpAdmin.get('/twitter-credentials/:id/auth/callback', function(req, res, next){
+ var credentials = RED.nodes.getCredentials(req.params.id);
+ credentials.oauth_verifier = req.query.oauth_verifier;
+
+ oa.getOAuthAccessToken(
+ credentials.oauth_token,
+ credentials.token_secret,
+ credentials.oauth_verifier,
+ function(error, oauth_access_token, oauth_access_token_secret, results){
+ if (error){
+ console.log(error);
+ res.send("yeah something broke.");
+ } else {
+ credentials = {};
+ credentials.access_token = oauth_access_token;
+ credentials.access_token_secret = oauth_access_token_secret;
+ credentials.screen_name = "@"+results.screen_name;
+ RED.nodes.addCredentials(req.params.id,credentials);
+ res.send("<html><head></head><body>Authorised - you can close this window and return to Node-RED</body></html>");
+ }
+ }
+ );
+ });
+}
diff --git a/dgbuilder/core_nodes/social/32-feedparse.html b/dgbuilder/core_nodes/social/32-feedparse.html
new file mode 100644
index 0000000..a795427
--- /dev/null
+++ b/dgbuilder/core_nodes/social/32-feedparse.html
@@ -0,0 +1,57 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="feedparse">
+ <div class="form-row">
+ <label for="node-input-url"><i class="fa fa-globe"></i> Feed url</label>
+ <input type="text" id="node-input-url">
+ </div>
+ <div class="form-row">
+ <label for="node-input-interval"><i class="fa fa-repeat"></i> Repeat <span style="font-size: 0.9em;">(M)</span></label>
+ <input type="text" id="node-input-interval" placeholder="minutes">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <!-- <div class="form-tips"></div> -->
+</script>
+
+<script type="text/x-red" data-help-name="feedparse">
+ <p>Monitors an RSS/atom feed for new entries.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('feedparse',{
+ category: 'advanced-input',
+ color:"#C0DEED",
+ defaults: {
+ name: {value:""},
+ url: {value:"", required:true},
+ interval: { value:15, required: true,validate:RED.validators.number()}
+ },
+ inputs:0,
+ outputs:1,
+ icon: "feed.png",
+ label: function() {
+ return this.name||this.url;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+
+</script>
diff --git a/dgbuilder/core_nodes/social/32-feedparse.js b/dgbuilder/core_nodes/social/32-feedparse.js
new file mode 100644
index 0000000..97630e7
--- /dev/null
+++ b/dgbuilder/core_nodes/social/32-feedparse.js
@@ -0,0 +1,71 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var FeedParser = require("feedparser");
+ var request = require("request");
+
+ function FeedParseNode(n) {
+ RED.nodes.createNode(this,n);
+ this.url = n.url;
+ this.interval = (parseInt(n.interval)||15)*60000;
+ var node = this;
+ this.interval_id = null;
+ this.seen = {};
+ if (this.url !== "") {
+ var getFeed = function() {
+ request(node.url,function(err) {
+ if (err) node.error(err);
+ })
+ .pipe(new FeedParser({feedurl:node.url}))
+ .on('error', function(error) {
+ node.error(error);
+ })
+ .on('meta', function (meta) {})
+ .on('readable', function () {
+ var stream = this, article;
+ while (article = stream.read()) {
+ if (!(article.guid in node.seen) || ( node.seen[article.guid] != 0 && node.seen[article.guid] != article.date.getTime())) {
+ node.seen[article.guid] = article.date?article.date.getTime():0;
+ var msg = {
+ topic:article.origlink||article.link,
+ payload: article.description,
+ article: article
+ };
+ node.send(msg);
+ }
+ }
+ })
+ .on('end', function () {
+ });
+ };
+ this.interval_id = setInterval(getFeed,node.interval);
+ getFeed();
+
+ } else {
+ this.error("Invalid url");
+ }
+ }
+
+ RED.nodes.registerType("feedparse",FeedParseNode);
+
+ FeedParseNode.prototype.close = function() {
+ if (this.interval_id != null) {
+ clearInterval(this.interval_id);
+ }
+ }
+}
diff --git a/dgbuilder/core_nodes/social/61-email.html b/dgbuilder/core_nodes/social/61-email.html
new file mode 100644
index 0000000..3739708
--- /dev/null
+++ b/dgbuilder/core_nodes/social/61-email.html
@@ -0,0 +1,189 @@
+<!--
+ Copyright 2013,2014 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="e-mail">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-envelope"></i> To</label>
+ <input type="text" id="node-input-name" placeholder="email@address.com">
+ </div>
+ <!-- <div class="form-row">
+ <label for="node-input-pin"><i class="fa fa-asterisk"></i> Service</label>
+ <select type="text" id="node-input-pin" style="width: 150px;">
+ <option value="-" disabled> </option>
+ <option value="DynectEmail">DynectEmail</option>
+ <option value="Gmail">Gmail</option>
+ <option value="hot.ee">hot.ee</option>
+ <option value="Hotmail">Hotmail</option>
+ <option value="iCloud">iCloud</option>
+ <option value="mail.ee">mail.ee</option>
+ <option value="Mail.Ru">Mail.Ru</option>
+ <option value="Mailgun">Mailgun</option>
+ <option value="Mailjet">Mailjet</option>
+ <option value="Mandrill">Mandrill</option>
+ <option value="Postmark">Postmark</option>
+ <option value="QQ">QQ</option>
+ <option value="QQex">QQex</option>
+ <option value="SendGrid">SendGrid</option>
+ <option value="SendCloud">SendCloud</option>
+ <option value="SES">SES</option>
+ <option value="Yahoo">Yahoo</option>
+ <option value="yandex">yandex</option>
+ <option value="Zoho">Zoho</option>
+ </select>
+ </div> -->
+ <div class="form-row">
+ <label for="node-input-server"><i class="fa fa-globe"></i> Server</label>
+ <input type="text" id="node-input-server" placeholder="smtp.gmail.com">
+ </div>
+ <div class="form-row">
+ <label for="node-input-port"><i class="fa fa-random"></i> Port</label>
+ <input type="text" id="node-input-port" placeholder="465">
+ </div>
+ <div class="form-row">
+ <label for="node-input-userid"><i class="fa fa-user"></i> Userid</label>
+ <input type="text" id="node-input-userid">
+ </div>
+ <div class="form-row">
+ <label for="node-input-password"><i class="fa fa-lock"></i> Password</label>
+ <input type="password" id="node-input-password">
+ </div>
+ <br/>
+ <div class="form-row">
+ <label for="node-input-dname"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-dname" placeholder="Name">
+ </div>
+ <div class="form-tips" id="node-tip"><b>Note:</b> Copied credentials from global emailkeys.js file.</div>
+</script>
+
+<script type="text/x-red" data-help-name="e-mail">
+ <p>Sends the <b>msg.payload</b> as an email, with a subject of <b>msg.topic</b>.</p>
+ <!-- <p>It sends the message to the configured recipient <i>only</i>.</p> -->
+ <p>You may dynamically overide the default recipient by setting a <b>msg.to</b> property.</p>
+ <!-- <p><b>msg.topic</b> is used to set the subject of the email, and <b>msg.payload</b> is the body text.</p> -->
+</script>
+
+<script type="text/javascript">
+(function() {
+ RED.nodes.registerType('e-mail',{
+ category: 'social-output',
+ color:"#c7e9c0",
+ defaults: {
+ server: {value:"smtp.gmail.com",required:true},
+ port: {value:"465",required:true},
+ name: {value:"",required:true},
+ dname: {value:""}
+ },
+ credentials: {
+ userid: {type:"text"},
+ password: {type: "password"},
+ global: { type:"boolean"}
+ },
+
+ inputs:1,
+ outputs:0,
+ icon: "envelope.png",
+ align: "right",
+ label: function() {
+ return this.dname||this.name||"email";
+ },
+ labelStyle: function() {
+ return (this.dname||!this.topic)?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ if (this.credentials.global) {
+ $('#node-tip').show();
+ } else {
+ $('#node-tip').hide();
+ };
+ }
+ });
+})();
+</script>
+
+
+<script type="text/x-red" data-template-name="e-mail in">
+ <div class="form-row node-input-repeat">
+ <label for="node-input-repeat"><i class="fa fa-repeat"></i> Check Repeat (S)</label>
+ <input type="text" id="node-input-repeat" placeholder="300">
+ </div>
+ <div class="form-row">
+ <label for="node-input-server"><i class="fa fa-globe"></i> Server</label>
+ <input type="text" id="node-input-server" placeholder="imap.gmail.com">
+ </div>
+ <div class="form-row">
+ <label for="node-input-port"><i class="fa fa-random"></i> Port</label>
+ <input type="text" id="node-input-port" placeholder="993">
+ </div>
+ <div class="form-row">
+ <label for="node-input-userid"><i class="fa fa-user"></i> Userid</label>
+ <input type="text" id="node-input-userid">
+ </div>
+ <div class="form-row">
+ <label for="node-config-input-password"><i class="fa fa-lock"></i> Password</label>
+ <input type="password" id="node-input-password">
+ </div>
+ <br/>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips" id="node-tip"><b>Note:</b> Copied credentials from global emailkeys.js file.</div>
+ <div id="node-input-tip" class="form-tips">Tip: <b>ONLY</b> retrieves the single most recent email.</div>
+</script>
+
+<script type="text/x-red" data-help-name="e-mail in">
+ <p>Repeatedly gets a <b>single email</b> from an IMAP server and forwards on as a msg if not already seen.</p>
+ <p>The subject is loaded into <b>msg.topic</b> and <b>msg.payload</b> is the plain text body.
+ If there is text/html then that is returned in <b>msg.html</b>. <b>msg.from</b> and <b>msg.date</b> are also set if you need them.</p>
+ <p>Uses the imap module.</p>
+ <p><b>Note:</b> this node <i>only</i> gets the most recent single email from the inbox, so set the repeat (polling) time appropriately.</p>
+</script>
+
+<script type="text/javascript">
+(function() {
+ RED.nodes.registerType('e-mail in',{
+ category: 'social-input',
+ color:"#c7e9c0",
+ defaults: {
+ repeat: {value:"300",required:true},
+ server: {value:"imap.gmail.com",required:true},
+ port: {value:"993",required:true},
+ name: {value:""}
+ },
+ credentials: {
+ userid: {type:"text"},
+ password: {type: "password"},
+ global: { type:"boolean"}
+ },
+ inputs:0,
+ outputs:1,
+ icon: "envelope.png",
+ label: function() {
+ return this.name||"email";
+ },
+ labelStyle: function() {
+ return (this.name||!this.topic)?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ if (this.credentials.global) {
+ $('#node-tip').show();
+ } else {
+ $('#node-tip').hide();
+ };
+ }
+ });
+})();
+</script>
diff --git a/dgbuilder/core_nodes/social/61-email.js b/dgbuilder/core_nodes/social/61-email.js
new file mode 100644
index 0000000..7d0f8cb
--- /dev/null
+++ b/dgbuilder/core_nodes/social/61-email.js
@@ -0,0 +1,246 @@
+/**
+ * Copyright 2013,2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var nodemailer = require("nodemailer");
+ var Imap = require('imap');
+
+ //console.log(nodemailer.Transport.transports.SMTP.wellKnownHosts);
+
+ try {
+ var globalkeys = RED.settings.email || require(process.env.NODE_RED_HOME+"/../emailkeys.js");
+ } catch(err) {
+ }
+
+ function EmailNode(n) {
+ RED.nodes.createNode(this,n);
+ this.topic = n.topic;
+ this.name = n.name;
+ this.outserver = n.server;
+ this.outport = n.port;
+ var flag = false;
+ if (this.credentials && this.credentials.hasOwnProperty("userid")) {
+ this.userid = this.credentials.userid;
+ } else {
+ if (globalkeys) {
+ this.userid = globalkeys.user;
+ flag = true;
+ } else {
+ this.error("No e-mail userid set");
+ }
+ }
+ if (this.credentials && this.credentials.hasOwnProperty("password")) {
+ this.password = this.credentials.password;
+ } else {
+ if (globalkeys) {
+ this.password = globalkeys.pass;
+ flag = true;
+ } else {
+ this.error("No e-mail password set");
+ }
+ }
+ if (flag) {
+ RED.nodes.addCredentials(n.id,{userid:this.userid, password:this.password, global:true});
+ }
+ var node = this;
+
+ var smtpTransport = nodemailer.createTransport({
+ host: node.outserver,
+ port: node.outport,
+ secure: true,
+ auth: {
+ user: node.userid,
+ pass: node.password
+ }
+ });
+
+ this.on("input", function(msg) {
+ if (smtpTransport) {
+ node.status({fill:"blue",shape:"dot",text:"sending"});
+ var payload = RED.util.ensureString(msg.payload);
+ smtpTransport.sendMail({
+ from: node.userid, // sender address
+ to: msg.to || node.name, // comma separated list of addressees
+ subject: msg.topic, // subject line
+ text: payload // plaintext body
+ }, function(error, info) {
+ if (error) {
+ node.error(error);
+ node.status({fill:"red",shape:"ring",text:"send failed"});
+ } else {
+ node.log("Message sent: " + info.response);
+ node.status({});
+ }
+ });
+ }
+ else { node.warn("No Email credentials found. See info panel."); }
+ });
+ }
+ RED.nodes.registerType("e-mail",EmailNode,{
+ credentials: {
+ userid: {type:"text"},
+ password: {type: "password"},
+ global: { type:"boolean"}
+ }
+ });
+
+ function EmailInNode(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.repeat = n.repeat * 1000 || 300000;
+ this.inserver = n.server || globalkeys.server || "imap.gmail.com";
+ this.inport = n.port || globalkeys.port || "993";
+ var flag = false;
+
+ if (this.credentials && this.credentials.hasOwnProperty("userid")) {
+ this.userid = this.credentials.userid;
+ } else {
+ if (globalkeys) {
+ this.userid = globalkeys.user;
+ flag = true;
+ } else {
+ this.error("No e-mail userid set");
+ }
+ }
+ if (this.credentials && this.credentials.hasOwnProperty("password")) {
+ this.password = this.credentials.password;
+ } else {
+ if (globalkeys) {
+ this.password = globalkeys.pass;
+ flag = true;
+ } else {
+ this.error("No e-mail password set");
+ }
+ }
+ if (flag) {
+ RED.nodes.addCredentials(n.id,{userid:this.userid, password:this.password, global:true});
+ }
+
+ var node = this;
+ this.interval_id = null;
+ var oldmail = {};
+
+ var imap = new Imap({
+ user: node.userid,
+ password: node.password,
+ host: node.inserver,
+ port: node.inport,
+ tls: true,
+ tlsOptions: { rejectUnauthorized: false },
+ connTimeout: node.repeat,
+ authTimeout: node.repeat
+ });
+
+ if (!isNaN(this.repeat) && this.repeat > 0) {
+ node.log("repeat = "+this.repeat);
+ this.interval_id = setInterval( function() {
+ node.emit("input",{});
+ }, this.repeat );
+ }
+
+ this.on("input", function(msg) {
+ imap.once('ready', function() {
+ node.status({fill:"blue",shape:"dot",text:"fetching"});
+ var pay = {};
+ imap.openBox('INBOX', true, function(err, box) {
+ if (box.messages.total > 0) {
+ var f = imap.seq.fetch(box.messages.total + ':*', { bodies: ['HEADER.FIELDS (FROM SUBJECT DATE)','TEXT'] });
+ f.on('message', function(msg, seqno) {
+ node.log('message: #'+ seqno);
+ var prefix = '(#' + seqno + ') ';
+ msg.on('body', function(stream, info) {
+ var buffer = '';
+ stream.on('data', function(chunk) {
+ buffer += chunk.toString('utf8');
+ });
+ stream.on('end', function() {
+ if (info.which !== 'TEXT') {
+ pay.from = Imap.parseHeader(buffer).from[0];
+ pay.topic = Imap.parseHeader(buffer).subject[0];
+ pay.date = Imap.parseHeader(buffer).date[0];
+ } else {
+ var parts = buffer.split("Content-Type");
+ for (var p = 0; p < parts.length; p++) {
+ if (parts[p].indexOf("text/plain") >= 0) {
+ pay.payload = parts[p].split("\n").slice(1,-2).join("\n").trim();
+ }
+ if (parts[p].indexOf("text/html") >= 0) {
+ pay.html = parts[p].split("\n").slice(1,-2).join("\n").trim();
+ }
+ }
+ //pay.body = buffer;
+ }
+ });
+ });
+ msg.on('end', function() {
+ //node.log('Finished: '+prefix);
+ });
+ });
+ f.on('error', function(err) {
+ node.warn('fetch error: ' + err);
+ node.status({fill:"red",shape:"ring",text:"fetch error"});
+ });
+ f.on('end', function() {
+ if (JSON.stringify(pay) !== oldmail) {
+ node.send(pay);
+ oldmail = JSON.stringify(pay);
+ node.log('received new email: '+pay.topic);
+ }
+ else { node.log('duplicate not sent: '+pay.topic); }
+ //node.status({fill:"green",shape:"dot",text:"ok"});
+ node.status({});
+ imap.end();
+ });
+ }
+ else {
+ node.log("you have achieved inbox zero");
+ //node.status({fill:"green",shape:"dot",text:"ok"});
+ node.status({});
+ imap.end();
+ }
+ });
+ });
+ node.status({fill:"grey",shape:"dot",text:"connecting"});
+ imap.connect();
+ });
+
+ imap.on('error', function(err) {
+ node.log(err);
+ node.status({fill:"red",shape:"ring",text:"connect error"});
+ });
+
+ this.on("error", function(err) {
+ node.log("error: ",err);
+ });
+
+ this.on("close", function() {
+ if (this.interval_id != null) {
+ clearInterval(this.interval_id);
+ }
+ if (imap) { imap.destroy(); }
+ });
+
+ node.emit("input",{});
+ }
+ RED.nodes.registerType("e-mail in",EmailInNode,{
+ credentials: {
+ userid: {type:"text"},
+ password: {type: "password"},
+ global: { type:"boolean"}
+ }
+ });
+}
diff --git a/dgbuilder/core_nodes/social/91-irc.html b/dgbuilder/core_nodes/social/91-irc.html
new file mode 100644
index 0000000..1111237
--- /dev/null
+++ b/dgbuilder/core_nodes/social/91-irc.html
@@ -0,0 +1,206 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="irc in">
+ <div class="form-row">
+ <label for="node-input-ircserver"><i class="fa fa-globe"></i> IRC Server</label>
+ <input type="text" id="node-input-ircserver">
+ </div>
+ <div class="form-row">
+ <label for="node-input-channel"><i class="fa fa-random"></i> Channel</label>
+ <input type="text" id="node-input-channel" placeholder="#nodered">
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips">The channel to join must start with a # (as per normal irc rules...)<br/>
+ You may join multiple channels by comma separating a list - #chan1,#chan2,etc.</div>
+</script>
+
+<script type="text/x-red" data-help-name="irc in">
+ <p>Connects to a channel on an IRC server.</p>
+ <p>You may join multiple channels by comma separating a list - #chan1,#chan2,#etc.</p>
+ <p>Any messages on that channel will appear on the <code>msg.payload</code> at the output,
+ while <code>msg.topic</code> will contain who it is from.
+ <code>msg.to</code> contains either the name of the channel or PRIV in the case of a pm.</p>
+ <p>The second output provides a <code>msg.payload</code> that has any status messages such as joins, parts, kicks etc.</p>
+ <p>The type of the status message is set as <code>msg.payload.type</code>.</p>
+ <p>The possible status types are: <br />
+ <table border="1" cellpadding="1" cellspacing="1">
+ <thead>
+ <tr>
+ <th scope="col">Type</th>
+ <th scope="col">Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>message</td>
+ <td>message is sent into the channel</td>
+ </tr>
+ <tr>
+ <td>pm</td>
+ <td>private message to the bot</td>
+ </tr>
+ <tr>
+ <td>join</td>
+ <td>a user joined the channel (also triggered when the bot joins a channel)</td>
+ </tr>
+ <tr>
+ <td>invite</td>
+ <td>the bot is being invited to a channel</td>
+ </tr>
+ <tr>
+ <td>part</td>
+ <td>a user leaves a channel</td>
+ </tr>
+ <tr>
+ <td>quit</td>
+ <td>a user quits a channel</td>
+ </tr>
+ <tr>
+ <td>kick</td>
+ <td>a user is kicked from a channel</td>
+ </tr>
+ <tr>
+ <td>names</td>
+ <td>retrieves the list of users when the bot joins a channel</td>
+ </tr>
+ </tbody>
+</table>
+</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('irc in',{
+ category: 'social-input',
+ defaults: {
+ name: {value:""},
+ ircserver: {type:"irc-server", required:true},
+ channel: {value:"",required:true,validate:RED.validators.regex(/^#/)}
+ },
+ color:"Silver",
+ inputs:0,
+ outputs:2,
+ icon: "hash.png",
+ label: function() {
+ var ircNode = RED.nodes.node(this.ircserver);
+ return this.name || (ircNode ? ircNode.label() : "irc");
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ if ((this.ircserver !== undefined) && (this.ircserver !== "")) {
+ this.channel = this.channel || RED.nodes.node(this.ircserver).channel;
+ $("#node-input-channel").val(this.channel);
+ }
+ else { this.channel = this.channel; }
+ $("#node-input-channel").val(this.channel);
+ }
+ });
+</script>
+
+
+<script type="text/x-red" data-template-name="irc out">
+ <div class="form-row">
+ <label for="node-input-ircserver"><i class="fa fa-globe"></i> IRC Server</label>
+ <input type="text" id="node-input-ircserver">
+ </div>
+ <div class="form-row">
+ <label for="node-input-channel"><i class="fa fa-random"></i> Channel</label>
+ <input type="text" id="node-input-channel" placeholder="#nodered">
+ </div>
+ <div class="form-row">
+ <label for="node-input-sendObject"><i class="fa fa-arrows"></i> Action</label>
+ <select type="text" id="node-input-sendObject" style="display: inline-block; vertical-align: middle; width:70%;">
+ <option value="pay">Send payload to channel(s)</option>
+ <option value="true">Use msg.topic to set nickname or channel(s)</option>
+ <option value="false">Send complete msg object to channel(s)</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips">The channel to join must start with a # (as per normal irc rules...)<br/>
+ Sending the complete object will stringify the whole msg object before sending.</div>
+</script>
+
+<script type="text/x-red" data-help-name="irc out">
+ <p>Sends messages to a channel on an IRC server</p>
+ <p>You can send just the <code>msg.payload</code>, or the complete <code>msg</code> object to the selected channel,
+ or you can select to use <code>msg.topic</code> to send the <code>msg.payload</code> to a specific user (private message) or channel.</p>
+ <p>If multiple output channels are listed (eg. #chan1,#chan2), then the message will be sent to all of them.</p>
+ <p><b>Note:</b> you can only send to channels you have previously joined so they MUST be specified in the node - even if you then decide to use a subset in msg.topic</p>
+ <p>You may send RAW commands using <code>msg.raw</code> - This must contain an array of parameters - eg. <pre>["privmsg","#nodered","Hello world"]</pre></p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('irc out',{
+ category: 'social-output',
+ defaults: {
+ name: {value:""},
+ sendObject: {value:"pay", required:true},
+ ircserver: {type:"irc-server", required:true},
+ channel: {value:"",required:true,validate:RED.validators.regex(/^#/)}
+ },
+ color:"Silver",
+ inputs:1,
+ outputs:0,
+ icon: "hash.png",
+ align: "right",
+ label: function() {
+ return this.name || (this.ircserver ? RED.nodes.node(this.ircserver).label() : "irc");
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ if ((this.ircserver !== undefined) && (this.ircserver !== "")) {
+ this.channel = this.channel || RED.nodes.node(this.ircserver).channel;
+ $("#node-input-channel").val(this.channel);
+ }
+ else { this.channel = this.channel; }
+ }
+ });
+</script>
+
+
+<script type="text/x-red" data-template-name="irc-server">
+ <div class="form-row">
+ <label for="node-config-input-server"><i class="fa fa-globe"></i> IRC Server</label>
+ <input type="text" id="node-config-input-server" placeholder="irc.freenode.net">
+ </div>
+ <div class="form-row">
+ <label for="node-config-input-nickname"><i class="fa fa-user"></i> Nickname</label>
+ <input type="text" id="node-config-input-nickname" placeholder="joe123">
+ </div>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('irc-server',{
+ category: 'config',
+ defaults: {
+ server: {value:"",required:true},
+ nickname: {value:"",required:true}
+ },
+ label: function() {
+ return this.server;
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/social/91-irc.js b/dgbuilder/core_nodes/social/91-irc.js
new file mode 100644
index 0000000..c520e44
--- /dev/null
+++ b/dgbuilder/core_nodes/social/91-irc.js
@@ -0,0 +1,237 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var irc = require("irc");
+
+ // The Server Definition - this opens (and closes) the connection
+ function IRCServerNode(n) {
+ RED.nodes.createNode(this,n);
+ this.server = n.server;
+ this.channel = n.channel;
+ this.nickname = n.nickname;
+ this.lastseen = 0;
+ this.ircclient = null;
+ this.on("close", function() {
+ if (this.ircclient != null) {
+ this.ircclient.removeAllListeners();
+ this.ircclient.disconnect();
+ }
+ });
+ }
+ RED.nodes.registerType("irc-server",IRCServerNode);
+
+
+ // The Input Node
+ function IrcInNode(n) {
+ RED.nodes.createNode(this,n);
+ this.ircserver = n.ircserver;
+ this.serverConfig = RED.nodes.getNode(this.ircserver);
+ this.channel = n.channel || this.serverConfig.channel;
+ var node = this;
+ if (node.serverConfig.ircclient === null) {
+ node.log("Connecting to "+node.serverConfig.server);
+ node.status({fill:"grey",shape:"dot",text:"connecting"});
+ node.serverConfig.ircclient = new irc.Client(node.serverConfig.server, node.serverConfig.nickname,{autoConnect:false,retryDelay:20000});
+ node.serverConfig.ircclient.setMaxListeners(0);
+ node.serverConfig.ircclient.addListener('error', function(message) {
+ node.log(JSON.stringify(message));
+ });
+ node.serverConfig.ircclient.addListener('netError', function(message) {
+ node.log(JSON.stringify("NET "+message));
+ node.serverConfig.lastseen = Date.now();
+ });
+ node.serverConfig.ircclient.addListener('connect', function() {
+ node.serverConfig.lastseen = Date.now();
+ });
+ node.serverConfig.ircclient.addListener('ping', function(server) {
+ node.serverConfig.lastseen = Date.now();
+ //node.log("PING "+JSON.stringify(server));
+ });
+ node.recon = setInterval( function() {
+ //console.log("CHK ",(Date.now()-node.serverConfig.lastseen)/1000);
+ if ((Date.now()-node.serverConfig.lastseen) > 300000) { // if more than 5 mins since last seen
+ node.ircclient.send.apply(node.ircclient,["TIME"]); // request time to check link
+ }
+ if ((Date.now()-node.serverConfig.lastseen) > 400000) { // If more than 6.5 mins
+ node.serverConfig.ircclient.disconnect();
+ node.serverConfig.ircclient.connect();
+ node.log("reconnect"); // then retry
+ }
+ node.ircclient.send.apply(node.ircclient,["TIME"]); // request time to check link
+ }, 60000); // check every 1 min
+ }
+ else { node.status({text:""}); }
+ node.ircclient = node.serverConfig.ircclient;
+
+ node.ircclient.addListener('registered', function(message) {
+ //node.log(node.ircclient.nick+" ONLINE");
+ node.status({fill:"yellow",shape:"dot",text:"connected"});
+ node.ircclient.join( node.channel, function(data) {
+ // node.log(data+" JOINED "+node.channel);
+ node.status({fill:"green",shape:"dot",text:"joined"});
+ });
+ });
+ node.ircclient.addListener('message', function (from, to, message) {
+ //node.log(from + ' => ' + to + ' : ' + message);
+ if (~node.channel.toLowerCase().indexOf(to.toLowerCase())) {
+ var msg = { "topic":from, "from":from, "to":to, "payload":message };
+ node.send([msg,null]);
+ }
+ //else { console.log(node.channel,to); }
+ });
+ node.ircclient.addListener('pm', function(from, message) {
+ //node.log("PM => "+from + ': ' + message);
+ var msg = { "topic":from, "from":from, "to":"PRIV", "payload":message };
+ node.send([msg,null]);
+ });
+ node.ircclient.addListener('join', function(channel, who) {
+ var msg = { "payload": { "type":"join", "who":who, "channel":channel } };
+ node.send([null,msg]);
+ //node.log(who+' has joined '+channel);
+ });
+ node.ircclient.addListener('invite', function(channel, from, message) {
+ var msg = { "payload": { "type":"invite", "who":from, "channel":channel, "message":message } };
+ node.send([null,msg]);
+ //node.log(from+' sent invite to '+channel+': '+message);
+ });
+ node.ircclient.addListener('part', function(channel, who, reason) {
+ var msg = { "payload": { "type":"part", "who":who, "channel":channel, "reason":reason } };
+ node.send([null,msg]);
+ //node.log(who+' has left '+channel+': '+reason);
+ });
+ node.ircclient.addListener('quit', function(nick, reason, channels, message) {
+ var msg = { "payload": { "type":"quit", "who":nick, "channel":channels, "reason":reason } };
+ node.send([null,msg]);
+ //node.log(nick+' has quit '+channels+': '+reason);
+ });
+ node.ircclient.addListener('kick', function(channel, who, by, reason) {
+ var msg = { "payload": { "type":"kick", "who":who, "channel":channel, "by":by, "reason":reason } };
+ node.send([null,msg]);
+ //node.log(who+' was kicked from '+channel+' by '+by+': '+reason);
+ });
+ node.ircclient.addListener('names', function (channel, nicks) {
+ var msg = { "payload": { "type": "names", "channel": channel, "names": nicks} };
+ node.send([null, msg]);
+ });
+ node.ircclient.addListener('raw', function (message) { // any message means we are alive
+ node.serverConfig.lastseen = Date.now();
+ });
+ node.on("close", function() {
+ node.ircclient.removeAllListeners();
+ if (node.recon) { clearInterval(node.recon); }
+ });
+ }
+ RED.nodes.registerType("irc in",IrcInNode);
+
+
+ // The Output Node
+ function IrcOutNode(n) {
+ RED.nodes.createNode(this,n);
+ this.sendFlag = n.sendObject;
+ this.ircserver = n.ircserver;
+ this.serverConfig = RED.nodes.getNode(this.ircserver);
+ this.channel = n.channel || this.serverConfig.channel;
+ var node = this;
+ if (node.serverConfig.ircclient === null) {
+ node.log("connecting to "+node.serverConfig.server);
+ node.status({fill:"grey",shape:"dot",text:"connecting"});
+ node.serverConfig.ircclient = new irc.Client(node.serverConfig.server, node.serverConfig.nickname,{autoConnect:false,retryDelay:20000});
+ node.serverConfig.ircclient.setMaxListeners(0);
+ node.serverConfig.ircclient.addListener('error', function(message) {
+ node.log(JSON.stringify(message));
+ });
+ node.serverConfig.ircclient.addListener('netError', function(message) {
+ node.log(JSON.stringify("NET "+message));
+ node.serverConfig.lastseen = Date.now();
+ });
+ node.serverConfig.ircclient.addListener('connect', function() {
+ node.serverConfig.lastseen = Date.now();
+ });
+ node.serverConfig.ircclient.addListener('ping', function(server) {
+ node.serverConfig.lastseen = Date.now();
+ //node.log("PING "+JSON.stringify(server));
+ });
+ node.serverConfig.ircclient.addListener('raw', function (message) { // any message received means we are alive
+ if (message.commandType === "reply") { node.serverConfig.lastseen = Date.now(); }
+ });
+ node.recon = setInterval( function() {
+ //console.log("CHK ",(Date.now()-node.serverConfig.lastseen)/1000);
+ if ((Date.now()-node.serverConfig.lastseen) > 300000) { // if more than 5 mins since last seen
+ node.ircclient.send.apply(node.ircclient,["TIME"]); // request time to check link
+ }
+ if ((Date.now()-node.serverConfig.lastseen) > 400000) { // If more than 6.5 mins
+ node.serverConfig.ircclient.disconnect();
+ node.serverConfig.ircclient.connect();
+ node.log("reconnect"); // then retry
+ }
+ node.ircclient.send.apply(node.ircclient,["TIME"]); // request time to check link
+ }, 60000); // check every 1 min
+ node.serverConfig.ircclient.connect();
+ }
+ else { node.status({text:""}); }
+ node.ircclient = node.serverConfig.ircclient;
+
+ node.ircclient.addListener('registered', function(message) {
+ node.log(node.ircclient.nick+" ONLINE");
+ node.status({fill:"yellow",shape:"dot",text:"connected"});
+ node.ircclient.join( node.channel, function(data) {
+ //node.log(data+" JOINED "+node.channel);
+ node.status({fill:"green",shape:"dot",text:"joined"});
+ });
+ });
+
+ node.on("input", function(msg) {
+ if (Object.prototype.toString.call( msg.raw ) === '[object Array]') {
+ node.log("RAW command:"+msg.raw);
+ node.ircclient.send.apply(node.ircclient,msg.raw);
+ //var m = msg.raw;
+ //for (var i = 0; i < 10; i++) {
+ //if (typeof m[i] !== "string") { m[i] = ""; }
+ //m[i] = m[i].replace(/"/g, "");
+ //}
+ //node.log("RAW command:"+m);
+ //node.ircclient.send(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9]);
+ }
+ else {
+ if (msg._topic) { delete msg._topic; }
+ var ch = node.channel.split(","); // split on , so we can send to multiple
+ if (node.sendFlag == "true") { // override channels with msg.topic
+ if ((msg.hasOwnProperty('topic'))&&(typeof msg.topic === "string")) {
+ ch = msg.topic.split(","); // split on , so we can send to multiple
+ }
+ else { node.warn("msg.topic not set"); }
+ }
+ for (var c = 0; c < ch.length; c++) {
+ if (node.sendFlag == "false") { // send whole message object to each channel
+ node.ircclient.say(ch[c], JSON.stringify(msg));
+ }
+ else { // send just the payload to each channel
+ if (typeof msg.payload === "object") { msg.payload = JSON.stringify(msg.payload); }
+ node.ircclient.say(ch[c], msg.payload);
+ }
+ }
+ }
+ });
+
+ node.on("close", function() {
+ node.ircclient.removeAllListeners();
+ if (node.recon) { clearInterval(node.recon); }
+ });
+ }
+ RED.nodes.registerType("irc out",IrcOutNode);
+}
diff --git a/dgbuilder/core_nodes/storage/28-tail.html b/dgbuilder/core_nodes/storage/28-tail.html
new file mode 100644
index 0000000..c094d06
--- /dev/null
+++ b/dgbuilder/core_nodes/storage/28-tail.html
@@ -0,0 +1,58 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="tail">
+ <div class="form-row node-input-filename">
+ <label for="node-input-filename"><i class="fa fa-file"></i> Filename</label>
+ <input type="text" id="node-input-filename" placeholder="Filename">
+ </div>
+ <div class="form-row">
+ <label> </label>
+ <input type="checkbox" id="node-input-split" placeholder="Name" style="display: inline-block; width: auto; vertical-align: top;">
+ <label for="node-input-split" style="width: 70%;">Split lines if we see \n ?</label>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <!-- <div class="form-tips">WON'T work on Windows.</div> -->
+</script>
+
+<script type="text/x-red" data-help-name="tail">
+ <p>Tails (watches for things to be added) to the configured file. (Linux/Mac ONLY)</p>
+ <p>This won't work on Windows filesystems, as it relies on the tail -F command.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('tail',{
+ category: 'storage-input',
+ defaults: {
+ name: {value:""},
+ split: {value:false},
+ filename: {value:"",required:true}
+ },
+ color:"BurlyWood",
+ inputs:0,
+ outputs:1,
+ icon: "file.png",
+ label: function() {
+ return this.name||this.filename;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/storage/28-tail.js b/dgbuilder/core_nodes/storage/28-tail.js
new file mode 100644
index 0000000..89c7a63
--- /dev/null
+++ b/dgbuilder/core_nodes/storage/28-tail.js
@@ -0,0 +1,69 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var spawn = require('child_process').spawn;
+ var plat = require('os').platform();
+
+ if (plat.match(/^win/)) {
+ throw "Info : Currently not supported on Windows.";
+ }
+
+ function TailNode(n) {
+ RED.nodes.createNode(this,n);
+
+ this.filename = n.filename;
+ this.split = n.split;
+ var node = this;
+
+ var err = "";
+ // TODO: rewrite to use node-tail
+ var tail = spawn("tail", ["-F", "-n", "0", this.filename]);
+ tail.stdout.on("data", function (data) {
+ if (node.split) {
+ // TODO: allow customisation of the line break - as we do elsewhere
+ var strings = data.toString().split("\n");
+ for (var s in strings) {
+ //TODO: should we really filter blanks? Is that expected?
+ if (strings[s] !== "") {
+ node.send({
+ topic: node.filename,
+ payload: strings[s]
+ });
+ }
+ }
+ }
+ else {
+ var msg = {
+ topic:node.filename,
+ payload: data.toString()
+ };
+ node.send(msg);
+ }
+ });
+
+ tail.stderr.on("data", function(data) {
+ node.warn(data.toString());
+ });
+
+ this.on("close", function() {
+ if (tail) { tail.kill(); }
+ });
+ }
+
+ RED.nodes.registerType("tail",TailNode);
+}
diff --git a/dgbuilder/core_nodes/storage/50-file.html b/dgbuilder/core_nodes/storage/50-file.html
new file mode 100644
index 0000000..5113a17
--- /dev/null
+++ b/dgbuilder/core_nodes/storage/50-file.html
@@ -0,0 +1,110 @@
+<!--
+ Copyright 2013, 2014 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="file">
+ <div class="form-row node-input-filename">
+ <label for="node-input-filename"><i class="fa fa-file"></i> Filename</label>
+ <input type="text" id="node-input-filename" placeholder="Filename">
+ </div>
+ <div class="form-row">
+ <label> </label>
+ <input type="checkbox" id="node-input-appendNewline" placeholder="Name" style="display: inline-block; width: auto; vertical-align: top;">
+ <label for="node-input-appendNewline" style="width: 70%;">Append newline ?</label>
+ </div>
+ <div class="form-row">
+ <label> </label>
+ <input type="checkbox" id="node-input-overwriteFile" placeholder="Name" style="display: inline-block; width: auto; vertical-align: top;">
+ <label for="node-input-overwriteFile" style="width: 70%;">Overwrite complete file ?</label>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="file">
+ <p>Writes <b>msg.payload</b> to the file specified, e.g. to create a log.</p>
+ <p>The filename can be overridden by the <b>msg.filename</b> property of the incoming message.</p>
+ <p>A newline is added to every message. But this can be turned off if required, for example, to allow binary files to be written.</p>
+ <p>The default behaviour is to append to the file. This can be changed to overwrite the file each time, for example if you want to output a "static" web page or report.</p>
+ <p>If a <b>msg.delete</b> property exists then the file will be deleted instead.</p>
+</script>
+
+<script type="text/x-red" data-template-name="file in">
+ <div class="form-row">
+ <label for="node-input-filename"><i class="fa fa-file"></i> Filename</label>
+ <input type="text" id="node-input-filename" placeholder="Filename">
+ </div>
+ <div class="form-row">
+ <label for="node-input-format"><i class="fa fa-sign-out"></i> Output as</label>
+ <select id="node-input-format">
+ <option value="utf8">a utf8 string</option>
+ <option value="">a Buffer</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="file in">
+ <p>Reads the specified file and sends the content as <b>msg.payload</b>, and the filename as <b>msg.filename</b>.</p>
+ <p>The filename can be overridden by the <b>msg.filename</b> property of the incoming message.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('file',{
+ category: 'storage-output',
+ defaults: {
+ name: {value:""},
+ filename: {value:""},
+ appendNewline: {value:true},
+ overwriteFile: {value:false}
+ },
+ color:"BurlyWood",
+ inputs:1,
+ outputs:0,
+ icon: "file.png",
+ align: "right",
+ label: function() {
+ return this.name||this.filename;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+
+ RED.nodes.registerType('file in',{
+ category: 'storage-input',
+ defaults: {
+ name: {value:""},
+ filename: {value:""},
+ format: {value:"utf8"},
+ },
+ color:"BurlyWood",
+ inputs:1,
+ outputs:1,
+ icon: "file.png",
+ label: function() {
+ return this.name||this.filename;
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ }
+ });
+
+</script>
diff --git a/dgbuilder/core_nodes/storage/50-file.js b/dgbuilder/core_nodes/storage/50-file.js
new file mode 100644
index 0000000..d6cc441
--- /dev/null
+++ b/dgbuilder/core_nodes/storage/50-file.js
@@ -0,0 +1,93 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var fs = require("fs");
+
+ function FileNode(n) {
+ RED.nodes.createNode(this,n);
+ this.filename = n.filename || "";
+ this.appendNewline = n.appendNewline;
+ this.overwriteFile = n.overwriteFile;
+ var node = this;
+ this.on("input",function(msg) {
+ var filename = msg.filename || this.filename;
+ if (filename === "") {
+ node.warn('No filename specified');
+ } else if (msg.hasOwnProperty('delete')) {
+ fs.unlink(filename, function (err) {
+ if (err) { node.warn('Failed to delete file : '+err); }
+ //console.log('Deleted file",filename);
+ });
+ } else if (typeof msg.payload != "undefined") {
+ var data = msg.payload;
+ if (typeof data === "object") {
+ if (!Buffer.isBuffer(data)) {
+ data = JSON.stringify(data);
+ }
+ }
+ if (typeof data === "boolean") { data = data.toString(); }
+ if ((this.appendNewline)&&(!Buffer.isBuffer(data))) { data += "\n"; }
+ if (this.overwriteFile) {
+ // using "binary" not {encoding:"binary"} to be 0.8 compatible for a while
+ fs.writeFile(filename, data, "binary", function (err) {
+ if (err) { node.warn('Failed to write to file : '+err); }
+ //console.log('Message written to file',filename);
+ });
+ }
+ else {
+ // using "binary" not {encoding:"binary"} to be 0.8 compatible for a while
+ fs.appendFile(filename, data, "binary", function (err) {
+ if (err) { node.warn('Failed to append to file : '+err); }
+ //console.log('Message appended to file',filename);
+ });
+ }
+ }
+ });
+ }
+ RED.nodes.registerType("file",FileNode);
+
+ function FileInNode(n) {
+ RED.nodes.createNode(this,n);
+
+ this.filename = n.filename || "";
+ this.format = n.format;
+ var node = this;
+ var options = {};
+ if (this.format) {
+ options['encoding'] = this.format;
+ }
+ this.on("input",function(msg) {
+ var filename = msg.filename || this.filename;
+ if (filename === "") {
+ node.warn('No filename specified');
+ } else {
+ fs.readFile(filename,options,function(err,data) {
+ if (err) {
+ node.warn(err);
+ msg.error = err;
+ } else {
+ msg.filename = filename;
+ msg.payload = data;
+ }
+ node.send(msg);
+ });
+ }
+ });
+ }
+ RED.nodes.registerType("file in",FileInNode);
+}
diff --git a/dgbuilder/core_nodes/storage/65-redisout.html b/dgbuilder/core_nodes/storage/65-redisout.html
new file mode 100644
index 0000000..9000dfd
--- /dev/null
+++ b/dgbuilder/core_nodes/storage/65-redisout.html
@@ -0,0 +1,105 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="redis out">
+ <div class="form-row node-input-hostname">
+ <label for="node-input-hostname"><i class="fa fa-bookmark"></i> Host</label>
+ <input class="input-append-left" type="text" id="node-input-hostname" placeholder="127.0.0.1" style="width: 40%;" ><button id="node-input-hostname-lookup" class="btn input-append-right"><span class="caret"></span></button>
+ <label for="node-input-port" style="margin-left: 10px; width: 35px; "> Port</label>
+ <input type="text" id="node-input-port" placeholder="6379" style="width:45px">
+ </div>
+ <div class="form-row">
+ <label for="node-input-key"><i class="fa fa-key"></i> Key</label>
+ <input type="text" id="node-input-key" placeholder="Redis Key">
+ </div>
+ <div class="form-row">
+ <label for="node-input-type"><i class="fa fa-th"></i> Type</label>
+ <select type="text" id="node-input-structtype" style="width: 150px;">
+ <option value="string">String</option>
+ <option value="hash">Hash</option>
+ <option value="set">Set</option>
+ <option value="list">List</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips">
+ If key is blank, the topic will be used as the key.<br>
+ If type is hash, payload should be field=value.
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="redis out">
+ <p>A Redis output node. Options include Hash, Set, List and String.</p>
+ <p>To run this you need a local Redis server running. For details see <a href="http://redis.io/" target="_new">the Redis site</a>.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('redis out',{
+ category: 'storage-output',
+ color:"#ffaaaa",
+ defaults: {
+ hostname: { value:"127.0.0.1",required:true},
+ port: { value: 6379,required:true},
+ name: {value:""},
+ key: {value:""},
+ structtype: {value:"",required:true}
+ },
+ inputs:1,
+ outputs:0,
+ icon: "redis.png",
+ align: "right",
+ label: function() {
+ return this.name||this.key+" ("+this.structtype+")";
+ },
+ oneditprepare: function() {
+ var availableServers = [];
+ var matchedServers = {};
+ RED.nodes.eachNode(function(node) {
+ if (node.type == "redis out" && node.hostname && node.port && !matchedServers[node.hostname+":"+node.port]) {
+ var label = node.hostname+":"+node.port;
+ matchedServers[label] = true;
+ availableServers.push({
+ label:label,
+ value:node.hostname,
+ port:node.port
+ });
+ }
+ });
+ $( "#node-input-hostname" ).autocomplete({
+ minLength: 0,
+ source: availableServers,
+ select: function( event, ui ) {
+ $("#node-input-port").val(ui.item.port);
+ }
+ });
+ var tt = this;
+ tt._acOpen = false;
+ $( "#node-input-hostname" ).on( "autocompleteclose", function( event, ui ) { tt._acOpen = false;} );
+ $( "#node-input-hostname-lookup" ).click(function(e) {
+ if (tt._acOpen) {
+ $( "#node-input-hostname" ).autocomplete( "close");
+ } else {
+ $( "#node-input-hostname" ).autocomplete( "search", "" );
+ }
+ tt._acOpen = !tt._acOpen;
+ e.preventDefault();
+ });
+ }
+ });
+</script>
diff --git a/dgbuilder/core_nodes/storage/65-redisout.js b/dgbuilder/core_nodes/storage/65-redisout.js
new file mode 100644
index 0000000..907e2a5
--- /dev/null
+++ b/dgbuilder/core_nodes/storage/65-redisout.js
@@ -0,0 +1,107 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var redis = require("redis");
+
+ var hashFieldRE = /^([^=]+)=(.*)$/;
+
+ var redisConnectionPool = function() {
+ var connections = {};
+ var obj = {
+ get: function(host,port) {
+ var id = host+":"+port;
+ if (!connections[id]) {
+ connections[id] = redis.createClient(port,host);
+ connections[id].on("error",function(err) {
+ util.log("[redis] "+err);
+ });
+ connections[id].on("connect",function() {
+ util.log("[redis] connected to "+host+":"+port);
+ });
+ connections[id]._id = id;
+ connections[id]._nodeCount = 0;
+ }
+ connections[id]._nodeCount += 1;
+ return connections[id];
+ },
+ close: function(connection) {
+ connection._nodeCount -= 1;
+ if (connection._nodeCount === 0) {
+ if (connection) {
+ clearTimeout(connection.retry_timer);
+ connection.end();
+ }
+ delete connections[connection._id];
+ }
+ }
+ };
+ return obj;
+ }();
+
+
+ function RedisOutNode(n) {
+ RED.nodes.createNode(this,n);
+ this.port = n.port||"6379";
+ this.hostname = n.hostname||"127.0.0.1";
+ this.key = n.key;
+ this.structtype = n.structtype;
+
+ this.client = redisConnectionPool.get(this.hostname,this.port);
+
+ if (this.client.connected) {
+ this.status({fill:"green",shape:"dot",text:"connected"});
+ } else {
+ this.status({fill:"red",shape:"ring",text:"disconnected"},true);
+ }
+
+ var node = this;
+ this.client.on("end", function() {
+ node.status({fill:"red",shape:"ring",text:"disconnected"});
+ });
+ this.client.on("connect", function() {
+ node.status({fill:"green",shape:"dot",text:"connected"});
+ });
+
+ this.on("input", function(msg) {
+ var k = this.key || msg.topic;
+ if (k) {
+ if (this.structtype == "string") {
+ this.client.set(k,RED.util.ensureString(msg.payload));
+ } else if (this.structtype == "hash") {
+ var r = hashFieldRE.exec(msg.payload);
+ if (r) {
+ this.client.hset(k,r[1],r[2]);
+ } else {
+ this.warn("Invalid payload for redis hash");
+ }
+ } else if (this.structtype == "set") {
+ this.client.sadd(k,msg.payload);
+ } else if (this.structtype == "list") {
+ this.client.rpush(k,msg.payload);
+ }
+ } else {
+ this.warn("No key or topic set");
+ }
+ });
+ this.on("close", function() {
+ redisConnectionPool.close(node.client);
+ });
+ }
+ RED.nodes.registerType("redis out",RedisOutNode);
+}
diff --git a/dgbuilder/core_nodes/storage/66-mongodb.html b/dgbuilder/core_nodes/storage/66-mongodb.html
new file mode 100644
index 0000000..81c5638
--- /dev/null
+++ b/dgbuilder/core_nodes/storage/66-mongodb.html
@@ -0,0 +1,231 @@
+<!--
+ Copyright 2013,2014 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="mongodb">
+ <div class="form-row">
+ <label for="node-config-input-hostname"><i class="fa fa-bookmark"></i> Host</label>
+ <input class="input-append-left" type="text" id="node-config-input-hostname" placeholder="localhost" style="width: 40%;" >
+ <label for="node-config-input-port" style="margin-left: 10px; width: 35px; "> Port</label>
+ <input type="text" id="node-config-input-port" placeholder="27017" style="width:45px">
+ </div>
+ <div class="form-row">
+ <label for="node-config-input-db"><i class="fa fa-database"></i> Database</label>
+ <input type="text" id="node-config-input-db" placeholder="test">
+ </div>
+ <div class="form-row">
+ <label for="node-config-input-user"><i class="fa fa-user"></i> Username</label>
+ <input type="text" id="node-config-input-user">
+ </div>
+ <div class="form-row">
+ <label for="node-config-input-password"><i class="fa fa-lock"></i> Password</label>
+ <input type="password" id="node-config-input-password">
+ </div>
+ <div class="form-row">
+ <label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-config-input-name" placeholder="Name">
+ </div>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('mongodb', {
+ category: 'config',
+ color: "rgb(218, 196, 180)",
+ defaults: {
+ hostname: {value: "127.0.0.1", required: true},
+ port: {value: 27017, required: true},
+ db: {value: "", required: true},
+ name: {value: ""}
+ },
+ credentials: {
+ user: {type: "text"},
+ password: {type: "password"}
+ },
+ label: function() {
+ return this.name || this.hostname + ":" + this.port + "/" + this.db;
+ }
+ });
+</script>
+
+
+<script type="text/x-red" data-template-name="mongodb out">
+ <div class="form-row">
+ <label for="node-input-mongodb"><i class="fa fa-bookmark"></i> Server</label>
+ <input type="text" id="node-input-mongodb">
+ </div>
+ <div class="form-row">
+ <label for="node-input-collection"><i class="fa fa-briefcase"></i> Collection</label>
+ <input type="text" id="node-input-collection" placeholder="collection">
+ </div>
+ <div class="form-row">
+ <label for="node-input-operation"><i class="fa fa-wrench"></i> Operation</label>
+ <select type="text" id="node-input-operation" style="display: inline-block; vertical-align: top;">
+ <option value="store">save</option>
+ <option value="insert">insert</option>
+ <option value="update">update</option>
+ <option value="delete">remove</option>
+ </select>
+ </div>
+ <div class="form-row node-input-payonly">
+ <label> </label>
+ <input type="checkbox" id="node-input-payonly" placeholder="Only" style="display: inline-block; width: auto; vertical-align: top;">
+ <label for="node-input-payonly" style="width: 70%;">Only store msg.payload object</label>
+ </div>
+ <div class="form-row node-input-upsert">
+ <label> </label>
+ <input type="checkbox" id="node-input-upsert" placeholder="Only" style="display: inline-block; width: auto; vertical-align: top;">
+ <label for="node-input-upsert" style="width: 70%;">Create a new document if no match found</label>
+ </div>
+ <div class="form-row node-input-multi">
+ <label> </label>
+ <input type="checkbox" id="node-input-multi" placeholder="Only" style="display: inline-block; width: auto; vertical-align: top;;">
+ <label for="node-input-multi" style="width: 70%;">Update all matching documents</label>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips" id="node-warning" style="display: none"><b> Tip:</b> If no collection is set, ensure <b>msg.collection</b> will contain the collection name
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="mongodb out">
+ <p>A simple MongoDB output node. Can save, insert, update and remove objects from a chosen collection.</p>
+ <p>Save will update an existing object or insert a new object if one does not already exist.</p>
+ <p>Insert will insert a new object.</p>
+ <p>Save and insert either store <b>msg</b> or <b>msg.payload</b>.</p>
+ <p>Update will modify an existing object or objects. The query to select objects to update uses <b>msg.query</b> and the update to the element uses <b>msg.payload</b>.</p>
+ <p>Update can add a object if it does not exist or update multiple objects.</p>
+ <p>Remove will remove objects that match the query passed in on <b>msg.payload</b>. A blank query will delete <i>all of the objects</i> in the collection.</p>
+ <p>You can either set the collection method in the node config or on <b>msg.collection</b>. Setting it in the node will override <b>msg.collection</b>.</p>
+ <p>By default MongoDB creates an <i>_id</i> property as the primary key - so repeated injections of the same <b>msg</b> will result in many database entries.</p>
+ <p>If this is NOT the desired behaviour - ie. you want repeated entries to overwrite, then you must set the <b>msg._id</b> property to be a constant by the use of a previous function node.</p>
+ <p>This could be a unique constant or you could create one based on some other msg property.</p>
+ <p>Currently we do not limit or cap the collection size at all... this may well change.</p>
+</script>
+
+<script type="text/javascript">
+
+ function oneditprepare() {
+ $("#node-input-operation").change(function () {
+ var id = $("#node-input-operation option:selected").val();
+
+ if (id === "update") {
+ $(".node-input-payonly").hide();
+ $(".node-input-upsert, .node-input-multi").show();
+ } else if (id === "delete") {
+ $(".node-input-payonly, .node-input-upsert, .node-input-multi").hide();
+ } else {
+ $(".node-input-payonly").show();
+ $(".node-input-upsert, .node-input-multi").hide();
+ }
+ });
+
+ $("#node-input-collection").change(function () {
+ if($("#node-input-collection").val() === "") {
+ $("#node-warning").show();
+ } else {
+ $("#node-warning").hide();
+ }
+ });
+ }
+
+ RED.nodes.registerType('mongodb out', {
+ category: 'storage-output',
+ color: "rgb(218, 196, 180)",
+ defaults: {
+ mongodb: {type: "mongodb", required: true},
+ name: {value: ""},
+ collection: {value: ""},
+ payonly: {value: false},
+ upsert: {value: false},
+ multi: {value: false},
+ operation: {value: "store"}
+ },
+ inputs: 1,
+ outputs: 0,
+ icon: "mongodb.png",
+ align: "right",
+ label: function() {
+ var mongoNode = RED.nodes.node(this.mongodb);
+ return this.name || (mongoNode ? mongoNode.label() + " " + this.collection: "mongodb");
+ },
+ labelStyle: function() {
+ return this.name ? "node_label_italic" : "";
+ },
+ oneditprepare: oneditprepare
+ });
+</script>
+
+
+<script type="text/x-red" data-template-name="mongodb in">
+ <div class="form-row">
+ <label for="node-input-mongodb"><i class="fa fa-bookmark"></i> Server</label>
+ <input type="text" id="node-input-mongodb">
+ </div>
+ <div class="form-row">
+ <label for="node-input-collection"><i class="fa fa-briefcase"></i> Collection</label>
+ <input type="text" id="node-input-collection" placeholder="collection">
+ </div>
+ <div class="form-row">
+ <label for="node-input-operation"><i class="fa fa-wrench"></i> Operation</label>
+ <select type="text" id="node-input-operation" style="display: inline-block; vertical-align: top;">
+ <option value="find">find</option>
+ <option value="count">count</option>
+ <option value="aggregate">aggregate</option>
+ </select>
+ </div>
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-tips" id="node-warning" style="display: none"><b> Tip:</b> If no collection is set, ensure <b>msg.collection</b> will contain the collection name
+ </div>
+</script>
+
+<script type="text/x-red" data-help-name="mongodb in">
+ <p>Calls a MongoDB collection method based on the selected operator.</p>
+ <p>Find queries a collection using the <b>msg.payload</b> as the query statement as per the .find() function. Optionally, you may also (via a function) set a <b>msg.projection</b> object to constrain the returned fields, a <b>msg.sort</b> object and a <b>msg.limit</b> object.</p>
+ <p>Count returns a count of the number of documents in a collection or matching a query using the <b>msg.payload</b> as the query statement.</p>
+ <p>Aggregate provides access to the aggregation pipeline using the <b>msg.payload</b> as the pipeline array.</p>
+ <p>You can override the collection the method is performed on by setting <b>msg.collection</b> to the desired collection name.</p>
+ <p>See the <a href="http://docs.mongodb.org/manual/reference/method/db.collection.find/" target="new"><i>MongoDB collection methods docs</i></a> for examples.</p>
+ <p>The result is returned in <b>msg.payload</b>.</p>
+</script>
+
+<script type="text/javascript">
+
+ RED.nodes.registerType('mongodb in', {
+ category: 'storage-input',
+ color: "rgb(218, 196, 180)",
+ defaults: {
+ mongodb: {type: "mongodb", required: true},
+ name: {value: ""},
+ collection: {value: ""},
+ operation: {value: "find"}
+ },
+ inputs: 1,
+ outputs: 1,
+ icon: "mongodb.png",
+ label: function() {
+ var mongoNode = RED.nodes.node(this.mongodb);
+ return this.name || (mongoNode ? mongoNode.label() + " " + this.collection: "mongodb");
+ },
+ labelStyle: function() {
+ return this.name ? "node_label_italic" : "";
+ },
+ oneditprepare: oneditprepare
+ });
+</script>
diff --git a/dgbuilder/core_nodes/storage/66-mongodb.js b/dgbuilder/core_nodes/storage/66-mongodb.js
new file mode 100644
index 0000000..3a71407
--- /dev/null
+++ b/dgbuilder/core_nodes/storage/66-mongodb.js
@@ -0,0 +1,233 @@
+/**
+ * Copyright 2013,2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var mongo = require('mongodb');
+ var MongoClient = mongo.MongoClient;
+
+ function MongoNode(n) {
+ RED.nodes.createNode(this,n);
+ this.hostname = n.hostname;
+ this.port = n.port;
+ this.db = n.db;
+ this.name = n.name;
+
+ var url = "mongodb://";
+ if (this.credentials && this.credentials.user && this.credentials.password) {
+ url += this.credentials.user+":"+this.credentials.password+"@";
+ }
+ url += this.hostname+":"+this.port+"/"+this.db;
+
+ this.url = url;
+ }
+
+ RED.nodes.registerType("mongodb",MongoNode,{
+ credentials: {
+ user: {type:"text"},
+ password: {type: "password"}
+ }
+ });
+
+ function ensureValidSelectorObject(selector) {
+ if (selector != null && (typeof selector != 'object' || Buffer.isBuffer(selector))) {
+ return {};
+ }
+ return selector;
+ }
+
+
+ function MongoOutNode(n) {
+ RED.nodes.createNode(this,n);
+ this.collection = n.collection;
+ this.mongodb = n.mongodb;
+ this.payonly = n.payonly || false;
+ this.upsert = n.upsert || false;
+ this.multi = n.multi || false;
+ this.operation = n.operation;
+ this.mongoConfig = RED.nodes.getNode(this.mongodb);
+
+ if (this.mongoConfig) {
+ var node = this;
+ MongoClient.connect(this.mongoConfig.url, function(err, db) {
+ if (err) {
+ node.error(err);
+ } else {
+ node.clientDb = db;
+ var coll;
+ if (node.collection) {
+ coll = db.collection(node.collection);
+ }
+ node.on("input",function(msg) {
+ if (!coll) {
+ if (msg.collection) {
+ coll = db.collection(msg.collection);
+ } else {
+ node.error("No collection defined");
+ return;
+ }
+ }
+ delete msg._topic;
+ delete msg.collection;
+ if (node.operation === "store") {
+ if (node.payonly) {
+ if (typeof msg.payload !== "object") {
+ msg.payload = {"payload": msg.payload};
+ }
+ coll.save(msg.payload,function(err, item) {
+ if (err) {
+ node.error(err);
+ }
+ });
+ } else {
+ coll.save(msg,function(err, item) {
+ if (err) {
+ node.error(err);
+ }
+ });
+ }
+ } else if (node.operation === "insert") {
+ if (node.payonly) {
+ if (typeof msg.payload !== "object") {
+ msg.payload = {"payload": msg.payload};
+ }
+ coll.insert(msg.payload, function(err, item) {
+ if (err) {
+ node.error(err);
+ }
+ });
+ } else {
+ coll.insert(msg, function(err,item) {
+ if (err) {
+ node.error(err);
+ }
+ });
+ }
+ } else if (node.operation === "update") {
+ if (typeof msg.payload !== "object") {
+ msg.payload = {"payload": msg.payload};
+ }
+ var query = msg.query || {};
+ var payload = msg.payload || {};
+ var options = {
+ upsert: node.upsert,
+ multi: node.multi
+ };
+
+ coll.update(query, payload, options, function(err, item) {
+ if (err) {
+ node.error(err + " " + payload);
+ }
+ });
+ } else if (node.operation === "delete") {
+ coll.remove(msg.payload, function(err, items) {
+ if (err) {
+ node.error(err);
+ }
+ });
+ }
+ });
+ }
+ });
+ } else {
+ this.error("missing mongodb configuration");
+ }
+
+ this.on("close", function() {
+ if (this.clientDb) {
+ this.clientDb.close();
+ }
+ });
+ }
+ RED.nodes.registerType("mongodb out",MongoOutNode);
+
+ function MongoInNode(n) {
+ RED.nodes.createNode(this,n);
+ this.collection = n.collection;
+ this.mongodb = n.mongodb;
+ this.operation = n.operation || "find";
+ this.mongoConfig = RED.nodes.getNode(this.mongodb);
+
+ if (this.mongoConfig) {
+ var node = this;
+ MongoClient.connect(this.mongoConfig.url, function(err,db) {
+ if (err) {
+ node.error(err);
+ } else {
+ node.clientDb = db;
+ var coll;
+ if (node.collection) {
+ coll = db.collection(node.collection);
+ }
+ node.on("input", function(msg) {
+ if (!coll) {
+ if (msg.collection) {
+ coll = db.collection(msg.collection);
+ } else {
+ node.error("No collection defined");
+ return;
+ }
+ }
+ if (node.operation === "find") {
+ msg.projection = msg.projection || {};
+ var selector = ensureValidSelectorObject(msg.payload);
+ coll.find(selector,msg.projection).sort(msg.sort).limit(msg.limit).toArray(function(err, items) {
+ if (err) {
+ node.error(err);
+ } else {
+ msg.payload = items;
+ delete msg.projection;
+ delete msg.sort;
+ delete msg.limit;
+ node.send(msg);
+ }
+ });
+ } else if (node.operation === "count") {
+ var selector = ensureValidSelectorObject(msg.payload);
+ coll.count(selector, function(err, count) {
+ if (err) {
+ node.error(err);
+ } else {
+ msg.payload = count;
+ node.send(msg);
+ }
+ });
+ } else if (node.operation === "aggregate") {
+ msg.payload = (msg.payload instanceof Array) ? msg.payload : [];
+ coll.aggregate(msg.payload, function(err, result) {
+ if (err) {
+ node.error(err);
+ } else {
+ msg.payload = result;
+ node.send(msg);
+ }
+ });
+ }
+ });
+ }
+ });
+ } else {
+ this.error("missing mongodb configuration");
+ }
+
+ this.on("close", function() {
+ if (this.clientDb) {
+ this.clientDb.close();
+ }
+ });
+ }
+ RED.nodes.registerType("mongodb in",MongoInNode);
+}
diff --git a/dgbuilder/createReleaseDir b/dgbuilder/createReleaseDir
new file mode 100755
index 0000000..c2974cb
--- /dev/null
+++ b/dgbuilder/createReleaseDir
@@ -0,0 +1,128 @@
+export PATH=$PATH:.
+appDir=$(pwd)
+if [ "$#" != 3 -a "$#" != 4 ]
+then
+ echo "Usage $0 releaseDir loginId emailAddress [gitLocalRepository]"
+ echo "Note: Specify the gitLocalRepository path if you would want to be able to import flows from your local git repository"
+ exit
+fi
+if [ ! -e "releases" ]
+then
+ mkdir releases
+fi
+releaseDir="$1"
+name="Release $releaseDir"
+loginId="$2"
+emailid="$3"
+dbHost="dbhost"
+dbPort="3306"
+dbName="sdnctl"
+dbUser="sdnctl"
+dbPassword="gamma"
+gitLocalRepository="$4"
+
+lastPort=$(find "releases/" -name "customSettings.js" |xargs grep uiPort|cut -d: -f2|sed -e s/,//|sort|tail -1)
+echo $lastPort|grep uiPort >/dev/null 2>&1
+if [ "$?" == "0" ]
+then
+lastPort=$(find "releases/" -name "customSettings.js" |xargs grep uiPort|cut -d: -f3|sed -e s/,//|sort|tail -1)
+fi
+#echo $lastPort
+if [ "${lastPort}" == "" ]
+then
+ lastPort="3099"
+fi
+let nextPort=$(expr $lastPort+1)
+#echo $nextPort
+if [ ! -e "releases/$releaseDir" ]
+then
+mkdir releases/$releaseDir
+cd releases/$releaseDir
+mkdir flows
+mkdir flows/shared
+mkdir flows/shared/backups
+mkdir html
+mkdir xml
+mkdir lib
+mkdir lib/flows
+mkdir logs
+mkdir conf
+mkdir codecloud
+customSettingsFile="customSettings.js"
+if [ ! -e "./$customSettingsFile" ]
+then
+ echo "module.exports = {" >$customSettingsFile
+ echo " 'name' : '$name'," >>$customSettingsFile
+ echo " 'emailAddress' :'$emailid'," >>$customSettingsFile
+ echo " 'uiPort' :$nextPort," >>$customSettingsFile
+ echo " 'mqttReconnectTime': 15000," >>$customSettingsFile
+ echo " 'serialReconnectTime' : 15000," >>$customSettingsFile
+ echo " 'debugMaxLength': 1000," >>$customSettingsFile
+ echo " 'htmlPath': 'releases/$releaseDir/html/'," >>$customSettingsFile
+ echo " 'xmlPath': 'releases/$releaseDir/xml/'," >>$customSettingsFile
+ echo " 'flowFile' : 'releases/$releaseDir/flows/flows.json'," >>$customSettingsFile
+ echo " 'sharedDir': 'releases/$releaseDir/flows/shared'," >>$customSettingsFile
+ echo " 'userDir' : 'releases/$releaseDir'," >>$customSettingsFile
+ echo " 'httpAuth': {user:'$loginId',pass:'cc03e747a6afbbcbf8be7668acfebee5'}," >>$customSettingsFile
+ echo " 'dbHost': '$dbHost'," >>$customSettingsFile
+ echo " 'dbPort': '$dbPort'," >>$customSettingsFile
+ echo " 'dbName': '$dbName'," >>$customSettingsFile
+ echo " 'dbUser': '$dbUser'," >>$customSettingsFile
+ echo " 'dbPassword': '$dbPassword'," >>$customSettingsFile
+ echo " 'gitLocalRepository': '$gitLocalRepository'" >>$customSettingsFile
+ echo " }" >>$customSettingsFile
+fi
+ #echo "Created custom settings file $customSettingsFile"
+ echo "Done ....."
+else
+ echo "ERROR:customSettings file $customSettingsFile already exists for $releaseDir"
+ exit
+fi
+#echo "Content of custom settings file"
+#echo "============================================================================"
+# cat $customSettingsFile
+#echo "============================================================================"
+svclogicPropFile="./conf/svclogic.properties"
+if [ ! -d "${appDir}/yangFiles" ]
+then
+ mkdir -p "${appDir}/yangFiles"
+fi
+if [ ! -d "${appDir}/generatedJS" ]
+then
+ mkdir -p "${appDir}/generatedJS"
+fi
+
+if [ ! -e "./$svclogicPropFile" ]
+then
+ echo "org.openecomp.sdnc.sli.dbtype=jdbc" >$svclogicPropFile
+ echo "org.openecomp.sdnc.sli.jdbc.url=jdbc:mysql://dbhost:3306/sdnctl" >>$svclogicPropFile
+ echo "org.openecomp.sdnc.sli.jdbc.database=sdnctl" >>$svclogicPropFile
+ echo "org.openecomp.sdnc.sli.jdbc.user=sdnctl" >>$svclogicPropFile
+ echo "org.openecomp.sdnc.sli.jdbc.password=gamma" >>$svclogicPropFile
+fi
+if [ ! -e "${appDir}/flowShareUsers.js" ]
+then
+ echo "module.exports = {\"flowShareUsers\":" >${appDir}/flowShareUsers.js
+ echo " [" >>${appDir}/flowShareUsers.js
+ echo " ]" >>${appDir}/flowShareUsers.js
+ echo "}" >>${appDir}/flowShareUsers.js
+fi
+grep "$releaseDir" ${appDir}/flowShareUsers.js >/dev/null 2>&1
+if [ "$?" != "0" ]
+then
+ num_of_lines=$(cat ${appDir}/flowShareUsers.js|wc -l)
+ if [ $num_of_lines -gt 4 ]
+ then
+ content=$(head -n -2 ${appDir}/flowShareUsers.js)
+ echo "${content}," > ${appDir}/flowShareUsers.js
+ else
+ content=$(head -n -2 ${appDir}/flowShareUsers.js)
+ echo "$content" > ${appDir}/flowShareUsers.js
+ fi
+ echo " {" >> ${appDir}/flowShareUsers.js
+ echo " \"name\" : \"$name\"," >> ${appDir}/flowShareUsers.js
+ echo " \"rootDir\" : \"$releaseDir\"" >> ${appDir}/flowShareUsers.js
+ echo " }" >> ${appDir}/flowShareUsers.js
+ echo " ]" >> ${appDir}/flowShareUsers.js
+ echo "}" >> ${appDir}/flowShareUsers.js
+fi
diff --git a/dgbuilder/dgeflows/app.js b/dgbuilder/dgeflows/app.js
new file mode 100644
index 0000000..d2acfec
--- /dev/null
+++ b/dgbuilder/dgeflows/app.js
@@ -0,0 +1,73 @@
+var express = require('express');
+var path = require('path');
+var favicon = require('serve-favicon');
+var logger = require('morgan');
+var cookieParser = require('cookie-parser');
+var bodyParser = require('body-parser');
+var serveIndex = require('serve-index');
+var serveStatic = require('serve-static')
+
+var routes = require('./routes/index');
+var users = require('./routes/users');
+var dgeusers = require('./dgeusers.json');
+console.log("Read these dgeusers: " + JSON.stringify(dgeusers));
+
+var app = express();
+
+// view engine setup
+app.set('views', path.join(__dirname, 'views'));
+app.set('view engine', 'ejs');
+
+// uncomment after placing your favicon in /public
+//app.use(favicon(__dirname + '/public/favicon.ico'));
+app.use(logger('dev'));
+app.use(bodyParser.json());
+app.use(bodyParser.urlencoded({ extended: false }));
+app.use(cookieParser());
+app.use(express.static(path.join(__dirname, 'public')));
+
+
+// set up static serving and directory listings for each user's lib/flows directory
+dgeusers.forEach( function(dgeuser) {
+ console.log("Setting up static serving for " + dgeuser);
+ var sDir = "../users/" + dgeuser + '/flows/shared';
+ console.log("sDir" + sDir);
+ app.use('/listFlows/'+dgeuser+'/flows/shared', serveIndex(sDir, {'view': 'details', 'icons': true}))
+});
+
+app.use('/', routes);
+app.use('/users', users);
+
+// catch 404 and forward to error handler
+app.use(function(req, res, next) {
+ var err = new Error('Not Found');
+ err.status = 404;
+ next(err);
+});
+
+// error handlers
+
+// development error handler
+// will print stacktrace
+if (app.get('env') === 'development') {
+ app.use(function(err, req, res, next) {
+ res.status(err.status || 500);
+ res.render('error', {
+ message: err.message,
+ error: err
+ });
+ });
+}
+
+// production error handler
+// no stacktraces leaked to user
+app.use(function(err, req, res, next) {
+ res.status(err.status || 500);
+ res.render('error', {
+ message: err.message,
+ error: {}
+ });
+});
+
+
+module.exports = app;
diff --git a/dgbuilder/dgeflows/dgeusers.json b/dgbuilder/dgeflows/dgeusers.json
new file mode 100644
index 0000000..5c8a626
--- /dev/null
+++ b/dgbuilder/dgeflows/dgeusers.json
@@ -0,0 +1,13 @@
+[
+"brian",
+"carsten",
+"chaitanya",
+"dan",
+"george",
+"jay",
+"john",
+"kevin",
+"lynn",
+"prakash",
+"sheshi"
+]
diff --git a/dgbuilder/dgeflows/go b/dgbuilder/dgeflows/go
new file mode 100755
index 0000000..71239ba
--- /dev/null
+++ b/dgbuilder/dgeflows/go
@@ -0,0 +1,3 @@
+
+pm2 start --name dgebrowser bin/www
+
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/HISTORY.md b/dgbuilder/dgeflows/node_modules/body-parser/HISTORY.md
new file mode 100644
index 0000000..b46f461
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/HISTORY.md
@@ -0,0 +1,265 @@
+1.10.2 / 2015-01-20
+===================
+
+ * deps: iconv-lite@0.4.6
+ - Fix rare aliases of single-byte encodings
+ * deps: raw-body@1.3.2
+ - deps: iconv-lite@0.4.6
+
+1.10.1 / 2015-01-01
+===================
+
+ * deps: on-finished@~2.2.0
+ * deps: type-is@~1.5.5
+ - deps: mime-types@~2.0.7
+
+1.10.0 / 2014-12-02
+===================
+
+ * make internal `extended: true` array limit dynamic
+
+1.9.3 / 2014-11-21
+==================
+
+ * deps: iconv-lite@0.4.5
+ - Fix Windows-31J and X-SJIS encoding support
+ * deps: qs@2.3.3
+ - Fix `arrayLimit` behavior
+ * deps: raw-body@1.3.1
+ - deps: iconv-lite@0.4.5
+ * deps: type-is@~1.5.3
+ - deps: mime-types@~2.0.3
+
+1.9.2 / 2014-10-27
+==================
+
+ * deps: qs@2.3.2
+ - Fix parsing of mixed objects and values
+
+1.9.1 / 2014-10-22
+==================
+
+ * deps: on-finished@~2.1.1
+ - Fix handling of pipelined requests
+ * deps: qs@2.3.0
+ - Fix parsing of mixed implicit and explicit arrays
+ * deps: type-is@~1.5.2
+ - deps: mime-types@~2.0.2
+
+1.9.0 / 2014-09-24
+==================
+
+ * include the charset in "unsupported charset" error message
+ * include the encoding in "unsupported content encoding" error message
+ * deps: depd@~1.0.0
+
+1.8.4 / 2014-09-23
+==================
+
+ * fix content encoding to be case-insensitive
+
+1.8.3 / 2014-09-19
+==================
+
+ * deps: qs@2.2.4
+ - Fix issue with object keys starting with numbers truncated
+
+1.8.2 / 2014-09-15
+==================
+
+ * deps: depd@0.4.5
+
+1.8.1 / 2014-09-07
+==================
+
+ * deps: media-typer@0.3.0
+ * deps: type-is@~1.5.1
+
+1.8.0 / 2014-09-05
+==================
+
+ * make empty-body-handling consistent between chunked requests
+ - empty `json` produces `{}`
+ - empty `raw` produces `new Buffer(0)`
+ - empty `text` produces `''`
+ - empty `urlencoded` produces `{}`
+ * deps: qs@2.2.3
+ - Fix issue where first empty value in array is discarded
+ * deps: type-is@~1.5.0
+ - fix `hasbody` to be true for `content-length: 0`
+
+1.7.0 / 2014-09-01
+==================
+
+ * add `parameterLimit` option to `urlencoded` parser
+ * change `urlencoded` extended array limit to 100
+ * respond with 413 when over `parameterLimit` in `urlencoded`
+
+1.6.7 / 2014-08-29
+==================
+
+ * deps: qs@2.2.2
+ - Remove unnecessary cloning
+
+1.6.6 / 2014-08-27
+==================
+
+ * deps: qs@2.2.0
+ - Array parsing fix
+ - Performance improvements
+
+1.6.5 / 2014-08-16
+==================
+
+ * deps: on-finished@2.1.0
+
+1.6.4 / 2014-08-14
+==================
+
+ * deps: qs@1.2.2
+
+1.6.3 / 2014-08-10
+==================
+
+ * deps: qs@1.2.1
+
+1.6.2 / 2014-08-07
+==================
+
+ * deps: qs@1.2.0
+ - Fix parsing array of objects
+
+1.6.1 / 2014-08-06
+==================
+
+ * deps: qs@1.1.0
+ - Accept urlencoded square brackets
+ - Accept empty values in implicit array notation
+
+1.6.0 / 2014-08-05
+==================
+
+ * deps: qs@1.0.2
+ - Complete rewrite
+ - Limits array length to 20
+ - Limits object depth to 5
+ - Limits parameters to 1,000
+
+1.5.2 / 2014-07-27
+==================
+
+ * deps: depd@0.4.4
+ - Work-around v8 generating empty stack traces
+
+1.5.1 / 2014-07-26
+==================
+
+ * deps: depd@0.4.3
+ - Fix exception when global `Error.stackTraceLimit` is too low
+
+1.5.0 / 2014-07-20
+==================
+
+ * deps: depd@0.4.2
+ - Add `TRACE_DEPRECATION` environment variable
+ - Remove non-standard grey color from color output
+ - Support `--no-deprecation` argument
+ - Support `--trace-deprecation` argument
+ * deps: iconv-lite@0.4.4
+ - Added encoding UTF-7
+ * deps: raw-body@1.3.0
+ - deps: iconv-lite@0.4.4
+ - Added encoding UTF-7
+ - Fix `Cannot switch to old mode now` error on Node.js 0.10+
+ * deps: type-is@~1.3.2
+
+1.4.3 / 2014-06-19
+==================
+
+ * deps: type-is@1.3.1
+ - fix global variable leak
+
+1.4.2 / 2014-06-19
+==================
+
+ * deps: type-is@1.3.0
+ - improve type parsing
+
+1.4.1 / 2014-06-19
+==================
+
+ * fix urlencoded extended deprecation message
+
+1.4.0 / 2014-06-19
+==================
+
+ * add `text` parser
+ * add `raw` parser
+ * check accepted charset in content-type (accepts utf-8)
+ * check accepted encoding in content-encoding (accepts identity)
+ * deprecate `bodyParser()` middleware; use `.json()` and `.urlencoded()` as needed
+ * deprecate `urlencoded()` without provided `extended` option
+ * lazy-load urlencoded parsers
+ * parsers split into files for reduced mem usage
+ * support gzip and deflate bodies
+ - set `inflate: false` to turn off
+ * deps: raw-body@1.2.2
+ - Support all encodings from `iconv-lite`
+
+1.3.1 / 2014-06-11
+==================
+
+ * deps: type-is@1.2.1
+ - Switch dependency from mime to mime-types@1.0.0
+
+1.3.0 / 2014-05-31
+==================
+
+ * add `extended` option to urlencoded parser
+
+1.2.2 / 2014-05-27
+==================
+
+ * deps: raw-body@1.1.6
+ - assert stream encoding on node.js 0.8
+ - assert stream encoding on node.js < 0.10.6
+ - deps: bytes@1
+
+1.2.1 / 2014-05-26
+==================
+
+ * invoke `next(err)` after request fully read
+ - prevents hung responses and socket hang ups
+
+1.2.0 / 2014-05-11
+==================
+
+ * add `verify` option
+ * deps: type-is@1.2.0
+ - support suffix matching
+
+1.1.2 / 2014-05-11
+==================
+
+ * improve json parser speed
+
+1.1.1 / 2014-05-11
+==================
+
+ * fix repeated limit parsing with every request
+
+1.1.0 / 2014-05-10
+==================
+
+ * add `type` option
+ * deps: pin for safety and consistency
+
+1.0.2 / 2014-04-14
+==================
+
+ * use `type-is` module
+
+1.0.1 / 2014-03-20
+==================
+
+ * lower default limits to 100kb
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/LICENSE b/dgbuilder/dgeflows/node_modules/body-parser/LICENSE
new file mode 100644
index 0000000..53e49a3
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/README.md b/dgbuilder/dgeflows/node_modules/body-parser/README.md
new file mode 100644
index 0000000..d75499c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/README.md
@@ -0,0 +1,192 @@
+# body-parser
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+Node.js body parsing middleware.
+
+This does not handle multipart bodies, due to their complex and typically large nature. For multipart bodies, you may be interested in the following modules:
+
+- [busboy](https://www.npmjs.org/package/busboy#readme) and [connect-busboy](https://www.npmjs.org/package/connect-busboy#readme)
+- [multiparty](https://www.npmjs.org/package/multiparty#readme) and [connect-multiparty](https://www.npmjs.org/package/connect-multiparty#readme)
+- [formidable](https://www.npmjs.org/package/formidable#readme)
+- [multer](https://www.npmjs.org/package/multer#readme)
+
+Other body parsers you might be interested in:
+
+- [body](https://www.npmjs.org/package/body#readme)
+- [co-body](https://www.npmjs.org/package/co-body#readme)
+
+## Installation
+
+```sh
+$ npm install body-parser
+```
+
+## API
+
+```js
+var bodyParser = require('body-parser')
+```
+
+### bodyParser.json(options)
+
+Returns middleware that only parses `json`. This parser accepts any Unicode encoding of the body and supports automatic inflation of `gzip` and `deflate` encodings.
+
+The options are:
+
+- `strict` - only parse objects and arrays. (default: `true`)
+- `inflate` - if deflated bodies will be inflated. (default: `true`)
+- `limit` - maximum request body size. (default: `<100kb>`)
+- `reviver` - passed to `JSON.parse()`
+- `type` - request content-type to parse (default: `json`)
+- `verify` - function to verify body content
+
+The `type` argument is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme) library. This can be an extension name (like `json`), a mime type (like `application/json`), or a mime time with a wildcard (like `*/json`).
+
+The `verify` argument, if supplied, is called as `verify(req, res, buf, encoding)`, where `buf` is a `Buffer` of the raw request body and `encoding` is the encoding of the request. The parsing can be aborted by throwing an error.
+
+The `reviver` argument is passed directly to `JSON.parse` as the second argument. You can find more information on this argument [in the MDN documentation about JSON.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter).
+
+### bodyParser.raw(options)
+
+Returns middleware that parses all bodies as a `Buffer`. This parser supports automatic inflation of `gzip` and `deflate` encodings.
+
+The options are:
+
+- `inflate` - if deflated bodies will be inflated. (default: `true`)
+- `limit` - maximum request body size. (default: `<100kb>`)
+- `type` - request content-type to parse (default: `application/octet-stream`)
+- `verify` - function to verify body content
+
+The `type` argument is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme) library. This can be an extension name (like `bin`), a mime type (like `application/octet-stream`), or a mime time with a wildcard (like `application/*`).
+
+The `verify` argument, if supplied, is called as `verify(req, res, buf, encoding)`, where `buf` is a `Buffer` of the raw request body and `encoding` is the encoding of the request. The parsing can be aborted by throwing an error.
+
+### bodyParser.text(options)
+
+Returns middleware that parses all bodies as a string. This parser supports automatic inflation of `gzip` and `deflate` encodings.
+
+The options are:
+
+- `defaultCharset` - the default charset to parse as, if not specified in content-type. (default: `utf-8`)
+- `inflate` - if deflated bodies will be inflated. (default: `true`)
+- `limit` - maximum request body size. (default: `<100kb>`)
+- `type` - request content-type to parse (default: `text/plain`)
+- `verify` - function to verify body content
+
+The `type` argument is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme) library. This can be an extension name (like `txt`), a mime type (like `text/plain`), or a mime time with a wildcard (like `text/*`).
+
+The `verify` argument, if supplied, is called as `verify(req, res, buf, encoding)`, where `buf` is a `Buffer` of the raw request body and `encoding` is the encoding of the request. The parsing can be aborted by throwing an error.
+
+### bodyParser.urlencoded(options)
+
+Returns middleware that only parses `urlencoded` bodies. This parser accepts only UTF-8 encoding of the body and supports automatic inflation of `gzip` and `deflate` encodings.
+
+The options are:
+
+- `extended` - parse extended syntax with the [qs](https://www.npmjs.org/package/qs#readme) module. (default: `true`, but using the default has been deprecated. Please research into the difference between `qs` and `querystring` and choose the appropriate setting)
+- `inflate` - if deflated bodies will be inflated. (default: `true`)
+- `limit` - maximum request body size. (default: `<100kb>`)
+- `parameterLimit` - maximum number of parameters. (default: `1000`)
+- `type` - request content-type to parse (default: `urlencoded`)
+- `verify` - function to verify body content
+
+The `extended` argument allows to choose between parsing the urlencoded data with the `querystring` library (when `false`) or the `qs` library (when `true`). The "extended" syntax allows for rich objects and arrays to be encoded into the urlencoded format, allowing for a JSON-like experience with urlencoded. For more information, please [see the qs library](https://www.npmjs.org/package/qs#readme).
+
+The `parameterLimit` argument controls the maximum number of parameters that are allowed in the urlencoded data. If a request contains more parameters than this value, a 413 will be returned to the client.
+
+The `type` argument is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme) library. This can be an extension name (like `urlencoded`), a mime type (like `application/x-www-form-urlencoded`), or a mime time with a wildcard (like `*/x-www-form-urlencoded`).
+
+The `verify` argument, if supplied, is called as `verify(req, res, buf, encoding)`, where `buf` is a `Buffer` of the raw request body and `encoding` is the encoding of the request. The parsing can be aborted by throwing an error.
+
+### req.body
+
+A new `body` object containing the parsed data is populated on the `request` object after the middleware.
+
+## Examples
+
+### express/connect top-level generic
+
+This example demonstrates adding a generic JSON and urlencoded parser as a top-level middleware, which will parse the bodies of all incoming requests. This is the simplest setup.
+
+```js
+var express = require('express')
+var bodyParser = require('body-parser')
+
+var app = express()
+
+// parse application/x-www-form-urlencoded
+app.use(bodyParser.urlencoded({ extended: false }))
+
+// parse application/json
+app.use(bodyParser.json())
+
+app.use(function (req, res) {
+ res.setHeader('Content-Type', 'text/plain')
+ res.write('you posted:\n')
+ res.end(JSON.stringify(req.body, null, 2))
+})
+```
+
+### express route-specific
+
+This example demonstrates adding body parsers specifically to the routes that need them. In general, this is the most recommend way to use body-parser with express.
+
+```js
+var express = require('express')
+var bodyParser = require('body-parser')
+
+var app = express()
+
+// create application/json parser
+var jsonParser = bodyParser.json()
+
+// create application/x-www-form-urlencoded parser
+var urlencodedParser = bodyParser.urlencoded({ extended: false })
+
+// POST /login gets urlencoded bodies
+app.post('/login', urlencodedParser, function (req, res) {
+ if (!req.body) return res.sendStatus(400)
+ res.send('welcome, ' + req.body.username)
+})
+
+// POST /api/users gets JSON bodies
+app.post('/api/users', jsonParser, function (req, res) {
+ if (!req.body) return res.sendStatus(400)
+ // create user in req.body
+})
+```
+
+### change content-type for parsers
+
+All the parsers accept a `type` option which allows you to change the `Content-Type` that the middleware will parse.
+
+```js
+// parse various different custom JSON types as JSON
+app.use(bodyParser.json({ type: 'application/*+json' }))
+
+// parse some custom thing into a Buffer
+app.use(bodyParser.raw({ type: 'application/vnd.custom-type' }))
+
+// parse an HTML body into a string
+app.use(bodyParser.text({ type: 'text/html' }))
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/body-parser.svg?style=flat
+[npm-url]: https://npmjs.org/package/body-parser
+[travis-image]: https://img.shields.io/travis/expressjs/body-parser.svg?style=flat
+[travis-url]: https://travis-ci.org/expressjs/body-parser
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/body-parser.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/body-parser.svg?style=flat
+[downloads-url]: https://npmjs.org/package/body-parser
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat
+[gratipay-url]: https://www.gratipay.com/dougwilson/
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/index.js b/dgbuilder/dgeflows/node_modules/body-parser/index.js
new file mode 100644
index 0000000..a47ef89
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/index.js
@@ -0,0 +1,94 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var deprecate = require('depd')('body-parser')
+var fs = require('fs')
+var path = require('path')
+
+/**
+ * @typedef Parsers
+ * @type {function}
+ * @property {function} json
+ * @property {function} raw
+ * @property {function} text
+ * @property {function} urlencoded
+ */
+
+/**
+ * Module exports.
+ * @type {Parsers}
+ */
+
+exports = module.exports = deprecate.function(bodyParser,
+ 'bodyParser: use individual json/urlencoded middlewares')
+
+/**
+ * Path to the parser modules.
+ */
+
+var parsersDir = path.join(__dirname, 'lib', 'types')
+
+/**
+ * Auto-load bundled parsers with getters.
+ */
+
+fs.readdirSync(parsersDir).forEach(function onfilename(filename) {
+ if (!/\.js$/.test(filename)) return
+
+ var loc = path.resolve(parsersDir, filename)
+ var mod
+ var name = path.basename(filename, '.js')
+
+ function load() {
+ if (mod) {
+ return mod
+ }
+
+ return mod = require(loc)
+ }
+
+ Object.defineProperty(exports, name, {
+ configurable: true,
+ enumerable: true,
+ get: load
+ })
+})
+
+/**
+ * Create a middleware to parse json and urlencoded bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @deprecated
+ * @api public
+ */
+
+function bodyParser(options){
+ var opts = {}
+
+ options = options || {}
+
+ // exclude type option
+ for (var prop in options) {
+ if ('type' !== prop) {
+ opts[prop] = options[prop]
+ }
+ }
+
+ var _urlencoded = exports.urlencoded(opts)
+ var _json = exports.json(opts)
+
+ return function bodyParser(req, res, next) {
+ _json(req, res, function(err){
+ if (err) return next(err);
+ _urlencoded(req, res, next);
+ });
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/lib/read.js b/dgbuilder/dgeflows/node_modules/body-parser/lib/read.js
new file mode 100644
index 0000000..0880a3d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/lib/read.js
@@ -0,0 +1,153 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var getBody = require('raw-body')
+var iconv = require('iconv-lite')
+var onFinished = require('on-finished')
+var typer = require('media-typer')
+var zlib = require('zlib')
+
+/**
+ * Module exports.
+ */
+
+module.exports = read
+
+/**
+ * Read a request into a buffer and parse.
+ *
+ * @param {object} req
+ * @param {object} res
+ * @param {function} next
+ * @param {function} parse
+ * @param {object} options
+ * @api private
+ */
+
+function read(req, res, next, parse, options) {
+ var length
+ var stream
+
+ // flag as parsed
+ req._body = true
+
+ try {
+ stream = contentstream(req, options.inflate)
+ length = stream.length
+ delete stream.length
+ } catch (err) {
+ return next(err)
+ }
+
+ options = options || {}
+ options.length = length
+
+ var encoding = options.encoding !== null
+ ? options.encoding || 'utf-8'
+ : null
+ var verify = options.verify
+
+ options.encoding = verify
+ ? null
+ : encoding
+
+ // read body
+ getBody(stream, options, function (err, body) {
+ if (err) {
+ if (!err.status) {
+ err.status = 400
+ }
+
+ // echo back charset
+ if (err.type === 'encoding.unsupported') {
+ err = new Error('unsupported charset "' + encoding.toUpperCase() + '"')
+ err.charset = encoding.toLowerCase()
+ err.status = 415
+ }
+
+ // read off entire request
+ stream.resume()
+ onFinished(req, function onfinished() {
+ next(err)
+ })
+ return
+ }
+
+ // verify
+ if (verify) {
+ try {
+ verify(req, res, body, encoding)
+ } catch (err) {
+ if (!err.status) err.status = 403
+ return next(err)
+ }
+ }
+
+ // parse
+ try {
+ body = typeof body !== 'string' && encoding !== null
+ ? iconv.decode(body, encoding)
+ : body
+ req.body = parse(body)
+ } catch (err) {
+ if (!err.status) {
+ err.body = body
+ err.status = 400
+ }
+ return next(err)
+ }
+
+ next()
+ })
+}
+
+/**
+ * Get the content stream of the request.
+ *
+ * @param {object} req
+ * @param {boolean} [inflate=true]
+ * @return {object}
+ * @api private
+ */
+
+function contentstream(req, inflate) {
+ var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase()
+ var err
+ var length = req.headers['content-length']
+ var stream
+
+ if (inflate === false && encoding !== 'identity') {
+ err = new Error('content encoding unsupported')
+ err.status = 415
+ throw err
+ }
+
+ switch (encoding) {
+ case 'deflate':
+ stream = zlib.createInflate()
+ req.pipe(stream)
+ break
+ case 'gzip':
+ stream = zlib.createGunzip()
+ req.pipe(stream)
+ break
+ case 'identity':
+ stream = req
+ stream.length = length
+ break
+ default:
+ err = new Error('unsupported content encoding "' + encoding + '"')
+ err.encoding = encoding
+ err.status = 415
+ throw err
+ }
+
+ return stream
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/lib/types/json.js b/dgbuilder/dgeflows/node_modules/body-parser/lib/types/json.js
new file mode 100644
index 0000000..b66e309
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/lib/types/json.js
@@ -0,0 +1,117 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var bytes = require('bytes')
+var read = require('../read')
+var typer = require('media-typer')
+var typeis = require('type-is')
+
+/**
+ * Module exports.
+ */
+
+module.exports = json
+
+/**
+ * RegExp to match the first non-space in a string.
+ *
+ * Allowed whitespace is defined in RFC 7159:
+ *
+ * ws = *(
+ * %x20 / ; Space
+ * %x09 / ; Horizontal tab
+ * %x0A / ; Line feed or New line
+ * %x0D ) ; Carriage return
+ */
+
+var firstcharRegExp = /^[\x20\x09\x0a\x0d]*(.)/
+
+/**
+ * Create a middleware to parse JSON bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @api public
+ */
+
+function json(options) {
+ options = options || {}
+
+ var limit = typeof options.limit !== 'number'
+ ? bytes(options.limit || '100kb')
+ : options.limit
+ var inflate = options.inflate !== false
+ var reviver = options.reviver
+ var strict = options.strict !== false
+ var type = options.type || 'json'
+ var verify = options.verify || false
+
+ if (verify !== false && typeof verify !== 'function') {
+ throw new TypeError('option verify must be function')
+ }
+
+ function parse(body) {
+ if (body.length === 0) {
+ // special-case empty json body, as it's a common client-side mistake
+ // TODO: maybe make this configurable or part of "strict" option
+ return {}
+ }
+
+ if (strict) {
+ var first = firstchar(body)
+
+ if (first !== '{' && first !== '[') {
+ throw new Error('invalid json')
+ }
+ }
+
+ return JSON.parse(body, reviver)
+ }
+
+ return function jsonParser(req, res, next) {
+ if (req._body) return next()
+ req.body = req.body || {}
+
+ if (!typeis(req, type)) return next()
+
+ // RFC 7159 sec 8.1
+ var charset = (typer.parse(req).parameters.charset || 'utf-8').toLowerCase()
+ if (charset.substr(0, 4) !== 'utf-') {
+ var err = new Error('unsupported charset "' + charset.toUpperCase() + '"')
+ err.charset = charset
+ err.status = 415
+ next(err)
+ return
+ }
+
+ // read
+ read(req, res, next, parse, {
+ encoding: charset,
+ inflate: inflate,
+ limit: limit,
+ verify: verify
+ })
+ }
+}
+
+/**
+ * Get the first non-whitespace character in a string.
+ *
+ * @param {string} str
+ * @return {function}
+ * @api public
+ */
+
+
+function firstchar(str) {
+ var match = firstcharRegExp.exec(str)
+ return match ? match[1] : ''
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/lib/types/raw.js b/dgbuilder/dgeflows/node_modules/body-parser/lib/types/raw.js
new file mode 100644
index 0000000..9d7e49a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/lib/types/raw.js
@@ -0,0 +1,61 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var bytes = require('bytes')
+var read = require('../read')
+var typeis = require('type-is')
+
+/**
+ * Module exports.
+ */
+
+module.exports = raw
+
+/**
+ * Create a middleware to parse raw bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @api public
+ */
+
+function raw(options) {
+ options = options || {};
+
+ var inflate = options.inflate !== false
+ var limit = typeof options.limit !== 'number'
+ ? bytes(options.limit || '100kb')
+ : options.limit
+ var type = options.type || 'application/octet-stream'
+ var verify = options.verify || false
+
+ if (verify !== false && typeof verify !== 'function') {
+ throw new TypeError('option verify must be function')
+ }
+
+ function parse(buf) {
+ return buf
+ }
+
+ return function rawParser(req, res, next) {
+ if (req._body) return next()
+ req.body = req.body || {}
+
+ if (!typeis(req, type)) return next()
+
+ // read
+ read(req, res, next, parse, {
+ encoding: null,
+ inflate: inflate,
+ limit: limit,
+ verify: verify
+ })
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/lib/types/text.js b/dgbuilder/dgeflows/node_modules/body-parser/lib/types/text.js
new file mode 100644
index 0000000..2330b5b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/lib/types/text.js
@@ -0,0 +1,66 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var bytes = require('bytes')
+var read = require('../read')
+var typeis = require('type-is')
+var typer = require('media-typer')
+
+/**
+ * Module exports.
+ */
+
+module.exports = text
+
+/**
+ * Create a middleware to parse text bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @api public
+ */
+
+function text(options) {
+ options = options || {};
+
+ var defaultCharset = options.defaultCharset || 'utf-8'
+ var inflate = options.inflate !== false
+ var limit = typeof options.limit !== 'number'
+ ? bytes(options.limit || '100kb')
+ : options.limit
+ var type = options.type || 'text/plain'
+ var verify = options.verify || false
+
+ if (verify !== false && typeof verify !== 'function') {
+ throw new TypeError('option verify must be function')
+ }
+
+ function parse(buf) {
+ return buf
+ }
+
+ return function textParser(req, res, next) {
+ if (req._body) return next()
+ req.body = req.body || {}
+
+ if (!typeis(req, type)) return next()
+
+ // get charset
+ var charset = typer.parse(req).parameters.charset || defaultCharset
+
+ // read
+ read(req, res, next, parse, {
+ encoding: charset,
+ inflate: inflate,
+ limit: limit,
+ verify: verify
+ })
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/lib/types/urlencoded.js b/dgbuilder/dgeflows/node_modules/body-parser/lib/types/urlencoded.js
new file mode 100644
index 0000000..4d88586
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/lib/types/urlencoded.js
@@ -0,0 +1,207 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var bytes = require('bytes')
+var deprecate = require('depd')('body-parser')
+var read = require('../read')
+var typer = require('media-typer')
+var typeis = require('type-is')
+
+/**
+ * Module exports.
+ */
+
+module.exports = urlencoded
+
+/**
+ * Cache of parser modules.
+ */
+
+var parsers = Object.create(null)
+
+/**
+ * Create a middleware to parse urlencoded bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @api public
+ */
+
+function urlencoded(options){
+ options = options || {};
+
+ // notice because option default will flip in next major
+ if (options.extended === undefined) {
+ deprecate('undefined extended: provide extended option')
+ }
+
+ var extended = options.extended !== false
+ var inflate = options.inflate !== false
+ var limit = typeof options.limit !== 'number'
+ ? bytes(options.limit || '100kb')
+ : options.limit
+ var type = options.type || 'urlencoded'
+ var verify = options.verify || false
+
+ if (verify !== false && typeof verify !== 'function') {
+ throw new TypeError('option verify must be function')
+ }
+
+ var queryparse = extended
+ ? extendedparser(options)
+ : simpleparser(options)
+
+ function parse(body) {
+ return body.length
+ ? queryparse(body)
+ : {}
+ }
+
+ return function urlencodedParser(req, res, next) {
+ if (req._body) return next();
+ req.body = req.body || {}
+
+ if (!typeis(req, type)) return next();
+
+ var charset = (typer.parse(req).parameters.charset || 'utf-8').toLowerCase()
+ if (charset !== 'utf-8') {
+ var err = new Error('unsupported charset "' + charset.toUpperCase() + '"')
+ err.charset = charset
+ err.status = 415
+ next(err)
+ return
+ }
+
+ // read
+ read(req, res, next, parse, {
+ encoding: charset,
+ inflate: inflate,
+ limit: limit,
+ verify: verify
+ })
+ }
+}
+
+/**
+ * Get the extended query parser.
+ *
+ * @param {object} options
+ */
+
+function extendedparser(options) {
+ var parameterLimit = options.parameterLimit !== undefined
+ ? options.parameterLimit
+ : 1000
+ var parse = parser('qs')
+
+ if (isNaN(parameterLimit) || parameterLimit < 1) {
+ throw new TypeError('option parameterLimit must be a positive number')
+ }
+
+ if (isFinite(parameterLimit)) {
+ parameterLimit = parameterLimit | 0
+ }
+
+ return function queryparse(body) {
+ var paramCount = parameterCount(body, parameterLimit)
+
+ if (paramCount === undefined) {
+ var err = new Error('too many parameters')
+ err.status = 413
+ throw err
+ }
+
+ var arrayLimit = Math.max(100, paramCount)
+
+ return parse(body, {
+ arrayLimit: arrayLimit,
+ parameterLimit: parameterLimit
+ })
+ }
+}
+
+/**
+ * Count the number of parameters, stopping once limit reached
+ *
+ * @param {string} body
+ * @param {number} limit
+ * @api private
+ */
+
+function parameterCount(body, limit) {
+ var count = 0
+ var index = 0
+
+ while ((index = body.indexOf('&', index)) !== -1) {
+ count++
+ index++
+
+ if (count === limit) {
+ return undefined
+ }
+ }
+
+ return count
+}
+
+/**
+ * Get parser for module name dynamically.
+ *
+ * @param {string} name
+ * @return {function}
+ * @api private
+ */
+
+function parser(name) {
+ var mod = parsers[name]
+
+ if (mod) {
+ return mod.parse
+ }
+
+ // load module
+ mod = parsers[name] = require(name)
+
+ return mod.parse
+}
+
+/**
+ * Get the simple query parser.
+ *
+ * @param {object} options
+ */
+
+function simpleparser(options) {
+ var parameterLimit = options.parameterLimit !== undefined
+ ? options.parameterLimit
+ : 1000
+ var parse = parser('querystring')
+
+ if (isNaN(parameterLimit) || parameterLimit < 1) {
+ throw new TypeError('option parameterLimit must be a positive number')
+ }
+
+ if (isFinite(parameterLimit)) {
+ parameterLimit = parameterLimit | 0
+ }
+
+ return function queryparse(body) {
+ var paramCount = parameterCount(body, parameterLimit)
+
+ if (paramCount === undefined) {
+ var err = new Error('too many parameters')
+ err.status = 413
+ throw err
+ }
+
+ return parse(body, undefined, undefined, {maxKeys: parameterLimit})
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/.npmignore b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/.npmignore
new file mode 100644
index 0000000..9daeafb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/.npmignore
@@ -0,0 +1 @@
+test
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/History.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/History.md
new file mode 100644
index 0000000..5097352
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/History.md
@@ -0,0 +1,25 @@
+
+1.0.0 / 2014-05-05
+==================
+
+ * add negative support. fixes #6
+
+0.3.0 / 2014-03-19
+==================
+
+ * added terabyte support
+
+0.2.1 / 2013-04-01
+==================
+
+ * add .component
+
+0.2.0 / 2012-10-28
+==================
+
+ * bytes(200).should.eql('200b')
+
+0.1.0 / 2012-07-04
+==================
+
+ * add bytes to string conversion [yields]
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/Makefile b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/Makefile
new file mode 100644
index 0000000..8e8640f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/Makefile
@@ -0,0 +1,7 @@
+
+test:
+ @./node_modules/.bin/mocha \
+ --reporter spec \
+ --require should
+
+.PHONY: test
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/Readme.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/Readme.md
new file mode 100644
index 0000000..5591b28
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/Readme.md
@@ -0,0 +1,54 @@
+# node-bytes
+
+ Byte string parser / formatter.
+
+## Example:
+
+```js
+bytes('1kb')
+// => 1024
+
+bytes('2mb')
+// => 2097152
+
+bytes('1gb')
+// => 1073741824
+
+bytes(1073741824)
+// => 1gb
+
+bytes(1099511627776)
+// => 1tb
+```
+
+## Installation
+
+```
+$ npm install bytes
+$ component install visionmedia/bytes.js
+```
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/component.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/component.json
new file mode 100644
index 0000000..2929c25
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/component.json
@@ -0,0 +1,7 @@
+{
+ "name": "bytes",
+ "description": "byte size string parser / serializer",
+ "keywords": ["bytes", "utility"],
+ "version": "0.2.1",
+ "scripts": ["index.js"]
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/index.js
new file mode 100644
index 0000000..c1da2fe
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/index.js
@@ -0,0 +1,41 @@
+
+/**
+ * Parse byte `size` string.
+ *
+ * @param {String} size
+ * @return {Number}
+ * @api public
+ */
+
+module.exports = function(size) {
+ if ('number' == typeof size) return convert(size);
+ var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb|tb)$/)
+ , n = parseFloat(parts[1])
+ , type = parts[2];
+
+ var map = {
+ kb: 1 << 10
+ , mb: 1 << 20
+ , gb: 1 << 30
+ , tb: ((1 << 30) * 1024)
+ };
+
+ return map[type] * n;
+};
+
+/**
+ * convert bytes into string.
+ *
+ * @param {Number} b - bytes to convert
+ * @return {String}
+ * @api public
+ */
+
+function convert (b) {
+ var tb = ((1 << 30) * 1024), gb = 1 << 30, mb = 1 << 20, kb = 1 << 10, abs = Math.abs(b);
+ if (abs >= tb) return (Math.round(b / tb * 100) / 100) + 'tb';
+ if (abs >= gb) return (Math.round(b / gb * 100) / 100) + 'gb';
+ if (abs >= mb) return (Math.round(b / mb * 100) / 100) + 'mb';
+ if (abs >= kb) return (Math.round(b / kb * 100) / 100) + 'kb';
+ return b + 'b';
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/package.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/package.json
new file mode 100644
index 0000000..dabaa22
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/bytes/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "bytes",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ },
+ "description": "byte size string parser / serializer",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/visionmedia/bytes.js.git"
+ },
+ "version": "1.0.0",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {
+ "mocha": "*",
+ "should": "*"
+ },
+ "component": {
+ "scripts": {
+ "bytes/index.js": "index.js"
+ }
+ },
+ "bugs": {
+ "url": "https://github.com/visionmedia/bytes.js/issues"
+ },
+ "homepage": "https://github.com/visionmedia/bytes.js",
+ "_id": "bytes@1.0.0",
+ "dist": {
+ "shasum": "3569ede8ba34315fab99c3e92cb04c7220de1fa8",
+ "tarball": "http://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz"
+ },
+ "_from": "bytes@1.0.0",
+ "_npmVersion": "1.4.3",
+ "_npmUser": {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ }
+ ],
+ "directories": {},
+ "_shasum": "3569ede8ba34315fab99c3e92cb04c7220de1fa8",
+ "_resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/History.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/History.md
new file mode 100644
index 0000000..bdbcf58
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/History.md
@@ -0,0 +1,67 @@
+1.0.0 / 2014-09-17
+==================
+
+ * No changes
+
+0.4.5 / 2014-09-09
+==================
+
+ * Improve call speed to functions using the function wrapper
+ * Support Node.js 0.6
+
+0.4.4 / 2014-07-27
+==================
+
+ * Work-around v8 generating empty stack traces
+
+0.4.3 / 2014-07-26
+==================
+
+ * Fix exception when global `Error.stackTraceLimit` is too low
+
+0.4.2 / 2014-07-19
+==================
+
+ * Correct call site for wrapped functions and properties
+
+0.4.1 / 2014-07-19
+==================
+
+ * Improve automatic message generation for function properties
+
+0.4.0 / 2014-07-19
+==================
+
+ * Add `TRACE_DEPRECATION` environment variable
+ * Remove non-standard grey color from color output
+ * Support `--no-deprecation` argument
+ * Support `--trace-deprecation` argument
+ * Support `deprecate.property(fn, prop, message)`
+
+0.3.0 / 2014-06-16
+==================
+
+ * Add `NO_DEPRECATION` environment variable
+
+0.2.0 / 2014-06-15
+==================
+
+ * Add `deprecate.property(obj, prop, message)`
+ * Remove `supports-color` dependency for node.js 0.8
+
+0.1.0 / 2014-06-15
+==================
+
+ * Add `deprecate.function(fn, message)`
+ * Add `process.on('deprecation', fn)` emitter
+ * Automatically generate message when omitted from `deprecate()`
+
+0.0.1 / 2014-06-15
+==================
+
+ * Fix warning for dynamic calls at singe call site
+
+0.0.0 / 2014-06-15
+==================
+
+ * Initial implementation
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/LICENSE b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/Readme.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/Readme.md
new file mode 100644
index 0000000..9fb2737
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/Readme.md
@@ -0,0 +1,271 @@
+# depd
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+Deprecate all the things
+
+> With great modules comes great responsibility; mark things deprecated!
+
+## Install
+
+```sh
+$ npm install depd
+```
+
+## API
+
+```js
+var deprecate = require('depd')('my-module')
+```
+
+This library allows you to display deprecation messages to your users.
+This library goes above and beyond with deprecation warnings by
+introspection of the call stack (but only the bits that it is interested
+in).
+
+Instead of just warning on the first invocation of a deprecated
+function and never again, this module will warn on the first invocation
+of a deprecated function per unique call site, making it ideal to alert
+users of all deprecated uses across the code base, rather than just
+whatever happens to execute first.
+
+The deprecation warnings from this module also include the file and line
+information for the call into the module that the deprecated function was
+in.
+
+**NOTE** this library has a similar interface to the `debug` module, and
+this module uses the calling file to get the boundary for the call stacks,
+so you should always create a new `deprecate` object in each file and not
+within some central file.
+
+### depd(namespace)
+
+Create a new deprecate function that uses the given namespace name in the
+messages and will display the call site prior to the stack entering the
+file this function was called from. It is highly suggested you use the
+name of your module as the namespace.
+
+### deprecate(message)
+
+Call this function from deprecated code to display a deprecation message.
+This message will appear once per unique caller site. Caller site is the
+first call site in the stack in a different file from the caller of this
+function.
+
+If the message is omitted, a message is generated for you based on the site
+of the `deprecate()` call and will display the name of the function called,
+similar to the name displayed in a stack trace.
+
+### deprecate.function(fn, message)
+
+Call this function to wrap a given function in a deprecation message on any
+call to the function. An optional message can be supplied to provide a custom
+message.
+
+### deprecate.property(obj, prop, message)
+
+Call this function to wrap a given property on object in a deprecation message
+on any accessing or setting of the property. An optional message can be supplied
+to provide a custom message.
+
+The method must be called on the object where the property belongs (not
+inherited from the prototype).
+
+If the property is a data descriptor, it will be converted to an accessor
+descriptor in order to display the deprecation message.
+
+### process.on('deprecation', fn)
+
+This module will allow easy capturing of deprecation errors by emitting the
+errors as the type "deprecation" on the global `process`. If there are no
+listeners for this type, the errors are written to STDERR as normal, but if
+there are any listeners, nothing will be written to STDERR and instead only
+emitted. From there, you can write the errors in a different format or to a
+logging source.
+
+The error represents the deprecation and is emitted only once with the same
+rules as writing to STDERR. The error has the following properties:
+
+ - `message` - This is the message given by the library
+ - `name` - This is always `'DeprecationError'`
+ - `namespace` - This is the namespace the deprecation came from
+ - `stack` - This is the stack of the call to the deprecated thing
+
+Example `error.stack` output:
+
+```
+DeprecationError: my-cool-module deprecated oldfunction
+ at Object.<anonymous> ([eval]-wrapper:6:22)
+ at Module._compile (module.js:456:26)
+ at evalScript (node.js:532:25)
+ at startup (node.js:80:7)
+ at node.js:902:3
+```
+
+### process.env.NO_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `NO_DEPRECATION`
+is provided as a quick solution to silencing deprecation warnings from being
+output. The format of this is similar to that of `DEBUG`:
+
+```sh
+$ NO_DEPRECATION=my-module,othermod node app.js
+```
+
+This will suppress deprecations from being output for "my-module" and "othermod".
+The value is a list of comma-separated namespaces. To suppress every warning
+across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--no-deprecation` to the `node` executable will suppress
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not suppress the deperecations given to any "deprecation"
+event listeners, just the output to STDERR.
+
+### process.env.TRACE_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION`
+is provided as a solution to getting more detailed location information in deprecation
+warnings by including the entire stack trace. The format of this is the same as
+`NO_DEPRECATION`:
+
+```sh
+$ TRACE_DEPRECATION=my-module,othermod node app.js
+```
+
+This will include stack traces for deprecations being output for "my-module" and
+"othermod". The value is a list of comma-separated namespaces. To trace every
+warning across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--trace-deprecation` to the `node` executable will trace
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`.
+
+## Display
+
+![message](files/message.png)
+
+When a user calls a function in your library that you mark deprecated, they
+will see the following written to STDERR (in the given colors, similar colors
+and layout to the `debug` module):
+
+```
+bright cyan bright yellow
+| | reset cyan
+| | | |
+▼ ▼ ▼ ▼
+my-cool-module deprecated oldfunction [eval]-wrapper:6:22
+▲ ▲ ▲ ▲
+| | | |
+namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+If the user redirects their STDERR to a file or somewhere that does not support
+colors, they see (similar layout to the `debug` module):
+
+```
+Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22
+▲ ▲ ▲ ▲ ▲
+| | | | |
+timestamp of message namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+## Examples
+
+### Deprecating all calls to a function
+
+This will display a deprecated message about "oldfunction" being deprecated
+from "my-module" on STDERR.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+// message automatically derived from function name
+// Object.oldfunction
+exports.oldfunction = deprecate.function(function oldfunction() {
+ // all calls to function are deprecated
+})
+
+// specific message
+exports.oldfunction = deprecate.function(function () {
+ // all calls to function are deprecated
+}, 'oldfunction')
+```
+
+### Conditionally deprecating a function call
+
+This will display a deprecated message about "weirdfunction" being deprecated
+from "my-module" on STDERR when called with less than 2 arguments.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ }
+}
+```
+
+When calling `deprecate` as a function, the warning is counted per call site
+within your own module, so you can display different deprecations depending
+on different situations and the users will still get all the warnings:
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ } else if (typeof arguments[0] !== 'string') {
+ // calls with non-string first argument are deprecated
+ deprecate('weirdfunction non-string first arg')
+ }
+}
+```
+
+### Deprecating property access
+
+This will display a deprecated message about "oldprop" being deprecated
+from "my-module" on STDERR when accessed. A deprecation will be displayed
+when setting the value and when getting the value.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.oldprop = 'something'
+
+// message automatically derives from property name
+deprecate.property(exports, 'oldprop')
+
+// explicit message
+deprecate.property(exports, 'oldprop', 'oldprop >= 0.10')
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-version-image]: https://img.shields.io/npm/v/depd.svg?style=flat
+[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg?style=flat
+[npm-url]: https://npmjs.org/package/depd
+[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd.svg?style=flat
+[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd
+[coveralls-image]: https://img.shields.io/coveralls/dougwilson/nodejs-depd.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master
+[node-image]: https://img.shields.io/node/v/depd.svg?style=flat
+[node-url]: http://nodejs.org/download/
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat
+[gratipay-url]: https://www.gratipay.com/dougwilson/
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/index.js
new file mode 100644
index 0000000..4fee4d9
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/index.js
@@ -0,0 +1,522 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var callSiteToString = require('./lib/compat').callSiteToString
+var EventEmitter = require('events').EventEmitter
+var relative = require('path').relative
+
+/**
+ * Module exports.
+ */
+
+module.exports = depd
+
+/**
+ * Get the path to base files on.
+ */
+
+var basePath = process.cwd()
+
+/**
+ * Get listener count on event emitter.
+ */
+
+/*istanbul ignore next*/
+var eventListenerCount = EventEmitter.listenerCount
+ || function (emitter, type) { return emitter.listeners(type).length }
+
+/**
+ * Determine if namespace is contained in the string.
+ */
+
+function containsNamespace(str, namespace) {
+ var val = str.split(/[ ,]+/)
+
+ namespace = String(namespace).toLowerCase()
+
+ for (var i = 0 ; i < val.length; i++) {
+ if (!(str = val[i])) continue;
+
+ // namespace contained
+ if (str === '*' || str.toLowerCase() === namespace) {
+ return true
+ }
+ }
+
+ return false
+}
+
+/**
+ * Convert a data descriptor to accessor descriptor.
+ */
+
+function convertDataDescriptorToAccessor(obj, prop, message) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+ var value = descriptor.value
+
+ descriptor.get = function getter() { return value }
+
+ if (descriptor.writable) {
+ descriptor.set = function setter(val) { return value = val }
+ }
+
+ delete descriptor.value
+ delete descriptor.writable
+
+ Object.defineProperty(obj, prop, descriptor)
+
+ return descriptor
+}
+
+/**
+ * Create arguments string to keep arity.
+ */
+
+function createArgumentsString(arity) {
+ var str = ''
+
+ for (var i = 0; i < arity; i++) {
+ str += ', arg' + i
+ }
+
+ return str.substr(2)
+}
+
+/**
+ * Create stack string from stack.
+ */
+
+function createStackString(stack) {
+ var str = this.name + ': ' + this.namespace
+
+ if (this.message) {
+ str += ' deprecated ' + this.message
+ }
+
+ for (var i = 0; i < stack.length; i++) {
+ str += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return str
+}
+
+/**
+ * Create deprecate for namespace in caller.
+ */
+
+function depd(namespace) {
+ if (!namespace) {
+ throw new TypeError('argument namespace is required')
+ }
+
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+ var file = site[0]
+
+ function deprecate(message) {
+ // call to self as log
+ log.call(deprecate, message)
+ }
+
+ deprecate._file = file
+ deprecate._ignored = isignored(namespace)
+ deprecate._namespace = namespace
+ deprecate._traced = istraced(namespace)
+ deprecate._warned = Object.create(null)
+
+ deprecate.function = wrapfunction
+ deprecate.property = wrapproperty
+
+ return deprecate
+}
+
+/**
+ * Determine if namespace is ignored.
+ */
+
+function isignored(namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.noDeprecation) {
+ // --no-deprecation support
+ return true
+ }
+
+ var str = process.env.NO_DEPRECATION || ''
+
+ // namespace ignored
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Determine if namespace is traced.
+ */
+
+function istraced(namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.traceDeprecation) {
+ // --trace-deprecation support
+ return true
+ }
+
+ var str = process.env.TRACE_DEPRECATION || ''
+
+ // namespace traced
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Display deprecation message.
+ */
+
+function log(message, site) {
+ var haslisteners = eventListenerCount(process, 'deprecation') !== 0
+
+ // abort early if no destination
+ if (!haslisteners && this._ignored) {
+ return
+ }
+
+ var caller
+ var callFile
+ var callSite
+ var i = 0
+ var seen = false
+ var stack = getStack()
+ var file = this._file
+
+ if (site) {
+ // provided site
+ callSite = callSiteLocation(stack[1])
+ callSite.name = site.name
+ file = callSite[0]
+ } else {
+ // get call site
+ i = 2
+ site = callSiteLocation(stack[i])
+ callSite = site
+ }
+
+ // get caller of deprecated thing in relation to file
+ for (; i < stack.length; i++) {
+ caller = callSiteLocation(stack[i])
+ callFile = caller[0]
+
+ if (callFile === file) {
+ seen = true
+ } else if (callFile === this._file) {
+ file = this._file
+ } else if (seen) {
+ break
+ }
+ }
+
+ var key = caller
+ ? site.join(':') + '__' + caller.join(':')
+ : undefined
+
+ if (key !== undefined && key in this._warned) {
+ // already warned
+ return
+ }
+
+ this._warned[key] = true
+
+ // generate automatic message from call site
+ if (!message) {
+ message = callSite === site || !callSite.name
+ ? defaultMessage(site)
+ : defaultMessage(callSite)
+ }
+
+ // emit deprecation if listeners exist
+ if (haslisteners) {
+ var err = DeprecationError(this._namespace, message, stack.slice(i))
+ process.emit('deprecation', err)
+ return
+ }
+
+ // format and write message
+ var format = process.stderr.isTTY
+ ? formatColor
+ : formatPlain
+ var msg = format.call(this, message, caller, stack.slice(i))
+ process.stderr.write(msg + '\n', 'utf8')
+
+ return
+}
+
+/**
+ * Get call site location as array.
+ */
+
+function callSiteLocation(callSite) {
+ var file = callSite.getFileName() || '<anonymous>'
+ var line = callSite.getLineNumber()
+ var colm = callSite.getColumnNumber()
+
+ if (callSite.isEval()) {
+ file = callSite.getEvalOrigin() + ', ' + file
+ }
+
+ var site = [file, line, colm]
+
+ site.callSite = callSite
+ site.name = callSite.getFunctionName()
+
+ return site
+}
+
+/**
+ * Generate a default message from the site.
+ */
+
+function defaultMessage(site) {
+ var callSite = site.callSite
+ var funcName = site.name
+ var typeName = callSite.getTypeName()
+
+ // make useful anonymous name
+ if (!funcName) {
+ funcName = '<anonymous@' + formatLocation(site) + '>'
+ }
+
+ // make useful type name
+ if (typeName === 'Function') {
+ typeName = callSite.getThis().name || typeName
+ }
+
+ return callSite.getMethodName()
+ ? typeName + '.' + funcName
+ : funcName
+}
+
+/**
+ * Format deprecation message without color.
+ */
+
+function formatPlain(msg, caller, stack) {
+ var timestamp = new Date().toUTCString()
+
+ var formatted = timestamp
+ + ' ' + this._namespace
+ + ' deprecated ' + msg
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' at ' + formatLocation(caller)
+ }
+
+ return formatted
+}
+
+/**
+ * Format deprecation message with color.
+ */
+
+function formatColor(msg, caller, stack) {
+ var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' // bold cyan
+ + ' \x1b[33;1mdeprecated\x1b[22;39m' // bold yellow
+ + ' \x1b[0m' + msg + '\x1b[39m' // reset
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+}
+
+/**
+ * Format call site location.
+ */
+
+function formatLocation(callSite) {
+ return relative(basePath, callSite[0])
+ + ':' + callSite[1]
+ + ':' + callSite[2]
+}
+
+/**
+ * Get the stack as array of call sites.
+ */
+
+function getStack() {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = Math.max(10, limit)
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice this function off the top
+ var stack = obj.stack.slice(1)
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack
+}
+
+/**
+ * Capture call site stack from v8.
+ */
+
+function prepareObjectStackTrace(obj, stack) {
+ return stack
+}
+
+/**
+ * Return a wrapped function in a deprecation message.
+ */
+
+function wrapfunction(fn, message) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('argument fn must be a function')
+ }
+
+ var args = createArgumentsString(fn.length)
+ var deprecate = this
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ site.name = fn.name
+
+ var deprecatedfn = eval('(function (' + args + ') {\n'
+ + '"use strict"\n'
+ + 'log.call(deprecate, message, site)\n'
+ + 'return fn.apply(this, arguments)\n'
+ + '})')
+
+ return deprecatedfn
+}
+
+/**
+ * Wrap property in a deprecation message.
+ */
+
+function wrapproperty(obj, prop, message) {
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
+ throw new TypeError('argument obj must be object')
+ }
+
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+
+ if (!descriptor) {
+ throw new TypeError('must call property on owner object')
+ }
+
+ if (!descriptor.configurable) {
+ throw new TypeError('property must be configurable')
+ }
+
+ var deprecate = this
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ // set site name
+ site.name = prop
+
+ // convert data descriptor
+ if ('value' in descriptor) {
+ descriptor = convertDataDescriptorToAccessor(obj, prop, message)
+ }
+
+ var get = descriptor.get
+ var set = descriptor.set
+
+ // wrap getter
+ if (typeof get === 'function') {
+ descriptor.get = function getter() {
+ log.call(deprecate, message, site)
+ return get.apply(this, arguments)
+ }
+ }
+
+ // wrap setter
+ if (typeof set === 'function') {
+ descriptor.set = function setter() {
+ log.call(deprecate, message, site)
+ return set.apply(this, arguments)
+ }
+ }
+
+ Object.defineProperty(obj, prop, descriptor)
+}
+
+/**
+ * Create DeprecationError for deprecation
+ */
+
+function DeprecationError(namespace, message, stack) {
+ var error = new Error()
+ var stackString
+
+ Object.defineProperty(error, 'constructor', {
+ value: DeprecationError
+ })
+
+ Object.defineProperty(error, 'message', {
+ configurable: true,
+ enumerable: false,
+ value: message,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'name', {
+ enumerable: false,
+ configurable: true,
+ value: 'DeprecationError',
+ writable: true
+ })
+
+ Object.defineProperty(error, 'namespace', {
+ configurable: true,
+ enumerable: false,
+ value: namespace,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'stack', {
+ configurable: true,
+ enumerable: false,
+ get: function () {
+ if (stackString !== undefined) {
+ return stackString
+ }
+
+ // prepare stack trace
+ return stackString = createStackString.call(this, stack)
+ },
+ set: function setter(val) {
+ stackString = val
+ }
+ })
+
+ return error
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/lib/compat/buffer-concat.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/lib/compat/buffer-concat.js
new file mode 100644
index 0000000..09d9721
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/lib/compat/buffer-concat.js
@@ -0,0 +1,33 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = bufferConcat
+
+/**
+ * Concatenate an array of Buffers.
+ */
+
+function bufferConcat(bufs) {
+ var length = 0
+
+ for (var i = 0, len = bufs.length; i < len; i++) {
+ length += bufs[i].length
+ }
+
+ var buf = new Buffer(length)
+ var pos = 0
+
+ for (var i = 0, len = bufs.length; i < len; i++) {
+ bufs[i].copy(buf, pos)
+ pos += bufs[i].length
+ }
+
+ return buf
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/lib/compat/callsite-tostring.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/lib/compat/callsite-tostring.js
new file mode 100644
index 0000000..17cf7ed
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/lib/compat/callsite-tostring.js
@@ -0,0 +1,101 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = callSiteToString
+
+/**
+ * Format a CallSite file location to a string.
+ */
+
+function callSiteFileLocation(callSite) {
+ var fileName
+ var fileLocation = ''
+
+ if (callSite.isNative()) {
+ fileLocation = 'native'
+ } else if (callSite.isEval()) {
+ fileName = callSite.getScriptNameOrSourceURL()
+ if (!fileName) {
+ fileLocation = callSite.getEvalOrigin()
+ }
+ } else {
+ fileName = callSite.getFileName()
+ }
+
+ if (fileName) {
+ fileLocation += fileName
+
+ var lineNumber = callSite.getLineNumber()
+ if (lineNumber != null) {
+ fileLocation += ':' + lineNumber
+
+ var columnNumber = callSite.getColumnNumber()
+ if (columnNumber) {
+ fileLocation += ':' + columnNumber
+ }
+ }
+ }
+
+ return fileLocation || 'unknown source'
+}
+
+/**
+ * Format a CallSite to a string.
+ */
+
+function callSiteToString(callSite) {
+ var addSuffix = true
+ var fileLocation = callSiteFileLocation(callSite)
+ var functionName = callSite.getFunctionName()
+ var isConstructor = callSite.isConstructor()
+ var isMethodCall = !(callSite.isToplevel() || isConstructor)
+ var line = ''
+
+ if (isMethodCall) {
+ var methodName = callSite.getMethodName()
+ var typeName = getConstructorName(callSite)
+
+ if (functionName) {
+ if (typeName && functionName.indexOf(typeName) !== 0) {
+ line += typeName + '.'
+ }
+
+ line += functionName
+
+ if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) {
+ line += ' [as ' + methodName + ']'
+ }
+ } else {
+ line += typeName + '.' + (methodName || '<anonymous>')
+ }
+ } else if (isConstructor) {
+ line += 'new ' + (functionName || '<anonymous>')
+ } else if (functionName) {
+ line += functionName
+ } else {
+ addSuffix = false
+ line += fileLocation
+ }
+
+ if (addSuffix) {
+ line += ' (' + fileLocation + ')'
+ }
+
+ return line
+}
+
+/**
+ * Get constructor name of reviver.
+ */
+
+function getConstructorName(obj) {
+ var receiver = obj.receiver
+ return (receiver.constructor && receiver.constructor.name) || null
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/lib/compat/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/lib/compat/index.js
new file mode 100644
index 0000000..7fee026
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/lib/compat/index.js
@@ -0,0 +1,69 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+lazyProperty(module.exports, 'bufferConcat', function bufferConcat() {
+ return Buffer.concat || require('./buffer-concat')
+})
+
+lazyProperty(module.exports, 'callSiteToString', function callSiteToString() {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ function prepareObjectStackTrace(obj, stack) {
+ return stack
+ }
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = 2
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice the stack
+ var stack = obj.stack.slice()
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack[0].toString ? toString : require('./callsite-tostring')
+})
+
+/**
+ * Define a lazy property.
+ */
+
+function lazyProperty(obj, prop, getter) {
+ function get() {
+ var val = getter()
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ value: val
+ })
+
+ return val
+ }
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ get: get
+ })
+}
+
+/**
+ * Call toString() on the obj
+ */
+
+function toString(obj) {
+ return obj.toString()
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/package.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/package.json
new file mode 100644
index 0000000..b72bf60
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/depd/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "depd",
+ "description": "Deprecate all the things",
+ "version": "1.0.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "deprecate",
+ "deprecated"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dougwilson/nodejs-depd"
+ },
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4",
+ "should": "~4.0.4"
+ },
+ "files": [
+ "lib/",
+ "History.md",
+ "LICENSE",
+ "index.js",
+ "Readme.md"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --reporter spec --bail --require should test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --require should test/"
+ },
+ "gitHead": "08b5a2182c8c1fdf7420e4ff8532bfd7e266a7b2",
+ "bugs": {
+ "url": "https://github.com/dougwilson/nodejs-depd/issues"
+ },
+ "homepage": "https://github.com/dougwilson/nodejs-depd",
+ "_id": "depd@1.0.0",
+ "_shasum": "2fda0d00e98aae2845d4991ab1bf1f2a199073d5",
+ "_from": "depd@~1.0.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "2fda0d00e98aae2845d4991ab1bf1f2a199073d5",
+ "tarball": "http://registry.npmjs.org/depd/-/depd-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/depd/-/depd-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/.npmignore b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/.npmignore
new file mode 100644
index 0000000..5cd2673
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/.npmignore
@@ -0,0 +1,6 @@
+*~
+*sublime-*
+generation
+test
+wiki
+coverage
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/.travis.yml b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/.travis.yml
new file mode 100644
index 0000000..be5372f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/.travis.yml
@@ -0,0 +1,5 @@
+ language: node_js
+ node_js:
+ - "0.8"
+ - "0.10"
+ - "0.11"
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/Changelog.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/Changelog.md
new file mode 100644
index 0000000..7d20db8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/Changelog.md
@@ -0,0 +1,39 @@
+
+# 0.4.6 / 2015-01-12
+
+ * fix rare aliases of single-byte encodings (thanks @mscdex)
+ * double the timeout for dbcs tests to make them less flaky on travis
+
+# 0.4.5 / 2014-11-20
+
+ * fix windows-31j and x-sjis encoding support (@nleush)
+ * minor fix: undefined variable reference when internal error happens
+
+# 0.4.4 / 2014-07-16
+
+ * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3)
+ * fixed streaming base64 encoding
+
+# 0.4.3 / 2014-06-14
+
+ * added encodings UTF-16BE and UTF-16 with BOM
+
+# 0.4.2 / 2014-06-12
+
+ * don't throw exception if `extendNodeEncodings()` is called more than once
+
+# 0.4.1 / 2014-06-11
+
+ * codepage 808 added
+
+
+# 0.4.0 / 2014-06-10
+
+ * code is rewritten from scratch
+ * all widespread encodings are supported
+ * streaming interface added
+ * browserify compatibility added
+ * (optional) extend core primitive encodings to make usage even simpler
+ * moved from vows to mocha as the testing framework
+
+
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/LICENSE b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/LICENSE
new file mode 100644
index 0000000..d518d83
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2011 Alexander Shtuchkin
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/README.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/README.md
new file mode 100644
index 0000000..146886d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/README.md
@@ -0,0 +1,144 @@
+## Pure JS character encoding conversion
+
+<!-- [![Build Status](https://secure.travis-ci.org/ashtuchkin/iconv-lite.png?branch=master)](http://travis-ci.org/ashtuchkin/iconv-lite) -->
+
+ * Doesn't need native code compilation. Works on Windows and in sandboxed environments like [Cloud9](http://c9.io).
+ * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser),
+ [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others.
+ * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison).
+ * Intuitive encode/decode API
+ * Streaming support for Node v0.10+
+ * Can extend Node.js primitives (buffers, streams) to support all iconv-lite encodings.
+ * In-browser usage via [Browserify](https://github.com/substack/node-browserify) (~180k gzip compressed with Buffer shim included).
+ * License: MIT.
+
+[![NPM Stats](https://nodei.co/npm/iconv-lite.png?downloads=true)](https://npmjs.org/packages/iconv-lite/)
+
+## Usage
+### Basic API
+```javascript
+var iconv = require('iconv-lite');
+
+// Convert from an encoded buffer to js string.
+str = iconv.decode(new Buffer([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251');
+
+// Convert from js string to an encoded buffer.
+buf = iconv.encode("Sample input string", 'win1251');
+
+// Check if encoding is supported
+iconv.encodingExists("us-ascii")
+```
+
+### Streaming API (Node v0.10+)
+```javascript
+
+// Decode stream (from binary stream to js strings)
+http.createServer(function(req, res) {
+ var converterStream = iconv.decodeStream('win1251');
+ req.pipe(converterStream);
+
+ converterStream.on('data', function(str) {
+ console.log(str); // Do something with decoded strings, chunk-by-chunk.
+ });
+});
+
+// Convert encoding streaming example
+fs.createReadStream('file-in-win1251.txt')
+ .pipe(iconv.decodeStream('win1251'))
+ .pipe(iconv.encodeStream('ucs2'))
+ .pipe(fs.createWriteStream('file-in-ucs2.txt'));
+
+// Sugar: all encode/decode streams have .collect(cb) method to accumulate data.
+http.createServer(function(req, res) {
+ req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) {
+ assert(typeof body == 'string');
+ console.log(body); // full request body string
+ });
+});
+```
+
+### Extend Node.js own encodings
+```javascript
+// After this call all Node basic primitives will understand iconv-lite encodings.
+iconv.extendNodeEncodings();
+
+// Examples:
+buf = new Buffer(str, 'win1251');
+buf.write(str, 'gbk');
+str = buf.toString('latin1');
+assert(Buffer.isEncoding('iso-8859-15'));
+Buffer.byteLength(str, 'us-ascii');
+
+http.createServer(function(req, res) {
+ req.setEncoding('big5');
+ req.collect(function(err, body) {
+ console.log(body);
+ });
+});
+
+fs.createReadStream("file.txt", "shift_jis");
+
+// External modules are also supported (if they use Node primitives, which they probably do).
+request = require('request');
+request({
+ url: "http://github.com/",
+ encoding: "cp932"
+});
+
+// To remove extensions
+iconv.undoExtendNodeEncodings();
+```
+
+## Supported encodings
+
+ * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex.
+ * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap.
+ * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family,
+ IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library.
+ Aliases like 'latin1', 'us-ascii' also supported.
+ * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2313, GBK, GB18030, Big5, Shift_JIS, EUC-JP.
+
+See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings).
+
+Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors!
+
+Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors!
+
+
+## Encoding/decoding speed
+
+Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.10.26).
+Note: your results may vary, so please always check on your hardware.
+
+ operation iconv@2.1.4 iconv-lite@0.4.0
+ ----------------------------------------------------------
+ encode('win1251') ~130 Mb/s ~380 Mb/s
+ decode('win1251') ~127 Mb/s ~210 Mb/s
+
+
+## Notes
+
+When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding).
+Untranslatable characters are set to � or ?. No transliteration is currently supported.
+Uses BOM to determine endianness, but doesn't remove it. Use ['strip-bom' module](https://github.com/sindresorhus/strip-bom).
+Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77).
+
+## Testing
+
+```bash
+$ git clone git@github.com:ashtuchkin/iconv-lite.git
+$ cd iconv-lite
+$ npm install
+$ npm test
+
+$ # To view performance:
+$ node test/performance.js
+
+$ # To view test coverage:
+$ npm run coverage
+$ open coverage/lcov-report/index.html
+```
+
+## Adoption
+[![NPM](https://nodei.co/npm-dl/iconv-lite.png)](https://nodei.co/npm/iconv-lite/)
+[![Codeship Status for ashtuchkin/iconv-lite](https://www.codeship.io/projects/81670840-fa72-0131-4520-4a01a6c01acc/status)](https://www.codeship.io/projects/29053)
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-codec.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-codec.js
new file mode 100644
index 0000000..c804ffb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-codec.js
@@ -0,0 +1,566 @@
+
+// Multibyte codec. In this scheme, a character is represented by 1 or more bytes.
+// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences.
+// To save memory and loading time, we read table files only when requested.
+
+exports._dbcs = function(options) {
+ return new DBCSCodec(options);
+}
+
+var UNASSIGNED = -1,
+ GB18030_CODE = -2,
+ SEQ_START = -10,
+ NODE_START = -1000,
+ UNASSIGNED_NODE = new Array(0x100),
+ DEF_CHAR = -1;
+
+for (var i = 0; i < 0x100; i++)
+ UNASSIGNED_NODE[i] = UNASSIGNED;
+
+
+// Class DBCSCodec reads and initializes mapping tables.
+function DBCSCodec(options) {
+ this.options = options;
+ if (!options)
+ throw new Error("DBCS codec is called without the data.")
+ if (!options.table)
+ throw new Error("Encoding '" + options.encodingName + "' has no data.");
+
+ // Load tables.
+ var mappingTable = options.table();
+
+
+ // Decode tables: MBCS -> Unicode.
+
+ // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256.
+ // Trie root is decodeTables[0].
+ // Values: >= 0 -> unicode character code. can be > 0xFFFF
+ // == UNASSIGNED -> unknown/unassigned sequence.
+ // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence.
+ // <= NODE_START -> index of the next node in our trie to process next byte.
+ // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq.
+ this.decodeTables = [];
+ this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node.
+
+ // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here.
+ this.decodeTableSeq = [];
+
+ // Actual mapping tables consist of chunks. Use them to fill up decode tables.
+ for (var i = 0; i < mappingTable.length; i++)
+ this._addDecodeChunk(mappingTable[i]);
+
+ this.defaultCharUnicode = options.iconv.defaultCharUnicode;
+
+
+ // Encode tables: Unicode -> DBCS.
+
+ // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance.
+ // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null.
+ // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.).
+ // == UNASSIGNED -> no conversion found. Output a default char.
+ // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence.
+ this.encodeTable = [];
+
+ // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of
+ // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key
+ // means end of sequence (needed when one sequence is a strict subsequence of another).
+ // Objects are kept separately from encodeTable to increase performance.
+ this.encodeTableSeq = [];
+
+ // Some chars can be decoded, but need not be encoded.
+ var skipEncodeChars = {};
+ if (options.encodeSkipVals)
+ for (var i = 0; i < options.encodeSkipVals.length; i++) {
+ var range = options.encodeSkipVals[i];
+ for (var j = range.from; j <= range.to; j++)
+ skipEncodeChars[j] = true;
+ }
+
+ // Use decode trie to recursively fill out encode tables.
+ this._fillEncodeTable(0, 0, skipEncodeChars);
+
+ // Add more encoding pairs when needed.
+ for (var uChar in options.encodeAdd || {})
+ this._setEncodeChar(uChar.charCodeAt(0), options.encodeAdd[uChar]);
+
+ this.defCharSB = this.encodeTable[0][options.iconv.defaultCharSingleByte.charCodeAt(0)];
+ if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];
+ if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0);
+
+
+ // Load & create GB18030 tables when needed.
+ if (typeof options.gb18030 === 'function') {
+ this.gb18030 = options.gb18030(); // Load GB18030 ranges.
+
+ // Add GB18030 decode tables.
+ var thirdByteNodeIdx = this.decodeTables.length;
+ var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0);
+
+ var fourthByteNodeIdx = this.decodeTables.length;
+ var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0);
+
+ for (var i = 0x81; i <= 0xFE; i++) {
+ var secondByteNodeIdx = NODE_START - this.decodeTables[0][i];
+ var secondByteNode = this.decodeTables[secondByteNodeIdx];
+ for (var j = 0x30; j <= 0x39; j++)
+ secondByteNode[j] = NODE_START - thirdByteNodeIdx;
+ }
+ for (var i = 0x81; i <= 0xFE; i++)
+ thirdByteNode[i] = NODE_START - fourthByteNodeIdx;
+ for (var i = 0x30; i <= 0x39; i++)
+ fourthByteNode[i] = GB18030_CODE
+ }
+}
+
+// Public interface: create encoder and decoder objects.
+// The methods (write, end) are simple functions to not inhibit optimizations.
+DBCSCodec.prototype.encoder = function encoderDBCS(options) {
+ return {
+ // Methods
+ write: encoderDBCSWrite,
+ end: encoderDBCSEnd,
+
+ // Encoder state
+ leadSurrogate: -1,
+ seqObj: undefined,
+
+ // Static data
+ encodeTable: this.encodeTable,
+ encodeTableSeq: this.encodeTableSeq,
+ defaultCharSingleByte: this.defCharSB,
+ gb18030: this.gb18030,
+
+ // Export for testing
+ findIdx: findIdx,
+ }
+}
+
+DBCSCodec.prototype.decoder = function decoderDBCS(options) {
+ return {
+ // Methods
+ write: decoderDBCSWrite,
+ end: decoderDBCSEnd,
+
+ // Decoder state
+ nodeIdx: 0,
+ prevBuf: new Buffer(0),
+
+ // Static data
+ decodeTables: this.decodeTables,
+ decodeTableSeq: this.decodeTableSeq,
+ defaultCharUnicode: this.defaultCharUnicode,
+ gb18030: this.gb18030,
+ }
+}
+
+
+
+// Decoder helpers
+DBCSCodec.prototype._getDecodeTrieNode = function(addr) {
+ var bytes = [];
+ for (; addr > 0; addr >>= 8)
+ bytes.push(addr & 0xFF);
+ if (bytes.length == 0)
+ bytes.push(0);
+
+ var node = this.decodeTables[0];
+ for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie.
+ var val = node[bytes[i]];
+
+ if (val == UNASSIGNED) { // Create new node.
+ node[bytes[i]] = NODE_START - this.decodeTables.length;
+ this.decodeTables.push(node = UNASSIGNED_NODE.slice(0));
+ }
+ else if (val <= NODE_START) { // Existing node.
+ node = this.decodeTables[NODE_START - val];
+ }
+ else
+ throw new Error("Overwrite byte in " + this.options.encodingName + ", addr: " + addr.toString(16));
+ }
+ return node;
+}
+
+
+DBCSCodec.prototype._addDecodeChunk = function(chunk) {
+ // First element of chunk is the hex mbcs code where we start.
+ var curAddr = parseInt(chunk[0], 16);
+
+ // Choose the decoding node where we'll write our chars.
+ var writeTable = this._getDecodeTrieNode(curAddr);
+ curAddr = curAddr & 0xFF;
+
+ // Write all other elements of the chunk to the table.
+ for (var k = 1; k < chunk.length; k++) {
+ var part = chunk[k];
+ if (typeof part === "string") { // String, write as-is.
+ for (var l = 0; l < part.length;) {
+ var code = part.charCodeAt(l++);
+ if (0xD800 <= code && code < 0xDC00) { // Decode surrogate
+ var codeTrail = part.charCodeAt(l++);
+ if (0xDC00 <= codeTrail && codeTrail < 0xE000)
+ writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00);
+ else
+ throw new Error("Incorrect surrogate pair in " + this.options.encodingName + " at chunk " + chunk[0]);
+ }
+ else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used)
+ var len = 0xFFF - code + 2;
+ var seq = [];
+ for (var m = 0; m < len; m++)
+ seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq.
+
+ writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;
+ this.decodeTableSeq.push(seq);
+ }
+ else
+ writeTable[curAddr++] = code; // Basic char
+ }
+ }
+ else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character.
+ var charCode = writeTable[curAddr - 1] + 1;
+ for (var l = 0; l < part; l++)
+ writeTable[curAddr++] = charCode++;
+ }
+ else
+ throw new Error("Incorrect type '" + typeof part + "' given in " + this.options.encodingName + " at chunk " + chunk[0]);
+ }
+ if (curAddr > 0xFF)
+ throw new Error("Incorrect chunk in " + this.options.encodingName + " at addr " + chunk[0] + ": too long" + curAddr);
+}
+
+// Encoder helpers
+DBCSCodec.prototype._getEncodeBucket = function(uCode) {
+ var high = uCode >> 8; // This could be > 0xFF because of astral characters.
+ if (this.encodeTable[high] === undefined)
+ this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand.
+ return this.encodeTable[high];
+}
+
+DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) {
+ var bucket = this._getEncodeBucket(uCode);
+ var low = uCode & 0xFF;
+ if (bucket[low] <= SEQ_START)
+ this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it.
+ else if (bucket[low] == UNASSIGNED)
+ bucket[low] = dbcsCode;
+}
+
+DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {
+
+ // Get the root of character tree according to first character of the sequence.
+ var uCode = seq[0];
+ var bucket = this._getEncodeBucket(uCode);
+ var low = uCode & 0xFF;
+
+ var node;
+ if (bucket[low] <= SEQ_START) {
+ // There's already a sequence with - use it.
+ node = this.encodeTableSeq[SEQ_START-bucket[low]];
+ }
+ else {
+ // There was no sequence object - allocate a new one.
+ node = {};
+ if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence.
+ bucket[low] = SEQ_START - this.encodeTableSeq.length;
+ this.encodeTableSeq.push(node);
+ }
+
+ // Traverse the character tree, allocating new nodes as needed.
+ for (var j = 1; j < seq.length-1; j++) {
+ var oldVal = node[uCode];
+ if (typeof oldVal === 'object')
+ node = oldVal;
+ else {
+ node = node[uCode] = {}
+ if (oldVal !== undefined)
+ node[DEF_CHAR] = oldVal
+ }
+ }
+
+ // Set the leaf to given dbcsCode.
+ uCode = seq[seq.length-1];
+ node[uCode] = dbcsCode;
+}
+
+DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) {
+ var node = this.decodeTables[nodeIdx];
+ for (var i = 0; i < 0x100; i++) {
+ var uCode = node[i];
+ var mbCode = prefix + i;
+ if (skipEncodeChars[mbCode])
+ continue;
+
+ if (uCode >= 0)
+ this._setEncodeChar(uCode, mbCode);
+ else if (uCode <= NODE_START)
+ this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars);
+ else if (uCode <= SEQ_START)
+ this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);
+ }
+}
+
+
+
+// == Actual Encoding ==========================================================
+
+
+function encoderDBCSWrite(str) {
+ var newBuf = new Buffer(str.length * (this.gb18030 ? 4 : 3)),
+ leadSurrogate = this.leadSurrogate,
+ seqObj = this.seqObj, nextChar = -1,
+ i = 0, j = 0;
+
+ while (true) {
+ // 0. Get next character.
+ if (nextChar === -1) {
+ if (i == str.length) break;
+ var uCode = str.charCodeAt(i++);
+ }
+ else {
+ var uCode = nextChar;
+ nextChar = -1;
+ }
+
+ // 1. Handle surrogates.
+ if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates.
+ if (uCode < 0xDC00) { // We've got lead surrogate.
+ if (leadSurrogate === -1) {
+ leadSurrogate = uCode;
+ continue;
+ } else {
+ leadSurrogate = uCode;
+ // Double lead surrogate found.
+ uCode = UNASSIGNED;
+ }
+ } else { // We've got trail surrogate.
+ if (leadSurrogate !== -1) {
+ uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00);
+ leadSurrogate = -1;
+ } else {
+ // Incomplete surrogate pair - only trail surrogate found.
+ uCode = UNASSIGNED;
+ }
+
+ }
+ }
+ else if (leadSurrogate !== -1) {
+ // Incomplete surrogate pair - only lead surrogate found.
+ nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char.
+ leadSurrogate = -1;
+ }
+
+ // 2. Convert uCode character.
+ var dbcsCode = UNASSIGNED;
+ if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence
+ var resCode = seqObj[uCode];
+ if (typeof resCode === 'object') { // Sequence continues.
+ seqObj = resCode;
+ continue;
+
+ } else if (typeof resCode == 'number') { // Sequence finished. Write it.
+ dbcsCode = resCode;
+
+ } else if (resCode == undefined) { // Current character is not part of the sequence.
+
+ // Try default character for this sequence
+ resCode = seqObj[DEF_CHAR];
+ if (resCode !== undefined) {
+ dbcsCode = resCode; // Found. Write it.
+ nextChar = uCode; // Current character will be written too in the next iteration.
+
+ } else {
+ // TODO: What if we have no default? (resCode == undefined)
+ // Then, we should write first char of the sequence as-is and try the rest recursively.
+ // Didn't do it for now because no encoding has this situation yet.
+ // Currently, just skip the sequence and write current char.
+ }
+ }
+ seqObj = undefined;
+ }
+ else if (uCode >= 0) { // Regular character
+ var subtable = this.encodeTable[uCode >> 8];
+ if (subtable !== undefined)
+ dbcsCode = subtable[uCode & 0xFF];
+
+ if (dbcsCode <= SEQ_START) { // Sequence start
+ seqObj = this.encodeTableSeq[SEQ_START-dbcsCode];
+ continue;
+ }
+
+ if (dbcsCode == UNASSIGNED && this.gb18030) {
+ // Use GB18030 algorithm to find character(s) to write.
+ var idx = findIdx(this.gb18030.uChars, uCode);
+ if (idx != -1) {
+ var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);
+ newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600;
+ newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260;
+ newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10;
+ newBuf[j++] = 0x30 + dbcsCode;
+ continue;
+ }
+ }
+ }
+
+ // 3. Write dbcsCode character.
+ if (dbcsCode === UNASSIGNED)
+ dbcsCode = this.defaultCharSingleByte;
+
+ if (dbcsCode < 0x100) {
+ newBuf[j++] = dbcsCode;
+ }
+ else if (dbcsCode < 0x10000) {
+ newBuf[j++] = dbcsCode >> 8; // high byte
+ newBuf[j++] = dbcsCode & 0xFF; // low byte
+ }
+ else {
+ newBuf[j++] = dbcsCode >> 16;
+ newBuf[j++] = (dbcsCode >> 8) & 0xFF;
+ newBuf[j++] = dbcsCode & 0xFF;
+ }
+ }
+
+ this.seqObj = seqObj;
+ this.leadSurrogate = leadSurrogate;
+ return newBuf.slice(0, j);
+}
+
+function encoderDBCSEnd() {
+ if (this.leadSurrogate === -1 && this.seqObj === undefined)
+ return; // All clean. Most often case.
+
+ var newBuf = new Buffer(10), j = 0;
+
+ if (this.seqObj) { // We're in the sequence.
+ var dbcsCode = this.seqObj[DEF_CHAR];
+ if (dbcsCode !== undefined) { // Write beginning of the sequence.
+ if (dbcsCode < 0x100) {
+ newBuf[j++] = dbcsCode;
+ }
+ else {
+ newBuf[j++] = dbcsCode >> 8; // high byte
+ newBuf[j++] = dbcsCode & 0xFF; // low byte
+ }
+ } else {
+ // See todo above.
+ }
+ this.seqObj = undefined;
+ }
+
+ if (this.leadSurrogate !== -1) {
+ // Incomplete surrogate pair - only lead surrogate found.
+ newBuf[j++] = this.defaultCharSingleByte;
+ this.leadSurrogate = -1;
+ }
+
+ return newBuf.slice(0, j);
+}
+
+
+// == Actual Decoding ==========================================================
+
+
+function decoderDBCSWrite(buf) {
+ var newBuf = new Buffer(buf.length*2),
+ nodeIdx = this.nodeIdx,
+ prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length,
+ seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence.
+ uCode;
+
+ if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later.
+ prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]);
+
+ for (var i = 0, j = 0; i < buf.length; i++) {
+ var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset];
+
+ // TODO: Check curByte is number 0 <= < 256
+
+ // Lookup in current trie node.
+ var uCode = this.decodeTables[nodeIdx][curByte];
+
+ if (uCode >= 0) {
+ // Normal character, just use it.
+ }
+ else if (uCode === UNASSIGNED) { // Unknown char.
+ // TODO: Callback with seq.
+ //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);
+ i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle).
+ uCode = this.defaultCharUnicode.charCodeAt(0);
+ }
+ else if (uCode === GB18030_CODE) {
+ var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);
+ var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30);
+ var idx = findIdx(this.gb18030.gbChars, ptr);
+ uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];
+ }
+ else if (uCode <= NODE_START) { // Go to next trie node.
+ nodeIdx = NODE_START - uCode;
+ continue;
+ }
+ else if (uCode <= SEQ_START) { // Output a sequence of chars.
+ var seq = this.decodeTableSeq[SEQ_START - uCode];
+ for (var k = 0; k < seq.length - 1; k++) {
+ uCode = seq[k];
+ newBuf[j++] = uCode & 0xFF;
+ newBuf[j++] = uCode >> 8;
+ }
+ uCode = seq[seq.length-1];
+ }
+ else
+ throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte);
+
+ // Write the character to buffer, handling higher planes using surrogate pair.
+ if (uCode > 0xFFFF) {
+ uCode -= 0x10000;
+ var uCodeLead = 0xD800 + Math.floor(uCode / 0x400);
+ newBuf[j++] = uCodeLead & 0xFF;
+ newBuf[j++] = uCodeLead >> 8;
+
+ uCode = 0xDC00 + uCode % 0x400;
+ }
+ newBuf[j++] = uCode & 0xFF;
+ newBuf[j++] = uCode >> 8;
+
+ // Reset trie node.
+ nodeIdx = 0; seqStart = i+1;
+ }
+
+ this.nodeIdx = nodeIdx;
+ this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset);
+ return newBuf.slice(0, j).toString('ucs2');
+}
+
+function decoderDBCSEnd() {
+ var ret = '';
+
+ // Try to parse all remaining chars.
+ while (this.prevBuf.length > 0) {
+ // Skip 1 character in the buffer.
+ ret += this.defaultCharUnicode;
+ var buf = this.prevBuf.slice(1);
+
+ // Parse remaining as usual.
+ this.prevBuf = new Buffer(0);
+ this.nodeIdx = 0;
+ if (buf.length > 0)
+ ret += decoderDBCSWrite.call(this, buf);
+ }
+
+ this.nodeIdx = 0;
+ return ret;
+}
+
+// Binary search for GB18030. Returns largest i such that table[i] <= val.
+function findIdx(table, val) {
+ if (table[0] > val)
+ return -1;
+
+ var l = 0, r = table.length;
+ while (l < r-1) { // always table[l] <= val < table[r]
+ var mid = l + Math.floor((r-l+1)/2);
+ if (table[mid] <= val)
+ l = mid;
+ else
+ r = mid;
+ }
+ return l;
+}
+
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-data.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-data.js
new file mode 100644
index 0000000..140b775
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-data.js
@@ -0,0 +1,168 @@
+
+// Description of supported double byte encodings and aliases.
+// Tables are not require()-d until they are needed to speed up library load.
+// require()-s are direct to support Browserify.
+
+module.exports = {
+
+ // == Japanese/ShiftJIS ====================================================
+ // All japanese encodings are based on JIS X set of standards:
+ // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
+ // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
+ // Has several variations in 1978, 1983, 1990 and 1997.
+ // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.
+ // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.
+ // 2 planes, first is superset of 0208, second - revised 0212.
+ // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)
+
+ // Byte encodings are:
+ // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte
+ // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.
+ // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.
+ // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.
+ // 0x00-0x7F - lower part of 0201
+ // 0x8E, 0xA1-0xDF - upper part of 0201
+ // (0xA1-0xFE)x2 - 0208 plane (94x94).
+ // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).
+ // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.
+ // Used as-is in ISO2022 family.
+ // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
+ // 0201-1976 Roman, 0208-1978, 0208-1983.
+ // * ISO2022-JP-1: Adds esc seq for 0212-1990.
+ // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.
+ // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.
+ // * ISO2022-JP-2004: Adds 0213-2004 Plane 1.
+ //
+ // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.
+ //
+ // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html
+
+
+ 'shiftjis': {
+ type: '_dbcs',
+ table: function() { return require('./tables/shiftjis.json') },
+ encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
+ encodeSkipVals: [{from: 0xED40, to: 0xF940}],
+ },
+ 'csshiftjis': 'shiftjis',
+ 'mskanji': 'shiftjis',
+ 'sjis': 'shiftjis',
+ 'windows31j': 'shiftjis',
+ 'xsjis': 'shiftjis',
+ 'windows932': 'shiftjis',
+ '932': 'shiftjis',
+ 'cp932': 'shiftjis',
+
+ 'eucjp': {
+ type: '_dbcs',
+ table: function() { return require('./tables/eucjp.json') },
+ encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
+ },
+
+ // TODO: KDDI extension to Shift_JIS
+ // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
+ // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.
+
+ // == Chinese/GBK ==========================================================
+ // http://en.wikipedia.org/wiki/GBK
+
+ // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936
+ 'gb2312': 'cp936',
+ 'gb231280': 'cp936',
+ 'gb23121980': 'cp936',
+ 'csgb2312': 'cp936',
+ 'csiso58gb231280': 'cp936',
+ 'euccn': 'cp936',
+ 'isoir58': 'gbk',
+
+ // Microsoft's CP936 is a subset and approximation of GBK.
+ // TODO: Euro = 0x80 in cp936, but not in GBK (where it's valid but undefined)
+ 'windows936': 'cp936',
+ '936': 'cp936',
+ 'cp936': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp936.json') },
+ },
+
+ // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.
+ 'gbk': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
+ },
+ 'xgbk': 'gbk',
+
+ // GB18030 is an algorithmic extension of GBK.
+ 'gb18030': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
+ gb18030: function() { return require('./tables/gb18030-ranges.json') },
+ },
+
+ 'chinese': 'gb18030',
+
+ // TODO: Support GB18030 (~27000 chars + whole unicode mapping, cp54936)
+ // http://icu-project.org/docs/papers/gb18030.html
+ // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
+ // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0
+
+ // == Korean ===============================================================
+ // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.
+ 'windows949': 'cp949',
+ '949': 'cp949',
+ 'cp949': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp949.json') },
+ },
+
+ 'cseuckr': 'cp949',
+ 'csksc56011987': 'cp949',
+ 'euckr': 'cp949',
+ 'isoir149': 'cp949',
+ 'korean': 'cp949',
+ 'ksc56011987': 'cp949',
+ 'ksc56011989': 'cp949',
+ 'ksc5601': 'cp949',
+
+
+ // == Big5/Taiwan/Hong Kong ================================================
+ // There are lots of tables for Big5 and cp950. Please see the following links for history:
+ // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html
+ // Variations, in roughly number of defined chars:
+ // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT
+ // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/
+ // * Big5-2003 (Taiwan standard) almost superset of cp950.
+ // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.
+ // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
+ // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.
+ // Plus, it has 4 combining sequences.
+ // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299
+ // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.
+ // Implementations are not consistent within browsers; sometimes labeled as just big5.
+ // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.
+ // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31
+ // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.
+ // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt
+ // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt
+ //
+ // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder
+ // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.
+
+ 'windows950': 'cp950',
+ '950': 'cp950',
+ 'cp950': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp950.json') },
+ },
+
+ // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.
+ 'big5': 'big5hkscs',
+ 'big5hkscs': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) },
+ },
+
+ 'cnbig5': 'big5hkscs',
+ 'csbig5': 'big5hkscs',
+ 'xxbig5': 'big5hkscs',
+
+};
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/index.js
new file mode 100644
index 0000000..2cda918
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/index.js
@@ -0,0 +1,20 @@
+
+// Update this array if you add/rename/remove files in this directory.
+// We support Browserify by skipping automatic module discovery and requiring modules directly.
+var modules = [
+ require("./internal"),
+ require("./utf16"),
+ require("./utf7"),
+ require("./sbcs-codec"),
+ require("./sbcs-data"),
+ require("./sbcs-data-generated"),
+ require("./dbcs-codec"),
+ require("./dbcs-data"),
+];
+
+// Put all encoding/alias/codec definitions to single object and export it.
+for (var i = 0; i < modules.length; i++) {
+ var module = modules[i];
+ for (var enc in module)
+ exports[enc] = module[enc];
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/internal.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/internal.js
new file mode 100644
index 0000000..396f580
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/internal.js
@@ -0,0 +1,81 @@
+
+// Export Node.js internal encodings.
+
+var utf16lebom = new Buffer([0xFF, 0xFE]);
+
+module.exports = {
+ // Encodings
+ utf8: { type: "_internal", enc: "utf8" },
+ cesu8: { type: "_internal", enc: "utf8" },
+ unicode11utf8: { type: "_internal", enc: "utf8" },
+ ucs2: { type: "_internal", enc: "ucs2", bom: utf16lebom },
+ utf16le:{ type: "_internal", enc: "ucs2", bom: utf16lebom },
+ binary: { type: "_internal", enc: "binary" },
+ base64: { type: "_internal", enc: "base64" },
+ hex: { type: "_internal", enc: "hex" },
+
+ // Codec.
+ _internal: function(options) {
+ if (!options || !options.enc)
+ throw new Error("Internal codec is called without encoding type.")
+
+ return {
+ encoder: options.enc == "base64" ? encoderBase64 : encoderInternal,
+ decoder: decoderInternal,
+
+ enc: options.enc,
+ bom: options.bom,
+ };
+ },
+};
+
+// We use node.js internal decoder. It's signature is the same as ours.
+var StringDecoder = require('string_decoder').StringDecoder;
+
+if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.
+ StringDecoder.prototype.end = function() {};
+
+function decoderInternal() {
+ return new StringDecoder(this.enc);
+}
+
+// Encoder is mostly trivial
+
+function encoderInternal() {
+ return {
+ write: encodeInternal,
+ end: function() {},
+
+ enc: this.enc,
+ }
+}
+
+function encodeInternal(str) {
+ return new Buffer(str, this.enc);
+}
+
+
+// Except base64 encoder, which must keep its state.
+
+function encoderBase64() {
+ return {
+ write: encodeBase64Write,
+ end: encodeBase64End,
+
+ prevStr: '',
+ };
+}
+
+function encodeBase64Write(str) {
+ str = this.prevStr + str;
+ var completeQuads = str.length - (str.length % 4);
+ this.prevStr = str.slice(completeQuads);
+ str = str.slice(0, completeQuads);
+
+ return new Buffer(str, "base64");
+}
+
+function encodeBase64End() {
+ return new Buffer(this.prevStr, "base64");
+}
+
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-codec.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-codec.js
new file mode 100644
index 0000000..c79defb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-codec.js
@@ -0,0 +1,76 @@
+
+// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that
+// correspond to encoded bytes (if 128 - then lower half is ASCII).
+
+exports._sbcs = function(options) {
+ if (!options)
+ throw new Error("SBCS codec is called without the data.")
+
+ // Prepare char buffer for decoding.
+ if (!options.chars || (options.chars.length !== 128 && options.chars.length !== 256))
+ throw new Error("Encoding '"+options.type+"' has incorrect 'chars' (must be of len 128 or 256)");
+
+ if (options.chars.length === 128) {
+ var asciiString = "";
+ for (var i = 0; i < 128; i++)
+ asciiString += String.fromCharCode(i);
+ options.chars = asciiString + options.chars;
+ }
+
+ var decodeBuf = new Buffer(options.chars, 'ucs2');
+
+ // Encoding buffer.
+ var encodeBuf = new Buffer(65536);
+ encodeBuf.fill(options.iconv.defaultCharSingleByte.charCodeAt(0));
+
+ for (var i = 0; i < options.chars.length; i++)
+ encodeBuf[options.chars.charCodeAt(i)] = i;
+
+ return {
+ encoder: encoderSBCS,
+ decoder: decoderSBCS,
+
+ encodeBuf: encodeBuf,
+ decodeBuf: decodeBuf,
+ };
+}
+
+function encoderSBCS(options) {
+ return {
+ write: encoderSBCSWrite,
+ end: function() {},
+
+ encodeBuf: this.encodeBuf,
+ };
+}
+
+function encoderSBCSWrite(str) {
+ var buf = new Buffer(str.length);
+ for (var i = 0; i < str.length; i++)
+ buf[i] = this.encodeBuf[str.charCodeAt(i)];
+
+ return buf;
+}
+
+
+function decoderSBCS(options) {
+ return {
+ write: decoderSBCSWrite,
+ end: function() {},
+
+ decodeBuf: this.decodeBuf,
+ };
+}
+
+function decoderSBCSWrite(buf) {
+ // Strings are immutable in JS -> we use ucs2 buffer to speed up computations.
+ var decodeBuf = this.decodeBuf;
+ var newBuf = new Buffer(buf.length*2);
+ var idx1 = 0, idx2 = 0;
+ for (var i = 0, _len = buf.length; i < _len; i++) {
+ idx1 = buf[i]*2; idx2 = i*2;
+ newBuf[idx2] = decodeBuf[idx1];
+ newBuf[idx2+1] = decodeBuf[idx1+1];
+ }
+ return newBuf.toString('ucs2');
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data-generated.js
new file mode 100644
index 0000000..3808260
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data-generated.js
@@ -0,0 +1,450 @@
+
+// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script.
+module.exports = {
+ "437": "cp437",
+ "737": "cp737",
+ "775": "cp775",
+ "850": "cp850",
+ "852": "cp852",
+ "855": "cp855",
+ "856": "cp856",
+ "857": "cp857",
+ "858": "cp858",
+ "860": "cp860",
+ "861": "cp861",
+ "862": "cp862",
+ "863": "cp863",
+ "864": "cp864",
+ "865": "cp865",
+ "866": "cp866",
+ "869": "cp869",
+ "874": "windows874",
+ "922": "cp922",
+ "1046": "cp1046",
+ "1124": "cp1124",
+ "1125": "cp1125",
+ "1129": "cp1129",
+ "1133": "cp1133",
+ "1161": "cp1161",
+ "1162": "cp1162",
+ "1163": "cp1163",
+ "1250": "windows1250",
+ "1251": "windows1251",
+ "1252": "windows1252",
+ "1253": "windows1253",
+ "1254": "windows1254",
+ "1255": "windows1255",
+ "1256": "windows1256",
+ "1257": "windows1257",
+ "1258": "windows1258",
+ "28591": "iso88591",
+ "28592": "iso88592",
+ "28593": "iso88593",
+ "28594": "iso88594",
+ "28595": "iso88595",
+ "28596": "iso88596",
+ "28597": "iso88597",
+ "28598": "iso88598",
+ "28599": "iso88599",
+ "28600": "iso885910",
+ "28601": "iso885911",
+ "28603": "iso885913",
+ "28604": "iso885914",
+ "28605": "iso885915",
+ "28606": "iso885916",
+ "windows874": {
+ "type": "_sbcs",
+ "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
+ },
+ "win874": "windows874",
+ "cp874": "windows874",
+ "windows1250": {
+ "type": "_sbcs",
+ "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙"
+ },
+ "win1250": "windows1250",
+ "cp1250": "windows1250",
+ "windows1251": {
+ "type": "_sbcs",
+ "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
+ },
+ "win1251": "windows1251",
+ "cp1251": "windows1251",
+ "windows1252": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "win1252": "windows1252",
+ "cp1252": "windows1252",
+ "windows1253": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�"
+ },
+ "win1253": "windows1253",
+ "cp1253": "windows1253",
+ "windows1254": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
+ },
+ "win1254": "windows1254",
+ "cp1254": "windows1254",
+ "windows1255": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹ�ֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת���"
+ },
+ "win1255": "windows1255",
+ "cp1255": "windows1255",
+ "windows1256": {
+ "type": "_sbcs",
+ "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œں ،¢£¤¥¦§¨©ھ«¬®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûüے"
+ },
+ "win1256": "windows1256",
+ "cp1256": "windows1256",
+ "windows1257": {
+ "type": "_sbcs",
+ "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙"
+ },
+ "win1257": "windows1257",
+ "cp1257": "windows1257",
+ "windows1258": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
+ },
+ "win1258": "windows1258",
+ "cp1258": "windows1258",
+ "iso88591": {
+ "type": "_sbcs",
+ "chars": "
¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "cp28591": "iso88591",
+ "iso88592": {
+ "type": "_sbcs",
+ "chars": "
Ą˘Ł¤ĽŚ§¨ŠŞŤŹŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙"
+ },
+ "cp28592": "iso88592",
+ "iso88593": {
+ "type": "_sbcs",
+ "chars": "
Ħ˘£¤�Ĥ§¨İŞĞĴ�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙"
+ },
+ "cp28593": "iso88593",
+ "iso88594": {
+ "type": "_sbcs",
+ "chars": "
ĄĸŖ¤ĨĻ§¨ŠĒĢŦŽ¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙"
+ },
+ "cp28594": "iso88594",
+ "iso88595": {
+ "type": "_sbcs",
+ "chars": "
ЁЂЃЄЅІЇЈЉЊЋЌЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ"
+ },
+ "cp28595": "iso88595",
+ "iso88596": {
+ "type": "_sbcs",
+ "chars": "
���¤�������،�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������"
+ },
+ "cp28596": "iso88596",
+ "iso88597": {
+ "type": "_sbcs",
+ "chars": "
‘’£€₯¦§¨©ͺ«¬�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�"
+ },
+ "cp28597": "iso88597",
+ "iso88598": {
+ "type": "_sbcs",
+ "chars": "
�¢£¤¥¦§¨©×«¬®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת���"
+ },
+ "cp28598": "iso88598",
+ "iso88599": {
+ "type": "_sbcs",
+ "chars": "
¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
+ },
+ "cp28599": "iso88599",
+ "iso885910": {
+ "type": "_sbcs",
+ "chars": "
ĄĒĢĪĨĶ§ĻĐŠŦŽŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ"
+ },
+ "cp28600": "iso885910",
+ "iso885911": {
+ "type": "_sbcs",
+ "chars": "
กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
+ },
+ "cp28601": "iso885911",
+ "iso885913": {
+ "type": "_sbcs",
+ "chars": "
”¢£¤„¦§Ø©Ŗ«¬®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’"
+ },
+ "cp28603": "iso885913",
+ "iso885914": {
+ "type": "_sbcs",
+ "chars": "
Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ"
+ },
+ "cp28604": "iso885914",
+ "iso885915": {
+ "type": "_sbcs",
+ "chars": "
¡¢£€¥Š§š©ª«¬®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "cp28605": "iso885915",
+ "iso885916": {
+ "type": "_sbcs",
+ "chars": "
ĄąŁ€„Š§š©Ș«ŹźŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ"
+ },
+ "cp28606": "iso885916",
+ "cp437": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm437": "cp437",
+ "csibm437": "cp437",
+ "cp737": {
+ "type": "_sbcs",
+ "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ "
+ },
+ "ibm737": "cp737",
+ "csibm737": "cp737",
+ "cp775": {
+ "type": "_sbcs",
+ "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’±“¾¶§÷„°∙·¹³²■ "
+ },
+ "ibm775": "cp775",
+ "csibm775": "cp775",
+ "cp850": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´±‗¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm850": "cp850",
+ "csibm850": "cp850",
+ "cp852": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´˝˛ˇ˘§÷¸°¨˙űŘř■ "
+ },
+ "ibm852": "cp852",
+ "csibm852": "cp852",
+ "cp855": {
+ "type": "_sbcs",
+ "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№ыЫзЗшШэЭщЩчЧ§■ "
+ },
+ "ibm855": "cp855",
+ "csibm855": "cp855",
+ "cp856": {
+ "type": "_sbcs",
+ "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´±‗¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm856": "cp856",
+ "csibm856": "cp856",
+ "cp857": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´±�¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm857": "cp857",
+ "csibm857": "cp857",
+ "cp858": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´±‗¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm858": "cp858",
+ "csibm858": "cp858",
+ "cp860": {
+ "type": "_sbcs",
+ "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm860": "cp860",
+ "csibm860": "cp860",
+ "cp861": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm861": "cp861",
+ "csibm861": "cp861",
+ "cp862": {
+ "type": "_sbcs",
+ "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm862": "cp862",
+ "csibm862": "cp862",
+ "cp863": {
+ "type": "_sbcs",
+ "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm863": "cp863",
+ "csibm863": "cp863",
+ "cp864": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�"
+ },
+ "ibm864": "cp864",
+ "csibm864": "cp864",
+ "cp865": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm865": "cp865",
+ "csibm865": "cp865",
+ "cp866": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ "
+ },
+ "ibm866": "cp866",
+ "csibm866": "cp866",
+ "cp869": {
+ "type": "_sbcs",
+ "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄±υφχ§ψ΅°¨ωϋΰώ■ "
+ },
+ "ibm869": "cp869",
+ "csibm869": "cp869",
+ "cp922": {
+ "type": "_sbcs",
+ "chars": "
¡¢£¤¥¦§¨©ª«¬®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ"
+ },
+ "ibm922": "cp922",
+ "csibm922": "cp922",
+ "cp1046": {
+ "type": "_sbcs",
+ "chars": "ﺈ×÷ﹱ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�"
+ },
+ "ibm1046": "cp1046",
+ "csibm1046": "cp1046",
+ "cp1124": {
+ "type": "_sbcs",
+ "chars": "
ЁЂҐЄЅІЇЈЉЊЋЌЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ"
+ },
+ "ibm1124": "cp1124",
+ "csibm1124": "cp1124",
+ "cp1125": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ "
+ },
+ "ibm1125": "cp1125",
+ "csibm1125": "cp1125",
+ "cp1129": {
+ "type": "_sbcs",
+ "chars": "
¡¢£¤¥¦§œ©ª«¬®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
+ },
+ "ibm1129": "cp1129",
+ "csibm1129": "cp1129",
+ "cp1133": {
+ "type": "_sbcs",
+ "chars": "
ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�"
+ },
+ "ibm1133": "cp1133",
+ "csibm1133": "cp1133",
+ "cp1161": {
+ "type": "_sbcs",
+ "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ "
+ },
+ "ibm1161": "cp1161",
+ "csibm1161": "cp1161",
+ "cp1162": {
+ "type": "_sbcs",
+ "chars": "€…‘’“”•–— กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
+ },
+ "ibm1162": "cp1162",
+ "csibm1162": "cp1162",
+ "cp1163": {
+ "type": "_sbcs",
+ "chars": "
¡¢£€¥¦§œ©ª«¬®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
+ },
+ "ibm1163": "cp1163",
+ "csibm1163": "cp1163",
+ "maccroatian": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ"
+ },
+ "maccyrillic": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"
+ },
+ "macgreek": {
+ "type": "_sbcs",
+ "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�"
+ },
+ "maciceland": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "macroman": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "macromania": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "macthai": {
+ "type": "_sbcs",
+ "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����"
+ },
+ "macturkish": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "macukraine": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"
+ },
+ "koi8r": {
+ "type": "_sbcs",
+ "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "koi8u": {
+ "type": "_sbcs",
+ "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "koi8ru": {
+ "type": "_sbcs",
+ "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "koi8t": {
+ "type": "_sbcs",
+ "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "armscii8": {
+ "type": "_sbcs",
+ "chars": "
�և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�"
+ },
+ "rk1048": {
+ "type": "_sbcs",
+ "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
+ },
+ "tcvn": {
+ "type": "_sbcs",
+ "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ"
+ },
+ "georgianacademy": {
+ "type": "_sbcs",
+ "chars": "‚ƒ„…†‡ˆ‰Š‹Œ‘’“”•–—˜™š›œŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "georgianps": {
+ "type": "_sbcs",
+ "chars": "‚ƒ„…†‡ˆ‰Š‹Œ‘’“”•–—˜™š›œŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "pt154": {
+ "type": "_sbcs",
+ "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
+ },
+ "viscii": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ"
+ },
+ "iso646cn": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������"
+ },
+ "iso646jp": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������"
+ },
+ "hproman8": {
+ "type": "_sbcs",
+ "chars": "
ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�"
+ },
+ "macintosh": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "ascii": {
+ "type": "_sbcs",
+ "chars": "��������������������������������������������������������������������������������������������������������������������������������"
+ },
+ "tis620": {
+ "type": "_sbcs",
+ "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
+ }
+}
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data.js
new file mode 100644
index 0000000..adc5fbc
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data.js
@@ -0,0 +1,168 @@
+
+// Manually added data to be used by sbcs codec in addition to generated one.
+
+module.exports = {
+ // Not supported by iconv, not sure why.
+ "10029": "maccenteuro",
+ "maccenteuro": {
+ "type": "_sbcs",
+ "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ"
+ },
+
+ "808": "cp808",
+ "ibm808": "cp808",
+ "cp808": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ "
+ },
+
+ // Aliases of generated encodings.
+ "ascii8bit": "ascii",
+ "usascii": "ascii",
+ "ansix34": "ascii",
+ "ansix341968": "ascii",
+ "ansix341986": "ascii",
+ "csascii": "ascii",
+ "cp367": "ascii",
+ "ibm367": "ascii",
+ "isoir6": "ascii",
+ "iso646us": "ascii",
+ "iso646irv": "ascii",
+ "us": "ascii",
+
+ "latin1": "iso88591",
+ "latin2": "iso88592",
+ "latin3": "iso88593",
+ "latin4": "iso88594",
+ "latin5": "iso88599",
+ "latin6": "iso885910",
+ "latin7": "iso885913",
+ "latin8": "iso885914",
+ "latin9": "iso885915",
+ "latin10": "iso885916",
+
+ "csisolatin1": "iso88591",
+ "csisolatin2": "iso88592",
+ "csisolatin3": "iso88593",
+ "csisolatin4": "iso88594",
+ "csisolatincyrillic": "iso88595",
+ "csisolatinarabic": "iso88596",
+ "csisolatingreek" : "iso88597",
+ "csisolatinhebrew": "iso88598",
+ "csisolatin5": "iso88599",
+ "csisolatin6": "iso885910",
+
+ "l1": "iso88591",
+ "l2": "iso88592",
+ "l3": "iso88593",
+ "l4": "iso88594",
+ "l5": "iso88599",
+ "l6": "iso885910",
+ "l7": "iso885913",
+ "l8": "iso885914",
+ "l9": "iso885915",
+ "l10": "iso885916",
+
+ "isoir14": "iso646jp",
+ "isoir57": "iso646cn",
+ "isoir100": "iso88591",
+ "isoir101": "iso88592",
+ "isoir109": "iso88593",
+ "isoir110": "iso88594",
+ "isoir144": "iso88595",
+ "isoir127": "iso88596",
+ "isoir126": "iso88597",
+ "isoir138": "iso88598",
+ "isoir148": "iso88599",
+ "isoir157": "iso885910",
+ "isoir166": "tis620",
+ "isoir179": "iso885913",
+ "isoir199": "iso885914",
+ "isoir203": "iso885915",
+ "isoir226": "iso885916",
+
+ "cp819": "iso88591",
+ "ibm819": "iso88591",
+
+ "cyrillic": "iso88595",
+
+ "arabic": "iso88596",
+ "arabic8": "iso88596",
+ "ecma114": "iso88596",
+ "asmo708": "iso88596",
+
+ "greek" : "iso88597",
+ "greek8" : "iso88597",
+ "ecma118" : "iso88597",
+ "elot928" : "iso88597",
+
+ "hebrew": "iso88598",
+ "hebrew8": "iso88598",
+
+ "turkish": "iso88599",
+ "turkish8": "iso88599",
+
+ "thai": "iso885911",
+ "thai8": "iso885911",
+
+ "celtic": "iso885914",
+ "celtic8": "iso885914",
+ "isoceltic": "iso885914",
+
+ "tis6200": "tis620",
+ "tis62025291": "tis620",
+ "tis62025330": "tis620",
+
+ "10000": "macroman",
+ "10006": "macgreek",
+ "10007": "maccyrillic",
+ "10079": "maciceland",
+ "10081": "macturkish",
+
+ "cspc8codepage437": "cp437",
+ "cspc775baltic": "cp775",
+ "cspc850multilingual": "cp850",
+ "cspcp852": "cp852",
+ "cspc862latinhebrew": "cp862",
+ "cpgr": "cp869",
+
+ "msee": "cp1250",
+ "mscyrl": "cp1251",
+ "msansi": "cp1252",
+ "msgreek": "cp1253",
+ "msturk": "cp1254",
+ "mshebr": "cp1255",
+ "msarab": "cp1256",
+ "winbaltrim": "cp1257",
+
+ "cp20866": "koi8r",
+ "20866": "koi8r",
+ "ibm878": "koi8r",
+ "cskoi8r": "koi8r",
+
+ "cp21866": "koi8u",
+ "21866": "koi8u",
+ "ibm1168": "koi8u",
+
+ "strk10482002": "rk1048",
+
+ "tcvn5712": "tcvn",
+ "tcvn57121": "tcvn",
+
+ "gb198880": "iso646cn",
+ "cn": "iso646cn",
+
+ "csiso14jisc6220ro": "iso646jp",
+ "jisc62201969ro": "iso646jp",
+ "jp": "iso646jp",
+
+ "cshproman8": "hproman8",
+ "r8": "hproman8",
+ "roman8": "hproman8",
+ "xroman8": "hproman8",
+ "ibm1051": "hproman8",
+
+ "mac": "macintosh",
+ "csmacintosh": "macintosh",
+};
+
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/big5-added.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/big5-added.json
new file mode 100644
index 0000000..3c3d3c2
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/big5-added.json
@@ -0,0 +1,122 @@
+[
+["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],
+["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"],
+["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"],
+["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒÊ̄ẾÊ̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"],
+["88a1","ǜüê̄ếê̌ềêɡ⏚⏛"],
+["8940","𪎩𡅅"],
+["8943","攊"],
+["8946","丽滝鵎釟"],
+["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"],
+["89a1","琑糼緍楆竉刧"],
+["89ab","醌碸酞肼"],
+["89b0","贋胶𠧧"],
+["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"],
+["89c1","溚舾甙"],
+["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"],
+["8a40","𧶄唥"],
+["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"],
+["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"],
+["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"],
+["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"],
+["8aac","䠋𠆩㿺塳𢶍"],
+["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"],
+["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"],
+["8ac9","𪘁𠸉𢫏𢳉"],
+["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"],
+["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"],
+["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"],
+["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"],
+["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"],
+["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"],
+["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"],
+["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"],
+["8ca1","𣏹椙橃𣱣泿"],
+["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"],
+["8cc9","顨杫䉶圽"],
+["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"],
+["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"],
+["8d40","𠮟"],
+["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"],
+["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"],
+["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"],
+["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"],
+["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"],
+["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"],
+["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"],
+["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"],
+["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"],
+["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"],
+["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"],
+["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"],
+["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"],
+["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"],
+["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"],
+["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"],
+["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"],
+["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"],
+["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"],
+["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"],
+["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"],
+["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"],
+["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"],
+["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"],
+["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"],
+["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"],
+["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"],
+["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"],
+["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"],
+["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"],
+["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"],
+["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"],
+["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"],
+["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"],
+["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"],
+["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"],
+["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"],
+["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"],
+["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"],
+["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"],
+["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"],
+["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"],
+["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"],
+["9fae","酙隁酜"],
+["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"],
+["9fc1","𤤙盖鮝个𠳔莾衂"],
+["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"],
+["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"],
+["9fe7","毺蠘罸"],
+["9feb","嘠𪙊蹷齓"],
+["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"],
+["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"],
+["a055","𡠻𦸅"],
+["a058","詾𢔛"],
+["a05b","惽癧髗鵄鍮鮏蟵"],
+["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"],
+["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"],
+["a0a1","嵗𨯂迚𨸹"],
+["a0a6","僙𡵆礆匲阸𠼻䁥"],
+["a0ae","矾"],
+["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"],
+["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"],
+["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"],
+["a3c0","␀",31,"␡"],
+["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23],
+["c740","す",58,"ァアィイ"],
+["c7a1","ゥ",81,"А",5,"ЁЖ",4],
+["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"],
+["c8a1","龰冈龱𧘇"],
+["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"],
+["c8f5","ʃɐɛɔɵœøŋʊɪ"],
+["f9fe","■"],
+["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"],
+["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"],
+["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"],
+["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"],
+["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"],
+["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"],
+["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"],
+["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"],
+["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"],
+["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"]
+]
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp936.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp936.json
new file mode 100644
index 0000000..49ddb9a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp936.json
@@ -0,0 +1,264 @@
+[
+["0","\u0000",127,"€"],
+["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],
+["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"],
+["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11],
+["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"],
+["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"],
+["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5],
+["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"],
+["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"],
+["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"],
+["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"],
+["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"],
+["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"],
+["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4],
+["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6],
+["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"],
+["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7],
+["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"],
+["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"],
+["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"],
+["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5],
+["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"],
+["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6],
+["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"],
+["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4],
+["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4],
+["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"],
+["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"],
+["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6],
+["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"],
+["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"],
+["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"],
+["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6],
+["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"],
+["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"],
+["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"],
+["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"],
+["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"],
+["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"],
+["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8],
+["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"],
+["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"],
+["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"],
+["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"],
+["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5],
+["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"],
+["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"],
+["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"],
+["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"],
+["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5],
+["9980","檧檨檪檭",114,"欥欦欨",6],
+["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"],
+["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"],
+["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"],
+["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"],
+["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"],
+["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5],
+["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"],
+["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"],
+["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6],
+["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"],
+["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"],
+["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4],
+["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19],
+["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"],
+["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"],
+["a2a1","ⅰ",9],
+["a2b1","⒈",19,"⑴",19,"①",9],
+["a2e5","㈠",9],
+["a2f1","Ⅰ",11],
+["a3a1","!"#¥%",88," ̄"],
+["a4a1","ぁ",82],
+["a5a1","ァ",85],
+["a6a1","Α",16,"Σ",6],
+["a6c1","α",16,"σ",6],
+["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"],
+["a6ee","︻︼︷︸︱"],
+["a6f4","︳︴"],
+["a7a1","А",5,"ЁЖ",25],
+["a7d1","а",5,"ёж",25],
+["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6],
+["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"],
+["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"],
+["a8bd","ńň"],
+["a8c0","ɡ"],
+["a8c5","ㄅ",36],
+["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"],
+["a959","℡㈱"],
+["a95c","‐"],
+["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8],
+["a980","﹢",4,"﹨﹩﹪﹫"],
+["a996","〇"],
+["a9a4","─",75],
+["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8],
+["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"],
+["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4],
+["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4],
+["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11],
+["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"],
+["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12],
+["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"],
+["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"],
+["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"],
+["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"],
+["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"],
+["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"],
+["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"],
+["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"],
+["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"],
+["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4],
+["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"],
+["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"],
+["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"],
+["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9],
+["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"],
+["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"],
+["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"],
+["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"],
+["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"],
+["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16],
+["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"],
+["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"],
+["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"],
+["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"],
+["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"],
+["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"],
+["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"],
+["bb40","籃",9,"籎",36,"籵",5,"籾",9],
+["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"],
+["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5],
+["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"],
+["bd40","紷",54,"絯",7],
+["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"],
+["be40","継",12,"綧",6,"綯",42],
+["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"],
+["bf40","緻",62],
+["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"],
+["c040","繞",35,"纃",23,"纜纝纞"],
+["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"],
+["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"],
+["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"],
+["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"],
+["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"],
+["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"],
+["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"],
+["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"],
+["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"],
+["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"],
+["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"],
+["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"],
+["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"],
+["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"],
+["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"],
+["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"],
+["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"],
+["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"],
+["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"],
+["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10],
+["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"],
+["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"],
+["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"],
+["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"],
+["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"],
+["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"],
+["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"],
+["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"],
+["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"],
+["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9],
+["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"],
+["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"],
+["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"],
+["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5],
+["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"],
+["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"],
+["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"],
+["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6],
+["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"],
+["d440","訞",31,"訿",8,"詉",21],
+["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"],
+["d540","誁",7,"誋",7,"誔",46],
+["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"],
+["d640","諤",34,"謈",27],
+["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"],
+["d740","譆",31,"譧",4,"譭",25],
+["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"],
+["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"],
+["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"],
+["d940","貮",62],
+["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"],
+["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"],
+["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"],
+["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"],
+["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"],
+["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7],
+["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"],
+["dd40","軥",62],
+["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"],
+["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"],
+["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"],
+["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"],
+["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"],
+["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"],
+["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"],
+["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"],
+["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"],
+["e240","釦",62],
+["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"],
+["e340","鉆",45,"鉵",16],
+["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"],
+["e440","銨",5,"銯",24,"鋉",31],
+["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"],
+["e540","錊",51,"錿",10],
+["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"],
+["e640","鍬",34,"鎐",27],
+["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"],
+["e740","鏎",7,"鏗",54],
+["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"],
+["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"],
+["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"],
+["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42],
+["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"],
+["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"],
+["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"],
+["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"],
+["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"],
+["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7],
+["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"],
+["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46],
+["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"],
+["ee40","頏",62],
+["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"],
+["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4],
+["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"],
+["f040","餈",4,"餎餏餑",28,"餯",26],
+["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"],
+["f140","馌馎馚",10,"馦馧馩",47],
+["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"],
+["f240","駺",62],
+["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"],
+["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"],
+["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"],
+["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5],
+["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"],
+["f540","魼",62],
+["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"],
+["f640","鯜",62],
+["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"],
+["f740","鰼",62],
+["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"],
+["f840","鳣",62],
+["f880","鴢",32],
+["f940","鵃",62],
+["f980","鶂",32],
+["fa40","鶣",62],
+["fa80","鷢",32],
+["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"],
+["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"],
+["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6],
+["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"],
+["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38],
+["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"],
+["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]
+]
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp949.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp949.json
new file mode 100644
index 0000000..2022a00
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp949.json
@@ -0,0 +1,273 @@
+[
+["0","\u0000",127],
+["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"],
+["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"],
+["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"],
+["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5],
+["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"],
+["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18],
+["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7],
+["8361","긝",18,"긲긳긵긶긹긻긼"],
+["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8],
+["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8],
+["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18],
+["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"],
+["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4],
+["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"],
+["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"],
+["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"],
+["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10],
+["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"],
+["8741","놞",9,"놩",15],
+["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"],
+["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4],
+["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4],
+["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"],
+["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"],
+["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"],
+["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"],
+["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15],
+["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"],
+["8a61","둧",4,"둭",18,"뒁뒂"],
+["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"],
+["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"],
+["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8],
+["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18],
+["8c41","똀",15,"똒똓똕똖똗똙",4],
+["8c61","똞",6,"똦",5,"똭",6,"똵",5],
+["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16],
+["8d41","뛃",16,"뛕",8],
+["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"],
+["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"],
+["8e41","랟랡",6,"랪랮",5,"랶랷랹",8],
+["8e61","럂",4,"럈럊",19],
+["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7],
+["8f41","뢅",7,"뢎",17],
+["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4],
+["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5],
+["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"],
+["9061","륾",5,"릆릈릋릌릏",15],
+["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"],
+["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5],
+["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5],
+["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6],
+["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"],
+["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4],
+["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"],
+["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"],
+["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8],
+["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"],
+["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8],
+["9461","봞",5,"봥",6,"봭",12],
+["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24],
+["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"],
+["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"],
+["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14],
+["9641","뺸",23,"뻒뻓"],
+["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8],
+["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44],
+["9741","뾃",16,"뾕",8],
+["9761","뾞",17,"뾱",7],
+["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"],
+["9841","쁀",16,"쁒",5,"쁙쁚쁛"],
+["9861","쁝쁞쁟쁡",6,"쁪",15],
+["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"],
+["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"],
+["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"],
+["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"],
+["9a41","숤숥숦숧숪숬숮숰숳숵",16],
+["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"],
+["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"],
+["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8],
+["9b61","쌳",17,"썆",7],
+["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"],
+["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5],
+["9c61","쏿",8,"쐉",6,"쐑",9],
+["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12],
+["9d41","쒪",13,"쒹쒺쒻쒽",8],
+["9d61","쓆",25],
+["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"],
+["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"],
+["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"],
+["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"],
+["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"],
+["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"],
+["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"],
+["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"],
+["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13],
+["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"],
+["a141","좥좦좧좩",18,"좾좿죀죁"],
+["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"],
+["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"],
+["a241","줐줒",5,"줙",18],
+["a261","줭",6,"줵",18],
+["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"],
+["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"],
+["a361","즑",6,"즚즜즞",16],
+["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"],
+["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"],
+["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12],
+["a481","쨦쨧쨨쨪",28,"ㄱ",93],
+["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"],
+["a561","쩫",17,"쩾",5,"쪅쪆"],
+["a581","쪇",16,"쪙",14,"ⅰ",9],
+["a5b0","Ⅰ",9],
+["a5c1","Α",16,"Σ",6],
+["a5e1","α",16,"σ",6],
+["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"],
+["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6],
+["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7],
+["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7],
+["a761","쬪",22,"쭂쭃쭄"],
+["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"],
+["a841","쭭",10,"쭺",14],
+["a861","쮉",18,"쮝",6],
+["a881","쮤",19,"쮹",11,"ÆЪĦ"],
+["a8a6","IJ"],
+["a8a8","ĿŁØŒºÞŦŊ"],
+["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"],
+["a941","쯅",14,"쯕",10],
+["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18],
+["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"],
+["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"],
+["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"],
+["aa81","챳챴챶",29,"ぁ",82],
+["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"],
+["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5],
+["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85],
+["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"],
+["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4],
+["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25],
+["acd1","а",5,"ёж",25],
+["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7],
+["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"],
+["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"],
+["ae41","췆",5,"췍췎췏췑",16],
+["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4],
+["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"],
+["af41","츬츭츮츯츲츴츶",19],
+["af61","칊",13,"칚칛칝칞칢",5,"칪칬"],
+["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"],
+["b041","캚",5,"캢캦",5,"캮",12],
+["b061","캻",5,"컂",19],
+["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"],
+["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"],
+["b161","켥",6,"켮켲",5,"켹",11],
+["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"],
+["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"],
+["b261","쾎",18,"쾢",5,"쾩"],
+["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"],
+["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"],
+["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5],
+["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"],
+["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5],
+["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"],
+["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"],
+["b541","킕",14,"킦킧킩킪킫킭",5],
+["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4],
+["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"],
+["b641","턅",7,"턎",17],
+["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"],
+["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"],
+["b741","텮",13,"텽",6,"톅톆톇톉톊"],
+["b761","톋",20,"톢톣톥톦톧"],
+["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"],
+["b841","퇐",7,"퇙",17],
+["b861","퇫",8,"퇵퇶퇷퇹",13],
+["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"],
+["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"],
+["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"],
+["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"],
+["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"],
+["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5],
+["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"],
+["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"],
+["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"],
+["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"],
+["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"],
+["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"],
+["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"],
+["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"],
+["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13],
+["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"],
+["be41","퐸",7,"푁푂푃푅",14],
+["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"],
+["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"],
+["bf41","풞",10,"풪",14],
+["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"],
+["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"],
+["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5],
+["c061","픞",25],
+["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"],
+["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"],
+["c161","햌햍햎햏햑",19,"햦햧"],
+["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"],
+["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"],
+["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"],
+["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"],
+["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4],
+["c361","홢",4,"홨홪",5,"홲홳홵",11],
+["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"],
+["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"],
+["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4],
+["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"],
+["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"],
+["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4],
+["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"],
+["c641","힍힎힏힑",6,"힚힜힞",5],
+["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"],
+["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"],
+["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"],
+["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"],
+["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"],
+["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"],
+["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"],
+["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"],
+["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"],
+["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"],
+["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"],
+["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"],
+["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"],
+["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"],
+["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"],
+["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"],
+["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"],
+["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"],
+["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"],
+["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"],
+["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"],
+["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"],
+["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"],
+["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"],
+["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"],
+["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"],
+["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"],
+["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"],
+["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"],
+["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"],
+["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"],
+["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"],
+["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"],
+["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"],
+["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"],
+["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"],
+["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"],
+["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"],
+["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"],
+["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"],
+["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"],
+["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"],
+["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"],
+["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"],
+["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"],
+["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"],
+["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"],
+["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"],
+["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"],
+["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"],
+["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"],
+["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"],
+["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"],
+["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"],
+["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"]
+]
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp950.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp950.json
new file mode 100644
index 0000000..d8bc871
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp950.json
@@ -0,0 +1,177 @@
+[
+["0","\u0000",127],
+["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"],
+["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"],
+["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"],
+["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21],
+["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10],
+["a3a1","ㄐ",25,"˙ˉˊˇˋ"],
+["a3e1","€"],
+["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"],
+["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"],
+["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"],
+["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"],
+["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"],
+["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"],
+["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"],
+["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"],
+["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"],
+["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"],
+["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"],
+["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"],
+["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"],
+["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"],
+["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"],
+["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"],
+["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"],
+["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"],
+["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"],
+["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"],
+["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"],
+["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"],
+["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"],
+["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"],
+["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"],
+["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"],
+["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"],
+["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"],
+["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"],
+["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"],
+["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"],
+["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"],
+["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"],
+["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"],
+["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"],
+["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"],
+["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"],
+["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"],
+["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"],
+["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"],
+["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"],
+["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"],
+["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"],
+["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"],
+["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"],
+["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"],
+["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"],
+["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"],
+["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"],
+["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"],
+["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"],
+["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"],
+["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"],
+["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"],
+["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"],
+["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"],
+["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"],
+["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"],
+["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"],
+["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"],
+["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"],
+["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"],
+["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"],
+["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"],
+["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"],
+["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"],
+["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"],
+["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"],
+["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"],
+["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"],
+["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"],
+["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"],
+["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"],
+["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"],
+["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"],
+["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"],
+["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"],
+["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"],
+["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"],
+["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"],
+["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"],
+["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"],
+["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"],
+["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"],
+["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"],
+["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"],
+["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"],
+["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"],
+["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"],
+["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"],
+["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"],
+["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"],
+["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"],
+["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"],
+["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"],
+["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"],
+["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"],
+["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"],
+["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"],
+["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"],
+["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"],
+["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"],
+["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"],
+["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"],
+["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"],
+["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"],
+["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"],
+["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"],
+["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"],
+["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"],
+["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"],
+["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"],
+["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"],
+["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"],
+["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"],
+["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"],
+["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"],
+["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"],
+["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"],
+["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"],
+["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"],
+["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"],
+["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"],
+["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"],
+["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"],
+["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"],
+["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"],
+["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"],
+["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"],
+["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"],
+["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"],
+["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"],
+["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"],
+["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"],
+["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"],
+["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"],
+["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"],
+["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"],
+["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"],
+["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"],
+["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"],
+["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"],
+["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"],
+["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"],
+["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"],
+["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"],
+["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"],
+["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"],
+["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"],
+["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"],
+["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"],
+["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"],
+["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"],
+["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"],
+["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"],
+["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"],
+["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"],
+["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"],
+["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"],
+["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"],
+["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"],
+["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"],
+["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"],
+["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"],
+["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"],
+["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"],
+["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"]
+]
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/eucjp.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/eucjp.json
new file mode 100644
index 0000000..4fa61ca
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/eucjp.json
@@ -0,0 +1,182 @@
+[
+["0","\u0000",127],
+["8ea1","。",62],
+["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"],
+["a2a1","◆□■△▲▽▼※〒→←↑↓〓"],
+["a2ba","∈∋⊆⊇⊂⊃∪∩"],
+["a2ca","∧∨¬⇒⇔∀∃"],
+["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],
+["a2f2","ʼn♯♭♪†‡¶"],
+["a2fe","◯"],
+["a3b0","0",9],
+["a3c1","A",25],
+["a3e1","a",25],
+["a4a1","ぁ",82],
+["a5a1","ァ",85],
+["a6a1","Α",16,"Σ",6],
+["a6c1","α",16,"σ",6],
+["a7a1","А",5,"ЁЖ",25],
+["a7d1","а",5,"ёж",25],
+["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],
+["ada1","①",19,"Ⅰ",9],
+["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],
+["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],
+["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],
+["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"],
+["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],
+["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"],
+["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],
+["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"],
+["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],
+["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"],
+["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],
+["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"],
+["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],
+["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"],
+["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],
+["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"],
+["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],
+["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"],
+["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],
+["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"],
+["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],
+["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"],
+["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],
+["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"],
+["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],
+["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"],
+["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],
+["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"],
+["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],
+["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"],
+["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],
+["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"],
+["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],
+["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],
+["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],
+["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"],
+["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],
+["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"],
+["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],
+["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"],
+["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],
+["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"],
+["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],
+["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"],
+["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],
+["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"],
+["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],
+["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"],
+["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],
+["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"],
+["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],
+["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"],
+["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],
+["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"],
+["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],
+["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"],
+["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],
+["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"],
+["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],
+["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"],
+["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],
+["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"],
+["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],
+["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"],
+["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],
+["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"],
+["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],
+["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"],
+["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],
+["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"],
+["f4a1","堯槇遙瑤凜熙"],
+["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"],
+["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],
+["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"],
+["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],
+["fcf1","ⅰ",9,"¬¦'""],
+["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"],
+["8fa2c2","¡¦¿"],
+["8fa2eb","ºª©®™¤№"],
+["8fa6e1","ΆΈΉΊΪ"],
+["8fa6e7","Ό"],
+["8fa6e9","ΎΫ"],
+["8fa6ec","Ώ"],
+["8fa6f1","άέήίϊΐόςύϋΰώ"],
+["8fa7c2","Ђ",10,"ЎЏ"],
+["8fa7f2","ђ",10,"ўџ"],
+["8fa9a1","ÆĐ"],
+["8fa9a4","Ħ"],
+["8fa9a6","IJ"],
+["8fa9a8","ŁĿ"],
+["8fa9ab","ŊØŒ"],
+["8fa9af","ŦÞ"],
+["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"],
+["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"],
+["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"],
+["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"],
+["8fabbd","ġĥíìïîǐ"],
+["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"],
+["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"],
+["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"],
+["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"],
+["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"],
+["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"],
+["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"],
+["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"],
+["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"],
+["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"],
+["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"],
+["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"],
+["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"],
+["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"],
+["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"],
+["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"],
+["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"],
+["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"],
+["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"],
+["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"],
+["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"],
+["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"],
+["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"],
+["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"],
+["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"],
+["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"],
+["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"],
+["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"],
+["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"],
+["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"],
+["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"],
+["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"],
+["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"],
+["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"],
+["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"],
+["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5],
+["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"],
+["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"],
+["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"],
+["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"],
+["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"],
+["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"],
+["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"],
+["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"],
+["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"],
+["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"],
+["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"],
+["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"],
+["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"],
+["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"],
+["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"],
+["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"],
+["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"],
+["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"],
+["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"],
+["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"],
+["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"],
+["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"],
+["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4],
+["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"],
+["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"],
+["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"],
+["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"]
+]
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json
new file mode 100644
index 0000000..85c6934
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json
@@ -0,0 +1 @@
+{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gbk-added.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gbk-added.json
new file mode 100644
index 0000000..8abfa9f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gbk-added.json
@@ -0,0 +1,55 @@
+[
+["a140","",62],
+["a180","",32],
+["a240","",62],
+["a280","",32],
+["a2ab","",5],
+["a2e3","€"],
+["a2ef",""],
+["a2fd",""],
+["a340","",62],
+["a380","",31," "],
+["a440","",62],
+["a480","",32],
+["a4f4","",10],
+["a540","",62],
+["a580","",32],
+["a5f7","",7],
+["a640","",62],
+["a680","",32],
+["a6b9","",7],
+["a6d9","",6],
+["a6ec",""],
+["a6f3",""],
+["a6f6","",8],
+["a740","",62],
+["a780","",32],
+["a7c2","",14],
+["a7f2","",12],
+["a896","",10],
+["a8bc",""],
+["a8bf","ǹ"],
+["a8c1",""],
+["a8ea","",20],
+["a958",""],
+["a95b",""],
+["a95d",""],
+["a989","〾⿰",11],
+["a997","",12],
+["a9f0","",14],
+["aaa1","",93],
+["aba1","",93],
+["aca1","",93],
+["ada1","",93],
+["aea1","",93],
+["afa1","",93],
+["d7fa","",4],
+["f8a1","",93],
+["f9a1","",93],
+["faa1","",93],
+["fba1","",93],
+["fca1","",93],
+["fda1","",93],
+["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"],
+["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93]
+]
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/shiftjis.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/shiftjis.json
new file mode 100644
index 0000000..5a3a43c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/shiftjis.json
@@ -0,0 +1,125 @@
+[
+["0","\u0000",128],
+["a1","。",62],
+["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"],
+["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"],
+["81b8","∈∋⊆⊇⊂⊃∪∩"],
+["81c8","∧∨¬⇒⇔∀∃"],
+["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],
+["81f0","ʼn♯♭♪†‡¶"],
+["81fc","◯"],
+["824f","0",9],
+["8260","A",25],
+["8281","a",25],
+["829f","ぁ",82],
+["8340","ァ",62],
+["8380","ム",22],
+["839f","Α",16,"Σ",6],
+["83bf","α",16,"σ",6],
+["8440","А",5,"ЁЖ",25],
+["8470","а",5,"ёж",7],
+["8480","о",17],
+["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],
+["8740","①",19,"Ⅰ",9],
+["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],
+["877e","㍻"],
+["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],
+["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],
+["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"],
+["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],
+["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"],
+["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],
+["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"],
+["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],
+["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"],
+["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],
+["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"],
+["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],
+["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"],
+["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],
+["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"],
+["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],
+["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"],
+["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],
+["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"],
+["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],
+["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"],
+["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],
+["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"],
+["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],
+["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"],
+["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],
+["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"],
+["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],
+["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"],
+["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],
+["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"],
+["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],
+["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],
+["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],
+["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"],
+["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],
+["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"],
+["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],
+["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"],
+["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],
+["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"],
+["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],
+["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"],
+["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],
+["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"],
+["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],
+["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"],
+["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],
+["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"],
+["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],
+["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"],
+["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],
+["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"],
+["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],
+["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"],
+["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],
+["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"],
+["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],
+["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"],
+["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],
+["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"],
+["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],
+["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"],
+["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],
+["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"],
+["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],
+["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"],
+["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],
+["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"],
+["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"],
+["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"],
+["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],
+["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"],
+["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],
+["eeef","ⅰ",9,"¬¦'""],
+["f040","",62],
+["f080","",124],
+["f140","",62],
+["f180","",124],
+["f240","",62],
+["f280","",124],
+["f340","",62],
+["f380","",124],
+["f440","",62],
+["f480","",124],
+["f540","",62],
+["f580","",124],
+["f640","",62],
+["f680","",124],
+["f740","",62],
+["f780","",124],
+["f840","",62],
+["f880","",124],
+["f940",""],
+["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"],
+["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"],
+["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"],
+["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"],
+["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"]
+]
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/utf16.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/utf16.js
new file mode 100644
index 0000000..4cd425d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/utf16.js
@@ -0,0 +1,202 @@
+
+
+// == UTF16-BE codec. ==========================================================
+
+exports.utf16be = function(options) {
+ return {
+ encoder: utf16beEncoder,
+ decoder: utf16beDecoder,
+
+ bom: new Buffer([0xFE, 0xFF]),
+ };
+};
+
+
+// -- Encoding
+
+function utf16beEncoder(options) {
+ return {
+ write: utf16beEncoderWrite,
+ end: function() {},
+ }
+}
+
+function utf16beEncoderWrite(str) {
+ var buf = new Buffer(str, 'ucs2');
+ for (var i = 0; i < buf.length; i += 2) {
+ var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp;
+ }
+ return buf;
+}
+
+
+// -- Decoding
+
+function utf16beDecoder(options) {
+ return {
+ write: utf16beDecoderWrite,
+ end: function() {},
+
+ overflowByte: -1,
+ };
+}
+
+function utf16beDecoderWrite(buf) {
+ if (buf.length == 0)
+ return '';
+
+ var buf2 = new Buffer(buf.length + 1),
+ i = 0, j = 0;
+
+ if (this.overflowByte !== -1) {
+ buf2[0] = buf[0];
+ buf2[1] = this.overflowByte;
+ i = 1; j = 2;
+ }
+
+ for (; i < buf.length-1; i += 2, j+= 2) {
+ buf2[j] = buf[i+1];
+ buf2[j+1] = buf[i];
+ }
+
+ this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1;
+
+ return buf2.slice(0, j).toString('ucs2');
+}
+
+
+// == UTF-16 codec =============================================================
+// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic.
+// Defaults to UTF-16BE, according to RFC 2781, although it is against some industry practices, see
+// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le
+// Decoder default can be changed: iconv.decode(buf, 'utf16', {default: 'utf-16le'});
+
+// Encoder prepends BOM and uses UTF-16BE.
+// Endianness can also be changed: iconv.encode(str, 'utf16', {use: 'utf-16le'});
+
+exports.utf16 = function(options) {
+ return {
+ encoder: utf16Encoder,
+ decoder: utf16Decoder,
+
+ getCodec: options.iconv.getCodec,
+ };
+};
+
+// -- Encoding
+
+function utf16Encoder(options) {
+ options = options || {};
+ var codec = this.getCodec(options.use || 'utf-16be');
+ if (!codec.bom)
+ throw new Error("iconv-lite: in UTF-16 encoder, 'use' parameter should be either UTF-16BE or UTF16-LE.");
+
+ return {
+ write: utf16EncoderWrite,
+ end: utf16EncoderEnd,
+
+ bom: codec.bom,
+ internalEncoder: codec.encoder(options),
+ };
+}
+
+function utf16EncoderWrite(str) {
+ var buf = this.internalEncoder.write(str);
+
+ if (this.bom) {
+ buf = Buffer.concat([this.bom, buf]);
+ this.bom = null;
+ }
+
+ return buf;
+}
+
+function utf16EncoderEnd() {
+ return this.internalEncoder.end();
+}
+
+
+// -- Decoding
+
+function utf16Decoder(options) {
+ return {
+ write: utf16DecoderWrite,
+ end: utf16DecoderEnd,
+
+ internalDecoder: null,
+ initialBytes: [],
+ initialBytesLen: 0,
+
+ options: options || {},
+ getCodec: this.getCodec,
+ };
+}
+
+function utf16DecoderWrite(buf) {
+ if (this.internalDecoder)
+ return this.internalDecoder.write(buf);
+
+ // Codec is not chosen yet. Accumulate initial bytes.
+ this.initialBytes.push(buf);
+ this.initialBytesLen += buf.length;
+
+ if (this.initialBytesLen < 16) // We need > 2 bytes to use space heuristic (see below)
+ return '';
+
+ // We have enough bytes -> decide endianness.
+ return utf16DecoderDecideEndianness.call(this);
+}
+
+function utf16DecoderEnd() {
+ if (this.internalDecoder)
+ return this.internalDecoder.end();
+
+ var res = utf16DecoderDecideEndianness.call(this);
+ var trail;
+
+ if (this.internalDecoder)
+ trail = this.internalDecoder.end();
+
+ return (trail && trail.length > 0) ? (res + trail) : res;
+}
+
+function utf16DecoderDecideEndianness() {
+ var buf = Buffer.concat(this.initialBytes);
+ this.initialBytes.length = this.initialBytesLen = 0;
+
+ if (buf.length < 2)
+ return ''; // Not a valid UTF-16 sequence anyway.
+
+ // Default encoding.
+ var enc = this.options.default || 'utf-16be';
+
+ // Check BOM.
+ if (buf[0] == 0xFE && buf[1] == 0xFF) { // UTF-16BE BOM
+ enc = 'utf-16be'; buf = buf.slice(2);
+ }
+ else if (buf[0] == 0xFF && buf[1] == 0xFE) { // UTF-16LE BOM
+ enc = 'utf-16le'; buf = buf.slice(2);
+ }
+ else {
+ // No BOM found. Try to deduce encoding from initial content.
+ // Most of the time, the content has spaces (U+0020), but the opposite (U+2000) is very uncommon.
+ // So, we count spaces as if it was LE or BE, and decide from that.
+ var spaces = [0, 0], // Counts of space chars in both positions
+ _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even.
+
+ for (var i = 0; i < _len; i += 2) {
+ if (buf[i] == 0x00 && buf[i+1] == 0x20) spaces[0]++;
+ if (buf[i] == 0x20 && buf[i+1] == 0x00) spaces[1]++;
+ }
+
+ if (spaces[0] > 0 && spaces[1] == 0)
+ enc = 'utf-16be';
+ else if (spaces[0] == 0 && spaces[1] > 0)
+ enc = 'utf-16le';
+ }
+
+ this.internalDecoder = this.getCodec(enc).decoder(this.options);
+ return this.internalDecoder.write(buf);
+}
+
+
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/utf7.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/utf7.js
new file mode 100644
index 0000000..cd284f7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/encodings/utf7.js
@@ -0,0 +1,286 @@
+
+// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152
+// Below is UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3
+
+exports.utf7 = function(options) {
+ return {
+ encoder: function utf7Encoder() {
+ return {
+ write: utf7EncoderWrite,
+ end: function() {},
+
+ iconv: options.iconv,
+ };
+ },
+ decoder: function utf7Decoder() {
+ return {
+ write: utf7DecoderWrite,
+ end: utf7DecoderEnd,
+
+ iconv: options.iconv,
+ inBase64: false,
+ base64Accum: '',
+ };
+ },
+ };
+};
+
+
+var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;
+
+// Direct: \n, \r, \t, 0x20, 0x27-0x29, (0x2B), 0x2C-0x3A, 0x3F, 0x41-0x5A, 0x61-0x7A
+
+function utf7EncoderWrite(str) {
+ // Naive implementation.
+ // Non-direct chars are encoded as "+<base64>-"; single "+" char is encoded as "+-".
+ return new Buffer(str.replace(nonDirectChars, function(chunk) {
+ return "+" + (chunk === '+' ? '' :
+ this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, ''))
+ + "-";
+ }.bind(this)));
+}
+
+
+var base64Regex = /[A-Za-z0-9\/+]/;
+var base64Chars = [];
+for (var i = 0; i < 256; i++)
+ base64Chars[i] = base64Regex.test(String.fromCharCode(i));
+
+var plusChar = '+'.charCodeAt(0),
+ minusChar = '-'.charCodeAt(0),
+ andChar = '&'.charCodeAt(0);
+
+function utf7DecoderWrite(buf) {
+ var res = "", lastI = 0,
+ inBase64 = this.inBase64,
+ base64Accum = this.base64Accum;
+
+ // The decoder is more involved as we must handle chunks in stream.
+
+ for (var i = 0; i < buf.length; i++) {
+ if (!inBase64) { // We're in direct mode.
+ // Write direct chars until '+'
+ if (buf[i] == plusChar) {
+ res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
+ lastI = i+1;
+ inBase64 = true;
+ }
+ } else { // We decode base64.
+ if (!base64Chars[buf[i]]) { // Base64 ended.
+ if (i == lastI && buf[i] == minusChar) {// "+-" -> "+"
+ res += "+";
+ } else {
+ var b64str = base64Accum + buf.slice(lastI, i).toString();
+ res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
+ }
+
+ if (buf[i] != minusChar) // Minus is absorbed after base64.
+ i--;
+
+ lastI = i+1;
+ inBase64 = false;
+ base64Accum = '';
+ }
+ }
+ }
+
+ if (!inBase64) {
+ res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
+ } else {
+ var b64str = base64Accum + buf.slice(lastI).toString();
+
+ var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
+ base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
+ b64str = b64str.slice(0, canBeDecoded);
+
+ res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
+ }
+
+ this.inBase64 = inBase64;
+ this.base64Accum = base64Accum;
+
+ return res;
+}
+
+function utf7DecoderEnd() {
+ var res = "";
+ if (this.inBase64 && this.base64Accum.length > 0)
+ res = this.iconv.decode(new Buffer(this.base64Accum, 'base64'), "utf16-be");
+
+ this.inBase64 = false;
+ this.base64Accum = '';
+ return res;
+}
+
+
+// UTF-7-IMAP codec.
+// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3)
+// Differences:
+// * Base64 part is started by "&" instead of "+"
+// * Direct characters are 0x20-0x7E, except "&" (0x26)
+// * In Base64, "," is used instead of "/"
+// * Base64 must not be used to represent direct characters.
+// * No implicit shift back from Base64 (should always end with '-')
+// * String must end in non-shifted position.
+// * "-&" while in base64 is not allowed.
+
+
+exports.utf7imap = function(options) {
+ return {
+ encoder: function utf7ImapEncoder() {
+ return {
+ write: utf7ImapEncoderWrite,
+ end: utf7ImapEncoderEnd,
+
+ iconv: options.iconv,
+ inBase64: false,
+ base64Accum: new Buffer(6),
+ base64AccumIdx: 0,
+ };
+ },
+ decoder: function utf7ImapDecoder() {
+ return {
+ write: utf7ImapDecoderWrite,
+ end: utf7ImapDecoderEnd,
+
+ iconv: options.iconv,
+ inBase64: false,
+ base64Accum: '',
+ };
+ },
+ };
+};
+
+
+function utf7ImapEncoderWrite(str) {
+ var inBase64 = this.inBase64,
+ base64Accum = this.base64Accum,
+ base64AccumIdx = this.base64AccumIdx,
+ buf = new Buffer(str.length*5 + 10), bufIdx = 0;
+
+ for (var i = 0; i < str.length; i++) {
+ var uChar = str.charCodeAt(i);
+ if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'.
+ if (inBase64) {
+ if (base64AccumIdx > 0) {
+ bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
+ base64AccumIdx = 0;
+ }
+
+ buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
+ inBase64 = false;
+ }
+
+ if (!inBase64) {
+ buf[bufIdx++] = uChar; // Write direct character
+
+ if (uChar === andChar) // Ampersand -> '&-'
+ buf[bufIdx++] = minusChar;
+ }
+
+ } else { // Non-direct character
+ if (!inBase64) {
+ buf[bufIdx++] = andChar; // Write '&', then go to base64 mode.
+ inBase64 = true;
+ }
+ if (inBase64) {
+ base64Accum[base64AccumIdx++] = uChar >> 8;
+ base64Accum[base64AccumIdx++] = uChar & 0xFF;
+
+ if (base64AccumIdx == base64Accum.length) {
+ bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx);
+ base64AccumIdx = 0;
+ }
+ }
+ }
+ }
+
+ this.inBase64 = inBase64;
+ this.base64AccumIdx = base64AccumIdx;
+
+ return buf.slice(0, bufIdx);
+}
+
+function utf7ImapEncoderEnd() {
+ var buf = new Buffer(10), bufIdx = 0;
+ if (this.inBase64) {
+ if (this.base64AccumIdx > 0) {
+ bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
+ this.base64AccumIdx = 0;
+ }
+
+ buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
+ this.inBase64 = false;
+ }
+
+ return buf.slice(0, bufIdx);
+}
+
+
+var base64IMAPChars = base64Chars.slice();
+base64IMAPChars[','.charCodeAt(0)] = true;
+
+function utf7ImapDecoderWrite(buf) {
+ var res = "", lastI = 0,
+ inBase64 = this.inBase64,
+ base64Accum = this.base64Accum;
+
+ // The decoder is more involved as we must handle chunks in stream.
+ // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end).
+
+ for (var i = 0; i < buf.length; i++) {
+ if (!inBase64) { // We're in direct mode.
+ // Write direct chars until '&'
+ if (buf[i] == andChar) {
+ res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
+ lastI = i+1;
+ inBase64 = true;
+ }
+ } else { // We decode base64.
+ if (!base64IMAPChars[buf[i]]) { // Base64 ended.
+ if (i == lastI && buf[i] == minusChar) { // "&-" -> "&"
+ res += "&";
+ } else {
+ var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/');
+ res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
+ }
+
+ if (buf[i] != minusChar) // Minus may be absorbed after base64.
+ i--;
+
+ lastI = i+1;
+ inBase64 = false;
+ base64Accum = '';
+ }
+ }
+ }
+
+ if (!inBase64) {
+ res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
+ } else {
+ var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/');
+
+ var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
+ base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
+ b64str = b64str.slice(0, canBeDecoded);
+
+ res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
+ }
+
+ this.inBase64 = inBase64;
+ this.base64Accum = base64Accum;
+
+ return res;
+}
+
+function utf7ImapDecoderEnd() {
+ var res = "";
+ if (this.inBase64 && this.base64Accum.length > 0)
+ res = this.iconv.decode(new Buffer(this.base64Accum, 'base64'), "utf16-be");
+
+ this.inBase64 = false;
+ this.base64Accum = '';
+ return res;
+}
+
+
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/lib/extend-node.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/lib/extend-node.js
new file mode 100644
index 0000000..000cee2
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/lib/extend-node.js
@@ -0,0 +1,210 @@
+
+// == Extend Node primitives to use iconv-lite =================================
+
+module.exports = function (iconv) {
+ var original = undefined; // Place to keep original methods.
+
+ iconv.extendNodeEncodings = function extendNodeEncodings() {
+ if (original) return;
+ original = {};
+
+ var nodeNativeEncodings = {
+ 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true,
+ 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true,
+ };
+
+ Buffer.isNativeEncoding = function(enc) {
+ return nodeNativeEncodings[enc && enc.toLowerCase()];
+ }
+
+ // -- SlowBuffer -----------------------------------------------------------
+ var SlowBuffer = require('buffer').SlowBuffer;
+
+ original.SlowBufferToString = SlowBuffer.prototype.toString;
+ SlowBuffer.prototype.toString = function(encoding, start, end) {
+ encoding = String(encoding || 'utf8').toLowerCase();
+ start = +start || 0;
+ if (typeof end !== 'number') end = this.length;
+
+ // Fastpath empty strings
+ if (+end == start)
+ return '';
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.SlowBufferToString.call(this, encoding, start, end);
+
+ // Otherwise, use our decoding method.
+ if (typeof start == 'undefined') start = 0;
+ if (typeof end == 'undefined') end = this.length;
+ return iconv.decode(this.slice(start, end), encoding);
+ }
+
+ original.SlowBufferWrite = SlowBuffer.prototype.write;
+ SlowBuffer.prototype.write = function(string, offset, length, encoding) {
+ // Support both (string, offset, length, encoding)
+ // and the legacy (string, encoding, offset, length)
+ if (isFinite(offset)) {
+ if (!isFinite(length)) {
+ encoding = length;
+ length = undefined;
+ }
+ } else { // legacy
+ var swap = encoding;
+ encoding = offset;
+ offset = length;
+ length = swap;
+ }
+
+ offset = +offset || 0;
+ var remaining = this.length - offset;
+ if (!length) {
+ length = remaining;
+ } else {
+ length = +length;
+ if (length > remaining) {
+ length = remaining;
+ }
+ }
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.SlowBufferWrite.call(this, string, offset, length, encoding);
+
+ if (string.length > 0 && (length < 0 || offset < 0))
+ throw new RangeError('attempt to write beyond buffer bounds');
+
+ // Otherwise, use our encoding method.
+ var buf = iconv.encode(string, encoding);
+ if (buf.length < length) length = buf.length;
+ buf.copy(this, offset, 0, length);
+ return length;
+ }
+
+ // -- Buffer ---------------------------------------------------------------
+
+ original.BufferIsEncoding = Buffer.isEncoding;
+ Buffer.isEncoding = function(encoding) {
+ return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding);
+ }
+
+ original.BufferByteLength = Buffer.byteLength;
+ Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) {
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.BufferByteLength.call(this, str, encoding);
+
+ // Slow, I know, but we don't have a better way yet.
+ return iconv.encode(str, encoding).length;
+ }
+
+ original.BufferToString = Buffer.prototype.toString;
+ Buffer.prototype.toString = function(encoding, start, end) {
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.BufferToString.call(this, encoding, start, end);
+
+ // Otherwise, use our decoding method.
+ if (typeof start == 'undefined') start = 0;
+ if (typeof end == 'undefined') end = this.length;
+ return iconv.decode(this.slice(start, end), encoding);
+ }
+
+ original.BufferWrite = Buffer.prototype.write;
+ Buffer.prototype.write = function(string, offset, length, encoding) {
+ var _offset = offset, _length = length, _encoding = encoding;
+ // Support both (string, offset, length, encoding)
+ // and the legacy (string, encoding, offset, length)
+ if (isFinite(offset)) {
+ if (!isFinite(length)) {
+ encoding = length;
+ length = undefined;
+ }
+ } else { // legacy
+ var swap = encoding;
+ encoding = offset;
+ offset = length;
+ length = swap;
+ }
+
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.BufferWrite.call(this, string, _offset, _length, _encoding);
+
+ offset = +offset || 0;
+ var remaining = this.length - offset;
+ if (!length) {
+ length = remaining;
+ } else {
+ length = +length;
+ if (length > remaining) {
+ length = remaining;
+ }
+ }
+
+ if (string.length > 0 && (length < 0 || offset < 0))
+ throw new RangeError('attempt to write beyond buffer bounds');
+
+ // Otherwise, use our encoding method.
+ var buf = iconv.encode(string, encoding);
+ if (buf.length < length) length = buf.length;
+ buf.copy(this, offset, 0, length);
+ return length;
+
+ // TODO: Set _charsWritten.
+ }
+
+
+ // -- Readable -------------------------------------------------------------
+ if (iconv.supportsStreams) {
+ var Readable = require('stream').Readable;
+
+ original.ReadableSetEncoding = Readable.prototype.setEncoding;
+ Readable.prototype.setEncoding = function setEncoding(enc, options) {
+ // Try to use original function when possible.
+ if (Buffer.isNativeEncoding(enc))
+ return original.ReadableSetEncoding.call(this, enc);
+
+ // Try to use our own decoder, it has the same interface.
+ this._readableState.decoder = iconv.getCodec(enc).decoder(options);
+ this._readableState.encoding = enc;
+ }
+
+ Readable.prototype.collect = iconv._collect;
+ }
+ }
+
+ // Remove iconv-lite Node primitive extensions.
+ iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() {
+ if (!original)
+ throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.")
+
+ delete Buffer.isNativeEncoding;
+
+ var SlowBuffer = require('buffer').SlowBuffer;
+
+ SlowBuffer.prototype.toString = original.SlowBufferToString;
+ SlowBuffer.prototype.write = original.SlowBufferWrite;
+
+ Buffer.isEncoding = original.BufferIsEncoding;
+ Buffer.byteLength = original.BufferByteLength;
+ Buffer.prototype.toString = original.BufferToString;
+ Buffer.prototype.write = original.BufferWrite;
+
+ if (iconv.supportsStreams) {
+ var Readable = require('stream').Readable;
+
+ Readable.prototype.setEncoding = original.ReadableSetEncoding;
+ delete Readable.prototype.collect;
+ }
+
+ original = undefined;
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/lib/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/lib/index.js
new file mode 100644
index 0000000..0775589
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/lib/index.js
@@ -0,0 +1,122 @@
+
+var iconv = module.exports;
+
+// All codecs and aliases are kept here, keyed by encoding name/alias.
+// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`.
+iconv.encodings = null;
+
+// Characters emitted in case of error.
+iconv.defaultCharUnicode = '�';
+iconv.defaultCharSingleByte = '?';
+
+// Public API.
+iconv.encode = function encode(str, encoding, options) {
+ str = "" + (str || ""); // Ensure string.
+
+ var encoder = iconv.getCodec(encoding).encoder(options);
+
+ var res = encoder.write(str);
+ var trail = encoder.end();
+
+ return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res;
+}
+
+iconv.decode = function decode(buf, encoding, options) {
+ if (typeof buf === 'string') {
+ if (!iconv.skipDecodeWarning) {
+ console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding');
+ iconv.skipDecodeWarning = true;
+ }
+
+ buf = new Buffer("" + (buf || ""), "binary"); // Ensure buffer.
+ }
+
+ var decoder = iconv.getCodec(encoding).decoder(options);
+
+ var res = decoder.write(buf);
+ var trail = decoder.end();
+
+ return (trail && trail.length > 0) ? (res + trail) : res;
+}
+
+iconv.encodingExists = function encodingExists(enc) {
+ try {
+ iconv.getCodec(enc);
+ return true;
+ } catch (e) {
+ return false;
+ }
+}
+
+// Legacy aliases to convert functions
+iconv.toEncoding = iconv.encode;
+iconv.fromEncoding = iconv.decode;
+
+// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache.
+iconv._codecDataCache = {};
+iconv.getCodec = function getCodec(encoding) {
+ if (!iconv.encodings)
+ iconv.encodings = require("../encodings"); // Lazy load all encoding definitions.
+
+ // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
+ var enc = (''+encoding).toLowerCase().replace(/[^0-9a-z]|:\d{4}$/g, "");
+
+ // Traverse iconv.encodings to find actual codec.
+ var codecData, codecOptions;
+ while (true) {
+ codecData = iconv._codecDataCache[enc];
+ if (codecData)
+ return codecData;
+
+ var codec = iconv.encodings[enc];
+
+ switch (typeof codec) {
+ case "string": // Direct alias to other encoding.
+ enc = codec;
+ break;
+
+ case "object": // Alias with options. Can be layered.
+ if (!codecOptions) {
+ codecOptions = codec;
+ codecOptions.encodingName = enc;
+ }
+ else {
+ for (var key in codec)
+ codecOptions[key] = codec[key];
+ }
+
+ enc = codec.type;
+ break;
+
+ case "function": // Codec itself.
+ if (!codecOptions)
+ codecOptions = { encodingName: enc };
+ codecOptions.iconv = iconv;
+
+ // The codec function must load all tables and return object with .encoder and .decoder methods.
+ // It'll be called only once (for each different options object).
+ codecData = codec.call(iconv.encodings, codecOptions);
+
+ iconv._codecDataCache[codecOptions.encodingName] = codecData; // Save it to be reused later.
+ return codecData;
+
+ default:
+ throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')");
+ }
+ }
+}
+
+// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json.
+var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node;
+if (nodeVer) {
+
+ // Load streaming support in Node v0.10+
+ var nodeVerArr = nodeVer.split(".").map(Number);
+ if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) {
+ require("./streams")(iconv);
+ }
+
+ // Load Node primitive extensions.
+ require("./extend-node")(iconv);
+}
+
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/lib/streams.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/lib/streams.js
new file mode 100644
index 0000000..0563731
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/lib/streams.js
@@ -0,0 +1,118 @@
+var Transform = require("stream").Transform;
+
+
+// == Exports ==================================================================
+module.exports = function(iconv) {
+
+ // Additional Public API.
+ iconv.encodeStream = function encodeStream(encoding, options) {
+ return new IconvLiteEncoderStream(iconv.getCodec(encoding).encoder(options), options);
+ }
+
+ iconv.decodeStream = function decodeStream(encoding, options) {
+ return new IconvLiteDecoderStream(iconv.getCodec(encoding).decoder(options), options);
+ }
+
+ iconv.supportsStreams = true;
+
+
+ // Not published yet.
+ iconv.IconvLiteEncoderStream = IconvLiteEncoderStream;
+ iconv.IconvLiteDecoderStream = IconvLiteDecoderStream;
+ iconv._collect = IconvLiteDecoderStream.prototype.collect;
+};
+
+
+// == Encoder stream =======================================================
+function IconvLiteEncoderStream(conv, options) {
+ this.conv = conv;
+ options = options || {};
+ options.decodeStrings = false; // We accept only strings, so we don't need to decode them.
+ Transform.call(this, options);
+}
+
+IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, {
+ constructor: { value: IconvLiteEncoderStream }
+});
+
+IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {
+ if (typeof chunk != 'string')
+ return done(new Error("Iconv encoding stream needs strings as its input."));
+ try {
+ var res = this.conv.write(chunk);
+ if (res && res.length) this.push(res);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+}
+
+IconvLiteEncoderStream.prototype._flush = function(done) {
+ try {
+ var res = this.conv.end();
+ if (res && res.length) this.push(res);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+}
+
+IconvLiteEncoderStream.prototype.collect = function(cb) {
+ var chunks = [];
+ this.on('error', cb);
+ this.on('data', function(chunk) { chunks.push(chunk); });
+ this.on('end', function() {
+ cb(null, Buffer.concat(chunks));
+ });
+ return this;
+}
+
+
+// == Decoder stream =======================================================
+function IconvLiteDecoderStream(conv, options) {
+ this.conv = conv;
+ options = options || {};
+ options.encoding = this.encoding = 'utf8'; // We output strings.
+ Transform.call(this, options);
+}
+
+IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, {
+ constructor: { value: IconvLiteDecoderStream }
+});
+
+IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
+ if (!Buffer.isBuffer(chunk))
+ return done(new Error("Iconv decoding stream needs buffers as its input."));
+ try {
+ var res = this.conv.write(chunk);
+ if (res && res.length) this.push(res, this.encoding);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+}
+
+IconvLiteDecoderStream.prototype._flush = function(done) {
+ try {
+ var res = this.conv.end();
+ if (res && res.length) this.push(res, this.encoding);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+}
+
+IconvLiteDecoderStream.prototype.collect = function(cb) {
+ var res = '';
+ this.on('error', cb);
+ this.on('data', function(chunk) { res += chunk; });
+ this.on('end', function() {
+ cb(null, res);
+ });
+ return this;
+}
+
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/package.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/package.json
new file mode 100644
index 0000000..d10ff52
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/iconv-lite/package.json
@@ -0,0 +1,118 @@
+{
+ "name": "iconv-lite",
+ "description": "Convert character encodings in pure javascript.",
+ "version": "0.4.6",
+ "license": "MIT",
+ "keywords": [
+ "iconv",
+ "convert",
+ "charset",
+ "icu"
+ ],
+ "author": {
+ "name": "Alexander Shtuchkin",
+ "email": "ashtuchkin@gmail.com"
+ },
+ "contributors": [
+ {
+ "name": "Jinwu Zhan",
+ "url": "https://github.com/jenkinv"
+ },
+ {
+ "name": "Adamansky Anton",
+ "url": "https://github.com/adamansky"
+ },
+ {
+ "name": "George Stagas",
+ "url": "https://github.com/stagas"
+ },
+ {
+ "name": "Mike D Pilsbury",
+ "url": "https://github.com/pekim"
+ },
+ {
+ "name": "Niggler",
+ "url": "https://github.com/Niggler"
+ },
+ {
+ "name": "wychi",
+ "url": "https://github.com/wychi"
+ },
+ {
+ "name": "David Kuo",
+ "url": "https://github.com/david50407"
+ },
+ {
+ "name": "ChangZhuo Chen",
+ "url": "https://github.com/czchen"
+ },
+ {
+ "name": "Lee Treveil",
+ "url": "https://github.com/leetreveil"
+ },
+ {
+ "name": "Brian White",
+ "url": "https://github.com/mscdex"
+ },
+ {
+ "name": "Mithgol",
+ "url": "https://github.com/Mithgol"
+ },
+ {
+ "name": "Nazar Leush",
+ "url": "https://github.com/nleush"
+ }
+ ],
+ "main": "./lib/index.js",
+ "homepage": "https://github.com/ashtuchkin/iconv-lite",
+ "bugs": {
+ "url": "https://github.com/ashtuchkin/iconv-lite/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/ashtuchkin/iconv-lite.git"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "scripts": {
+ "coverage": "istanbul cover _mocha -- --grep .",
+ "coverage-open": "open coverage/lcov-report/index.html",
+ "test": "mocha --reporter spec --grep ."
+ },
+ "browser": {
+ "./extend-node": false,
+ "./streams": false
+ },
+ "devDependencies": {
+ "mocha": "*",
+ "request": "2.47",
+ "unorm": "*",
+ "errto": "*",
+ "async": "*",
+ "istanbul": "*",
+ "iconv": "~2.1.4"
+ },
+ "gitHead": "920dad2303f7c64d92e771ffd379688e0a0d6fc1",
+ "_id": "iconv-lite@0.4.6",
+ "_shasum": "e39c682610a791f3eedc27382ff49e263f91fa09",
+ "_from": "iconv-lite@0.4.6",
+ "_npmVersion": "2.1.6",
+ "_nodeVersion": "0.10.33",
+ "_npmUser": {
+ "name": "ashtuchkin",
+ "email": "ashtuchkin@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "ashtuchkin",
+ "email": "ashtuchkin@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e39c682610a791f3eedc27382ff49e263f91fa09",
+ "tarball": "http://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.6.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.6.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/HISTORY.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/HISTORY.md
new file mode 100644
index 0000000..62c2003
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/HISTORY.md
@@ -0,0 +1,22 @@
+0.3.0 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+ * Throw error when parameter format invalid on parse
+
+0.2.0 / 2014-06-18
+==================
+
+ * Add `typer.format()` to format media types
+
+0.1.0 / 2014-06-17
+==================
+
+ * Accept `req` as argument to `parse`
+ * Accept `res` as argument to `parse`
+ * Parse media type with extra LWS between type and first parameter
+
+0.0.0 / 2014-06-13
+==================
+
+ * Initial implementation
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/LICENSE b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/README.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/README.md
new file mode 100644
index 0000000..d8df623
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/README.md
@@ -0,0 +1,81 @@
+# media-typer
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Simple RFC 6838 media type parser
+
+## Installation
+
+```sh
+$ npm install media-typer
+```
+
+## API
+
+```js
+var typer = require('media-typer')
+```
+
+### typer.parse(string)
+
+```js
+var obj = typer.parse('image/svg+xml; charset=utf-8')
+```
+
+Parse a media type string. This will return an object with the following
+properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The type of the media type (always lower case). Example: `'image'`
+
+ - `subtype`: The subtype of the media type (always lower case). Example: `'svg'`
+
+ - `suffix`: The suffix of the media type (always lower case). Example: `'xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of parameter always lower case). Example: `{charset: 'utf-8'}`
+
+### typer.parse(req)
+
+```js
+var obj = typer.parse(req)
+```
+
+Parse the `content-type` header from the given `req`. Short-cut for
+`typer.parse(req.headers['content-type'])`.
+
+### typer.parse(res)
+
+```js
+var obj = typer.parse(res)
+```
+
+Parse the `content-type` header set on the given `res`. Short-cut for
+`typer.parse(res.getHeader('content-type'))`.
+
+### typer.format(obj)
+
+```js
+var obj = typer.format({type: 'image', subtype: 'svg', suffix: 'xml'})
+```
+
+Format an object into a media type string. This will return a string of the
+mime type for the given object. For the properties of the object, see the
+documentation for `typer.parse(string)`.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/media-typer.svg?style=flat
+[npm-url]: https://npmjs.org/package/media-typer
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/media-typer.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/media-typer
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/media-typer.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/media-typer
+[downloads-image]: https://img.shields.io/npm/dm/media-typer.svg?style=flat
+[downloads-url]: https://npmjs.org/package/media-typer
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/index.js
new file mode 100644
index 0000000..07f7295
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/index.js
@@ -0,0 +1,270 @@
+/*!
+ * media-typer
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * RegExp to match *( ";" parameter ) in RFC 2616 sec 3.7
+ *
+ * parameter = token "=" ( token | quoted-string )
+ * token = 1*<any CHAR except CTLs or separators>
+ * separators = "(" | ")" | "<" | ">" | "@"
+ * | "," | ";" | ":" | "\" | <">
+ * | "/" | "[" | "]" | "?" | "="
+ * | "{" | "}" | SP | HT
+ * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
+ * qdtext = <any TEXT except <">>
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ * TEXT = <any OCTET except CTLs, but including LWS>
+ * LWS = [CRLF] 1*( SP | HT )
+ * CRLF = CR LF
+ * CR = <US-ASCII CR, carriage return (13)>
+ * LF = <US-ASCII LF, linefeed (10)>
+ * SP = <US-ASCII SP, space (32)>
+ * SHT = <US-ASCII HT, horizontal-tab (9)>
+ * CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
+ * OCTET = <any 8-bit sequence of data>
+ */
+var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g;
+var textRegExp = /^[\u0020-\u007e\u0080-\u00ff]+$/
+var tokenRegExp = /^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/
+
+/**
+ * RegExp to match quoted-pair in RFC 2616
+ *
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ */
+var qescRegExp = /\\([\u0000-\u007f])/g;
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 2616
+ */
+var quoteRegExp = /([\\"])/g;
+
+/**
+ * RegExp to match type in RFC 6838
+ *
+ * type-name = restricted-name
+ * subtype-name = restricted-name
+ * restricted-name = restricted-name-first *126restricted-name-chars
+ * restricted-name-first = ALPHA / DIGIT
+ * restricted-name-chars = ALPHA / DIGIT / "!" / "#" /
+ * "$" / "&" / "-" / "^" / "_"
+ * restricted-name-chars =/ "." ; Characters before first dot always
+ * ; specify a facet name
+ * restricted-name-chars =/ "+" ; Characters after last plus always
+ * ; specify a structured syntax suffix
+ * ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
+ * DIGIT = %x30-39 ; 0-9
+ */
+var subtypeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/
+var typeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/
+var typeRegExp = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;
+
+/**
+ * Module exports.
+ */
+
+exports.format = format
+exports.parse = parse
+
+/**
+ * Format object to media type.
+ *
+ * @param {object} obj
+ * @return {string}
+ * @api public
+ */
+
+function format(obj) {
+ if (!obj || typeof obj !== 'object') {
+ throw new TypeError('argument obj is required')
+ }
+
+ var parameters = obj.parameters
+ var subtype = obj.subtype
+ var suffix = obj.suffix
+ var type = obj.type
+
+ if (!type || !typeNameRegExp.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ if (!subtype || !subtypeNameRegExp.test(subtype)) {
+ throw new TypeError('invalid subtype')
+ }
+
+ // format as type/subtype
+ var string = type + '/' + subtype
+
+ // append +suffix
+ if (suffix) {
+ if (!typeNameRegExp.test(suffix)) {
+ throw new TypeError('invalid suffix')
+ }
+
+ string += '+' + suffix
+ }
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ if (!tokenRegExp.test(param)) {
+ throw new TypeError('invalid parameter name')
+ }
+
+ string += '; ' + param + '=' + qstring(parameters[param])
+ }
+ }
+
+ return string
+}
+
+/**
+ * Parse media type to object.
+ *
+ * @param {string|object} string
+ * @return {Object}
+ * @api public
+ */
+
+function parse(string) {
+ if (!string) {
+ throw new TypeError('argument string is required')
+ }
+
+ // support req/res-like objects as argument
+ if (typeof string === 'object') {
+ string = getcontenttype(string)
+ }
+
+ if (typeof string !== 'string') {
+ throw new TypeError('argument string is required to be a string')
+ }
+
+ var index = string.indexOf(';')
+ var type = index !== -1
+ ? string.substr(0, index)
+ : string
+
+ var key
+ var match
+ var obj = splitType(type)
+ var params = {}
+ var value
+
+ paramRegExp.lastIndex = index
+
+ while (match = paramRegExp.exec(string)) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (value[0] === '"') {
+ // remove quotes and escapes
+ value = value
+ .substr(1, value.length - 2)
+ .replace(qescRegExp, '$1')
+ }
+
+ params[key] = value
+ }
+
+ if (index !== -1 && index !== string.length) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ obj.parameters = params
+
+ return obj
+}
+
+/**
+ * Get content-type from req/res objects.
+ *
+ * @param {object}
+ * @return {Object}
+ * @api private
+ */
+
+function getcontenttype(obj) {
+ if (typeof obj.getHeader === 'function') {
+ // res-like
+ return obj.getHeader('content-type')
+ }
+
+ if (typeof obj.headers === 'object') {
+ // req-like
+ return obj.headers && obj.headers['content-type']
+ }
+}
+
+/**
+ * Quote a string if necessary.
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function qstring(val) {
+ var str = String(val)
+
+ // no need to quote tokens
+ if (tokenRegExp.test(str)) {
+ return str
+ }
+
+ if (str.length > 0 && !textRegExp.test(str)) {
+ throw new TypeError('invalid parameter value')
+ }
+
+ return '"' + str.replace(quoteRegExp, '\\$1') + '"'
+}
+
+/**
+ * Simply "type/subtype+siffx" into parts.
+ *
+ * @param {string} string
+ * @return {Object}
+ * @api private
+ */
+
+function splitType(string) {
+ var match = typeRegExp.exec(string.toLowerCase())
+
+ if (!match) {
+ throw new TypeError('invalid media type')
+ }
+
+ var type = match[1]
+ var subtype = match[2]
+ var suffix
+
+ // suffix after last +
+ var index = subtype.lastIndexOf('+')
+ if (index !== -1) {
+ suffix = subtype.substr(index + 1)
+ subtype = subtype.substr(0, index)
+ }
+
+ var obj = {
+ type: type,
+ subtype: subtype,
+ suffix: suffix
+ }
+
+ return obj
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/package.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/package.json
new file mode 100644
index 0000000..4bd1a51
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/media-typer/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "media-typer",
+ "description": "Simple RFC 6838 media type parser and formatter",
+ "version": "0.3.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/media-typer"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4",
+ "should": "~4.0.4"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "d49d41ffd0bb5a0655fa44a59df2ec0bfc835b16",
+ "bugs": {
+ "url": "https://github.com/jshttp/media-typer/issues"
+ },
+ "homepage": "https://github.com/jshttp/media-typer",
+ "_id": "media-typer@0.3.0",
+ "_shasum": "8710d7af0aa626f8fffa1ce00168545263255748",
+ "_from": "media-typer@0.3.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "8710d7af0aa626f8fffa1ce00168545263255748",
+ "tarball": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/HISTORY.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/HISTORY.md
new file mode 100644
index 0000000..5d1e1c9
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/HISTORY.md
@@ -0,0 +1,76 @@
+2.2.0 / 2014-12-22
+==================
+
+ * Add message object to callback arguments
+
+2.1.1 / 2014-10-22
+==================
+
+ * Fix handling of pipelined requests
+
+2.1.0 / 2014-08-16
+==================
+
+ * Check if `socket` is detached
+ * Return `undefined` for `isFinished` if state unknown
+
+2.0.0 / 2014-08-16
+==================
+
+ * Add `isFinished` function
+ * Move to `jshttp` organization
+ * Remove support for plain socket argument
+ * Rename to `on-finished`
+ * Support both `req` and `res` as arguments
+ * deps: ee-first@1.0.5
+
+1.2.2 / 2014-06-10
+==================
+
+ * Reduce listeners added to emitters
+ - avoids "event emitter leak" warnings when used multiple times on same request
+
+1.2.1 / 2014-06-08
+==================
+
+ * Fix returned value when already finished
+
+1.2.0 / 2014-06-05
+==================
+
+ * Call callback when called on already-finished socket
+
+1.1.4 / 2014-05-27
+==================
+
+ * Support node.js 0.8
+
+1.1.3 / 2014-04-30
+==================
+
+ * Make sure errors passed as instanceof `Error`
+
+1.1.2 / 2014-04-18
+==================
+
+ * Default the `socket` to passed-in object
+
+1.1.1 / 2014-01-16
+==================
+
+ * Rename module to `finished`
+
+1.1.0 / 2013-12-25
+==================
+
+ * Call callback when called on already-errored socket
+
+1.0.1 / 2013-12-20
+==================
+
+ * Actually pass the error to the callback
+
+1.0.0 / 2013-12-20
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/LICENSE b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/LICENSE
new file mode 100644
index 0000000..5931fd2
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/README.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/README.md
new file mode 100644
index 0000000..29d6991
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/README.md
@@ -0,0 +1,109 @@
+# on-finished
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Execute a callback when a request closes, finishes, or errors.
+
+## Install
+
+```sh
+$ npm install on-finished
+```
+
+## API
+
+```js
+var onFinished = require('on-finished')
+```
+
+### onFinished(res, listener)
+
+Attach a listener to listen for the response to finish. The listener will
+be invoked only once when the response finished. If the response finished
+to to an error, the first argument will contain the error. If the response
+has already finished, the listener will be invoked.
+
+Listening to the end of a response would be used to close things associated
+with the response, like open files.
+
+Listener is invoked as `listener(err, res)`.
+
+```js
+onFinished(res, function (err, res) {
+ // clean up open fds, etc.
+ // err contains the error is request error'd
+})
+```
+
+### onFinished(req, listener)
+
+Attach a listener to listen for the request to finish. The listener will
+be invoked only once when the request finished. If the request finished
+to to an error, the first argument will contain the error. If the request
+has already finished, the listener will be invoked.
+
+Listening to the end of a request would be used to know when to continue
+after reading the data.
+
+Listener is invoked as `listener(err, req)`.
+
+```js
+var data = ''
+
+req.setEncoding('utf8')
+res.on('data', function (str) {
+ data += str
+})
+
+onFinished(req, function (err, req) {
+ // data is read unless there is err
+})
+```
+
+### onFinished.isFinished(res)
+
+Determine if `res` is already finished. This would be useful to check and
+not even start certain operations if the response has already finished.
+
+### onFinished.isFinished(req)
+
+Determine if `req` is already finished. This would be useful to check and
+not even start certain operations if the request has already finished.
+
+### Example
+
+The following code ensures that file descriptors are always closed
+once the response finishes.
+
+```js
+var destroy = require('destroy')
+var http = require('http')
+var onFinished = require('on-finished')
+
+http.createServer(function onRequest(req, res) {
+ var stream = fs.createReadStream('package.json')
+ stream.pipe(res)
+ onFinished(res, function (err) {
+ destroy(stream)
+ })
+})
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/on-finished.svg?style=flat
+[npm-url]: https://npmjs.org/package/on-finished
+[node-version-image]: https://img.shields.io/node/v/on-finished.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/on-finished.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/on-finished
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/on-finished.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/on-finished?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/on-finished.svg?style=flat
+[downloads-url]: https://npmjs.org/package/on-finished
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/index.js
new file mode 100644
index 0000000..f68161c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/index.js
@@ -0,0 +1,191 @@
+/*!
+ * on-finished
+ * Copyright(c) 2013 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = onFinished;
+module.exports.isFinished = isFinished;
+
+/**
+* Module dependencies.
+*/
+
+var first = require('ee-first')
+
+/**
+* Variables.
+*/
+
+/* istanbul ignore next */
+var defer = typeof setImmediate === 'function'
+ ? setImmediate
+ : function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) }
+
+/**
+ * Invoke callback when the response has finished, useful for
+ * cleaning up resources afterwards.
+ *
+ * @param {object} msg
+ * @param {function} listener
+ * @return {object}
+ * @api public
+ */
+
+function onFinished(msg, listener) {
+ if (isFinished(msg) !== false) {
+ defer(listener, null, msg)
+ return msg
+ }
+
+ // attach the listener to the message
+ attachListener(msg, listener)
+
+ return msg
+}
+
+/**
+ * Determine if message is already finished.
+ *
+ * @param {object} msg
+ * @return {boolean}
+ * @api public
+ */
+
+function isFinished(msg) {
+ var socket = msg.socket
+
+ if (typeof msg.finished === 'boolean') {
+ // OutgoingMessage
+ return Boolean(msg.finished || (socket && !socket.writable))
+ }
+
+ if (typeof msg.complete === 'boolean') {
+ // IncomingMessage
+ return Boolean(!socket || msg.complete || !socket.readable)
+ }
+
+ // don't know
+ return undefined
+}
+
+/**
+ * Attach a finished listener to the message.
+ *
+ * @param {object} msg
+ * @param {function} callback
+ * @private
+ */
+
+function attachFinishedListener(msg, callback) {
+ var eeMsg
+ var eeSocket
+ var finished = false
+
+ function onFinish(error) {
+ eeMsg.cancel()
+ eeSocket.cancel()
+
+ finished = true
+ callback(error)
+ }
+
+ // finished on first message event
+ eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish)
+
+ function onSocket(socket) {
+ // remove listener
+ msg.removeListener('socket', onSocket)
+
+ if (finished) return
+ if (eeMsg !== eeSocket) return
+
+ // finished on first socket event
+ eeSocket = first([[socket, 'error', 'close']], onFinish)
+ }
+
+ if (msg.socket) {
+ // socket already assigned
+ onSocket(msg.socket)
+ return
+ }
+
+ // wait for socket to be assigned
+ msg.on('socket', onSocket)
+
+ if (msg.socket === undefined) {
+ // node.js 0.8 patch
+ patchAssignSocket(msg, onSocket)
+ }
+}
+
+/**
+ * Attach the listener to the message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @api private
+ */
+
+function attachListener(msg, listener) {
+ var attached = msg.__onFinished
+
+ // create a private single listener with queue
+ if (!attached || !attached.queue) {
+ attached = msg.__onFinished = createListener(msg)
+ attachFinishedListener(msg, attached)
+ }
+
+ attached.queue.push(listener)
+}
+
+/**
+ * Create listener on message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @api private
+ */
+
+function createListener(msg) {
+ function listener(err) {
+ if (msg.__onFinished === listener) msg.__onFinished = null
+ if (!listener.queue) return
+
+ var queue = listener.queue
+ listener.queue = null
+
+ for (var i = 0; i < queue.length; i++) {
+ queue[i](err, msg)
+ }
+ }
+
+ listener.queue = []
+
+ return listener
+}
+
+/**
+ * Patch ServerResponse.prototype.assignSocket for node.js 0.8.
+ *
+ * @param {ServerResponse} res
+ * @param {function} callback
+ * @private
+ */
+
+function patchAssignSocket(res, callback) {
+ var assignSocket = res.assignSocket
+
+ if (typeof assignSocket !== 'function') return
+
+ // res.on('socket', callback) is broken in 0.8
+ res.assignSocket = function _assignSocket(socket) {
+ assignSocket.call(this, socket)
+ callback(socket)
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/LICENSE b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/LICENSE
new file mode 100644
index 0000000..c1b15a1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/README.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/README.md
new file mode 100644
index 0000000..bb16aab
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/README.md
@@ -0,0 +1,80 @@
+# EE First
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Get the first event in a set of event emitters and event pairs,
+then clean up after itself.
+
+## Install
+
+```sh
+$ npm install ee-first
+```
+
+## API
+
+```js
+var first = require('ee-first')
+```
+
+### first(arr, listener)
+
+Invoke `listener` on the first event from the list specified in `arr`. `arr` is
+an array of arrays, with each array in the format `[ee, ...event]`. `listener`
+will be called only once, the first time any of the given events are emitted. If
+`error` is one of the listened events, then if that fires first, the `listener`
+will be given the `err` argument.
+
+The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the
+first argument emitted from an `error` event, if applicable; `ee` is the event
+emitter that fired; `event` is the string event name that fired; and `args` is an
+array of the arguments that were emitted on the event.
+
+```js
+var ee1 = new EventEmitter()
+var ee2 = new EventEmitter()
+
+first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+```
+
+#### .cancel()
+
+The group of listeners can be cancelled before being invoked and have all the event
+listeners removed from the underlying event emitters.
+
+```js
+var thunk = first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+
+// cancel and clean up
+thunk.cancel()
+```
+
+[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/ee-first
+[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square
+[github-url]: https://github.com/jonathanong/ee-first/tags
+[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square
+[travis-url]: https://travis-ci.org/jonathanong/ee-first
+[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master
+[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/ee-first
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/index.js
new file mode 100644
index 0000000..1d66203
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/index.js
@@ -0,0 +1,68 @@
+
+module.exports = function first(stuff, done) {
+ if (!Array.isArray(stuff))
+ throw new TypeError('arg must be an array of [ee, events...] arrays')
+
+ var cleanups = []
+
+ for (var i = 0; i < stuff.length; i++) {
+ var arr = stuff[i]
+
+ if (!Array.isArray(arr) || arr.length < 2)
+ throw new TypeError('each array member must be [ee, events...]')
+
+ var ee = arr[0]
+
+ for (var j = 1; j < arr.length; j++) {
+ var event = arr[j]
+ var fn = listener(event, callback)
+
+ // listen to the event
+ ee.on(event, fn)
+ // push this listener to the list of cleanups
+ cleanups.push({
+ ee: ee,
+ event: event,
+ fn: fn,
+ })
+ }
+ }
+
+ function callback() {
+ cleanup()
+ done.apply(null, arguments)
+ }
+
+ function cleanup() {
+ var x
+ for (var i = 0; i < cleanups.length; i++) {
+ x = cleanups[i]
+ x.ee.removeListener(x.event, x.fn)
+ }
+ }
+
+ function thunk(fn) {
+ done = fn
+ }
+
+ thunk.cancel = cleanup
+
+ return thunk
+}
+
+function listener(event, done) {
+ return function onevent(arg1) {
+ var args = new Array(arguments.length)
+ var ee = this
+ var err = event === 'error'
+ ? arg1
+ : null
+
+ // copy args to prevent arguments escaping scope
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
+ }
+
+ done(err, ee, event, args)
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/package.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/package.json
new file mode 100644
index 0000000..5b39931
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "ee-first",
+ "description": "return the first event in a set of ee/event pairs",
+ "version": "1.1.0",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jonathanong/ee-first"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.2",
+ "mocha": "1"
+ },
+ "files": [
+ "index.js",
+ "LICENSE"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "a6412004da4745941af2fc98ec30c8da570da7ea",
+ "bugs": {
+ "url": "https://github.com/jonathanong/ee-first/issues"
+ },
+ "homepage": "https://github.com/jonathanong/ee-first",
+ "_id": "ee-first@1.1.0",
+ "_shasum": "6a0d7c6221e490feefd92ec3f441c9ce8cd097f4",
+ "_from": "ee-first@1.1.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "6a0d7c6221e490feefd92ec3f441c9ce8cd097f4",
+ "tarball": "http://registry.npmjs.org/ee-first/-/ee-first-1.1.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/package.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/package.json
new file mode 100644
index 0000000..426e3ff
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/on-finished/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "on-finished",
+ "description": "Execute a callback when a request closes, finishes, or errors",
+ "version": "2.2.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/on-finished"
+ },
+ "dependencies": {
+ "ee-first": "1.1.0"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "fcd56f5674721cac92a16eff93547929716f5192",
+ "bugs": {
+ "url": "https://github.com/jshttp/on-finished/issues"
+ },
+ "homepage": "https://github.com/jshttp/on-finished",
+ "_id": "on-finished@2.2.0",
+ "_shasum": "e6ba6a09a3482d6b7969bc3da92c86f0a967605e",
+ "_from": "on-finished@~2.2.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e6ba6a09a3482d6b7969bc3da92c86f0a967605e",
+ "tarball": "http://registry.npmjs.org/on-finished/-/on-finished-2.2.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.2.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/.jshintignore b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/.jshintignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/.jshintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/.jshintrc b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/.jshintrc
new file mode 100644
index 0000000..997b3f7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/.jshintrc
@@ -0,0 +1,10 @@
+{
+ "node": true,
+
+ "curly": true,
+ "latedef": true,
+ "quotmark": true,
+ "undef": true,
+ "unused": true,
+ "trailing": true
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/.npmignore b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/.npmignore
new file mode 100644
index 0000000..7e1574d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/.npmignore
@@ -0,0 +1,18 @@
+.idea
+*.iml
+npm-debug.log
+dump.rdb
+node_modules
+results.tap
+results.xml
+npm-shrinkwrap.json
+config.json
+.DS_Store
+*/.DS_Store
+*/*/.DS_Store
+._*
+*/._*
+*/*/._*
+coverage.*
+lib-cov
+complexity.md
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/.travis.yml b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/.travis.yml
new file mode 100644
index 0000000..c891dd0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+
+node_js:
+ - 0.10
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/CHANGELOG.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/CHANGELOG.md
new file mode 100644
index 0000000..f5ee8b4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/CHANGELOG.md
@@ -0,0 +1,68 @@
+
+## [**2.3.3**](https://github.com/hapijs/qs/issues?milestone=18&state=open)
+- [**#59**](https://github.com/hapijs/qs/issues/59) make sure array indexes are >= 0, closes #57
+- [**#58**](https://github.com/hapijs/qs/issues/58) make qs usable for browser loader
+
+## [**2.3.2**](https://github.com/hapijs/qs/issues?milestone=17&state=closed)
+- [**#55**](https://github.com/hapijs/qs/issues/55) allow merging a string into an object
+
+## [**2.3.1**](https://github.com/hapijs/qs/issues?milestone=16&state=closed)
+- [**#52**](https://github.com/hapijs/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError".
+
+## [**2.3.0**](https://github.com/hapijs/qs/issues?milestone=15&state=closed)
+- [**#50**](https://github.com/hapijs/qs/issues/50) add option to omit array indices, closes #46
+
+## [**2.2.5**](https://github.com/hapijs/qs/issues?milestone=14&state=closed)
+- [**#39**](https://github.com/hapijs/qs/issues/39) Is there an alternative to Buffer.isBuffer?
+- [**#49**](https://github.com/hapijs/qs/issues/49) refactor utils.merge, fixes #45
+- [**#41**](https://github.com/hapijs/qs/issues/41) avoid browserifying Buffer, for #39
+
+## [**2.2.4**](https://github.com/hapijs/qs/issues?milestone=13&state=closed)
+- [**#38**](https://github.com/hapijs/qs/issues/38) how to handle object keys beginning with a number
+
+## [**2.2.3**](https://github.com/hapijs/qs/issues?milestone=12&state=closed)
+- [**#37**](https://github.com/hapijs/qs/issues/37) parser discards first empty value in array
+- [**#36**](https://github.com/hapijs/qs/issues/36) Update to lab 4.x
+
+## [**2.2.2**](https://github.com/hapijs/qs/issues?milestone=11&state=closed)
+- [**#33**](https://github.com/hapijs/qs/issues/33) Error when plain object in a value
+- [**#34**](https://github.com/hapijs/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty
+- [**#24**](https://github.com/hapijs/qs/issues/24) Changelog? Semver?
+
+## [**2.2.1**](https://github.com/hapijs/qs/issues?milestone=10&state=closed)
+- [**#32**](https://github.com/hapijs/qs/issues/32) account for circular references properly, closes #31
+- [**#31**](https://github.com/hapijs/qs/issues/31) qs.parse stackoverflow on circular objects
+
+## [**2.2.0**](https://github.com/hapijs/qs/issues?milestone=9&state=closed)
+- [**#26**](https://github.com/hapijs/qs/issues/26) Don't use Buffer global if it's not present
+- [**#30**](https://github.com/hapijs/qs/issues/30) Bug when merging non-object values into arrays
+- [**#29**](https://github.com/hapijs/qs/issues/29) Don't call Utils.clone at the top of Utils.merge
+- [**#23**](https://github.com/hapijs/qs/issues/23) Ability to not limit parameters?
+
+## [**2.1.0**](https://github.com/hapijs/qs/issues?milestone=8&state=closed)
+- [**#22**](https://github.com/hapijs/qs/issues/22) Enable using a RegExp as delimiter
+
+## [**2.0.0**](https://github.com/hapijs/qs/issues?milestone=7&state=closed)
+- [**#18**](https://github.com/hapijs/qs/issues/18) Why is there arrayLimit?
+- [**#20**](https://github.com/hapijs/qs/issues/20) Configurable parametersLimit
+- [**#21**](https://github.com/hapijs/qs/issues/21) make all limits optional, for #18, for #20
+
+## [**1.2.2**](https://github.com/hapijs/qs/issues?milestone=6&state=closed)
+- [**#19**](https://github.com/hapijs/qs/issues/19) Don't overwrite null values
+
+## [**1.2.1**](https://github.com/hapijs/qs/issues?milestone=5&state=closed)
+- [**#16**](https://github.com/hapijs/qs/issues/16) ignore non-string delimiters
+- [**#15**](https://github.com/hapijs/qs/issues/15) Close code block
+
+## [**1.2.0**](https://github.com/hapijs/qs/issues?milestone=4&state=closed)
+- [**#12**](https://github.com/hapijs/qs/issues/12) Add optional delim argument
+- [**#13**](https://github.com/hapijs/qs/issues/13) fix #11: flattened keys in array are now correctly parsed
+
+## [**1.1.0**](https://github.com/hapijs/qs/issues?milestone=3&state=closed)
+- [**#7**](https://github.com/hapijs/qs/issues/7) Empty values of a POST array disappear after being submitted
+- [**#9**](https://github.com/hapijs/qs/issues/9) Should not omit equals signs (=) when value is null
+- [**#6**](https://github.com/hapijs/qs/issues/6) Minor grammar fix in README
+
+## [**1.0.2**](https://github.com/hapijs/qs/issues?milestone=2&state=closed)
+- [**#5**](https://github.com/hapijs/qs/issues/5) array holes incorrectly copied into object on large index
+
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/CONTRIBUTING.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/CONTRIBUTING.md
new file mode 100644
index 0000000..8928361
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/CONTRIBUTING.md
@@ -0,0 +1 @@
+Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md).
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/LICENSE b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/LICENSE
new file mode 100755
index 0000000..d456948
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/LICENSE
@@ -0,0 +1,28 @@
+Copyright (c) 2014 Nathan LaFreniere and other contributors.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * The names of any contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ * * *
+
+The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/Makefile b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/Makefile
new file mode 100644
index 0000000..31cc899
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/Makefile
@@ -0,0 +1,8 @@
+test:
+ @node node_modules/lab/bin/lab -a code -L
+test-cov:
+ @node node_modules/lab/bin/lab -a code -t 100 -L
+test-cov-html:
+ @node node_modules/lab/bin/lab -a code -L -r html -o coverage.html
+
+.PHONY: test test-cov test-cov-html
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/README.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/README.md
new file mode 100755
index 0000000..21bf3fa
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/README.md
@@ -0,0 +1,222 @@
+# qs
+
+A querystring parsing and stringifying library with some added security.
+
+[![Build Status](https://secure.travis-ci.org/hapijs/qs.svg)](http://travis-ci.org/hapijs/qs)
+
+Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf)
+
+The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring).
+
+## Usage
+
+```javascript
+var Qs = require('qs');
+
+var obj = Qs.parse('a=c'); // { a: 'c' }
+var str = Qs.stringify(obj); // 'a=c'
+```
+
+### Parsing Objects
+
+```javascript
+Qs.parse(string, [options]);
+```
+
+**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`.
+For example, the string `'foo[bar]=baz'` converts to:
+
+```javascript
+{
+ foo: {
+ bar: 'baz'
+ }
+}
+```
+
+URI encoded strings work too:
+
+```javascript
+Qs.parse('a%5Bb%5D=c');
+// { a: { b: 'c' } }
+```
+
+You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`:
+
+```javascript
+{
+ foo: {
+ bar: {
+ baz: 'foobarbaz'
+ }
+ }
+}
+```
+
+By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like
+`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be:
+
+```javascript
+{
+ a: {
+ b: {
+ c: {
+ d: {
+ e: {
+ f: {
+ '[g][h][i]': 'j'
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+This depth can be overridden by passing a `depth` option to `Qs.parse(string, [options])`:
+
+```javascript
+Qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 });
+// { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }
+```
+
+The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number.
+
+For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option:
+
+```javascript
+Qs.parse('a=b&c=d', { parameterLimit: 1 });
+// { a: 'b' }
+```
+
+An optional delimiter can also be passed:
+
+```javascript
+Qs.parse('a=b;c=d', { delimiter: ';' });
+// { a: 'b', c: 'd' }
+```
+
+Delimiters can be a regular expression too:
+
+```javascript
+Qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ });
+// { a: 'b', c: 'd', e: 'f' }
+```
+
+### Parsing Arrays
+
+**qs** can also parse arrays using a similar `[]` notation:
+
+```javascript
+Qs.parse('a[]=b&a[]=c');
+// { a: ['b', 'c'] }
+```
+
+You may specify an index as well:
+
+```javascript
+Qs.parse('a[1]=c&a[0]=b');
+// { a: ['b', 'c'] }
+```
+
+Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number
+to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving
+their order:
+
+```javascript
+Qs.parse('a[1]=b&a[15]=c');
+// { a: ['b', 'c'] }
+```
+
+Note that an empty string is also a value, and will be preserved:
+
+```javascript
+Qs.parse('a[]=&a[]=b');
+// { a: ['', 'b'] }
+Qs.parse('a[0]=b&a[1]=&a[2]=c');
+// { a: ['b', '', 'c'] }
+```
+
+**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will
+instead be converted to an object with the index as the key:
+
+```javascript
+Qs.parse('a[100]=b');
+// { a: { '100': 'b' } }
+```
+
+This limit can be overridden by passing an `arrayLimit` option:
+
+```javascript
+Qs.parse('a[1]=b', { arrayLimit: 0 });
+// { a: { '1': 'b' } }
+```
+
+To disable array parsing entirely, set `arrayLimit` to `-1`.
+
+If you mix notations, **qs** will merge the two items into an object:
+
+```javascript
+Qs.parse('a[0]=b&a[b]=c');
+// { a: { '0': 'b', b: 'c' } }
+```
+
+You can also create arrays of objects:
+
+```javascript
+Qs.parse('a[][b]=c');
+// { a: [{ b: 'c' }] }
+```
+
+### Stringifying
+
+```javascript
+Qs.stringify(object, [options]);
+```
+
+When stringifying, **qs** always URI encodes output. Objects are stringified as you would expect:
+
+```javascript
+Qs.stringify({ a: 'b' });
+// 'a=b'
+Qs.stringify({ a: { b: 'c' } });
+// 'a%5Bb%5D=c'
+```
+
+Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.
+
+When arrays are stringified, by default they are given explicit indices:
+
+```javascript
+Qs.stringify({ a: ['b', 'c', 'd'] });
+// 'a[0]=b&a[1]=c&a[2]=d'
+```
+
+You may override this by setting the `indices` option to `false`:
+
+```javascript
+Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false });
+// 'a=b&a=c&a=d'
+```
+
+Empty strings and null values will omit the value, but the equals sign (=) remains in place:
+
+```javascript
+Qs.stringify({ a: '' });
+// 'a='
+```
+
+Properties that are set to `undefined` will be omitted entirely:
+
+```javascript
+Qs.stringify({ a: null, b: undefined });
+// 'a='
+```
+
+The delimiter may be overridden with stringify as well:
+
+```javascript
+Qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' });
+// 'a=b;c=d'
+```
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/index.js
new file mode 100644
index 0000000..2291cd8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/index.js
@@ -0,0 +1 @@
+module.exports = require('./lib/');
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/lib/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/lib/index.js
new file mode 100755
index 0000000..0e09493
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/lib/index.js
@@ -0,0 +1,15 @@
+// Load modules
+
+var Stringify = require('./stringify');
+var Parse = require('./parse');
+
+
+// Declare internals
+
+var internals = {};
+
+
+module.exports = {
+ stringify: Stringify,
+ parse: Parse
+};
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/lib/parse.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/lib/parse.js
new file mode 100755
index 0000000..4e7d02a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/lib/parse.js
@@ -0,0 +1,157 @@
+// Load modules
+
+var Utils = require('./utils');
+
+
+// Declare internals
+
+var internals = {
+ delimiter: '&',
+ depth: 5,
+ arrayLimit: 20,
+ parameterLimit: 1000
+};
+
+
+internals.parseValues = function (str, options) {
+
+ var obj = {};
+ var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
+
+ for (var i = 0, il = parts.length; i < il; ++i) {
+ var part = parts[i];
+ var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
+
+ if (pos === -1) {
+ obj[Utils.decode(part)] = '';
+ }
+ else {
+ var key = Utils.decode(part.slice(0, pos));
+ var val = Utils.decode(part.slice(pos + 1));
+
+ if (!obj.hasOwnProperty(key)) {
+ obj[key] = val;
+ }
+ else {
+ obj[key] = [].concat(obj[key]).concat(val);
+ }
+ }
+ }
+
+ return obj;
+};
+
+
+internals.parseObject = function (chain, val, options) {
+
+ if (!chain.length) {
+ return val;
+ }
+
+ var root = chain.shift();
+
+ var obj = {};
+ if (root === '[]') {
+ obj = [];
+ obj = obj.concat(internals.parseObject(chain, val, options));
+ }
+ else {
+ var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;
+ var index = parseInt(cleanRoot, 10);
+ var indexString = '' + index;
+ if (!isNaN(index) &&
+ root !== cleanRoot &&
+ indexString === cleanRoot &&
+ index >= 0 &&
+ index <= options.arrayLimit) {
+
+ obj = [];
+ obj[index] = internals.parseObject(chain, val, options);
+ }
+ else {
+ obj[cleanRoot] = internals.parseObject(chain, val, options);
+ }
+ }
+
+ return obj;
+};
+
+
+internals.parseKeys = function (key, val, options) {
+
+ if (!key) {
+ return;
+ }
+
+ // The regex chunks
+
+ var parent = /^([^\[\]]*)/;
+ var child = /(\[[^\[\]]*\])/g;
+
+ // Get the parent
+
+ var segment = parent.exec(key);
+
+ // Don't allow them to overwrite object prototype properties
+
+ if (Object.prototype.hasOwnProperty(segment[1])) {
+ return;
+ }
+
+ // Stash the parent if it exists
+
+ var keys = [];
+ if (segment[1]) {
+ keys.push(segment[1]);
+ }
+
+ // Loop through children appending to the array until we hit depth
+
+ var i = 0;
+ while ((segment = child.exec(key)) !== null && i < options.depth) {
+
+ ++i;
+ if (!Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) {
+ keys.push(segment[1]);
+ }
+ }
+
+ // If there's a remainder, just add whatever is left
+
+ if (segment) {
+ keys.push('[' + key.slice(segment.index) + ']');
+ }
+
+ return internals.parseObject(keys, val, options);
+};
+
+
+module.exports = function (str, options) {
+
+ if (str === '' ||
+ str === null ||
+ typeof str === 'undefined') {
+
+ return {};
+ }
+
+ options = options || {};
+ options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;
+ options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;
+ options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;
+ options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;
+
+ var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;
+ var obj = {};
+
+ // Iterate over the keys and setup the new object
+
+ var keys = Object.keys(tempObj);
+ for (var i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
+ var newObj = internals.parseKeys(key, tempObj[key], options);
+ obj = Utils.merge(obj, newObj);
+ }
+
+ return Utils.compact(obj);
+};
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/lib/stringify.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/lib/stringify.js
new file mode 100755
index 0000000..b441104
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/lib/stringify.js
@@ -0,0 +1,77 @@
+// Load modules
+
+var Utils = require('./utils');
+
+
+// Declare internals
+
+var internals = {
+ delimiter: '&',
+ indices: true
+};
+
+
+internals.stringify = function (obj, prefix, options) {
+
+ if (Utils.isBuffer(obj)) {
+ obj = obj.toString();
+ }
+ else if (obj instanceof Date) {
+ obj = obj.toISOString();
+ }
+ else if (obj === null) {
+ obj = '';
+ }
+
+ if (typeof obj === 'string' ||
+ typeof obj === 'number' ||
+ typeof obj === 'boolean') {
+
+ return [encodeURIComponent(prefix) + '=' + encodeURIComponent(obj)];
+ }
+
+ var values = [];
+
+ if (typeof obj === 'undefined') {
+ return values;
+ }
+
+ var objKeys = Object.keys(obj);
+ for (var i = 0, il = objKeys.length; i < il; ++i) {
+ var key = objKeys[i];
+ if (!options.indices &&
+ Array.isArray(obj)) {
+
+ values = values.concat(internals.stringify(obj[key], prefix, options));
+ }
+ else {
+ values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', options));
+ }
+ }
+
+ return values;
+};
+
+
+module.exports = function (obj, options) {
+
+ options = options || {};
+ var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;
+ options.indices = typeof options.indices === 'boolean' ? options.indices : internals.indices;
+
+ var keys = [];
+
+ if (typeof obj !== 'object' ||
+ obj === null) {
+
+ return '';
+ }
+
+ var objKeys = Object.keys(obj);
+ for (var i = 0, il = objKeys.length; i < il; ++i) {
+ var key = objKeys[i];
+ keys = keys.concat(internals.stringify(obj[key], key, options));
+ }
+
+ return keys.join(delimiter);
+};
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/lib/utils.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/lib/utils.js
new file mode 100755
index 0000000..5240bd5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/lib/utils.js
@@ -0,0 +1,132 @@
+// Load modules
+
+
+// Declare internals
+
+var internals = {};
+
+
+exports.arrayToObject = function (source) {
+
+ var obj = {};
+ for (var i = 0, il = source.length; i < il; ++i) {
+ if (typeof source[i] !== 'undefined') {
+
+ obj[i] = source[i];
+ }
+ }
+
+ return obj;
+};
+
+
+exports.merge = function (target, source) {
+
+ if (!source) {
+ return target;
+ }
+
+ if (typeof source !== 'object') {
+ if (Array.isArray(target)) {
+ target.push(source);
+ }
+ else {
+ target[source] = true;
+ }
+
+ return target;
+ }
+
+ if (typeof target !== 'object') {
+ target = [target].concat(source);
+ return target;
+ }
+
+ if (Array.isArray(target) &&
+ !Array.isArray(source)) {
+
+ target = exports.arrayToObject(target);
+ }
+
+ var keys = Object.keys(source);
+ for (var k = 0, kl = keys.length; k < kl; ++k) {
+ var key = keys[k];
+ var value = source[key];
+
+ if (!target[key]) {
+ target[key] = value;
+ }
+ else {
+ target[key] = exports.merge(target[key], value);
+ }
+ }
+
+ return target;
+};
+
+
+exports.decode = function (str) {
+
+ try {
+ return decodeURIComponent(str.replace(/\+/g, ' '));
+ } catch (e) {
+ return str;
+ }
+};
+
+
+exports.compact = function (obj, refs) {
+
+ if (typeof obj !== 'object' ||
+ obj === null) {
+
+ return obj;
+ }
+
+ refs = refs || [];
+ var lookup = refs.indexOf(obj);
+ if (lookup !== -1) {
+ return refs[lookup];
+ }
+
+ refs.push(obj);
+
+ if (Array.isArray(obj)) {
+ var compacted = [];
+
+ for (var i = 0, il = obj.length; i < il; ++i) {
+ if (typeof obj[i] !== 'undefined') {
+ compacted.push(obj[i]);
+ }
+ }
+
+ return compacted;
+ }
+
+ var keys = Object.keys(obj);
+ for (i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
+ obj[key] = exports.compact(obj[key], refs);
+ }
+
+ return obj;
+};
+
+
+exports.isRegExp = function (obj) {
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
+};
+
+
+exports.isBuffer = function (obj) {
+
+ if (obj === null ||
+ typeof obj === 'undefined') {
+
+ return false;
+ }
+
+ return !!(obj.constructor &&
+ obj.constructor.isBuffer &&
+ obj.constructor.isBuffer(obj));
+};
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/package.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/package.json
new file mode 100644
index 0000000..540b33e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "qs",
+ "version": "2.3.3",
+ "description": "A querystring parser that supports nesting and arrays, with a depth limit",
+ "homepage": "https://github.com/hapijs/qs",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {
+ "code": "1.x.x",
+ "lab": "5.x.x"
+ },
+ "scripts": {
+ "test": "make test-cov"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/hapijs/qs.git"
+ },
+ "keywords": [
+ "querystring",
+ "qs"
+ ],
+ "licenses": [
+ {
+ "type": "BSD",
+ "url": "http://github.com/hapijs/qs/raw/master/LICENSE"
+ }
+ ],
+ "gitHead": "9250c4cda5102fcf72441445816e6d311fc6813d",
+ "bugs": {
+ "url": "https://github.com/hapijs/qs/issues"
+ },
+ "_id": "qs@2.3.3",
+ "_shasum": "e9e85adbe75da0bbe4c8e0476a086290f863b404",
+ "_from": "qs@2.3.3",
+ "_npmVersion": "2.1.6",
+ "_nodeVersion": "0.10.32",
+ "_npmUser": {
+ "name": "nlf",
+ "email": "quitlahok@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "nlf",
+ "email": "quitlahok@gmail.com"
+ },
+ {
+ "name": "hueniverse",
+ "email": "eran@hueniverse.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e9e85adbe75da0bbe4c8e0476a086290f863b404",
+ "tarball": "http://registry.npmjs.org/qs/-/qs-2.3.3.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/test/parse.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/test/parse.js
new file mode 100755
index 0000000..6c20cc1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/test/parse.js
@@ -0,0 +1,413 @@
+/* eslint no-extend-native:0 */
+// Load modules
+
+var Code = require('code');
+var Lab = require('lab');
+var Qs = require('../');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var expect = Code.expect;
+var describe = lab.experiment;
+var it = lab.test;
+
+
+describe('parse()', function () {
+
+ it('parses a simple string', function (done) {
+
+ expect(Qs.parse('0=foo')).to.deep.equal({ '0': 'foo' });
+ expect(Qs.parse('foo=c++')).to.deep.equal({ foo: 'c ' });
+ expect(Qs.parse('a[>=]=23')).to.deep.equal({ a: { '>=': '23' } });
+ expect(Qs.parse('a[<=>]==23')).to.deep.equal({ a: { '<=>': '=23' } });
+ expect(Qs.parse('a[==]=23')).to.deep.equal({ a: { '==': '23' } });
+ expect(Qs.parse('foo')).to.deep.equal({ foo: '' });
+ expect(Qs.parse('foo=bar')).to.deep.equal({ foo: 'bar' });
+ expect(Qs.parse(' foo = bar = baz ')).to.deep.equal({ ' foo ': ' bar = baz ' });
+ expect(Qs.parse('foo=bar=baz')).to.deep.equal({ foo: 'bar=baz' });
+ expect(Qs.parse('foo=bar&bar=baz')).to.deep.equal({ foo: 'bar', bar: 'baz' });
+ expect(Qs.parse('foo=bar&baz')).to.deep.equal({ foo: 'bar', baz: '' });
+ expect(Qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World')).to.deep.equal({
+ cht: 'p3',
+ chd: 't:60,40',
+ chs: '250x100',
+ chl: 'Hello|World'
+ });
+ done();
+ });
+
+ it('parses a single nested string', function (done) {
+
+ expect(Qs.parse('a[b]=c')).to.deep.equal({ a: { b: 'c' } });
+ done();
+ });
+
+ it('parses a double nested string', function (done) {
+
+ expect(Qs.parse('a[b][c]=d')).to.deep.equal({ a: { b: { c: 'd' } } });
+ done();
+ });
+
+ it('defaults to a depth of 5', function (done) {
+
+ expect(Qs.parse('a[b][c][d][e][f][g][h]=i')).to.deep.equal({ a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } });
+ done();
+ });
+
+ it('only parses one level when depth = 1', function (done) {
+
+ expect(Qs.parse('a[b][c]=d', { depth: 1 })).to.deep.equal({ a: { b: { '[c]': 'd' } } });
+ expect(Qs.parse('a[b][c][d]=e', { depth: 1 })).to.deep.equal({ a: { b: { '[c][d]': 'e' } } });
+ done();
+ });
+
+ it('parses a simple array', function (done) {
+
+ expect(Qs.parse('a=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+ done();
+ });
+
+ it('parses an explicit array', function (done) {
+
+ expect(Qs.parse('a[]=b')).to.deep.equal({ a: ['b'] });
+ expect(Qs.parse('a[]=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[]=b&a[]=c&a[]=d')).to.deep.equal({ a: ['b', 'c', 'd'] });
+ done();
+ });
+
+ it('parses a mix of simple and explicit arrays', function (done) {
+
+ expect(Qs.parse('a=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[0]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a=b&a[0]=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[1]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a=b&a[1]=c')).to.deep.equal({ a: ['b', 'c'] });
+ done();
+ });
+
+ it('parses a nested array', function (done) {
+
+ expect(Qs.parse('a[b][]=c&a[b][]=d')).to.deep.equal({ a: { b: ['c', 'd'] } });
+ expect(Qs.parse('a[>=]=25')).to.deep.equal({ a: { '>=': '25' } });
+ done();
+ });
+
+ it('allows to specify array indices', function (done) {
+
+ expect(Qs.parse('a[1]=c&a[0]=b&a[2]=d')).to.deep.equal({ a: ['b', 'c', 'd'] });
+ expect(Qs.parse('a[1]=c&a[0]=b')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[1]=c')).to.deep.equal({ a: ['c'] });
+ done();
+ });
+
+ it('limits specific array indices to 20', function (done) {
+
+ expect(Qs.parse('a[20]=a')).to.deep.equal({ a: ['a'] });
+ expect(Qs.parse('a[21]=a')).to.deep.equal({ a: { '21': 'a' } });
+ done();
+ });
+
+ it('supports keys that begin with a number', function (done) {
+
+ expect(Qs.parse('a[12b]=c')).to.deep.equal({ a: { '12b': 'c' } });
+ done();
+ });
+
+ it('supports encoded = signs', function (done) {
+
+ expect(Qs.parse('he%3Dllo=th%3Dere')).to.deep.equal({ 'he=llo': 'th=ere' });
+ done();
+ });
+
+ it('is ok with url encoded strings', function (done) {
+
+ expect(Qs.parse('a[b%20c]=d')).to.deep.equal({ a: { 'b c': 'd' } });
+ expect(Qs.parse('a[b]=c%20d')).to.deep.equal({ a: { b: 'c d' } });
+ done();
+ });
+
+ it('allows brackets in the value', function (done) {
+
+ expect(Qs.parse('pets=["tobi"]')).to.deep.equal({ pets: '["tobi"]' });
+ expect(Qs.parse('operators=[">=", "<="]')).to.deep.equal({ operators: '[">=", "<="]' });
+ done();
+ });
+
+ it('allows empty values', function (done) {
+
+ expect(Qs.parse('')).to.deep.equal({});
+ expect(Qs.parse(null)).to.deep.equal({});
+ expect(Qs.parse(undefined)).to.deep.equal({});
+ done();
+ });
+
+ it('transforms arrays to objects', function (done) {
+
+ expect(Qs.parse('foo[0]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } });
+ expect(Qs.parse('foo[bad]=baz&foo[0]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } });
+ expect(Qs.parse('foo[bad]=baz&foo[]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } });
+ expect(Qs.parse('foo[]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } });
+ expect(Qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar', '1': 'foo' } });
+ expect(Qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb')).to.deep.equal({foo: [ {a: 'a', b: 'b'}, {a: 'aa', b: 'bb'} ]});
+ done();
+ });
+
+ it('can add keys to objects', function (done) {
+
+ expect(Qs.parse('a[b]=c&a=d')).to.deep.equal({ a: { b: 'c', d: true } });
+ done();
+ });
+
+ it('correctly prunes undefined values when converting an array to an object', function (done) {
+
+ expect(Qs.parse('a[2]=b&a[99999999]=c')).to.deep.equal({ a: { '2': 'b', '99999999': 'c' } });
+ done();
+ });
+
+ it('supports malformed uri characters', function (done) {
+
+ expect(Qs.parse('{%:%}')).to.deep.equal({ '{%:%}': '' });
+ expect(Qs.parse('foo=%:%}')).to.deep.equal({ foo: '%:%}' });
+ done();
+ });
+
+ it('doesn\'t produce empty keys', function (done) {
+
+ expect(Qs.parse('_r=1&')).to.deep.equal({ '_r': '1' });
+ done();
+ });
+
+ it('cannot override prototypes', function (done) {
+
+ var obj = Qs.parse('toString=bad&bad[toString]=bad&constructor=bad');
+ expect(typeof obj.toString).to.equal('function');
+ expect(typeof obj.bad.toString).to.equal('function');
+ expect(typeof obj.constructor).to.equal('function');
+ done();
+ });
+
+ it('cannot access Object prototype', function (done) {
+
+ Qs.parse('constructor[prototype][bad]=bad');
+ Qs.parse('bad[constructor][prototype][bad]=bad');
+ expect(typeof Object.prototype.bad).to.equal('undefined');
+ done();
+ });
+
+ it('parses arrays of objects', function (done) {
+
+ expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
+ expect(Qs.parse('a[0][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
+ done();
+ });
+
+ it('allows for empty strings in arrays', function (done) {
+
+ expect(Qs.parse('a[]=b&a[]=&a[]=c')).to.deep.equal({ a: ['b', '', 'c'] });
+ expect(Qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]=')).to.deep.equal({ a: ['b', '', 'c', ''] });
+ expect(Qs.parse('a[]=&a[]=b&a[]=c')).to.deep.equal({ a: ['', 'b', 'c'] });
+ done();
+ });
+
+ it('compacts sparse arrays', function (done) {
+
+ expect(Qs.parse('a[10]=1&a[2]=2')).to.deep.equal({ a: ['2', '1'] });
+ done();
+ });
+
+ it('parses semi-parsed strings', function (done) {
+
+ expect(Qs.parse({ 'a[b]': 'c' })).to.deep.equal({ a: { b: 'c' } });
+ expect(Qs.parse({ 'a[b]': 'c', 'a[d]': 'e' })).to.deep.equal({ a: { b: 'c', d: 'e' } });
+ done();
+ });
+
+ it('parses buffers correctly', function (done) {
+
+ var b = new Buffer('test');
+ expect(Qs.parse({ a: b })).to.deep.equal({ a: b });
+ done();
+ });
+
+ it('continues parsing when no parent is found', function (done) {
+
+ expect(Qs.parse('[]&a=b')).to.deep.equal({ '0': '', a: 'b' });
+ expect(Qs.parse('[foo]=bar')).to.deep.equal({ foo: 'bar' });
+ done();
+ });
+
+ it('does not error when parsing a very long array', function (done) {
+
+ var str = 'a[]=a';
+ while (Buffer.byteLength(str) < 128 * 1024) {
+ str += '&' + str;
+ }
+
+ expect(function () {
+
+ Qs.parse(str);
+ }).to.not.throw();
+
+ done();
+ });
+
+ it('should not throw when a native prototype has an enumerable property', { parallel: false }, function (done) {
+
+ Object.prototype.crash = '';
+ Array.prototype.crash = '';
+ expect(Qs.parse.bind(null, 'a=b')).to.not.throw();
+ expect(Qs.parse('a=b')).to.deep.equal({ a: 'b' });
+ expect(Qs.parse.bind(null, 'a[][b]=c')).to.not.throw();
+ expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
+ delete Object.prototype.crash;
+ delete Array.prototype.crash;
+ done();
+ });
+
+ it('parses a string with an alternative string delimiter', function (done) {
+
+ expect(Qs.parse('a=b;c=d', { delimiter: ';' })).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('parses a string with an alternative RegExp delimiter', function (done) {
+
+ expect(Qs.parse('a=b; c=d', { delimiter: /[;,] */ })).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('does not use non-splittable objects as delimiters', function (done) {
+
+ expect(Qs.parse('a=b&c=d', { delimiter: true })).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('allows overriding parameter limit', function (done) {
+
+ expect(Qs.parse('a=b&c=d', { parameterLimit: 1 })).to.deep.equal({ a: 'b' });
+ done();
+ });
+
+ it('allows setting the parameter limit to Infinity', function (done) {
+
+ expect(Qs.parse('a=b&c=d', { parameterLimit: Infinity })).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('allows overriding array limit', function (done) {
+
+ expect(Qs.parse('a[0]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '0': 'b' } });
+ expect(Qs.parse('a[-1]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '-1': 'b' } });
+ expect(Qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 })).to.deep.equal({ a: { '0': 'b', '1': 'c' } });
+ done();
+ });
+
+ it('parses an object', function (done) {
+
+ var input = {
+ 'user[name]': {'pop[bob]': 3},
+ 'user[email]': null
+ };
+
+ var expected = {
+ 'user': {
+ 'name': {'pop[bob]': 3},
+ 'email': null
+ }
+ };
+
+ var result = Qs.parse(input);
+
+ expect(result).to.deep.equal(expected);
+ done();
+ });
+
+ it('parses an object and not child values', function (done) {
+
+ var input = {
+ 'user[name]': {'pop[bob]': { 'test': 3 }},
+ 'user[email]': null
+ };
+
+ var expected = {
+ 'user': {
+ 'name': {'pop[bob]': { 'test': 3 }},
+ 'email': null
+ }
+ };
+
+ var result = Qs.parse(input);
+
+ expect(result).to.deep.equal(expected);
+ done();
+ });
+
+ it('does not blow up when Buffer global is missing', function (done) {
+
+ var tempBuffer = global.Buffer;
+ delete global.Buffer;
+ var result = Qs.parse('a=b&c=d');
+ global.Buffer = tempBuffer;
+ expect(result).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('does not crash when using invalid dot notation', function (done) {
+
+ expect(Qs.parse('roomInfoList[0].childrenAges[0]=15&roomInfoList[0].numberOfAdults=2')).to.deep.equal({ roomInfoList: [['15', '2']] });
+ done();
+ });
+
+ it('does not crash when parsing circular references', function (done) {
+
+ var a = {};
+ a.b = a;
+
+ var parsed;
+
+ expect(function () {
+
+ parsed = Qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a });
+ }).to.not.throw();
+
+ expect(parsed).to.contain('foo');
+ expect(parsed.foo).to.contain('bar', 'baz');
+ expect(parsed.foo.bar).to.equal('baz');
+ expect(parsed.foo.baz).to.deep.equal(a);
+ done();
+ });
+
+ it('parses plain objects correctly', function (done) {
+
+ var a = Object.create(null);
+ a.b = 'c';
+
+ expect(Qs.parse(a)).to.deep.equal({ b: 'c' });
+ var result = Qs.parse({ a: a });
+ expect(result).to.contain('a');
+ expect(result.a).to.deep.equal(a);
+ done();
+ });
+
+ it('parses dates correctly', function (done) {
+
+ var now = new Date();
+ expect(Qs.parse({ a: now })).to.deep.equal({ a: now });
+ done();
+ });
+
+ it('parses regular expressions correctly', function (done) {
+
+ var re = /^test$/;
+ expect(Qs.parse({ a: re })).to.deep.equal({ a: re });
+ done();
+ });
+});
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/test/stringify.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/test/stringify.js
new file mode 100755
index 0000000..75e397a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/qs/test/stringify.js
@@ -0,0 +1,179 @@
+/* eslint no-extend-native:0 */
+// Load modules
+
+var Code = require('code');
+var Lab = require('lab');
+var Qs = require('../');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var expect = Code.expect;
+var describe = lab.experiment;
+var it = lab.test;
+
+
+describe('stringify()', function () {
+
+ it('stringifies a querystring object', function (done) {
+
+ expect(Qs.stringify({ a: 'b' })).to.equal('a=b');
+ expect(Qs.stringify({ a: 1 })).to.equal('a=1');
+ expect(Qs.stringify({ a: 1, b: 2 })).to.equal('a=1&b=2');
+ done();
+ });
+
+ it('stringifies a nested object', function (done) {
+
+ expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c');
+ expect(Qs.stringify({ a: { b: { c: { d: 'e' } } } })).to.equal('a%5Bb%5D%5Bc%5D%5Bd%5D=e');
+ done();
+ });
+
+ it('stringifies an array value', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c', 'd'] })).to.equal('a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d');
+ done();
+ });
+
+ it('omits array indices when asked', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false })).to.equal('a=b&a=c&a=d');
+ done();
+ });
+
+ it('stringifies a nested array value', function (done) {
+
+ expect(Qs.stringify({ a: { b: ['c', 'd'] } })).to.equal('a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
+ done();
+ });
+
+ it('stringifies an object inside an array', function (done) {
+
+ expect(Qs.stringify({ a: [{ b: 'c' }] })).to.equal('a%5B0%5D%5Bb%5D=c');
+ expect(Qs.stringify({ a: [{ b: { c: [1] } }] })).to.equal('a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1');
+ done();
+ });
+
+ it('does not omit object keys when indices = false', function (done) {
+
+ expect(Qs.stringify({ a: [{ b: 'c' }] }, { indices: false })).to.equal('a%5Bb%5D=c');
+ done();
+ });
+
+ it('stringifies a complicated object', function (done) {
+
+ expect(Qs.stringify({ a: { b: 'c', d: 'e' } })).to.equal('a%5Bb%5D=c&a%5Bd%5D=e');
+ done();
+ });
+
+ it('stringifies an empty value', function (done) {
+
+ expect(Qs.stringify({ a: '' })).to.equal('a=');
+ expect(Qs.stringify({ a: '', b: '' })).to.equal('a=&b=');
+ expect(Qs.stringify({ a: null })).to.equal('a=');
+ expect(Qs.stringify({ a: { b: null } })).to.equal('a%5Bb%5D=');
+ done();
+ });
+
+ it('stringifies an empty object', function (done) {
+
+ var obj = Object.create(null);
+ obj.a = 'b';
+ expect(Qs.stringify(obj)).to.equal('a=b');
+ done();
+ });
+
+ it('returns an empty string for invalid input', function (done) {
+
+ expect(Qs.stringify(undefined)).to.equal('');
+ expect(Qs.stringify(false)).to.equal('');
+ expect(Qs.stringify(null)).to.equal('');
+ expect(Qs.stringify('')).to.equal('');
+ done();
+ });
+
+ it('stringifies an object with an empty object as a child', function (done) {
+
+ var obj = {
+ a: Object.create(null)
+ };
+
+ obj.a.b = 'c';
+ expect(Qs.stringify(obj)).to.equal('a%5Bb%5D=c');
+ done();
+ });
+
+ it('drops keys with a value of undefined', function (done) {
+
+ expect(Qs.stringify({ a: undefined })).to.equal('');
+ expect(Qs.stringify({ a: { b: undefined, c: null } })).to.equal('a%5Bc%5D=');
+ done();
+ });
+
+ it('url encodes values', function (done) {
+
+ expect(Qs.stringify({ a: 'b c' })).to.equal('a=b%20c');
+ done();
+ });
+
+ it('stringifies a date', function (done) {
+
+ var now = new Date();
+ var str = 'a=' + encodeURIComponent(now.toISOString());
+ expect(Qs.stringify({ a: now })).to.equal(str);
+ done();
+ });
+
+ it('stringifies the weird object from qs', function (done) {
+
+ expect(Qs.stringify({ 'my weird field': 'q1!2"\'w$5&7/z8)?' })).to.equal('my%20weird%20field=q1!2%22\'w%245%267%2Fz8)%3F');
+ done();
+ });
+
+ it('skips properties that are part of the object prototype', function (done) {
+
+ Object.prototype.crash = 'test';
+ expect(Qs.stringify({ a: 'b'})).to.equal('a=b');
+ expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c');
+ delete Object.prototype.crash;
+ done();
+ });
+
+ it('stringifies boolean values', function (done) {
+
+ expect(Qs.stringify({ a: true })).to.equal('a=true');
+ expect(Qs.stringify({ a: { b: true } })).to.equal('a%5Bb%5D=true');
+ expect(Qs.stringify({ b: false })).to.equal('b=false');
+ expect(Qs.stringify({ b: { c: false } })).to.equal('b%5Bc%5D=false');
+ done();
+ });
+
+ it('stringifies buffer values', function (done) {
+
+ expect(Qs.stringify({ a: new Buffer('test') })).to.equal('a=test');
+ expect(Qs.stringify({ a: { b: new Buffer('test') } })).to.equal('a%5Bb%5D=test');
+ done();
+ });
+
+ it('stringifies an object using an alternative delimiter', function (done) {
+
+ expect(Qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' })).to.equal('a=b;c=d');
+ done();
+ });
+
+ it('doesn\'t blow up when Buffer global is missing', function (done) {
+
+ var tempBuffer = global.Buffer;
+ delete global.Buffer;
+ expect(Qs.stringify({ a: 'b', c: 'd' })).to.equal('a=b&c=d');
+ global.Buffer = tempBuffer;
+ done();
+ });
+});
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/.npmignore b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/.npmignore
new file mode 100644
index 0000000..cd39b77
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/.npmignore
@@ -0,0 +1,3 @@
+coverage/
+test/
+.travis.yml
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/HISTORY.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/HISTORY.md
new file mode 100644
index 0000000..91aee2c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/HISTORY.md
@@ -0,0 +1,126 @@
+1.3.2 / 2015-01-20
+==================
+
+ * deps: iconv-lite@0.4.6
+ - Fix rare aliases of single-byte encodings
+
+1.3.1 / 2014-11-21
+==================
+
+ * deps: iconv-lite@0.4.5
+ - Fix Windows-31J and X-SJIS encoding support
+
+1.3.0 / 2014-07-20
+==================
+
+ * Fully unpipe the stream on error
+ - Fixes `Cannot switch to old mode now` error on Node.js 0.10+
+
+1.2.3 / 2014-07-20
+==================
+
+ * deps: iconv-lite@0.4.4
+ - Added encoding UTF-7
+
+1.2.2 / 2014-06-19
+==================
+
+ * Send invalid encoding error to callback
+
+1.2.1 / 2014-06-15
+==================
+
+ * deps: iconv-lite@0.4.3
+ - Added encodings UTF-16BE and UTF-16 with BOM
+
+1.2.0 / 2014-06-13
+==================
+
+ * Passing string as `options` interpreted as encoding
+ * Support all encodings from `iconv-lite`
+
+1.1.7 / 2014-06-12
+==================
+
+ * use `string_decoder` module from npm
+
+1.1.6 / 2014-05-27
+==================
+
+ * check encoding for old streams1
+ * support node.js < 0.10.6
+
+1.1.5 / 2014-05-14
+==================
+
+ * bump bytes
+
+1.1.4 / 2014-04-19
+==================
+
+ * allow true as an option
+ * bump bytes
+
+1.1.3 / 2014-03-02
+==================
+
+ * fix case when length=null
+
+1.1.2 / 2013-12-01
+==================
+
+ * be less strict on state.encoding check
+
+1.1.1 / 2013-11-27
+==================
+
+ * add engines
+
+1.1.0 / 2013-11-27
+==================
+
+ * add err.statusCode and err.type
+ * allow for encoding option to be true
+ * pause the stream instead of dumping on error
+ * throw if the stream's encoding is set
+
+1.0.1 / 2013-11-19
+==================
+
+ * dont support streams1, throw if dev set encoding
+
+1.0.0 / 2013-11-17
+==================
+
+ * rename `expected` option to `length`
+
+0.2.0 / 2013-11-15
+==================
+
+ * republish
+
+0.1.1 / 2013-11-15
+==================
+
+ * use bytes
+
+0.1.0 / 2013-11-11
+==================
+
+ * generator support
+
+0.0.3 / 2013-10-10
+==================
+
+ * update repo
+
+0.0.2 / 2013-09-14
+==================
+
+ * dump stream on bad headers
+ * listen to events after defining received and buffers
+
+0.0.1 / 2013-09-14
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/LICENSE b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/LICENSE
new file mode 100644
index 0000000..1af6bb3
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/README.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/README.md
new file mode 100644
index 0000000..9b610b2
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/README.md
@@ -0,0 +1,95 @@
+# raw-body
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![Dependency Status][david-image]][david-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+Gets the entire buffer of a stream either as a `Buffer` or a string.
+Validates the stream's length against an expected length and maximum limit.
+Ideal for parsing request bodies.
+
+## API
+
+```js
+var getRawBody = require('raw-body')
+var typer = require('media-typer')
+
+app.use(function (req, res, next) {
+ getRawBody(req, {
+ length: req.headers['content-length'],
+ limit: '1mb',
+ encoding: typer.parse(req.headers['content-type']).parameters.charset
+ }, function (err, string) {
+ if (err)
+ return next(err)
+
+ req.text = string
+ next()
+ })
+})
+```
+
+or in a Koa generator:
+
+```js
+app.use(function* (next) {
+ var string = yield getRawBody(this.req, {
+ length: this.length,
+ limit: '1mb',
+ encoding: this.charset
+ })
+})
+```
+
+### getRawBody(stream, [options], [callback])
+
+Returns a thunk for yielding with generators.
+
+Options:
+
+- `length` - The length length of the stream.
+ If the contents of the stream do not add up to this length,
+ an `400` error code is returned.
+- `limit` - The byte limit of the body.
+ If the body ends up being larger than this limit,
+ a `413` error code is returned.
+- `encoding` - The requested encoding.
+ By default, a `Buffer` instance will be returned.
+ Most likely, you want `utf8`.
+ You can use any type of encoding supported by [iconv-lite](https://www.npmjs.org/package/iconv-lite#readme).
+
+You can also pass a string in place of options to just specify the encoding.
+
+`callback(err, res)`:
+
+- `err` - the following attributes will be defined if applicable:
+
+ - `limit` - the limit in bytes
+ - `length` and `expected` - the expected length of the stream
+ - `received` - the received bytes
+ - `encoding` - the invalid encoding
+ - `status` and `statusCode` - the corresponding status code for the error
+ - `type` - either `entity.too.large`, `request.size.invalid`, `stream.encoding.set`, or `encoding.unsupported`
+
+- `res` - the result, either as a `String` if an encoding was set or a `Buffer` otherwise.
+
+If an error occurs, the stream will be paused, everything unpiped,
+and you are responsible for correctly disposing the stream.
+For HTTP requests, no handling is required if you send a response.
+For streams that use file descriptors, you should `stream.destroy()` or `stream.close()` to prevent leaks.
+
+[npm-image]: https://img.shields.io/npm/v/raw-body.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/raw-body
+[travis-image]: https://img.shields.io/travis/stream-utils/raw-body.svg?style=flat-square
+[travis-url]: https://travis-ci.org/stream-utils/raw-body
+[coveralls-image]: https://img.shields.io/coveralls/stream-utils/raw-body.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/stream-utils/raw-body
+[david-image]: http://img.shields.io/david/stream-utils/raw-body.svg?style=flat-square
+[david-url]: https://david-dm.org/stream-utils/raw-body
+[license-image]: http://img.shields.io/npm/l/raw-body.svg?style=flat-square
+[license-url]: LICENSE
+[downloads-image]: http://img.shields.io/npm/dm/raw-body.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/raw-body
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/index.js
new file mode 100644
index 0000000..c430d23
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/index.js
@@ -0,0 +1,224 @@
+var bytes = require('bytes')
+var iconv = require('iconv-lite')
+
+module.exports = function (stream, options, done) {
+ if (options === true || typeof options === 'string') {
+ // short cut for encoding
+ options = {
+ encoding: options
+ }
+ }
+
+ options = options || {}
+
+ if (typeof options === 'function') {
+ done = options
+ options = {}
+ }
+
+ // get encoding
+ var encoding = options.encoding !== true
+ ? options.encoding
+ : 'utf-8'
+
+ // convert the limit to an integer
+ var limit = null
+ if (typeof options.limit === 'number')
+ limit = options.limit
+ if (typeof options.limit === 'string')
+ limit = bytes(options.limit)
+
+ // convert the expected length to an integer
+ var length = null
+ if (options.length != null && !isNaN(options.length))
+ length = parseInt(options.length, 10)
+
+ // check the length and limit options.
+ // note: we intentionally leave the stream paused,
+ // so users should handle the stream themselves.
+ if (limit !== null && length !== null && length > limit) {
+ var err = makeError('request entity too large', 'entity.too.large')
+ err.status = err.statusCode = 413
+ err.length = err.expected = length
+ err.limit = limit
+ cleanup()
+ halt(stream)
+ process.nextTick(function () {
+ done(err)
+ })
+ return defer
+ }
+
+ // streams1: assert request encoding is buffer.
+ // streams2+: assert the stream encoding is buffer.
+ // stream._decoder: streams1
+ // state.encoding: streams2
+ // state.decoder: streams2, specifically < 0.10.6
+ var state = stream._readableState
+ if (stream._decoder || (state && (state.encoding || state.decoder))) {
+ // developer error
+ var err = makeError('stream encoding should not be set',
+ 'stream.encoding.set')
+ err.status = err.statusCode = 500
+ cleanup()
+ halt(stream)
+ process.nextTick(function () {
+ done(err)
+ })
+ return defer
+ }
+
+ var received = 0
+ var decoder
+
+ try {
+ decoder = getDecoder(encoding)
+ } catch (err) {
+ cleanup()
+ halt(stream)
+ process.nextTick(function () {
+ done(err)
+ })
+ return defer
+ }
+
+ var buffer = decoder
+ ? ''
+ : []
+
+ stream.on('data', onData)
+ stream.once('end', onEnd)
+ stream.once('error', onEnd)
+ stream.once('close', cleanup)
+
+ return defer
+
+ // yieldable support
+ function defer(fn) {
+ done = fn
+ }
+
+ function onData(chunk) {
+ received += chunk.length
+ decoder
+ ? buffer += decoder.write(chunk)
+ : buffer.push(chunk)
+
+ if (limit !== null && received > limit) {
+ var err = makeError('request entity too large', 'entity.too.large')
+ err.status = err.statusCode = 413
+ err.received = received
+ err.limit = limit
+ cleanup()
+ halt(stream)
+ done(err)
+ }
+ }
+
+ function onEnd(err) {
+ if (err) {
+ cleanup()
+ halt(stream)
+ done(err)
+ } else if (length !== null && received !== length) {
+ err = makeError('request size did not match content length',
+ 'request.size.invalid')
+ err.status = err.statusCode = 400
+ err.received = received
+ err.length = err.expected = length
+ cleanup()
+ done(err)
+ } else {
+ var string = decoder
+ ? buffer + (decoder.end() || '')
+ : Buffer.concat(buffer)
+ cleanup()
+ done(null, string)
+ }
+ }
+
+ function cleanup() {
+ received = buffer = null
+
+ stream.removeListener('data', onData)
+ stream.removeListener('end', onEnd)
+ stream.removeListener('error', onEnd)
+ stream.removeListener('close', cleanup)
+ }
+}
+
+function getDecoder(encoding) {
+ if (!encoding) return null
+
+ try {
+ return iconv.getCodec(encoding).decoder()
+ } catch (e) {
+ var err = makeError('specified encoding unsupported', 'encoding.unsupported')
+ err.status = err.statusCode = 415
+ err.encoding = encoding
+ throw err
+ }
+}
+
+/**
+ * Halt a stream.
+ *
+ * @param {Object} stream
+ * @api private
+ */
+
+function halt(stream) {
+ // unpipe everything from the stream
+ unpipe(stream)
+
+ // pause stream
+ if (typeof stream.pause === 'function') {
+ stream.pause()
+ }
+}
+
+// to create serializable errors you must re-set message so
+// that it is enumerable and you must re configure the type
+// property so that is writable and enumerable
+function makeError(message, type) {
+ var error = new Error()
+ error.message = message
+ Object.defineProperty(error, 'type', {
+ value: type,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ })
+ return error
+}
+
+/**
+ * Unpipe everything from a stream.
+ *
+ * @param {Object} stream
+ * @api private
+ */
+
+/* istanbul ignore next: implementation differs between versions */
+function unpipe(stream) {
+ if (typeof stream.unpipe === 'function') {
+ // new-style
+ stream.unpipe()
+ return
+ }
+
+ // Node.js 0.8 hack
+ var listener
+ var listeners = stream.listeners('close')
+
+ for (var i = 0; i < listeners.length; i++) {
+ listener = listeners[i]
+
+ if (listener.name !== 'cleanup' && listener.name !== 'onclose') {
+ continue
+ }
+
+ // invoke the listener
+ listener.call(stream)
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/package.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/package.json
new file mode 100644
index 0000000..7c9731c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/raw-body/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "raw-body",
+ "description": "Get and validate the raw body of a readable stream.",
+ "version": "1.3.2",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Raynos",
+ "email": "raynos2@gmail.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/stream-utils/raw-body"
+ },
+ "dependencies": {
+ "bytes": "1.0.0",
+ "iconv-lite": "0.4.6"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~2.1.0",
+ "readable-stream": "~1.0.33",
+ "through2": "0.6.3"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec test/"
+ },
+ "gitHead": "8a5d04462f753f106eaaa762af552e5303a2c26e",
+ "bugs": {
+ "url": "https://github.com/stream-utils/raw-body/issues"
+ },
+ "homepage": "https://github.com/stream-utils/raw-body",
+ "_id": "raw-body@1.3.2",
+ "_shasum": "0e186f27c5fbfe326d8b3062774804564a0ecf93",
+ "_from": "raw-body@1.3.2",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "0e186f27c5fbfe326d8b3062774804564a0ecf93",
+ "tarball": "http://registry.npmjs.org/raw-body/-/raw-body-1.3.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.3.2.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/HISTORY.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/HISTORY.md
new file mode 100644
index 0000000..e3cab75
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/HISTORY.md
@@ -0,0 +1,115 @@
+1.5.7 / 2015-02-09
+==================
+
+ * fix argument reassignment
+ * deps: mime-types@~2.0.9
+ - Add new mime types
+
+1.5.6 / 2015-01-29
+==================
+
+ * deps: mime-types@~2.0.8
+ - Add new mime types
+
+1.5.5 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.7
+ - Add new mime types
+ - Fix missing extensions
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+ - deps: mime-db@~1.5.0
+
+1.5.4 / 2014-12-10
+==================
+
+ * deps: mime-types@~2.0.4
+ - Add new mime types
+ - deps: mime-db@~1.3.0
+
+1.5.3 / 2014-11-09
+==================
+
+ * deps: mime-types@~2.0.3
+ - Add new mime types
+ - deps: mime-db@~1.2.0
+
+1.5.2 / 2014-09-28
+==================
+
+ * deps: mime-types@~2.0.2
+ - Add new mime types
+ - deps: mime-db@~1.1.0
+
+1.5.1 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+ * deps: media-typer@0.3.0
+ * deps: mime-types@~2.0.1
+ - Support Node.js 0.6
+
+1.5.0 / 2014-09-05
+==================
+
+ * fix `hasbody` to be true for `content-length: 0`
+
+1.4.0 / 2014-09-02
+==================
+
+ * update mime-types
+
+1.3.2 / 2014-06-24
+==================
+
+ * use `~` range on mime-types
+
+1.3.1 / 2014-06-19
+==================
+
+ * fix global variable leak
+
+1.3.0 / 2014-06-19
+==================
+
+ * improve type parsing
+
+ - invalid media type never matches
+ - media type not case-sensitive
+ - extra LWS does not affect results
+
+1.2.2 / 2014-06-19
+==================
+
+ * fix behavior on unknown type argument
+
+1.2.1 / 2014-06-03
+==================
+
+ * switch dependency from `mime` to `mime-types@1.0.0`
+
+1.2.0 / 2014-05-11
+==================
+
+ * support suffix matching:
+
+ - `+json` matches `application/vnd+json`
+ - `*/vnd+json` matches `application/vnd+json`
+ - `application/*+json` matches `application/vnd+json`
+
+1.1.0 / 2014-04-12
+==================
+
+ * add non-array values support
+ * expose internal utilities:
+
+ - `.is()`
+ - `.hasBody()`
+ - `.normalize()`
+ - `.match()`
+
+1.0.1 / 2014-03-30
+==================
+
+ * add `multipart` as a shorthand
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/LICENSE b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/LICENSE
new file mode 100644
index 0000000..4164d08
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/README.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/README.md
new file mode 100644
index 0000000..0beeed8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/README.md
@@ -0,0 +1,117 @@
+# type-is
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Infer the content-type of a request.
+
+### Install
+
+```sh
+$ npm install type-is
+```
+
+## API
+
+```js
+var http = require('http')
+var is = require('type-is')
+
+http.createServer(function (req, res) {
+ var istext = is(req, ['text/*'])
+ res.end('you ' + (istext ? 'sent' : 'did not send') + ' me text')
+})
+```
+
+### type = is(request, types)
+
+`request` is the node HTTP request. `types` is an array of types.
+
+```js
+// req.headers.content-type = 'application/json'
+
+is(req, ['json']) // 'json'
+is(req, ['html', 'json']) // 'json'
+is(req, ['application/*']) // 'application/json'
+is(req, ['application/json']) // 'application/json'
+
+is(req, ['html']) // false
+```
+
+### type = is.is(mediaType, types)
+
+`mediaType` is the [media type](https://tools.ietf.org/html/rfc6838) string. `types` is an array of types.
+
+```js
+var mediaType = 'application/json'
+
+is.is(mediaType, ['json']) // 'json'
+is.is(mediaType, ['html', 'json']) // 'json'
+is.is(mediaType, ['application/*']) // 'application/json'
+is.is(mediaType, ['application/json']) // 'application/json'
+
+is.is(mediaType, ['html']) // false
+```
+
+### Each type can be:
+
+- An extension name such as `json`. This name will be returned if matched.
+- A mime type such as `application/json`.
+- A mime type with a wildcard such as `*/json` or `application/*`. The full mime type will be returned if matched
+- A suffix such as `+json`. This can be combined with a wildcard such as `*/vnd+json` or `application/*+json`. The full mime type will be returned if matched.
+
+`false` will be returned if no type matches.
+
+`null` will be returned if the request does not have a body.
+
+## Examples
+
+#### Example body parser
+
+```js
+var is = require('type-is');
+
+function bodyParser(req, res, next) {
+ if (!is.hasBody(req)) {
+ return next()
+ }
+
+ switch (is(req, ['urlencoded', 'json', 'multipart'])) {
+ case 'urlencoded':
+ // parse urlencoded body
+ throw new Error('implement urlencoded body parsing')
+ break
+ case 'json':
+ // parse json body
+ throw new Error('implement json body parsing')
+ break
+ case 'multipart':
+ // parse multipart body
+ throw new Error('implement multipart body parsing')
+ break
+ default:
+ // 415 error code
+ res.statusCode = 415
+ res.end()
+ return
+ }
+}
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/type-is.svg?style=flat
+[npm-url]: https://npmjs.org/package/type-is
+[node-version-image]: https://img.shields.io/node/v/type-is.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/type-is.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/type-is
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/type-is.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/type-is?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/type-is.svg?style=flat
+[downloads-url]: https://npmjs.org/package/type-is
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/index.js
new file mode 100644
index 0000000..73e885a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/index.js
@@ -0,0 +1,228 @@
+
+var typer = require('media-typer')
+var mime = require('mime-types')
+
+module.exports = typeofrequest;
+typeofrequest.is = typeis;
+typeofrequest.hasBody = hasbody;
+typeofrequest.normalize = normalize;
+typeofrequest.match = mimeMatch;
+
+/**
+ * Compare a `value` content-type with `types`.
+ * Each `type` can be an extension like `html`,
+ * a special shortcut like `multipart` or `urlencoded`,
+ * or a mime type.
+ *
+ * If no types match, `false` is returned.
+ * Otherwise, the first `type` that matches is returned.
+ *
+ * @param {String} value
+ * @param {Array} types
+ * @return String
+ */
+
+function typeis(value, types_) {
+ var i
+ var types = types_
+
+ // remove parameters and normalize
+ var val = typenormalize(value)
+
+ // no type or invalid
+ if (!val) {
+ return false
+ }
+
+ // support flattened arguments
+ if (types && !Array.isArray(types)) {
+ types = new Array(arguments.length - 1)
+ for (i = 0; i < types.length; i++) {
+ types[i] = arguments[i + 1]
+ }
+ }
+
+ // no types, return the content type
+ if (!types || !types.length) {
+ return val
+ }
+
+ var type
+ for (i = 0; i < types.length; i++) {
+ if (mimeMatch(normalize(type = types[i]), val)) {
+ return type[0] === '+' || ~type.indexOf('*')
+ ? val
+ : type
+ }
+ }
+
+ // no matches
+ return false;
+}
+
+/**
+ * Check if a request has a request body.
+ * A request with a body __must__ either have `transfer-encoding`
+ * or `content-length` headers set.
+ * http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3
+ *
+ * @param {Object} request
+ * @return {Boolean}
+ * @api public
+ */
+
+function hasbody(req) {
+ var headers = req.headers;
+ if ('transfer-encoding' in headers) return true;
+ return !isNaN(headers['content-length']);
+}
+
+/**
+ * Check if the incoming request contains the "Content-Type"
+ * header field, and it contains any of the give mime `type`s.
+ * If there is no request body, `null` is returned.
+ * If there is no content type, `false` is returned.
+ * Otherwise, it returns the first `type` that matches.
+ *
+ * Examples:
+ *
+ * // With Content-Type: text/html; charset=utf-8
+ * this.is('html'); // => 'html'
+ * this.is('text/html'); // => 'text/html'
+ * this.is('text/*', 'application/json'); // => 'text/html'
+ *
+ * // When Content-Type is application/json
+ * this.is('json', 'urlencoded'); // => 'json'
+ * this.is('application/json'); // => 'application/json'
+ * this.is('html', 'application/*'); // => 'application/json'
+ *
+ * this.is('html'); // => false
+ *
+ * @param {String|Array} types...
+ * @return {String|false|null}
+ * @api public
+ */
+
+function typeofrequest(req, types_) {
+ var types = types_
+
+ // no body
+ if (!hasbody(req)) {
+ return null
+ }
+
+ // support flattened arguments
+ if (arguments.length > 2) {
+ types = new Array(arguments.length - 1)
+ for (var i = 0; i < types.length; i++) {
+ types[i] = arguments[i + 1]
+ }
+ }
+
+ // request content type
+ var value = req.headers['content-type']
+
+ return typeis(value, types);
+}
+
+/**
+ * Normalize a mime type.
+ * If it's a shorthand, expand it to a valid mime type.
+ *
+ * In general, you probably want:
+ *
+ * var type = is(req, ['urlencoded', 'json', 'multipart']);
+ *
+ * Then use the appropriate body parsers.
+ * These three are the most common request body types
+ * and are thus ensured to work.
+ *
+ * @param {String} type
+ * @api private
+ */
+
+function normalize(type) {
+ switch (type) {
+ case 'urlencoded': return 'application/x-www-form-urlencoded';
+ case 'multipart':
+ type = 'multipart/*';
+ break;
+ }
+
+ return type[0] === '+' || ~type.indexOf('/')
+ ? type
+ : mime.lookup(type)
+}
+
+/**
+ * Check if `exected` mime type
+ * matches `actual` mime type with
+ * wildcard and +suffix support.
+ *
+ * @param {String} expected
+ * @param {String} actual
+ * @return {Boolean}
+ * @api private
+ */
+
+function mimeMatch(expected, actual) {
+ // invalid type
+ if (expected === false) {
+ return false
+ }
+
+ // exact match
+ if (expected === actual) {
+ return true
+ }
+
+ actual = actual.split('/');
+
+ if (expected[0] === '+') {
+ // support +suffix
+ return Boolean(actual[1])
+ && expected.length <= actual[1].length
+ && expected === actual[1].substr(0 - expected.length)
+ }
+
+ if (!~expected.indexOf('*')) return false;
+
+ expected = expected.split('/');
+
+ if (expected[0] === '*') {
+ // support */yyy
+ return expected[1] === actual[1]
+ }
+
+ if (expected[1] === '*') {
+ // support xxx/*
+ return expected[0] === actual[0]
+ }
+
+ if (expected[1][0] === '*' && expected[1][1] === '+') {
+ // support xxx/*+zzz
+ return expected[0] === actual[0]
+ && expected[1].length <= actual[1].length + 1
+ && expected[1].substr(1) === actual[1].substr(1 - expected[1].length)
+ }
+
+ return false
+}
+
+/**
+ * Normalize a type and remove parameters.
+ *
+ * @param {string} value
+ * @return {string}
+ * @api private
+ */
+
+function typenormalize(value) {
+ try {
+ var type = typer.parse(value)
+ delete type.parameters
+ return typer.format(type)
+ } catch (err) {
+ return null
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/HISTORY.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/HISTORY.md
new file mode 100644
index 0000000..da8b3f8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/HISTORY.md
@@ -0,0 +1,85 @@
+2.0.9 / 2015-02-09
+==================
+
+ * deps: mime-db@~1.7.0
+ - Add new mime types
+ - Community extensions ownership transferred from `node-mime`
+
+2.0.8 / 2015-01-29
+==================
+
+ * deps: mime-db@~1.6.0
+ - Add new mime types
+
+2.0.7 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.5.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+
+2.0.6 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.4.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+
+2.0.5 / 2014-12-29
+==================
+
+ * deps: mime-db@~1.3.1
+ - Fix missing extensions
+
+2.0.4 / 2014-12-10
+==================
+
+ * deps: mime-db@~1.3.0
+ - Add new mime types
+
+2.0.3 / 2014-11-09
+==================
+
+ * deps: mime-db@~1.2.0
+ - Add new mime types
+
+2.0.2 / 2014-09-28
+==================
+
+ * deps: mime-db@~1.1.0
+ - Add new mime types
+ - Add additional compressible
+ - Update charsets
+
+2.0.1 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+
+2.0.0 / 2014-09-02
+==================
+
+ * Use `mime-db`
+ * Remove `.define()`
+
+1.0.2 / 2014-08-04
+==================
+
+ * Set charset=utf-8 for `text/javascript`
+
+1.0.1 / 2014-06-24
+==================
+
+ * Add `text/jsx` type
+
+1.0.0 / 2014-05-12
+==================
+
+ * Return `false` for unknown types
+ * Set charset=utf-8 for `application/json`
+
+0.1.0 / 2014-05-02
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/LICENSE b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/README.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/README.md
new file mode 100644
index 0000000..99d658b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/README.md
@@ -0,0 +1,99 @@
+# mime-types
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+The ultimate javascript content-type utility.
+
+Similar to [node-mime](https://github.com/broofa/node-mime), except:
+
+- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`,
+ so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
+- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
+- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db)
+- No `.define()` functionality
+
+Otherwise, the API is compatible.
+
+## Install
+
+```sh
+$ npm install mime-types
+```
+
+## Adding Types
+
+All mime types are based on [mime-db](https://github.com/jshttp/mime-db),
+so open a PR there if you'd like to add mime types.
+
+## API
+
+```js
+var mime = require('mime-types')
+```
+
+All functions return `false` if input is invalid or not found.
+
+### mime.lookup(path)
+
+Lookup the content-type associated with a file.
+
+```js
+mime.lookup('json') // 'application/json'
+mime.lookup('.md') // 'text/x-markdown'
+mime.lookup('file.html') // 'text/html'
+mime.lookup('folder/file.js') // 'application/javascript'
+
+mime.lookup('cats') // false
+```
+
+### mime.contentType(type)
+
+Create a full content-type header given a content-type or extension.
+
+```js
+mime.contentType('markdown') // 'text/x-markdown; charset=utf-8'
+mime.contentType('file.json') // 'application/json; charset=utf-8'
+```
+
+### mime.extension(type)
+
+Get the default extension for a content-type.
+
+```js
+mime.extension('application/octet-stream') // 'bin'
+```
+
+### mime.charset(type)
+
+Lookup the implied default charset of a content-type.
+
+```js
+mime.charset('text/x-markdown') // 'UTF-8'
+```
+
+### var type = mime.types[extension]
+
+A map of content-types by extension.
+
+### [extensions...] = mime.extensions[type]
+
+A map of extensions by content-type.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/mime-types.svg?style=flat
+[npm-url]: https://npmjs.org/package/mime-types
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/mime-types.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/mime-types
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-types
+[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg?style=flat
+[downloads-url]: https://npmjs.org/package/mime-types
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/index.js
new file mode 100644
index 0000000..b46a202
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/index.js
@@ -0,0 +1,63 @@
+
+var db = require('mime-db')
+
+// types[extension] = type
+exports.types = Object.create(null)
+// extensions[type] = [extensions]
+exports.extensions = Object.create(null)
+
+Object.keys(db).forEach(function (name) {
+ var mime = db[name]
+ var exts = mime.extensions
+ if (!exts || !exts.length) return
+ exports.extensions[name] = exts
+ exts.forEach(function (ext) {
+ exports.types[ext] = name
+ })
+})
+
+exports.lookup = function (string) {
+ if (!string || typeof string !== "string") return false
+ // remove any leading paths, though we should just use path.basename
+ string = string.replace(/.*[\.\/\\]/, '').toLowerCase()
+ if (!string) return false
+ return exports.types[string] || false
+}
+
+exports.extension = function (type) {
+ if (!type || typeof type !== "string") return false
+ // to do: use media-typer
+ type = type.match(/^\s*([^;\s]*)(?:;|\s|$)/)
+ if (!type) return false
+ var exts = exports.extensions[type[1].toLowerCase()]
+ if (!exts || !exts.length) return false
+ return exts[0]
+}
+
+// type has to be an exact mime type
+exports.charset = function (type) {
+ var mime = db[type]
+ if (mime && mime.charset) return mime.charset
+
+ // default text/* to utf-8
+ if (/^text\//.test(type)) return 'UTF-8'
+
+ return false
+}
+
+// backwards compatibility
+exports.charsets = {
+ lookup: exports.charset
+}
+
+// to do: maybe use set-type module or something
+exports.contentType = function (type) {
+ if (!type || typeof type !== "string") return false
+ if (!~type.indexOf('/')) type = exports.lookup(type)
+ if (!type) return false
+ if (!~type.indexOf('charset')) {
+ var charset = exports.charset(type)
+ if (charset) type += '; charset=' + charset.toLowerCase()
+ }
+ return type
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md
new file mode 100644
index 0000000..e5ffba4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md
@@ -0,0 +1,166 @@
+1.7.0 / 2015-02-08
+==================
+
+ * Add `application/vnd.gerber`
+ * Add `application/vnd.msa-disk-image`
+
+1.6.1 / 2015-02-05
+==================
+
+ * Community extensions ownership transferred from `node-mime`
+
+1.6.0 / 2015-01-29
+==================
+
+ * Add `application/jose`
+ * Add `application/jose+json`
+ * Add `application/json-seq`
+ * Add `application/jwk+json`
+ * Add `application/jwk-set+json`
+ * Add `application/jwt`
+ * Add `application/rdap+json`
+ * Add `application/vnd.gov.sk.e-form+xml`
+ * Add `application/vnd.ims.imsccv1p3`
+
+1.5.0 / 2014-12-30
+==================
+
+ * Add `application/vnd.oracle.resource+json`
+ * Fix various invalid MIME type entries
+ - `application/mbox+xml`
+ - `application/oscp-response`
+ - `application/vwg-multiplexed`
+ - `audio/g721`
+
+1.4.0 / 2014-12-21
+==================
+
+ * Add `application/vnd.ims.imsccv1p2`
+ * Fix various invalid MIME type entries
+ - `application/vnd-acucobol`
+ - `application/vnd-curl`
+ - `application/vnd-dart`
+ - `application/vnd-dxr`
+ - `application/vnd-fdf`
+ - `application/vnd-mif`
+ - `application/vnd-sema`
+ - `application/vnd-wap-wmlc`
+ - `application/vnd.adobe.flash-movie`
+ - `application/vnd.dece-zip`
+ - `application/vnd.dvb_service`
+ - `application/vnd.micrografx-igx`
+ - `application/vnd.sealed-doc`
+ - `application/vnd.sealed-eml`
+ - `application/vnd.sealed-mht`
+ - `application/vnd.sealed-ppt`
+ - `application/vnd.sealed-tiff`
+ - `application/vnd.sealed-xls`
+ - `application/vnd.sealedmedia.softseal-html`
+ - `application/vnd.sealedmedia.softseal-pdf`
+ - `application/vnd.wap-slc`
+ - `application/vnd.wap-wbxml`
+ - `audio/vnd.sealedmedia.softseal-mpeg`
+ - `image/vnd-djvu`
+ - `image/vnd-svf`
+ - `image/vnd-wap-wbmp`
+ - `image/vnd.sealed-png`
+ - `image/vnd.sealedmedia.softseal-gif`
+ - `image/vnd.sealedmedia.softseal-jpg`
+ - `model/vnd-dwf`
+ - `model/vnd.parasolid.transmit-binary`
+ - `model/vnd.parasolid.transmit-text`
+ - `text/vnd-a`
+ - `text/vnd-curl`
+ - `text/vnd.wap-wml`
+ * Remove example template MIME types
+ - `application/example`
+ - `audio/example`
+ - `image/example`
+ - `message/example`
+ - `model/example`
+ - `multipart/example`
+ - `text/example`
+ - `video/example`
+
+1.3.1 / 2014-12-16
+==================
+
+ * Fix missing extensions
+ - `application/json5`
+ - `text/hjson`
+
+1.3.0 / 2014-12-07
+==================
+
+ * Add `application/a2l`
+ * Add `application/aml`
+ * Add `application/atfx`
+ * Add `application/atxml`
+ * Add `application/cdfx+xml`
+ * Add `application/dii`
+ * Add `application/json5`
+ * Add `application/lxf`
+ * Add `application/mf4`
+ * Add `application/vnd.apache.thrift.compact`
+ * Add `application/vnd.apache.thrift.json`
+ * Add `application/vnd.coffeescript`
+ * Add `application/vnd.enphase.envoy`
+ * Add `application/vnd.ims.imsccv1p1`
+ * Add `text/csv-schema`
+ * Add `text/hjson`
+ * Add `text/markdown`
+ * Add `text/yaml`
+
+1.2.0 / 2014-11-09
+==================
+
+ * Add `application/cea`
+ * Add `application/dit`
+ * Add `application/vnd.gov.sk.e-form+zip`
+ * Add `application/vnd.tmd.mediaflex.api+xml`
+ * Type `application/epub+zip` is now IANA-registered
+
+1.1.2 / 2014-10-23
+==================
+
+ * Rebuild database for `application/x-www-form-urlencoded` change
+
+1.1.1 / 2014-10-20
+==================
+
+ * Mark `application/x-www-form-urlencoded` as compressible.
+
+1.1.0 / 2014-09-28
+==================
+
+ * Add `application/font-woff2`
+
+1.0.3 / 2014-09-25
+==================
+
+ * Fix engine requirement in package
+
+1.0.2 / 2014-09-25
+==================
+
+ * Add `application/coap-group+json`
+ * Add `application/dcd`
+ * Add `application/vnd.apache.thrift.binary`
+ * Add `image/vnd.tencent.tap`
+ * Mark all JSON-derived types as compressible
+ * Update `text/vtt` data
+
+1.0.1 / 2014-08-30
+==================
+
+ * Fix extension ordering
+
+1.0.0 / 2014-08-30
+==================
+
+ * Add `application/atf`
+ * Add `application/merge-patch+json`
+ * Add `multipart/x-mixed-replace`
+ * Add `source: 'apache'` metadata
+ * Add `source: 'iana'` metadata
+ * Remove badly-assumed charset data
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md
new file mode 100644
index 0000000..1dde234
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md
@@ -0,0 +1,76 @@
+# mime-db
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+
+This is a database of all mime types.
+It consists of a single, public JSON file and does not include any logic,
+allowing it to remain as un-opinionated as possible with an API.
+It aggregates data from the following sources:
+
+- http://www.iana.org/assignments/media-types/media-types.xhtml
+- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
+
+## Installation
+
+```bash
+npm install mime-db
+```
+
+If you're crazy enough to use this in the browser,
+you can just grab the JSON file:
+
+```
+https://cdn.rawgit.com/jshttp/mime-db/master/db.json
+```
+
+## Usage
+
+```js
+var db = require('mime-db');
+
+// grab data on .js files
+var data = db['application/javascript'];
+```
+
+## Data Structure
+
+The JSON file is a map lookup for lowercased mime types.
+Each mime type has the following properties:
+
+- `.source` - where the mime type is defined.
+ If not set, it's probably a custom media type.
+ - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
+ - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
+- `.extensions[]` - known extensions associated with this mime type.
+- `.compressible` - whether a file of this type is can be gzipped.
+- `.charset` - the default charset associated with this type, if any.
+
+If unknown, every property could be `undefined`.
+
+## Contributing
+
+To edit the database, only make PRs against `src/custom.json` or
+`src/custom-suffix.json`.
+
+To update the build, run `npm run update`.
+
+## Adding Custom Media Types
+
+The best way to get new media types included in this library is to register
+them with the IANA. The community registration procedure is outlined in
+[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
+registered with the IANA are automatically pulled into this library.
+
+[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg?style=flat
+[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg?style=flat
+[npm-url]: https://npmjs.org/package/mime-db
+[travis-image]: https://img.shields.io/travis/jshttp/mime-db.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/mime-db
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master
+[node-image]: https://img.shields.io/node/v/mime-db.svg?style=flat
+[node-url]: http://nodejs.org/download/
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json
new file mode 100644
index 0000000..283c1de
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json
@@ -0,0 +1,6299 @@
+{
+ "application/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "application/3gpdash-qoe-report+xml": {
+ "source": "iana"
+ },
+ "application/3gpp-ims+xml": {
+ "source": "iana"
+ },
+ "application/a2l": {
+ "source": "iana"
+ },
+ "application/activemessage": {
+ "source": "iana"
+ },
+ "application/alto-costmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-costmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-directory+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcost+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcostparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointprop+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointpropparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-error+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/aml": {
+ "source": "iana"
+ },
+ "application/andrew-inset": {
+ "source": "iana",
+ "extensions": ["ez"]
+ },
+ "application/applefile": {
+ "source": "iana"
+ },
+ "application/applixware": {
+ "source": "apache",
+ "extensions": ["aw"]
+ },
+ "application/atf": {
+ "source": "iana"
+ },
+ "application/atfx": {
+ "source": "iana"
+ },
+ "application/atom+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["atom"]
+ },
+ "application/atomcat+xml": {
+ "source": "iana",
+ "extensions": ["atomcat"]
+ },
+ "application/atomdeleted+xml": {
+ "source": "iana"
+ },
+ "application/atomicmail": {
+ "source": "iana"
+ },
+ "application/atomsvc+xml": {
+ "source": "iana",
+ "extensions": ["atomsvc"]
+ },
+ "application/atxml": {
+ "source": "iana"
+ },
+ "application/auth-policy+xml": {
+ "source": "iana"
+ },
+ "application/bacnet-xdd+zip": {
+ "source": "iana"
+ },
+ "application/batch-smtp": {
+ "source": "iana"
+ },
+ "application/beep+xml": {
+ "source": "iana"
+ },
+ "application/calendar+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/calendar+xml": {
+ "source": "iana"
+ },
+ "application/call-completion": {
+ "source": "iana"
+ },
+ "application/cals-1840": {
+ "source": "iana"
+ },
+ "application/cbor": {
+ "source": "iana"
+ },
+ "application/ccmp+xml": {
+ "source": "iana"
+ },
+ "application/ccxml+xml": {
+ "source": "iana",
+ "extensions": ["ccxml"]
+ },
+ "application/cdfx+xml": {
+ "source": "iana"
+ },
+ "application/cdmi-capability": {
+ "source": "iana",
+ "extensions": ["cdmia"]
+ },
+ "application/cdmi-container": {
+ "source": "iana",
+ "extensions": ["cdmic"]
+ },
+ "application/cdmi-domain": {
+ "source": "iana",
+ "extensions": ["cdmid"]
+ },
+ "application/cdmi-object": {
+ "source": "iana",
+ "extensions": ["cdmio"]
+ },
+ "application/cdmi-queue": {
+ "source": "iana",
+ "extensions": ["cdmiq"]
+ },
+ "application/cea": {
+ "source": "iana"
+ },
+ "application/cea-2018+xml": {
+ "source": "iana"
+ },
+ "application/cellml+xml": {
+ "source": "iana"
+ },
+ "application/cfw": {
+ "source": "iana"
+ },
+ "application/cms": {
+ "source": "iana"
+ },
+ "application/cnrp+xml": {
+ "source": "iana"
+ },
+ "application/coap-group+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/commonground": {
+ "source": "iana"
+ },
+ "application/conference-info+xml": {
+ "source": "iana"
+ },
+ "application/cpl+xml": {
+ "source": "iana"
+ },
+ "application/csrattrs": {
+ "source": "iana"
+ },
+ "application/csta+xml": {
+ "source": "iana"
+ },
+ "application/cstadata+xml": {
+ "source": "iana"
+ },
+ "application/cu-seeme": {
+ "source": "apache",
+ "extensions": ["cu"]
+ },
+ "application/cybercash": {
+ "source": "iana"
+ },
+ "application/dart": {
+ "compressible": true
+ },
+ "application/dash+xml": {
+ "source": "iana",
+ "extensions": ["mdp"]
+ },
+ "application/dashdelta": {
+ "source": "iana"
+ },
+ "application/davmount+xml": {
+ "source": "iana",
+ "extensions": ["davmount"]
+ },
+ "application/dca-rft": {
+ "source": "iana"
+ },
+ "application/dcd": {
+ "source": "iana"
+ },
+ "application/dec-dx": {
+ "source": "iana"
+ },
+ "application/dialog-info+xml": {
+ "source": "iana"
+ },
+ "application/dicom": {
+ "source": "iana"
+ },
+ "application/dii": {
+ "source": "iana"
+ },
+ "application/dit": {
+ "source": "iana"
+ },
+ "application/dns": {
+ "source": "iana"
+ },
+ "application/docbook+xml": {
+ "source": "apache",
+ "extensions": ["dbk"]
+ },
+ "application/dskpp+xml": {
+ "source": "iana"
+ },
+ "application/dssc+der": {
+ "source": "iana",
+ "extensions": ["dssc"]
+ },
+ "application/dssc+xml": {
+ "source": "iana",
+ "extensions": ["xdssc"]
+ },
+ "application/dvcs": {
+ "source": "iana"
+ },
+ "application/ecmascript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ecma"]
+ },
+ "application/edi-consent": {
+ "source": "iana"
+ },
+ "application/edi-x12": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/edifact": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/emma+xml": {
+ "source": "iana",
+ "extensions": ["emma"]
+ },
+ "application/emotionml+xml": {
+ "source": "iana"
+ },
+ "application/encaprtp": {
+ "source": "iana"
+ },
+ "application/epp+xml": {
+ "source": "iana"
+ },
+ "application/epub+zip": {
+ "source": "iana",
+ "extensions": ["epub"]
+ },
+ "application/eshop": {
+ "source": "iana"
+ },
+ "application/exi": {
+ "source": "iana",
+ "extensions": ["exi"]
+ },
+ "application/fastinfoset": {
+ "source": "iana"
+ },
+ "application/fastsoap": {
+ "source": "iana"
+ },
+ "application/fdt+xml": {
+ "source": "iana"
+ },
+ "application/fits": {
+ "source": "iana"
+ },
+ "application/font-sfnt": {
+ "source": "iana"
+ },
+ "application/font-tdpfr": {
+ "source": "iana",
+ "extensions": ["pfr"]
+ },
+ "application/font-woff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["woff"]
+ },
+ "application/font-woff2": {
+ "compressible": false,
+ "extensions": ["woff2"]
+ },
+ "application/framework-attributes+xml": {
+ "source": "iana"
+ },
+ "application/gml+xml": {
+ "source": "apache",
+ "extensions": ["gml"]
+ },
+ "application/gpx+xml": {
+ "source": "apache",
+ "extensions": ["gpx"]
+ },
+ "application/gxf": {
+ "source": "apache",
+ "extensions": ["gxf"]
+ },
+ "application/gzip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/h224": {
+ "source": "iana"
+ },
+ "application/held+xml": {
+ "source": "iana"
+ },
+ "application/http": {
+ "source": "iana"
+ },
+ "application/hyperstudio": {
+ "source": "iana",
+ "extensions": ["stk"]
+ },
+ "application/ibe-key-request+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pkg-reply+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pp-data": {
+ "source": "iana"
+ },
+ "application/iges": {
+ "source": "iana"
+ },
+ "application/im-iscomposing+xml": {
+ "source": "iana"
+ },
+ "application/index": {
+ "source": "iana"
+ },
+ "application/index.cmd": {
+ "source": "iana"
+ },
+ "application/index.obj": {
+ "source": "iana"
+ },
+ "application/index.response": {
+ "source": "iana"
+ },
+ "application/index.vnd": {
+ "source": "iana"
+ },
+ "application/inkml+xml": {
+ "source": "iana",
+ "extensions": ["ink","inkml"]
+ },
+ "application/iotp": {
+ "source": "iana"
+ },
+ "application/ipfix": {
+ "source": "iana",
+ "extensions": ["ipfix"]
+ },
+ "application/ipp": {
+ "source": "iana"
+ },
+ "application/isup": {
+ "source": "iana"
+ },
+ "application/its+xml": {
+ "source": "iana"
+ },
+ "application/java-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jar"]
+ },
+ "application/java-serialized-object": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ser"]
+ },
+ "application/java-vm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["class"]
+ },
+ "application/javascript": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["js"]
+ },
+ "application/jose": {
+ "source": "iana"
+ },
+ "application/jose+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jrd+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["json","map"]
+ },
+ "application/json-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json-seq": {
+ "source": "iana"
+ },
+ "application/json5": {
+ "extensions": ["json5"]
+ },
+ "application/jsonml+json": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["jsonml"]
+ },
+ "application/jwk+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwk-set+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwt": {
+ "source": "iana"
+ },
+ "application/kpml-request+xml": {
+ "source": "iana"
+ },
+ "application/kpml-response+xml": {
+ "source": "iana"
+ },
+ "application/ld+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/link-format": {
+ "source": "iana"
+ },
+ "application/load-control+xml": {
+ "source": "iana"
+ },
+ "application/lost+xml": {
+ "source": "iana",
+ "extensions": ["lostxml"]
+ },
+ "application/lostsync+xml": {
+ "source": "iana"
+ },
+ "application/lxf": {
+ "source": "iana"
+ },
+ "application/mac-binhex40": {
+ "source": "iana",
+ "extensions": ["hqx"]
+ },
+ "application/mac-compactpro": {
+ "source": "apache",
+ "extensions": ["cpt"]
+ },
+ "application/macwriteii": {
+ "source": "iana"
+ },
+ "application/mads+xml": {
+ "source": "iana",
+ "extensions": ["mads"]
+ },
+ "application/marc": {
+ "source": "iana",
+ "extensions": ["mrc"]
+ },
+ "application/marcxml+xml": {
+ "source": "iana",
+ "extensions": ["mrcx"]
+ },
+ "application/mathematica": {
+ "source": "iana",
+ "extensions": ["ma","nb","mb"]
+ },
+ "application/mathml+xml": {
+ "source": "iana",
+ "extensions": ["mathml"]
+ },
+ "application/mathml-content+xml": {
+ "source": "iana"
+ },
+ "application/mathml-presentation+xml": {
+ "source": "iana"
+ },
+ "application/mbms-associated-procedure-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-deregister+xml": {
+ "source": "iana"
+ },
+ "application/mbms-envelope+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-protection-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-reception-report+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-schedule+xml": {
+ "source": "iana"
+ },
+ "application/mbms-user-service-description+xml": {
+ "source": "iana"
+ },
+ "application/mbox": {
+ "source": "iana",
+ "extensions": ["mbox"]
+ },
+ "application/media-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/media_control+xml": {
+ "source": "iana"
+ },
+ "application/mediaservercontrol+xml": {
+ "source": "iana",
+ "extensions": ["mscml"]
+ },
+ "application/merge-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/metalink+xml": {
+ "source": "apache",
+ "extensions": ["metalink"]
+ },
+ "application/metalink4+xml": {
+ "source": "iana",
+ "extensions": ["meta4"]
+ },
+ "application/mets+xml": {
+ "source": "iana",
+ "extensions": ["mets"]
+ },
+ "application/mf4": {
+ "source": "iana"
+ },
+ "application/mikey": {
+ "source": "iana"
+ },
+ "application/mods+xml": {
+ "source": "iana",
+ "extensions": ["mods"]
+ },
+ "application/moss-keys": {
+ "source": "iana"
+ },
+ "application/moss-signature": {
+ "source": "iana"
+ },
+ "application/mosskey-data": {
+ "source": "iana"
+ },
+ "application/mosskey-request": {
+ "source": "iana"
+ },
+ "application/mp21": {
+ "source": "iana",
+ "extensions": ["m21","mp21"]
+ },
+ "application/mp4": {
+ "source": "iana",
+ "extensions": ["mp4s","m4p"]
+ },
+ "application/mpeg4-generic": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod-xmt": {
+ "source": "iana"
+ },
+ "application/mrb-consumer+xml": {
+ "source": "iana"
+ },
+ "application/mrb-publish+xml": {
+ "source": "iana"
+ },
+ "application/msc-ivr+xml": {
+ "source": "iana"
+ },
+ "application/msc-mixer+xml": {
+ "source": "iana"
+ },
+ "application/msword": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["doc","dot"]
+ },
+ "application/mxf": {
+ "source": "iana",
+ "extensions": ["mxf"]
+ },
+ "application/nasdata": {
+ "source": "iana"
+ },
+ "application/news-checkgroups": {
+ "source": "iana"
+ },
+ "application/news-groupinfo": {
+ "source": "iana"
+ },
+ "application/news-transmission": {
+ "source": "iana"
+ },
+ "application/nlsml+xml": {
+ "source": "iana"
+ },
+ "application/nss": {
+ "source": "iana"
+ },
+ "application/ocsp-request": {
+ "source": "iana"
+ },
+ "application/ocsp-response": {
+ "source": "iana"
+ },
+ "application/octet-stream": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","buffer"]
+ },
+ "application/oda": {
+ "source": "iana",
+ "extensions": ["oda"]
+ },
+ "application/odx": {
+ "source": "iana"
+ },
+ "application/oebps-package+xml": {
+ "source": "iana",
+ "extensions": ["opf"]
+ },
+ "application/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ogx"]
+ },
+ "application/omdoc+xml": {
+ "source": "apache",
+ "extensions": ["omdoc"]
+ },
+ "application/onenote": {
+ "source": "apache",
+ "extensions": ["onetoc","onetoc2","onetmp","onepkg"]
+ },
+ "application/oxps": {
+ "source": "iana",
+ "extensions": ["oxps"]
+ },
+ "application/p2p-overlay+xml": {
+ "source": "iana"
+ },
+ "application/parityfec": {
+ "source": "iana"
+ },
+ "application/patch-ops-error+xml": {
+ "source": "iana",
+ "extensions": ["xer"]
+ },
+ "application/pdf": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pdf"]
+ },
+ "application/pdx": {
+ "source": "iana"
+ },
+ "application/pgp-encrypted": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pgp"]
+ },
+ "application/pgp-keys": {
+ "source": "iana"
+ },
+ "application/pgp-signature": {
+ "source": "iana",
+ "extensions": ["asc","sig"]
+ },
+ "application/pics-rules": {
+ "source": "apache",
+ "extensions": ["prf"]
+ },
+ "application/pidf+xml": {
+ "source": "iana"
+ },
+ "application/pidf-diff+xml": {
+ "source": "iana"
+ },
+ "application/pkcs10": {
+ "source": "iana",
+ "extensions": ["p10"]
+ },
+ "application/pkcs7-mime": {
+ "source": "iana",
+ "extensions": ["p7m","p7c"]
+ },
+ "application/pkcs7-signature": {
+ "source": "iana",
+ "extensions": ["p7s"]
+ },
+ "application/pkcs8": {
+ "source": "iana",
+ "extensions": ["p8"]
+ },
+ "application/pkix-attr-cert": {
+ "source": "iana",
+ "extensions": ["ac"]
+ },
+ "application/pkix-cert": {
+ "source": "iana",
+ "extensions": ["cer"]
+ },
+ "application/pkix-crl": {
+ "source": "iana",
+ "extensions": ["crl"]
+ },
+ "application/pkix-pkipath": {
+ "source": "iana",
+ "extensions": ["pkipath"]
+ },
+ "application/pkixcmp": {
+ "source": "iana",
+ "extensions": ["pki"]
+ },
+ "application/pls+xml": {
+ "source": "iana",
+ "extensions": ["pls"]
+ },
+ "application/poc-settings+xml": {
+ "source": "iana"
+ },
+ "application/postscript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ai","eps","ps"]
+ },
+ "application/provenance+xml": {
+ "source": "iana"
+ },
+ "application/prs.alvestrand.titrax-sheet": {
+ "source": "iana"
+ },
+ "application/prs.cww": {
+ "source": "iana",
+ "extensions": ["cww"]
+ },
+ "application/prs.hpub+zip": {
+ "source": "iana"
+ },
+ "application/prs.nprend": {
+ "source": "iana"
+ },
+ "application/prs.plucker": {
+ "source": "iana"
+ },
+ "application/prs.rdf-xml-crypt": {
+ "source": "iana"
+ },
+ "application/prs.xsf+xml": {
+ "source": "iana"
+ },
+ "application/pskc+xml": {
+ "source": "iana",
+ "extensions": ["pskcxml"]
+ },
+ "application/qsig": {
+ "source": "iana"
+ },
+ "application/raptorfec": {
+ "source": "iana"
+ },
+ "application/rdap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/rdf+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rdf"]
+ },
+ "application/reginfo+xml": {
+ "source": "iana",
+ "extensions": ["rif"]
+ },
+ "application/relax-ng-compact-syntax": {
+ "source": "iana",
+ "extensions": ["rnc"]
+ },
+ "application/remote-printing": {
+ "source": "iana"
+ },
+ "application/reputon+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/resource-lists+xml": {
+ "source": "iana",
+ "extensions": ["rl"]
+ },
+ "application/resource-lists-diff+xml": {
+ "source": "iana",
+ "extensions": ["rld"]
+ },
+ "application/riscos": {
+ "source": "iana"
+ },
+ "application/rlmi+xml": {
+ "source": "iana"
+ },
+ "application/rls-services+xml": {
+ "source": "iana",
+ "extensions": ["rs"]
+ },
+ "application/rpki-ghostbusters": {
+ "source": "iana",
+ "extensions": ["gbr"]
+ },
+ "application/rpki-manifest": {
+ "source": "iana",
+ "extensions": ["mft"]
+ },
+ "application/rpki-roa": {
+ "source": "iana",
+ "extensions": ["roa"]
+ },
+ "application/rpki-updown": {
+ "source": "iana"
+ },
+ "application/rsd+xml": {
+ "source": "apache",
+ "extensions": ["rsd"]
+ },
+ "application/rss+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["rss"]
+ },
+ "application/rtf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtf"]
+ },
+ "application/rtploopback": {
+ "source": "iana"
+ },
+ "application/rtx": {
+ "source": "iana"
+ },
+ "application/samlassertion+xml": {
+ "source": "iana"
+ },
+ "application/samlmetadata+xml": {
+ "source": "iana"
+ },
+ "application/sbml+xml": {
+ "source": "iana",
+ "extensions": ["sbml"]
+ },
+ "application/scaip+xml": {
+ "source": "iana"
+ },
+ "application/scvp-cv-request": {
+ "source": "iana",
+ "extensions": ["scq"]
+ },
+ "application/scvp-cv-response": {
+ "source": "iana",
+ "extensions": ["scs"]
+ },
+ "application/scvp-vp-request": {
+ "source": "iana",
+ "extensions": ["spq"]
+ },
+ "application/scvp-vp-response": {
+ "source": "iana",
+ "extensions": ["spp"]
+ },
+ "application/sdp": {
+ "source": "iana",
+ "extensions": ["sdp"]
+ },
+ "application/sep+xml": {
+ "source": "iana"
+ },
+ "application/sep-exi": {
+ "source": "iana"
+ },
+ "application/session-info": {
+ "source": "iana"
+ },
+ "application/set-payment": {
+ "source": "iana"
+ },
+ "application/set-payment-initiation": {
+ "source": "iana",
+ "extensions": ["setpay"]
+ },
+ "application/set-registration": {
+ "source": "iana"
+ },
+ "application/set-registration-initiation": {
+ "source": "iana",
+ "extensions": ["setreg"]
+ },
+ "application/sgml": {
+ "source": "iana"
+ },
+ "application/sgml-open-catalog": {
+ "source": "iana"
+ },
+ "application/shf+xml": {
+ "source": "iana",
+ "extensions": ["shf"]
+ },
+ "application/sieve": {
+ "source": "iana"
+ },
+ "application/simple-filter+xml": {
+ "source": "iana"
+ },
+ "application/simple-message-summary": {
+ "source": "iana"
+ },
+ "application/simplesymbolcontainer": {
+ "source": "iana"
+ },
+ "application/slate": {
+ "source": "iana"
+ },
+ "application/smil": {
+ "source": "iana"
+ },
+ "application/smil+xml": {
+ "source": "iana",
+ "extensions": ["smi","smil"]
+ },
+ "application/smpte336m": {
+ "source": "iana"
+ },
+ "application/soap+fastinfoset": {
+ "source": "iana"
+ },
+ "application/soap+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/sparql-query": {
+ "source": "iana",
+ "extensions": ["rq"]
+ },
+ "application/sparql-results+xml": {
+ "source": "iana",
+ "extensions": ["srx"]
+ },
+ "application/spirits-event+xml": {
+ "source": "iana"
+ },
+ "application/sql": {
+ "source": "iana"
+ },
+ "application/srgs": {
+ "source": "iana",
+ "extensions": ["gram"]
+ },
+ "application/srgs+xml": {
+ "source": "iana",
+ "extensions": ["grxml"]
+ },
+ "application/sru+xml": {
+ "source": "iana",
+ "extensions": ["sru"]
+ },
+ "application/ssdl+xml": {
+ "source": "apache",
+ "extensions": ["ssdl"]
+ },
+ "application/ssml+xml": {
+ "source": "iana",
+ "extensions": ["ssml"]
+ },
+ "application/tamp-apex-update": {
+ "source": "iana"
+ },
+ "application/tamp-apex-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-community-update": {
+ "source": "iana"
+ },
+ "application/tamp-community-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-error": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-status-query": {
+ "source": "iana"
+ },
+ "application/tamp-status-response": {
+ "source": "iana"
+ },
+ "application/tamp-update": {
+ "source": "iana"
+ },
+ "application/tamp-update-confirm": {
+ "source": "iana"
+ },
+ "application/tar": {
+ "compressible": true
+ },
+ "application/tei+xml": {
+ "source": "iana",
+ "extensions": ["tei","teicorpus"]
+ },
+ "application/thraud+xml": {
+ "source": "iana",
+ "extensions": ["tfi"]
+ },
+ "application/timestamp-query": {
+ "source": "iana"
+ },
+ "application/timestamp-reply": {
+ "source": "iana"
+ },
+ "application/timestamped-data": {
+ "source": "iana",
+ "extensions": ["tsd"]
+ },
+ "application/ttml+xml": {
+ "source": "iana"
+ },
+ "application/tve-trigger": {
+ "source": "iana"
+ },
+ "application/ulpfec": {
+ "source": "iana"
+ },
+ "application/urc-grpsheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-ressheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-targetdesc+xml": {
+ "source": "iana"
+ },
+ "application/urc-uisocketdesc+xml": {
+ "source": "iana"
+ },
+ "application/vcard+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vcard+xml": {
+ "source": "iana"
+ },
+ "application/vemmi": {
+ "source": "iana"
+ },
+ "application/vividence.scriptfile": {
+ "source": "apache"
+ },
+ "application/vnd.3gpp.bsf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.pic-bw-large": {
+ "source": "iana",
+ "extensions": ["plb"]
+ },
+ "application/vnd.3gpp.pic-bw-small": {
+ "source": "iana",
+ "extensions": ["psb"]
+ },
+ "application/vnd.3gpp.pic-bw-var": {
+ "source": "iana",
+ "extensions": ["pvb"]
+ },
+ "application/vnd.3gpp.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.bcmcsinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.tcap": {
+ "source": "iana",
+ "extensions": ["tcap"]
+ },
+ "application/vnd.3m.post-it-notes": {
+ "source": "iana",
+ "extensions": ["pwn"]
+ },
+ "application/vnd.accpac.simply.aso": {
+ "source": "iana",
+ "extensions": ["aso"]
+ },
+ "application/vnd.accpac.simply.imp": {
+ "source": "iana",
+ "extensions": ["imp"]
+ },
+ "application/vnd.acucobol": {
+ "source": "iana",
+ "extensions": ["acu"]
+ },
+ "application/vnd.acucorp": {
+ "source": "iana",
+ "extensions": ["atc","acutc"]
+ },
+ "application/vnd.adobe.air-application-installer-package+zip": {
+ "source": "apache",
+ "extensions": ["air"]
+ },
+ "application/vnd.adobe.flash.movie": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.formscentral.fcdt": {
+ "source": "iana",
+ "extensions": ["fcdt"]
+ },
+ "application/vnd.adobe.fxp": {
+ "source": "iana",
+ "extensions": ["fxp","fxpl"]
+ },
+ "application/vnd.adobe.partial-upload": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.xdp+xml": {
+ "source": "iana",
+ "extensions": ["xdp"]
+ },
+ "application/vnd.adobe.xfdf": {
+ "source": "iana",
+ "extensions": ["xfdf"]
+ },
+ "application/vnd.aether.imp": {
+ "source": "iana"
+ },
+ "application/vnd.ah-barcode": {
+ "source": "iana"
+ },
+ "application/vnd.ahead.space": {
+ "source": "iana",
+ "extensions": ["ahead"]
+ },
+ "application/vnd.airzip.filesecure.azf": {
+ "source": "iana",
+ "extensions": ["azf"]
+ },
+ "application/vnd.airzip.filesecure.azs": {
+ "source": "iana",
+ "extensions": ["azs"]
+ },
+ "application/vnd.amazon.ebook": {
+ "source": "apache",
+ "extensions": ["azw"]
+ },
+ "application/vnd.americandynamics.acc": {
+ "source": "iana",
+ "extensions": ["acc"]
+ },
+ "application/vnd.amiga.ami": {
+ "source": "iana",
+ "extensions": ["ami"]
+ },
+ "application/vnd.amundsen.maze+xml": {
+ "source": "iana"
+ },
+ "application/vnd.android.package-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["apk"]
+ },
+ "application/vnd.anser-web-certificate-issue-initiation": {
+ "source": "iana",
+ "extensions": ["cii"]
+ },
+ "application/vnd.anser-web-funds-transfer-initiation": {
+ "source": "apache",
+ "extensions": ["fti"]
+ },
+ "application/vnd.antix.game-component": {
+ "source": "iana",
+ "extensions": ["atx"]
+ },
+ "application/vnd.apache.thrift.binary": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.compact": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.json": {
+ "source": "iana"
+ },
+ "application/vnd.api+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.apple.installer+xml": {
+ "source": "iana",
+ "extensions": ["mpkg"]
+ },
+ "application/vnd.apple.mpegurl": {
+ "source": "iana",
+ "extensions": ["m3u8"]
+ },
+ "application/vnd.arastra.swi": {
+ "source": "iana"
+ },
+ "application/vnd.aristanetworks.swi": {
+ "source": "iana",
+ "extensions": ["swi"]
+ },
+ "application/vnd.artsquare": {
+ "source": "iana"
+ },
+ "application/vnd.astraea-software.iota": {
+ "source": "iana",
+ "extensions": ["iota"]
+ },
+ "application/vnd.audiograph": {
+ "source": "iana",
+ "extensions": ["aep"]
+ },
+ "application/vnd.autopackage": {
+ "source": "iana"
+ },
+ "application/vnd.avistar+xml": {
+ "source": "iana"
+ },
+ "application/vnd.balsamiq.bmml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.bekitzur-stech+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.blueice.multipass": {
+ "source": "iana",
+ "extensions": ["mpm"]
+ },
+ "application/vnd.bluetooth.ep.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bluetooth.le.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bmi": {
+ "source": "iana",
+ "extensions": ["bmi"]
+ },
+ "application/vnd.businessobjects": {
+ "source": "iana",
+ "extensions": ["rep"]
+ },
+ "application/vnd.cab-jscript": {
+ "source": "iana"
+ },
+ "application/vnd.canon-cpdl": {
+ "source": "iana"
+ },
+ "application/vnd.canon-lips": {
+ "source": "iana"
+ },
+ "application/vnd.cendio.thinlinc.clientconf": {
+ "source": "iana"
+ },
+ "application/vnd.century-systems.tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.chemdraw+xml": {
+ "source": "iana",
+ "extensions": ["cdxml"]
+ },
+ "application/vnd.chipnuts.karaoke-mmd": {
+ "source": "iana",
+ "extensions": ["mmd"]
+ },
+ "application/vnd.cinderella": {
+ "source": "iana",
+ "extensions": ["cdy"]
+ },
+ "application/vnd.cirpack.isdn-ext": {
+ "source": "iana"
+ },
+ "application/vnd.claymore": {
+ "source": "iana",
+ "extensions": ["cla"]
+ },
+ "application/vnd.cloanto.rp9": {
+ "source": "iana",
+ "extensions": ["rp9"]
+ },
+ "application/vnd.clonk.c4group": {
+ "source": "iana",
+ "extensions": ["c4g","c4d","c4f","c4p","c4u"]
+ },
+ "application/vnd.cluetrust.cartomobile-config": {
+ "source": "iana",
+ "extensions": ["c11amc"]
+ },
+ "application/vnd.cluetrust.cartomobile-config-pkg": {
+ "source": "iana",
+ "extensions": ["c11amz"]
+ },
+ "application/vnd.coffeescript": {
+ "source": "iana"
+ },
+ "application/vnd.collection+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.doc+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.next+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.commerce-battelle": {
+ "source": "iana"
+ },
+ "application/vnd.commonspace": {
+ "source": "iana",
+ "extensions": ["csp"]
+ },
+ "application/vnd.contact.cmsg": {
+ "source": "iana",
+ "extensions": ["cdbcmsg"]
+ },
+ "application/vnd.cosmocaller": {
+ "source": "iana",
+ "extensions": ["cmc"]
+ },
+ "application/vnd.crick.clicker": {
+ "source": "iana",
+ "extensions": ["clkx"]
+ },
+ "application/vnd.crick.clicker.keyboard": {
+ "source": "iana",
+ "extensions": ["clkk"]
+ },
+ "application/vnd.crick.clicker.palette": {
+ "source": "iana",
+ "extensions": ["clkp"]
+ },
+ "application/vnd.crick.clicker.template": {
+ "source": "iana",
+ "extensions": ["clkt"]
+ },
+ "application/vnd.crick.clicker.wordbank": {
+ "source": "iana",
+ "extensions": ["clkw"]
+ },
+ "application/vnd.criticaltools.wbs+xml": {
+ "source": "iana",
+ "extensions": ["wbs"]
+ },
+ "application/vnd.ctc-posml": {
+ "source": "iana",
+ "extensions": ["pml"]
+ },
+ "application/vnd.ctct.ws+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cups-pdf": {
+ "source": "iana"
+ },
+ "application/vnd.cups-postscript": {
+ "source": "iana"
+ },
+ "application/vnd.cups-ppd": {
+ "source": "iana",
+ "extensions": ["ppd"]
+ },
+ "application/vnd.cups-raster": {
+ "source": "iana"
+ },
+ "application/vnd.cups-raw": {
+ "source": "iana"
+ },
+ "application/vnd.curl": {
+ "source": "iana"
+ },
+ "application/vnd.curl.car": {
+ "source": "apache",
+ "extensions": ["car"]
+ },
+ "application/vnd.curl.pcurl": {
+ "source": "apache",
+ "extensions": ["pcurl"]
+ },
+ "application/vnd.cyan.dean.root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cybank": {
+ "source": "iana"
+ },
+ "application/vnd.dart": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dart"]
+ },
+ "application/vnd.data-vision.rdz": {
+ "source": "iana",
+ "extensions": ["rdz"]
+ },
+ "application/vnd.debian.binary-package": {
+ "source": "iana"
+ },
+ "application/vnd.dece.data": {
+ "source": "iana",
+ "extensions": ["uvf","uvvf","uvd","uvvd"]
+ },
+ "application/vnd.dece.ttml+xml": {
+ "source": "iana",
+ "extensions": ["uvt","uvvt"]
+ },
+ "application/vnd.dece.unspecified": {
+ "source": "iana",
+ "extensions": ["uvx","uvvx"]
+ },
+ "application/vnd.dece.zip": {
+ "source": "iana",
+ "extensions": ["uvz","uvvz"]
+ },
+ "application/vnd.denovo.fcselayout-link": {
+ "source": "iana",
+ "extensions": ["fe_launch"]
+ },
+ "application/vnd.desmume-movie": {
+ "source": "iana"
+ },
+ "application/vnd.dir-bi.plate-dl-nosuffix": {
+ "source": "iana"
+ },
+ "application/vnd.dm.delegation+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dna": {
+ "source": "iana",
+ "extensions": ["dna"]
+ },
+ "application/vnd.document+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dolby.mlp": {
+ "source": "apache",
+ "extensions": ["mlp"]
+ },
+ "application/vnd.dolby.mobile.1": {
+ "source": "iana"
+ },
+ "application/vnd.dolby.mobile.2": {
+ "source": "iana"
+ },
+ "application/vnd.doremir.scorecloud-binary-document": {
+ "source": "iana"
+ },
+ "application/vnd.dpgraph": {
+ "source": "iana",
+ "extensions": ["dpg"]
+ },
+ "application/vnd.dreamfactory": {
+ "source": "iana",
+ "extensions": ["dfac"]
+ },
+ "application/vnd.ds-keypoint": {
+ "source": "apache",
+ "extensions": ["kpxx"]
+ },
+ "application/vnd.dtg.local": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.flash": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.html": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ait": {
+ "source": "iana",
+ "extensions": ["ait"]
+ },
+ "application/vnd.dvb.dvbj": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.esgcontainer": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcdftnotifaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess2": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgpdd": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcroaming": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-base": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-enhancement": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-aggregate-root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-container+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-generic+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-msglist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-response+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-init+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.pfr": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.service": {
+ "source": "iana",
+ "extensions": ["svc"]
+ },
+ "application/vnd.dxr": {
+ "source": "iana"
+ },
+ "application/vnd.dynageo": {
+ "source": "iana",
+ "extensions": ["geo"]
+ },
+ "application/vnd.dzr": {
+ "source": "iana"
+ },
+ "application/vnd.easykaraoke.cdgdownload": {
+ "source": "iana"
+ },
+ "application/vnd.ecdis-update": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.chart": {
+ "source": "iana",
+ "extensions": ["mag"]
+ },
+ "application/vnd.ecowin.filerequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.fileupdate": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.series": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesrequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesupdate": {
+ "source": "iana"
+ },
+ "application/vnd.emclient.accessrequest+xml": {
+ "source": "iana"
+ },
+ "application/vnd.enliven": {
+ "source": "iana",
+ "extensions": ["nml"]
+ },
+ "application/vnd.enphase.envoy": {
+ "source": "iana"
+ },
+ "application/vnd.eprints.data+xml": {
+ "source": "iana"
+ },
+ "application/vnd.epson.esf": {
+ "source": "iana",
+ "extensions": ["esf"]
+ },
+ "application/vnd.epson.msf": {
+ "source": "iana",
+ "extensions": ["msf"]
+ },
+ "application/vnd.epson.quickanime": {
+ "source": "iana",
+ "extensions": ["qam"]
+ },
+ "application/vnd.epson.salt": {
+ "source": "iana",
+ "extensions": ["slt"]
+ },
+ "application/vnd.epson.ssf": {
+ "source": "iana",
+ "extensions": ["ssf"]
+ },
+ "application/vnd.ericsson.quickcall": {
+ "source": "iana"
+ },
+ "application/vnd.eszigno3+xml": {
+ "source": "iana",
+ "extensions": ["es3","et3"]
+ },
+ "application/vnd.etsi.aoc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-e+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-s+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.cug+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvcommand+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-bc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-cod+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-npvr+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvservice+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsync+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mcid+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mheg5": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.overload-control-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.pstn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.sci+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.simservs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.timestamp-token": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl.der": {
+ "source": "iana"
+ },
+ "application/vnd.eudora.data": {
+ "source": "iana"
+ },
+ "application/vnd.ezpix-album": {
+ "source": "iana",
+ "extensions": ["ez2"]
+ },
+ "application/vnd.ezpix-package": {
+ "source": "iana",
+ "extensions": ["ez3"]
+ },
+ "application/vnd.f-secure.mobile": {
+ "source": "iana"
+ },
+ "application/vnd.fdf": {
+ "source": "iana",
+ "extensions": ["fdf"]
+ },
+ "application/vnd.fdsn.mseed": {
+ "source": "iana",
+ "extensions": ["mseed"]
+ },
+ "application/vnd.fdsn.seed": {
+ "source": "iana",
+ "extensions": ["seed","dataless"]
+ },
+ "application/vnd.ffsns": {
+ "source": "iana"
+ },
+ "application/vnd.fints": {
+ "source": "iana"
+ },
+ "application/vnd.flographit": {
+ "source": "iana",
+ "extensions": ["gph"]
+ },
+ "application/vnd.fluxtime.clip": {
+ "source": "iana",
+ "extensions": ["ftc"]
+ },
+ "application/vnd.font-fontforge-sfd": {
+ "source": "iana"
+ },
+ "application/vnd.framemaker": {
+ "source": "iana",
+ "extensions": ["fm","frame","maker","book"]
+ },
+ "application/vnd.frogans.fnc": {
+ "source": "iana",
+ "extensions": ["fnc"]
+ },
+ "application/vnd.frogans.ltf": {
+ "source": "iana",
+ "extensions": ["ltf"]
+ },
+ "application/vnd.fsc.weblaunch": {
+ "source": "iana",
+ "extensions": ["fsc"]
+ },
+ "application/vnd.fujitsu.oasys": {
+ "source": "iana",
+ "extensions": ["oas"]
+ },
+ "application/vnd.fujitsu.oasys2": {
+ "source": "iana",
+ "extensions": ["oa2"]
+ },
+ "application/vnd.fujitsu.oasys3": {
+ "source": "iana",
+ "extensions": ["oa3"]
+ },
+ "application/vnd.fujitsu.oasysgp": {
+ "source": "iana",
+ "extensions": ["fg5"]
+ },
+ "application/vnd.fujitsu.oasysprs": {
+ "source": "iana",
+ "extensions": ["bh2"]
+ },
+ "application/vnd.fujixerox.art-ex": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.art4": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.ddd": {
+ "source": "iana",
+ "extensions": ["ddd"]
+ },
+ "application/vnd.fujixerox.docuworks": {
+ "source": "iana",
+ "extensions": ["xdw"]
+ },
+ "application/vnd.fujixerox.docuworks.binder": {
+ "source": "iana",
+ "extensions": ["xbd"]
+ },
+ "application/vnd.fujixerox.docuworks.container": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.hbpl": {
+ "source": "iana"
+ },
+ "application/vnd.fut-misnet": {
+ "source": "iana"
+ },
+ "application/vnd.fuzzysheet": {
+ "source": "iana",
+ "extensions": ["fzs"]
+ },
+ "application/vnd.genomatix.tuxedo": {
+ "source": "iana",
+ "extensions": ["txd"]
+ },
+ "application/vnd.geo+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.geocube+xml": {
+ "source": "iana"
+ },
+ "application/vnd.geogebra.file": {
+ "source": "iana",
+ "extensions": ["ggb"]
+ },
+ "application/vnd.geogebra.tool": {
+ "source": "iana",
+ "extensions": ["ggt"]
+ },
+ "application/vnd.geometry-explorer": {
+ "source": "iana",
+ "extensions": ["gex","gre"]
+ },
+ "application/vnd.geonext": {
+ "source": "iana",
+ "extensions": ["gxt"]
+ },
+ "application/vnd.geoplan": {
+ "source": "iana",
+ "extensions": ["g2w"]
+ },
+ "application/vnd.geospace": {
+ "source": "iana",
+ "extensions": ["g3w"]
+ },
+ "application/vnd.gerber": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt-response": {
+ "source": "iana"
+ },
+ "application/vnd.gmx": {
+ "source": "iana",
+ "extensions": ["gmx"]
+ },
+ "application/vnd.google-earth.kml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["kml"]
+ },
+ "application/vnd.google-earth.kmz": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["kmz"]
+ },
+ "application/vnd.gov.sk.e-form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.gov.sk.e-form+zip": {
+ "source": "iana"
+ },
+ "application/vnd.grafeq": {
+ "source": "iana",
+ "extensions": ["gqf","gqs"]
+ },
+ "application/vnd.gridmp": {
+ "source": "iana"
+ },
+ "application/vnd.groove-account": {
+ "source": "iana",
+ "extensions": ["gac"]
+ },
+ "application/vnd.groove-help": {
+ "source": "iana",
+ "extensions": ["ghf"]
+ },
+ "application/vnd.groove-identity-message": {
+ "source": "iana",
+ "extensions": ["gim"]
+ },
+ "application/vnd.groove-injector": {
+ "source": "iana",
+ "extensions": ["grv"]
+ },
+ "application/vnd.groove-tool-message": {
+ "source": "iana",
+ "extensions": ["gtm"]
+ },
+ "application/vnd.groove-tool-template": {
+ "source": "iana",
+ "extensions": ["tpl"]
+ },
+ "application/vnd.groove-vcard": {
+ "source": "iana",
+ "extensions": ["vcg"]
+ },
+ "application/vnd.hal+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hal+xml": {
+ "source": "iana",
+ "extensions": ["hal"]
+ },
+ "application/vnd.handheld-entertainment+xml": {
+ "source": "iana",
+ "extensions": ["zmm"]
+ },
+ "application/vnd.hbci": {
+ "source": "iana",
+ "extensions": ["hbci"]
+ },
+ "application/vnd.hcl-bireports": {
+ "source": "iana"
+ },
+ "application/vnd.heroku+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hhe.lesson-player": {
+ "source": "iana",
+ "extensions": ["les"]
+ },
+ "application/vnd.hp-hpgl": {
+ "source": "iana",
+ "extensions": ["hpgl"]
+ },
+ "application/vnd.hp-hpid": {
+ "source": "iana",
+ "extensions": ["hpid"]
+ },
+ "application/vnd.hp-hps": {
+ "source": "iana",
+ "extensions": ["hps"]
+ },
+ "application/vnd.hp-jlyt": {
+ "source": "iana",
+ "extensions": ["jlt"]
+ },
+ "application/vnd.hp-pcl": {
+ "source": "iana",
+ "extensions": ["pcl"]
+ },
+ "application/vnd.hp-pclxl": {
+ "source": "iana",
+ "extensions": ["pclxl"]
+ },
+ "application/vnd.httphone": {
+ "source": "iana"
+ },
+ "application/vnd.hydrostatix.sof-data": {
+ "source": "iana"
+ },
+ "application/vnd.hzn-3d-crossword": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.afplinedata": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.electronic-media": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.minipay": {
+ "source": "iana",
+ "extensions": ["mpy"]
+ },
+ "application/vnd.ibm.modcap": {
+ "source": "iana",
+ "extensions": ["afp","listafp","list3820"]
+ },
+ "application/vnd.ibm.rights-management": {
+ "source": "iana",
+ "extensions": ["irm"]
+ },
+ "application/vnd.ibm.secure-container": {
+ "source": "iana",
+ "extensions": ["sc"]
+ },
+ "application/vnd.iccprofile": {
+ "source": "iana",
+ "extensions": ["icc","icm"]
+ },
+ "application/vnd.ieee.1905": {
+ "source": "iana"
+ },
+ "application/vnd.igloader": {
+ "source": "iana",
+ "extensions": ["igl"]
+ },
+ "application/vnd.immervision-ivp": {
+ "source": "iana",
+ "extensions": ["ivp"]
+ },
+ "application/vnd.immervision-ivu": {
+ "source": "iana",
+ "extensions": ["ivu"]
+ },
+ "application/vnd.ims.imsccv1p1": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p2": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p3": {
+ "source": "iana"
+ },
+ "application/vnd.ims.lis.v2.result+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolconsumerprofile+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy.id+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings.simple+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.informedcontrol.rms+xml": {
+ "source": "iana"
+ },
+ "application/vnd.informix-visionary": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project+xml": {
+ "source": "iana"
+ },
+ "application/vnd.innopath.wamp.notification": {
+ "source": "iana"
+ },
+ "application/vnd.insors.igm": {
+ "source": "iana",
+ "extensions": ["igm"]
+ },
+ "application/vnd.intercon.formnet": {
+ "source": "iana",
+ "extensions": ["xpw","xpx"]
+ },
+ "application/vnd.intergeo": {
+ "source": "iana",
+ "extensions": ["i2g"]
+ },
+ "application/vnd.intertrust.digibox": {
+ "source": "iana"
+ },
+ "application/vnd.intertrust.nncp": {
+ "source": "iana"
+ },
+ "application/vnd.intu.qbo": {
+ "source": "iana",
+ "extensions": ["qbo"]
+ },
+ "application/vnd.intu.qfx": {
+ "source": "iana",
+ "extensions": ["qfx"]
+ },
+ "application/vnd.iptc.g2.catalogitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.conceptitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.knowledgeitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.packageitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.planningitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ipunplugged.rcprofile": {
+ "source": "iana",
+ "extensions": ["rcprofile"]
+ },
+ "application/vnd.irepository.package+xml": {
+ "source": "iana",
+ "extensions": ["irp"]
+ },
+ "application/vnd.is-xpr": {
+ "source": "iana",
+ "extensions": ["xpr"]
+ },
+ "application/vnd.isac.fcs": {
+ "source": "iana",
+ "extensions": ["fcs"]
+ },
+ "application/vnd.jam": {
+ "source": "iana",
+ "extensions": ["jam"]
+ },
+ "application/vnd.japannet-directory-service": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-jpnstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-payment-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-setstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.jcp.javame.midlet-rms": {
+ "source": "iana",
+ "extensions": ["rms"]
+ },
+ "application/vnd.jisp": {
+ "source": "iana",
+ "extensions": ["jisp"]
+ },
+ "application/vnd.joost.joda-archive": {
+ "source": "iana",
+ "extensions": ["joda"]
+ },
+ "application/vnd.jsk.isdn-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.kahootz": {
+ "source": "iana",
+ "extensions": ["ktz","ktr"]
+ },
+ "application/vnd.kde.karbon": {
+ "source": "iana",
+ "extensions": ["karbon"]
+ },
+ "application/vnd.kde.kchart": {
+ "source": "iana",
+ "extensions": ["chrt"]
+ },
+ "application/vnd.kde.kformula": {
+ "source": "iana",
+ "extensions": ["kfo"]
+ },
+ "application/vnd.kde.kivio": {
+ "source": "iana",
+ "extensions": ["flw"]
+ },
+ "application/vnd.kde.kontour": {
+ "source": "iana",
+ "extensions": ["kon"]
+ },
+ "application/vnd.kde.kpresenter": {
+ "source": "iana",
+ "extensions": ["kpr","kpt"]
+ },
+ "application/vnd.kde.kspread": {
+ "source": "iana",
+ "extensions": ["ksp"]
+ },
+ "application/vnd.kde.kword": {
+ "source": "iana",
+ "extensions": ["kwd","kwt"]
+ },
+ "application/vnd.kenameaapp": {
+ "source": "iana",
+ "extensions": ["htke"]
+ },
+ "application/vnd.kidspiration": {
+ "source": "iana",
+ "extensions": ["kia"]
+ },
+ "application/vnd.kinar": {
+ "source": "iana",
+ "extensions": ["kne","knp"]
+ },
+ "application/vnd.koan": {
+ "source": "iana",
+ "extensions": ["skp","skd","skt","skm"]
+ },
+ "application/vnd.kodak-descriptor": {
+ "source": "iana",
+ "extensions": ["sse"]
+ },
+ "application/vnd.las.las+xml": {
+ "source": "iana",
+ "extensions": ["lasxml"]
+ },
+ "application/vnd.liberty-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.llamagraphics.life-balance.desktop": {
+ "source": "iana",
+ "extensions": ["lbd"]
+ },
+ "application/vnd.llamagraphics.life-balance.exchange+xml": {
+ "source": "iana",
+ "extensions": ["lbe"]
+ },
+ "application/vnd.lotus-1-2-3": {
+ "source": "iana",
+ "extensions": ["123"]
+ },
+ "application/vnd.lotus-approach": {
+ "source": "iana",
+ "extensions": ["apr"]
+ },
+ "application/vnd.lotus-freelance": {
+ "source": "iana",
+ "extensions": ["pre"]
+ },
+ "application/vnd.lotus-notes": {
+ "source": "iana",
+ "extensions": ["nsf"]
+ },
+ "application/vnd.lotus-organizer": {
+ "source": "iana",
+ "extensions": ["org"]
+ },
+ "application/vnd.lotus-screencam": {
+ "source": "iana",
+ "extensions": ["scm"]
+ },
+ "application/vnd.lotus-wordpro": {
+ "source": "iana",
+ "extensions": ["lwp"]
+ },
+ "application/vnd.macports.portpkg": {
+ "source": "iana",
+ "extensions": ["portpkg"]
+ },
+ "application/vnd.marlin.drm.actiontoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.conftoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.license+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.mdcf": {
+ "source": "iana"
+ },
+ "application/vnd.mason+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.maxmind.maxmind-db": {
+ "source": "iana"
+ },
+ "application/vnd.mcd": {
+ "source": "iana",
+ "extensions": ["mcd"]
+ },
+ "application/vnd.medcalcdata": {
+ "source": "iana",
+ "extensions": ["mc1"]
+ },
+ "application/vnd.mediastation.cdkey": {
+ "source": "iana",
+ "extensions": ["cdkey"]
+ },
+ "application/vnd.meridian-slingshot": {
+ "source": "iana"
+ },
+ "application/vnd.mfer": {
+ "source": "iana",
+ "extensions": ["mwf"]
+ },
+ "application/vnd.mfmp": {
+ "source": "iana",
+ "extensions": ["mfm"]
+ },
+ "application/vnd.micrografx.flo": {
+ "source": "iana",
+ "extensions": ["flo"]
+ },
+ "application/vnd.micrografx.igx": {
+ "source": "iana",
+ "extensions": ["igx"]
+ },
+ "application/vnd.miele+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.mif": {
+ "source": "iana",
+ "extensions": ["mif"]
+ },
+ "application/vnd.minisoft-hp3000-save": {
+ "source": "iana"
+ },
+ "application/vnd.mitsubishi.misty-guard.trustweb": {
+ "source": "iana"
+ },
+ "application/vnd.mobius.daf": {
+ "source": "iana",
+ "extensions": ["daf"]
+ },
+ "application/vnd.mobius.dis": {
+ "source": "iana",
+ "extensions": ["dis"]
+ },
+ "application/vnd.mobius.mbk": {
+ "source": "iana",
+ "extensions": ["mbk"]
+ },
+ "application/vnd.mobius.mqy": {
+ "source": "iana",
+ "extensions": ["mqy"]
+ },
+ "application/vnd.mobius.msl": {
+ "source": "iana",
+ "extensions": ["msl"]
+ },
+ "application/vnd.mobius.plc": {
+ "source": "iana",
+ "extensions": ["plc"]
+ },
+ "application/vnd.mobius.txf": {
+ "source": "iana",
+ "extensions": ["txf"]
+ },
+ "application/vnd.mophun.application": {
+ "source": "iana",
+ "extensions": ["mpn"]
+ },
+ "application/vnd.mophun.certificate": {
+ "source": "iana",
+ "extensions": ["mpc"]
+ },
+ "application/vnd.motorola.flexsuite": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.adsi": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.fis": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.gotap": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.kmr": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.ttc": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.wem": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.iprm": {
+ "source": "iana"
+ },
+ "application/vnd.mozilla.xul+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xul"]
+ },
+ "application/vnd.ms-3mfdocument": {
+ "source": "iana"
+ },
+ "application/vnd.ms-artgalry": {
+ "source": "iana",
+ "extensions": ["cil"]
+ },
+ "application/vnd.ms-asf": {
+ "source": "iana"
+ },
+ "application/vnd.ms-cab-compressed": {
+ "source": "iana",
+ "extensions": ["cab"]
+ },
+ "application/vnd.ms-color.iccprofile": {
+ "source": "apache"
+ },
+ "application/vnd.ms-excel": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xls","xlm","xla","xlc","xlt","xlw"]
+ },
+ "application/vnd.ms-excel.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlam"]
+ },
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsb"]
+ },
+ "application/vnd.ms-excel.sheet.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsm"]
+ },
+ "application/vnd.ms-excel.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xltm"]
+ },
+ "application/vnd.ms-fontobject": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eot"]
+ },
+ "application/vnd.ms-htmlhelp": {
+ "source": "iana",
+ "extensions": ["chm"]
+ },
+ "application/vnd.ms-ims": {
+ "source": "iana",
+ "extensions": ["ims"]
+ },
+ "application/vnd.ms-lrm": {
+ "source": "iana",
+ "extensions": ["lrm"]
+ },
+ "application/vnd.ms-office.activex+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-officetheme": {
+ "source": "iana",
+ "extensions": ["thmx"]
+ },
+ "application/vnd.ms-opentype": {
+ "source": "apache",
+ "compressible": true
+ },
+ "application/vnd.ms-package.obfuscated-opentype": {
+ "source": "apache"
+ },
+ "application/vnd.ms-pki.seccat": {
+ "source": "apache",
+ "extensions": ["cat"]
+ },
+ "application/vnd.ms-pki.stl": {
+ "source": "apache",
+ "extensions": ["stl"]
+ },
+ "application/vnd.ms-playready.initiator+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-powerpoint": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ppt","pps","pot"]
+ },
+ "application/vnd.ms-powerpoint.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppam"]
+ },
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["pptm"]
+ },
+ "application/vnd.ms-powerpoint.slide.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["sldm"]
+ },
+ "application/vnd.ms-powerpoint.slideshow.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppsm"]
+ },
+ "application/vnd.ms-powerpoint.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["potm"]
+ },
+ "application/vnd.ms-printing.printticket+xml": {
+ "source": "apache"
+ },
+ "application/vnd.ms-project": {
+ "source": "iana",
+ "extensions": ["mpp","mpt"]
+ },
+ "application/vnd.ms-tnef": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.printerpairing": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-word.document.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["docm"]
+ },
+ "application/vnd.ms-word.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["dotm"]
+ },
+ "application/vnd.ms-works": {
+ "source": "iana",
+ "extensions": ["wps","wks","wcm","wdb"]
+ },
+ "application/vnd.ms-wpl": {
+ "source": "iana",
+ "extensions": ["wpl"]
+ },
+ "application/vnd.ms-xpsdocument": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xps"]
+ },
+ "application/vnd.msa-disk-image": {
+ "source": "iana"
+ },
+ "application/vnd.mseq": {
+ "source": "iana",
+ "extensions": ["mseq"]
+ },
+ "application/vnd.msign": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator.cif": {
+ "source": "iana"
+ },
+ "application/vnd.music-niff": {
+ "source": "iana"
+ },
+ "application/vnd.musician": {
+ "source": "iana",
+ "extensions": ["mus"]
+ },
+ "application/vnd.muvee.style": {
+ "source": "iana",
+ "extensions": ["msty"]
+ },
+ "application/vnd.mynfc": {
+ "source": "iana",
+ "extensions": ["taglet"]
+ },
+ "application/vnd.ncd.control": {
+ "source": "iana"
+ },
+ "application/vnd.ncd.reference": {
+ "source": "iana"
+ },
+ "application/vnd.nervana": {
+ "source": "iana"
+ },
+ "application/vnd.netfpx": {
+ "source": "iana"
+ },
+ "application/vnd.neurolanguage.nlu": {
+ "source": "iana",
+ "extensions": ["nlu"]
+ },
+ "application/vnd.nintendo.nitro.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nintendo.snes.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nitf": {
+ "source": "iana",
+ "extensions": ["ntf","nitf"]
+ },
+ "application/vnd.noblenet-directory": {
+ "source": "iana",
+ "extensions": ["nnd"]
+ },
+ "application/vnd.noblenet-sealer": {
+ "source": "iana",
+ "extensions": ["nns"]
+ },
+ "application/vnd.noblenet-web": {
+ "source": "iana",
+ "extensions": ["nnw"]
+ },
+ "application/vnd.nokia.catalogs": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.iptv.config+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.isds-radio-presets": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmarkcollection+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.ac+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.data": {
+ "source": "iana",
+ "extensions": ["ngdat"]
+ },
+ "application/vnd.nokia.n-gage.symbian.install": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.ncd": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.radio-preset": {
+ "source": "iana",
+ "extensions": ["rpst"]
+ },
+ "application/vnd.nokia.radio-presets": {
+ "source": "iana",
+ "extensions": ["rpss"]
+ },
+ "application/vnd.novadigm.edm": {
+ "source": "iana",
+ "extensions": ["edm"]
+ },
+ "application/vnd.novadigm.edx": {
+ "source": "iana",
+ "extensions": ["edx"]
+ },
+ "application/vnd.novadigm.ext": {
+ "source": "iana",
+ "extensions": ["ext"]
+ },
+ "application/vnd.ntt-local.content-share": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.file-transfer": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.ogw_remote-access": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_remote": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.oasis.opendocument.chart": {
+ "source": "iana",
+ "extensions": ["odc"]
+ },
+ "application/vnd.oasis.opendocument.chart-template": {
+ "source": "iana",
+ "extensions": ["otc"]
+ },
+ "application/vnd.oasis.opendocument.database": {
+ "source": "iana",
+ "extensions": ["odb"]
+ },
+ "application/vnd.oasis.opendocument.formula": {
+ "source": "iana",
+ "extensions": ["odf"]
+ },
+ "application/vnd.oasis.opendocument.formula-template": {
+ "source": "iana",
+ "extensions": ["odft"]
+ },
+ "application/vnd.oasis.opendocument.graphics": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odg"]
+ },
+ "application/vnd.oasis.opendocument.graphics-template": {
+ "source": "iana",
+ "extensions": ["otg"]
+ },
+ "application/vnd.oasis.opendocument.image": {
+ "source": "iana",
+ "extensions": ["odi"]
+ },
+ "application/vnd.oasis.opendocument.image-template": {
+ "source": "iana",
+ "extensions": ["oti"]
+ },
+ "application/vnd.oasis.opendocument.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odp"]
+ },
+ "application/vnd.oasis.opendocument.presentation-template": {
+ "source": "iana",
+ "extensions": ["otp"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ods"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet-template": {
+ "source": "iana",
+ "extensions": ["ots"]
+ },
+ "application/vnd.oasis.opendocument.text": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odt"]
+ },
+ "application/vnd.oasis.opendocument.text-master": {
+ "source": "iana",
+ "extensions": ["odm"]
+ },
+ "application/vnd.oasis.opendocument.text-template": {
+ "source": "iana",
+ "extensions": ["ott"]
+ },
+ "application/vnd.oasis.opendocument.text-web": {
+ "source": "iana",
+ "extensions": ["oth"]
+ },
+ "application/vnd.obn": {
+ "source": "iana"
+ },
+ "application/vnd.oftn.l10n+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.contentaccessdownload+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.contentaccessstreaming+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.cspg-hexbinary": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.svg+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.xhtml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.mippvcontrolmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.pae.gem": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdlist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.ueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.userprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.olpc-sugar": {
+ "source": "iana",
+ "extensions": ["xo"]
+ },
+ "application/vnd.oma-scws-config": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-request": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-response": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.associated-procedure-parameter+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.drm-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.imd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.ltkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.notification+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.provisioningtrigger": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgboot": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdu": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.simple-symbol-container": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.smartcard-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sprov+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.stkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-address-book+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-feature-handler+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-pcc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-subs-invite+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-user-prefs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcd": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcdc": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dd2+xml": {
+ "source": "iana",
+ "extensions": ["dd2"]
+ },
+ "application/vnd.oma.drm.risd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.group-usage-list+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.pal+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.detailed-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.final-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.groups+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.invocation-descriptor+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.optimized-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.push": {
+ "source": "iana"
+ },
+ "application/vnd.oma.scidm.messages+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.xcap-directory+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-email+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-file+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-folder+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omaloc-supl-init": {
+ "source": "iana"
+ },
+ "application/vnd.openeye.oeb": {
+ "source": "iana"
+ },
+ "application/vnd.openofficeorg.extension": {
+ "source": "apache",
+ "extensions": ["oxt"]
+ },
+ "application/vnd.openxmlformats-officedocument.custom-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawing+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.extended-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pptx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide": {
+ "source": "iana",
+ "extensions": ["sldx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": {
+ "source": "iana",
+ "extensions": ["ppsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template": {
+ "source": "apache",
+ "extensions": ["potx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xlsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template": {
+ "source": "apache",
+ "extensions": ["xltx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.theme+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.themeoverride+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.vmldrawing": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["docx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template": {
+ "source": "apache",
+ "extensions": ["dotx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.core-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.relationships+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oracle.resource+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.orange.indata": {
+ "source": "iana"
+ },
+ "application/vnd.osa.netdeploy": {
+ "source": "iana"
+ },
+ "application/vnd.osgeo.mapguide.package": {
+ "source": "iana",
+ "extensions": ["mgp"]
+ },
+ "application/vnd.osgi.bundle": {
+ "source": "iana"
+ },
+ "application/vnd.osgi.dp": {
+ "source": "iana",
+ "extensions": ["dp"]
+ },
+ "application/vnd.osgi.subsystem": {
+ "source": "iana",
+ "extensions": ["esa"]
+ },
+ "application/vnd.otps.ct-kip+xml": {
+ "source": "iana"
+ },
+ "application/vnd.palm": {
+ "source": "iana",
+ "extensions": ["pdb","pqa","oprc"]
+ },
+ "application/vnd.panoply": {
+ "source": "iana"
+ },
+ "application/vnd.paos+xml": {
+ "source": "iana"
+ },
+ "application/vnd.paos.xml": {
+ "source": "apache"
+ },
+ "application/vnd.pawaafile": {
+ "source": "iana",
+ "extensions": ["paw"]
+ },
+ "application/vnd.pcos": {
+ "source": "iana"
+ },
+ "application/vnd.pg.format": {
+ "source": "iana",
+ "extensions": ["str"]
+ },
+ "application/vnd.pg.osasli": {
+ "source": "iana",
+ "extensions": ["ei6"]
+ },
+ "application/vnd.piaccess.application-licence": {
+ "source": "iana"
+ },
+ "application/vnd.picsel": {
+ "source": "iana",
+ "extensions": ["efif"]
+ },
+ "application/vnd.pmi.widget": {
+ "source": "iana",
+ "extensions": ["wg"]
+ },
+ "application/vnd.poc.group-advertisement+xml": {
+ "source": "iana"
+ },
+ "application/vnd.pocketlearn": {
+ "source": "iana",
+ "extensions": ["plf"]
+ },
+ "application/vnd.powerbuilder6": {
+ "source": "iana",
+ "extensions": ["pbd"]
+ },
+ "application/vnd.powerbuilder6-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75-s": {
+ "source": "iana"
+ },
+ "application/vnd.preminet": {
+ "source": "iana"
+ },
+ "application/vnd.previewsystems.box": {
+ "source": "iana",
+ "extensions": ["box"]
+ },
+ "application/vnd.proteus.magazine": {
+ "source": "iana",
+ "extensions": ["mgz"]
+ },
+ "application/vnd.publishare-delta-tree": {
+ "source": "iana",
+ "extensions": ["qps"]
+ },
+ "application/vnd.pvi.ptid1": {
+ "source": "iana",
+ "extensions": ["ptid"]
+ },
+ "application/vnd.pwg-multiplexed": {
+ "source": "iana"
+ },
+ "application/vnd.pwg-xhtml-print+xml": {
+ "source": "iana"
+ },
+ "application/vnd.qualcomm.brew-app-res": {
+ "source": "iana"
+ },
+ "application/vnd.quark.quarkxpress": {
+ "source": "iana",
+ "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"]
+ },
+ "application/vnd.quobject-quoxdocument": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.moml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-stream+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-base+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-detect+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-group+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-speech+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-transform+xml": {
+ "source": "iana"
+ },
+ "application/vnd.rainstor.data": {
+ "source": "iana"
+ },
+ "application/vnd.rapid": {
+ "source": "iana"
+ },
+ "application/vnd.realvnc.bed": {
+ "source": "iana",
+ "extensions": ["bed"]
+ },
+ "application/vnd.recordare.musicxml": {
+ "source": "iana",
+ "extensions": ["mxl"]
+ },
+ "application/vnd.recordare.musicxml+xml": {
+ "source": "iana",
+ "extensions": ["musicxml"]
+ },
+ "application/vnd.renlearn.rlprint": {
+ "source": "iana"
+ },
+ "application/vnd.rig.cryptonote": {
+ "source": "iana",
+ "extensions": ["cryptonote"]
+ },
+ "application/vnd.rim.cod": {
+ "source": "apache",
+ "extensions": ["cod"]
+ },
+ "application/vnd.rn-realmedia": {
+ "source": "apache",
+ "extensions": ["rm"]
+ },
+ "application/vnd.rn-realmedia-vbr": {
+ "source": "apache",
+ "extensions": ["rmvb"]
+ },
+ "application/vnd.route66.link66+xml": {
+ "source": "iana",
+ "extensions": ["link66"]
+ },
+ "application/vnd.rs-274x": {
+ "source": "iana"
+ },
+ "application/vnd.ruckus.download": {
+ "source": "iana"
+ },
+ "application/vnd.s3sms": {
+ "source": "iana"
+ },
+ "application/vnd.sailingtracker.track": {
+ "source": "iana",
+ "extensions": ["st"]
+ },
+ "application/vnd.sbm.cid": {
+ "source": "iana"
+ },
+ "application/vnd.sbm.mid2": {
+ "source": "iana"
+ },
+ "application/vnd.scribus": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.3df": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.csf": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.doc": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.eml": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.mht": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.net": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.ppt": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.tiff": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.xls": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.html": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.pdf": {
+ "source": "iana"
+ },
+ "application/vnd.seemail": {
+ "source": "iana",
+ "extensions": ["see"]
+ },
+ "application/vnd.sema": {
+ "source": "iana",
+ "extensions": ["sema"]
+ },
+ "application/vnd.semd": {
+ "source": "iana",
+ "extensions": ["semd"]
+ },
+ "application/vnd.semf": {
+ "source": "iana",
+ "extensions": ["semf"]
+ },
+ "application/vnd.shana.informed.formdata": {
+ "source": "iana",
+ "extensions": ["ifm"]
+ },
+ "application/vnd.shana.informed.formtemplate": {
+ "source": "iana",
+ "extensions": ["itp"]
+ },
+ "application/vnd.shana.informed.interchange": {
+ "source": "iana",
+ "extensions": ["iif"]
+ },
+ "application/vnd.shana.informed.package": {
+ "source": "iana",
+ "extensions": ["ipk"]
+ },
+ "application/vnd.simtech-mindmapper": {
+ "source": "iana",
+ "extensions": ["twd","twds"]
+ },
+ "application/vnd.siren+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.smaf": {
+ "source": "iana",
+ "extensions": ["mmf"]
+ },
+ "application/vnd.smart.notebook": {
+ "source": "iana"
+ },
+ "application/vnd.smart.teacher": {
+ "source": "iana",
+ "extensions": ["teacher"]
+ },
+ "application/vnd.software602.filler.form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.software602.filler.form-xml-zip": {
+ "source": "iana"
+ },
+ "application/vnd.solent.sdkm+xml": {
+ "source": "iana",
+ "extensions": ["sdkm","sdkd"]
+ },
+ "application/vnd.spotfire.dxp": {
+ "source": "iana",
+ "extensions": ["dxp"]
+ },
+ "application/vnd.spotfire.sfs": {
+ "source": "iana",
+ "extensions": ["sfs"]
+ },
+ "application/vnd.sss-cod": {
+ "source": "iana"
+ },
+ "application/vnd.sss-dtf": {
+ "source": "iana"
+ },
+ "application/vnd.sss-ntf": {
+ "source": "iana"
+ },
+ "application/vnd.stardivision.calc": {
+ "source": "apache",
+ "extensions": ["sdc"]
+ },
+ "application/vnd.stardivision.draw": {
+ "source": "apache",
+ "extensions": ["sda"]
+ },
+ "application/vnd.stardivision.impress": {
+ "source": "apache",
+ "extensions": ["sdd"]
+ },
+ "application/vnd.stardivision.math": {
+ "source": "apache",
+ "extensions": ["smf"]
+ },
+ "application/vnd.stardivision.writer": {
+ "source": "apache",
+ "extensions": ["sdw","vor"]
+ },
+ "application/vnd.stardivision.writer-global": {
+ "source": "apache",
+ "extensions": ["sgl"]
+ },
+ "application/vnd.stepmania.package": {
+ "source": "iana",
+ "extensions": ["smzip"]
+ },
+ "application/vnd.stepmania.stepchart": {
+ "source": "iana",
+ "extensions": ["sm"]
+ },
+ "application/vnd.street-stream": {
+ "source": "iana"
+ },
+ "application/vnd.sun.wadl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.sun.xml.calc": {
+ "source": "apache",
+ "extensions": ["sxc"]
+ },
+ "application/vnd.sun.xml.calc.template": {
+ "source": "apache",
+ "extensions": ["stc"]
+ },
+ "application/vnd.sun.xml.draw": {
+ "source": "apache",
+ "extensions": ["sxd"]
+ },
+ "application/vnd.sun.xml.draw.template": {
+ "source": "apache",
+ "extensions": ["std"]
+ },
+ "application/vnd.sun.xml.impress": {
+ "source": "apache",
+ "extensions": ["sxi"]
+ },
+ "application/vnd.sun.xml.impress.template": {
+ "source": "apache",
+ "extensions": ["sti"]
+ },
+ "application/vnd.sun.xml.math": {
+ "source": "apache",
+ "extensions": ["sxm"]
+ },
+ "application/vnd.sun.xml.writer": {
+ "source": "apache",
+ "extensions": ["sxw"]
+ },
+ "application/vnd.sun.xml.writer.global": {
+ "source": "apache",
+ "extensions": ["sxg"]
+ },
+ "application/vnd.sun.xml.writer.template": {
+ "source": "apache",
+ "extensions": ["stw"]
+ },
+ "application/vnd.sus-calendar": {
+ "source": "iana",
+ "extensions": ["sus","susp"]
+ },
+ "application/vnd.svd": {
+ "source": "iana",
+ "extensions": ["svd"]
+ },
+ "application/vnd.swiftview-ics": {
+ "source": "iana"
+ },
+ "application/vnd.symbian.install": {
+ "source": "apache",
+ "extensions": ["sis","sisx"]
+ },
+ "application/vnd.syncml+xml": {
+ "source": "iana",
+ "extensions": ["xsm"]
+ },
+ "application/vnd.syncml.dm+wbxml": {
+ "source": "iana",
+ "extensions": ["bdm"]
+ },
+ "application/vnd.syncml.dm+xml": {
+ "source": "iana",
+ "extensions": ["xdm"]
+ },
+ "application/vnd.syncml.dm.notification": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.ds.notification": {
+ "source": "iana"
+ },
+ "application/vnd.tao.intent-module-archive": {
+ "source": "iana",
+ "extensions": ["tao"]
+ },
+ "application/vnd.tcpdump.pcap": {
+ "source": "iana",
+ "extensions": ["pcap","cap","dmp"]
+ },
+ "application/vnd.tmd.mediaflex.api+xml": {
+ "source": "iana"
+ },
+ "application/vnd.tmobile-livetv": {
+ "source": "iana",
+ "extensions": ["tmo"]
+ },
+ "application/vnd.trid.tpt": {
+ "source": "iana",
+ "extensions": ["tpt"]
+ },
+ "application/vnd.triscape.mxs": {
+ "source": "iana",
+ "extensions": ["mxs"]
+ },
+ "application/vnd.trueapp": {
+ "source": "iana",
+ "extensions": ["tra"]
+ },
+ "application/vnd.truedoc": {
+ "source": "iana"
+ },
+ "application/vnd.ubisoft.webplayer": {
+ "source": "iana"
+ },
+ "application/vnd.ufdl": {
+ "source": "iana",
+ "extensions": ["ufd","ufdl"]
+ },
+ "application/vnd.uiq.theme": {
+ "source": "iana",
+ "extensions": ["utz"]
+ },
+ "application/vnd.umajin": {
+ "source": "iana",
+ "extensions": ["umj"]
+ },
+ "application/vnd.unity": {
+ "source": "iana",
+ "extensions": ["unityweb"]
+ },
+ "application/vnd.uoml+xml": {
+ "source": "iana",
+ "extensions": ["uoml"]
+ },
+ "application/vnd.uplanet.alert": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.alert-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.signal": {
+ "source": "iana"
+ },
+ "application/vnd.valve.source.material": {
+ "source": "iana"
+ },
+ "application/vnd.vcx": {
+ "source": "iana",
+ "extensions": ["vcx"]
+ },
+ "application/vnd.vd-study": {
+ "source": "iana"
+ },
+ "application/vnd.vectorworks": {
+ "source": "iana"
+ },
+ "application/vnd.verimatrix.vcas": {
+ "source": "iana"
+ },
+ "application/vnd.vidsoft.vidconference": {
+ "source": "iana"
+ },
+ "application/vnd.visio": {
+ "source": "iana",
+ "extensions": ["vsd","vst","vss","vsw"]
+ },
+ "application/vnd.visionary": {
+ "source": "iana",
+ "extensions": ["vis"]
+ },
+ "application/vnd.vividence.scriptfile": {
+ "source": "iana"
+ },
+ "application/vnd.vsf": {
+ "source": "iana",
+ "extensions": ["vsf"]
+ },
+ "application/vnd.wap.sic": {
+ "source": "iana"
+ },
+ "application/vnd.wap.slc": {
+ "source": "iana"
+ },
+ "application/vnd.wap.wbxml": {
+ "source": "iana",
+ "extensions": ["wbxml"]
+ },
+ "application/vnd.wap.wmlc": {
+ "source": "iana",
+ "extensions": ["wmlc"]
+ },
+ "application/vnd.wap.wmlscriptc": {
+ "source": "iana",
+ "extensions": ["wmlsc"]
+ },
+ "application/vnd.webturbo": {
+ "source": "iana",
+ "extensions": ["wtb"]
+ },
+ "application/vnd.wfa.p2p": {
+ "source": "iana"
+ },
+ "application/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "application/vnd.windows.devicepairing": {
+ "source": "iana"
+ },
+ "application/vnd.wmc": {
+ "source": "iana"
+ },
+ "application/vnd.wmf.bootstrap": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica.package": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.player": {
+ "source": "iana",
+ "extensions": ["nbp"]
+ },
+ "application/vnd.wordperfect": {
+ "source": "iana",
+ "extensions": ["wpd"]
+ },
+ "application/vnd.wqd": {
+ "source": "iana",
+ "extensions": ["wqd"]
+ },
+ "application/vnd.wrq-hp3000-labelled": {
+ "source": "iana"
+ },
+ "application/vnd.wt.stf": {
+ "source": "iana",
+ "extensions": ["stf"]
+ },
+ "application/vnd.wv.csp+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.csp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.ssp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xacml+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.xara": {
+ "source": "iana",
+ "extensions": ["xar"]
+ },
+ "application/vnd.xfdl": {
+ "source": "iana",
+ "extensions": ["xfdl"]
+ },
+ "application/vnd.xfdl.webform": {
+ "source": "iana"
+ },
+ "application/vnd.xmi+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.cpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.dpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.plan": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.ppkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.xlim": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.hv-dic": {
+ "source": "iana",
+ "extensions": ["hvd"]
+ },
+ "application/vnd.yamaha.hv-script": {
+ "source": "iana",
+ "extensions": ["hvs"]
+ },
+ "application/vnd.yamaha.hv-voice": {
+ "source": "iana",
+ "extensions": ["hvp"]
+ },
+ "application/vnd.yamaha.openscoreformat": {
+ "source": "iana",
+ "extensions": ["osf"]
+ },
+ "application/vnd.yamaha.openscoreformat.osfpvg+xml": {
+ "source": "iana",
+ "extensions": ["osfpvg"]
+ },
+ "application/vnd.yamaha.remote-setup": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.smaf-audio": {
+ "source": "iana",
+ "extensions": ["saf"]
+ },
+ "application/vnd.yamaha.smaf-phrase": {
+ "source": "iana",
+ "extensions": ["spf"]
+ },
+ "application/vnd.yamaha.through-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.tunnel-udpencap": {
+ "source": "iana"
+ },
+ "application/vnd.yaoweme": {
+ "source": "iana"
+ },
+ "application/vnd.yellowriver-custom-menu": {
+ "source": "iana",
+ "extensions": ["cmp"]
+ },
+ "application/vnd.zul": {
+ "source": "iana",
+ "extensions": ["zir","zirz"]
+ },
+ "application/vnd.zzazz.deck+xml": {
+ "source": "iana",
+ "extensions": ["zaz"]
+ },
+ "application/voicexml+xml": {
+ "source": "iana",
+ "extensions": ["vxml"]
+ },
+ "application/vq-rtcpxr": {
+ "source": "iana"
+ },
+ "application/watcherinfo+xml": {
+ "source": "iana"
+ },
+ "application/whoispp-query": {
+ "source": "iana"
+ },
+ "application/whoispp-response": {
+ "source": "iana"
+ },
+ "application/widget": {
+ "source": "iana",
+ "extensions": ["wgt"]
+ },
+ "application/winhlp": {
+ "source": "apache",
+ "extensions": ["hlp"]
+ },
+ "application/wita": {
+ "source": "iana"
+ },
+ "application/wordperfect5.1": {
+ "source": "iana"
+ },
+ "application/wsdl+xml": {
+ "source": "iana",
+ "extensions": ["wsdl"]
+ },
+ "application/wspolicy+xml": {
+ "source": "iana",
+ "extensions": ["wspolicy"]
+ },
+ "application/x-7z-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["7z"]
+ },
+ "application/x-abiword": {
+ "source": "apache",
+ "extensions": ["abw"]
+ },
+ "application/x-ace-compressed": {
+ "source": "apache",
+ "extensions": ["ace"]
+ },
+ "application/x-amf": {
+ "source": "apache"
+ },
+ "application/x-apple-diskimage": {
+ "source": "apache",
+ "extensions": ["dmg"]
+ },
+ "application/x-authorware-bin": {
+ "source": "apache",
+ "extensions": ["aab","x32","u32","vox"]
+ },
+ "application/x-authorware-map": {
+ "source": "apache",
+ "extensions": ["aam"]
+ },
+ "application/x-authorware-seg": {
+ "source": "apache",
+ "extensions": ["aas"]
+ },
+ "application/x-bcpio": {
+ "source": "apache",
+ "extensions": ["bcpio"]
+ },
+ "application/x-bittorrent": {
+ "source": "apache",
+ "extensions": ["torrent"]
+ },
+ "application/x-blorb": {
+ "source": "apache",
+ "extensions": ["blb","blorb"]
+ },
+ "application/x-bzip": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz"]
+ },
+ "application/x-bzip2": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz2","boz"]
+ },
+ "application/x-cbr": {
+ "source": "apache",
+ "extensions": ["cbr","cba","cbt","cbz","cb7"]
+ },
+ "application/x-cdlink": {
+ "source": "apache",
+ "extensions": ["vcd"]
+ },
+ "application/x-cfs-compressed": {
+ "source": "apache",
+ "extensions": ["cfs"]
+ },
+ "application/x-chat": {
+ "source": "apache",
+ "extensions": ["chat"]
+ },
+ "application/x-chess-pgn": {
+ "source": "apache",
+ "extensions": ["pgn"]
+ },
+ "application/x-chrome-extension": {
+ "extensions": ["crx"]
+ },
+ "application/x-compress": {
+ "source": "apache"
+ },
+ "application/x-conference": {
+ "source": "apache",
+ "extensions": ["nsc"]
+ },
+ "application/x-cpio": {
+ "source": "apache",
+ "extensions": ["cpio"]
+ },
+ "application/x-csh": {
+ "source": "apache",
+ "extensions": ["csh"]
+ },
+ "application/x-deb": {
+ "compressible": false
+ },
+ "application/x-debian-package": {
+ "source": "apache",
+ "extensions": ["deb","udeb"]
+ },
+ "application/x-dgc-compressed": {
+ "source": "apache",
+ "extensions": ["dgc"]
+ },
+ "application/x-director": {
+ "source": "apache",
+ "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]
+ },
+ "application/x-doom": {
+ "source": "apache",
+ "extensions": ["wad"]
+ },
+ "application/x-dtbncx+xml": {
+ "source": "apache",
+ "extensions": ["ncx"]
+ },
+ "application/x-dtbook+xml": {
+ "source": "apache",
+ "extensions": ["dtb"]
+ },
+ "application/x-dtbresource+xml": {
+ "source": "apache",
+ "extensions": ["res"]
+ },
+ "application/x-dvi": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["dvi"]
+ },
+ "application/x-envoy": {
+ "source": "apache",
+ "extensions": ["evy"]
+ },
+ "application/x-eva": {
+ "source": "apache",
+ "extensions": ["eva"]
+ },
+ "application/x-font-bdf": {
+ "source": "apache",
+ "extensions": ["bdf"]
+ },
+ "application/x-font-dos": {
+ "source": "apache"
+ },
+ "application/x-font-framemaker": {
+ "source": "apache"
+ },
+ "application/x-font-ghostscript": {
+ "source": "apache",
+ "extensions": ["gsf"]
+ },
+ "application/x-font-libgrx": {
+ "source": "apache"
+ },
+ "application/x-font-linux-psf": {
+ "source": "apache",
+ "extensions": ["psf"]
+ },
+ "application/x-font-otf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "application/x-font-pcf": {
+ "source": "apache",
+ "extensions": ["pcf"]
+ },
+ "application/x-font-snf": {
+ "source": "apache",
+ "extensions": ["snf"]
+ },
+ "application/x-font-speedo": {
+ "source": "apache"
+ },
+ "application/x-font-sunos-news": {
+ "source": "apache"
+ },
+ "application/x-font-ttf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ttf","ttc"]
+ },
+ "application/x-font-type1": {
+ "source": "apache",
+ "extensions": ["pfa","pfb","pfm","afm"]
+ },
+ "application/x-font-vfont": {
+ "source": "apache"
+ },
+ "application/x-freearc": {
+ "source": "apache",
+ "extensions": ["arc"]
+ },
+ "application/x-futuresplash": {
+ "source": "apache",
+ "extensions": ["spl"]
+ },
+ "application/x-gca-compressed": {
+ "source": "apache",
+ "extensions": ["gca"]
+ },
+ "application/x-glulx": {
+ "source": "apache",
+ "extensions": ["ulx"]
+ },
+ "application/x-gnumeric": {
+ "source": "apache",
+ "extensions": ["gnumeric"]
+ },
+ "application/x-gramps-xml": {
+ "source": "apache",
+ "extensions": ["gramps"]
+ },
+ "application/x-gtar": {
+ "source": "apache",
+ "extensions": ["gtar"]
+ },
+ "application/x-gzip": {
+ "source": "apache"
+ },
+ "application/x-hdf": {
+ "source": "apache",
+ "extensions": ["hdf"]
+ },
+ "application/x-install-instructions": {
+ "source": "apache",
+ "extensions": ["install"]
+ },
+ "application/x-iso9660-image": {
+ "source": "apache",
+ "extensions": ["iso"]
+ },
+ "application/x-java-jnlp-file": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jnlp"]
+ },
+ "application/x-javascript": {
+ "compressible": true
+ },
+ "application/x-latex": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["latex"]
+ },
+ "application/x-lua-bytecode": {
+ "extensions": ["luac"]
+ },
+ "application/x-lzh-compressed": {
+ "source": "apache",
+ "extensions": ["lzh","lha"]
+ },
+ "application/x-mie": {
+ "source": "apache",
+ "extensions": ["mie"]
+ },
+ "application/x-mobipocket-ebook": {
+ "source": "apache",
+ "extensions": ["prc","mobi"]
+ },
+ "application/x-mpegurl": {
+ "compressible": false
+ },
+ "application/x-ms-application": {
+ "source": "apache",
+ "extensions": ["application"]
+ },
+ "application/x-ms-shortcut": {
+ "source": "apache",
+ "extensions": ["lnk"]
+ },
+ "application/x-ms-wmd": {
+ "source": "apache",
+ "extensions": ["wmd"]
+ },
+ "application/x-ms-wmz": {
+ "source": "apache",
+ "extensions": ["wmz"]
+ },
+ "application/x-ms-xbap": {
+ "source": "apache",
+ "extensions": ["xbap"]
+ },
+ "application/x-msaccess": {
+ "source": "apache",
+ "extensions": ["mdb"]
+ },
+ "application/x-msbinder": {
+ "source": "apache",
+ "extensions": ["obd"]
+ },
+ "application/x-mscardfile": {
+ "source": "apache",
+ "extensions": ["crd"]
+ },
+ "application/x-msclip": {
+ "source": "apache",
+ "extensions": ["clp"]
+ },
+ "application/x-msdownload": {
+ "source": "apache",
+ "extensions": ["exe","dll","com","bat","msi"]
+ },
+ "application/x-msmediaview": {
+ "source": "apache",
+ "extensions": ["mvb","m13","m14"]
+ },
+ "application/x-msmetafile": {
+ "source": "apache",
+ "extensions": ["wmf","wmz","emf","emz"]
+ },
+ "application/x-msmoney": {
+ "source": "apache",
+ "extensions": ["mny"]
+ },
+ "application/x-mspublisher": {
+ "source": "apache",
+ "extensions": ["pub"]
+ },
+ "application/x-msschedule": {
+ "source": "apache",
+ "extensions": ["scd"]
+ },
+ "application/x-msterminal": {
+ "source": "apache",
+ "extensions": ["trm"]
+ },
+ "application/x-mswrite": {
+ "source": "apache",
+ "extensions": ["wri"]
+ },
+ "application/x-netcdf": {
+ "source": "apache",
+ "extensions": ["nc","cdf"]
+ },
+ "application/x-nzb": {
+ "source": "apache",
+ "extensions": ["nzb"]
+ },
+ "application/x-pkcs12": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["p12","pfx"]
+ },
+ "application/x-pkcs7-certificates": {
+ "source": "apache",
+ "extensions": ["p7b","spc"]
+ },
+ "application/x-pkcs7-certreqresp": {
+ "source": "apache",
+ "extensions": ["p7r"]
+ },
+ "application/x-rar-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["rar"]
+ },
+ "application/x-research-info-systems": {
+ "source": "apache",
+ "extensions": ["ris"]
+ },
+ "application/x-sh": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["sh"]
+ },
+ "application/x-shar": {
+ "source": "apache",
+ "extensions": ["shar"]
+ },
+ "application/x-shockwave-flash": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["swf"]
+ },
+ "application/x-silverlight-app": {
+ "source": "apache",
+ "extensions": ["xap"]
+ },
+ "application/x-sql": {
+ "source": "apache",
+ "extensions": ["sql"]
+ },
+ "application/x-stuffit": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["sit"]
+ },
+ "application/x-stuffitx": {
+ "source": "apache",
+ "extensions": ["sitx"]
+ },
+ "application/x-subrip": {
+ "source": "apache",
+ "extensions": ["srt"]
+ },
+ "application/x-sv4cpio": {
+ "source": "apache",
+ "extensions": ["sv4cpio"]
+ },
+ "application/x-sv4crc": {
+ "source": "apache",
+ "extensions": ["sv4crc"]
+ },
+ "application/x-t3vm-image": {
+ "source": "apache",
+ "extensions": ["t3"]
+ },
+ "application/x-tads": {
+ "source": "apache",
+ "extensions": ["gam"]
+ },
+ "application/x-tar": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["tar"]
+ },
+ "application/x-tcl": {
+ "source": "apache",
+ "extensions": ["tcl"]
+ },
+ "application/x-tex": {
+ "source": "apache",
+ "extensions": ["tex"]
+ },
+ "application/x-tex-tfm": {
+ "source": "apache",
+ "extensions": ["tfm"]
+ },
+ "application/x-texinfo": {
+ "source": "apache",
+ "extensions": ["texinfo","texi"]
+ },
+ "application/x-tgif": {
+ "source": "apache",
+ "extensions": ["obj"]
+ },
+ "application/x-ustar": {
+ "source": "apache",
+ "extensions": ["ustar"]
+ },
+ "application/x-wais-source": {
+ "source": "apache",
+ "extensions": ["src"]
+ },
+ "application/x-web-app-manifest+json": {
+ "compressible": true,
+ "extensions": ["webapp"]
+ },
+ "application/x-www-form-urlencoded": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/x-x509-ca-cert": {
+ "source": "apache",
+ "extensions": ["der","crt"]
+ },
+ "application/x-xfig": {
+ "source": "apache",
+ "extensions": ["fig"]
+ },
+ "application/x-xliff+xml": {
+ "source": "apache",
+ "extensions": ["xlf"]
+ },
+ "application/x-xpinstall": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["xpi"]
+ },
+ "application/x-xz": {
+ "source": "apache",
+ "extensions": ["xz"]
+ },
+ "application/x-zmachine": {
+ "source": "apache",
+ "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"]
+ },
+ "application/x400-bp": {
+ "source": "iana"
+ },
+ "application/xacml+xml": {
+ "source": "iana"
+ },
+ "application/xaml+xml": {
+ "source": "apache",
+ "extensions": ["xaml"]
+ },
+ "application/xcap-att+xml": {
+ "source": "iana"
+ },
+ "application/xcap-caps+xml": {
+ "source": "iana"
+ },
+ "application/xcap-diff+xml": {
+ "source": "iana",
+ "extensions": ["xdf"]
+ },
+ "application/xcap-el+xml": {
+ "source": "iana"
+ },
+ "application/xcap-error+xml": {
+ "source": "iana"
+ },
+ "application/xcap-ns+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info-diff+xml": {
+ "source": "iana"
+ },
+ "application/xenc+xml": {
+ "source": "iana",
+ "extensions": ["xenc"]
+ },
+ "application/xhtml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xhtml","xht"]
+ },
+ "application/xhtml-voice+xml": {
+ "source": "iana"
+ },
+ "application/xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xml","xsl","xsd"]
+ },
+ "application/xml-dtd": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dtd"]
+ },
+ "application/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "application/xml-patch+xml": {
+ "source": "iana"
+ },
+ "application/xmpp+xml": {
+ "source": "iana"
+ },
+ "application/xop+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xop"]
+ },
+ "application/xproc+xml": {
+ "source": "apache",
+ "extensions": ["xpl"]
+ },
+ "application/xslt+xml": {
+ "source": "iana",
+ "extensions": ["xslt"]
+ },
+ "application/xspf+xml": {
+ "source": "apache",
+ "extensions": ["xspf"]
+ },
+ "application/xv+xml": {
+ "source": "iana",
+ "extensions": ["mxml","xhvml","xvml","xvm"]
+ },
+ "application/yang": {
+ "source": "iana",
+ "extensions": ["yang"]
+ },
+ "application/yin+xml": {
+ "source": "iana",
+ "extensions": ["yin"]
+ },
+ "application/zip": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["zip"]
+ },
+ "application/zlib": {
+ "source": "iana"
+ },
+ "audio/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "audio/32kadpcm": {
+ "source": "iana"
+ },
+ "audio/3gpp": {
+ "source": "iana"
+ },
+ "audio/3gpp2": {
+ "source": "iana"
+ },
+ "audio/ac3": {
+ "source": "iana"
+ },
+ "audio/adpcm": {
+ "source": "apache",
+ "extensions": ["adp"]
+ },
+ "audio/amr": {
+ "source": "iana"
+ },
+ "audio/amr-wb": {
+ "source": "iana"
+ },
+ "audio/amr-wb+": {
+ "source": "iana"
+ },
+ "audio/aptx": {
+ "source": "iana"
+ },
+ "audio/asc": {
+ "source": "iana"
+ },
+ "audio/atrac-advanced-lossless": {
+ "source": "iana"
+ },
+ "audio/atrac-x": {
+ "source": "iana"
+ },
+ "audio/atrac3": {
+ "source": "iana"
+ },
+ "audio/basic": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["au","snd"]
+ },
+ "audio/bv16": {
+ "source": "iana"
+ },
+ "audio/bv32": {
+ "source": "iana"
+ },
+ "audio/clearmode": {
+ "source": "iana"
+ },
+ "audio/cn": {
+ "source": "iana"
+ },
+ "audio/dat12": {
+ "source": "iana"
+ },
+ "audio/dls": {
+ "source": "iana"
+ },
+ "audio/dsr-es201108": {
+ "source": "iana"
+ },
+ "audio/dsr-es202050": {
+ "source": "iana"
+ },
+ "audio/dsr-es202211": {
+ "source": "iana"
+ },
+ "audio/dsr-es202212": {
+ "source": "iana"
+ },
+ "audio/dv": {
+ "source": "iana"
+ },
+ "audio/dvi4": {
+ "source": "iana"
+ },
+ "audio/eac3": {
+ "source": "iana"
+ },
+ "audio/encaprtp": {
+ "source": "iana"
+ },
+ "audio/evrc": {
+ "source": "iana"
+ },
+ "audio/evrc-qcp": {
+ "source": "iana"
+ },
+ "audio/evrc0": {
+ "source": "iana"
+ },
+ "audio/evrc1": {
+ "source": "iana"
+ },
+ "audio/evrcb": {
+ "source": "iana"
+ },
+ "audio/evrcb0": {
+ "source": "iana"
+ },
+ "audio/evrcb1": {
+ "source": "iana"
+ },
+ "audio/evrcnw": {
+ "source": "iana"
+ },
+ "audio/evrcnw0": {
+ "source": "iana"
+ },
+ "audio/evrcnw1": {
+ "source": "iana"
+ },
+ "audio/evrcwb": {
+ "source": "iana"
+ },
+ "audio/evrcwb0": {
+ "source": "iana"
+ },
+ "audio/evrcwb1": {
+ "source": "iana"
+ },
+ "audio/fwdred": {
+ "source": "iana"
+ },
+ "audio/g719": {
+ "source": "iana"
+ },
+ "audio/g722": {
+ "source": "iana"
+ },
+ "audio/g7221": {
+ "source": "iana"
+ },
+ "audio/g723": {
+ "source": "iana"
+ },
+ "audio/g726-16": {
+ "source": "iana"
+ },
+ "audio/g726-24": {
+ "source": "iana"
+ },
+ "audio/g726-32": {
+ "source": "iana"
+ },
+ "audio/g726-40": {
+ "source": "iana"
+ },
+ "audio/g728": {
+ "source": "iana"
+ },
+ "audio/g729": {
+ "source": "iana"
+ },
+ "audio/g7291": {
+ "source": "iana"
+ },
+ "audio/g729d": {
+ "source": "iana"
+ },
+ "audio/g729e": {
+ "source": "iana"
+ },
+ "audio/gsm": {
+ "source": "iana"
+ },
+ "audio/gsm-efr": {
+ "source": "iana"
+ },
+ "audio/gsm-hr-08": {
+ "source": "iana"
+ },
+ "audio/ilbc": {
+ "source": "iana"
+ },
+ "audio/ip-mr_v2.5": {
+ "source": "iana"
+ },
+ "audio/isac": {
+ "source": "apache"
+ },
+ "audio/l16": {
+ "source": "iana"
+ },
+ "audio/l20": {
+ "source": "iana"
+ },
+ "audio/l24": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/l8": {
+ "source": "iana"
+ },
+ "audio/lpc": {
+ "source": "iana"
+ },
+ "audio/midi": {
+ "source": "apache",
+ "extensions": ["mid","midi","kar","rmi"]
+ },
+ "audio/mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/mp4": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mp4a","m4a"]
+ },
+ "audio/mp4a-latm": {
+ "source": "iana"
+ },
+ "audio/mpa": {
+ "source": "iana"
+ },
+ "audio/mpa-robust": {
+ "source": "iana"
+ },
+ "audio/mpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"]
+ },
+ "audio/mpeg4-generic": {
+ "source": "iana"
+ },
+ "audio/musepack": {
+ "source": "apache"
+ },
+ "audio/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["oga","ogg","spx"]
+ },
+ "audio/opus": {
+ "source": "apache"
+ },
+ "audio/parityfec": {
+ "source": "iana"
+ },
+ "audio/pcma": {
+ "source": "iana"
+ },
+ "audio/pcma-wb": {
+ "source": "iana"
+ },
+ "audio/pcmu": {
+ "source": "iana"
+ },
+ "audio/pcmu-wb": {
+ "source": "iana"
+ },
+ "audio/prs.sid": {
+ "source": "iana"
+ },
+ "audio/qcelp": {
+ "source": "iana"
+ },
+ "audio/raptorfec": {
+ "source": "iana"
+ },
+ "audio/red": {
+ "source": "iana"
+ },
+ "audio/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "audio/rtp-midi": {
+ "source": "iana"
+ },
+ "audio/rtploopback": {
+ "source": "iana"
+ },
+ "audio/rtx": {
+ "source": "iana"
+ },
+ "audio/s3m": {
+ "source": "apache",
+ "extensions": ["s3m"]
+ },
+ "audio/silk": {
+ "source": "apache",
+ "extensions": ["sil"]
+ },
+ "audio/smv": {
+ "source": "iana"
+ },
+ "audio/smv-qcp": {
+ "source": "iana"
+ },
+ "audio/smv0": {
+ "source": "iana"
+ },
+ "audio/sp-midi": {
+ "source": "iana"
+ },
+ "audio/speex": {
+ "source": "iana"
+ },
+ "audio/t140c": {
+ "source": "iana"
+ },
+ "audio/t38": {
+ "source": "iana"
+ },
+ "audio/telephone-event": {
+ "source": "iana"
+ },
+ "audio/tone": {
+ "source": "iana"
+ },
+ "audio/uemclip": {
+ "source": "iana"
+ },
+ "audio/ulpfec": {
+ "source": "iana"
+ },
+ "audio/vdvi": {
+ "source": "iana"
+ },
+ "audio/vmr-wb": {
+ "source": "iana"
+ },
+ "audio/vnd.3gpp.iufp": {
+ "source": "iana"
+ },
+ "audio/vnd.4sb": {
+ "source": "iana"
+ },
+ "audio/vnd.audiokoz": {
+ "source": "iana"
+ },
+ "audio/vnd.celp": {
+ "source": "iana"
+ },
+ "audio/vnd.cisco.nse": {
+ "source": "iana"
+ },
+ "audio/vnd.cmles.radio-events": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.anp1": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.inf1": {
+ "source": "iana"
+ },
+ "audio/vnd.dece.audio": {
+ "source": "iana",
+ "extensions": ["uva","uvva"]
+ },
+ "audio/vnd.digital-winds": {
+ "source": "iana",
+ "extensions": ["eol"]
+ },
+ "audio/vnd.dlna.adts": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mlp": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mps": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2x": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2z": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pulse.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dra": {
+ "source": "iana",
+ "extensions": ["dra"]
+ },
+ "audio/vnd.dts": {
+ "source": "iana",
+ "extensions": ["dts"]
+ },
+ "audio/vnd.dts.hd": {
+ "source": "iana",
+ "extensions": ["dtshd"]
+ },
+ "audio/vnd.dvb.file": {
+ "source": "iana"
+ },
+ "audio/vnd.everad.plj": {
+ "source": "iana"
+ },
+ "audio/vnd.hns.audio": {
+ "source": "iana"
+ },
+ "audio/vnd.lucent.voice": {
+ "source": "iana",
+ "extensions": ["lvp"]
+ },
+ "audio/vnd.ms-playready.media.pya": {
+ "source": "iana",
+ "extensions": ["pya"]
+ },
+ "audio/vnd.nokia.mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/vnd.nortel.vbk": {
+ "source": "iana"
+ },
+ "audio/vnd.nuera.ecelp4800": {
+ "source": "iana",
+ "extensions": ["ecelp4800"]
+ },
+ "audio/vnd.nuera.ecelp7470": {
+ "source": "iana",
+ "extensions": ["ecelp7470"]
+ },
+ "audio/vnd.nuera.ecelp9600": {
+ "source": "iana",
+ "extensions": ["ecelp9600"]
+ },
+ "audio/vnd.octel.sbc": {
+ "source": "iana"
+ },
+ "audio/vnd.qcelp": {
+ "source": "iana"
+ },
+ "audio/vnd.rhetorex.32kadpcm": {
+ "source": "iana"
+ },
+ "audio/vnd.rip": {
+ "source": "iana",
+ "extensions": ["rip"]
+ },
+ "audio/vnd.rn-realaudio": {
+ "compressible": false
+ },
+ "audio/vnd.sealedmedia.softseal.mpeg": {
+ "source": "iana"
+ },
+ "audio/vnd.vmx.cvsd": {
+ "source": "iana"
+ },
+ "audio/vnd.wave": {
+ "compressible": false
+ },
+ "audio/vorbis": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/vorbis-config": {
+ "source": "iana"
+ },
+ "audio/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["weba"]
+ },
+ "audio/x-aac": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["aac"]
+ },
+ "audio/x-aiff": {
+ "source": "apache",
+ "extensions": ["aif","aiff","aifc"]
+ },
+ "audio/x-caf": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["caf"]
+ },
+ "audio/x-flac": {
+ "source": "apache",
+ "extensions": ["flac"]
+ },
+ "audio/x-matroska": {
+ "source": "apache",
+ "extensions": ["mka"]
+ },
+ "audio/x-mpegurl": {
+ "source": "apache",
+ "extensions": ["m3u"]
+ },
+ "audio/x-ms-wax": {
+ "source": "apache",
+ "extensions": ["wax"]
+ },
+ "audio/x-ms-wma": {
+ "source": "apache",
+ "extensions": ["wma"]
+ },
+ "audio/x-pn-realaudio": {
+ "source": "apache",
+ "extensions": ["ram","ra"]
+ },
+ "audio/x-pn-realaudio-plugin": {
+ "source": "apache",
+ "extensions": ["rmp"]
+ },
+ "audio/x-tta": {
+ "source": "apache"
+ },
+ "audio/x-wav": {
+ "source": "apache",
+ "extensions": ["wav"]
+ },
+ "audio/xm": {
+ "source": "apache",
+ "extensions": ["xm"]
+ },
+ "chemical/x-cdx": {
+ "source": "apache",
+ "extensions": ["cdx"]
+ },
+ "chemical/x-cif": {
+ "source": "apache",
+ "extensions": ["cif"]
+ },
+ "chemical/x-cmdf": {
+ "source": "apache",
+ "extensions": ["cmdf"]
+ },
+ "chemical/x-cml": {
+ "source": "apache",
+ "extensions": ["cml"]
+ },
+ "chemical/x-csml": {
+ "source": "apache",
+ "extensions": ["csml"]
+ },
+ "chemical/x-pdb": {
+ "source": "apache"
+ },
+ "chemical/x-xyz": {
+ "source": "apache",
+ "extensions": ["xyz"]
+ },
+ "font/opentype": {
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "image/bmp": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["bmp"]
+ },
+ "image/cgm": {
+ "source": "iana",
+ "extensions": ["cgm"]
+ },
+ "image/fits": {
+ "source": "iana"
+ },
+ "image/g3fax": {
+ "source": "iana",
+ "extensions": ["g3"]
+ },
+ "image/gif": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["gif"]
+ },
+ "image/ief": {
+ "source": "iana",
+ "extensions": ["ief"]
+ },
+ "image/jp2": {
+ "source": "iana"
+ },
+ "image/jpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["jpeg","jpg","jpe"]
+ },
+ "image/jpm": {
+ "source": "iana"
+ },
+ "image/jpx": {
+ "source": "iana"
+ },
+ "image/ktx": {
+ "source": "iana",
+ "extensions": ["ktx"]
+ },
+ "image/naplps": {
+ "source": "iana"
+ },
+ "image/pjpeg": {
+ "compressible": false
+ },
+ "image/png": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["png"]
+ },
+ "image/prs.btif": {
+ "source": "iana",
+ "extensions": ["btif"]
+ },
+ "image/prs.pti": {
+ "source": "iana"
+ },
+ "image/pwg-raster": {
+ "source": "iana"
+ },
+ "image/sgi": {
+ "source": "apache",
+ "extensions": ["sgi"]
+ },
+ "image/svg+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["svg","svgz"]
+ },
+ "image/t38": {
+ "source": "iana"
+ },
+ "image/tiff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["tiff","tif"]
+ },
+ "image/tiff-fx": {
+ "source": "iana"
+ },
+ "image/vnd.adobe.photoshop": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["psd"]
+ },
+ "image/vnd.airzip.accelerator.azv": {
+ "source": "iana"
+ },
+ "image/vnd.cns.inf2": {
+ "source": "iana"
+ },
+ "image/vnd.dece.graphic": {
+ "source": "iana",
+ "extensions": ["uvi","uvvi","uvg","uvvg"]
+ },
+ "image/vnd.djvu": {
+ "source": "iana",
+ "extensions": ["djvu","djv"]
+ },
+ "image/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "image/vnd.dwg": {
+ "source": "iana",
+ "extensions": ["dwg"]
+ },
+ "image/vnd.dxf": {
+ "source": "iana",
+ "extensions": ["dxf"]
+ },
+ "image/vnd.fastbidsheet": {
+ "source": "iana",
+ "extensions": ["fbs"]
+ },
+ "image/vnd.fpx": {
+ "source": "iana",
+ "extensions": ["fpx"]
+ },
+ "image/vnd.fst": {
+ "source": "iana",
+ "extensions": ["fst"]
+ },
+ "image/vnd.fujixerox.edmics-mmr": {
+ "source": "iana",
+ "extensions": ["mmr"]
+ },
+ "image/vnd.fujixerox.edmics-rlc": {
+ "source": "iana",
+ "extensions": ["rlc"]
+ },
+ "image/vnd.globalgraphics.pgb": {
+ "source": "iana"
+ },
+ "image/vnd.microsoft.icon": {
+ "source": "iana"
+ },
+ "image/vnd.mix": {
+ "source": "iana"
+ },
+ "image/vnd.ms-modi": {
+ "source": "iana",
+ "extensions": ["mdi"]
+ },
+ "image/vnd.ms-photo": {
+ "source": "apache",
+ "extensions": ["wdp"]
+ },
+ "image/vnd.net-fpx": {
+ "source": "iana",
+ "extensions": ["npx"]
+ },
+ "image/vnd.radiance": {
+ "source": "iana"
+ },
+ "image/vnd.sealed.png": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.gif": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.jpg": {
+ "source": "iana"
+ },
+ "image/vnd.svf": {
+ "source": "iana"
+ },
+ "image/vnd.tencent.tap": {
+ "source": "iana"
+ },
+ "image/vnd.valve.source.texture": {
+ "source": "iana"
+ },
+ "image/vnd.wap.wbmp": {
+ "source": "iana",
+ "extensions": ["wbmp"]
+ },
+ "image/vnd.xiff": {
+ "source": "iana",
+ "extensions": ["xif"]
+ },
+ "image/webp": {
+ "source": "apache",
+ "extensions": ["webp"]
+ },
+ "image/x-3ds": {
+ "source": "apache",
+ "extensions": ["3ds"]
+ },
+ "image/x-cmu-raster": {
+ "source": "apache",
+ "extensions": ["ras"]
+ },
+ "image/x-cmx": {
+ "source": "apache",
+ "extensions": ["cmx"]
+ },
+ "image/x-freehand": {
+ "source": "apache",
+ "extensions": ["fh","fhc","fh4","fh5","fh7"]
+ },
+ "image/x-icon": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ico"]
+ },
+ "image/x-mrsid-image": {
+ "source": "apache",
+ "extensions": ["sid"]
+ },
+ "image/x-pcx": {
+ "source": "apache",
+ "extensions": ["pcx"]
+ },
+ "image/x-pict": {
+ "source": "apache",
+ "extensions": ["pic","pct"]
+ },
+ "image/x-portable-anymap": {
+ "source": "apache",
+ "extensions": ["pnm"]
+ },
+ "image/x-portable-bitmap": {
+ "source": "apache",
+ "extensions": ["pbm"]
+ },
+ "image/x-portable-graymap": {
+ "source": "apache",
+ "extensions": ["pgm"]
+ },
+ "image/x-portable-pixmap": {
+ "source": "apache",
+ "extensions": ["ppm"]
+ },
+ "image/x-rgb": {
+ "source": "apache",
+ "extensions": ["rgb"]
+ },
+ "image/x-tga": {
+ "source": "apache",
+ "extensions": ["tga"]
+ },
+ "image/x-xbitmap": {
+ "source": "apache",
+ "extensions": ["xbm"]
+ },
+ "image/x-xcf": {
+ "compressible": false
+ },
+ "image/x-xpixmap": {
+ "source": "apache",
+ "extensions": ["xpm"]
+ },
+ "image/x-xwindowdump": {
+ "source": "apache",
+ "extensions": ["xwd"]
+ },
+ "message/cpim": {
+ "source": "iana"
+ },
+ "message/delivery-status": {
+ "source": "iana"
+ },
+ "message/disposition-notification": {
+ "source": "iana"
+ },
+ "message/external-body": {
+ "source": "iana"
+ },
+ "message/feedback-report": {
+ "source": "iana"
+ },
+ "message/global": {
+ "source": "iana"
+ },
+ "message/global-delivery-status": {
+ "source": "iana"
+ },
+ "message/global-disposition-notification": {
+ "source": "iana"
+ },
+ "message/global-headers": {
+ "source": "iana"
+ },
+ "message/http": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/imdn+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "message/news": {
+ "source": "iana"
+ },
+ "message/partial": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/rfc822": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eml","mime"]
+ },
+ "message/s-http": {
+ "source": "iana"
+ },
+ "message/sip": {
+ "source": "iana"
+ },
+ "message/sipfrag": {
+ "source": "iana"
+ },
+ "message/tracking-status": {
+ "source": "iana"
+ },
+ "message/vnd.si.simp": {
+ "source": "iana"
+ },
+ "message/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "model/iges": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["igs","iges"]
+ },
+ "model/mesh": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["msh","mesh","silo"]
+ },
+ "model/vnd.collada+xml": {
+ "source": "iana",
+ "extensions": ["dae"]
+ },
+ "model/vnd.dwf": {
+ "source": "iana",
+ "extensions": ["dwf"]
+ },
+ "model/vnd.flatland.3dml": {
+ "source": "iana"
+ },
+ "model/vnd.gdl": {
+ "source": "iana",
+ "extensions": ["gdl"]
+ },
+ "model/vnd.gs-gdl": {
+ "source": "apache"
+ },
+ "model/vnd.gs.gdl": {
+ "source": "iana"
+ },
+ "model/vnd.gtw": {
+ "source": "iana",
+ "extensions": ["gtw"]
+ },
+ "model/vnd.moml+xml": {
+ "source": "iana"
+ },
+ "model/vnd.mts": {
+ "source": "iana",
+ "extensions": ["mts"]
+ },
+ "model/vnd.opengex": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.binary": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.text": {
+ "source": "iana"
+ },
+ "model/vnd.valve.source.compiled-map": {
+ "source": "iana"
+ },
+ "model/vnd.vtu": {
+ "source": "iana",
+ "extensions": ["vtu"]
+ },
+ "model/vrml": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["wrl","vrml"]
+ },
+ "model/x3d+binary": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3db","x3dbz"]
+ },
+ "model/x3d+fastinfoset": {
+ "source": "iana"
+ },
+ "model/x3d+vrml": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3dv","x3dvz"]
+ },
+ "model/x3d+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["x3d","x3dz"]
+ },
+ "model/x3d-vrml": {
+ "source": "iana"
+ },
+ "multipart/alternative": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/appledouble": {
+ "source": "iana"
+ },
+ "multipart/byteranges": {
+ "source": "iana"
+ },
+ "multipart/digest": {
+ "source": "iana"
+ },
+ "multipart/encrypted": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/form-data": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/header-set": {
+ "source": "iana"
+ },
+ "multipart/mixed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/parallel": {
+ "source": "iana"
+ },
+ "multipart/related": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/report": {
+ "source": "iana"
+ },
+ "multipart/signed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/voice-message": {
+ "source": "iana"
+ },
+ "multipart/x-mixed-replace": {
+ "source": "iana"
+ },
+ "text/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "text/cache-manifest": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["appcache","manifest"]
+ },
+ "text/calendar": {
+ "source": "iana",
+ "extensions": ["ics","ifb"]
+ },
+ "text/calender": {
+ "compressible": true
+ },
+ "text/cmd": {
+ "compressible": true
+ },
+ "text/coffeescript": {
+ "extensions": ["coffee"]
+ },
+ "text/css": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["css"]
+ },
+ "text/csv": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["csv"]
+ },
+ "text/csv-schema": {
+ "source": "iana"
+ },
+ "text/directory": {
+ "source": "iana"
+ },
+ "text/dns": {
+ "source": "iana"
+ },
+ "text/ecmascript": {
+ "source": "iana"
+ },
+ "text/encaprtp": {
+ "source": "iana"
+ },
+ "text/enriched": {
+ "source": "iana"
+ },
+ "text/fwdred": {
+ "source": "iana"
+ },
+ "text/grammar-ref-list": {
+ "source": "iana"
+ },
+ "text/hjson": {
+ "extensions": ["hjson"]
+ },
+ "text/html": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["html","htm"]
+ },
+ "text/jade": {
+ "extensions": ["jade"]
+ },
+ "text/javascript": {
+ "source": "iana",
+ "compressible": true
+ },
+ "text/jcr-cnd": {
+ "source": "iana"
+ },
+ "text/jsx": {
+ "compressible": true,
+ "extensions": ["jsx"]
+ },
+ "text/less": {
+ "extensions": ["less"]
+ },
+ "text/markdown": {
+ "source": "iana"
+ },
+ "text/mizar": {
+ "source": "iana"
+ },
+ "text/n3": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["n3"]
+ },
+ "text/parameters": {
+ "source": "iana"
+ },
+ "text/parityfec": {
+ "source": "iana"
+ },
+ "text/plain": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["txt","text","conf","def","list","log","in","ini"]
+ },
+ "text/provenance-notation": {
+ "source": "iana"
+ },
+ "text/prs.fallenstein.rst": {
+ "source": "iana"
+ },
+ "text/prs.lines.tag": {
+ "source": "iana",
+ "extensions": ["dsc"]
+ },
+ "text/raptorfec": {
+ "source": "iana"
+ },
+ "text/red": {
+ "source": "iana"
+ },
+ "text/rfc822-headers": {
+ "source": "iana"
+ },
+ "text/richtext": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtx"]
+ },
+ "text/rtf": {
+ "source": "iana"
+ },
+ "text/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "text/rtploopback": {
+ "source": "iana"
+ },
+ "text/rtx": {
+ "source": "iana"
+ },
+ "text/sgml": {
+ "source": "iana",
+ "extensions": ["sgml","sgm"]
+ },
+ "text/stylus": {
+ "extensions": ["stylus","styl"]
+ },
+ "text/t140": {
+ "source": "iana"
+ },
+ "text/tab-separated-values": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["tsv"]
+ },
+ "text/troff": {
+ "source": "iana",
+ "extensions": ["t","tr","roff","man","me","ms"]
+ },
+ "text/turtle": {
+ "source": "iana",
+ "extensions": ["ttl"]
+ },
+ "text/ulpfec": {
+ "source": "iana"
+ },
+ "text/uri-list": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["uri","uris","urls"]
+ },
+ "text/vcard": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["vcard"]
+ },
+ "text/vnd.a": {
+ "source": "iana"
+ },
+ "text/vnd.abc": {
+ "source": "iana"
+ },
+ "text/vnd.curl": {
+ "source": "iana",
+ "extensions": ["curl"]
+ },
+ "text/vnd.curl.dcurl": {
+ "source": "apache",
+ "extensions": ["dcurl"]
+ },
+ "text/vnd.curl.mcurl": {
+ "source": "apache",
+ "extensions": ["mcurl"]
+ },
+ "text/vnd.curl.scurl": {
+ "source": "apache",
+ "extensions": ["scurl"]
+ },
+ "text/vnd.debian.copyright": {
+ "source": "iana"
+ },
+ "text/vnd.dmclientscript": {
+ "source": "iana"
+ },
+ "text/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "text/vnd.esmertec.theme-descriptor": {
+ "source": "iana"
+ },
+ "text/vnd.fly": {
+ "source": "iana",
+ "extensions": ["fly"]
+ },
+ "text/vnd.fmi.flexstor": {
+ "source": "iana",
+ "extensions": ["flx"]
+ },
+ "text/vnd.graphviz": {
+ "source": "iana",
+ "extensions": ["gv"]
+ },
+ "text/vnd.in3d.3dml": {
+ "source": "iana",
+ "extensions": ["3dml"]
+ },
+ "text/vnd.in3d.spot": {
+ "source": "iana",
+ "extensions": ["spot"]
+ },
+ "text/vnd.iptc.newsml": {
+ "source": "iana"
+ },
+ "text/vnd.iptc.nitf": {
+ "source": "iana"
+ },
+ "text/vnd.latex-z": {
+ "source": "iana"
+ },
+ "text/vnd.motorola.reflex": {
+ "source": "iana"
+ },
+ "text/vnd.ms-mediapackage": {
+ "source": "iana"
+ },
+ "text/vnd.net2phone.commcenter.command": {
+ "source": "iana"
+ },
+ "text/vnd.radisys.msml-basic-layout": {
+ "source": "iana"
+ },
+ "text/vnd.si.uricatalogue": {
+ "source": "iana"
+ },
+ "text/vnd.sun.j2me.app-descriptor": {
+ "source": "iana",
+ "extensions": ["jad"]
+ },
+ "text/vnd.trolltech.linguist": {
+ "source": "iana"
+ },
+ "text/vnd.wap.si": {
+ "source": "iana"
+ },
+ "text/vnd.wap.sl": {
+ "source": "iana"
+ },
+ "text/vnd.wap.wml": {
+ "source": "iana",
+ "extensions": ["wml"]
+ },
+ "text/vnd.wap.wmlscript": {
+ "source": "iana",
+ "extensions": ["wmls"]
+ },
+ "text/vtt": {
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["vtt"]
+ },
+ "text/x-asm": {
+ "source": "apache",
+ "extensions": ["s","asm"]
+ },
+ "text/x-c": {
+ "source": "apache",
+ "extensions": ["c","cc","cxx","cpp","h","hh","dic"]
+ },
+ "text/x-component": {
+ "extensions": ["htc"]
+ },
+ "text/x-fortran": {
+ "source": "apache",
+ "extensions": ["f","for","f77","f90"]
+ },
+ "text/x-gwt-rpc": {
+ "compressible": true
+ },
+ "text/x-handlebars-template": {
+ "extensions": ["hbs"]
+ },
+ "text/x-java-source": {
+ "source": "apache",
+ "extensions": ["java"]
+ },
+ "text/x-jquery-tmpl": {
+ "compressible": true
+ },
+ "text/x-lua": {
+ "extensions": ["lua"]
+ },
+ "text/x-markdown": {
+ "compressible": true,
+ "extensions": ["markdown","md","mkd"]
+ },
+ "text/x-nfo": {
+ "source": "apache",
+ "extensions": ["nfo"]
+ },
+ "text/x-opml": {
+ "source": "apache",
+ "extensions": ["opml"]
+ },
+ "text/x-pascal": {
+ "source": "apache",
+ "extensions": ["p","pas"]
+ },
+ "text/x-sass": {
+ "extensions": ["sass"]
+ },
+ "text/x-scss": {
+ "extensions": ["scss"]
+ },
+ "text/x-setext": {
+ "source": "apache",
+ "extensions": ["etx"]
+ },
+ "text/x-sfv": {
+ "source": "apache",
+ "extensions": ["sfv"]
+ },
+ "text/x-uuencode": {
+ "source": "apache",
+ "extensions": ["uu"]
+ },
+ "text/x-vcalendar": {
+ "source": "apache",
+ "extensions": ["vcs"]
+ },
+ "text/x-vcard": {
+ "source": "apache",
+ "extensions": ["vcf"]
+ },
+ "text/xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "text/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "text/yaml": {
+ "extensions": ["yaml","yml"]
+ },
+ "video/1d-interleaved-parityfec": {
+ "source": "apache"
+ },
+ "video/3gpp": {
+ "source": "apache",
+ "extensions": ["3gp"]
+ },
+ "video/3gpp-tt": {
+ "source": "apache"
+ },
+ "video/3gpp2": {
+ "source": "apache",
+ "extensions": ["3g2"]
+ },
+ "video/bmpeg": {
+ "source": "apache"
+ },
+ "video/bt656": {
+ "source": "apache"
+ },
+ "video/celb": {
+ "source": "apache"
+ },
+ "video/dv": {
+ "source": "apache"
+ },
+ "video/h261": {
+ "source": "apache",
+ "extensions": ["h261"]
+ },
+ "video/h263": {
+ "source": "apache",
+ "extensions": ["h263"]
+ },
+ "video/h263-1998": {
+ "source": "apache"
+ },
+ "video/h263-2000": {
+ "source": "apache"
+ },
+ "video/h264": {
+ "source": "apache",
+ "extensions": ["h264"]
+ },
+ "video/h264-rcdo": {
+ "source": "apache"
+ },
+ "video/h264-svc": {
+ "source": "apache"
+ },
+ "video/jpeg": {
+ "source": "apache",
+ "extensions": ["jpgv"]
+ },
+ "video/jpeg2000": {
+ "source": "apache"
+ },
+ "video/jpm": {
+ "source": "apache",
+ "extensions": ["jpm","jpgm"]
+ },
+ "video/mj2": {
+ "source": "apache",
+ "extensions": ["mj2","mjp2"]
+ },
+ "video/mp1s": {
+ "source": "apache"
+ },
+ "video/mp2p": {
+ "source": "apache"
+ },
+ "video/mp2t": {
+ "source": "apache",
+ "extensions": ["ts"]
+ },
+ "video/mp4": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mp4","mp4v","mpg4"]
+ },
+ "video/mp4v-es": {
+ "source": "apache"
+ },
+ "video/mpeg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mpeg","mpg","mpe","m1v","m2v"]
+ },
+ "video/mpeg4-generic": {
+ "source": "apache"
+ },
+ "video/mpv": {
+ "source": "apache"
+ },
+ "video/nv": {
+ "source": "apache"
+ },
+ "video/ogg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ogv"]
+ },
+ "video/parityfec": {
+ "source": "apache"
+ },
+ "video/pointer": {
+ "source": "apache"
+ },
+ "video/quicktime": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["qt","mov"]
+ },
+ "video/raw": {
+ "source": "apache"
+ },
+ "video/rtp-enc-aescm128": {
+ "source": "apache"
+ },
+ "video/rtx": {
+ "source": "apache"
+ },
+ "video/smpte292m": {
+ "source": "apache"
+ },
+ "video/ulpfec": {
+ "source": "apache"
+ },
+ "video/vc1": {
+ "source": "apache"
+ },
+ "video/vnd.cctv": {
+ "source": "apache"
+ },
+ "video/vnd.dece.hd": {
+ "source": "apache",
+ "extensions": ["uvh","uvvh"]
+ },
+ "video/vnd.dece.mobile": {
+ "source": "apache",
+ "extensions": ["uvm","uvvm"]
+ },
+ "video/vnd.dece.mp4": {
+ "source": "apache"
+ },
+ "video/vnd.dece.pd": {
+ "source": "apache",
+ "extensions": ["uvp","uvvp"]
+ },
+ "video/vnd.dece.sd": {
+ "source": "apache",
+ "extensions": ["uvs","uvvs"]
+ },
+ "video/vnd.dece.video": {
+ "source": "apache",
+ "extensions": ["uvv","uvvv"]
+ },
+ "video/vnd.directv.mpeg": {
+ "source": "apache"
+ },
+ "video/vnd.directv.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dlna.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dvb.file": {
+ "source": "apache",
+ "extensions": ["dvb"]
+ },
+ "video/vnd.fvt": {
+ "source": "apache",
+ "extensions": ["fvt"]
+ },
+ "video/vnd.hns.video": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsavc": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsmpeg2": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.video": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.videop": {
+ "source": "apache"
+ },
+ "video/vnd.mpegurl": {
+ "source": "apache",
+ "extensions": ["mxu","m4u"]
+ },
+ "video/vnd.ms-playready.media.pyv": {
+ "source": "apache",
+ "extensions": ["pyv"]
+ },
+ "video/vnd.nokia.interleaved-multimedia": {
+ "source": "apache"
+ },
+ "video/vnd.nokia.videovoip": {
+ "source": "apache"
+ },
+ "video/vnd.objectvideo": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg1": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg4": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.swf": {
+ "source": "apache"
+ },
+ "video/vnd.sealedmedia.softseal.mov": {
+ "source": "apache"
+ },
+ "video/vnd.uvvu.mp4": {
+ "source": "apache",
+ "extensions": ["uvu","uvvu"]
+ },
+ "video/vnd.vivo": {
+ "source": "apache",
+ "extensions": ["viv"]
+ },
+ "video/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["webm"]
+ },
+ "video/x-f4v": {
+ "source": "apache",
+ "extensions": ["f4v"]
+ },
+ "video/x-fli": {
+ "source": "apache",
+ "extensions": ["fli"]
+ },
+ "video/x-flv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["flv"]
+ },
+ "video/x-m4v": {
+ "source": "apache",
+ "extensions": ["m4v"]
+ },
+ "video/x-matroska": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mkv","mk3d","mks"]
+ },
+ "video/x-mng": {
+ "source": "apache",
+ "extensions": ["mng"]
+ },
+ "video/x-ms-asf": {
+ "source": "apache",
+ "extensions": ["asf","asx"]
+ },
+ "video/x-ms-vob": {
+ "source": "apache",
+ "extensions": ["vob"]
+ },
+ "video/x-ms-wm": {
+ "source": "apache",
+ "extensions": ["wm"]
+ },
+ "video/x-ms-wmv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["wmv"]
+ },
+ "video/x-ms-wmx": {
+ "source": "apache",
+ "extensions": ["wmx"]
+ },
+ "video/x-ms-wvx": {
+ "source": "apache",
+ "extensions": ["wvx"]
+ },
+ "video/x-msvideo": {
+ "source": "apache",
+ "extensions": ["avi"]
+ },
+ "video/x-sgi-movie": {
+ "source": "apache",
+ "extensions": ["movie"]
+ },
+ "video/x-smv": {
+ "source": "apache",
+ "extensions": ["smv"]
+ },
+ "x-conference/x-cooltalk": {
+ "source": "apache",
+ "extensions": ["ice"]
+ },
+ "x-shader/x-fragment": {
+ "compressible": true
+ },
+ "x-shader/x-vertex": {
+ "compressible": true
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js
new file mode 100644
index 0000000..551031f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js
@@ -0,0 +1,11 @@
+/*!
+ * mime-db
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = require('./db.json')
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json
new file mode 100644
index 0000000..135ef18
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json
@@ -0,0 +1,93 @@
+{
+ "name": "mime-db",
+ "description": "Media Type Database",
+ "version": "1.7.0",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "db",
+ "type",
+ "types",
+ "database",
+ "charset",
+ "charsets"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/mime-db"
+ },
+ "devDependencies": {
+ "co": "4",
+ "cogent": "1",
+ "csv-parse": "0",
+ "gnode": "0.1.0",
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.4",
+ "raw-body": "~1.3.2",
+ "stream-to-array": "2"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "db.json",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "build": "node scripts/build",
+ "fetch": "gnode scripts/extensions && gnode scripts/types",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "update": "npm run fetch && npm run build"
+ },
+ "gitHead": "972cc3ed48530ab7aca7a155bf2dbd1b13aa8f86",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-db/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-db",
+ "_id": "mime-db@1.7.0",
+ "_shasum": "36cf66a6c52ea71827bde287f77c254f5ef1b8d3",
+ "_from": "mime-db@~1.7.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "36cf66a6c52ea71827bde287f77c254f5ef1b8d3",
+ "tarball": "http://registry.npmjs.org/mime-db/-/mime-db-1.7.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.7.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/package.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/package.json
new file mode 100644
index 0000000..9b5b766
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/package.json
@@ -0,0 +1,84 @@
+{
+ "name": "mime-types",
+ "description": "The ultimate javascript content-type utility.",
+ "version": "2.0.9",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jeremiah Senkpiel",
+ "email": "fishrock123@rocketmail.com",
+ "url": "https://searchbeam.jit.su"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "types"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/mime-types"
+ },
+ "dependencies": {
+ "mime-db": "~1.7.0"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec test/test.js",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
+ },
+ "gitHead": "1c6d55da440b6a9d2c0e9c2faac98e6b1be47fc7",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-types/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-types",
+ "_id": "mime-types@2.0.9",
+ "_shasum": "e8449aff27b1245ddc6641b524439ae80c4b78a6",
+ "_from": "mime-types@~2.0.9",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e8449aff27b1245ddc6641b524439ae80c4b78a6",
+ "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-2.0.9.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.9.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/package.json b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/package.json
new file mode 100644
index 0000000..f555e14
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/node_modules/type-is/package.json
@@ -0,0 +1,93 @@
+{
+ "name": "type-is",
+ "description": "Infer the content-type of a request.",
+ "version": "1.5.7",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/type-is"
+ },
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.0.9"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.5"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "keywords": [
+ "content",
+ "type",
+ "checking"
+ ],
+ "gitHead": "f4335cc563a98ee80366f04f67c50cef089ae803",
+ "bugs": {
+ "url": "https://github.com/jshttp/type-is/issues"
+ },
+ "homepage": "https://github.com/jshttp/type-is",
+ "_id": "type-is@1.5.7",
+ "_shasum": "b9368a593cc6ef7d0645e78b2f4c64cbecd05e90",
+ "_from": "type-is@~1.5.5",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b9368a593cc6ef7d0645e78b2f4c64cbecd05e90",
+ "tarball": "http://registry.npmjs.org/type-is/-/type-is-1.5.7.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/type-is/-/type-is-1.5.7.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/body-parser/package.json b/dgbuilder/dgeflows/node_modules/body-parser/package.json
new file mode 100644
index 0000000..0ad9070
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/body-parser/package.json
@@ -0,0 +1,97 @@
+{
+ "name": "body-parser",
+ "description": "Node.js body parsing middleware",
+ "version": "1.10.2",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/expressjs/body-parser"
+ },
+ "dependencies": {
+ "bytes": "1.0.0",
+ "depd": "~1.0.0",
+ "iconv-lite": "0.4.6",
+ "media-typer": "0.3.0",
+ "on-finished": "~2.2.0",
+ "qs": "2.3.3",
+ "raw-body": "1.3.2",
+ "type-is": "~1.5.5"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "methods": "~1.1.1",
+ "mocha": "~2.1.0",
+ "supertest": "~0.15.0"
+ },
+ "files": [
+ "lib/",
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "scripts": {
+ "test": "mocha --require test/support/env --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/"
+ },
+ "gitHead": "1fbb94d61e3435865db6092e7f6685436aecb858",
+ "bugs": {
+ "url": "https://github.com/expressjs/body-parser/issues"
+ },
+ "homepage": "https://github.com/expressjs/body-parser",
+ "_id": "body-parser@1.10.2",
+ "_shasum": "405d465fcd3ccf0ea8a35adbf1055f6e98316bd1",
+ "_from": "body-parser@~1.10.2",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "405d465fcd3ccf0ea8a35adbf1055f6e98316bd1",
+ "tarball": "http://registry.npmjs.org/body-parser/-/body-parser-1.10.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.10.2.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/HISTORY.md b/dgbuilder/dgeflows/node_modules/cookie-parser/HISTORY.md
new file mode 100644
index 0000000..36472cd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/HISTORY.md
@@ -0,0 +1,51 @@
+1.3.4 / 2015-02-15
+==================
+
+ * deps: cookie-signature@1.0.6
+
+1.3.3 / 2014-09-05
+==================
+
+ * deps: cookie-signature@1.0.5
+
+1.3.2 / 2014-06-26
+==================
+
+ * deps: cookie-signature@1.0.4
+ - fix for timing attacks
+
+1.3.1 / 2014-06-17
+==================
+
+ * actually export `signedCookie`
+
+1.3.0 / 2014-06-17
+==================
+
+ * add `signedCookie` export for single cookie unsigning
+
+1.2.0 / 2014-06-17
+==================
+
+ * export parsing functions
+ * `req.cookies` and `req.signedCookies` are now plain objects
+ * slightly faster parsing of many cookies
+
+1.1.0 / 2014-05-12
+==================
+
+ * Support for NodeJS version 0.8
+ * deps: cookie@0.1.2
+ - Fix for maxAge == 0
+ - made compat with expires field
+ - tweak maxAge NaN error message
+
+1.0.1 / 2014-02-20
+==================
+
+ * add missing dependencies
+
+1.0.0 / 2014-02-15
+==================
+
+ * Genesis from `connect`
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/LICENSE b/dgbuilder/dgeflows/node_modules/cookie-parser/LICENSE
new file mode 100644
index 0000000..a7693b0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/README.md b/dgbuilder/dgeflows/node_modules/cookie-parser/README.md
new file mode 100644
index 0000000..4ba9885
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/README.md
@@ -0,0 +1,78 @@
+# cookie-parser
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Parse `Cookie` header and populate `req.cookies` with an object keyed by the cookie
+names. Optionally you may enable signed cookie support by passing a `secret` string,
+which assigns `req.secret` so it may be used by other middleware.
+
+## Installation
+
+```sh
+$ npm install cookie-parser
+```
+
+## API
+
+```js
+var express = require('express')
+var cookieParser = require('cookie-parser')
+
+var app = express()
+app.use(cookieParser())
+```
+
+### cookieParser(secret, options)
+
+- `secret` a string used for signing cookies. This is optional and if not specified, will not parse signed cookies.
+- `options` an object that is passed to `cookie.parse` as the second option. See [cookie](https://www.npmjs.org/package/cookie) for more information.
+ - `decode` a function to decode the value of the cookie
+
+### cookieParser.JSONCookie(str)
+
+Parse a cookie value as a JSON cookie. This will return the parsed JSON value if it was a JSON cookie, otherwise it will return the passed value.
+
+### cookieParser.JSONCookies(cookies)
+
+Given an object, this will iterate over the keys and call `JSONCookie` on each value. This will return the same object passed in.
+
+### cookieParser.signedCookie(str, secret)
+
+Parse a cookie value as a signed cookie. This will return the parsed unsigned value if it was a signed cookie and the signature was valid, otherwise it will return the passed value.
+
+### cookieParser.signedCookies(cookies, secret)
+
+Given an object, this will iterate over the keys and check if any value is a signed cookie. If it is a signed cookie and the signature is valid, the key will be deleted from the object and added to the new object that is returned.
+
+## Example
+
+```js
+var express = require('express')
+var cookieParser = require('cookie-parser')
+
+var app = express()
+app.use(cookieParser())
+
+app.get('/', function(req, res) {
+ console.log("Cookies: ", req.cookies)
+})
+
+app.listen(8080)
+
+// curl command that sends an HTTP request with two cookies
+// curl http://127.0.0.1:8080 --cookie "Cho=Kim;Greet=Hello"
+```
+
+### [MIT Licensed](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/cookie-parser.svg
+[npm-url]: https://npmjs.org/package/cookie-parser
+[travis-image]: https://img.shields.io/travis/expressjs/cookie-parser/master.svg
+[travis-url]: https://travis-ci.org/expressjs/cookie-parser
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/cookie-parser/master.svg
+[coveralls-url]: https://coveralls.io/r/expressjs/cookie-parser?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/cookie-parser.svg
+[downloads-url]: https://npmjs.org/package/cookie-parser
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/index.js b/dgbuilder/dgeflows/node_modules/cookie-parser/index.js
new file mode 100644
index 0000000..cecb840
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/index.js
@@ -0,0 +1,59 @@
+/*!
+ * cookie-parser
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var cookie = require('cookie');
+var parse = require('./lib/parse');
+
+/**
+ * Parse Cookie header and populate `req.cookies`
+ * with an object keyed by the cookie names.
+ *
+ * @param {String} [secret]
+ * @param {Object} [options]
+ * @return {Function}
+ * @api public
+ */
+
+exports = module.exports = function cookieParser(secret, options){
+ return function cookieParser(req, res, next) {
+ if (req.cookies) return next();
+ var cookies = req.headers.cookie;
+
+ req.secret = secret;
+ req.cookies = Object.create(null);
+ req.signedCookies = Object.create(null);
+
+ // no cookies
+ if (!cookies) {
+ return next();
+ }
+
+ req.cookies = cookie.parse(cookies, options);
+
+ // parse signed cookies
+ if (secret) {
+ req.signedCookies = parse.signedCookies(req.cookies, secret);
+ req.signedCookies = parse.JSONCookies(req.signedCookies);
+ }
+
+ // parse JSON cookies
+ req.cookies = parse.JSONCookies(req.cookies);
+
+ next();
+ };
+};
+
+/**
+ * Export parsing functions.
+ */
+
+exports.JSONCookie = parse.JSONCookie;
+exports.JSONCookies = parse.JSONCookies;
+exports.signedCookie = parse.signedCookie;
+exports.signedCookies = parse.signedCookies;
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/lib/parse.js b/dgbuilder/dgeflows/node_modules/cookie-parser/lib/parse.js
new file mode 100644
index 0000000..db1e619
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/lib/parse.js
@@ -0,0 +1,90 @@
+var signature = require('cookie-signature');
+
+/**
+ * Parse signed cookies, returning an object
+ * containing the decoded key/value pairs,
+ * while removing the signed key from `obj`.
+ *
+ * @param {Object} obj
+ * @return {Object}
+ * @api private
+ */
+
+exports.signedCookies = function(obj, secret){
+ var cookies = Object.keys(obj);
+ var dec;
+ var key;
+ var ret = Object.create(null);
+ var val;
+
+ for (var i = 0; i < cookies.length; i++) {
+ key = cookies[i];
+ val = obj[key];
+ dec = exports.signedCookie(val, secret);
+
+ if (val !== dec) {
+ ret[key] = dec;
+ delete obj[key];
+ }
+ }
+
+ return ret;
+};
+
+/**
+ * Parse a signed cookie string, return the decoded value
+ *
+ * @param {String} str signed cookie string
+ * @param {String} secret
+ * @return {String} decoded value
+ * @api private
+ */
+
+exports.signedCookie = function(str, secret){
+ return str.substr(0, 2) === 's:'
+ ? signature.unsign(str.slice(2), secret)
+ : str;
+};
+
+/**
+ * Parse JSON cookies.
+ *
+ * @param {Object} obj
+ * @return {Object}
+ * @api private
+ */
+
+exports.JSONCookies = function(obj){
+ var cookies = Object.keys(obj);
+ var key;
+ var val;
+
+ for (var i = 0; i < cookies.length; i++) {
+ key = cookies[i];
+ val = exports.JSONCookie(obj[key]);
+
+ if (val) {
+ obj[key] = val;
+ }
+ }
+
+ return obj;
+};
+
+/**
+ * Parse JSON cookie string
+ *
+ * @param {String} str
+ * @return {Object} Parsed object or null if not json cookie
+ * @api private
+ */
+
+exports.JSONCookie = function(str) {
+ if (!str || str.substr(0, 2) !== 'j:') return;
+
+ try {
+ return JSON.parse(str.slice(2));
+ } catch (err) {
+ // no op
+ }
+};
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/.npmignore b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/.npmignore
new file mode 100644
index 0000000..f1250e5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/.npmignore
@@ -0,0 +1,4 @@
+support
+test
+examples
+*.sock
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/History.md b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/History.md
new file mode 100644
index 0000000..78513cc
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/History.md
@@ -0,0 +1,38 @@
+1.0.6 / 2015-02-03
+==================
+
+* use `npm test` instead of `make test` to run tests
+* clearer assertion messages when checking input
+
+
+1.0.5 / 2014-09-05
+==================
+
+* add license to package.json
+
+1.0.4 / 2014-06-25
+==================
+
+ * corrected avoidance of timing attacks (thanks @tenbits!)
+
+1.0.3 / 2014-01-28
+==================
+
+ * [incorrect] fix for timing attacks
+
+1.0.2 / 2014-01-28
+==================
+
+ * fix missing repository warning
+ * fix typo in test
+
+1.0.1 / 2013-04-15
+==================
+
+ * Revert "Changed underlying HMAC algo. to sha512."
+ * Revert "Fix for timing attacks on MAC verification."
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/Readme.md b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/Readme.md
new file mode 100644
index 0000000..2559e84
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/Readme.md
@@ -0,0 +1,42 @@
+
+# cookie-signature
+
+ Sign and unsign cookies.
+
+## Example
+
+```js
+var cookie = require('cookie-signature');
+
+var val = cookie.sign('hello', 'tobiiscool');
+val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');
+
+var val = cookie.sign('hello', 'tobiiscool');
+cookie.unsign(val, 'tobiiscool').should.equal('hello');
+cookie.unsign(val, 'luna').should.be.false;
+```
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2012 LearnBoost <tj@learnboost.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/index.js b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/index.js
new file mode 100644
index 0000000..b8c9463
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/index.js
@@ -0,0 +1,51 @@
+/**
+ * Module dependencies.
+ */
+
+var crypto = require('crypto');
+
+/**
+ * Sign the given `val` with `secret`.
+ *
+ * @param {String} val
+ * @param {String} secret
+ * @return {String}
+ * @api private
+ */
+
+exports.sign = function(val, secret){
+ if ('string' != typeof val) throw new TypeError("Cookie value must be provided as a string.");
+ if ('string' != typeof secret) throw new TypeError("Secret string must be provided.");
+ return val + '.' + crypto
+ .createHmac('sha256', secret)
+ .update(val)
+ .digest('base64')
+ .replace(/\=+$/, '');
+};
+
+/**
+ * Unsign and decode the given `val` with `secret`,
+ * returning `false` if the signature is invalid.
+ *
+ * @param {String} val
+ * @param {String} secret
+ * @return {String|Boolean}
+ * @api private
+ */
+
+exports.unsign = function(val, secret){
+ if ('string' != typeof val) throw new TypeError("Signed cookie string must be provided.");
+ if ('string' != typeof secret) throw new TypeError("Secret string must be provided.");
+ var str = val.slice(0, val.lastIndexOf('.'))
+ , mac = exports.sign(str, secret);
+
+ return sha1(mac) == sha1(val) ? str : false;
+};
+
+/**
+ * Private
+ */
+
+function sha1(str){
+ return crypto.createHash('sha1').update(str).digest('hex');
+}
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/package.json b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/package.json
new file mode 100644
index 0000000..3fd6c2f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie-signature/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "cookie-signature",
+ "version": "1.0.6",
+ "description": "Sign and unsign cookies",
+ "keywords": [
+ "cookie",
+ "sign",
+ "unsign"
+ ],
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@learnboost.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/visionmedia/node-cookie-signature.git"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "mocha": "*",
+ "should": "*"
+ },
+ "scripts": {
+ "test": "mocha --require should --reporter spec"
+ },
+ "main": "index",
+ "gitHead": "391b56cf44d88c493491b7e3fc53208cfb976d2a",
+ "bugs": {
+ "url": "https://github.com/visionmedia/node-cookie-signature/issues"
+ },
+ "homepage": "https://github.com/visionmedia/node-cookie-signature",
+ "_id": "cookie-signature@1.0.6",
+ "_shasum": "e303a882b342cc3ee8ca513a79999734dab3ae2c",
+ "_from": "cookie-signature@1.0.6",
+ "_npmVersion": "2.3.0",
+ "_nodeVersion": "0.10.36",
+ "_npmUser": {
+ "name": "natevw",
+ "email": "natevw@yahoo.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "natevw",
+ "email": "natevw@yahoo.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e303a882b342cc3ee8ca513a79999734dab3ae2c",
+ "tarball": "http://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/.npmignore b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/.npmignore
new file mode 100644
index 0000000..efab07f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/.npmignore
@@ -0,0 +1,2 @@
+test
+.travis.yml
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/LICENSE b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/LICENSE
new file mode 100644
index 0000000..249d9de
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/LICENSE
@@ -0,0 +1,9 @@
+// MIT License
+
+Copyright (C) Roman Shtylman <shtylman@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/README.md b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/README.md
new file mode 100644
index 0000000..3170b4b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/README.md
@@ -0,0 +1,44 @@
+# cookie [![Build Status](https://secure.travis-ci.org/defunctzombie/node-cookie.png?branch=master)](http://travis-ci.org/defunctzombie/node-cookie) #
+
+cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers.
+
+See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies.
+
+## how?
+
+```
+npm install cookie
+```
+
+```javascript
+var cookie = require('cookie');
+
+var hdr = cookie.serialize('foo', 'bar');
+// hdr = 'foo=bar';
+
+var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff');
+// cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' };
+```
+
+## more
+
+The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values.
+
+### path
+> cookie path
+
+### expires
+> absolute expiration date for the cookie (Date object)
+
+### maxAge
+> relative max age of the cookie from when the client receives it (seconds)
+
+### domain
+> domain for the cookie
+
+### secure
+> true or false
+
+### httpOnly
+> true or false
+
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/index.js b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/index.js
new file mode 100644
index 0000000..00d54a7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/index.js
@@ -0,0 +1,75 @@
+
+/// Serialize the a name value pair into a cookie string suitable for
+/// http headers. An optional options object specified cookie parameters
+///
+/// serialize('foo', 'bar', { httpOnly: true })
+/// => "foo=bar; httpOnly"
+///
+/// @param {String} name
+/// @param {String} val
+/// @param {Object} options
+/// @return {String}
+var serialize = function(name, val, opt){
+ opt = opt || {};
+ var enc = opt.encode || encode;
+ var pairs = [name + '=' + enc(val)];
+
+ if (null != opt.maxAge) {
+ var maxAge = opt.maxAge - 0;
+ if (isNaN(maxAge)) throw new Error('maxAge should be a Number');
+ pairs.push('Max-Age=' + maxAge);
+ }
+
+ if (opt.domain) pairs.push('Domain=' + opt.domain);
+ if (opt.path) pairs.push('Path=' + opt.path);
+ if (opt.expires) pairs.push('Expires=' + opt.expires.toUTCString());
+ if (opt.httpOnly) pairs.push('HttpOnly');
+ if (opt.secure) pairs.push('Secure');
+
+ return pairs.join('; ');
+};
+
+/// Parse the given cookie header string into an object
+/// The object has the various cookies as keys(names) => values
+/// @param {String} str
+/// @return {Object}
+var parse = function(str, opt) {
+ opt = opt || {};
+ var obj = {}
+ var pairs = str.split(/; */);
+ var dec = opt.decode || decode;
+
+ pairs.forEach(function(pair) {
+ var eq_idx = pair.indexOf('=')
+
+ // skip things that don't look like key=value
+ if (eq_idx < 0) {
+ return;
+ }
+
+ var key = pair.substr(0, eq_idx).trim()
+ var val = pair.substr(++eq_idx, pair.length).trim();
+
+ // quoted values
+ if ('"' == val[0]) {
+ val = val.slice(1, -1);
+ }
+
+ // only assign once
+ if (undefined == obj[key]) {
+ try {
+ obj[key] = dec(val);
+ } catch (e) {
+ obj[key] = val;
+ }
+ }
+ });
+
+ return obj;
+};
+
+var encode = encodeURIComponent;
+var decode = decodeURIComponent;
+
+module.exports.serialize = serialize;
+module.exports.parse = parse;
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/package.json b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/package.json
new file mode 100644
index 0000000..80aecf4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/node_modules/cookie/package.json
@@ -0,0 +1,53 @@
+{
+ "author": {
+ "name": "Roman Shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ "name": "cookie",
+ "description": "cookie parsing and serialization",
+ "version": "0.1.2",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/shtylman/node-cookie.git"
+ },
+ "keywords": [
+ "cookie",
+ "cookies"
+ ],
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "mocha": "1.x.x"
+ },
+ "optionalDependencies": {},
+ "engines": {
+ "node": "*"
+ },
+ "bugs": {
+ "url": "https://github.com/shtylman/node-cookie/issues"
+ },
+ "homepage": "https://github.com/shtylman/node-cookie",
+ "_id": "cookie@0.1.2",
+ "dist": {
+ "shasum": "72fec3d24e48a3432073d90c12642005061004b1",
+ "tarball": "http://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz"
+ },
+ "_from": "cookie@0.1.2",
+ "_npmVersion": "1.4.6",
+ "_npmUser": {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_shasum": "72fec3d24e48a3432073d90c12642005061004b1",
+ "_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/cookie-parser/package.json b/dgbuilder/dgeflows/node_modules/cookie-parser/package.json
new file mode 100644
index 0000000..7df8388
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/cookie-parser/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "cookie-parser",
+ "description": "cookie parsing with signatures",
+ "version": "1.3.4",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ },
+ "licenses": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/expressjs/cookie-parser"
+ },
+ "keywords": [
+ "cookie",
+ "middleware"
+ ],
+ "dependencies": {
+ "cookie": "0.1.2",
+ "cookie-signature": "1.0.6"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~2.1.0",
+ "supertest": "0.15.0"
+ },
+ "files": [
+ "lib/",
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "94764a584c70f26049b14c6ad845c8b0ed0e478b",
+ "bugs": {
+ "url": "https://github.com/expressjs/cookie-parser/issues"
+ },
+ "homepage": "https://github.com/expressjs/cookie-parser",
+ "_id": "cookie-parser@1.3.4",
+ "_shasum": "193035a5be97117a21709b3aa737f6132717bda6",
+ "_from": "cookie-parser@~1.3.3",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "193035a5be97117a21709b3aa737f6132717bda6",
+ "tarball": "http://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.4.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.4.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/debug/.jshintrc b/dgbuilder/dgeflows/node_modules/debug/.jshintrc
new file mode 100644
index 0000000..299877f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/.jshintrc
@@ -0,0 +1,3 @@
+{
+ "laxbreak": true
+}
diff --git a/dgbuilder/dgeflows/node_modules/debug/.npmignore b/dgbuilder/dgeflows/node_modules/debug/.npmignore
new file mode 100644
index 0000000..7e6163d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/.npmignore
@@ -0,0 +1,6 @@
+support
+test
+examples
+example
+*.sock
+dist
diff --git a/dgbuilder/dgeflows/node_modules/debug/History.md b/dgbuilder/dgeflows/node_modules/debug/History.md
new file mode 100644
index 0000000..76999e4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/History.md
@@ -0,0 +1,177 @@
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/debug/Makefile b/dgbuilder/dgeflows/node_modules/debug/Makefile
new file mode 100644
index 0000000..b0bde6e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/Makefile
@@ -0,0 +1,33 @@
+
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# applications
+NODE ?= $(shell which node)
+NPM ?= $(NODE) $(shell which npm)
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+all: dist/debug.js
+
+install: node_modules
+
+clean:
+ @rm -rf node_modules dist
+
+dist:
+ @mkdir -p $@
+
+dist/debug.js: node_modules browser.js debug.js dist
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > $@
+
+node_modules: package.json
+ @NODE_ENV= $(NPM) install
+ @touch node_modules
+
+.PHONY: all install clean
diff --git a/dgbuilder/dgeflows/node_modules/debug/Readme.md b/dgbuilder/dgeflows/node_modules/debug/Readme.md
new file mode 100644
index 0000000..40e4b4a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/Readme.md
@@ -0,0 +1,178 @@
+# debug
+
+ tiny node.js debugging utility modelled after node core's debugging technique.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+ With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.
+
+Example _app.js_:
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %s', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example _worker.js_:
+
+```js
+var debug = require('debug')('worker');
+
+setInterval(function(){
+ debug('doing some work');
+}, 1000);
+```
+
+ The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+
+ ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
+
+ ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
+
+#### Windows note
+
+ On Windows the environment variable is set using the `set` command.
+
+ ```cmd
+ set DEBUG=*,-not_this
+ ```
+
+Then, run the program to be debugged as ususal.
+
+## Millisecond diff
+
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+ ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
+
+ When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+
+ ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
+
+## Conventions
+
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+
+## Wildcards
+
+ The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+ You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+
+## Browser support
+
+ Debug works in the browser as well, currently persisted by `localStorage`. Consider the situation shown below where you have `worker:a` and `worker:b`, and wish to debug both. Somewhere in the code on your page, include:
+
+```js
+window.myDebug = require("debug");
+```
+
+ ("debug" is a global object in the browser so we give this object a different name.) When your page is open in the browser, type the following in the console:
+
+```js
+myDebug.enable("worker:*")
+```
+
+ Refresh the page. Debug output will continue to be sent to the console until it is disabled by typing `myDebug.disable()` in the console.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+#### Web Inspector Colors
+
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+ option. These are WebKit web inspectors, Firefox ([since version
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+ and the Firebug plugin for Firefox (any version).
+
+ Colored output looks something like:
+
+ ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
+
+### stderr vs stdout
+
+You can set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally:
+
+Example _stderr.js_:
+
+```js
+var debug = require('../');
+var log = debug('app:log');
+
+// by default console.log is used
+log('goes to stdout!');
+
+var error = debug('app:error');
+// set this namespace to log via console.error
+error.log = console.error.bind(console); // don't forget to bind to console!
+error('goes to stderr');
+log('still goes to stdout!');
+
+// set all output to go via console.warn
+// overrides all per-namespace log settings
+debug.log = console.warn.bind(console);
+log('now goes to stderr via console.warn');
+error('still goes to stderr, but via console.warn now');
+```
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/debug/bower.json b/dgbuilder/dgeflows/node_modules/debug/bower.json
new file mode 100644
index 0000000..37d8333
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/bower.json
@@ -0,0 +1,28 @@
+{
+ "name": "visionmedia-debug",
+ "main": "dist/debug.js",
+ "version": "2.1.2",
+ "homepage": "https://github.com/visionmedia/debug",
+ "authors": [
+ "TJ Holowaychuk <tj@vision-media.ca>"
+ ],
+ "description": "visionmedia-debug",
+ "moduleType": [
+ "amd",
+ "es6",
+ "globals",
+ "node"
+ ],
+ "keywords": [
+ "visionmedia",
+ "debug"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ]
+}
diff --git a/dgbuilder/dgeflows/node_modules/debug/browser.js b/dgbuilder/dgeflows/node_modules/debug/browser.js
new file mode 100644
index 0000000..55f4cf9
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/browser.js
@@ -0,0 +1,175 @@
+
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Use chrome.storage.local if we are in an app
+ */
+
+var storage;
+
+if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined')
+ storage = chrome.storage.local;
+else
+ storage = localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ 'lightseagreen',
+ 'forestgreen',
+ 'goldenrod',
+ 'dodgerblue',
+ 'darkorchid',
+ 'crimson'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ return ('WebkitAppearance' in document.documentElement.style) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (window.console && (console.firebug || (console.exception && console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31);
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ return JSON.stringify(v);
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return args;
+
+ var c = 'color: ' + this.color;
+ args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+ return args;
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ storage.removeItem('debug');
+ } else {
+ storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = storage.debug;
+ } catch(e) {}
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage(){
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/dgbuilder/dgeflows/node_modules/debug/component.json b/dgbuilder/dgeflows/node_modules/debug/component.json
new file mode 100644
index 0000000..2d7b906
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "debug",
+ "repo": "visionmedia/debug",
+ "description": "small debugging utility",
+ "version": "2.1.2",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "main": "browser.js",
+ "scripts": [
+ "browser.js",
+ "debug.js"
+ ],
+ "dependencies": {
+ "rauchg/ms.js": "0.7.0"
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/debug/debug.js b/dgbuilder/dgeflows/node_modules/debug/debug.js
new file mode 100644
index 0000000..7571a86
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/debug.js
@@ -0,0 +1,197 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = debug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lowercased letter, i.e. "n".
+ */
+
+exports.formatters = {};
+
+/**
+ * Previously assigned color.
+ */
+
+var prevColor = 0;
+
+/**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
+ * Select a color.
+ *
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor() {
+ return exports.colors[prevColor++ % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function debug(namespace) {
+
+ // define the `disabled` version
+ function disabled() {
+ }
+ disabled.enabled = false;
+
+ // define the `enabled` version
+ function enabled() {
+
+ var self = enabled;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // add the `color` if not set
+ if (null == self.useColors) self.useColors = exports.useColors();
+ if (null == self.color && self.useColors) self.color = selectColor();
+
+ var args = Array.prototype.slice.call(arguments);
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %o
+ args = ['%o'].concat(args);
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ if ('function' === typeof exports.formatArgs) {
+ args = exports.formatArgs.apply(self, args);
+ }
+ var logFn = enabled.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+ enabled.enabled = true;
+
+ var fn = exports.enabled(namespace) ? enabled : disabled;
+
+ fn.namespace = namespace;
+
+ return fn;
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ var split = (namespaces || '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (var i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/dgbuilder/dgeflows/node_modules/debug/node.js b/dgbuilder/dgeflows/node_modules/debug/node.js
new file mode 100644
index 0000000..5dc999f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/node.js
@@ -0,0 +1,209 @@
+
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+/**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ * $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+var stream = 1 === fd ? process.stdout :
+ 2 === fd ? process.stderr :
+ createWritableStdioStream(fd);
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase();
+ if (0 === debugColors.length) {
+ return tty.isatty(fd);
+ } else {
+ return '0' !== debugColors
+ && 'no' !== debugColors
+ && 'false' !== debugColors
+ && 'disabled' !== debugColors;
+ }
+}
+
+/**
+ * Map %o to `util.inspect()`, since Node doesn't do that out of the box.
+ */
+
+var inspect = (4 === util.inspect.length ?
+ // node <= 0.8.x
+ function (v, colors) {
+ return util.inspect(v, void 0, void 0, colors);
+ } :
+ // node > 0.8.x
+ function (v, colors) {
+ return util.inspect(v, { colors: colors });
+ }
+);
+
+exports.formatters.o = function(v) {
+ return inspect(v, this.useColors)
+ .replace(/\s*\n\s*/g, ' ');
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+ var name = this.namespace;
+
+ if (useColors) {
+ var c = this.color;
+
+ args[0] = ' \u001b[9' + c + 'm' + name + ' '
+ + '\u001b[0m'
+ + args[0] + '\u001b[3' + c + 'm'
+ + ' +' + exports.humanize(this.diff) + '\u001b[0m';
+ } else {
+ args[0] = new Date().toUTCString()
+ + ' ' + name + ' ' + args[0];
+ }
+ return args;
+}
+
+/**
+ * Invokes `console.error()` with the specified arguments.
+ */
+
+function log() {
+ return stream.write(util.format.apply(this, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+ var stream;
+ var tty_wrap = process.binding('tty_wrap');
+
+ // Note stream._type is used for test-module-load-list.js
+
+ switch (tty_wrap.guessHandleType(fd)) {
+ case 'TTY':
+ stream = new tty.WriteStream(fd);
+ stream._type = 'tty';
+
+ // Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ case 'FILE':
+ var fs = require('fs');
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
+ stream._type = 'fs';
+ break;
+
+ case 'PIPE':
+ case 'TCP':
+ var net = require('net');
+ stream = new net.Socket({
+ fd: fd,
+ readable: false,
+ writable: true
+ });
+
+ // FIXME Should probably have an option in net.Socket to create a
+ // stream from an existing fd which is writable only. But for now
+ // we'll just add this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stream.readable = false;
+ stream.read = null;
+ stream._type = 'pipe';
+
+ // FIXME Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ default:
+ // Probably an error on in uv_guess_handle()
+ throw new Error('Implement me. Unknown stream file type!');
+ }
+
+ // For supporting legacy API we put the FD here.
+ stream.fd = fd;
+
+ stream._isStdio = true;
+
+ return stream;
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/.npmignore b/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/.npmignore
new file mode 100644
index 0000000..d1aa0ce
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/.npmignore
@@ -0,0 +1,5 @@
+node_modules
+test
+History.md
+Makefile
+component.json
diff --git a/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/LICENSE b/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/LICENSE
new file mode 100644
index 0000000..6c07561
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014 Guillermo Rauch <rauchg@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/README.md b/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/README.md
new file mode 100644
index 0000000..0fd54fd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/README.md
@@ -0,0 +1,35 @@
+# ms.js: miliseconds conversion utility
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('100') // 100
+```
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](nodejs.org/download).
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as
+a number (e.g: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of
+equivalent ms is returned.
+
+## License
+
+MIT
diff --git a/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/index.js b/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/index.js
new file mode 100644
index 0000000..e79bfa1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/index.js
@@ -0,0 +1,123 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} options
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options){
+ options = options || {};
+ if ('string' == typeof val) return parse(val);
+ return options.long
+ ? long(val)
+ : short(val);
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
+ if (!match) return;
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function short(ms) {
+ if (ms >= d) return Math.round(ms / d) + 'd';
+ if (ms >= h) return Math.round(ms / h) + 'h';
+ if (ms >= m) return Math.round(ms / m) + 'm';
+ if (ms >= s) return Math.round(ms / s) + 's';
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function long(ms) {
+ return plural(ms, d, 'day')
+ || plural(ms, h, 'hour')
+ || plural(ms, m, 'minute')
+ || plural(ms, s, 'second')
+ || ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) return;
+ if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/package.json b/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/package.json
new file mode 100644
index 0000000..ec3ea9b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/node_modules/ms/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "ms",
+ "version": "0.7.0",
+ "description": "Tiny ms conversion utility",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/guille/ms.js.git"
+ },
+ "main": "./index",
+ "devDependencies": {
+ "mocha": "*",
+ "expect.js": "*",
+ "serve": "*"
+ },
+ "component": {
+ "scripts": {
+ "ms/index.js": "index.js"
+ }
+ },
+ "gitHead": "1e9cd9b05ef0dc26f765434d2bfee42394376e52",
+ "bugs": {
+ "url": "https://github.com/guille/ms.js/issues"
+ },
+ "homepage": "https://github.com/guille/ms.js",
+ "_id": "ms@0.7.0",
+ "scripts": {},
+ "_shasum": "865be94c2e7397ad8a57da6a633a6e2f30798b83",
+ "_from": "ms@0.7.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "865be94c2e7397ad8a57da6a633a6e2f30798b83",
+ "tarball": "http://registry.npmjs.org/ms/-/ms-0.7.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/debug/package.json b/dgbuilder/dgeflows/node_modules/debug/package.json
new file mode 100644
index 0000000..4973a82
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/debug/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "debug",
+ "version": "2.1.2",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "contributors": [
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "ms": "0.7.0"
+ },
+ "devDependencies": {
+ "browserify": "9.0.3",
+ "mocha": "*"
+ },
+ "main": "./node.js",
+ "browser": "./browser.js",
+ "component": {
+ "scripts": {
+ "debug/index.js": "browser.js",
+ "debug/debug.js": "debug.js"
+ }
+ },
+ "gitHead": "ef0b37817e88df724511e648c8c168618e892530",
+ "bugs": {
+ "url": "https://github.com/visionmedia/debug/issues"
+ },
+ "homepage": "https://github.com/visionmedia/debug",
+ "_id": "debug@2.1.2",
+ "scripts": {},
+ "_shasum": "d5853ec48011eafd9ec80a5c4733332c1e767a43",
+ "_from": "debug@~2.1.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "dist": {
+ "shasum": "d5853ec48011eafd9ec80a5c4733332c1e767a43",
+ "tarball": "http://registry.npmjs.org/debug/-/debug-2.1.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-2.1.2.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/ejs/Jakefile b/dgbuilder/dgeflows/node_modules/ejs/Jakefile
new file mode 100644
index 0000000..0362e98
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/Jakefile
@@ -0,0 +1,45 @@
+var fs = require('fs')
+ , buildOpts = {
+ printStdout: true
+ , printStderr: true
+ };
+
+task('build', ['browserify', 'minify'], function () {
+ console.log('Build completed.');
+});
+
+desc('Cleans browerified/minified files and package files');
+task('clean', ['clobber'], function () {
+ jake.rmRf('./ejs.js');
+ jake.rmRf('./ejs.min.js');
+});
+
+task('browserify', {async: true}, function () {
+ jake.exec('./node_modules/browserify/bin/cmd.js lib/ejs.js > ejs.js',
+ buildOpts, function () {
+ console.log('Browserification completed.');
+ setTimeout(complete, 0);
+ });
+});
+
+task('minify', {async: true}, function () {
+ jake.exec('./node_modules/uglify-js/bin/uglifyjs ejs.js > ejs.min.js',
+ buildOpts, function () {
+ console.log('Minification completed.');
+ setTimeout(complete, 0);
+ });
+});
+
+publishTask('ejs', ['build'], function () {
+ this.packageFiles.include([
+ 'Jakefile'
+ , 'README.md'
+ , 'package.json'
+ , 'ejs.js'
+ , 'ejs.min.js'
+ , 'lib/**'
+ , 'test/**'
+ ]);
+});
+
+
diff --git a/dgbuilder/dgeflows/node_modules/ejs/README.md b/dgbuilder/dgeflows/node_modules/ejs/README.md
new file mode 100644
index 0000000..cd0a911
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/README.md
@@ -0,0 +1,157 @@
+# EJS
+
+Embedded JavaScript templates
+
+[![Build Status](https://img.shields.io/travis/mde/ejs/master.svg?style=flat)](https://travis-ci.org/mde/ejs)
+[![Developing Dependencies](https://img.shields.io/david/dev/mde/ejs.svg?style=flat)](https://david-dm.org/mde/ejs#info=devDependencies)
+
+## Installation
+
+```bash
+$ npm install ejs
+```
+
+## Features
+
+ * Control flow with `<% %>`
+ * Escaped output with `<%= %>`
+ * Unescaped raw output with `<%- %>`
+ * Trim-mode ('newline slurping') with `-%>` ending tag
+ * Custom delimiters (e.g., use '<? ?>' instead of '<% %>')
+ * Includes
+ * Client-side support
+ * Static caching of intermediate JavaScript
+ * Static caching of templates
+ * Complies with the [Express](http://expressjs.com) view system
+
+## Example
+
+```html
+<% if (user) { %>
+ <h2><%= user.name %></h2>
+<% } %>
+```
+
+## Usage
+
+```javascript
+var template = ejs.compile(str, options);
+template(data);
+// => Rendered HTML string
+
+ejs.render(str, data, options);
+// => Rendered HTML string
+```
+
+You can also use the shortcut `ejs.render(dataAndOptions);` where you pass
+everything in a single object. In that case, you'll end up with local variables
+for all the passed options.
+
+## Options
+
+ - `cache` Compiled functions are cached, requires `filename`
+ - `filename` Used by `cache` to key caches, and for includes
+ - `context` Function execution context
+ - `compileDebug` When `false` no debug instrumentation is compiled
+ - `client` Returns standalone compiled function
+ - `delimiter` Character to use with angle brackets for open/close
+ - `debug` Output generated function body
+ - `_with` Whether or not to use `with() {}` constructs. If `false` then the locals will be stored in the `locals` object.
+
+## Tags
+
+ - `<%` 'Scriptlet' tag, for control-flow, no output
+ - `<%=` Outputs the value into the template (HTML escaped)
+ - `<%-` Outputs the unescaped value into the template
+ - `<%#` Comment tag, no execution, no output
+ - `<%%` Outputs a literal '<%'
+ - `%>` Plain ending tag
+ - `-%>` Trim-mode ('newline slurp') tag, trims following newline
+
+## Includes
+
+Includes are relative to the template with the `include` call. (This
+requires the 'filename' option.) For example if you have "./views/users.ejs" and
+"./views/user/show.ejs" you would use `<%- include('user/show'); %>`.
+
+You'll likely want to use the raw output tag (`<%-`) with your include to avoid
+double-escaping the HTML output.
+
+```html
+<ul>
+ <% users.forEach(function(user){ %>
+ <%- include('user/show', {user: user}); %>
+ <% }); %>
+</ul>
+```
+
+Includes are inserted at runtime, so you can use variables for the path in the
+`include` call (for example `<%- include(somePath); %>`). Variables in your
+top-level data object are available to all your includes, but local variables
+need to be passed down.
+
+NOTE: Include preprocessor directives (`<% include user/show %>`) are
+still supported.
+
+## Custom delimiters
+
+Custom delimiters can be applied on a per-template basis, or globally:
+
+```javascript
+var ejs = require('ejs'),
+ users = ['geddy', 'neil', 'alex'];
+
+// Just one template
+ejs.render('<?= users.join(" | "); ?>', {users: users}, {delimiter: '?'});
+// => 'geddy | neil | alex'
+
+// Or globally
+ejs.delimiter = '$';
+ejs.render('<$= users.join(" | "); $>', {users: users});
+// => 'geddy | neil | alex'
+```
+
+## Layouts
+
+EJS does not specifically support blocks, but layouts can be implemented by
+including headers and footers, like so:
+
+
+```html
+<%- include('header'); -%>
+<h1>
+ Title
+</h1>
+<p>
+ My page
+</p>
+<%- include('footer'); -%>
+```
+
+## Client-side support
+
+Go to the [Latest Release](https://github.com/mde/ejs/releases/latest), download
+`./ejs.js` or `./ejs.min.js`.
+
+Include one of these on your page, and `ejs.render(str)`.
+
+## Related projects
+
+There are a number of implementations of EJS:
+
+ * TJ's implementation, the v1 of this library: https://github.com/tj/ejs
+ * Jupiter Consulting's EJS: http://www.embeddedjs.com/
+ * EJS Embedded JavaScript Framework on Google Code: https://code.google.com/p/embeddedjavascript/
+ * Sam Stephenson's Ruby implementation: https://rubygems.org/gems/ejs
+ * Erubis, an ERB implementation which also runs JavaScript: http://www.kuwata-lab.com/erubis/users-guide.04.html#lang-javascript
+
+## License
+
+Licensed under the Apache License, Version 2.0
+(<http://www.apache.org/licenses/LICENSE-2.0>)
+
+- - -
+EJS Embedded JavaScript templates copyright 2112
+mde@fleegix.org.
+
+
diff --git a/dgbuilder/dgeflows/node_modules/ejs/ejs.js b/dgbuilder/dgeflows/node_modules/ejs/ejs.js
new file mode 100644
index 0000000..389e45e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/ejs.js
@@ -0,0 +1,924 @@
+(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){
+(function (process){
+/*
+ * EJS Embedded JavaScript templates
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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.
+ *
+*/
+
+'use strict';
+
+var fs = require('fs')
+ , utils = require('./utils')
+ , jsCache = {}
+ , _VERSION_STRING = require('../package.json').version
+ , _DEFAULT_DELIMITER = '%'
+ , _DEFAULT_LOCALS_NAME = 'locals'
+ , _REGEX_STRING = '(<%%|<%=|<%-|<%#|<%|%>|-%>)'
+ , _OPTS = [ 'cache', 'filename', 'delimiter', 'scope', 'context'
+ , 'debug', 'compileDebug', 'client', '_with'
+ ]
+ , _TRAILING_SEMCOL = /;\s*$/;
+
+exports.localsName = _DEFAULT_LOCALS_NAME;
+
+exports.resolveInclude = function(name, filename) {
+ var path = require('path')
+ , dirname = path.dirname
+ , extname = path.extname
+ , resolve = path.resolve
+ , includePath = resolve(dirname(filename), name)
+ , ext = extname(name);
+ if (!ext) {
+ includePath += '.ejs';
+ }
+ return includePath;
+}
+
+
+// Returns a possibly cached template function, set by options.cache.
+// `template` is the string of EJS to compile.
+// If template is undefined then the file specified in options.filename is
+// read.
+function handleCache(options, template) {
+ var fn
+ , path = options.filename
+ , hasTemplate = template !== undefined;
+
+ if (options.cache) {
+ if (!path) {
+ throw new Error('cache option requires a filename');
+ }
+ fn = jsCache[path];
+ if (fn) {
+ return fn;
+ }
+ if (!hasTemplate) {
+ template = fs.readFileSync(path, {encoding: 'utf8'});
+ }
+ }
+ else if (!hasTemplate) {
+ if (!path) {
+ throw new Error('Internal EJS error: no file name or template '
+ + 'provided');
+ }
+ template = fs.readFileSync(path, {encoding: 'utf8'});
+ }
+ fn = exports.compile(template.trim(), options);
+ if (options.cache) {
+ jsCache[path] = fn;
+ }
+ return fn;
+}
+
+function includeFile(path, options) {
+ var opts = utils.shallowCopy({}, options || /* istanbul ignore next */ {});
+ if (!opts.filename) {
+ throw new Error('`include` requires the \'filename\' option.');
+ }
+ opts.filename = exports.resolveInclude(path, opts.filename);
+ return handleCache(opts);
+}
+
+function includeSource(path, options) {
+ var opts = utils.shallowCopy({}, options || {})
+ , includePath
+ , template;
+ if (!opts.filename) {
+ throw new Error('`include` requires the \'filename\' option.');
+ }
+ includePath = exports.resolveInclude(path, opts.filename);
+ template = fs.readFileSync(includePath).toString().trim();
+
+ opts.filename = includePath;
+ var templ = new Template(template, opts);
+ templ.generateSource();
+ return templ.source;
+}
+
+function rethrow(err, str, filename, lineno){
+ var lines = str.split('\n')
+ , start = Math.max(lineno - 3, 0)
+ , end = Math.min(lines.length, lineno + 3);
+
+ // Error context
+ var context = lines.slice(start, end).map(function (line, i){
+ var curr = i + start + 1;
+ return (curr == lineno ? ' >> ' : ' ')
+ + curr
+ + '| '
+ + line;
+ }).join('\n');
+
+ // Alter exception message
+ err.path = filename;
+ err.message = (filename || 'ejs') + ':'
+ + lineno + '\n'
+ + context + '\n\n'
+ + err.message;
+
+ throw err;
+}
+
+function cpOptsInData(data, opts) {
+ _OPTS.forEach(function (p) {
+ if (typeof data[p] != 'undefined') {
+ opts[p] = data[p];
+ }
+ });
+ delete data.__expressRender__;
+}
+
+function compile(template, opts) {
+ var templ;
+
+ // v1 compat
+ // 'scope' is 'context'
+ // FIXME: Remove this in a future version
+ if (opts && opts.scope) {
+ if (!opts.context) {
+ opts.context = opts.scope;
+ }
+ delete opts.scope;
+ }
+ templ = new Template(template, opts);
+ return templ.compile();
+}
+exports.compile = compile;
+
+// template, [data], [opts]
+// Have to include an empty data object if you want opts and no data
+exports.render = function (template, data, opts) {
+ data = data || {};
+ opts = opts || {};
+ var fn;
+
+ // No options object -- if there are optiony names
+ // in the data, copy them to options
+ if (arguments.length == 2) {
+ cpOptsInData(data, opts);
+ }
+
+ fn = handleCache(opts, template);
+ return fn.call(opts.context, data);
+};
+
+// path, [data], [opts], cb
+// Have to include an empty data object if you want opts and no data
+exports.renderFile = function () {
+ var args = Array.prototype.slice.call(arguments)
+ , path = args.shift()
+ , cb = args.pop()
+ , data = args.shift() || {}
+ , opts = args.pop() || {}
+ , result
+ , failed = false;
+
+ // No options object -- if there are optiony names
+ // in the data, copy them to options
+ if (arguments.length == 3) {
+ cpOptsInData(data, opts);
+ }
+ opts.filename = path;
+
+ try {
+ result = handleCache(opts)(data);
+ }
+ catch(err) {
+ return process.nextTick(function () {
+ cb(err);
+ });
+ }
+ process.nextTick(function () {
+ cb(null, result);
+ });
+};
+
+exports.clearCache = function () {
+ jsCache = {};
+};
+
+function Template(text, opts) {
+ opts = opts || {};
+ var options = {};
+ this.templateText = text;
+ this.mode = null;
+ this.truncate = false;
+ this.currentLine = 1;
+ this.source = '';
+ options.client = opts.client || false;
+ options.escapeFunction = opts.escape || utils.escapeXML;
+ options.compileDebug = opts.compileDebug !== false;
+ options.debug = !!opts.debug;
+ options.filename = opts.filename;
+ options.delimiter = opts.delimiter || exports.delimiter || _DEFAULT_DELIMITER;
+ options._with = typeof opts._with != 'undefined' ? opts._with : true;
+ options.cache = opts.cache || false;
+ this.opts = options;
+
+ this.regex = this.createRegex();
+}
+
+Template.modes = {
+ EVAL: 'eval'
+ , ESCAPED: 'escaped'
+ , RAW: 'raw'
+ , COMMENT: 'comment'
+ , LITERAL: 'literal'
+};
+
+Template.prototype = new function () {
+ this.createRegex = function () {
+ var str = _REGEX_STRING
+ , delim = utils.escapeRegExpChars(this.opts.delimiter);
+ str = str.replace(/%/g, delim);
+ return new RegExp(str);
+ };
+
+ this.compile = function () {
+ var src
+ , fn
+ , opts = this.opts
+ , escape = opts.escapeFunction;
+
+ if (!this.source) {
+ this.generateSource();
+ var prepended = 'var __output = [];';
+ if (opts._with !== false) {
+ prepended += ' with (' + exports.localsName + ' || {}) { ';
+ }
+ this.source = prepended + this.source;
+ if (opts._with !== false) {
+ this.source += '}';
+ }
+ this.source += ';return __output.join("").trim();';
+ }
+
+ if (opts.compileDebug) {
+ src = 'var __line = 1' +
+ ', __lines = ' + JSON.stringify(this.templateText) +
+ ', __filename = ' + (opts.filename ?
+ JSON.stringify(opts.filename) : 'undefined') +
+ '; try {' +
+ this.source + '} catch (e) { rethrow(e, __lines, __filename, __line); }';
+ }
+ else {
+ src = this.source;
+ }
+
+ if (opts.debug) {
+ console.log(src);
+ }
+
+ if (opts.client) {
+ if (escape !== utils.escapeXML) {
+ src = 'escape = escape || ' + escape.toString() + ';\n' + src;
+ }
+ else {
+ src = utils.escapeFuncStr
+ + 'escape = escape || '
+ + escape.toString() + ';\n'
+ + src;
+ }
+ if (opts.compileDebug) {
+ src = 'rethrow = rethrow || ' + rethrow.toString() + ';\n' + src;
+ }
+ }
+
+ try {
+ fn = new Function(exports.localsName + ', escape, include, rethrow', src);
+ }
+ catch(e) {
+ if (e instanceof SyntaxError) {
+ if (opts.filename) {
+ e.message += ' in ' + opts.filename;
+ }
+ e.message += ' while compiling ejs';
+ throw e;
+ }
+ }
+
+ if (opts.client) {
+ return fn;
+ }
+
+ // Return a callable function which will execute the function
+ // created by the source-code, with the passed data as locals
+ return function (data) {
+ var include = function (path, includeData) {
+ var d = utils.shallowCopy({}, data);
+ if (includeData) {
+ d = utils.shallowCopy(d, includeData);
+ }
+ return includeFile(path, opts)(d);
+ };
+ return fn(data || {}, escape, include, rethrow);
+ };
+
+ };
+
+ this.generateSource = function () {
+ var self = this
+ , matches = this.parseTemplateText()
+ , d = this.opts.delimiter;
+
+ if (matches && matches.length) {
+ matches.forEach(function (line, index) {
+ var closing
+ , include
+ , includeOpts
+ , includeSrc;
+ // If this is an opening tag, check for closing tags
+ // FIXME: May end up with some false positives here
+ // Better to store modes as k/v with '<' + delimiter as key
+ // Then this can simply check against the map
+ if ( line.indexOf('<' + d) === 0 // If it is a tag
+ && line.indexOf('<' + d + d) !== 0) { // and is not escaped
+ closing = matches[index + 2];
+ if (!(closing == d + '>' || closing == '-' + d + '>')) {
+ throw new Error('Could not find matching close tag for "' + line + '".');
+ }
+ }
+ // HACK: backward-compat `include` preprocessor directives
+ if ((include = line.match(/^\s*include\s+(\S+)/))) {
+ includeOpts = utils.shallowCopy({}, self.opts);
+ includeSrc = includeSource(include[1], includeOpts);
+ includeSrc = ';(function(){' + includeSrc + '})();';
+ self.source += includeSrc;
+ }
+ else {
+ self.scanLine(line);
+ }
+ });
+ }
+
+ };
+
+ this.parseTemplateText = function () {
+ var str = this.templateText
+ , pat = this.regex
+ , result = pat.exec(str)
+ , arr = []
+ , firstPos
+ , lastPos;
+
+ while (result) {
+ firstPos = result.index;
+ lastPos = pat.lastIndex;
+
+ if (firstPos !== 0) {
+ arr.push(str.substring(0, firstPos));
+ str = str.slice(firstPos);
+ }
+
+ arr.push(result[0]);
+ str = str.slice(result[0].length);
+ result = pat.exec(str);
+ }
+
+ if (str) {
+ arr.push(str);
+ }
+
+ return arr;
+ };
+
+ this.scanLine = function (line) {
+ var self = this
+ , d = this.opts.delimiter
+ , newLineCount = 0;
+
+ function _addOutput() {
+ if (self.truncate) {
+ line = line.replace('\n', '');
+ }
+
+ // Preserve literal slashes
+ line = line.replace(/\\/g, '\\\\');
+
+ // Convert linebreaks
+ line = line.replace(/\n/g, '\\n');
+ line = line.replace(/\r/g, '\\r');
+
+ // Escape double-quotes
+ // - this will be the delimiter during execution
+ line = line.replace(/"/g, '\\"');
+ self.source += ';__output.push("' + line + '");';
+ }
+
+ newLineCount = (line.split('\n').length - 1);
+
+ switch (line) {
+ case '<' + d:
+ this.mode = Template.modes.EVAL;
+ break;
+ case '<' + d + '=':
+ this.mode = Template.modes.ESCAPED;
+ break;
+ case '<' + d + '-':
+ this.mode = Template.modes.RAW;
+ break;
+ case '<' + d + '#':
+ this.mode = Template.modes.COMMENT;
+ break;
+ case '<' + d + d:
+ this.mode = Template.modes.LITERAL;
+ this.source += ';__output.push("' + line.replace('<' + d + d, '<' + d) + '");';
+ break;
+ case d + '>':
+ case '-' + d + '>':
+ if (this.mode == Template.modes.LITERAL) {
+ _addOutput();
+ }
+
+ this.mode = null;
+ this.truncate = line.indexOf('-') === 0;
+ break;
+ default:
+ // In script mode, depends on type of tag
+ if (this.mode) {
+ // If '//' is found without a line break, add a line break.
+ switch (this.mode) {
+ case Template.modes.EVAL:
+ case Template.modes.ESCAPED:
+ case Template.modes.RAW:
+ if (line.lastIndexOf('//') > line.lastIndexOf('\n')) {
+ line += '\n';
+ }
+ }
+ switch (this.mode) {
+ // Just executing code
+ case Template.modes.EVAL:
+ this.source += ';' + line;
+ break;
+ // Exec, esc, and output
+ case Template.modes.ESCAPED:
+ // Add the exec'd, escaped result to the output
+ // Have to prevent the string-coercion of `undefined` and `null`
+ // in the `escape` function -- making a `join` call like below unnecessary
+ this.source += ';__output.push(escape(' +
+ line.replace(_TRAILING_SEMCOL, '').trim() + '))';
+ break;
+ // Exec and output
+ case Template.modes.RAW:
+ // Add the exec'd result to the output
+ // Using `join` here prevents string-coercion of `undefined` and `null`
+ // without filtering out falsey values like zero
+ this.source += ';__output.push(' +
+ line.replace(_TRAILING_SEMCOL, '').trim() + ')';
+ break;
+ case Template.modes.COMMENT:
+ // Do nothing
+ break;
+ // Literal <%% mode, append as raw output
+ case Template.modes.LITERAL:
+ _addOutput();
+ break;
+ }
+ }
+ // In string mode, just add the output
+ else {
+ _addOutput();
+ }
+ }
+
+ if (self.opts.compileDebug && newLineCount) {
+ this.currentLine += newLineCount;
+ this.source += ';__line = ' + this.currentLine + ';';
+ }
+ };
+};
+
+// Express support
+exports.__express = exports.renderFile;
+
+// Add require support
+/* istanbul ignore else */
+if (require.extensions) {
+ require.extensions['.ejs'] = function (module, filename) {
+ filename = filename || /* istanbul ignore next */ module.filename;
+ var options = {
+ filename: filename
+ , client: true
+ }
+ , template = fs.readFileSync(filename).toString().trim()
+ , fn = compile(template, options);
+ module._compile('module.exports = ' + fn.toString() + ';', filename);
+ };
+}
+
+exports.VERSION = _VERSION_STRING;
+
+/* istanbul ignore if */
+if (typeof window != 'undefined') {
+ window.ejs = exports;
+}
+
+}).call(this,require('_process'))
+},{"../package.json":6,"./utils":2,"_process":5,"fs":3,"path":4}],2:[function(require,module,exports){
+/*
+ * EJS Embedded JavaScript templates
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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.
+ *
+*/
+
+'use strict';
+
+var regExpChars = /[|\\{}()[\]^$+*?.]/g;
+
+exports.escapeRegExpChars = function (string) {
+ // istanbul ignore if
+ if (!string) {
+ return '';
+ }
+ return String(string).replace(regExpChars, '\\$&');
+};
+
+var encodeHTMLRules = {
+ '&': '&'
+ , '<': '<'
+ , '>': '>'
+ , '"': '"'
+ , "'": '''
+ }
+ , matchHTML = /[&<>\'"]/g;
+
+exports.escapeFuncStr =
+ 'var encodeHTMLRules = {'
++ '"&": "&"'
++ ', "<": "<"'
++ ', ">": ">"'
++ ', \'"\': """'
++ ', "\'": "'"'
++ '}'
++ ', matchHTML = /[&<>\'"]/g;';
+
+exports.escapeXML = function (markup) {
+ return markup == undefined
+ ? ''
+ : String(markup)
+ .replace(matchHTML, function(m) {
+ return encodeHTMLRules[m] || m;
+ });
+};
+
+exports.shallowCopy = function (to, from) {
+ for (var p in from) {
+ to[p] = from[p];
+ }
+ return to;
+};
+
+
+},{}],3:[function(require,module,exports){
+
+},{}],4:[function(require,module,exports){
+(function (process){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// resolves . and .. elements in a path array with directory names there
+// must be no slashes, empty elements, or device names (c:\) in the array
+// (so also no leading and trailing slashes - it does not distinguish
+// relative and absolute paths)
+function normalizeArray(parts, allowAboveRoot) {
+ // if the path tries to go above the root, `up` ends up > 0
+ var up = 0;
+ for (var i = parts.length - 1; i >= 0; i--) {
+ var last = parts[i];
+ if (last === '.') {
+ parts.splice(i, 1);
+ } else if (last === '..') {
+ parts.splice(i, 1);
+ up++;
+ } else if (up) {
+ parts.splice(i, 1);
+ up--;
+ }
+ }
+
+ // if the path is allowed to go above the root, restore leading ..s
+ if (allowAboveRoot) {
+ for (; up--; up) {
+ parts.unshift('..');
+ }
+ }
+
+ return parts;
+}
+
+// Split a filename into [root, dir, basename, ext], unix version
+// 'root' is just a slash, or nothing.
+var splitPathRe =
+ /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
+var splitPath = function(filename) {
+ return splitPathRe.exec(filename).slice(1);
+};
+
+// path.resolve([from ...], to)
+// posix version
+exports.resolve = function() {
+ var resolvedPath = '',
+ resolvedAbsolute = false;
+
+ for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
+ var path = (i >= 0) ? arguments[i] : process.cwd();
+
+ // Skip empty and invalid entries
+ if (typeof path !== 'string') {
+ throw new TypeError('Arguments to path.resolve must be strings');
+ } else if (!path) {
+ continue;
+ }
+
+ resolvedPath = path + '/' + resolvedPath;
+ resolvedAbsolute = path.charAt(0) === '/';
+ }
+
+ // At this point the path should be resolved to a full absolute path, but
+ // handle relative paths to be safe (might happen when process.cwd() fails)
+
+ // Normalize the path
+ resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
+ return !!p;
+ }), !resolvedAbsolute).join('/');
+
+ return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
+};
+
+// path.normalize(path)
+// posix version
+exports.normalize = function(path) {
+ var isAbsolute = exports.isAbsolute(path),
+ trailingSlash = substr(path, -1) === '/';
+
+ // Normalize the path
+ path = normalizeArray(filter(path.split('/'), function(p) {
+ return !!p;
+ }), !isAbsolute).join('/');
+
+ if (!path && !isAbsolute) {
+ path = '.';
+ }
+ if (path && trailingSlash) {
+ path += '/';
+ }
+
+ return (isAbsolute ? '/' : '') + path;
+};
+
+// posix version
+exports.isAbsolute = function(path) {
+ return path.charAt(0) === '/';
+};
+
+// posix version
+exports.join = function() {
+ var paths = Array.prototype.slice.call(arguments, 0);
+ return exports.normalize(filter(paths, function(p, index) {
+ if (typeof p !== 'string') {
+ throw new TypeError('Arguments to path.join must be strings');
+ }
+ return p;
+ }).join('/'));
+};
+
+
+// path.relative(from, to)
+// posix version
+exports.relative = function(from, to) {
+ from = exports.resolve(from).substr(1);
+ to = exports.resolve(to).substr(1);
+
+ function trim(arr) {
+ var start = 0;
+ for (; start < arr.length; start++) {
+ if (arr[start] !== '') break;
+ }
+
+ var end = arr.length - 1;
+ for (; end >= 0; end--) {
+ if (arr[end] !== '') break;
+ }
+
+ if (start > end) return [];
+ return arr.slice(start, end - start + 1);
+ }
+
+ var fromParts = trim(from.split('/'));
+ var toParts = trim(to.split('/'));
+
+ var length = Math.min(fromParts.length, toParts.length);
+ var samePartsLength = length;
+ for (var i = 0; i < length; i++) {
+ if (fromParts[i] !== toParts[i]) {
+ samePartsLength = i;
+ break;
+ }
+ }
+
+ var outputParts = [];
+ for (var i = samePartsLength; i < fromParts.length; i++) {
+ outputParts.push('..');
+ }
+
+ outputParts = outputParts.concat(toParts.slice(samePartsLength));
+
+ return outputParts.join('/');
+};
+
+exports.sep = '/';
+exports.delimiter = ':';
+
+exports.dirname = function(path) {
+ var result = splitPath(path),
+ root = result[0],
+ dir = result[1];
+
+ if (!root && !dir) {
+ // No dirname whatsoever
+ return '.';
+ }
+
+ if (dir) {
+ // It has a dirname, strip trailing slash
+ dir = dir.substr(0, dir.length - 1);
+ }
+
+ return root + dir;
+};
+
+
+exports.basename = function(path, ext) {
+ var f = splitPath(path)[2];
+ // TODO: make this comparison case-insensitive on windows?
+ if (ext && f.substr(-1 * ext.length) === ext) {
+ f = f.substr(0, f.length - ext.length);
+ }
+ return f;
+};
+
+
+exports.extname = function(path) {
+ return splitPath(path)[3];
+};
+
+function filter (xs, f) {
+ if (xs.filter) return xs.filter(f);
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ if (f(xs[i], i, xs)) res.push(xs[i]);
+ }
+ return res;
+}
+
+// String.prototype.substr - negative index don't work in IE8
+var substr = 'ab'.substr(-1) === 'b'
+ ? function (str, start, len) { return str.substr(start, len) }
+ : function (str, start, len) {
+ if (start < 0) start = str.length + start;
+ return str.substr(start, len);
+ }
+;
+
+}).call(this,require('_process'))
+},{"_process":5}],5:[function(require,module,exports){
+// shim for using process in browser
+
+var process = module.exports = {};
+var queue = [];
+var draining = false;
+
+function drainQueue() {
+ if (draining) {
+ return;
+ }
+ draining = true;
+ var currentQueue;
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ var i = -1;
+ while (++i < len) {
+ currentQueue[i]();
+ }
+ len = queue.length;
+ }
+ draining = false;
+}
+process.nextTick = function (fun) {
+ queue.push(fun);
+ if (!draining) {
+ setTimeout(drainQueue, 0);
+ }
+};
+
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+process.version = ''; // empty string to avoid regexp issues
+
+function noop() {}
+
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+};
+
+// TODO(shtylman)
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+process.umask = function() { return 0; };
+
+},{}],6:[function(require,module,exports){
+module.exports={
+ "name": "ejs",
+ "description": "Embedded JavaScript templates",
+ "keywords": [
+ "template",
+ "engine",
+ "ejs"
+ ],
+ "version": "2.2.3",
+ "author": "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
+ "contributors": [
+ "Timothy Gu <timothygu99@gmail.com> (https://timothygu.github.io)"
+ ],
+ "license": "Apache-2.0",
+ "main": "./lib/ejs.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mde/ejs.git"
+ },
+ "bugs": "https://github.com/mde/ejs/issues",
+ "homepage": "https://github.com/mde/ejs",
+ "dependencies": {},
+ "devDependencies": {
+ "browserify": "^8.0.3",
+ "uglify-js": "^2.4.16",
+ "mocha": "^2.1.0",
+ "jake": "^8.0.0",
+ "istanbul": "~0.3.5"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha",
+ "coverage": "istanbul cover node_modules/mocha/bin/_mocha"
+ }
+}
+},{}]},{},[1]);
diff --git a/dgbuilder/dgeflows/node_modules/ejs/ejs.min.js b/dgbuilder/dgeflows/node_modules/ejs/ejs.min.js
new file mode 100644
index 0000000..fdda012
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/ejs.min.js
@@ -0,0 +1 @@
+(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){(function(process){"use strict";var fs=require("fs"),utils=require("./utils"),jsCache={},_VERSION_STRING=require("../package.json").version,_DEFAULT_DELIMITER="%",_DEFAULT_LOCALS_NAME="locals",_REGEX_STRING="(<%%|<%=|<%-|<%#|<%|%>|-%>)",_OPTS=["cache","filename","delimiter","scope","context","debug","compileDebug","client","_with"],_TRAILING_SEMCOL=/;\s*$/;exports.localsName=_DEFAULT_LOCALS_NAME;exports.resolveInclude=function(name,filename){var path=require("path"),dirname=path.dirname,extname=path.extname,resolve=path.resolve,includePath=resolve(dirname(filename),name),ext=extname(name);if(!ext){includePath+=".ejs"}return includePath};function handleCache(options,template){var fn,path=options.filename,hasTemplate=template!==undefined;if(options.cache){if(!path){throw new Error("cache option requires a filename")}fn=jsCache[path];if(fn){return fn}if(!hasTemplate){template=fs.readFileSync(path,{encoding:"utf8"})}}else if(!hasTemplate){if(!path){throw new Error("Internal EJS error: no file name or template "+"provided")}template=fs.readFileSync(path,{encoding:"utf8"})}fn=exports.compile(template.trim(),options);if(options.cache){jsCache[path]=fn}return fn}function includeFile(path,options){var opts=utils.shallowCopy({},options||{});if(!opts.filename){throw new Error("`include` requires the 'filename' option.")}opts.filename=exports.resolveInclude(path,opts.filename);return handleCache(opts)}function includeSource(path,options){var opts=utils.shallowCopy({},options||{}),includePath,template;if(!opts.filename){throw new Error("`include` requires the 'filename' option.")}includePath=exports.resolveInclude(path,opts.filename);template=fs.readFileSync(includePath).toString().trim();opts.filename=includePath;var templ=new Template(template,opts);templ.generateSource();return templ.source}function rethrow(err,str,filename,lineno){var lines=str.split("\n"),start=Math.max(lineno-3,0),end=Math.min(lines.length,lineno+3);var context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" >> ":" ")+curr+"| "+line}).join("\n");err.path=filename;err.message=(filename||"ejs")+":"+lineno+"\n"+context+"\n\n"+err.message;throw err}function cpOptsInData(data,opts){_OPTS.forEach(function(p){if(typeof data[p]!="undefined"){opts[p]=data[p]}});delete data.__expressRender__}function compile(template,opts){var templ;if(opts&&opts.scope){if(!opts.context){opts.context=opts.scope}delete opts.scope}templ=new Template(template,opts);return templ.compile()}exports.compile=compile;exports.render=function(template,data,opts){data=data||{};opts=opts||{};var fn;if(arguments.length==2){cpOptsInData(data,opts)}fn=handleCache(opts,template);return fn.call(opts.context,data)};exports.renderFile=function(){var args=Array.prototype.slice.call(arguments),path=args.shift(),cb=args.pop(),data=args.shift()||{},opts=args.pop()||{},result,failed=false;if(arguments.length==3){cpOptsInData(data,opts)}opts.filename=path;try{result=handleCache(opts)(data)}catch(err){return process.nextTick(function(){cb(err)})}process.nextTick(function(){cb(null,result)})};exports.clearCache=function(){jsCache={}};function Template(text,opts){opts=opts||{};var options={};this.templateText=text;this.mode=null;this.truncate=false;this.currentLine=1;this.source="";options.client=opts.client||false;options.escapeFunction=opts.escape||utils.escapeXML;options.compileDebug=opts.compileDebug!==false;options.debug=!!opts.debug;options.filename=opts.filename;options.delimiter=opts.delimiter||exports.delimiter||_DEFAULT_DELIMITER;options._with=typeof opts._with!="undefined"?opts._with:true;options.cache=opts.cache||false;this.opts=options;this.regex=this.createRegex()}Template.modes={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};Template.prototype=new function(){this.createRegex=function(){var str=_REGEX_STRING,delim=utils.escapeRegExpChars(this.opts.delimiter);str=str.replace(/%/g,delim);return new RegExp(str)};this.compile=function(){var src,fn,opts=this.opts,escape=opts.escapeFunction;if(!this.source){this.generateSource();var prepended="var __output = [];";if(opts._with!==false){prepended+=" with ("+exports.localsName+" || {}) { "}this.source=prepended+this.source;if(opts._with!==false){this.source+="}"}this.source+=';return __output.join("").trim();'}if(opts.compileDebug){src="var __line = 1"+", __lines = "+JSON.stringify(this.templateText)+", __filename = "+(opts.filename?JSON.stringify(opts.filename):"undefined")+"; try {"+this.source+"} catch (e) { rethrow(e, __lines, __filename, __line); }"}else{src=this.source}if(opts.debug){console.log(src)}if(opts.client){if(escape!==utils.escapeXML){src="escape = escape || "+escape.toString()+";\n"+src}else{src=utils.escapeFuncStr+"escape = escape || "+escape.toString()+";\n"+src}if(opts.compileDebug){src="rethrow = rethrow || "+rethrow.toString()+";\n"+src}}try{fn=new Function(exports.localsName+", escape, include, rethrow",src)}catch(e){if(e instanceof SyntaxError){if(opts.filename){e.message+=" in "+opts.filename}e.message+=" while compiling ejs";throw e}}if(opts.client){return fn}return function(data){var include=function(path,includeData){var d=utils.shallowCopy({},data);if(includeData){d=utils.shallowCopy(d,includeData)}return includeFile(path,opts)(d)};return fn(data||{},escape,include,rethrow)}};this.generateSource=function(){var self=this,matches=this.parseTemplateText(),d=this.opts.delimiter;if(matches&&matches.length){matches.forEach(function(line,index){var closing,include,includeOpts,includeSrc;if(line.indexOf("<"+d)===0&&line.indexOf("<"+d+d)!==0){closing=matches[index+2];if(!(closing==d+">"||closing=="-"+d+">")){throw new Error('Could not find matching close tag for "'+line+'".')}}if(include=line.match(/^\s*include\s+(\S+)/)){includeOpts=utils.shallowCopy({},self.opts);includeSrc=includeSource(include[1],includeOpts);includeSrc=";(function(){"+includeSrc+"})();";self.source+=includeSrc}else{self.scanLine(line)}})}};this.parseTemplateText=function(){var str=this.templateText,pat=this.regex,result=pat.exec(str),arr=[],firstPos,lastPos;while(result){firstPos=result.index;lastPos=pat.lastIndex;if(firstPos!==0){arr.push(str.substring(0,firstPos));str=str.slice(firstPos)}arr.push(result[0]);str=str.slice(result[0].length);result=pat.exec(str)}if(str){arr.push(str)}return arr};this.scanLine=function(line){var self=this,d=this.opts.delimiter,newLineCount=0;function _addOutput(){if(self.truncate){line=line.replace("\n","")}line=line.replace(/\\/g,"\\\\");line=line.replace(/\n/g,"\\n");line=line.replace(/\r/g,"\\r");line=line.replace(/"/g,'\\"');self.source+=';__output.push("'+line+'");'}newLineCount=line.split("\n").length-1;switch(line){case"<"+d:this.mode=Template.modes.EVAL;break;case"<"+d+"=":this.mode=Template.modes.ESCAPED;break;case"<"+d+"-":this.mode=Template.modes.RAW;break;case"<"+d+"#":this.mode=Template.modes.COMMENT;break;case"<"+d+d:this.mode=Template.modes.LITERAL;this.source+=';__output.push("'+line.replace("<"+d+d,"<"+d)+'");';break;case d+">":case"-"+d+">":if(this.mode==Template.modes.LITERAL){_addOutput()}this.mode=null;this.truncate=line.indexOf("-")===0;break;default:if(this.mode){switch(this.mode){case Template.modes.EVAL:case Template.modes.ESCAPED:case Template.modes.RAW:if(line.lastIndexOf("//")>line.lastIndexOf("\n")){line+="\n"}}switch(this.mode){case Template.modes.EVAL:this.source+=";"+line;break;case Template.modes.ESCAPED:this.source+=";__output.push(escape("+line.replace(_TRAILING_SEMCOL,"").trim()+"))";break;case Template.modes.RAW:this.source+=";__output.push("+line.replace(_TRAILING_SEMCOL,"").trim()+")";break;case Template.modes.COMMENT:break;case Template.modes.LITERAL:_addOutput();break}}else{_addOutput()}}if(self.opts.compileDebug&&newLineCount){this.currentLine+=newLineCount;this.source+=";__line = "+this.currentLine+";"}}};exports.__express=exports.renderFile;if(require.extensions){require.extensions[".ejs"]=function(module,filename){filename=filename||module.filename;var options={filename:filename,client:true},template=fs.readFileSync(filename).toString().trim(),fn=compile(template,options);module._compile("module.exports = "+fn.toString()+";",filename)}}exports.VERSION=_VERSION_STRING;if(typeof window!="undefined"){window.ejs=exports}}).call(this,require("_process"))},{"../package.json":6,"./utils":2,_process:5,fs:3,path:4}],2:[function(require,module,exports){"use strict";var regExpChars=/[|\\{}()[\]^$+*?.]/g;exports.escapeRegExpChars=function(string){if(!string){return""}return String(string).replace(regExpChars,"\\$&")};var encodeHTMLRules={"&":"&","<":"<",">":">",'"':""","'":"'"},matchHTML=/[&<>\'"]/g;exports.escapeFuncStr="var encodeHTMLRules = {"+'"&": "&"'+', "<": "<"'+', ">": ">"'+', \'"\': """'+', "\'": "'"'+"}"+", matchHTML = /[&<>'\"]/g;";exports.escapeXML=function(markup){return markup==undefined?"":String(markup).replace(matchHTML,function(m){return encodeHTMLRules[m]||m})};exports.shallowCopy=function(to,from){for(var p in from){to[p]=from[p]}return to}},{}],3:[function(require,module,exports){},{}],4:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!=="")break}var end=arr.length-1;for(;end>=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")};exports.sep="/";exports.delimiter=":";exports.dirname=function(path){var result=splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir};exports.basename=function(path,ext){var f=splitPath(path)[2];if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){return splitPath(path)[3]};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i<xs.length;i++){if(f(xs[i],i,xs))res.push(xs[i])}return res}var substr="ab".substr(-1)==="b"?function(str,start,len){return str.substr(start,len)}:function(str,start,len){if(start<0)start=str.length+start;return str.substr(start,len)}}).call(this,require("_process"))},{_process:5}],5:[function(require,module,exports){var process=module.exports={};var queue=[];var draining=false;function drainQueue(){if(draining){return}draining=true;var currentQueue;var len=queue.length;while(len){currentQueue=queue;queue=[];var i=-1;while(++i<len){currentQueue[i]()}len=queue.length}draining=false}process.nextTick=function(fun){queue.push(fun);if(!draining){setTimeout(drainQueue,0)}};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},{}],6:[function(require,module,exports){module.exports={name:"ejs",description:"Embedded JavaScript templates",keywords:["template","engine","ejs"],version:"2.2.3",author:"Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",contributors:["Timothy Gu <timothygu99@gmail.com> (https://timothygu.github.io)"],license:"Apache-2.0",main:"./lib/ejs.js",repository:{type:"git",url:"git://github.com/mde/ejs.git"},bugs:"https://github.com/mde/ejs/issues",homepage:"https://github.com/mde/ejs",dependencies:{},devDependencies:{browserify:"^8.0.3","uglify-js":"^2.4.16",mocha:"^2.1.0",jake:"^8.0.0",istanbul:"~0.3.5"},engines:{node:">=0.10.0"},scripts:{test:"mocha",coverage:"istanbul cover node_modules/mocha/bin/_mocha"}}},{}]},{},[1]);
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/lib/ejs.js b/dgbuilder/dgeflows/node_modules/ejs/lib/ejs.js
new file mode 100644
index 0000000..a0d4ae5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/lib/ejs.js
@@ -0,0 +1,525 @@
+/*
+ * EJS Embedded JavaScript templates
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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.
+ *
+*/
+
+'use strict';
+
+var fs = require('fs')
+ , utils = require('./utils')
+ , jsCache = {}
+ , _VERSION_STRING = require('../package.json').version
+ , _DEFAULT_DELIMITER = '%'
+ , _DEFAULT_LOCALS_NAME = 'locals'
+ , _REGEX_STRING = '(<%%|<%=|<%-|<%#|<%|%>|-%>)'
+ , _OPTS = [ 'cache', 'filename', 'delimiter', 'scope', 'context'
+ , 'debug', 'compileDebug', 'client', '_with'
+ ]
+ , _TRAILING_SEMCOL = /;\s*$/;
+
+exports.localsName = _DEFAULT_LOCALS_NAME;
+
+exports.resolveInclude = function(name, filename) {
+ var path = require('path')
+ , dirname = path.dirname
+ , extname = path.extname
+ , resolve = path.resolve
+ , includePath = resolve(dirname(filename), name)
+ , ext = extname(name);
+ if (!ext) {
+ includePath += '.ejs';
+ }
+ return includePath;
+}
+
+
+// Returns a possibly cached template function, set by options.cache.
+// `template` is the string of EJS to compile.
+// If template is undefined then the file specified in options.filename is
+// read.
+function handleCache(options, template) {
+ var fn
+ , path = options.filename
+ , hasTemplate = template !== undefined;
+
+ if (options.cache) {
+ if (!path) {
+ throw new Error('cache option requires a filename');
+ }
+ fn = jsCache[path];
+ if (fn) {
+ return fn;
+ }
+ if (!hasTemplate) {
+ template = fs.readFileSync(path, {encoding: 'utf8'});
+ }
+ }
+ else if (!hasTemplate) {
+ if (!path) {
+ throw new Error('Internal EJS error: no file name or template '
+ + 'provided');
+ }
+ template = fs.readFileSync(path, {encoding: 'utf8'});
+ }
+ fn = exports.compile(template.trim(), options);
+ if (options.cache) {
+ jsCache[path] = fn;
+ }
+ return fn;
+}
+
+function includeFile(path, options) {
+ var opts = utils.shallowCopy({}, options || /* istanbul ignore next */ {});
+ if (!opts.filename) {
+ throw new Error('`include` requires the \'filename\' option.');
+ }
+ opts.filename = exports.resolveInclude(path, opts.filename);
+ return handleCache(opts);
+}
+
+function includeSource(path, options) {
+ var opts = utils.shallowCopy({}, options || {})
+ , includePath
+ , template;
+ if (!opts.filename) {
+ throw new Error('`include` requires the \'filename\' option.');
+ }
+ includePath = exports.resolveInclude(path, opts.filename);
+ template = fs.readFileSync(includePath).toString().trim();
+
+ opts.filename = includePath;
+ var templ = new Template(template, opts);
+ templ.generateSource();
+ return templ.source;
+}
+
+function rethrow(err, str, filename, lineno){
+ var lines = str.split('\n')
+ , start = Math.max(lineno - 3, 0)
+ , end = Math.min(lines.length, lineno + 3);
+
+ // Error context
+ var context = lines.slice(start, end).map(function (line, i){
+ var curr = i + start + 1;
+ return (curr == lineno ? ' >> ' : ' ')
+ + curr
+ + '| '
+ + line;
+ }).join('\n');
+
+ // Alter exception message
+ err.path = filename;
+ err.message = (filename || 'ejs') + ':'
+ + lineno + '\n'
+ + context + '\n\n'
+ + err.message;
+
+ throw err;
+}
+
+function cpOptsInData(data, opts) {
+ _OPTS.forEach(function (p) {
+ if (typeof data[p] != 'undefined') {
+ opts[p] = data[p];
+ }
+ });
+ delete data.__expressRender__;
+}
+
+function compile(template, opts) {
+ var templ;
+
+ // v1 compat
+ // 'scope' is 'context'
+ // FIXME: Remove this in a future version
+ if (opts && opts.scope) {
+ if (!opts.context) {
+ opts.context = opts.scope;
+ }
+ delete opts.scope;
+ }
+ templ = new Template(template, opts);
+ return templ.compile();
+}
+exports.compile = compile;
+
+// template, [data], [opts]
+// Have to include an empty data object if you want opts and no data
+exports.render = function (template, data, opts) {
+ data = data || {};
+ opts = opts || {};
+ var fn;
+
+ // No options object -- if there are optiony names
+ // in the data, copy them to options
+ if (arguments.length == 2) {
+ cpOptsInData(data, opts);
+ }
+
+ fn = handleCache(opts, template);
+ return fn.call(opts.context, data);
+};
+
+// path, [data], [opts], cb
+// Have to include an empty data object if you want opts and no data
+exports.renderFile = function () {
+ var args = Array.prototype.slice.call(arguments)
+ , path = args.shift()
+ , cb = args.pop()
+ , data = args.shift() || {}
+ , opts = args.pop() || {}
+ , result
+ , failed = false;
+
+ // No options object -- if there are optiony names
+ // in the data, copy them to options
+ if (arguments.length == 3) {
+ cpOptsInData(data, opts);
+ }
+ opts.filename = path;
+
+ try {
+ result = handleCache(opts)(data);
+ }
+ catch(err) {
+ return process.nextTick(function () {
+ cb(err);
+ });
+ }
+ process.nextTick(function () {
+ cb(null, result);
+ });
+};
+
+exports.clearCache = function () {
+ jsCache = {};
+};
+
+function Template(text, opts) {
+ opts = opts || {};
+ var options = {};
+ this.templateText = text;
+ this.mode = null;
+ this.truncate = false;
+ this.currentLine = 1;
+ this.source = '';
+ options.client = opts.client || false;
+ options.escapeFunction = opts.escape || utils.escapeXML;
+ options.compileDebug = opts.compileDebug !== false;
+ options.debug = !!opts.debug;
+ options.filename = opts.filename;
+ options.delimiter = opts.delimiter || exports.delimiter || _DEFAULT_DELIMITER;
+ options._with = typeof opts._with != 'undefined' ? opts._with : true;
+ options.cache = opts.cache || false;
+ this.opts = options;
+
+ this.regex = this.createRegex();
+}
+
+Template.modes = {
+ EVAL: 'eval'
+ , ESCAPED: 'escaped'
+ , RAW: 'raw'
+ , COMMENT: 'comment'
+ , LITERAL: 'literal'
+};
+
+Template.prototype = new function () {
+ this.createRegex = function () {
+ var str = _REGEX_STRING
+ , delim = utils.escapeRegExpChars(this.opts.delimiter);
+ str = str.replace(/%/g, delim);
+ return new RegExp(str);
+ };
+
+ this.compile = function () {
+ var src
+ , fn
+ , opts = this.opts
+ , escape = opts.escapeFunction;
+
+ if (!this.source) {
+ this.generateSource();
+ var prepended = 'var __output = [];';
+ if (opts._with !== false) {
+ prepended += ' with (' + exports.localsName + ' || {}) { ';
+ }
+ this.source = prepended + this.source;
+ if (opts._with !== false) {
+ this.source += '}';
+ }
+ this.source += ';return __output.join("").trim();';
+ }
+
+ if (opts.compileDebug) {
+ src = 'var __line = 1' +
+ ', __lines = ' + JSON.stringify(this.templateText) +
+ ', __filename = ' + (opts.filename ?
+ JSON.stringify(opts.filename) : 'undefined') +
+ '; try {' +
+ this.source + '} catch (e) { rethrow(e, __lines, __filename, __line); }';
+ }
+ else {
+ src = this.source;
+ }
+
+ if (opts.debug) {
+ console.log(src);
+ }
+
+ if (opts.client) {
+ if (escape !== utils.escapeXML) {
+ src = 'escape = escape || ' + escape.toString() + ';\n' + src;
+ }
+ else {
+ src = utils.escapeFuncStr
+ + 'escape = escape || '
+ + escape.toString() + ';\n'
+ + src;
+ }
+ if (opts.compileDebug) {
+ src = 'rethrow = rethrow || ' + rethrow.toString() + ';\n' + src;
+ }
+ }
+
+ try {
+ fn = new Function(exports.localsName + ', escape, include, rethrow', src);
+ }
+ catch(e) {
+ if (e instanceof SyntaxError) {
+ if (opts.filename) {
+ e.message += ' in ' + opts.filename;
+ }
+ e.message += ' while compiling ejs';
+ throw e;
+ }
+ }
+
+ if (opts.client) {
+ return fn;
+ }
+
+ // Return a callable function which will execute the function
+ // created by the source-code, with the passed data as locals
+ return function (data) {
+ var include = function (path, includeData) {
+ var d = utils.shallowCopy({}, data);
+ if (includeData) {
+ d = utils.shallowCopy(d, includeData);
+ }
+ return includeFile(path, opts)(d);
+ };
+ return fn(data || {}, escape, include, rethrow);
+ };
+
+ };
+
+ this.generateSource = function () {
+ var self = this
+ , matches = this.parseTemplateText()
+ , d = this.opts.delimiter;
+
+ if (matches && matches.length) {
+ matches.forEach(function (line, index) {
+ var closing
+ , include
+ , includeOpts
+ , includeSrc;
+ // If this is an opening tag, check for closing tags
+ // FIXME: May end up with some false positives here
+ // Better to store modes as k/v with '<' + delimiter as key
+ // Then this can simply check against the map
+ if ( line.indexOf('<' + d) === 0 // If it is a tag
+ && line.indexOf('<' + d + d) !== 0) { // and is not escaped
+ closing = matches[index + 2];
+ if (!(closing == d + '>' || closing == '-' + d + '>')) {
+ throw new Error('Could not find matching close tag for "' + line + '".');
+ }
+ }
+ // HACK: backward-compat `include` preprocessor directives
+ if ((include = line.match(/^\s*include\s+(\S+)/))) {
+ includeOpts = utils.shallowCopy({}, self.opts);
+ includeSrc = includeSource(include[1], includeOpts);
+ includeSrc = ';(function(){' + includeSrc + '})();';
+ self.source += includeSrc;
+ }
+ else {
+ self.scanLine(line);
+ }
+ });
+ }
+
+ };
+
+ this.parseTemplateText = function () {
+ var str = this.templateText
+ , pat = this.regex
+ , result = pat.exec(str)
+ , arr = []
+ , firstPos
+ , lastPos;
+
+ while (result) {
+ firstPos = result.index;
+ lastPos = pat.lastIndex;
+
+ if (firstPos !== 0) {
+ arr.push(str.substring(0, firstPos));
+ str = str.slice(firstPos);
+ }
+
+ arr.push(result[0]);
+ str = str.slice(result[0].length);
+ result = pat.exec(str);
+ }
+
+ if (str) {
+ arr.push(str);
+ }
+
+ return arr;
+ };
+
+ this.scanLine = function (line) {
+ var self = this
+ , d = this.opts.delimiter
+ , newLineCount = 0;
+
+ function _addOutput() {
+ if (self.truncate) {
+ line = line.replace('\n', '');
+ }
+
+ // Preserve literal slashes
+ line = line.replace(/\\/g, '\\\\');
+
+ // Convert linebreaks
+ line = line.replace(/\n/g, '\\n');
+ line = line.replace(/\r/g, '\\r');
+
+ // Escape double-quotes
+ // - this will be the delimiter during execution
+ line = line.replace(/"/g, '\\"');
+ self.source += ';__output.push("' + line + '");';
+ }
+
+ newLineCount = (line.split('\n').length - 1);
+
+ switch (line) {
+ case '<' + d:
+ this.mode = Template.modes.EVAL;
+ break;
+ case '<' + d + '=':
+ this.mode = Template.modes.ESCAPED;
+ break;
+ case '<' + d + '-':
+ this.mode = Template.modes.RAW;
+ break;
+ case '<' + d + '#':
+ this.mode = Template.modes.COMMENT;
+ break;
+ case '<' + d + d:
+ this.mode = Template.modes.LITERAL;
+ this.source += ';__output.push("' + line.replace('<' + d + d, '<' + d) + '");';
+ break;
+ case d + '>':
+ case '-' + d + '>':
+ if (this.mode == Template.modes.LITERAL) {
+ _addOutput();
+ }
+
+ this.mode = null;
+ this.truncate = line.indexOf('-') === 0;
+ break;
+ default:
+ // In script mode, depends on type of tag
+ if (this.mode) {
+ // If '//' is found without a line break, add a line break.
+ switch (this.mode) {
+ case Template.modes.EVAL:
+ case Template.modes.ESCAPED:
+ case Template.modes.RAW:
+ if (line.lastIndexOf('//') > line.lastIndexOf('\n')) {
+ line += '\n';
+ }
+ }
+ switch (this.mode) {
+ // Just executing code
+ case Template.modes.EVAL:
+ this.source += ';' + line;
+ break;
+ // Exec, esc, and output
+ case Template.modes.ESCAPED:
+ // Add the exec'd, escaped result to the output
+ // Have to prevent the string-coercion of `undefined` and `null`
+ // in the `escape` function -- making a `join` call like below unnecessary
+ this.source += ';__output.push(escape(' +
+ line.replace(_TRAILING_SEMCOL, '').trim() + '))';
+ break;
+ // Exec and output
+ case Template.modes.RAW:
+ // Add the exec'd result to the output
+ // Using `join` here prevents string-coercion of `undefined` and `null`
+ // without filtering out falsey values like zero
+ this.source += ';__output.push(' +
+ line.replace(_TRAILING_SEMCOL, '').trim() + ')';
+ break;
+ case Template.modes.COMMENT:
+ // Do nothing
+ break;
+ // Literal <%% mode, append as raw output
+ case Template.modes.LITERAL:
+ _addOutput();
+ break;
+ }
+ }
+ // In string mode, just add the output
+ else {
+ _addOutput();
+ }
+ }
+
+ if (self.opts.compileDebug && newLineCount) {
+ this.currentLine += newLineCount;
+ this.source += ';__line = ' + this.currentLine + ';';
+ }
+ };
+};
+
+// Express support
+exports.__express = exports.renderFile;
+
+// Add require support
+/* istanbul ignore else */
+if (require.extensions) {
+ require.extensions['.ejs'] = function (module, filename) {
+ filename = filename || /* istanbul ignore next */ module.filename;
+ var options = {
+ filename: filename
+ , client: true
+ }
+ , template = fs.readFileSync(filename).toString().trim()
+ , fn = compile(template, options);
+ module._compile('module.exports = ' + fn.toString() + ';', filename);
+ };
+}
+
+exports.VERSION = _VERSION_STRING;
+
+/* istanbul ignore if */
+if (typeof window != 'undefined') {
+ window.ejs = exports;
+}
diff --git a/dgbuilder/dgeflows/node_modules/ejs/lib/utils.js b/dgbuilder/dgeflows/node_modules/ejs/lib/utils.js
new file mode 100644
index 0000000..fd82602
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/lib/utils.js
@@ -0,0 +1,65 @@
+/*
+ * EJS Embedded JavaScript templates
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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.
+ *
+*/
+
+'use strict';
+
+var regExpChars = /[|\\{}()[\]^$+*?.]/g;
+
+exports.escapeRegExpChars = function (string) {
+ // istanbul ignore if
+ if (!string) {
+ return '';
+ }
+ return String(string).replace(regExpChars, '\\$&');
+};
+
+var encodeHTMLRules = {
+ '&': '&'
+ , '<': '<'
+ , '>': '>'
+ , '"': '"'
+ , "'": '''
+ }
+ , matchHTML = /[&<>\'"]/g;
+
+exports.escapeFuncStr =
+ 'var encodeHTMLRules = {'
++ '"&": "&"'
++ ', "<": "<"'
++ ', ">": ">"'
++ ', \'"\': """'
++ ', "\'": "'"'
++ '}'
++ ', matchHTML = /[&<>\'"]/g;';
+
+exports.escapeXML = function (markup) {
+ return markup == undefined
+ ? ''
+ : String(markup)
+ .replace(matchHTML, function(m) {
+ return encodeHTMLRules[m] || m;
+ });
+};
+
+exports.shallowCopy = function (to, from) {
+ for (var p in from) {
+ to[p] = from[p];
+ }
+ return to;
+};
+
diff --git a/dgbuilder/dgeflows/node_modules/ejs/package.json b/dgbuilder/dgeflows/node_modules/ejs/package.json
new file mode 100644
index 0000000..726a2eb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "ejs",
+ "description": "Embedded JavaScript templates",
+ "keywords": [
+ "template",
+ "engine",
+ "ejs"
+ ],
+ "version": "2.2.4",
+ "author": {
+ "name": "Matthew Eernisse",
+ "email": "mde@fleegix.org",
+ "url": "http://fleegix.org"
+ },
+ "contributors": [
+ {
+ "name": "Timothy Gu",
+ "email": "timothygu99@gmail.com",
+ "url": "https://timothygu.github.io"
+ }
+ ],
+ "license": "Apache-2.0",
+ "main": "./lib/ejs.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mde/ejs.git"
+ },
+ "bugs": {
+ "url": "https://github.com/mde/ejs/issues"
+ },
+ "homepage": "https://github.com/mde/ejs",
+ "dependencies": {},
+ "devDependencies": {
+ "browserify": "^8.0.3",
+ "uglify-js": "^2.4.16",
+ "mocha": "^2.1.0",
+ "jake": "^8.0.0",
+ "istanbul": "~0.3.5"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha",
+ "coverage": "istanbul cover node_modules/mocha/bin/_mocha"
+ },
+ "_id": "ejs@2.2.4",
+ "_shasum": "f0af7e366c13149dd7ae30106c0c0e1cad11903c",
+ "_resolved": "https://registry.npmjs.org/ejs/-/ejs-2.2.4.tgz",
+ "_from": "ejs@~2.2.3",
+ "_npmVersion": "2.1.18",
+ "_nodeVersion": "0.10.35",
+ "_npmUser": {
+ "name": "mde",
+ "email": "mde@fleegix.org"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "mde",
+ "email": "mde@fleegix.org"
+ }
+ ],
+ "dist": {
+ "shasum": "f0af7e366c13149dd7ae30106c0c0e1cad11903c",
+ "tarball": "http://registry.npmjs.org/ejs/-/ejs-2.2.4.tgz"
+ },
+ "directories": {}
+}
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/ejs.js b/dgbuilder/dgeflows/node_modules/ejs/test/ejs.js
new file mode 100644
index 0000000..327e94e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/ejs.js
@@ -0,0 +1,761 @@
+/* jshint mocha: true */
+
+/**
+ * Module dependencies.
+ */
+
+var ejs = require('..')
+ , fs = require('fs')
+ , read = fs.readFileSync
+ , assert = require('assert')
+ , path = require('path');
+
+try {
+ fs.mkdirSync(__dirname + '/tmp');
+} catch (ex) {
+ if (ex.code !== 'EEXIST') {
+ throw ex;
+ }
+}
+
+// From https://gist.github.com/pguillory/729616
+function hook_stdio(stream, callback) {
+ var old_write = stream.write;
+
+ stream.write = (function() {
+ return function(string, encoding, fd) {
+ callback(string, encoding, fd);
+ };
+ })(stream.write);
+
+ return function() {
+ stream.write = old_write;
+ };
+}
+
+/**
+ * Load fixture `name`.
+ */
+
+function fixture(name) {
+ return read('test/fixtures/' + name, 'utf8').replace(/\r/g, '').trim();
+}
+
+/**
+ * User fixtures.
+ */
+
+var users = [];
+users.push({name: 'geddy'});
+users.push({name: 'neil'});
+users.push({name: 'alex'});
+
+suite('ejs.compile(str, options)', function () {
+ test('compile to a function', function () {
+ var fn = ejs.compile('<p>yay</p>');
+ assert.equal(fn(), '<p>yay</p>');
+ });
+
+ test('empty input works', function () {
+ var fn = ejs.compile('');
+ assert.equal(fn(), '');
+ });
+
+ test('throw if there are syntax errors', function () {
+ try {
+ ejs.compile(fixture('fail.ejs'));
+ }
+ catch (err) {
+ assert.ok(err.message.indexOf('compiling ejs') > -1);
+
+ try {
+ ejs.compile(fixture('fail.ejs'), {filename: 'fail.ejs'});
+ }
+ catch (err) {
+ assert.ok(err.message.indexOf('fail.ejs') > -1);
+ return;
+ }
+ }
+ throw new Error('no error reported when there should be');
+ });
+
+ test('allow customizing delimiter local var', function () {
+ var fn;
+ fn = ejs.compile('<p><?= name ?></p>', {delimiter: '?'});
+ assert.equal(fn({name: 'geddy'}), '<p>geddy</p>');
+
+ fn = ejs.compile('<p><:= name :></p>', {delimiter: ':'});
+ assert.equal(fn({name: 'geddy'}), '<p>geddy</p>');
+
+ fn = ejs.compile('<p><$= name $></p>', {delimiter: '$'});
+ assert.equal(fn({name: 'geddy'}), '<p>geddy</p>');
+ });
+
+ test('default to using ejs.delimiter', function () {
+ var fn;
+ ejs.delimiter = '&';
+ fn = ejs.compile('<p><&= name &></p>');
+ assert.equal(fn({name: 'geddy'}), '<p>geddy</p>');
+
+ fn = ejs.compile('<p><|= name |></p>', {delimiter: '|'});
+ assert.equal(fn({name: 'geddy'}), '<p>geddy</p>');
+ delete ejs.delimiter;
+ });
+
+ test('have a working client option', function () {
+ var fn
+ , str
+ , preFn;
+ fn = ejs.compile('<p><%= foo %></p>', {client: true});
+ str = fn.toString();
+ if (!process.env.running_under_istanbul) {
+ eval('var preFn = ' + str);
+ assert.equal(preFn({foo: 'bar'}), '<p>bar</p>');
+ }
+ });
+
+ test('support client mode without locals', function () {
+ var fn
+ , str
+ , preFn;
+ fn = ejs.compile('<p><%= "foo" %></p>', {client: true});
+ str = fn.toString();
+ if (!process.env.running_under_istanbul) {
+ eval('var preFn = ' + str);
+ assert.equal(preFn(), '<p>foo</p>');
+ }
+ });
+});
+
+suite('ejs.render(str, data)', function () {
+ test('render the template', function () {
+ assert.equal(ejs.render('<p>yay</p>'), '<p>yay</p>');
+ });
+
+ test('empty input works', function () {
+ assert.equal(ejs.render(''), '');
+ });
+
+ test('undefined renders nothing escaped', function () {
+ assert.equal(ejs.render('<%= undefined %>'), '');
+ });
+
+ test('undefined renders nothing raw', function () {
+ assert.equal(ejs.render('<%- undefined %>'), '');
+ });
+
+ test('null renders nothing escaped', function () {
+ assert.equal(ejs.render('<%= null %>'), '');
+ });
+
+ test('null renders nothing raw', function () {
+ assert.equal(ejs.render('<%- null %>'), '');
+ });
+
+ test('zero-value data item renders something escaped', function () {
+ assert.equal(ejs.render('<%= 0 %>'), '0');
+ });
+
+ test('zero-value data object renders something raw', function () {
+ assert.equal(ejs.render('<%- 0 %>'), '0');
+ });
+
+ test('accept locals', function () {
+ assert.equal(ejs.render('<p><%= name %></p>', {name: 'geddy'}),
+ '<p>geddy</p>');
+ });
+
+ test('accept locals without using with() {}', function () {
+ assert.equal(ejs.render('<p><%= locals.name %></p>', {name: 'geddy'},
+ {_with: false}),
+ '<p>geddy</p>');
+ assert.throws(function() {
+ ejs.render('<p><%= name %></p>', {name: 'geddy'},
+ {_with: false});
+ }, /name is not defined/);
+ });
+
+ test('accept custom name for locals', function () {
+ ejs.localsName = 'it';
+ assert.equal(ejs.render('<p><%= it.name %></p>', {name: 'geddy'},
+ {_with: false}),
+ '<p>geddy</p>');
+ assert.throws(function() {
+ ejs.render('<p><%= name %></p>', {name: 'geddy'},
+ {_with: false});
+ }, /name is not defined/);
+ ejs.localsName = 'locals';
+ });
+
+ test('support caching (pass 1)', function () {
+ var file = __dirname + '/tmp/render.ejs'
+ , options = {cache: true, filename: file}
+ , out = ejs.render('<p>Old</p>', {}, options)
+ , expected = '<p>Old</p>';
+ assert.equal(out, expected);
+ });
+
+ test('support caching (pass 2)', function () {
+ var file = __dirname + '/tmp/render.ejs'
+ , options = {cache: true, filename: file}
+ , out = ejs.render('<p>New</p>', {}, options)
+ , expected = '<p>Old</p>';
+ assert.equal(out, expected);
+ });
+});
+
+suite('ejs.renderFile(path, [data], [options], fn)', function () {
+ test('render a file', function(done) {
+ ejs.renderFile('test/fixtures/para.ejs', function(err, html) {
+ if (err) {
+ return done(err);
+ }
+ assert.equal(html, '<p>hey</p>');
+ done();
+ });
+ });
+
+ test('callback is async', function(done) {
+ var async = false;
+ ejs.renderFile('test/fixtures/para.ejs', function(err, html) {
+ if (async) {
+ return done();
+ }
+ throw new Error('not async');
+ });
+ async = true;
+ });
+
+ test('accept locals', function(done) {
+ var data = {name: 'fonebone'}
+ , options = {delimiter: '$'};
+ ejs.renderFile('test/fixtures/user.ejs', data, options, function(err, html) {
+ if (err) {
+ return done(err);
+ }
+ assert.equal(html, '<h1>fonebone</h1>');
+ done();
+ });
+ });
+
+ test('accept locals without using with() {}', function(done) {
+ var data = {name: 'fonebone'}
+ , options = {delimiter: '$', _with: false}
+ , doneCount = 0;
+ ejs.renderFile('test/fixtures/user-no-with.ejs', data, options,
+ function(err, html) {
+ if (err) {
+ if (doneCount === 2) {
+ return;
+ }
+ doneCount = 2;
+ return done(err);
+ }
+ assert.equal(html, '<h1>fonebone</h1>');
+ doneCount++;
+ if (doneCount === 2) {
+ done();
+ }
+ });
+ ejs.renderFile('test/fixtures/user.ejs', data, options, function(err) {
+ if (!err) {
+ if (doneCount === 2) {
+ return;
+ }
+ doneCount = 2;
+ return done(new Error('error not thrown'));
+ }
+ doneCount++;
+ if (doneCount === 2) {
+ done();
+ }
+ });
+ });
+
+ test('not catch err thrown by callback', function(done) {
+ var data = {name: 'fonebone'}
+ , options = {delimiter: '$'}
+ , counter = 0;
+
+ var d = require('domain').create();
+ d.on('error', function (err) {
+ assert.equal(counter, 1);
+ assert.equal(err.message, 'Exception in callback');
+ done();
+ });
+ d.run(function () {
+ // process.nextTick() needed to work around mochajs/mocha#513
+ //
+ // tl;dr: mocha doesn't support synchronous exception throwing in
+ // domains. Have to make it async. Ticket closed because: "domains are
+ // deprecated :D"
+ process.nextTick(function () {
+ ejs.renderFile('test/fixtures/user.ejs', data, options,
+ function(err) {
+ counter++;
+ if (err) {
+ assert.notEqual(err.message, 'Exception in callback');
+ return done(err);
+ }
+ throw new Error('Exception in callback');
+ });
+ });
+ });
+ });
+
+ test('support caching (pass 1)', function (done) {
+ var expected = '<p>Old</p>'
+ , file = __dirname + '/tmp/renderFile.ejs'
+ , options = {cache: true};
+ fs.writeFileSync(file, '<p>Old</p>');
+
+ ejs.renderFile(file, {}, options, function (err, out) {
+ if (err) {
+ done(err);
+ }
+ assert.equal(out, expected);
+ done();
+ });
+ });
+
+ test('support caching (pass 2)', function (done) {
+ var expected = '<p>Old</p>'
+ , file = __dirname + '/tmp/renderFile.ejs'
+ , options = {cache: true};
+ fs.writeFileSync(file, '<p>New</p>');
+
+ ejs.renderFile(file, {}, options, function (err, out) {
+ if (err) {
+ done(err);
+ }
+ assert.equal(out, expected);
+ done();
+ });
+ });
+});
+
+suite('ejs.clearCache()', function () {
+ test('work properly', function () {
+ var expected = '<p>Old</p>'
+ , file = __dirname + '/tmp/clearCache.ejs'
+ , options = {cache: true, filename: file}
+ , out = ejs.render('<p>Old</p>', {}, options);
+ assert.equal(out, expected);
+
+ ejs.clearCache();
+
+ expected = '<p>New</p>';
+ out = ejs.render('<p>New</p>', {}, options);
+ assert.equal(out, expected);
+ });
+});
+
+suite('<%', function () {
+ test('without semicolons', function () {
+ assert.equal(ejs.render(fixture('no.semicolons.ejs')),
+ fixture('no.semicolons.html'));
+ });
+});
+
+suite('<%=', function () {
+ test('escape &<script>', function () {
+ assert.equal(ejs.render('<%= name %>', {name: ' <script>'}),
+ '&nbsp;<script>');
+ });
+
+ test('should escape \'', function () {
+ assert.equal(ejs.render('<%= name %>', {name: 'The Jones\'s'}),
+ 'The Jones's');
+ });
+
+ test('should escape &foo_bar;', function () {
+ assert.equal(ejs.render('<%= name %>', {name: '&foo_bar;'}),
+ '&foo_bar;');
+ });
+});
+
+suite('<%-', function () {
+ test('not escape', function () {
+ assert.equal(ejs.render('<%- name %>', {name: '<script>'}),
+ '<script>');
+ });
+
+ test('terminate gracefully if no close tag is found', function () {
+ try {
+ ejs.compile('<h1>oops</h1><%- name ->');
+ throw new Error('Expected parse failure');
+ }
+ catch (err) {
+ assert.ok(err.message.indexOf('Could not find matching close tag for') > -1);
+ }
+ });
+});
+
+suite('%>', function () {
+ test('produce newlines', function () {
+ assert.equal(ejs.render(fixture('newlines.ejs'), {users: users}),
+ fixture('newlines.html'));
+ });
+ test('works with `-%>` interspersed', function () {
+ assert.equal(ejs.render(fixture('newlines.mixed.ejs'), {users: users}),
+ fixture('newlines.mixed.html'));
+ });
+ test('consecutive tags work', function () {
+ assert.equal(ejs.render(fixture('consecutive-tags.ejs')),
+ fixture('consecutive-tags.html'));
+ });
+});
+
+suite('-%>', function () {
+ test('not produce newlines', function () {
+ assert.equal(ejs.render(fixture('no.newlines.ejs'), {users: users}),
+ fixture('no.newlines.html'));
+ });
+ test('stack traces work', function () {
+ try {
+ ejs.render(fixture('no.newlines.error.ejs'));
+ }
+ catch (e) {
+ if (e.message.indexOf('>> 4| <%= qdata %>') > -1) {
+ return;
+ }
+ throw e;
+ }
+ throw new Error('Expected ReferenceError');
+ });
+});
+
+suite('<%%', function () {
+ test('produce literals', function () {
+ assert.equal(ejs.render('<%%- "foo" %>'),
+ '<%- "foo" %>');
+ });
+ test('work without an end tag', function () {
+ assert.equal(ejs.render('<%%'), '<%');
+ assert.equal(ejs.render(fixture('literal.ejs'), {}, {delimiter: ' '}),
+ fixture('literal.html'));
+ });
+});
+
+suite('single quotes', function () {
+ test('not mess up the constructed function', function () {
+ assert.equal(ejs.render(fixture('single-quote.ejs')),
+ fixture('single-quote.html'));
+ });
+});
+
+suite('double quotes', function () {
+ test('not mess up the constructed function', function () {
+ assert.equal(ejs.render(fixture('double-quote.ejs')),
+ fixture('double-quote.html'));
+ });
+});
+
+suite('backslashes', function () {
+ test('escape', function () {
+ assert.equal(ejs.render(fixture('backslash.ejs')),
+ fixture('backslash.html'));
+ });
+});
+
+suite('messed up whitespace', function () {
+ test('work', function () {
+ assert.equal(ejs.render(fixture('messed.ejs'), {users: users}),
+ fixture('messed.html'));
+ });
+});
+
+suite('exceptions', function () {
+ test('produce useful stack traces', function () {
+ try {
+ ejs.render(fixture('error.ejs'), {}, {filename: 'error.ejs'});
+ }
+ catch (err) {
+ assert.equal(err.path, 'error.ejs');
+ assert.equal(err.stack.split('\n').slice(0, 8).join('\n'), fixture('error.out'));
+ return;
+ }
+ throw new Error('no error reported when there should be');
+ });
+
+ test('not include fancy stack info if compileDebug is false', function () {
+ try {
+ ejs.render(fixture('error.ejs'), {}, {
+ filename: 'error.ejs',
+ compileDebug: false
+ });
+ }
+ catch (err) {
+ assert.ok(!err.path);
+ assert.notEqual(err.stack.split('\n').slice(0, 8).join('\n'), fixture('error.out'));
+ return;
+ }
+ throw new Error('no error reported when there should be');
+ });
+
+ var unhook = null;
+ test('log JS source when debug is set', function (done) {
+ var out = ''
+ , needToExit = false;
+ unhook = hook_stdio(process.stdout, function (str) {
+ out += str;
+ if (needToExit) {
+ return;
+ }
+ if (out.indexOf('__output')) {
+ needToExit = true;
+ unhook();
+ unhook = null;
+ return done();
+ }
+ });
+ ejs.render(fixture('hello-world.ejs'), {}, {debug: true});
+ });
+ teardown(function() {
+ if (!unhook) {
+ return;
+ }
+ unhook();
+ unhook = null;
+ });
+});
+
+suite('include()', function () {
+ test('include ejs', function () {
+ var file = 'test/fixtures/include-simple.ejs';
+ assert.equal(ejs.render(fixture('include-simple.ejs'), {}, {filename: file}),
+ fixture('include-simple.html'));
+ });
+
+ test('include ejs fails without `filename`', function () {
+ try {
+ ejs.render(fixture('include-simple.ejs'));
+ }
+ catch (err) {
+ assert.ok(err.message.indexOf('requires the \'filename\' option') > -1);
+ return;
+ }
+ throw new Error('expected inclusion error');
+ });
+
+ test('strips BOM', function () {
+ assert.equal(
+ ejs.render('<%- include("fixtures/includes/bom.ejs") %>',
+ {}, {filename: path.join(__dirname, 'f.ejs')}),
+ '<p>This is a file with BOM.</p>');
+ });
+
+ test('include ejs with locals', function () {
+ var file = 'test/fixtures/include.ejs';
+ assert.equal(ejs.render(fixture('include.ejs'), {pets: users}, {filename: file, delimiter: '@'}),
+ fixture('include.html'));
+ });
+
+ test('include ejs with absolute path and locals', function () {
+ var file = 'test/fixtures/include-abspath.ejs';
+ assert.equal(ejs.render(fixture('include-abspath.ejs'),
+ {dir: path.join(__dirname, 'fixtures'), pets: users, path: path},
+ {filename: file, delimiter: '@'}),
+ fixture('include.html'));
+ });
+
+ test('work when nested', function () {
+ var file = 'test/fixtures/menu.ejs';
+ assert.equal(ejs.render(fixture('menu.ejs'), {pets: users}, {filename: file}),
+ fixture('menu.html'));
+ });
+
+ test('work with a variable path', function () {
+ var file = 'test/fixtures/menu_var.ejs',
+ includePath = 'includes/menu-item';
+ assert.equal(ejs.render(fixture('menu.ejs'), {pets: users, varPath: includePath}, {filename: file}),
+ fixture('menu.html'));
+ });
+
+ test('include arbitrary files as-is', function () {
+ var file = 'test/fixtures/include.css.ejs';
+ assert.equal(ejs.render(fixture('include.css.ejs'), {pets: users}, {filename: file}),
+ fixture('include.css.html'));
+ });
+
+ test('pass compileDebug to include', function () {
+ var file = 'test/fixtures/include.ejs'
+ , fn;
+ fn = ejs.compile(fixture('include.ejs'), {
+ filename: file
+ , delimiter: '@'
+ , compileDebug: false
+ });
+ try {
+ // Render without a required variable reference
+ fn({foo: 'asdf'});
+ }
+ catch(e) {
+ assert.equal(e.message, 'pets is not defined');
+ assert.ok(!e.path);
+ return;
+ }
+ throw new Error('no error reported when there should be');
+ });
+
+ test('is dynamic', function () {
+ fs.writeFileSync(__dirname + '/tmp/include.ejs', '<p>Old</p>');
+ var file = 'test/fixtures/include_cache.ejs'
+ , options = {filename: file}
+ , out = ejs.compile(fixture('include_cache.ejs'), options);
+ assert.equal(out(), '<p>Old</p>');
+
+ fs.writeFileSync(__dirname + '/tmp/include.ejs', '<p>New</p>');
+ assert.equal(out(), '<p>New</p>');
+ });
+
+ test('support caching (pass 1)', function () {
+ fs.writeFileSync(__dirname + '/tmp/include.ejs', '<p>Old</p>');
+ var file = 'test/fixtures/include_cache.ejs'
+ , options = {cache: true, filename: file}
+ , out = ejs.render(fixture('include_cache.ejs'), {}, options)
+ , expected = fixture('include_cache.html');
+ assert.equal(out, expected);
+ });
+
+ test('support caching (pass 2)', function () {
+ fs.writeFileSync(__dirname + '/tmp/include.ejs', '<p>New</p>');
+ var file = 'test/fixtures/include_cache.ejs'
+ , options = {cache: true, filename: file}
+ , out = ejs.render(fixture('include_cache.ejs'), {}, options)
+ , expected = fixture('include_cache.html');
+ assert.equal(out, expected);
+ });
+});
+
+suite('preprocessor include', function () {
+ test('work', function () {
+ var file = 'test/fixtures/include_preprocessor.ejs';
+ assert.equal(ejs.render(fixture('include_preprocessor.ejs'), {pets: users}, {filename: file, delimiter: '@'}),
+ fixture('include_preprocessor.html'));
+ });
+
+ test('fails without `filename`', function () {
+ try {
+ ejs.render(fixture('include_preprocessor.ejs'), {pets: users}, {delimiter: '@'});
+ }
+ catch (err) {
+ assert.ok(err.message.indexOf('requires the \'filename\' option') > -1);
+ return;
+ }
+ throw new Error('expected inclusion error');
+ });
+
+ test('strips BOM', function () {
+ assert.equal(
+ ejs.render('<% include fixtures/includes/bom.ejs %>',
+ {}, {filename: path.join(__dirname, 'f.ejs')}),
+ '<p>This is a file with BOM.</p>');
+ });
+
+ test('work when nested', function () {
+ var file = 'test/fixtures/menu_preprocessor.ejs';
+ assert.equal(ejs.render(fixture('menu_preprocessor.ejs'), {pets: users}, {filename: file}),
+ fixture('menu_preprocessor.html'));
+ });
+
+ test('include arbitrary files as-is', function () {
+ var file = 'test/fixtures/include_preprocessor.css.ejs';
+ assert.equal(ejs.render(fixture('include_preprocessor.css.ejs'), {pets: users}, {filename: file}),
+ fixture('include_preprocessor.css.html'));
+ });
+
+ test('pass compileDebug to include', function () {
+ var file = 'test/fixtures/include_preprocessor.ejs'
+ , fn;
+ fn = ejs.compile(fixture('include_preprocessor.ejs'), {
+ filename: file
+ , delimiter: '@'
+ , compileDebug: false
+ });
+ try {
+ // Render without a required variable reference
+ fn({foo: 'asdf'});
+ }
+ catch(e) {
+ assert.equal(e.message, 'pets is not defined');
+ assert.ok(!e.path);
+ return;
+ }
+ throw new Error('no error reported when there should be');
+ });
+
+ test('is static', function () {
+ fs.writeFileSync(__dirname + '/tmp/include_preprocessor.ejs', '<p>Old</p>');
+ var file = 'test/fixtures/include_preprocessor_cache.ejs'
+ , options = {filename: file}
+ , out = ejs.compile(fixture('include_preprocessor_cache.ejs'), options);
+ assert.equal(out(), '<p>Old</p>');
+
+ fs.writeFileSync(__dirname + '/tmp/include_preprocessor.ejs', '<p>New</p>');
+ assert.equal(out(), '<p>Old</p>');
+ });
+
+ test('support caching (pass 1)', function () {
+ fs.writeFileSync(__dirname + '/tmp/include_preprocessor.ejs', '<p>Old</p>');
+ var file = 'test/fixtures/include_preprocessor_cache.ejs'
+ , options = {cache: true, filename: file}
+ , out = ejs.render(fixture('include_preprocessor_cache.ejs'), {}, options)
+ , expected = fixture('include_preprocessor_cache.html');
+ assert.equal(out, expected);
+ });
+
+ test('support caching (pass 2)', function () {
+ fs.writeFileSync(__dirname + '/tmp/include_preprocessor.ejs', '<p>New</p>');
+ var file = 'test/fixtures/include_preprocessor_cache.ejs'
+ , options = {cache: true, filename: file}
+ , out = ejs.render(fixture('include_preprocessor_cache.ejs'), {}, options)
+ , expected = fixture('include_preprocessor_cache.html');
+ assert.equal(out, expected);
+ });
+});
+
+suite('comments', function () {
+ test('fully render with comments removed', function () {
+ assert.equal(ejs.render(fixture('comments.ejs')),
+ fixture('comments.html'));
+ });
+});
+
+suite('require', function () {
+
+ // Only works with inline/preprocessor includes
+ test('allow ejs templates to be required as node modules', function () {
+ var file = 'test/fixtures/include_preprocessor.ejs'
+ , template = require(__dirname + '/fixtures/menu_preprocessor.ejs');
+ if (!process.env.running_under_istanbul) {
+ assert.equal(template({filename: file, pets: users}),
+ fixture('menu_preprocessor.html'));
+ }
+ });
+});
+
+suite('examples', function () {
+ function noop () {}
+ fs.readdirSync('examples').forEach(function (f) {
+ if (!/\.js$/.test(f)) {
+ return;
+ }
+ suite(f, function () {
+ test('doesn\'t throw any errors', function () {
+ var stderr = hook_stdio(process.stderr, noop)
+ , stdout = hook_stdio(process.stdout, noop);
+ try {
+ require('../examples/' + f);
+ }
+ catch (ex) {
+ stdout();
+ stderr();
+ throw ex;
+ }
+ stdout();
+ stderr();
+ });
+ });
+ });
+});
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/backslash.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/backslash.ejs
new file mode 100644
index 0000000..eeb4a48
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/backslash.ejs
@@ -0,0 +1 @@
+\foo
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/backslash.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/backslash.html
new file mode 100644
index 0000000..eeb4a48
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/backslash.html
@@ -0,0 +1 @@
+\foo
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/comments.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/comments.ejs
new file mode 100644
index 0000000..48ece70
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/comments.ejs
@@ -0,0 +1,7 @@
+<li><a href="foo"><% // double-slash comment %>foo</li>
+<li><a href="bar"><% /* C-style comment */ %>bar</li>
+<li><a href="baz"><% // double-slash comment with newline
+ %>baz</li>
+<li><a href="qux"><% var x = 'qux'; // double-slash comment @ end of line %><%= x %></li>
+<li><a href="fee"><%# ERB style comment %>fee</li>
+<li><a href="bah"><%= 'not a ' + '//' + ' comment' %></a></li>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/comments.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/comments.html
new file mode 100644
index 0000000..5a98682
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/comments.html
@@ -0,0 +1,6 @@
+<li><a href="foo">foo</li>
+<li><a href="bar">bar</li>
+<li><a href="baz">baz</li>
+<li><a href="qux">qux</li>
+<li><a href="fee">fee</li>
+<li><a href="bah">not a // comment</a></li>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/consecutive-tags.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/consecutive-tags.ejs
new file mode 100644
index 0000000..175f5c3
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/consecutive-tags.ejs
@@ -0,0 +1 @@
+<% var a = 'foo' %><% var b = 'bar' %><%= a %>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/consecutive-tags.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/consecutive-tags.html
new file mode 100644
index 0000000..257cc56
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/consecutive-tags.html
@@ -0,0 +1 @@
+foo
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/double-quote.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/double-quote.ejs
new file mode 100644
index 0000000..3bccdcf
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/double-quote.ejs
@@ -0,0 +1 @@
+<p><%= "lo" + 'ki' %>'s "wheelchair"</p>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/double-quote.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/double-quote.html
new file mode 100644
index 0000000..6473979
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/double-quote.html
@@ -0,0 +1 @@
+<p>loki's "wheelchair"</p>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/error.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/error.ejs
new file mode 100644
index 0000000..f032730
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/error.ejs
@@ -0,0 +1,5 @@
+<ul>
+ <% if (users) { %>
+ <p>Has users</p>
+ <% } %>
+</ul>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/error.out b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/error.out
new file mode 100644
index 0000000..a2c9108
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/error.out
@@ -0,0 +1,8 @@
+ReferenceError: error.ejs:2
+ 1| <ul>
+ >> 2| <% if (users) { %>
+ 3| <p>Has users</p>
+ 4| <% } %>
+ 5| </ul>
+
+users is not defined
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/fail.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/fail.ejs
new file mode 100644
index 0000000..1a7a0f7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/fail.ejs
@@ -0,0 +1 @@
+<% function foo() return 'foo'; %>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/hello-world.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/hello-world.ejs
new file mode 100644
index 0000000..e2e353e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/hello-world.ejs
@@ -0,0 +1 @@
+<p>Hello world!</p>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include-abspath.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include-abspath.ejs
new file mode 100644
index 0000000..26b0522
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include-abspath.ejs
@@ -0,0 +1,5 @@
+<ul>
+ <@ pets.forEach(function(pet){ @>
+ <@- include(path.join(dir, 'pet'), {pet: pet}); @>
+ <@ }); @>
+</ul>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include-simple.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include-simple.ejs
new file mode 100644
index 0000000..a874878
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include-simple.ejs
@@ -0,0 +1,3 @@
+<ul>
+ <%- include('hello-world'); %>
+</ul>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include-simple.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include-simple.html
new file mode 100644
index 0000000..3b729ef
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include-simple.html
@@ -0,0 +1,3 @@
+<ul>
+ <p>Hello world!</p>
+</ul>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include.css.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include.css.ejs
new file mode 100644
index 0000000..cd184b4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include.css.ejs
@@ -0,0 +1 @@
+<style><%- include('style.css', {value: 'bar'}); %></style>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include.css.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include.css.html
new file mode 100644
index 0000000..43343fe
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include.css.html
@@ -0,0 +1,3 @@
+<style>body {
+ foo: 'bar';
+}</style>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include.ejs
new file mode 100644
index 0000000..f2295ee
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include.ejs
@@ -0,0 +1,5 @@
+<ul>
+ <@ pets.forEach(function(pet){ @>
+ <@- include('pet', {pet: pet}); @>
+ <@ }); @>
+</ul>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include.html
new file mode 100644
index 0000000..4557edb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include.html
@@ -0,0 +1,9 @@
+<ul>
+
+ <li>geddy</li>
+
+ <li>neil</li>
+
+ <li>alex</li>
+
+</ul>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_cache.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_cache.ejs
new file mode 100644
index 0000000..439193c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_cache.ejs
@@ -0,0 +1 @@
+<%- include('../tmp/include') %>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_cache.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_cache.html
new file mode 100644
index 0000000..be20e58
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_cache.html
@@ -0,0 +1 @@
+<p>Old</p>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor.css.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor.css.ejs
new file mode 100644
index 0000000..f47358b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor.css.ejs
@@ -0,0 +1 @@
+<style><% var value = 'bar' %><% include style.css %></style>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor.css.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor.css.html
new file mode 100644
index 0000000..43343fe
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor.css.html
@@ -0,0 +1,3 @@
+<style>body {
+ foo: 'bar';
+}</style>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor.ejs
new file mode 100644
index 0000000..f2728c5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor.ejs
@@ -0,0 +1,5 @@
+<ul>
+ <@ pets.forEach(function(pet){ @>
+ <@ include pet @>
+ <@ }) @>
+</ul>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor.html
new file mode 100644
index 0000000..4557edb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor.html
@@ -0,0 +1,9 @@
+<ul>
+
+ <li>geddy</li>
+
+ <li>neil</li>
+
+ <li>alex</li>
+
+</ul>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor_cache.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor_cache.ejs
new file mode 100644
index 0000000..ae60923
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor_cache.ejs
@@ -0,0 +1 @@
+<%- include ../tmp/include_preprocessor %>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor_cache.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor_cache.html
new file mode 100644
index 0000000..be20e58
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/include_preprocessor_cache.html
@@ -0,0 +1 @@
+<p>Old</p>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/includes/bom.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/includes/bom.ejs
new file mode 100644
index 0000000..cc198ba
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/includes/bom.ejs
@@ -0,0 +1 @@
+<p>This is a file with BOM.</p>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/includes/menu-item.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/includes/menu-item.ejs
new file mode 100644
index 0000000..37cca5f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/includes/menu-item.ejs
@@ -0,0 +1 @@
+<li><% include menu/item %></li>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/includes/menu/item.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/includes/menu/item.ejs
new file mode 100644
index 0000000..8abc3fe
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/includes/menu/item.ejs
@@ -0,0 +1 @@
+<a href="/<%= url %>"><%= title %></a>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/literal.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/literal.ejs
new file mode 100644
index 0000000..9f6bf81
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/literal.ejs
@@ -0,0 +1,3 @@
+<pre>There should be a space followed by a less-than sign and then two more
+spaces in the next line:
+ < .</pre>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/literal.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/literal.html
new file mode 100644
index 0000000..d992250
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/literal.html
@@ -0,0 +1,3 @@
+<pre>There should be a space followed by a less-than sign and then two more
+spaces in the next line:
+ < .</pre>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu.ejs
new file mode 100644
index 0000000..0309990
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu.ejs
@@ -0,0 +1,15 @@
+<%- include('includes/menu-item', {
+ url: '/foo'
+, title: 'Foo'
+}); -%>
+
+<%- include('includes/menu-item', {
+ url: '/bar'
+, title: 'Bar'
+}); -%>
+
+<%- include('includes/menu-item', {
+ url: '/baz'
+, title: 'Baz'
+}); -%>
+
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu.html
new file mode 100644
index 0000000..1f9e45f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu.html
@@ -0,0 +1,3 @@
+<li><a href="//foo">Foo</a></li>
+<li><a href="//bar">Bar</a></li>
+<li><a href="//baz">Baz</a></li>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu_preprocessor.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu_preprocessor.ejs
new file mode 100644
index 0000000..61fad41
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu_preprocessor.ejs
@@ -0,0 +1,11 @@
+<% var url = '/foo' -%>
+<% var title = 'Foo' -%>
+<% include includes/menu-item -%>
+
+<% var url = '/bar' -%>
+<% var title = 'Bar' -%>
+<% include includes/menu-item -%>
+
+<% var url = '/baz' -%>
+<% var title = 'Baz' -%>
+<% include includes/menu-item -%>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu_preprocessor.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu_preprocessor.html
new file mode 100644
index 0000000..1f9e45f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu_preprocessor.html
@@ -0,0 +1,3 @@
+<li><a href="//foo">Foo</a></li>
+<li><a href="//bar">Bar</a></li>
+<li><a href="//baz">Baz</a></li>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu_var.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu_var.ejs
new file mode 100644
index 0000000..a421dcb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/menu_var.ejs
@@ -0,0 +1,15 @@
+<%- include(varPath, {
+ url: '/foo'
+, title: 'Foo'
+}); -%>
+
+<%- include(varPath, {
+ url: '/bar'
+, title: 'Bar'
+}); -%>
+
+<%- include(varPath, {
+ url: '/baz'
+, title: 'Baz'
+}); -%>
+
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/messed.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/messed.ejs
new file mode 100644
index 0000000..7d69033
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/messed.ejs
@@ -0,0 +1 @@
+<ul><%users.forEach(function(user){%><li><%=user.name%></li><%})%></ul>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/messed.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/messed.html
new file mode 100644
index 0000000..52d3562
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/messed.html
@@ -0,0 +1 @@
+<ul><li>geddy</li><li>neil</li><li>alex</li></ul>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/newlines.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/newlines.ejs
new file mode 100644
index 0000000..47401b2
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/newlines.ejs
@@ -0,0 +1,5 @@
+<ul>
+ <% users.forEach(function(user){ %>
+ <li><%= user.name %></li>
+ <% }) %>
+</ul>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/newlines.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/newlines.html
new file mode 100644
index 0000000..4557edb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/newlines.html
@@ -0,0 +1,9 @@
+<ul>
+
+ <li>geddy</li>
+
+ <li>neil</li>
+
+ <li>alex</li>
+
+</ul>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/newlines.mixed.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/newlines.mixed.ejs
new file mode 100644
index 0000000..bdf2133
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/newlines.mixed.ejs
@@ -0,0 +1,6 @@
+<ul>
+ <% var unused1 = 'blah' -%>
+ <% var unused2 = 'bleh' %>
+ <% var unused3 = 'bloh' -%>
+ <% var unused4 = 'bluh' %>
+</ul>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/newlines.mixed.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/newlines.mixed.html
new file mode 100644
index 0000000..6d8a2f5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/newlines.mixed.html
@@ -0,0 +1,4 @@
+<ul>
+
+
+</ul>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.newlines.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.newlines.ejs
new file mode 100644
index 0000000..029b461
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.newlines.ejs
@@ -0,0 +1,5 @@
+<ul>
+ <% users.forEach(function(user){ -%>
+ <li><%= user.name %></li>
+ <% }) -%>
+</ul>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.newlines.error.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.newlines.error.ejs
new file mode 100644
index 0000000..5749686
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.newlines.error.ejs
@@ -0,0 +1,5 @@
+AAA
+<% data = "test"; -%>
+BBB
+<%= qdata %>
+CCC
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.newlines.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.newlines.html
new file mode 100644
index 0000000..2285700
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.newlines.html
@@ -0,0 +1,5 @@
+<ul>
+ <li>geddy</li>
+ <li>neil</li>
+ <li>alex</li>
+ </ul>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.semicolons.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.semicolons.ejs
new file mode 100644
index 0000000..d583134
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.semicolons.ejs
@@ -0,0 +1,8 @@
+This document does not use semicolons in scriptlets.
+<%
+ var a = 'b'
+ var b = 'c'
+ var c
+ c = b
+%>
+The value of c is: <%= c %>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.semicolons.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.semicolons.html
new file mode 100644
index 0000000..2539298
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/no.semicolons.html
@@ -0,0 +1,3 @@
+This document does not use semicolons in scriptlets.
+
+The value of c is: c
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/para.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/para.ejs
new file mode 100644
index 0000000..89da779
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/para.ejs
@@ -0,0 +1 @@
+<p>hey</p>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/pet.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/pet.ejs
new file mode 100644
index 0000000..09dd230
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/pet.ejs
@@ -0,0 +1 @@
+<li><@= pet.name @></li>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/single-quote.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/single-quote.ejs
new file mode 100644
index 0000000..1e35a95
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/single-quote.ejs
@@ -0,0 +1 @@
+<p><%= 'loki' %>'s wheelchair</p>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/single-quote.html b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/single-quote.html
new file mode 100644
index 0000000..3125173
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/single-quote.html
@@ -0,0 +1 @@
+<p>loki's wheelchair</p>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/style.css b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/style.css
new file mode 100644
index 0000000..f9c16e6
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/style.css
@@ -0,0 +1,3 @@
+body {
+ foo: '<%= value %>';
+}
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/user-no-with.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/user-no-with.ejs
new file mode 100644
index 0000000..1822e24
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/user-no-with.ejs
@@ -0,0 +1 @@
+<h1><$= locals.name $></h1>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/user.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/user.ejs
new file mode 100644
index 0000000..66f9adc
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/fixtures/user.ejs
@@ -0,0 +1 @@
+<h1><$= name $></h1>
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/mocha.opts b/dgbuilder/dgeflows/node_modules/ejs/test/mocha.opts
new file mode 100644
index 0000000..68d4dd7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/mocha.opts
@@ -0,0 +1,2 @@
+--ui tdd
+--reporter spec
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/tmp/include.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/tmp/include.ejs
new file mode 100644
index 0000000..595b6c0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/tmp/include.ejs
@@ -0,0 +1 @@
+<p>New</p>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/tmp/include_preprocessor.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/tmp/include_preprocessor.ejs
new file mode 100644
index 0000000..595b6c0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/tmp/include_preprocessor.ejs
@@ -0,0 +1 @@
+<p>New</p>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/ejs/test/tmp/renderFile.ejs b/dgbuilder/dgeflows/node_modules/ejs/test/tmp/renderFile.ejs
new file mode 100644
index 0000000..595b6c0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/ejs/test/tmp/renderFile.ejs
@@ -0,0 +1 @@
+<p>New</p>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/express/History.md b/dgbuilder/dgeflows/node_modules/express/History.md
new file mode 100644
index 0000000..6184768
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/History.md
@@ -0,0 +1,2644 @@
+4.11.2 / 2015-02-01
+===================
+
+ * Fix `res.redirect` double-calling `res.end` for `HEAD` requests
+ * deps: accepts@~1.2.3
+ - deps: mime-types@~2.0.8
+ * deps: proxy-addr@~1.0.6
+ - deps: ipaddr.js@0.1.8
+ * deps: type-is@~1.5.6
+ - deps: mime-types@~2.0.8
+
+4.11.1 / 2015-01-20
+===================
+
+ * deps: send@0.11.1
+ - Fix root path disclosure
+ * deps: serve-static@~1.8.1
+ - Fix redirect loop in Node.js 0.11.14
+ - Fix root path disclosure
+ - deps: send@0.11.1
+
+4.11.0 / 2015-01-13
+===================
+
+ * Add `res.append(field, val)` to append headers
+ * Deprecate leading `:` in `name` for `app.param(name, fn)`
+ * Deprecate `req.param()` -- use `req.params`, `req.body`, or `req.query` instead
+ * Deprecate `app.param(fn)`
+ * Fix `OPTIONS` responses to include the `HEAD` method properly
+ * Fix `res.sendFile` not always detecting aborted connection
+ * Match routes iteratively to prevent stack overflows
+ * deps: accepts@~1.2.2
+ - deps: mime-types@~2.0.7
+ - deps: negotiator@0.5.0
+ * deps: send@0.11.0
+ - deps: debug@~2.1.1
+ - deps: etag@~1.5.1
+ - deps: ms@0.7.0
+ - deps: on-finished@~2.2.0
+ * deps: serve-static@~1.8.0
+ - deps: send@0.11.0
+
+4.10.8 / 2015-01-13
+===================
+
+ * Fix crash from error within `OPTIONS` response handler
+ * deps: proxy-addr@~1.0.5
+ - deps: ipaddr.js@0.1.6
+
+4.10.7 / 2015-01-04
+===================
+
+ * Fix `Allow` header for `OPTIONS` to not contain duplicate methods
+ * Fix incorrect "Request aborted" for `res.sendFile` when `HEAD` or 304
+ * deps: debug@~2.1.1
+ * deps: finalhandler@0.3.3
+ - deps: debug@~2.1.1
+ - deps: on-finished@~2.2.0
+ * deps: methods@~1.1.1
+ * deps: on-finished@~2.2.0
+ * deps: serve-static@~1.7.2
+ - Fix potential open redirect when mounted at root
+ * deps: type-is@~1.5.5
+ - deps: mime-types@~2.0.7
+
+4.10.6 / 2014-12-12
+===================
+
+ * Fix exception in `req.fresh`/`req.stale` without response headers
+
+4.10.5 / 2014-12-10
+===================
+
+ * Fix `res.send` double-calling `res.end` for `HEAD` requests
+ * deps: accepts@~1.1.4
+ - deps: mime-types@~2.0.4
+ * deps: type-is@~1.5.4
+ - deps: mime-types@~2.0.4
+
+4.10.4 / 2014-11-24
+===================
+
+ * Fix `res.sendfile` logging standard write errors
+
+4.10.3 / 2014-11-23
+===================
+
+ * Fix `res.sendFile` logging standard write errors
+ * deps: etag@~1.5.1
+ * deps: proxy-addr@~1.0.4
+ - deps: ipaddr.js@0.1.5
+ * deps: qs@2.3.3
+ - Fix `arrayLimit` behavior
+
+4.10.2 / 2014-11-09
+===================
+
+ * Correctly invoke async router callback asynchronously
+ * deps: accepts@~1.1.3
+ - deps: mime-types@~2.0.3
+ * deps: type-is@~1.5.3
+ - deps: mime-types@~2.0.3
+
+4.10.1 / 2014-10-28
+===================
+
+ * Fix handling of URLs containing `://` in the path
+ * deps: qs@2.3.2
+ - Fix parsing of mixed objects and values
+
+4.10.0 / 2014-10-23
+===================
+
+ * Add support for `app.set('views', array)`
+ - Views are looked up in sequence in array of directories
+ * Fix `res.send(status)` to mention `res.sendStatus(status)`
+ * Fix handling of invalid empty URLs
+ * Use `content-disposition` module for `res.attachment`/`res.download`
+ - Sends standards-compliant `Content-Disposition` header
+ - Full Unicode support
+ * Use `path.resolve` in view lookup
+ * deps: debug@~2.1.0
+ - Implement `DEBUG_FD` env variable support
+ * deps: depd@~1.0.0
+ * deps: etag@~1.5.0
+ - Improve string performance
+ - Slightly improve speed for weak ETags over 1KB
+ * deps: finalhandler@0.3.2
+ - Terminate in progress response only on error
+ - Use `on-finished` to determine request status
+ - deps: debug@~2.1.0
+ - deps: on-finished@~2.1.1
+ * deps: on-finished@~2.1.1
+ - Fix handling of pipelined requests
+ * deps: qs@2.3.0
+ - Fix parsing of mixed implicit and explicit arrays
+ * deps: send@0.10.1
+ - deps: debug@~2.1.0
+ - deps: depd@~1.0.0
+ - deps: etag@~1.5.0
+ - deps: on-finished@~2.1.1
+ * deps: serve-static@~1.7.1
+ - deps: send@0.10.1
+
+4.9.8 / 2014-10-17
+==================
+
+ * Fix `res.redirect` body when redirect status specified
+ * deps: accepts@~1.1.2
+ - Fix error when media type has invalid parameter
+ - deps: negotiator@0.4.9
+
+4.9.7 / 2014-10-10
+==================
+
+ * Fix using same param name in array of paths
+
+4.9.6 / 2014-10-08
+==================
+
+ * deps: accepts@~1.1.1
+ - deps: mime-types@~2.0.2
+ - deps: negotiator@0.4.8
+ * deps: serve-static@~1.6.4
+ - Fix redirect loop when index file serving disabled
+ * deps: type-is@~1.5.2
+ - deps: mime-types@~2.0.2
+
+4.9.5 / 2014-09-24
+==================
+
+ * deps: etag@~1.4.0
+ * deps: proxy-addr@~1.0.3
+ - Use `forwarded` npm module
+ * deps: send@0.9.3
+ - deps: etag@~1.4.0
+ * deps: serve-static@~1.6.3
+ - deps: send@0.9.3
+
+4.9.4 / 2014-09-19
+==================
+
+ * deps: qs@2.2.4
+ - Fix issue with object keys starting with numbers truncated
+
+4.9.3 / 2014-09-18
+==================
+
+ * deps: proxy-addr@~1.0.2
+ - Fix a global leak when multiple subnets are trusted
+ - deps: ipaddr.js@0.1.3
+
+4.9.2 / 2014-09-17
+==================
+
+ * Fix regression for empty string `path` in `app.use`
+ * Fix `router.use` to accept array of middleware without path
+ * Improve error message for bad `app.use` arguments
+
+4.9.1 / 2014-09-16
+==================
+
+ * Fix `app.use` to accept array of middleware without path
+ * deps: depd@0.4.5
+ * deps: etag@~1.3.1
+ * deps: send@0.9.2
+ - deps: depd@0.4.5
+ - deps: etag@~1.3.1
+ - deps: range-parser@~1.0.2
+ * deps: serve-static@~1.6.2
+ - deps: send@0.9.2
+
+4.9.0 / 2014-09-08
+==================
+
+ * Add `res.sendStatus`
+ * Invoke callback for sendfile when client aborts
+ - Applies to `res.sendFile`, `res.sendfile`, and `res.download`
+ - `err` will be populated with request aborted error
+ * Support IP address host in `req.subdomains`
+ * Use `etag` to generate `ETag` headers
+ * deps: accepts@~1.1.0
+ - update `mime-types`
+ * deps: cookie-signature@1.0.5
+ * deps: debug@~2.0.0
+ * deps: finalhandler@0.2.0
+ - Set `X-Content-Type-Options: nosniff` header
+ - deps: debug@~2.0.0
+ * deps: fresh@0.2.4
+ * deps: media-typer@0.3.0
+ - Throw error when parameter format invalid on parse
+ * deps: qs@2.2.3
+ - Fix issue where first empty value in array is discarded
+ * deps: range-parser@~1.0.2
+ * deps: send@0.9.1
+ - Add `lastModified` option
+ - Use `etag` to generate `ETag` header
+ - deps: debug@~2.0.0
+ - deps: fresh@0.2.4
+ * deps: serve-static@~1.6.1
+ - Add `lastModified` option
+ - deps: send@0.9.1
+ * deps: type-is@~1.5.1
+ - fix `hasbody` to be true for `content-length: 0`
+ - deps: media-typer@0.3.0
+ - deps: mime-types@~2.0.1
+ * deps: vary@~1.0.0
+ - Accept valid `Vary` header string as `field`
+
+4.8.8 / 2014-09-04
+==================
+
+ * deps: send@0.8.5
+ - Fix a path traversal issue when using `root`
+ - Fix malicious path detection for empty string path
+ * deps: serve-static@~1.5.4
+ - deps: send@0.8.5
+
+4.8.7 / 2014-08-29
+==================
+
+ * deps: qs@2.2.2
+ - Remove unnecessary cloning
+
+4.8.6 / 2014-08-27
+==================
+
+ * deps: qs@2.2.0
+ - Array parsing fix
+ - Performance improvements
+
+4.8.5 / 2014-08-18
+==================
+
+ * deps: send@0.8.3
+ - deps: destroy@1.0.3
+ - deps: on-finished@2.1.0
+ * deps: serve-static@~1.5.3
+ - deps: send@0.8.3
+
+4.8.4 / 2014-08-14
+==================
+
+ * deps: qs@1.2.2
+ * deps: send@0.8.2
+ - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream`
+ * deps: serve-static@~1.5.2
+ - deps: send@0.8.2
+
+4.8.3 / 2014-08-10
+==================
+
+ * deps: parseurl@~1.3.0
+ * deps: qs@1.2.1
+ * deps: serve-static@~1.5.1
+ - Fix parsing of weird `req.originalUrl` values
+ - deps: parseurl@~1.3.0
+ - deps: utils-merge@1.0.0
+
+4.8.2 / 2014-08-07
+==================
+
+ * deps: qs@1.2.0
+ - Fix parsing array of objects
+
+4.8.1 / 2014-08-06
+==================
+
+ * fix incorrect deprecation warnings on `res.download`
+ * deps: qs@1.1.0
+ - Accept urlencoded square brackets
+ - Accept empty values in implicit array notation
+
+4.8.0 / 2014-08-05
+==================
+
+ * add `res.sendFile`
+ - accepts a file system path instead of a URL
+ - requires an absolute path or `root` option specified
+ * deprecate `res.sendfile` -- use `res.sendFile` instead
+ * support mounted app as any argument to `app.use()`
+ * deps: qs@1.0.2
+ - Complete rewrite
+ - Limits array length to 20
+ - Limits object depth to 5
+ - Limits parameters to 1,000
+ * deps: send@0.8.1
+ - Add `extensions` option
+ * deps: serve-static@~1.5.0
+ - Add `extensions` option
+ - deps: send@0.8.1
+
+4.7.4 / 2014-08-04
+==================
+
+ * fix `res.sendfile` regression for serving directory index files
+ * deps: send@0.7.4
+ - Fix incorrect 403 on Windows and Node.js 0.11
+ - Fix serving index files without root dir
+ * deps: serve-static@~1.4.4
+ - deps: send@0.7.4
+
+4.7.3 / 2014-08-04
+==================
+
+ * deps: send@0.7.3
+ - Fix incorrect 403 on Windows and Node.js 0.11
+ * deps: serve-static@~1.4.3
+ - Fix incorrect 403 on Windows and Node.js 0.11
+ - deps: send@0.7.3
+
+4.7.2 / 2014-07-27
+==================
+
+ * deps: depd@0.4.4
+ - Work-around v8 generating empty stack traces
+ * deps: send@0.7.2
+ - deps: depd@0.4.4
+ * deps: serve-static@~1.4.2
+
+4.7.1 / 2014-07-26
+==================
+
+ * deps: depd@0.4.3
+ - Fix exception when global `Error.stackTraceLimit` is too low
+ * deps: send@0.7.1
+ - deps: depd@0.4.3
+ * deps: serve-static@~1.4.1
+
+4.7.0 / 2014-07-25
+==================
+
+ * fix `req.protocol` for proxy-direct connections
+ * configurable query parser with `app.set('query parser', parser)`
+ - `app.set('query parser', 'extended')` parse with "qs" module
+ - `app.set('query parser', 'simple')` parse with "querystring" core module
+ - `app.set('query parser', false)` disable query string parsing
+ - `app.set('query parser', true)` enable simple parsing
+ * deprecate `res.json(status, obj)` -- use `res.status(status).json(obj)` instead
+ * deprecate `res.jsonp(status, obj)` -- use `res.status(status).jsonp(obj)` instead
+ * deprecate `res.send(status, body)` -- use `res.status(status).send(body)` instead
+ * deps: debug@1.0.4
+ * deps: depd@0.4.2
+ - Add `TRACE_DEPRECATION` environment variable
+ - Remove non-standard grey color from color output
+ - Support `--no-deprecation` argument
+ - Support `--trace-deprecation` argument
+ * deps: finalhandler@0.1.0
+ - Respond after request fully read
+ - deps: debug@1.0.4
+ * deps: parseurl@~1.2.0
+ - Cache URLs based on original value
+ - Remove no-longer-needed URL mis-parse work-around
+ - Simplify the "fast-path" `RegExp`
+ * deps: send@0.7.0
+ - Add `dotfiles` option
+ - Cap `maxAge` value to 1 year
+ - deps: debug@1.0.4
+ - deps: depd@0.4.2
+ * deps: serve-static@~1.4.0
+ - deps: parseurl@~1.2.0
+ - deps: send@0.7.0
+ * perf: prevent multiple `Buffer` creation in `res.send`
+
+4.6.1 / 2014-07-12
+==================
+
+ * fix `subapp.mountpath` regression for `app.use(subapp)`
+
+4.6.0 / 2014-07-11
+==================
+
+ * accept multiple callbacks to `app.use()`
+ * add explicit "Rosetta Flash JSONP abuse" protection
+ - previous versions are not vulnerable; this is just explicit protection
+ * catch errors in multiple `req.param(name, fn)` handlers
+ * deprecate `res.redirect(url, status)` -- use `res.redirect(status, url)` instead
+ * fix `res.send(status, num)` to send `num` as json (not error)
+ * remove unnecessary escaping when `res.jsonp` returns JSON response
+ * support non-string `path` in `app.use(path, fn)`
+ - supports array of paths
+ - supports `RegExp`
+ * router: fix optimization on router exit
+ * router: refactor location of `try` blocks
+ * router: speed up standard `app.use(fn)`
+ * deps: debug@1.0.3
+ - Add support for multiple wildcards in namespaces
+ * deps: finalhandler@0.0.3
+ - deps: debug@1.0.3
+ * deps: methods@1.1.0
+ - add `CONNECT`
+ * deps: parseurl@~1.1.3
+ - faster parsing of href-only URLs
+ * deps: path-to-regexp@0.1.3
+ * deps: send@0.6.0
+ - deps: debug@1.0.3
+ * deps: serve-static@~1.3.2
+ - deps: parseurl@~1.1.3
+ - deps: send@0.6.0
+ * perf: fix arguments reassign deopt in some `res` methods
+
+4.5.1 / 2014-07-06
+==================
+
+ * fix routing regression when altering `req.method`
+
+4.5.0 / 2014-07-04
+==================
+
+ * add deprecation message to non-plural `req.accepts*`
+ * add deprecation message to `res.send(body, status)`
+ * add deprecation message to `res.vary()`
+ * add `headers` option to `res.sendfile`
+ - use to set headers on successful file transfer
+ * add `mergeParams` option to `Router`
+ - merges `req.params` from parent routes
+ * add `req.hostname` -- correct name for what `req.host` returns
+ * deprecate things with `depd` module
+ * deprecate `req.host` -- use `req.hostname` instead
+ * fix behavior when handling request without routes
+ * fix handling when `route.all` is only route
+ * invoke `router.param()` only when route matches
+ * restore `req.params` after invoking router
+ * use `finalhandler` for final response handling
+ * use `media-typer` to alter content-type charset
+ * deps: accepts@~1.0.7
+ * deps: send@0.5.0
+ - Accept string for `maxage` (converted by `ms`)
+ - Include link in default redirect response
+ * deps: serve-static@~1.3.0
+ - Accept string for `maxAge` (converted by `ms`)
+ - Add `setHeaders` option
+ - Include HTML link in redirect response
+ - deps: send@0.5.0
+ * deps: type-is@~1.3.2
+
+4.4.5 / 2014-06-26
+==================
+
+ * deps: cookie-signature@1.0.4
+ - fix for timing attacks
+
+4.4.4 / 2014-06-20
+==================
+
+ * fix `res.attachment` Unicode filenames in Safari
+ * fix "trim prefix" debug message in `express:router`
+ * deps: accepts@~1.0.5
+ * deps: buffer-crc32@0.2.3
+
+4.4.3 / 2014-06-11
+==================
+
+ * fix persistence of modified `req.params[name]` from `app.param()`
+ * deps: accepts@1.0.3
+ - deps: negotiator@0.4.6
+ * deps: debug@1.0.2
+ * deps: send@0.4.3
+ - Do not throw un-catchable error on file open race condition
+ - Use `escape-html` for HTML escaping
+ - deps: debug@1.0.2
+ - deps: finished@1.2.2
+ - deps: fresh@0.2.2
+ * deps: serve-static@1.2.3
+ - Do not throw un-catchable error on file open race condition
+ - deps: send@0.4.3
+
+4.4.2 / 2014-06-09
+==================
+
+ * fix catching errors from top-level handlers
+ * use `vary` module for `res.vary`
+ * deps: debug@1.0.1
+ * deps: proxy-addr@1.0.1
+ * deps: send@0.4.2
+ - fix "event emitter leak" warnings
+ - deps: debug@1.0.1
+ - deps: finished@1.2.1
+ * deps: serve-static@1.2.2
+ - fix "event emitter leak" warnings
+ - deps: send@0.4.2
+ * deps: type-is@1.2.1
+
+4.4.1 / 2014-06-02
+==================
+
+ * deps: methods@1.0.1
+ * deps: send@0.4.1
+ - Send `max-age` in `Cache-Control` in correct format
+ * deps: serve-static@1.2.1
+ - use `escape-html` for escaping
+ - deps: send@0.4.1
+
+4.4.0 / 2014-05-30
+==================
+
+ * custom etag control with `app.set('etag', val)`
+ - `app.set('etag', function(body, encoding){ return '"etag"' })` custom etag generation
+ - `app.set('etag', 'weak')` weak tag
+ - `app.set('etag', 'strong')` strong etag
+ - `app.set('etag', false)` turn off
+ - `app.set('etag', true)` standard etag
+ * mark `res.send` ETag as weak and reduce collisions
+ * update accepts to 1.0.2
+ - Fix interpretation when header not in request
+ * update send to 0.4.0
+ - Calculate ETag with md5 for reduced collisions
+ - Ignore stream errors after request ends
+ - deps: debug@0.8.1
+ * update serve-static to 1.2.0
+ - Calculate ETag with md5 for reduced collisions
+ - Ignore stream errors after request ends
+ - deps: send@0.4.0
+
+4.3.2 / 2014-05-28
+==================
+
+ * fix handling of errors from `router.param()` callbacks
+
+4.3.1 / 2014-05-23
+==================
+
+ * revert "fix behavior of multiple `app.VERB` for the same path"
+ - this caused a regression in the order of route execution
+
+4.3.0 / 2014-05-21
+==================
+
+ * add `req.baseUrl` to access the path stripped from `req.url` in routes
+ * fix behavior of multiple `app.VERB` for the same path
+ * fix issue routing requests among sub routers
+ * invoke `router.param()` only when necessary instead of every match
+ * proper proxy trust with `app.set('trust proxy', trust)`
+ - `app.set('trust proxy', 1)` trust first hop
+ - `app.set('trust proxy', 'loopback')` trust loopback addresses
+ - `app.set('trust proxy', '10.0.0.1')` trust single IP
+ - `app.set('trust proxy', '10.0.0.1/16')` trust subnet
+ - `app.set('trust proxy', '10.0.0.1, 10.0.0.2')` trust list
+ - `app.set('trust proxy', false)` turn off
+ - `app.set('trust proxy', true)` trust everything
+ * set proper `charset` in `Content-Type` for `res.send`
+ * update type-is to 1.2.0
+ - support suffix matching
+
+4.2.0 / 2014-05-11
+==================
+
+ * deprecate `app.del()` -- use `app.delete()` instead
+ * deprecate `res.json(obj, status)` -- use `res.json(status, obj)` instead
+ - the edge-case `res.json(status, num)` requires `res.status(status).json(num)`
+ * deprecate `res.jsonp(obj, status)` -- use `res.jsonp(status, obj)` instead
+ - the edge-case `res.jsonp(status, num)` requires `res.status(status).jsonp(num)`
+ * fix `req.next` when inside router instance
+ * include `ETag` header in `HEAD` requests
+ * keep previous `Content-Type` for `res.jsonp`
+ * support PURGE method
+ - add `app.purge`
+ - add `router.purge`
+ - include PURGE in `app.all`
+ * update debug to 0.8.0
+ - add `enable()` method
+ - change from stderr to stdout
+ * update methods to 1.0.0
+ - add PURGE
+
+4.1.2 / 2014-05-08
+==================
+
+ * fix `req.host` for IPv6 literals
+ * fix `res.jsonp` error if callback param is object
+
+4.1.1 / 2014-04-27
+==================
+
+ * fix package.json to reflect supported node version
+
+4.1.0 / 2014-04-24
+==================
+
+ * pass options from `res.sendfile` to `send`
+ * preserve casing of headers in `res.header` and `res.set`
+ * support unicode file names in `res.attachment` and `res.download`
+ * update accepts to 1.0.1
+ - deps: negotiator@0.4.0
+ * update cookie to 0.1.2
+ - Fix for maxAge == 0
+ - made compat with expires field
+ * update send to 0.3.0
+ - Accept API options in options object
+ - Coerce option types
+ - Control whether to generate etags
+ - Default directory access to 403 when index disabled
+ - Fix sending files with dots without root set
+ - Include file path in etag
+ - Make "Can't set headers after they are sent." catchable
+ - Send full entity-body for multi range requests
+ - Set etags to "weak"
+ - Support "If-Range" header
+ - Support multiple index paths
+ - deps: mime@1.2.11
+ * update serve-static to 1.1.0
+ - Accept options directly to `send` module
+ - Resolve relative paths at middleware setup
+ - Use parseurl to parse the URL from request
+ - deps: send@0.3.0
+ * update type-is to 1.1.0
+ - add non-array values support
+ - add `multipart` as a shorthand
+
+4.0.0 / 2014-04-09
+==================
+
+ * remove:
+ - node 0.8 support
+ - connect and connect's patches except for charset handling
+ - express(1) - moved to [express-generator](https://github.com/expressjs/generator)
+ - `express.createServer()` - it has been deprecated for a long time. Use `express()`
+ - `app.configure` - use logic in your own app code
+ - `app.router` - is removed
+ - `req.auth` - use `basic-auth` instead
+ - `req.accepted*` - use `req.accepts*()` instead
+ - `res.location` - relative URL resolution is removed
+ - `res.charset` - include the charset in the content type when using `res.set()`
+ - all bundled middleware except `static`
+ * change:
+ - `app.route` -> `app.mountpath` when mounting an express app in another express app
+ - `json spaces` no longer enabled by default in development
+ - `req.accepts*` -> `req.accepts*s` - i.e. `req.acceptsEncoding` -> `req.acceptsEncodings`
+ - `req.params` is now an object instead of an array
+ - `res.locals` is no longer a function. It is a plain js object. Treat it as such.
+ - `res.headerSent` -> `res.headersSent` to match node.js ServerResponse object
+ * refactor:
+ - `req.accepts*` with [accepts](https://github.com/expressjs/accepts)
+ - `req.is` with [type-is](https://github.com/expressjs/type-is)
+ - [path-to-regexp](https://github.com/component/path-to-regexp)
+ * add:
+ - `app.router()` - returns the app Router instance
+ - `app.route()` - Proxy to the app's `Router#route()` method to create a new route
+ - Router & Route - public API
+
+3.19.2 / 2015-02-01
+===================
+
+ * deps: connect@2.28.3
+ - deps: compression@~1.3.1
+ - deps: csurf@~1.6.6
+ - deps: errorhandler@~1.3.3
+ - deps: express-session@~1.10.2
+ - deps: serve-index@~1.6.1
+ - deps: type-is@~1.5.6
+ * deps: proxy-addr@~1.0.6
+ - deps: ipaddr.js@0.1.8
+
+3.19.1 / 2015-01-20
+===================
+
+ * deps: connect@2.28.2
+ - deps: body-parser@~1.10.2
+ - deps: serve-static@~1.8.1
+ * deps: send@0.11.1
+ - Fix root path disclosure
+
+3.19.0 / 2015-01-09
+===================
+
+ * Fix `OPTIONS` responses to include the `HEAD` method property
+ * Use `readline` for prompt in `express(1)`
+ * deps: commander@2.6.0
+ * deps: connect@2.28.1
+ - deps: body-parser@~1.10.1
+ - deps: compression@~1.3.0
+ - deps: connect-timeout@~1.5.0
+ - deps: csurf@~1.6.4
+ - deps: debug@~2.1.1
+ - deps: errorhandler@~1.3.2
+ - deps: express-session@~1.10.1
+ - deps: finalhandler@0.3.3
+ - deps: method-override@~2.3.1
+ - deps: morgan@~1.5.1
+ - deps: serve-favicon@~2.2.0
+ - deps: serve-index@~1.6.0
+ - deps: serve-static@~1.8.0
+ - deps: type-is@~1.5.5
+ * deps: debug@~2.1.1
+ * deps: methods@~1.1.1
+ * deps: proxy-addr@~1.0.5
+ - deps: ipaddr.js@0.1.6
+ * deps: send@0.11.0
+ - deps: debug@~2.1.1
+ - deps: etag@~1.5.1
+ - deps: ms@0.7.0
+ - deps: on-finished@~2.2.0
+
+3.18.6 / 2014-12-12
+===================
+
+ * Fix exception in `req.fresh`/`req.stale` without response headers
+
+3.18.5 / 2014-12-11
+===================
+
+ * deps: connect@2.27.6
+ - deps: compression@~1.2.2
+ - deps: express-session@~1.9.3
+ - deps: http-errors@~1.2.8
+ - deps: serve-index@~1.5.3
+ - deps: type-is@~1.5.4
+
+3.18.4 / 2014-11-23
+===================
+
+ * deps: connect@2.27.4
+ - deps: body-parser@~1.9.3
+ - deps: compression@~1.2.1
+ - deps: errorhandler@~1.2.3
+ - deps: express-session@~1.9.2
+ - deps: qs@2.3.3
+ - deps: serve-favicon@~2.1.7
+ - deps: serve-static@~1.5.1
+ - deps: type-is@~1.5.3
+ * deps: etag@~1.5.1
+ * deps: proxy-addr@~1.0.4
+ - deps: ipaddr.js@0.1.5
+
+3.18.3 / 2014-11-09
+===================
+
+ * deps: connect@2.27.3
+ - Correctly invoke async callback asynchronously
+ - deps: csurf@~1.6.3
+
+3.18.2 / 2014-10-28
+===================
+
+ * deps: connect@2.27.2
+ - Fix handling of URLs containing `://` in the path
+ - deps: body-parser@~1.9.2
+ - deps: qs@2.3.2
+
+3.18.1 / 2014-10-22
+===================
+
+ * Fix internal `utils.merge` deprecation warnings
+ * deps: connect@2.27.1
+ - deps: body-parser@~1.9.1
+ - deps: express-session@~1.9.1
+ - deps: finalhandler@0.3.2
+ - deps: morgan@~1.4.1
+ - deps: qs@2.3.0
+ - deps: serve-static@~1.7.1
+ * deps: send@0.10.1
+ - deps: on-finished@~2.1.1
+
+3.18.0 / 2014-10-17
+===================
+
+ * Use `content-disposition` module for `res.attachment`/`res.download`
+ - Sends standards-compliant `Content-Disposition` header
+ - Full Unicode support
+ * Use `etag` module to generate `ETag` headers
+ * deps: connect@2.27.0
+ - Use `http-errors` module for creating errors
+ - Use `utils-merge` module for merging objects
+ - deps: body-parser@~1.9.0
+ - deps: compression@~1.2.0
+ - deps: connect-timeout@~1.4.0
+ - deps: debug@~2.1.0
+ - deps: depd@~1.0.0
+ - deps: express-session@~1.9.0
+ - deps: finalhandler@0.3.1
+ - deps: method-override@~2.3.0
+ - deps: morgan@~1.4.0
+ - deps: response-time@~2.2.0
+ - deps: serve-favicon@~2.1.6
+ - deps: serve-index@~1.5.0
+ - deps: serve-static@~1.7.0
+ * deps: debug@~2.1.0
+ - Implement `DEBUG_FD` env variable support
+ * deps: depd@~1.0.0
+ * deps: send@0.10.0
+ - deps: debug@~2.1.0
+ - deps: depd@~1.0.0
+ - deps: etag@~1.5.0
+
+3.17.8 / 2014-10-15
+===================
+
+ * deps: connect@2.26.6
+ - deps: compression@~1.1.2
+ - deps: csurf@~1.6.2
+ - deps: errorhandler@~1.2.2
+
+3.17.7 / 2014-10-08
+===================
+
+ * deps: connect@2.26.5
+ - Fix accepting non-object arguments to `logger`
+ - deps: serve-static@~1.6.4
+
+3.17.6 / 2014-10-02
+===================
+
+ * deps: connect@2.26.4
+ - deps: morgan@~1.3.2
+ - deps: type-is@~1.5.2
+
+3.17.5 / 2014-09-24
+===================
+
+ * deps: connect@2.26.3
+ - deps: body-parser@~1.8.4
+ - deps: serve-favicon@~2.1.5
+ - deps: serve-static@~1.6.3
+ * deps: proxy-addr@~1.0.3
+ - Use `forwarded` npm module
+ * deps: send@0.9.3
+ - deps: etag@~1.4.0
+
+3.17.4 / 2014-09-19
+===================
+
+ * deps: connect@2.26.2
+ - deps: body-parser@~1.8.3
+ - deps: qs@2.2.4
+
+3.17.3 / 2014-09-18
+===================
+
+ * deps: proxy-addr@~1.0.2
+ - Fix a global leak when multiple subnets are trusted
+ - deps: ipaddr.js@0.1.3
+
+3.17.2 / 2014-09-15
+===================
+
+ * Use `crc` instead of `buffer-crc32` for speed
+ * deps: connect@2.26.1
+ - deps: body-parser@~1.8.2
+ - deps: depd@0.4.5
+ - deps: express-session@~1.8.2
+ - deps: morgan@~1.3.1
+ - deps: serve-favicon@~2.1.3
+ - deps: serve-static@~1.6.2
+ * deps: depd@0.4.5
+ * deps: send@0.9.2
+ - deps: depd@0.4.5
+ - deps: etag@~1.3.1
+ - deps: range-parser@~1.0.2
+
+3.17.1 / 2014-09-08
+===================
+
+ * Fix error in `req.subdomains` on empty host
+
+3.17.0 / 2014-09-08
+===================
+
+ * Support `X-Forwarded-Host` in `req.subdomains`
+ * Support IP address host in `req.subdomains`
+ * deps: connect@2.26.0
+ - deps: body-parser@~1.8.1
+ - deps: compression@~1.1.0
+ - deps: connect-timeout@~1.3.0
+ - deps: cookie-parser@~1.3.3
+ - deps: cookie-signature@1.0.5
+ - deps: csurf@~1.6.1
+ - deps: debug@~2.0.0
+ - deps: errorhandler@~1.2.0
+ - deps: express-session@~1.8.1
+ - deps: finalhandler@0.2.0
+ - deps: fresh@0.2.4
+ - deps: media-typer@0.3.0
+ - deps: method-override@~2.2.0
+ - deps: morgan@~1.3.0
+ - deps: qs@2.2.3
+ - deps: serve-favicon@~2.1.3
+ - deps: serve-index@~1.2.1
+ - deps: serve-static@~1.6.1
+ - deps: type-is@~1.5.1
+ - deps: vhost@~3.0.0
+ * deps: cookie-signature@1.0.5
+ * deps: debug@~2.0.0
+ * deps: fresh@0.2.4
+ * deps: media-typer@0.3.0
+ - Throw error when parameter format invalid on parse
+ * deps: range-parser@~1.0.2
+ * deps: send@0.9.1
+ - Add `lastModified` option
+ - Use `etag` to generate `ETag` header
+ - deps: debug@~2.0.0
+ - deps: fresh@0.2.4
+ * deps: vary@~1.0.0
+ - Accept valid `Vary` header string as `field`
+
+3.16.10 / 2014-09-04
+====================
+
+ * deps: connect@2.25.10
+ - deps: serve-static@~1.5.4
+ * deps: send@0.8.5
+ - Fix a path traversal issue when using `root`
+ - Fix malicious path detection for empty string path
+
+3.16.9 / 2014-08-29
+===================
+
+ * deps: connect@2.25.9
+ - deps: body-parser@~1.6.7
+ - deps: qs@2.2.2
+
+3.16.8 / 2014-08-27
+===================
+
+ * deps: connect@2.25.8
+ - deps: body-parser@~1.6.6
+ - deps: csurf@~1.4.1
+ - deps: qs@2.2.0
+
+3.16.7 / 2014-08-18
+===================
+
+ * deps: connect@2.25.7
+ - deps: body-parser@~1.6.5
+ - deps: express-session@~1.7.6
+ - deps: morgan@~1.2.3
+ - deps: serve-static@~1.5.3
+ * deps: send@0.8.3
+ - deps: destroy@1.0.3
+ - deps: on-finished@2.1.0
+
+3.16.6 / 2014-08-14
+===================
+
+ * deps: connect@2.25.6
+ - deps: body-parser@~1.6.4
+ - deps: qs@1.2.2
+ - deps: serve-static@~1.5.2
+ * deps: send@0.8.2
+ - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream`
+
+3.16.5 / 2014-08-11
+===================
+
+ * deps: connect@2.25.5
+ - Fix backwards compatibility in `logger`
+
+3.16.4 / 2014-08-10
+===================
+
+ * Fix original URL parsing in `res.location`
+ * deps: connect@2.25.4
+ - Fix `query` middleware breaking with argument
+ - deps: body-parser@~1.6.3
+ - deps: compression@~1.0.11
+ - deps: connect-timeout@~1.2.2
+ - deps: express-session@~1.7.5
+ - deps: method-override@~2.1.3
+ - deps: on-headers@~1.0.0
+ - deps: parseurl@~1.3.0
+ - deps: qs@1.2.1
+ - deps: response-time@~2.0.1
+ - deps: serve-index@~1.1.6
+ - deps: serve-static@~1.5.1
+ * deps: parseurl@~1.3.0
+
+3.16.3 / 2014-08-07
+===================
+
+ * deps: connect@2.25.3
+ - deps: multiparty@3.3.2
+
+3.16.2 / 2014-08-07
+===================
+
+ * deps: connect@2.25.2
+ - deps: body-parser@~1.6.2
+ - deps: qs@1.2.0
+
+3.16.1 / 2014-08-06
+===================
+
+ * deps: connect@2.25.1
+ - deps: body-parser@~1.6.1
+ - deps: qs@1.1.0
+
+3.16.0 / 2014-08-05
+===================
+
+ * deps: connect@2.25.0
+ - deps: body-parser@~1.6.0
+ - deps: compression@~1.0.10
+ - deps: csurf@~1.4.0
+ - deps: express-session@~1.7.4
+ - deps: qs@1.0.2
+ - deps: serve-static@~1.5.0
+ * deps: send@0.8.1
+ - Add `extensions` option
+
+3.15.3 / 2014-08-04
+===================
+
+ * fix `res.sendfile` regression for serving directory index files
+ * deps: connect@2.24.3
+ - deps: serve-index@~1.1.5
+ - deps: serve-static@~1.4.4
+ * deps: send@0.7.4
+ - Fix incorrect 403 on Windows and Node.js 0.11
+ - Fix serving index files without root dir
+
+3.15.2 / 2014-07-27
+===================
+
+ * deps: connect@2.24.2
+ - deps: body-parser@~1.5.2
+ - deps: depd@0.4.4
+ - deps: express-session@~1.7.2
+ - deps: morgan@~1.2.2
+ - deps: serve-static@~1.4.2
+ * deps: depd@0.4.4
+ - Work-around v8 generating empty stack traces
+ * deps: send@0.7.2
+ - deps: depd@0.4.4
+
+3.15.1 / 2014-07-26
+===================
+
+ * deps: connect@2.24.1
+ - deps: body-parser@~1.5.1
+ - deps: depd@0.4.3
+ - deps: express-session@~1.7.1
+ - deps: morgan@~1.2.1
+ - deps: serve-index@~1.1.4
+ - deps: serve-static@~1.4.1
+ * deps: depd@0.4.3
+ - Fix exception when global `Error.stackTraceLimit` is too low
+ * deps: send@0.7.1
+ - deps: depd@0.4.3
+
+3.15.0 / 2014-07-22
+===================
+
+ * Fix `req.protocol` for proxy-direct connections
+ * Pass options from `res.sendfile` to `send`
+ * deps: connect@2.24.0
+ - deps: body-parser@~1.5.0
+ - deps: compression@~1.0.9
+ - deps: connect-timeout@~1.2.1
+ - deps: debug@1.0.4
+ - deps: depd@0.4.2
+ - deps: express-session@~1.7.0
+ - deps: finalhandler@0.1.0
+ - deps: method-override@~2.1.2
+ - deps: morgan@~1.2.0
+ - deps: multiparty@3.3.1
+ - deps: parseurl@~1.2.0
+ - deps: serve-static@~1.4.0
+ * deps: debug@1.0.4
+ * deps: depd@0.4.2
+ - Add `TRACE_DEPRECATION` environment variable
+ - Remove non-standard grey color from color output
+ - Support `--no-deprecation` argument
+ - Support `--trace-deprecation` argument
+ * deps: parseurl@~1.2.0
+ - Cache URLs based on original value
+ - Remove no-longer-needed URL mis-parse work-around
+ - Simplify the "fast-path" `RegExp`
+ * deps: send@0.7.0
+ - Add `dotfiles` option
+ - Cap `maxAge` value to 1 year
+ - deps: debug@1.0.4
+ - deps: depd@0.4.2
+
+3.14.0 / 2014-07-11
+===================
+
+ * add explicit "Rosetta Flash JSONP abuse" protection
+ - previous versions are not vulnerable; this is just explicit protection
+ * deprecate `res.redirect(url, status)` -- use `res.redirect(status, url)` instead
+ * fix `res.send(status, num)` to send `num` as json (not error)
+ * remove unnecessary escaping when `res.jsonp` returns JSON response
+ * deps: basic-auth@1.0.0
+ - support empty password
+ - support empty username
+ * deps: connect@2.23.0
+ - deps: debug@1.0.3
+ - deps: express-session@~1.6.4
+ - deps: method-override@~2.1.0
+ - deps: parseurl@~1.1.3
+ - deps: serve-static@~1.3.1
+ * deps: debug@1.0.3
+ - Add support for multiple wildcards in namespaces
+ * deps: methods@1.1.0
+ - add `CONNECT`
+ * deps: parseurl@~1.1.3
+ - faster parsing of href-only URLs
+
+3.13.0 / 2014-07-03
+===================
+
+ * add deprecation message to `app.configure`
+ * add deprecation message to `req.auth`
+ * use `basic-auth` to parse `Authorization` header
+ * deps: connect@2.22.0
+ - deps: csurf@~1.3.0
+ - deps: express-session@~1.6.1
+ - deps: multiparty@3.3.0
+ - deps: serve-static@~1.3.0
+ * deps: send@0.5.0
+ - Accept string for `maxage` (converted by `ms`)
+ - Include link in default redirect response
+
+3.12.1 / 2014-06-26
+===================
+
+ * deps: connect@2.21.1
+ - deps: cookie-parser@1.3.2
+ - deps: cookie-signature@1.0.4
+ - deps: express-session@~1.5.2
+ - deps: type-is@~1.3.2
+ * deps: cookie-signature@1.0.4
+ - fix for timing attacks
+
+3.12.0 / 2014-06-21
+===================
+
+ * use `media-typer` to alter content-type charset
+ * deps: connect@2.21.0
+ - deprecate `connect(middleware)` -- use `app.use(middleware)` instead
+ - deprecate `connect.createServer()` -- use `connect()` instead
+ - fix `res.setHeader()` patch to work with with get -> append -> set pattern
+ - deps: compression@~1.0.8
+ - deps: errorhandler@~1.1.1
+ - deps: express-session@~1.5.0
+ - deps: serve-index@~1.1.3
+
+3.11.0 / 2014-06-19
+===================
+
+ * deprecate things with `depd` module
+ * deps: buffer-crc32@0.2.3
+ * deps: connect@2.20.2
+ - deprecate `verify` option to `json` -- use `body-parser` npm module instead
+ - deprecate `verify` option to `urlencoded` -- use `body-parser` npm module instead
+ - deprecate things with `depd` module
+ - use `finalhandler` for final response handling
+ - use `media-typer` to parse `content-type` for charset
+ - deps: body-parser@1.4.3
+ - deps: connect-timeout@1.1.1
+ - deps: cookie-parser@1.3.1
+ - deps: csurf@1.2.2
+ - deps: errorhandler@1.1.0
+ - deps: express-session@1.4.0
+ - deps: multiparty@3.2.9
+ - deps: serve-index@1.1.2
+ - deps: type-is@1.3.1
+ - deps: vhost@2.0.0
+
+3.10.5 / 2014-06-11
+===================
+
+ * deps: connect@2.19.6
+ - deps: body-parser@1.3.1
+ - deps: compression@1.0.7
+ - deps: debug@1.0.2
+ - deps: serve-index@1.1.1
+ - deps: serve-static@1.2.3
+ * deps: debug@1.0.2
+ * deps: send@0.4.3
+ - Do not throw un-catchable error on file open race condition
+ - Use `escape-html` for HTML escaping
+ - deps: debug@1.0.2
+ - deps: finished@1.2.2
+ - deps: fresh@0.2.2
+
+3.10.4 / 2014-06-09
+===================
+
+ * deps: connect@2.19.5
+ - fix "event emitter leak" warnings
+ - deps: csurf@1.2.1
+ - deps: debug@1.0.1
+ - deps: serve-static@1.2.2
+ - deps: type-is@1.2.1
+ * deps: debug@1.0.1
+ * deps: send@0.4.2
+ - fix "event emitter leak" warnings
+ - deps: finished@1.2.1
+ - deps: debug@1.0.1
+
+3.10.3 / 2014-06-05
+===================
+
+ * use `vary` module for `res.vary`
+ * deps: connect@2.19.4
+ - deps: errorhandler@1.0.2
+ - deps: method-override@2.0.2
+ - deps: serve-favicon@2.0.1
+ * deps: debug@1.0.0
+
+3.10.2 / 2014-06-03
+===================
+
+ * deps: connect@2.19.3
+ - deps: compression@1.0.6
+
+3.10.1 / 2014-06-03
+===================
+
+ * deps: connect@2.19.2
+ - deps: compression@1.0.4
+ * deps: proxy-addr@1.0.1
+
+3.10.0 / 2014-06-02
+===================
+
+ * deps: connect@2.19.1
+ - deprecate `methodOverride()` -- use `method-override` npm module instead
+ - deps: body-parser@1.3.0
+ - deps: method-override@2.0.1
+ - deps: multiparty@3.2.8
+ - deps: response-time@2.0.0
+ - deps: serve-static@1.2.1
+ * deps: methods@1.0.1
+ * deps: send@0.4.1
+ - Send `max-age` in `Cache-Control` in correct format
+
+3.9.0 / 2014-05-30
+==================
+
+ * custom etag control with `app.set('etag', val)`
+ - `app.set('etag', function(body, encoding){ return '"etag"' })` custom etag generation
+ - `app.set('etag', 'weak')` weak tag
+ - `app.set('etag', 'strong')` strong etag
+ - `app.set('etag', false)` turn off
+ - `app.set('etag', true)` standard etag
+ * Include ETag in HEAD requests
+ * mark `res.send` ETag as weak and reduce collisions
+ * update connect to 2.18.0
+ - deps: compression@1.0.3
+ - deps: serve-index@1.1.0
+ - deps: serve-static@1.2.0
+ * update send to 0.4.0
+ - Calculate ETag with md5 for reduced collisions
+ - Ignore stream errors after request ends
+ - deps: debug@0.8.1
+
+3.8.1 / 2014-05-27
+==================
+
+ * update connect to 2.17.3
+ - deps: body-parser@1.2.2
+ - deps: express-session@1.2.1
+ - deps: method-override@1.0.2
+
+3.8.0 / 2014-05-21
+==================
+
+ * keep previous `Content-Type` for `res.jsonp`
+ * set proper `charset` in `Content-Type` for `res.send`
+ * update connect to 2.17.1
+ - fix `res.charset` appending charset when `content-type` has one
+ - deps: express-session@1.2.0
+ - deps: morgan@1.1.1
+ - deps: serve-index@1.0.3
+
+3.7.0 / 2014-05-18
+==================
+
+ * proper proxy trust with `app.set('trust proxy', trust)`
+ - `app.set('trust proxy', 1)` trust first hop
+ - `app.set('trust proxy', 'loopback')` trust loopback addresses
+ - `app.set('trust proxy', '10.0.0.1')` trust single IP
+ - `app.set('trust proxy', '10.0.0.1/16')` trust subnet
+ - `app.set('trust proxy', '10.0.0.1, 10.0.0.2')` trust list
+ - `app.set('trust proxy', false)` turn off
+ - `app.set('trust proxy', true)` trust everything
+ * update connect to 2.16.2
+ - deprecate `res.headerSent` -- use `res.headersSent`
+ - deprecate `res.on("header")` -- use on-headers module instead
+ - fix edge-case in `res.appendHeader` that would append in wrong order
+ - json: use body-parser
+ - urlencoded: use body-parser
+ - dep: bytes@1.0.0
+ - dep: cookie-parser@1.1.0
+ - dep: csurf@1.2.0
+ - dep: express-session@1.1.0
+ - dep: method-override@1.0.1
+
+3.6.0 / 2014-05-09
+==================
+
+ * deprecate `app.del()` -- use `app.delete()` instead
+ * deprecate `res.json(obj, status)` -- use `res.json(status, obj)` instead
+ - the edge-case `res.json(status, num)` requires `res.status(status).json(num)`
+ * deprecate `res.jsonp(obj, status)` -- use `res.jsonp(status, obj)` instead
+ - the edge-case `res.jsonp(status, num)` requires `res.status(status).jsonp(num)`
+ * support PURGE method
+ - add `app.purge`
+ - add `router.purge`
+ - include PURGE in `app.all`
+ * update connect to 2.15.0
+ * Add `res.appendHeader`
+ * Call error stack even when response has been sent
+ * Patch `res.headerSent` to return Boolean
+ * Patch `res.headersSent` for node.js 0.8
+ * Prevent default 404 handler after response sent
+ * dep: compression@1.0.2
+ * dep: connect-timeout@1.1.0
+ * dep: debug@^0.8.0
+ * dep: errorhandler@1.0.1
+ * dep: express-session@1.0.4
+ * dep: morgan@1.0.1
+ * dep: serve-favicon@2.0.0
+ * dep: serve-index@1.0.2
+ * update debug to 0.8.0
+ * add `enable()` method
+ * change from stderr to stdout
+ * update methods to 1.0.0
+ - add PURGE
+ * update mkdirp to 0.5.0
+
+3.5.3 / 2014-05-08
+==================
+
+ * fix `req.host` for IPv6 literals
+ * fix `res.jsonp` error if callback param is object
+
+3.5.2 / 2014-04-24
+==================
+
+ * update connect to 2.14.5
+ * update cookie to 0.1.2
+ * update mkdirp to 0.4.0
+ * update send to 0.3.0
+
+3.5.1 / 2014-03-25
+==================
+
+ * pin less-middleware in generated app
+
+3.5.0 / 2014-03-06
+==================
+
+ * bump deps
+
+3.4.8 / 2014-01-13
+==================
+
+ * prevent incorrect automatic OPTIONS responses #1868 @dpatti
+ * update binary and examples for jade 1.0 #1876 @yossi, #1877 @reqshark, #1892 @matheusazzi
+ * throw 400 in case of malformed paths @rlidwka
+
+3.4.7 / 2013-12-10
+==================
+
+ * update connect
+
+3.4.6 / 2013-12-01
+==================
+
+ * update connect (raw-body)
+
+3.4.5 / 2013-11-27
+==================
+
+ * update connect
+ * res.location: remove leading ./ #1802 @kapouer
+ * res.redirect: fix `res.redirect('toString') #1829 @michaelficarra
+ * res.send: always send ETag when content-length > 0
+ * router: add Router.all() method
+
+3.4.4 / 2013-10-29
+==================
+
+ * update connect
+ * update supertest
+ * update methods
+ * express(1): replace bodyParser() with urlencoded() and json() #1795 @chirag04
+
+3.4.3 / 2013-10-23
+==================
+
+ * update connect
+
+3.4.2 / 2013-10-18
+==================
+
+ * update connect
+ * downgrade commander
+
+3.4.1 / 2013-10-15
+==================
+
+ * update connect
+ * update commander
+ * jsonp: check if callback is a function
+ * router: wrap encodeURIComponent in a try/catch #1735 (@lxe)
+ * res.format: now includes chraset @1747 (@sorribas)
+ * res.links: allow multiple calls @1746 (@sorribas)
+
+3.4.0 / 2013-09-07
+==================
+
+ * add res.vary(). Closes #1682
+ * update connect
+
+3.3.8 / 2013-09-02
+==================
+
+ * update connect
+
+3.3.7 / 2013-08-28
+==================
+
+ * update connect
+
+3.3.6 / 2013-08-27
+==================
+
+ * Revert "remove charset from json responses. Closes #1631" (causes issues in some clients)
+ * add: req.accepts take an argument list
+
+3.3.4 / 2013-07-08
+==================
+
+ * update send and connect
+
+3.3.3 / 2013-07-04
+==================
+
+ * update connect
+
+3.3.2 / 2013-07-03
+==================
+
+ * update connect
+ * update send
+ * remove .version export
+
+3.3.1 / 2013-06-27
+==================
+
+ * update connect
+
+3.3.0 / 2013-06-26
+==================
+
+ * update connect
+ * add support for multiple X-Forwarded-Proto values. Closes #1646
+ * change: remove charset from json responses. Closes #1631
+ * change: return actual booleans from req.accept* functions
+ * fix jsonp callback array throw
+
+3.2.6 / 2013-06-02
+==================
+
+ * update connect
+
+3.2.5 / 2013-05-21
+==================
+
+ * update connect
+ * update node-cookie
+ * add: throw a meaningful error when there is no default engine
+ * change generation of ETags with res.send() to GET requests only. Closes #1619
+
+3.2.4 / 2013-05-09
+==================
+
+ * fix `req.subdomains` when no Host is present
+ * fix `req.host` when no Host is present, return undefined
+
+3.2.3 / 2013-05-07
+==================
+
+ * update connect / qs
+
+3.2.2 / 2013-05-03
+==================
+
+ * update qs
+
+3.2.1 / 2013-04-29
+==================
+
+ * add app.VERB() paths array deprecation warning
+ * update connect
+ * update qs and remove all ~ semver crap
+ * fix: accept number as value of Signed Cookie
+
+3.2.0 / 2013-04-15
+==================
+
+ * add "view" constructor setting to override view behaviour
+ * add req.acceptsEncoding(name)
+ * add req.acceptedEncodings
+ * revert cookie signature change causing session race conditions
+ * fix sorting of Accept values of the same quality
+
+3.1.2 / 2013-04-12
+==================
+
+ * add support for custom Accept parameters
+ * update cookie-signature
+
+3.1.1 / 2013-04-01
+==================
+
+ * add X-Forwarded-Host support to `req.host`
+ * fix relative redirects
+ * update mkdirp
+ * update buffer-crc32
+ * remove legacy app.configure() method from app template.
+
+3.1.0 / 2013-01-25
+==================
+
+ * add support for leading "." in "view engine" setting
+ * add array support to `res.set()`
+ * add node 0.8.x to travis.yml
+ * add "subdomain offset" setting for tweaking `req.subdomains`
+ * add `res.location(url)` implementing `res.redirect()`-like setting of Location
+ * use app.get() for x-powered-by setting for inheritance
+ * fix colons in passwords for `req.auth`
+
+3.0.6 / 2013-01-04
+==================
+
+ * add http verb methods to Router
+ * update connect
+ * fix mangling of the `res.cookie()` options object
+ * fix jsonp whitespace escape. Closes #1132
+
+3.0.5 / 2012-12-19
+==================
+
+ * add throwing when a non-function is passed to a route
+ * fix: explicitly remove Transfer-Encoding header from 204 and 304 responses
+ * revert "add 'etag' option"
+
+3.0.4 / 2012-12-05
+==================
+
+ * add 'etag' option to disable `res.send()` Etags
+ * add escaping of urls in text/plain in `res.redirect()`
+ for old browsers interpreting as html
+ * change crc32 module for a more liberal license
+ * update connect
+
+3.0.3 / 2012-11-13
+==================
+
+ * update connect
+ * update cookie module
+ * fix cookie max-age
+
+3.0.2 / 2012-11-08
+==================
+
+ * add OPTIONS to cors example. Closes #1398
+ * fix route chaining regression. Closes #1397
+
+3.0.1 / 2012-11-01
+==================
+
+ * update connect
+
+3.0.0 / 2012-10-23
+==================
+
+ * add `make clean`
+ * add "Basic" check to req.auth
+ * add `req.auth` test coverage
+ * add cb && cb(payload) to `res.jsonp()`. Closes #1374
+ * add backwards compat for `res.redirect()` status. Closes #1336
+ * add support for `res.json()` to retain previously defined Content-Types. Closes #1349
+ * update connect
+ * change `res.redirect()` to utilize a pathname-relative Location again. Closes #1382
+ * remove non-primitive string support for `res.send()`
+ * fix view-locals example. Closes #1370
+ * fix route-separation example
+
+3.0.0rc5 / 2012-09-18
+==================
+
+ * update connect
+ * add redis search example
+ * add static-files example
+ * add "x-powered-by" setting (`app.disable('x-powered-by')`)
+ * add "application/octet-stream" redirect Accept test case. Closes #1317
+
+3.0.0rc4 / 2012-08-30
+==================
+
+ * add `res.jsonp()`. Closes #1307
+ * add "verbose errors" option to error-pages example
+ * add another route example to express(1) so people are not so confused
+ * add redis online user activity tracking example
+ * update connect dep
+ * fix etag quoting. Closes #1310
+ * fix error-pages 404 status
+ * fix jsonp callback char restrictions
+ * remove old OPTIONS default response
+
+3.0.0rc3 / 2012-08-13
+==================
+
+ * update connect dep
+ * fix signed cookies to work with `connect.cookieParser()` ("s:" prefix was missing) [tnydwrds]
+ * fix `res.render()` clobbering of "locals"
+
+3.0.0rc2 / 2012-08-03
+==================
+
+ * add CORS example
+ * update connect dep
+ * deprecate `.createServer()` & remove old stale examples
+ * fix: escape `res.redirect()` link
+ * fix vhost example
+
+3.0.0rc1 / 2012-07-24
+==================
+
+ * add more examples to view-locals
+ * add scheme-relative redirects (`res.redirect("//foo.com")`) support
+ * update cookie dep
+ * update connect dep
+ * update send dep
+ * fix `express(1)` -h flag, use -H for hogan. Closes #1245
+ * fix `res.sendfile()` socket error handling regression
+
+3.0.0beta7 / 2012-07-16
+==================
+
+ * update connect dep for `send()` root normalization regression
+
+3.0.0beta6 / 2012-07-13
+==================
+
+ * add `err.view` property for view errors. Closes #1226
+ * add "jsonp callback name" setting
+ * add support for "/foo/:bar*" non-greedy matches
+ * change `res.sendfile()` to use `send()` module
+ * change `res.send` to use "response-send" module
+ * remove `app.locals.use` and `res.locals.use`, use regular middleware
+
+3.0.0beta5 / 2012-07-03
+==================
+
+ * add "make check" support
+ * add route-map example
+ * add `res.json(obj, status)` support back for BC
+ * add "methods" dep, remove internal methods module
+ * update connect dep
+ * update auth example to utilize cores pbkdf2
+ * updated tests to use "supertest"
+
+3.0.0beta4 / 2012-06-25
+==================
+
+ * Added `req.auth`
+ * Added `req.range(size)`
+ * Added `res.links(obj)`
+ * Added `res.send(body, status)` support back for backwards compat
+ * Added `.default()` support to `res.format()`
+ * Added 2xx / 304 check to `req.fresh`
+ * Revert "Added + support to the router"
+ * Fixed `res.send()` freshness check, respect res.statusCode
+
+3.0.0beta3 / 2012-06-15
+==================
+
+ * Added hogan `--hjs` to express(1) [nullfirm]
+ * Added another example to content-negotiation
+ * Added `fresh` dep
+ * Changed: `res.send()` always checks freshness
+ * Fixed: expose connects mime module. Cloases #1165
+
+3.0.0beta2 / 2012-06-06
+==================
+
+ * Added `+` support to the router
+ * Added `req.host`
+ * Changed `req.param()` to check route first
+ * Update connect dep
+
+3.0.0beta1 / 2012-06-01
+==================
+
+ * Added `res.format()` callback to override default 406 behaviour
+ * Fixed `res.redirect()` 406. Closes #1154
+
+3.0.0alpha5 / 2012-05-30
+==================
+
+ * Added `req.ip`
+ * Added `{ signed: true }` option to `res.cookie()`
+ * Removed `res.signedCookie()`
+ * Changed: dont reverse `req.ips`
+ * Fixed "trust proxy" setting check for `req.ips`
+
+3.0.0alpha4 / 2012-05-09
+==================
+
+ * Added: allow `[]` in jsonp callback. Closes #1128
+ * Added `PORT` env var support in generated template. Closes #1118 [benatkin]
+ * Updated: connect 2.2.2
+
+3.0.0alpha3 / 2012-05-04
+==================
+
+ * Added public `app.routes`. Closes #887
+ * Added _view-locals_ example
+ * Added _mvc_ example
+ * Added `res.locals.use()`. Closes #1120
+ * Added conditional-GET support to `res.send()`
+ * Added: coerce `res.set()` values to strings
+ * Changed: moved `static()` in generated apps below router
+ * Changed: `res.send()` only set ETag when not previously set
+ * Changed connect 2.2.1 dep
+ * Changed: `make test` now runs unit / acceptance tests
+ * Fixed req/res proto inheritance
+
+3.0.0alpha2 / 2012-04-26
+==================
+
+ * Added `make benchmark` back
+ * Added `res.send()` support for `String` objects
+ * Added client-side data exposing example
+ * Added `res.header()` and `req.header()` aliases for BC
+ * Added `express.createServer()` for BC
+ * Perf: memoize parsed urls
+ * Perf: connect 2.2.0 dep
+ * Changed: make `expressInit()` middleware self-aware
+ * Fixed: use app.get() for all core settings
+ * Fixed redis session example
+ * Fixed session example. Closes #1105
+ * Fixed generated express dep. Closes #1078
+
+3.0.0alpha1 / 2012-04-15
+==================
+
+ * Added `app.locals.use(callback)`
+ * Added `app.locals` object
+ * Added `app.locals(obj)`
+ * Added `res.locals` object
+ * Added `res.locals(obj)`
+ * Added `res.format()` for content-negotiation
+ * Added `app.engine()`
+ * Added `res.cookie()` JSON cookie support
+ * Added "trust proxy" setting
+ * Added `req.subdomains`
+ * Added `req.protocol`
+ * Added `req.secure`
+ * Added `req.path`
+ * Added `req.ips`
+ * Added `req.fresh`
+ * Added `req.stale`
+ * Added comma-delmited / array support for `req.accepts()`
+ * Added debug instrumentation
+ * Added `res.set(obj)`
+ * Added `res.set(field, value)`
+ * Added `res.get(field)`
+ * Added `app.get(setting)`. Closes #842
+ * Added `req.acceptsLanguage()`
+ * Added `req.acceptsCharset()`
+ * Added `req.accepted`
+ * Added `req.acceptedLanguages`
+ * Added `req.acceptedCharsets`
+ * Added "json replacer" setting
+ * Added "json spaces" setting
+ * Added X-Forwarded-Proto support to `res.redirect()`. Closes #92
+ * Added `--less` support to express(1)
+ * Added `express.response` prototype
+ * Added `express.request` prototype
+ * Added `express.application` prototype
+ * Added `app.path()`
+ * Added `app.render()`
+ * Added `res.type()` to replace `res.contentType()`
+ * Changed: `res.redirect()` to add relative support
+ * Changed: enable "jsonp callback" by default
+ * Changed: renamed "case sensitive routes" to "case sensitive routing"
+ * Rewrite of all tests with mocha
+ * Removed "root" setting
+ * Removed `res.redirect('home')` support
+ * Removed `req.notify()`
+ * Removed `app.register()`
+ * Removed `app.redirect()`
+ * Removed `app.is()`
+ * Removed `app.helpers()`
+ * Removed `app.dynamicHelpers()`
+ * Fixed `res.sendfile()` with non-GET. Closes #723
+ * Fixed express(1) public dir for windows. Closes #866
+
+2.5.9/ 2012-04-02
+==================
+
+ * Added support for PURGE request method [pbuyle]
+ * Fixed `express(1)` generated app `app.address()` before `listening` [mmalecki]
+
+2.5.8 / 2012-02-08
+==================
+
+ * Update mkdirp dep. Closes #991
+
+2.5.7 / 2012-02-06
+==================
+
+ * Fixed `app.all` duplicate DELETE requests [mscdex]
+
+2.5.6 / 2012-01-13
+==================
+
+ * Updated hamljs dev dep. Closes #953
+
+2.5.5 / 2012-01-08
+==================
+
+ * Fixed: set `filename` on cached templates [matthewleon]
+
+2.5.4 / 2012-01-02
+==================
+
+ * Fixed `express(1)` eol on 0.4.x. Closes #947
+
+2.5.3 / 2011-12-30
+==================
+
+ * Fixed `req.is()` when a charset is present
+
+2.5.2 / 2011-12-10
+==================
+
+ * Fixed: express(1) LF -> CRLF for windows
+
+2.5.1 / 2011-11-17
+==================
+
+ * Changed: updated connect to 1.8.x
+ * Removed sass.js support from express(1)
+
+2.5.0 / 2011-10-24
+==================
+
+ * Added ./routes dir for generated app by default
+ * Added npm install reminder to express(1) app gen
+ * Added 0.5.x support
+ * Removed `make test-cov` since it wont work with node 0.5.x
+ * Fixed express(1) public dir for windows. Closes #866
+
+2.4.7 / 2011-10-05
+==================
+
+ * Added mkdirp to express(1). Closes #795
+ * Added simple _json-config_ example
+ * Added shorthand for the parsed request's pathname via `req.path`
+ * Changed connect dep to 1.7.x to fix npm issue...
+ * Fixed `res.redirect()` __HEAD__ support. [reported by xerox]
+ * Fixed `req.flash()`, only escape args
+ * Fixed absolute path checking on windows. Closes #829 [reported by andrewpmckenzie]
+
+2.4.6 / 2011-08-22
+==================
+
+ * Fixed multiple param callback regression. Closes #824 [reported by TroyGoode]
+
+2.4.5 / 2011-08-19
+==================
+
+ * Added support for routes to handle errors. Closes #809
+ * Added `app.routes.all()`. Closes #803
+ * Added "basepath" setting to work in conjunction with reverse proxies etc.
+ * Refactored `Route` to use a single array of callbacks
+ * Added support for multiple callbacks for `app.param()`. Closes #801
+Closes #805
+ * Changed: removed .call(self) for route callbacks
+ * Dependency: `qs >= 0.3.1`
+ * Fixed `res.redirect()` on windows due to `join()` usage. Closes #808
+
+2.4.4 / 2011-08-05
+==================
+
+ * Fixed `res.header()` intention of a set, even when `undefined`
+ * Fixed `*`, value no longer required
+ * Fixed `res.send(204)` support. Closes #771
+
+2.4.3 / 2011-07-14
+==================
+
+ * Added docs for `status` option special-case. Closes #739
+ * Fixed `options.filename`, exposing the view path to template engines
+
+2.4.2. / 2011-07-06
+==================
+
+ * Revert "removed jsonp stripping" for XSS
+
+2.4.1 / 2011-07-06
+==================
+
+ * Added `res.json()` JSONP support. Closes #737
+ * Added _extending-templates_ example. Closes #730
+ * Added "strict routing" setting for trailing slashes
+ * Added support for multiple envs in `app.configure()` calls. Closes #735
+ * Changed: `res.send()` using `res.json()`
+ * Changed: when cookie `path === null` don't default it
+ * Changed; default cookie path to "home" setting. Closes #731
+ * Removed _pids/logs_ creation from express(1)
+
+2.4.0 / 2011-06-28
+==================
+
+ * Added chainable `res.status(code)`
+ * Added `res.json()`, an explicit version of `res.send(obj)`
+ * Added simple web-service example
+
+2.3.12 / 2011-06-22
+==================
+
+ * \#express is now on freenode! come join!
+ * Added `req.get(field, param)`
+ * Added links to Japanese documentation, thanks @hideyukisaito!
+ * Added; the `express(1)` generated app outputs the env
+ * Added `content-negotiation` example
+ * Dependency: connect >= 1.5.1 < 2.0.0
+ * Fixed view layout bug. Closes #720
+ * Fixed; ignore body on 304. Closes #701
+
+2.3.11 / 2011-06-04
+==================
+
+ * Added `npm test`
+ * Removed generation of dummy test file from `express(1)`
+ * Fixed; `express(1)` adds express as a dep
+ * Fixed; prune on `prepublish`
+
+2.3.10 / 2011-05-27
+==================
+
+ * Added `req.route`, exposing the current route
+ * Added _package.json_ generation support to `express(1)`
+ * Fixed call to `app.param()` function for optional params. Closes #682
+
+2.3.9 / 2011-05-25
+==================
+
+ * Fixed bug-ish with `../' in `res.partial()` calls
+
+2.3.8 / 2011-05-24
+==================
+
+ * Fixed `app.options()`
+
+2.3.7 / 2011-05-23
+==================
+
+ * Added route `Collection`, ex: `app.get('/user/:id').remove();`
+ * Added support for `app.param(fn)` to define param logic
+ * Removed `app.param()` support for callback with return value
+ * Removed module.parent check from express(1) generated app. Closes #670
+ * Refactored router. Closes #639
+
+2.3.6 / 2011-05-20
+==================
+
+ * Changed; using devDependencies instead of git submodules
+ * Fixed redis session example
+ * Fixed markdown example
+ * Fixed view caching, should not be enabled in development
+
+2.3.5 / 2011-05-20
+==================
+
+ * Added export `.view` as alias for `.View`
+
+2.3.4 / 2011-05-08
+==================
+
+ * Added `./examples/say`
+ * Fixed `res.sendfile()` bug preventing the transfer of files with spaces
+
+2.3.3 / 2011-05-03
+==================
+
+ * Added "case sensitive routes" option.
+ * Changed; split methods supported per rfc [slaskis]
+ * Fixed route-specific middleware when using the same callback function several times
+
+2.3.2 / 2011-04-27
+==================
+
+ * Fixed view hints
+
+2.3.1 / 2011-04-26
+==================
+
+ * Added `app.match()` as `app.match.all()`
+ * Added `app.lookup()` as `app.lookup.all()`
+ * Added `app.remove()` for `app.remove.all()`
+ * Added `app.remove.VERB()`
+ * Fixed template caching collision issue. Closes #644
+ * Moved router over from connect and started refactor
+
+2.3.0 / 2011-04-25
+==================
+
+ * Added options support to `res.clearCookie()`
+ * Added `res.helpers()` as alias of `res.locals()`
+ * Added; json defaults to UTF-8 with `res.send()`. Closes #632. [Daniel * Dependency `connect >= 1.4.0`
+ * Changed; auto set Content-Type in res.attachement [Aaron Heckmann]
+ * Renamed "cache views" to "view cache". Closes #628
+ * Fixed caching of views when using several apps. Closes #637
+ * Fixed gotcha invoking `app.param()` callbacks once per route middleware.
+Closes #638
+ * Fixed partial lookup precedence. Closes #631
+Shaw]
+
+2.2.2 / 2011-04-12
+==================
+
+ * Added second callback support for `res.download()` connection errors
+ * Fixed `filename` option passing to template engine
+
+2.2.1 / 2011-04-04
+==================
+
+ * Added `layout(path)` helper to change the layout within a view. Closes #610
+ * Fixed `partial()` collection object support.
+ Previously only anything with `.length` would work.
+ When `.length` is present one must still be aware of holes,
+ however now `{ collection: {foo: 'bar'}}` is valid, exposes
+ `keyInCollection` and `keysInCollection`.
+
+ * Performance improved with better view caching
+ * Removed `request` and `response` locals
+ * Changed; errorHandler page title is now `Express` instead of `Connect`
+
+2.2.0 / 2011-03-30
+==================
+
+ * Added `app.lookup.VERB()`, ex `app.lookup.put('/user/:id')`. Closes #606
+ * Added `app.match.VERB()`, ex `app.match.put('/user/12')`. Closes #606
+ * Added `app.VERB(path)` as alias of `app.lookup.VERB()`.
+ * Dependency `connect >= 1.2.0`
+
+2.1.1 / 2011-03-29
+==================
+
+ * Added; expose `err.view` object when failing to locate a view
+ * Fixed `res.partial()` call `next(err)` when no callback is given [reported by aheckmann]
+ * Fixed; `res.send(undefined)` responds with 204 [aheckmann]
+
+2.1.0 / 2011-03-24
+==================
+
+ * Added `<root>/_?<name>` partial lookup support. Closes #447
+ * Added `request`, `response`, and `app` local variables
+ * Added `settings` local variable, containing the app's settings
+ * Added `req.flash()` exception if `req.session` is not available
+ * Added `res.send(bool)` support (json response)
+ * Fixed stylus example for latest version
+ * Fixed; wrap try/catch around `res.render()`
+
+2.0.0 / 2011-03-17
+==================
+
+ * Fixed up index view path alternative.
+ * Changed; `res.locals()` without object returns the locals
+
+2.0.0rc3 / 2011-03-17
+==================
+
+ * Added `res.locals(obj)` to compliment `res.local(key, val)`
+ * Added `res.partial()` callback support
+ * Fixed recursive error reporting issue in `res.render()`
+
+2.0.0rc2 / 2011-03-17
+==================
+
+ * Changed; `partial()` "locals" are now optional
+ * Fixed `SlowBuffer` support. Closes #584 [reported by tyrda01]
+ * Fixed .filename view engine option [reported by drudge]
+ * Fixed blog example
+ * Fixed `{req,res}.app` reference when mounting [Ben Weaver]
+
+2.0.0rc / 2011-03-14
+==================
+
+ * Fixed; expose `HTTPSServer` constructor
+ * Fixed express(1) default test charset. Closes #579 [reported by secoif]
+ * Fixed; default charset to utf-8 instead of utf8 for lame IE [reported by NickP]
+
+2.0.0beta3 / 2011-03-09
+==================
+
+ * Added support for `res.contentType()` literal
+ The original `res.contentType('.json')`,
+ `res.contentType('application/json')`, and `res.contentType('json')`
+ will work now.
+ * Added `res.render()` status option support back
+ * Added charset option for `res.render()`
+ * Added `.charset` support (via connect 1.0.4)
+ * Added view resolution hints when in development and a lookup fails
+ * Added layout lookup support relative to the page view.
+ For example while rendering `./views/user/index.jade` if you create
+ `./views/user/layout.jade` it will be used in favour of the root layout.
+ * Fixed `res.redirect()`. RFC states absolute url [reported by unlink]
+ * Fixed; default `res.send()` string charset to utf8
+ * Removed `Partial` constructor (not currently used)
+
+2.0.0beta2 / 2011-03-07
+==================
+
+ * Added res.render() `.locals` support back to aid in migration process
+ * Fixed flash example
+
+2.0.0beta / 2011-03-03
+==================
+
+ * Added HTTPS support
+ * Added `res.cookie()` maxAge support
+ * Added `req.header()` _Referrer_ / _Referer_ special-case, either works
+ * Added mount support for `res.redirect()`, now respects the mount-point
+ * Added `union()` util, taking place of `merge(clone())` combo
+ * Added stylus support to express(1) generated app
+ * Added secret to session middleware used in examples and generated app
+ * Added `res.local(name, val)` for progressive view locals
+ * Added default param support to `req.param(name, default)`
+ * Added `app.disabled()` and `app.enabled()`
+ * Added `app.register()` support for omitting leading ".", either works
+ * Added `res.partial()`, using the same interface as `partial()` within a view. Closes #539
+ * Added `app.param()` to map route params to async/sync logic
+ * Added; aliased `app.helpers()` as `app.locals()`. Closes #481
+ * Added extname with no leading "." support to `res.contentType()`
+ * Added `cache views` setting, defaulting to enabled in "production" env
+ * Added index file partial resolution, eg: partial('user') may try _views/user/index.jade_.
+ * Added `req.accepts()` support for extensions
+ * Changed; `res.download()` and `res.sendfile()` now utilize Connect's
+ static file server `connect.static.send()`.
+ * Changed; replaced `connect.utils.mime()` with npm _mime_ module
+ * Changed; allow `req.query` to be pre-defined (via middleware or other parent
+ * Changed view partial resolution, now relative to parent view
+ * Changed view engine signature. no longer `engine.render(str, options, callback)`, now `engine.compile(str, options) -> Function`, the returned function accepts `fn(locals)`.
+ * Fixed `req.param()` bug returning Array.prototype methods. Closes #552
+ * Fixed; using `Stream#pipe()` instead of `sys.pump()` in `res.sendfile()`
+ * Fixed; using _qs_ module instead of _querystring_
+ * Fixed; strip unsafe chars from jsonp callbacks
+ * Removed "stream threshold" setting
+
+1.0.8 / 2011-03-01
+==================
+
+ * Allow `req.query` to be pre-defined (via middleware or other parent app)
+ * "connect": ">= 0.5.0 < 1.0.0". Closes #547
+ * Removed the long deprecated __EXPRESS_ENV__ support
+
+1.0.7 / 2011-02-07
+==================
+
+ * Fixed `render()` setting inheritance.
+ Mounted apps would not inherit "view engine"
+
+1.0.6 / 2011-02-07
+==================
+
+ * Fixed `view engine` setting bug when period is in dirname
+
+1.0.5 / 2011-02-05
+==================
+
+ * Added secret to generated app `session()` call
+
+1.0.4 / 2011-02-05
+==================
+
+ * Added `qs` dependency to _package.json_
+ * Fixed namespaced `require()`s for latest connect support
+
+1.0.3 / 2011-01-13
+==================
+
+ * Remove unsafe characters from JSONP callback names [Ryan Grove]
+
+1.0.2 / 2011-01-10
+==================
+
+ * Removed nested require, using `connect.router`
+
+1.0.1 / 2010-12-29
+==================
+
+ * Fixed for middleware stacked via `createServer()`
+ previously the `foo` middleware passed to `createServer(foo)`
+ would not have access to Express methods such as `res.send()`
+ or props like `req.query` etc.
+
+1.0.0 / 2010-11-16
+==================
+
+ * Added; deduce partial object names from the last segment.
+ For example by default `partial('forum/post', postObject)` will
+ give you the _post_ object, providing a meaningful default.
+ * Added http status code string representation to `res.redirect()` body
+ * Added; `res.redirect()` supporting _text/plain_ and _text/html_ via __Accept__.
+ * Added `req.is()` to aid in content negotiation
+ * Added partial local inheritance [suggested by masylum]. Closes #102
+ providing access to parent template locals.
+ * Added _-s, --session[s]_ flag to express(1) to add session related middleware
+ * Added _--template_ flag to express(1) to specify the
+ template engine to use.
+ * Added _--css_ flag to express(1) to specify the
+ stylesheet engine to use (or just plain css by default).
+ * Added `app.all()` support [thanks aheckmann]
+ * Added partial direct object support.
+ You may now `partial('user', user)` providing the "user" local,
+ vs previously `partial('user', { object: user })`.
+ * Added _route-separation_ example since many people question ways
+ to do this with CommonJS modules. Also view the _blog_ example for
+ an alternative.
+ * Performance; caching view path derived partial object names
+ * Fixed partial local inheritance precedence. [reported by Nick Poulden] Closes #454
+ * Fixed jsonp support; _text/javascript_ as per mailinglist discussion
+
+1.0.0rc4 / 2010-10-14
+==================
+
+ * Added _NODE_ENV_ support, _EXPRESS_ENV_ is deprecated and will be removed in 1.0.0
+ * Added route-middleware support (very helpful, see the [docs](http://expressjs.com/guide.html#Route-Middleware))
+ * Added _jsonp callback_ setting to enable/disable jsonp autowrapping [Dav Glass]
+ * Added callback query check on response.send to autowrap JSON objects for simple webservice implementations [Dav Glass]
+ * Added `partial()` support for array-like collections. Closes #434
+ * Added support for swappable querystring parsers
+ * Added session usage docs. Closes #443
+ * Added dynamic helper caching. Closes #439 [suggested by maritz]
+ * Added authentication example
+ * Added basic Range support to `res.sendfile()` (and `res.download()` etc)
+ * Changed; `express(1)` generated app using 2 spaces instead of 4
+ * Default env to "development" again [aheckmann]
+ * Removed _context_ option is no more, use "scope"
+ * Fixed; exposing _./support_ libs to examples so they can run without installs
+ * Fixed mvc example
+
+1.0.0rc3 / 2010-09-20
+==================
+
+ * Added confirmation for `express(1)` app generation. Closes #391
+ * Added extending of flash formatters via `app.flashFormatters`
+ * Added flash formatter support. Closes #411
+ * Added streaming support to `res.sendfile()` using `sys.pump()` when >= "stream threshold"
+ * Added _stream threshold_ setting for `res.sendfile()`
+ * Added `res.send()` __HEAD__ support
+ * Added `res.clearCookie()`
+ * Added `res.cookie()`
+ * Added `res.render()` headers option
+ * Added `res.redirect()` response bodies
+ * Added `res.render()` status option support. Closes #425 [thanks aheckmann]
+ * Fixed `res.sendfile()` responding with 403 on malicious path
+ * Fixed `res.download()` bug; when an error occurs remove _Content-Disposition_
+ * Fixed; mounted apps settings now inherit from parent app [aheckmann]
+ * Fixed; stripping Content-Length / Content-Type when 204
+ * Fixed `res.send()` 204. Closes #419
+ * Fixed multiple _Set-Cookie_ headers via `res.header()`. Closes #402
+ * Fixed bug messing with error handlers when `listenFD()` is called instead of `listen()`. [thanks guillermo]
+
+
+1.0.0rc2 / 2010-08-17
+==================
+
+ * Added `app.register()` for template engine mapping. Closes #390
+ * Added `res.render()` callback support as second argument (no options)
+ * Added callback support to `res.download()`
+ * Added callback support for `res.sendfile()`
+ * Added support for middleware access via `express.middlewareName()` vs `connect.middlewareName()`
+ * Added "partials" setting to docs
+ * Added default expresso tests to `express(1)` generated app. Closes #384
+ * Fixed `res.sendfile()` error handling, defer via `next()`
+ * Fixed `res.render()` callback when a layout is used [thanks guillermo]
+ * Fixed; `make install` creating ~/.node_libraries when not present
+ * Fixed issue preventing error handlers from being defined anywhere. Closes #387
+
+1.0.0rc / 2010-07-28
+==================
+
+ * Added mounted hook. Closes #369
+ * Added connect dependency to _package.json_
+
+ * Removed "reload views" setting and support code
+ development env never caches, production always caches.
+
+ * Removed _param_ in route callbacks, signature is now
+ simply (req, res, next), previously (req, res, params, next).
+ Use _req.params_ for path captures, _req.query_ for GET params.
+
+ * Fixed "home" setting
+ * Fixed middleware/router precedence issue. Closes #366
+ * Fixed; _configure()_ callbacks called immediately. Closes #368
+
+1.0.0beta2 / 2010-07-23
+==================
+
+ * Added more examples
+ * Added; exporting `Server` constructor
+ * Added `Server#helpers()` for view locals
+ * Added `Server#dynamicHelpers()` for dynamic view locals. Closes #349
+ * Added support for absolute view paths
+ * Added; _home_ setting defaults to `Server#route` for mounted apps. Closes #363
+ * Added Guillermo Rauch to the contributor list
+ * Added support for "as" for non-collection partials. Closes #341
+ * Fixed _install.sh_, ensuring _~/.node_libraries_ exists. Closes #362 [thanks jf]
+ * Fixed `res.render()` exceptions, now passed to `next()` when no callback is given [thanks guillermo]
+ * Fixed instanceof `Array` checks, now `Array.isArray()`
+ * Fixed express(1) expansion of public dirs. Closes #348
+ * Fixed middleware precedence. Closes #345
+ * Fixed view watcher, now async [thanks aheckmann]
+
+1.0.0beta / 2010-07-15
+==================
+
+ * Re-write
+ - much faster
+ - much lighter
+ - Check [ExpressJS.com](http://expressjs.com) for migration guide and updated docs
+
+0.14.0 / 2010-06-15
+==================
+
+ * Utilize relative requires
+ * Added Static bufferSize option [aheckmann]
+ * Fixed caching of view and partial subdirectories [aheckmann]
+ * Fixed mime.type() comments now that ".ext" is not supported
+ * Updated haml submodule
+ * Updated class submodule
+ * Removed bin/express
+
+0.13.0 / 2010-06-01
+==================
+
+ * Added node v0.1.97 compatibility
+ * Added support for deleting cookies via Request#cookie('key', null)
+ * Updated haml submodule
+ * Fixed not-found page, now using using charset utf-8
+ * Fixed show-exceptions page, now using using charset utf-8
+ * Fixed view support due to fs.readFile Buffers
+ * Changed; mime.type() no longer accepts ".type" due to node extname() changes
+
+0.12.0 / 2010-05-22
+==================
+
+ * Added node v0.1.96 compatibility
+ * Added view `helpers` export which act as additional local variables
+ * Updated haml submodule
+ * Changed ETag; removed inode, modified time only
+ * Fixed LF to CRLF for setting multiple cookies
+ * Fixed cookie complation; values are now urlencoded
+ * Fixed cookies parsing; accepts quoted values and url escaped cookies
+
+0.11.0 / 2010-05-06
+==================
+
+ * Added support for layouts using different engines
+ - this.render('page.html.haml', { layout: 'super-cool-layout.html.ejs' })
+ - this.render('page.html.haml', { layout: 'foo' }) // assumes 'foo.html.haml'
+ - this.render('page.html.haml', { layout: false }) // no layout
+ * Updated ext submodule
+ * Updated haml submodule
+ * Fixed EJS partial support by passing along the context. Issue #307
+
+0.10.1 / 2010-05-03
+==================
+
+ * Fixed binary uploads.
+
+0.10.0 / 2010-04-30
+==================
+
+ * Added charset support via Request#charset (automatically assigned to 'UTF-8' when respond()'s
+ encoding is set to 'utf8' or 'utf-8'.
+ * Added "encoding" option to Request#render(). Closes #299
+ * Added "dump exceptions" setting, which is enabled by default.
+ * Added simple ejs template engine support
+ * Added error response support for text/plain, application/json. Closes #297
+ * Added callback function param to Request#error()
+ * Added Request#sendHead()
+ * Added Request#stream()
+ * Added support for Request#respond(304, null) for empty response bodies
+ * Added ETag support to Request#sendfile()
+ * Added options to Request#sendfile(), passed to fs.createReadStream()
+ * Added filename arg to Request#download()
+ * Performance enhanced due to pre-reversing plugins so that plugins.reverse() is not called on each request
+ * Performance enhanced by preventing several calls to toLowerCase() in Router#match()
+ * Changed; Request#sendfile() now streams
+ * Changed; Renamed Request#halt() to Request#respond(). Closes #289
+ * Changed; Using sys.inspect() instead of JSON.encode() for error output
+ * Changed; run() returns the http.Server instance. Closes #298
+ * Changed; Defaulting Server#host to null (INADDR_ANY)
+ * Changed; Logger "common" format scale of 0.4f
+ * Removed Logger "request" format
+ * Fixed; Catching ENOENT in view caching, preventing error when "views/partials" is not found
+ * Fixed several issues with http client
+ * Fixed Logger Content-Length output
+ * Fixed bug preventing Opera from retaining the generated session id. Closes #292
+
+0.9.0 / 2010-04-14
+==================
+
+ * Added DSL level error() route support
+ * Added DSL level notFound() route support
+ * Added Request#error()
+ * Added Request#notFound()
+ * Added Request#render() callback function. Closes #258
+ * Added "max upload size" setting
+ * Added "magic" variables to collection partials (\_\_index\_\_, \_\_length\_\_, \_\_isFirst\_\_, \_\_isLast\_\_). Closes #254
+ * Added [haml.js](http://github.com/visionmedia/haml.js) submodule; removed haml-js
+ * Added callback function support to Request#halt() as 3rd/4th arg
+ * Added preprocessing of route param wildcards using param(). Closes #251
+ * Added view partial support (with collections etc)
+ * Fixed bug preventing falsey params (such as ?page=0). Closes #286
+ * Fixed setting of multiple cookies. Closes #199
+ * Changed; view naming convention is now NAME.TYPE.ENGINE (for example page.html.haml)
+ * Changed; session cookie is now httpOnly
+ * Changed; Request is no longer global
+ * Changed; Event is no longer global
+ * Changed; "sys" module is no longer global
+ * Changed; moved Request#download to Static plugin where it belongs
+ * Changed; Request instance created before body parsing. Closes #262
+ * Changed; Pre-caching views in memory when "cache view contents" is enabled. Closes #253
+ * Changed; Pre-caching view partials in memory when "cache view partials" is enabled
+ * Updated support to node --version 0.1.90
+ * Updated dependencies
+ * Removed set("session cookie") in favour of use(Session, { cookie: { ... }})
+ * Removed utils.mixin(); use Object#mergeDeep()
+
+0.8.0 / 2010-03-19
+==================
+
+ * Added coffeescript example app. Closes #242
+ * Changed; cache api now async friendly. Closes #240
+ * Removed deprecated 'express/static' support. Use 'express/plugins/static'
+
+0.7.6 / 2010-03-19
+==================
+
+ * Added Request#isXHR. Closes #229
+ * Added `make install` (for the executable)
+ * Added `express` executable for setting up simple app templates
+ * Added "GET /public/*" to Static plugin, defaulting to <root>/public
+ * Added Static plugin
+ * Fixed; Request#render() only calls cache.get() once
+ * Fixed; Namespacing View caches with "view:"
+ * Fixed; Namespacing Static caches with "static:"
+ * Fixed; Both example apps now use the Static plugin
+ * Fixed set("views"). Closes #239
+ * Fixed missing space for combined log format
+ * Deprecated Request#sendfile() and 'express/static'
+ * Removed Server#running
+
+0.7.5 / 2010-03-16
+==================
+
+ * Added Request#flash() support without args, now returns all flashes
+ * Updated ext submodule
+
+0.7.4 / 2010-03-16
+==================
+
+ * Fixed session reaper
+ * Changed; class.js replacing js-oo Class implementation (quite a bit faster, no browser cruft)
+
+0.7.3 / 2010-03-16
+==================
+
+ * Added package.json
+ * Fixed requiring of haml / sass due to kiwi removal
+
+0.7.2 / 2010-03-16
+==================
+
+ * Fixed GIT submodules (HAH!)
+
+0.7.1 / 2010-03-16
+==================
+
+ * Changed; Express now using submodules again until a PM is adopted
+ * Changed; chat example using millisecond conversions from ext
+
+0.7.0 / 2010-03-15
+==================
+
+ * Added Request#pass() support (finds the next matching route, or the given path)
+ * Added Logger plugin (default "common" format replaces CommonLogger)
+ * Removed Profiler plugin
+ * Removed CommonLogger plugin
+
+0.6.0 / 2010-03-11
+==================
+
+ * Added seed.yml for kiwi package management support
+ * Added HTTP client query string support when method is GET. Closes #205
+
+ * Added support for arbitrary view engines.
+ For example "foo.engine.html" will now require('engine'),
+ the exports from this module are cached after the first require().
+
+ * Added async plugin support
+
+ * Removed usage of RESTful route funcs as http client
+ get() etc, use http.get() and friends
+
+ * Removed custom exceptions
+
+0.5.0 / 2010-03-10
+==================
+
+ * Added ext dependency (library of js extensions)
+ * Removed extname() / basename() utils. Use path module
+ * Removed toArray() util. Use arguments.values
+ * Removed escapeRegexp() util. Use RegExp.escape()
+ * Removed process.mixin() dependency. Use utils.mixin()
+ * Removed Collection
+ * Removed ElementCollection
+ * Shameless self promotion of ebook "Advanced JavaScript" (http://dev-mag.com) ;)
+
+0.4.0 / 2010-02-11
+==================
+
+ * Added flash() example to sample upload app
+ * Added high level restful http client module (express/http)
+ * Changed; RESTful route functions double as HTTP clients. Closes #69
+ * Changed; throwing error when routes are added at runtime
+ * Changed; defaulting render() context to the current Request. Closes #197
+ * Updated haml submodule
+
+0.3.0 / 2010-02-11
+==================
+
+ * Updated haml / sass submodules. Closes #200
+ * Added flash message support. Closes #64
+ * Added accepts() now allows multiple args. fixes #117
+ * Added support for plugins to halt. Closes #189
+ * Added alternate layout support. Closes #119
+ * Removed Route#run(). Closes #188
+ * Fixed broken specs due to use(Cookie) missing
+
+0.2.1 / 2010-02-05
+==================
+
+ * Added "plot" format option for Profiler (for gnuplot processing)
+ * Added request number to Profiler plugin
+ * Fixed binary encoding for multi-part file uploads, was previously defaulting to UTF8
+ * Fixed issue with routes not firing when not files are present. Closes #184
+ * Fixed process.Promise -> events.Promise
+
+0.2.0 / 2010-02-03
+==================
+
+ * Added parseParam() support for name[] etc. (allows for file inputs with "multiple" attr) Closes #180
+ * Added Both Cache and Session option "reapInterval" may be "reapEvery". Closes #174
+ * Added expiration support to cache api with reaper. Closes #133
+ * Added cache Store.Memory#reap()
+ * Added Cache; cache api now uses first class Cache instances
+ * Added abstract session Store. Closes #172
+ * Changed; cache Memory.Store#get() utilizing Collection
+ * Renamed MemoryStore -> Store.Memory
+ * Fixed use() of the same plugin several time will always use latest options. Closes #176
+
+0.1.0 / 2010-02-03
+==================
+
+ * Changed; Hooks (before / after) pass request as arg as well as evaluated in their context
+ * Updated node support to 0.1.27 Closes #169
+ * Updated dirname(__filename) -> __dirname
+ * Updated libxmljs support to v0.2.0
+ * Added session support with memory store / reaping
+ * Added quick uid() helper
+ * Added multi-part upload support
+ * Added Sass.js support / submodule
+ * Added production env caching view contents and static files
+ * Added static file caching. Closes #136
+ * Added cache plugin with memory stores
+ * Added support to StaticFile so that it works with non-textual files.
+ * Removed dirname() helper
+ * Removed several globals (now their modules must be required)
+
+0.0.2 / 2010-01-10
+==================
+
+ * Added view benchmarks; currently haml vs ejs
+ * Added Request#attachment() specs. Closes #116
+ * Added use of node's parseQuery() util. Closes #123
+ * Added `make init` for submodules
+ * Updated Haml
+ * Updated sample chat app to show messages on load
+ * Updated libxmljs parseString -> parseHtmlString
+ * Fixed `make init` to work with older versions of git
+ * Fixed specs can now run independent specs for those who cant build deps. Closes #127
+ * Fixed issues introduced by the node url module changes. Closes 126.
+ * Fixed two assertions failing due to Collection#keys() returning strings
+ * Fixed faulty Collection#toArray() spec due to keys() returning strings
+ * Fixed `make test` now builds libxmljs.node before testing
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/express/LICENSE b/dgbuilder/dgeflows/node_modules/express/LICENSE
new file mode 100644
index 0000000..0f3c767
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/Readme.md b/dgbuilder/dgeflows/node_modules/express/Readme.md
new file mode 100644
index 0000000..748e1ee
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/Readme.md
@@ -0,0 +1,135 @@
+[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/)
+
+ Fast, unopinionated, minimalist web framework for [node](http://nodejs.org).
+
+ [![NPM Version][npm-image]][npm-url]
+ [![NPM Downloads][downloads-image]][downloads-url]
+ [![Build Status][travis-image]][travis-url]
+ [![Test Coverage][coveralls-image]][coveralls-url]
+
+```js
+var express = require('express')
+var app = express()
+
+app.get('/', function (req, res) {
+ res.send('Hello World')
+})
+
+app.listen(3000)
+```
+
+## Installation
+
+```bash
+$ npm install express
+```
+
+## Features
+
+ * Robust routing
+ * Focus on high performance
+ * Super-high test coverage
+ * HTTP helpers (redirection, caching, etc)
+ * View system supporting 14+ template engines
+ * Content negotiation
+ * Executable for generating applications quickly
+
+## Docs & Community
+
+ * [Website and Documentation](http://expressjs.com/) - [[website repo](https://github.com/strongloop/expressjs.com)]
+ * [#express](https://webchat.freenode.net/?channels=express) on freenode IRC
+ * [Github Organization](https://github.com/expressjs) for Official Middleware & Modules
+ * Visit the [Wiki](https://github.com/strongloop/express/wiki)
+ * [Google Group](https://groups.google.com/group/express-js) for discussion
+ * [Русскоязычная документация](http://jsman.ru/express/)
+ * [한국어 문서](http://expressjs.kr) - [[website repo](https://github.com/Hanul/expressjs.kr)]
+
+**PROTIP** Be sure to read [Migrating from 3.x to 4.x](https://github.com/strongloop/express/wiki/Migrating-from-3.x-to-4.x) as well as [New features in 4.x](https://github.com/strongloop/express/wiki/New-features-in-4.x).
+
+## Quick Start
+
+ The quickest way to get started with express is to utilize the executable [`express(1)`](https://github.com/expressjs/generator) to generate an application as shown below:
+
+ Install the executable. The executable's major version will match Express's:
+
+```bash
+$ npm install -g express-generator@4
+```
+
+ Create the app:
+
+```bash
+$ express /tmp/foo && cd /tmp/foo
+```
+
+ Install dependencies:
+
+```bash
+$ npm install
+```
+
+ Start the server:
+
+```bash
+$ npm start
+```
+
+## Philosophy
+
+ The Express philosophy is to provide small, robust tooling for HTTP servers, making
+ it a great solution for single page applications, web sites, hybrids, or public
+ HTTP APIs.
+
+ Express does not force you to use any specific ORM or template engine. With support for over
+ 14 template engines via [Consolidate.js](https://github.com/tj/consolidate.js),
+ you can quickly craft your perfect framework.
+
+## Examples
+
+ To view the examples, clone the Express repo and install the dependancies:
+
+```bash
+$ git clone git://github.com/strongloop/express.git --depth 1
+$ cd express
+$ npm install
+```
+
+ Then run whichever example you want:
+
+```bash
+$ node examples/content-negotiation
+```
+
+## Tests
+
+ To run the test suite, first install the dependancies, then run `npm test`:
+
+```bash
+$ npm install
+$ npm test
+```
+
+## People
+
+The original author of Express is [TJ Holowaychuk](https://github.com/tj) [![TJ's Gratipay][gratipay-image-visionmedia]][gratipay-url-visionmedia]
+
+The current lead maintainer is [Douglas Christopher Wilson](https://github.com/dougwilson) [![Doug's Gratipay][gratipay-image-dougwilson]][gratipay-url-dougwilson]
+
+[List of all contributors](https://github.com/strongloop/express/graphs/contributors)
+
+## License
+
+ [MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/express.svg?style=flat
+[npm-url]: https://npmjs.org/package/express
+[downloads-image]: https://img.shields.io/npm/dm/express.svg?style=flat
+[downloads-url]: https://npmjs.org/package/express
+[travis-image]: https://img.shields.io/travis/strongloop/express.svg?style=flat
+[travis-url]: https://travis-ci.org/strongloop/express
+[coveralls-image]: https://img.shields.io/coveralls/strongloop/express.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/strongloop/express?branch=master
+[gratipay-image-visionmedia]: https://img.shields.io/gratipay/visionmedia.svg?style=flat
+[gratipay-url-visionmedia]: https://gratipay.com/visionmedia/
+[gratipay-image-dougwilson]: https://img.shields.io/gratipay/dougwilson.svg?style=flat
+[gratipay-url-dougwilson]: https://gratipay.com/dougwilson/
diff --git a/dgbuilder/dgeflows/node_modules/express/index.js b/dgbuilder/dgeflows/node_modules/express/index.js
new file mode 100644
index 0000000..3da3378
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/index.js
@@ -0,0 +1,2 @@
+
+module.exports = require('./lib/express');
diff --git a/dgbuilder/dgeflows/node_modules/express/lib/application.js b/dgbuilder/dgeflows/node_modules/express/lib/application.js
new file mode 100644
index 0000000..dc18fe3
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/lib/application.js
@@ -0,0 +1,571 @@
+/**
+ * Module dependencies.
+ */
+
+var finalhandler = require('finalhandler');
+var flatten = require('./utils').flatten;
+var Router = require('./router');
+var methods = require('methods');
+var middleware = require('./middleware/init');
+var query = require('./middleware/query');
+var debug = require('debug')('express:application');
+var View = require('./view');
+var http = require('http');
+var compileETag = require('./utils').compileETag;
+var compileQueryParser = require('./utils').compileQueryParser;
+var compileTrust = require('./utils').compileTrust;
+var deprecate = require('depd')('express');
+var merge = require('utils-merge');
+var resolve = require('path').resolve;
+var slice = Array.prototype.slice;
+
+/**
+ * Application prototype.
+ */
+
+var app = exports = module.exports = {};
+
+/**
+ * Initialize the server.
+ *
+ * - setup default configuration
+ * - setup default middleware
+ * - setup route reflection methods
+ *
+ * @api private
+ */
+
+app.init = function(){
+ this.cache = {};
+ this.settings = {};
+ this.engines = {};
+ this.defaultConfiguration();
+};
+
+/**
+ * Initialize application configuration.
+ *
+ * @api private
+ */
+
+app.defaultConfiguration = function(){
+ // default settings
+ this.enable('x-powered-by');
+ this.set('etag', 'weak');
+ var env = process.env.NODE_ENV || 'development';
+ this.set('env', env);
+ this.set('query parser', 'extended');
+ this.set('subdomain offset', 2);
+ this.set('trust proxy', false);
+
+ debug('booting in %s mode', env);
+
+ // inherit protos
+ this.on('mount', function(parent){
+ this.request.__proto__ = parent.request;
+ this.response.__proto__ = parent.response;
+ this.engines.__proto__ = parent.engines;
+ this.settings.__proto__ = parent.settings;
+ });
+
+ // setup locals
+ this.locals = Object.create(null);
+
+ // top-most app is mounted at /
+ this.mountpath = '/';
+
+ // default locals
+ this.locals.settings = this.settings;
+
+ // default configuration
+ this.set('view', View);
+ this.set('views', resolve('views'));
+ this.set('jsonp callback name', 'callback');
+
+ if (env === 'production') {
+ this.enable('view cache');
+ }
+
+ Object.defineProperty(this, 'router', {
+ get: function() {
+ throw new Error('\'app.router\' is deprecated!\nPlease see the 3.x to 4.x migration guide for details on how to update your app.');
+ }
+ });
+};
+
+/**
+ * lazily adds the base router if it has not yet been added.
+ *
+ * We cannot add the base router in the defaultConfiguration because
+ * it reads app settings which might be set after that has run.
+ *
+ * @api private
+ */
+app.lazyrouter = function() {
+ if (!this._router) {
+ this._router = new Router({
+ caseSensitive: this.enabled('case sensitive routing'),
+ strict: this.enabled('strict routing')
+ });
+
+ this._router.use(query(this.get('query parser fn')));
+ this._router.use(middleware.init(this));
+ }
+};
+
+/**
+ * Dispatch a req, res pair into the application. Starts pipeline processing.
+ *
+ * If no _done_ callback is provided, then default error handlers will respond
+ * in the event of an error bubbling through the stack.
+ *
+ * @api private
+ */
+
+app.handle = function(req, res, done) {
+ var router = this._router;
+
+ // final handler
+ done = done || finalhandler(req, res, {
+ env: this.get('env'),
+ onerror: logerror.bind(this)
+ });
+
+ // no routes
+ if (!router) {
+ debug('no routes defined on app');
+ done();
+ return;
+ }
+
+ router.handle(req, res, done);
+};
+
+/**
+ * Proxy `Router#use()` to add middleware to the app router.
+ * See Router#use() documentation for details.
+ *
+ * If the _fn_ parameter is an express app, then it will be
+ * mounted at the _route_ specified.
+ *
+ * @api public
+ */
+
+app.use = function use(fn) {
+ var offset = 0;
+ var path = '/';
+
+ // default path to '/'
+ // disambiguate app.use([fn])
+ if (typeof fn !== 'function') {
+ var arg = fn;
+
+ while (Array.isArray(arg) && arg.length !== 0) {
+ arg = arg[0];
+ }
+
+ // first arg is the path
+ if (typeof arg !== 'function') {
+ offset = 1;
+ path = fn;
+ }
+ }
+
+ var fns = flatten(slice.call(arguments, offset));
+
+ if (fns.length === 0) {
+ throw new TypeError('app.use() requires middleware functions');
+ }
+
+ // setup router
+ this.lazyrouter();
+ var router = this._router;
+
+ fns.forEach(function (fn) {
+ // non-express app
+ if (!fn || !fn.handle || !fn.set) {
+ return router.use(path, fn);
+ }
+
+ debug('.use app under %s', path);
+ fn.mountpath = path;
+ fn.parent = this;
+
+ // restore .app property on req and res
+ router.use(path, function mounted_app(req, res, next) {
+ var orig = req.app;
+ fn.handle(req, res, function (err) {
+ req.__proto__ = orig.request;
+ res.__proto__ = orig.response;
+ next(err);
+ });
+ });
+
+ // mounted an app
+ fn.emit('mount', this);
+ }, this);
+
+ return this;
+};
+
+/**
+ * Proxy to the app `Router#route()`
+ * Returns a new `Route` instance for the _path_.
+ *
+ * Routes are isolated middleware stacks for specific paths.
+ * See the Route api docs for details.
+ *
+ * @api public
+ */
+
+app.route = function(path){
+ this.lazyrouter();
+ return this._router.route(path);
+};
+
+/**
+ * Register the given template engine callback `fn`
+ * as `ext`.
+ *
+ * By default will `require()` the engine based on the
+ * file extension. For example if you try to render
+ * a "foo.jade" file Express will invoke the following internally:
+ *
+ * app.engine('jade', require('jade').__express);
+ *
+ * For engines that do not provide `.__express` out of the box,
+ * or if you wish to "map" a different extension to the template engine
+ * you may use this method. For example mapping the EJS template engine to
+ * ".html" files:
+ *
+ * app.engine('html', require('ejs').renderFile);
+ *
+ * In this case EJS provides a `.renderFile()` method with
+ * the same signature that Express expects: `(path, options, callback)`,
+ * though note that it aliases this method as `ejs.__express` internally
+ * so if you're using ".ejs" extensions you dont need to do anything.
+ *
+ * Some template engines do not follow this convention, the
+ * [Consolidate.js](https://github.com/tj/consolidate.js)
+ * library was created to map all of node's popular template
+ * engines to follow this convention, thus allowing them to
+ * work seamlessly within Express.
+ *
+ * @param {String} ext
+ * @param {Function} fn
+ * @return {app} for chaining
+ * @api public
+ */
+
+app.engine = function(ext, fn){
+ if ('function' != typeof fn) throw new Error('callback function required');
+ if ('.' != ext[0]) ext = '.' + ext;
+ this.engines[ext] = fn;
+ return this;
+};
+
+/**
+ * Proxy to `Router#param()` with one added api feature. The _name_ parameter
+ * can be an array of names.
+ *
+ * See the Router#param() docs for more details.
+ *
+ * @param {String|Array} name
+ * @param {Function} fn
+ * @return {app} for chaining
+ * @api public
+ */
+
+app.param = function(name, fn){
+ this.lazyrouter();
+
+ if (Array.isArray(name)) {
+ name.forEach(function(key) {
+ this.param(key, fn);
+ }, this);
+ return this;
+ }
+
+ this._router.param(name, fn);
+ return this;
+};
+
+/**
+ * Assign `setting` to `val`, or return `setting`'s value.
+ *
+ * app.set('foo', 'bar');
+ * app.get('foo');
+ * // => "bar"
+ *
+ * Mounted servers inherit their parent server's settings.
+ *
+ * @param {String} setting
+ * @param {*} [val]
+ * @return {Server} for chaining
+ * @api public
+ */
+
+app.set = function(setting, val){
+ if (arguments.length === 1) {
+ // app.get(setting)
+ return this.settings[setting];
+ }
+
+ // set value
+ this.settings[setting] = val;
+
+ // trigger matched settings
+ switch (setting) {
+ case 'etag':
+ debug('compile etag %s', val);
+ this.set('etag fn', compileETag(val));
+ break;
+ case 'query parser':
+ debug('compile query parser %s', val);
+ this.set('query parser fn', compileQueryParser(val));
+ break;
+ case 'trust proxy':
+ debug('compile trust proxy %s', val);
+ this.set('trust proxy fn', compileTrust(val));
+ break;
+ }
+
+ return this;
+};
+
+/**
+ * Return the app's absolute pathname
+ * based on the parent(s) that have
+ * mounted it.
+ *
+ * For example if the application was
+ * mounted as "/admin", which itself
+ * was mounted as "/blog" then the
+ * return value would be "/blog/admin".
+ *
+ * @return {String}
+ * @api private
+ */
+
+app.path = function(){
+ return this.parent
+ ? this.parent.path() + this.mountpath
+ : '';
+};
+
+/**
+ * Check if `setting` is enabled (truthy).
+ *
+ * app.enabled('foo')
+ * // => false
+ *
+ * app.enable('foo')
+ * app.enabled('foo')
+ * // => true
+ *
+ * @param {String} setting
+ * @return {Boolean}
+ * @api public
+ */
+
+app.enabled = function(setting){
+ return !!this.set(setting);
+};
+
+/**
+ * Check if `setting` is disabled.
+ *
+ * app.disabled('foo')
+ * // => true
+ *
+ * app.enable('foo')
+ * app.disabled('foo')
+ * // => false
+ *
+ * @param {String} setting
+ * @return {Boolean}
+ * @api public
+ */
+
+app.disabled = function(setting){
+ return !this.set(setting);
+};
+
+/**
+ * Enable `setting`.
+ *
+ * @param {String} setting
+ * @return {app} for chaining
+ * @api public
+ */
+
+app.enable = function(setting){
+ return this.set(setting, true);
+};
+
+/**
+ * Disable `setting`.
+ *
+ * @param {String} setting
+ * @return {app} for chaining
+ * @api public
+ */
+
+app.disable = function(setting){
+ return this.set(setting, false);
+};
+
+/**
+ * Delegate `.VERB(...)` calls to `router.VERB(...)`.
+ */
+
+methods.forEach(function(method){
+ app[method] = function(path){
+ if ('get' == method && 1 == arguments.length) return this.set(path);
+
+ this.lazyrouter();
+
+ var route = this._router.route(path);
+ route[method].apply(route, slice.call(arguments, 1));
+ return this;
+ };
+});
+
+/**
+ * Special-cased "all" method, applying the given route `path`,
+ * middleware, and callback to _every_ HTTP method.
+ *
+ * @param {String} path
+ * @param {Function} ...
+ * @return {app} for chaining
+ * @api public
+ */
+
+app.all = function(path){
+ this.lazyrouter();
+
+ var route = this._router.route(path);
+ var args = slice.call(arguments, 1);
+ methods.forEach(function(method){
+ route[method].apply(route, args);
+ });
+
+ return this;
+};
+
+// del -> delete alias
+
+app.del = deprecate.function(app.delete, 'app.del: Use app.delete instead');
+
+/**
+ * Render the given view `name` name with `options`
+ * and a callback accepting an error and the
+ * rendered template string.
+ *
+ * Example:
+ *
+ * app.render('email', { name: 'Tobi' }, function(err, html){
+ * // ...
+ * })
+ *
+ * @param {String} name
+ * @param {String|Function} options or fn
+ * @param {Function} fn
+ * @api public
+ */
+
+app.render = function(name, options, fn){
+ var opts = {};
+ var cache = this.cache;
+ var engines = this.engines;
+ var view;
+
+ // support callback function as second arg
+ if ('function' == typeof options) {
+ fn = options, options = {};
+ }
+
+ // merge app.locals
+ merge(opts, this.locals);
+
+ // merge options._locals
+ if (options._locals) {
+ merge(opts, options._locals);
+ }
+
+ // merge options
+ merge(opts, options);
+
+ // set .cache unless explicitly provided
+ opts.cache = null == opts.cache
+ ? this.enabled('view cache')
+ : opts.cache;
+
+ // primed cache
+ if (opts.cache) view = cache[name];
+
+ // view
+ if (!view) {
+ view = new (this.get('view'))(name, {
+ defaultEngine: this.get('view engine'),
+ root: this.get('views'),
+ engines: engines
+ });
+
+ if (!view.path) {
+ var dirs = Array.isArray(view.root) && view.root.length > 1
+ ? 'directories "' + view.root.slice(0, -1).join('", "') + '" or "' + view.root[view.root.length - 1] + '"'
+ : 'directory "' + view.root + '"'
+ var err = new Error('Failed to lookup view "' + name + '" in views ' + dirs);
+ err.view = view;
+ return fn(err);
+ }
+
+ // prime the cache
+ if (opts.cache) cache[name] = view;
+ }
+
+ // render
+ try {
+ view.render(opts, fn);
+ } catch (err) {
+ fn(err);
+ }
+};
+
+/**
+ * Listen for connections.
+ *
+ * A node `http.Server` is returned, with this
+ * application (which is a `Function`) as its
+ * callback. If you wish to create both an HTTP
+ * and HTTPS server you may do so with the "http"
+ * and "https" modules as shown here:
+ *
+ * var http = require('http')
+ * , https = require('https')
+ * , express = require('express')
+ * , app = express();
+ *
+ * http.createServer(app).listen(80);
+ * https.createServer({ ... }, app).listen(443);
+ *
+ * @return {http.Server}
+ * @api public
+ */
+
+app.listen = function(){
+ var server = http.createServer(this);
+ return server.listen.apply(server, arguments);
+};
+
+/**
+* Log error using console.error.
+*
+* @param {Error} err
+* @api private
+*/
+
+function logerror(err){
+ if (this.get('env') !== 'test') console.error(err.stack || err.toString());
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/lib/express.js b/dgbuilder/dgeflows/node_modules/express/lib/express.js
new file mode 100644
index 0000000..8a6c284
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/lib/express.js
@@ -0,0 +1,93 @@
+/**
+ * Module dependencies.
+ */
+
+var EventEmitter = require('events').EventEmitter;
+var mixin = require('merge-descriptors');
+var proto = require('./application');
+var Route = require('./router/route');
+var Router = require('./router');
+var req = require('./request');
+var res = require('./response');
+
+/**
+ * Expose `createApplication()`.
+ */
+
+exports = module.exports = createApplication;
+
+/**
+ * Create an express application.
+ *
+ * @return {Function}
+ * @api public
+ */
+
+function createApplication() {
+ var app = function(req, res, next) {
+ app.handle(req, res, next);
+ };
+
+ mixin(app, proto);
+ mixin(app, EventEmitter.prototype);
+
+ app.request = { __proto__: req, app: app };
+ app.response = { __proto__: res, app: app };
+ app.init();
+ return app;
+}
+
+/**
+ * Expose the prototypes.
+ */
+
+exports.application = proto;
+exports.request = req;
+exports.response = res;
+
+/**
+ * Expose constructors.
+ */
+
+exports.Route = Route;
+exports.Router = Router;
+
+/**
+ * Expose middleware
+ */
+
+exports.query = require('./middleware/query');
+exports.static = require('serve-static');
+
+/**
+ * Replace removed middleware with an appropriate error message.
+ */
+
+[
+ 'json',
+ 'urlencoded',
+ 'bodyParser',
+ 'compress',
+ 'cookieSession',
+ 'session',
+ 'logger',
+ 'cookieParser',
+ 'favicon',
+ 'responseTime',
+ 'errorHandler',
+ 'timeout',
+ 'methodOverride',
+ 'vhost',
+ 'csrf',
+ 'directory',
+ 'limit',
+ 'multipart',
+ 'staticCache',
+].forEach(function (name) {
+ Object.defineProperty(exports, name, {
+ get: function () {
+ throw new Error('Most middleware (like ' + name + ') is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.');
+ },
+ configurable: true
+ });
+});
diff --git a/dgbuilder/dgeflows/node_modules/express/lib/middleware/init.js b/dgbuilder/dgeflows/node_modules/express/lib/middleware/init.js
new file mode 100644
index 0000000..1e3e903
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/lib/middleware/init.js
@@ -0,0 +1,26 @@
+/**
+ * Initialization middleware, exposing the
+ * request and response to each other, as well
+ * as defaulting the X-Powered-By header field.
+ *
+ * @param {Function} app
+ * @return {Function}
+ * @api private
+ */
+
+exports.init = function(app){
+ return function expressInit(req, res, next){
+ if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express');
+ req.res = res;
+ res.req = req;
+ req.next = next;
+
+ req.__proto__ = app.request;
+ res.__proto__ = app.response;
+
+ res.locals = res.locals || Object.create(null);
+
+ next();
+ };
+};
+
diff --git a/dgbuilder/dgeflows/node_modules/express/lib/middleware/query.js b/dgbuilder/dgeflows/node_modules/express/lib/middleware/query.js
new file mode 100644
index 0000000..092bbd9
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/lib/middleware/query.js
@@ -0,0 +1,30 @@
+/**
+ * Module dependencies.
+ */
+
+var parseUrl = require('parseurl');
+var qs = require('qs');
+
+/**
+ * @param {Object} options
+ * @return {Function}
+ * @api public
+ */
+
+module.exports = function query(options) {
+ var queryparse = qs.parse;
+
+ if (typeof options === 'function') {
+ queryparse = options;
+ options = undefined;
+ }
+
+ return function query(req, res, next){
+ if (!req.query) {
+ var val = parseUrl(req).query;
+ req.query = queryparse(val, options);
+ }
+
+ next();
+ };
+};
diff --git a/dgbuilder/dgeflows/node_modules/express/lib/request.js b/dgbuilder/dgeflows/node_modules/express/lib/request.js
new file mode 100644
index 0000000..5cd3900
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/lib/request.js
@@ -0,0 +1,467 @@
+/**
+ * Module dependencies.
+ */
+
+var accepts = require('accepts');
+var deprecate = require('depd')('express');
+var isIP = require('net').isIP;
+var typeis = require('type-is');
+var http = require('http');
+var fresh = require('fresh');
+var parseRange = require('range-parser');
+var parse = require('parseurl');
+var proxyaddr = require('proxy-addr');
+
+/**
+ * Request prototype.
+ */
+
+var req = exports = module.exports = {
+ __proto__: http.IncomingMessage.prototype
+};
+
+/**
+ * Return request header.
+ *
+ * The `Referrer` header field is special-cased,
+ * both `Referrer` and `Referer` are interchangeable.
+ *
+ * Examples:
+ *
+ * req.get('Content-Type');
+ * // => "text/plain"
+ *
+ * req.get('content-type');
+ * // => "text/plain"
+ *
+ * req.get('Something');
+ * // => undefined
+ *
+ * Aliased as `req.header()`.
+ *
+ * @param {String} name
+ * @return {String}
+ * @api public
+ */
+
+req.get =
+req.header = function(name){
+ switch (name = name.toLowerCase()) {
+ case 'referer':
+ case 'referrer':
+ return this.headers.referrer
+ || this.headers.referer;
+ default:
+ return this.headers[name];
+ }
+};
+
+/**
+ * To do: update docs.
+ *
+ * Check if the given `type(s)` is acceptable, returning
+ * the best match when true, otherwise `undefined`, in which
+ * case you should respond with 406 "Not Acceptable".
+ *
+ * The `type` value may be a single mime type string
+ * such as "application/json", the extension name
+ * such as "json", a comma-delimted list such as "json, html, text/plain",
+ * an argument list such as `"json", "html", "text/plain"`,
+ * or an array `["json", "html", "text/plain"]`. When a list
+ * or array is given the _best_ match, if any is returned.
+ *
+ * Examples:
+ *
+ * // Accept: text/html
+ * req.accepts('html');
+ * // => "html"
+ *
+ * // Accept: text/*, application/json
+ * req.accepts('html');
+ * // => "html"
+ * req.accepts('text/html');
+ * // => "text/html"
+ * req.accepts('json, text');
+ * // => "json"
+ * req.accepts('application/json');
+ * // => "application/json"
+ *
+ * // Accept: text/*, application/json
+ * req.accepts('image/png');
+ * req.accepts('png');
+ * // => undefined
+ *
+ * // Accept: text/*;q=.5, application/json
+ * req.accepts(['html', 'json']);
+ * req.accepts('html', 'json');
+ * req.accepts('html, json');
+ * // => "json"
+ *
+ * @param {String|Array} type(s)
+ * @return {String}
+ * @api public
+ */
+
+req.accepts = function(){
+ var accept = accepts(this);
+ return accept.types.apply(accept, arguments);
+};
+
+/**
+ * Check if the given `encoding`s are accepted.
+ *
+ * @param {String} ...encoding
+ * @return {Boolean}
+ * @api public
+ */
+
+req.acceptsEncodings = function(){
+ var accept = accepts(this);
+ return accept.encodings.apply(accept, arguments);
+};
+
+req.acceptsEncoding = deprecate.function(req.acceptsEncodings,
+ 'req.acceptsEncoding: Use acceptsEncodings instead');
+
+/**
+ * Check if the given `charset`s are acceptable,
+ * otherwise you should respond with 406 "Not Acceptable".
+ *
+ * @param {String} ...charset
+ * @return {Boolean}
+ * @api public
+ */
+
+req.acceptsCharsets = function(){
+ var accept = accepts(this);
+ return accept.charsets.apply(accept, arguments);
+};
+
+req.acceptsCharset = deprecate.function(req.acceptsCharsets,
+ 'req.acceptsCharset: Use acceptsCharsets instead');
+
+/**
+ * Check if the given `lang`s are acceptable,
+ * otherwise you should respond with 406 "Not Acceptable".
+ *
+ * @param {String} ...lang
+ * @return {Boolean}
+ * @api public
+ */
+
+req.acceptsLanguages = function(){
+ var accept = accepts(this);
+ return accept.languages.apply(accept, arguments);
+};
+
+req.acceptsLanguage = deprecate.function(req.acceptsLanguages,
+ 'req.acceptsLanguage: Use acceptsLanguages instead');
+
+/**
+ * Parse Range header field,
+ * capping to the given `size`.
+ *
+ * Unspecified ranges such as "0-" require
+ * knowledge of your resource length. In
+ * the case of a byte range this is of course
+ * the total number of bytes. If the Range
+ * header field is not given `null` is returned,
+ * `-1` when unsatisfiable, `-2` when syntactically invalid.
+ *
+ * NOTE: remember that ranges are inclusive, so
+ * for example "Range: users=0-3" should respond
+ * with 4 users when available, not 3.
+ *
+ * @param {Number} size
+ * @return {Array}
+ * @api public
+ */
+
+req.range = function(size){
+ var range = this.get('Range');
+ if (!range) return;
+ return parseRange(size, range);
+};
+
+/**
+ * Return the value of param `name` when present or `defaultValue`.
+ *
+ * - Checks route placeholders, ex: _/user/:id_
+ * - Checks body params, ex: id=12, {"id":12}
+ * - Checks query string params, ex: ?id=12
+ *
+ * To utilize request bodies, `req.body`
+ * should be an object. This can be done by using
+ * the `bodyParser()` middleware.
+ *
+ * @param {String} name
+ * @param {Mixed} [defaultValue]
+ * @return {String}
+ * @api public
+ */
+
+req.param = function param(name, defaultValue) {
+ var params = this.params || {};
+ var body = this.body || {};
+ var query = this.query || {};
+
+ var args = arguments.length === 1
+ ? 'name'
+ : 'name, default';
+ deprecate('req.param(' + args + '): Use req.params, req.body, or req.query instead');
+
+ if (null != params[name] && params.hasOwnProperty(name)) return params[name];
+ if (null != body[name]) return body[name];
+ if (null != query[name]) return query[name];
+
+ return defaultValue;
+};
+
+/**
+ * Check if the incoming request contains the "Content-Type"
+ * header field, and it contains the give mime `type`.
+ *
+ * Examples:
+ *
+ * // With Content-Type: text/html; charset=utf-8
+ * req.is('html');
+ * req.is('text/html');
+ * req.is('text/*');
+ * // => true
+ *
+ * // When Content-Type is application/json
+ * req.is('json');
+ * req.is('application/json');
+ * req.is('application/*');
+ * // => true
+ *
+ * req.is('html');
+ * // => false
+ *
+ * @param {String} type
+ * @return {Boolean}
+ * @api public
+ */
+
+req.is = function(types){
+ if (!Array.isArray(types)) types = [].slice.call(arguments);
+ return typeis(this, types);
+};
+
+/**
+ * Return the protocol string "http" or "https"
+ * when requested with TLS. When the "trust proxy"
+ * setting trusts the socket address, the
+ * "X-Forwarded-Proto" header field will be trusted
+ * and used if present.
+ *
+ * If you're running behind a reverse proxy that
+ * supplies https for you this may be enabled.
+ *
+ * @return {String}
+ * @api public
+ */
+
+defineGetter(req, 'protocol', function protocol(){
+ var proto = this.connection.encrypted
+ ? 'https'
+ : 'http';
+ var trust = this.app.get('trust proxy fn');
+
+ if (!trust(this.connection.remoteAddress)) {
+ return proto;
+ }
+
+ // Note: X-Forwarded-Proto is normally only ever a
+ // single value, but this is to be safe.
+ proto = this.get('X-Forwarded-Proto') || proto;
+ return proto.split(/\s*,\s*/)[0];
+});
+
+/**
+ * Short-hand for:
+ *
+ * req.protocol == 'https'
+ *
+ * @return {Boolean}
+ * @api public
+ */
+
+defineGetter(req, 'secure', function secure(){
+ return 'https' == this.protocol;
+});
+
+/**
+ * Return the remote address from the trusted proxy.
+ *
+ * The is the remote address on the socket unless
+ * "trust proxy" is set.
+ *
+ * @return {String}
+ * @api public
+ */
+
+defineGetter(req, 'ip', function ip(){
+ var trust = this.app.get('trust proxy fn');
+ return proxyaddr(this, trust);
+});
+
+/**
+ * When "trust proxy" is set, trusted proxy addresses + client.
+ *
+ * For example if the value were "client, proxy1, proxy2"
+ * you would receive the array `["client", "proxy1", "proxy2"]`
+ * where "proxy2" is the furthest down-stream and "proxy1" and
+ * "proxy2" were trusted.
+ *
+ * @return {Array}
+ * @api public
+ */
+
+defineGetter(req, 'ips', function ips() {
+ var trust = this.app.get('trust proxy fn');
+ var addrs = proxyaddr.all(this, trust);
+ return addrs.slice(1).reverse();
+});
+
+/**
+ * Return subdomains as an array.
+ *
+ * Subdomains are the dot-separated parts of the host before the main domain of
+ * the app. By default, the domain of the app is assumed to be the last two
+ * parts of the host. This can be changed by setting "subdomain offset".
+ *
+ * For example, if the domain is "tobi.ferrets.example.com":
+ * If "subdomain offset" is not set, req.subdomains is `["ferrets", "tobi"]`.
+ * If "subdomain offset" is 3, req.subdomains is `["tobi"]`.
+ *
+ * @return {Array}
+ * @api public
+ */
+
+defineGetter(req, 'subdomains', function subdomains() {
+ var hostname = this.hostname;
+
+ if (!hostname) return [];
+
+ var offset = this.app.get('subdomain offset');
+ var subdomains = !isIP(hostname)
+ ? hostname.split('.').reverse()
+ : [hostname];
+
+ return subdomains.slice(offset);
+});
+
+/**
+ * Short-hand for `url.parse(req.url).pathname`.
+ *
+ * @return {String}
+ * @api public
+ */
+
+defineGetter(req, 'path', function path() {
+ return parse(this).pathname;
+});
+
+/**
+ * Parse the "Host" header field to a hostname.
+ *
+ * When the "trust proxy" setting trusts the socket
+ * address, the "X-Forwarded-Host" header field will
+ * be trusted.
+ *
+ * @return {String}
+ * @api public
+ */
+
+defineGetter(req, 'hostname', function hostname(){
+ var trust = this.app.get('trust proxy fn');
+ var host = this.get('X-Forwarded-Host');
+
+ if (!host || !trust(this.connection.remoteAddress)) {
+ host = this.get('Host');
+ }
+
+ if (!host) return;
+
+ // IPv6 literal support
+ var offset = host[0] === '['
+ ? host.indexOf(']') + 1
+ : 0;
+ var index = host.indexOf(':', offset);
+
+ return ~index
+ ? host.substring(0, index)
+ : host;
+});
+
+// TODO: change req.host to return host in next major
+
+defineGetter(req, 'host', deprecate.function(function host(){
+ return this.hostname;
+}, 'req.host: Use req.hostname instead'));
+
+/**
+ * Check if the request is fresh, aka
+ * Last-Modified and/or the ETag
+ * still match.
+ *
+ * @return {Boolean}
+ * @api public
+ */
+
+defineGetter(req, 'fresh', function(){
+ var method = this.method;
+ var s = this.res.statusCode;
+
+ // GET or HEAD for weak freshness validation only
+ if ('GET' != method && 'HEAD' != method) return false;
+
+ // 2xx or 304 as per rfc2616 14.26
+ if ((s >= 200 && s < 300) || 304 == s) {
+ return fresh(this.headers, (this.res._headers || {}));
+ }
+
+ return false;
+});
+
+/**
+ * Check if the request is stale, aka
+ * "Last-Modified" and / or the "ETag" for the
+ * resource has changed.
+ *
+ * @return {Boolean}
+ * @api public
+ */
+
+defineGetter(req, 'stale', function stale(){
+ return !this.fresh;
+});
+
+/**
+ * Check if the request was an _XMLHttpRequest_.
+ *
+ * @return {Boolean}
+ * @api public
+ */
+
+defineGetter(req, 'xhr', function xhr(){
+ var val = this.get('X-Requested-With') || '';
+ return 'xmlhttprequest' == val.toLowerCase();
+});
+
+/**
+ * Helper function for creating a getter on an object.
+ *
+ * @param {Object} obj
+ * @param {String} name
+ * @param {Function} getter
+ * @api private
+ */
+function defineGetter(obj, name, getter) {
+ Object.defineProperty(obj, name, {
+ configurable: true,
+ enumerable: true,
+ get: getter
+ });
+};
diff --git a/dgbuilder/dgeflows/node_modules/express/lib/response.js b/dgbuilder/dgeflows/node_modules/express/lib/response.js
new file mode 100644
index 0000000..14aa9ca
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/lib/response.js
@@ -0,0 +1,1024 @@
+/**
+ * Module dependencies.
+ */
+
+var contentDisposition = require('content-disposition');
+var deprecate = require('depd')('express');
+var escapeHtml = require('escape-html');
+var http = require('http');
+var isAbsolute = require('./utils').isAbsolute;
+var onFinished = require('on-finished');
+var path = require('path');
+var merge = require('utils-merge');
+var sign = require('cookie-signature').sign;
+var normalizeType = require('./utils').normalizeType;
+var normalizeTypes = require('./utils').normalizeTypes;
+var setCharset = require('./utils').setCharset;
+var statusCodes = http.STATUS_CODES;
+var cookie = require('cookie');
+var send = require('send');
+var extname = path.extname;
+var mime = send.mime;
+var resolve = path.resolve;
+var vary = require('vary');
+
+/**
+ * Response prototype.
+ */
+
+var res = module.exports = {
+ __proto__: http.ServerResponse.prototype
+};
+
+/**
+ * Set status `code`.
+ *
+ * @param {Number} code
+ * @return {ServerResponse}
+ * @api public
+ */
+
+res.status = function(code){
+ this.statusCode = code;
+ return this;
+};
+
+/**
+ * Set Link header field with the given `links`.
+ *
+ * Examples:
+ *
+ * res.links({
+ * next: 'http://api.example.com/users?page=2',
+ * last: 'http://api.example.com/users?page=5'
+ * });
+ *
+ * @param {Object} links
+ * @return {ServerResponse}
+ * @api public
+ */
+
+res.links = function(links){
+ var link = this.get('Link') || '';
+ if (link) link += ', ';
+ return this.set('Link', link + Object.keys(links).map(function(rel){
+ return '<' + links[rel] + '>; rel="' + rel + '"';
+ }).join(', '));
+};
+
+/**
+ * Send a response.
+ *
+ * Examples:
+ *
+ * res.send(new Buffer('wahoo'));
+ * res.send({ some: 'json' });
+ * res.send('<p>some html</p>');
+ *
+ * @param {string|number|boolean|object|Buffer} body
+ * @api public
+ */
+
+res.send = function send(body) {
+ var chunk = body;
+ var encoding;
+ var len;
+ var req = this.req;
+ var type;
+
+ // settings
+ var app = this.app;
+
+ // allow status / body
+ if (arguments.length === 2) {
+ // res.send(body, status) backwards compat
+ if (typeof arguments[0] !== 'number' && typeof arguments[1] === 'number') {
+ deprecate('res.send(body, status): Use res.status(status).send(body) instead');
+ this.statusCode = arguments[1];
+ } else {
+ deprecate('res.send(status, body): Use res.status(status).send(body) instead');
+ this.statusCode = arguments[0];
+ chunk = arguments[1];
+ }
+ }
+
+ // disambiguate res.send(status) and res.send(status, num)
+ if (typeof chunk === 'number' && arguments.length === 1) {
+ // res.send(status) will set status message as text string
+ if (!this.get('Content-Type')) {
+ this.type('txt');
+ }
+
+ deprecate('res.send(status): Use res.sendStatus(status) instead');
+ this.statusCode = chunk;
+ chunk = http.STATUS_CODES[chunk];
+ }
+
+ switch (typeof chunk) {
+ // string defaulting to html
+ case 'string':
+ if (!this.get('Content-Type')) {
+ this.type('html');
+ }
+ break;
+ case 'boolean':
+ case 'number':
+ case 'object':
+ if (chunk === null) {
+ chunk = '';
+ } else if (Buffer.isBuffer(chunk)) {
+ if (!this.get('Content-Type')) {
+ this.type('bin');
+ }
+ } else {
+ return this.json(chunk);
+ }
+ break;
+ }
+
+ // write strings in utf-8
+ if (typeof chunk === 'string') {
+ encoding = 'utf8';
+ type = this.get('Content-Type');
+
+ // reflect this in content-type
+ if (typeof type === 'string') {
+ this.set('Content-Type', setCharset(type, 'utf-8'));
+ }
+ }
+
+ // populate Content-Length
+ if (chunk !== undefined) {
+ if (!Buffer.isBuffer(chunk)) {
+ // convert chunk to Buffer; saves later double conversions
+ chunk = new Buffer(chunk, encoding);
+ encoding = undefined;
+ }
+
+ len = chunk.length;
+ this.set('Content-Length', len);
+ }
+
+ // method check
+ var isHead = req.method === 'HEAD';
+
+ // ETag support
+ if (len !== undefined && (isHead || req.method === 'GET')) {
+ var etag = app.get('etag fn');
+ if (etag && !this.get('ETag')) {
+ etag = etag(chunk, encoding);
+ etag && this.set('ETag', etag);
+ }
+ }
+
+ // freshness
+ if (req.fresh) this.statusCode = 304;
+
+ // strip irrelevant headers
+ if (204 == this.statusCode || 304 == this.statusCode) {
+ this.removeHeader('Content-Type');
+ this.removeHeader('Content-Length');
+ this.removeHeader('Transfer-Encoding');
+ chunk = '';
+ }
+
+ if (isHead) {
+ // skip body for HEAD
+ this.end();
+ } else {
+ // respond
+ this.end(chunk, encoding);
+ }
+
+ return this;
+};
+
+/**
+ * Send JSON response.
+ *
+ * Examples:
+ *
+ * res.json(null);
+ * res.json({ user: 'tj' });
+ *
+ * @param {string|number|boolean|object} obj
+ * @api public
+ */
+
+res.json = function json(obj) {
+ var val = obj;
+
+ // allow status / body
+ if (arguments.length === 2) {
+ // res.json(body, status) backwards compat
+ if (typeof arguments[1] === 'number') {
+ deprecate('res.json(obj, status): Use res.status(status).json(obj) instead');
+ this.statusCode = arguments[1];
+ } else {
+ deprecate('res.json(status, obj): Use res.status(status).json(obj) instead');
+ this.statusCode = arguments[0];
+ val = arguments[1];
+ }
+ }
+
+ // settings
+ var app = this.app;
+ var replacer = app.get('json replacer');
+ var spaces = app.get('json spaces');
+ var body = JSON.stringify(val, replacer, spaces);
+
+ // content-type
+ if (!this.get('Content-Type')) {
+ this.set('Content-Type', 'application/json');
+ }
+
+ return this.send(body);
+};
+
+/**
+ * Send JSON response with JSONP callback support.
+ *
+ * Examples:
+ *
+ * res.jsonp(null);
+ * res.jsonp({ user: 'tj' });
+ *
+ * @param {string|number|boolean|object} obj
+ * @api public
+ */
+
+res.jsonp = function jsonp(obj) {
+ var val = obj;
+
+ // allow status / body
+ if (arguments.length === 2) {
+ // res.json(body, status) backwards compat
+ if (typeof arguments[1] === 'number') {
+ deprecate('res.jsonp(obj, status): Use res.status(status).json(obj) instead');
+ this.statusCode = arguments[1];
+ } else {
+ deprecate('res.jsonp(status, obj): Use res.status(status).jsonp(obj) instead');
+ this.statusCode = arguments[0];
+ val = arguments[1];
+ }
+ }
+
+ // settings
+ var app = this.app;
+ var replacer = app.get('json replacer');
+ var spaces = app.get('json spaces');
+ var body = JSON.stringify(val, replacer, spaces);
+ var callback = this.req.query[app.get('jsonp callback name')];
+
+ // content-type
+ if (!this.get('Content-Type')) {
+ this.set('X-Content-Type-Options', 'nosniff');
+ this.set('Content-Type', 'application/json');
+ }
+
+ // fixup callback
+ if (Array.isArray(callback)) {
+ callback = callback[0];
+ }
+
+ // jsonp
+ if (typeof callback === 'string' && callback.length !== 0) {
+ this.charset = 'utf-8';
+ this.set('X-Content-Type-Options', 'nosniff');
+ this.set('Content-Type', 'text/javascript');
+
+ // restrict callback charset
+ callback = callback.replace(/[^\[\]\w$.]/g, '');
+
+ // replace chars not allowed in JavaScript that are in JSON
+ body = body
+ .replace(/\u2028/g, '\\u2028')
+ .replace(/\u2029/g, '\\u2029');
+
+ // the /**/ is a specific security mitigation for "Rosetta Flash JSONP abuse"
+ // the typeof check is just to reduce client error noise
+ body = '/**/ typeof ' + callback + ' === \'function\' && ' + callback + '(' + body + ');';
+ }
+
+ return this.send(body);
+};
+
+/**
+ * Send given HTTP status code.
+ *
+ * Sets the response status to `statusCode` and the body of the
+ * response to the standard description from node's http.STATUS_CODES
+ * or the statusCode number if no description.
+ *
+ * Examples:
+ *
+ * res.sendStatus(200);
+ *
+ * @param {number} statusCode
+ * @api public
+ */
+
+res.sendStatus = function sendStatus(statusCode) {
+ var body = http.STATUS_CODES[statusCode] || String(statusCode);
+
+ this.statusCode = statusCode;
+ this.type('txt');
+
+ return this.send(body);
+};
+
+/**
+ * Transfer the file at the given `path`.
+ *
+ * Automatically sets the _Content-Type_ response header field.
+ * The callback `fn(err)` is invoked when the transfer is complete
+ * or when an error occurs. Be sure to check `res.sentHeader`
+ * if you wish to attempt responding, as the header and some data
+ * may have already been transferred.
+ *
+ * Options:
+ *
+ * - `maxAge` defaulting to 0 (can be string converted by `ms`)
+ * - `root` root directory for relative filenames
+ * - `headers` object of headers to serve with file
+ * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them
+ *
+ * Other options are passed along to `send`.
+ *
+ * Examples:
+ *
+ * The following example illustrates how `res.sendFile()` may
+ * be used as an alternative for the `static()` middleware for
+ * dynamic situations. The code backing `res.sendFile()` is actually
+ * the same code, so HTTP cache support etc is identical.
+ *
+ * app.get('/user/:uid/photos/:file', function(req, res){
+ * var uid = req.params.uid
+ * , file = req.params.file;
+ *
+ * req.user.mayViewFilesFrom(uid, function(yes){
+ * if (yes) {
+ * res.sendFile('/uploads/' + uid + '/' + file);
+ * } else {
+ * res.send(403, 'Sorry! you cant see that.');
+ * }
+ * });
+ * });
+ *
+ * @api public
+ */
+
+res.sendFile = function sendFile(path, options, fn) {
+ var req = this.req;
+ var res = this;
+ var next = req.next;
+
+ if (!path) {
+ throw new TypeError('path argument is required to res.sendFile');
+ }
+
+ // support function as second arg
+ if (typeof options === 'function') {
+ fn = options;
+ options = {};
+ }
+
+ options = options || {};
+
+ if (!options.root && !isAbsolute(path)) {
+ throw new TypeError('path must be absolute or specify root to res.sendFile');
+ }
+
+ // create file stream
+ var pathname = encodeURI(path);
+ var file = send(req, pathname, options);
+
+ // transfer
+ sendfile(res, file, options, function (err) {
+ if (fn) return fn(err);
+ if (err && err.code === 'EISDIR') return next();
+
+ // next() all but write errors
+ if (err && err.code !== 'ECONNABORT' && err.syscall !== 'write') {
+ next(err);
+ }
+ });
+};
+
+/**
+ * Transfer the file at the given `path`.
+ *
+ * Automatically sets the _Content-Type_ response header field.
+ * The callback `fn(err)` is invoked when the transfer is complete
+ * or when an error occurs. Be sure to check `res.sentHeader`
+ * if you wish to attempt responding, as the header and some data
+ * may have already been transferred.
+ *
+ * Options:
+ *
+ * - `maxAge` defaulting to 0 (can be string converted by `ms`)
+ * - `root` root directory for relative filenames
+ * - `headers` object of headers to serve with file
+ * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them
+ *
+ * Other options are passed along to `send`.
+ *
+ * Examples:
+ *
+ * The following example illustrates how `res.sendfile()` may
+ * be used as an alternative for the `static()` middleware for
+ * dynamic situations. The code backing `res.sendfile()` is actually
+ * the same code, so HTTP cache support etc is identical.
+ *
+ * app.get('/user/:uid/photos/:file', function(req, res){
+ * var uid = req.params.uid
+ * , file = req.params.file;
+ *
+ * req.user.mayViewFilesFrom(uid, function(yes){
+ * if (yes) {
+ * res.sendfile('/uploads/' + uid + '/' + file);
+ * } else {
+ * res.send(403, 'Sorry! you cant see that.');
+ * }
+ * });
+ * });
+ *
+ * @api public
+ */
+
+res.sendfile = function(path, options, fn){
+ var req = this.req;
+ var res = this;
+ var next = req.next;
+
+ // support function as second arg
+ if (typeof options === 'function') {
+ fn = options;
+ options = {};
+ }
+
+ options = options || {};
+
+ // create file stream
+ var file = send(req, path, options);
+
+ // transfer
+ sendfile(res, file, options, function (err) {
+ if (fn) return fn(err);
+ if (err && err.code === 'EISDIR') return next();
+
+ // next() all but write errors
+ if (err && err.code !== 'ECONNABORT' && err.syscall !== 'write') {
+ next(err);
+ }
+ });
+};
+
+res.sendfile = deprecate.function(res.sendfile,
+ 'res.sendfile: Use res.sendFile instead');
+
+/**
+ * Transfer the file at the given `path` as an attachment.
+ *
+ * Optionally providing an alternate attachment `filename`,
+ * and optional callback `fn(err)`. The callback is invoked
+ * when the data transfer is complete, or when an error has
+ * ocurred. Be sure to check `res.headersSent` if you plan to respond.
+ *
+ * This method uses `res.sendfile()`.
+ *
+ * @api public
+ */
+
+res.download = function download(path, filename, fn) {
+ // support function as second arg
+ if (typeof filename === 'function') {
+ fn = filename;
+ filename = null;
+ }
+
+ filename = filename || path;
+
+ // set Content-Disposition when file is sent
+ var headers = {
+ 'Content-Disposition': contentDisposition(filename)
+ };
+
+ // Resolve the full path for sendFile
+ var fullPath = resolve(path);
+
+ return this.sendFile(fullPath, { headers: headers }, fn);
+};
+
+/**
+ * Set _Content-Type_ response header with `type` through `mime.lookup()`
+ * when it does not contain "/", or set the Content-Type to `type` otherwise.
+ *
+ * Examples:
+ *
+ * res.type('.html');
+ * res.type('html');
+ * res.type('json');
+ * res.type('application/json');
+ * res.type('png');
+ *
+ * @param {String} type
+ * @return {ServerResponse} for chaining
+ * @api public
+ */
+
+res.contentType =
+res.type = function(type){
+ return this.set('Content-Type', ~type.indexOf('/')
+ ? type
+ : mime.lookup(type));
+};
+
+/**
+ * Respond to the Acceptable formats using an `obj`
+ * of mime-type callbacks.
+ *
+ * This method uses `req.accepted`, an array of
+ * acceptable types ordered by their quality values.
+ * When "Accept" is not present the _first_ callback
+ * is invoked, otherwise the first match is used. When
+ * no match is performed the server responds with
+ * 406 "Not Acceptable".
+ *
+ * Content-Type is set for you, however if you choose
+ * you may alter this within the callback using `res.type()`
+ * or `res.set('Content-Type', ...)`.
+ *
+ * res.format({
+ * 'text/plain': function(){
+ * res.send('hey');
+ * },
+ *
+ * 'text/html': function(){
+ * res.send('<p>hey</p>');
+ * },
+ *
+ * 'appliation/json': function(){
+ * res.send({ message: 'hey' });
+ * }
+ * });
+ *
+ * In addition to canonicalized MIME types you may
+ * also use extnames mapped to these types:
+ *
+ * res.format({
+ * text: function(){
+ * res.send('hey');
+ * },
+ *
+ * html: function(){
+ * res.send('<p>hey</p>');
+ * },
+ *
+ * json: function(){
+ * res.send({ message: 'hey' });
+ * }
+ * });
+ *
+ * By default Express passes an `Error`
+ * with a `.status` of 406 to `next(err)`
+ * if a match is not made. If you provide
+ * a `.default` callback it will be invoked
+ * instead.
+ *
+ * @param {Object} obj
+ * @return {ServerResponse} for chaining
+ * @api public
+ */
+
+res.format = function(obj){
+ var req = this.req;
+ var next = req.next;
+
+ var fn = obj.default;
+ if (fn) delete obj.default;
+ var keys = Object.keys(obj);
+
+ var key = req.accepts(keys);
+
+ this.vary("Accept");
+
+ if (key) {
+ this.set('Content-Type', normalizeType(key).value);
+ obj[key](req, this, next);
+ } else if (fn) {
+ fn();
+ } else {
+ var err = new Error('Not Acceptable');
+ err.status = 406;
+ err.types = normalizeTypes(keys).map(function(o){ return o.value });
+ next(err);
+ }
+
+ return this;
+};
+
+/**
+ * Set _Content-Disposition_ header to _attachment_ with optional `filename`.
+ *
+ * @param {String} filename
+ * @return {ServerResponse}
+ * @api public
+ */
+
+res.attachment = function attachment(filename) {
+ if (filename) {
+ this.type(extname(filename));
+ }
+
+ this.set('Content-Disposition', contentDisposition(filename));
+
+ return this;
+};
+
+/**
+ * Append additional header `field` with value `val`.
+ *
+ * Example:
+ *
+ * res.append('Link', ['<http://localhost/>', '<http://localhost:3000/>']);
+ * res.append('Set-Cookie', 'foo=bar; Path=/; HttpOnly');
+ * res.append('Warning', '199 Miscellaneous warning');
+ *
+ * @param {String} field
+ * @param {String|Array} val
+ * @return {ServerResponse} for chaining
+ * @api public
+ */
+
+res.append = function append(field, val) {
+ var prev = this.get(field);
+ var value = val;
+
+ if (prev) {
+ // concat the new and prev vals
+ value = Array.isArray(prev) ? prev.concat(val)
+ : Array.isArray(val) ? [prev].concat(val)
+ : [prev, val];
+ }
+
+ return this.set(field, value);
+};
+
+/**
+ * Set header `field` to `val`, or pass
+ * an object of header fields.
+ *
+ * Examples:
+ *
+ * res.set('Foo', ['bar', 'baz']);
+ * res.set('Accept', 'application/json');
+ * res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' });
+ *
+ * Aliased as `res.header()`.
+ *
+ * @param {String|Object|Array} field
+ * @param {String} val
+ * @return {ServerResponse} for chaining
+ * @api public
+ */
+
+res.set =
+res.header = function header(field, val) {
+ if (arguments.length === 2) {
+ if (Array.isArray(val)) val = val.map(String);
+ else val = String(val);
+ if ('content-type' == field.toLowerCase() && !/;\s*charset\s*=/.test(val)) {
+ var charset = mime.charsets.lookup(val.split(';')[0]);
+ if (charset) val += '; charset=' + charset.toLowerCase();
+ }
+ this.setHeader(field, val);
+ } else {
+ for (var key in field) {
+ this.set(key, field[key]);
+ }
+ }
+ return this;
+};
+
+/**
+ * Get value for header `field`.
+ *
+ * @param {String} field
+ * @return {String}
+ * @api public
+ */
+
+res.get = function(field){
+ return this.getHeader(field);
+};
+
+/**
+ * Clear cookie `name`.
+ *
+ * @param {String} name
+ * @param {Object} options
+ * @return {ServerResponse} for chaining
+ * @api public
+ */
+
+res.clearCookie = function(name, options){
+ var opts = { expires: new Date(1), path: '/' };
+ return this.cookie(name, '', options
+ ? merge(opts, options)
+ : opts);
+};
+
+/**
+ * Set cookie `name` to `val`, with the given `options`.
+ *
+ * Options:
+ *
+ * - `maxAge` max-age in milliseconds, converted to `expires`
+ * - `signed` sign the cookie
+ * - `path` defaults to "/"
+ *
+ * Examples:
+ *
+ * // "Remember Me" for 15 minutes
+ * res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true });
+ *
+ * // save as above
+ * res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true })
+ *
+ * @param {String} name
+ * @param {String|Object} val
+ * @param {Options} options
+ * @return {ServerResponse} for chaining
+ * @api public
+ */
+
+res.cookie = function(name, val, options){
+ options = merge({}, options);
+ var secret = this.req.secret;
+ var signed = options.signed;
+ if (signed && !secret) throw new Error('cookieParser("secret") required for signed cookies');
+ if ('number' == typeof val) val = val.toString();
+ if ('object' == typeof val) val = 'j:' + JSON.stringify(val);
+ if (signed) val = 's:' + sign(val, secret);
+ if ('maxAge' in options) {
+ options.expires = new Date(Date.now() + options.maxAge);
+ options.maxAge /= 1000;
+ }
+ if (null == options.path) options.path = '/';
+ var headerVal = cookie.serialize(name, String(val), options);
+
+ // supports multiple 'res.cookie' calls by getting previous value
+ var prev = this.get('Set-Cookie');
+ if (prev) {
+ if (Array.isArray(prev)) {
+ headerVal = prev.concat(headerVal);
+ } else {
+ headerVal = [prev, headerVal];
+ }
+ }
+ this.set('Set-Cookie', headerVal);
+ return this;
+};
+
+
+/**
+ * Set the location header to `url`.
+ *
+ * The given `url` can also be "back", which redirects
+ * to the _Referrer_ or _Referer_ headers or "/".
+ *
+ * Examples:
+ *
+ * res.location('/foo/bar').;
+ * res.location('http://example.com');
+ * res.location('../login');
+ *
+ * @param {String} url
+ * @return {ServerResponse} for chaining
+ * @api public
+ */
+
+res.location = function(url){
+ var req = this.req;
+
+ // "back" is an alias for the referrer
+ if ('back' == url) url = req.get('Referrer') || '/';
+
+ // Respond
+ this.set('Location', url);
+ return this;
+};
+
+/**
+ * Redirect to the given `url` with optional response `status`
+ * defaulting to 302.
+ *
+ * The resulting `url` is determined by `res.location()`, so
+ * it will play nicely with mounted apps, relative paths,
+ * `"back"` etc.
+ *
+ * Examples:
+ *
+ * res.redirect('/foo/bar');
+ * res.redirect('http://example.com');
+ * res.redirect(301, 'http://example.com');
+ * res.redirect('../login'); // /blog/post/1 -> /blog/login
+ *
+ * @api public
+ */
+
+res.redirect = function redirect(url) {
+ var address = url;
+ var body;
+ var status = 302;
+
+ // allow status / url
+ if (arguments.length === 2) {
+ if (typeof arguments[0] === 'number') {
+ status = arguments[0];
+ address = arguments[1];
+ } else {
+ deprecate('res.redirect(url, status): Use res.redirect(status, url) instead');
+ status = arguments[1];
+ }
+ }
+
+ // Set location header
+ this.location(address);
+ address = this.get('Location');
+
+ // Support text/{plain,html} by default
+ this.format({
+ text: function(){
+ body = statusCodes[status] + '. Redirecting to ' + encodeURI(address);
+ },
+
+ html: function(){
+ var u = escapeHtml(address);
+ body = '<p>' + statusCodes[status] + '. Redirecting to <a href="' + u + '">' + u + '</a></p>';
+ },
+
+ default: function(){
+ body = '';
+ }
+ });
+
+ // Respond
+ this.statusCode = status;
+ this.set('Content-Length', Buffer.byteLength(body));
+
+ if (this.req.method === 'HEAD') {
+ this.end();
+ } else {
+ this.end(body);
+ }
+};
+
+/**
+ * Add `field` to Vary. If already present in the Vary set, then
+ * this call is simply ignored.
+ *
+ * @param {Array|String} field
+ * @return {ServerResponse} for chaining
+ * @api public
+ */
+
+res.vary = function(field){
+ // checks for back-compat
+ if (!field || (Array.isArray(field) && !field.length)) {
+ deprecate('res.vary(): Provide a field name');
+ return this;
+ }
+
+ vary(this, field);
+
+ return this;
+};
+
+/**
+ * Render `view` with the given `options` and optional callback `fn`.
+ * When a callback function is given a response will _not_ be made
+ * automatically, otherwise a response of _200_ and _text/html_ is given.
+ *
+ * Options:
+ *
+ * - `cache` boolean hinting to the engine it should cache
+ * - `filename` filename of the view being rendered
+ *
+ * @api public
+ */
+
+res.render = function(view, options, fn){
+ options = options || {};
+ var self = this;
+ var req = this.req;
+ var app = req.app;
+
+ // support callback function as second arg
+ if ('function' == typeof options) {
+ fn = options, options = {};
+ }
+
+ // merge res.locals
+ options._locals = self.locals;
+
+ // default callback to respond
+ fn = fn || function(err, str){
+ if (err) return req.next(err);
+ self.send(str);
+ };
+
+ // render
+ app.render(view, options, fn);
+};
+
+// pipe the send file stream
+function sendfile(res, file, options, callback) {
+ var done = false;
+ var streaming;
+
+ // request aborted
+ function onaborted() {
+ if (done) return;
+ done = true;
+
+ var err = new Error('Request aborted');
+ err.code = 'ECONNABORT';
+ callback(err);
+ }
+
+ // directory
+ function ondirectory() {
+ if (done) return;
+ done = true;
+
+ var err = new Error('EISDIR, read');
+ err.code = 'EISDIR';
+ callback(err);
+ }
+
+ // errors
+ function onerror(err) {
+ if (done) return;
+ done = true;
+ callback(err);
+ }
+
+ // ended
+ function onend() {
+ if (done) return;
+ done = true;
+ callback();
+ }
+
+ // file
+ function onfile() {
+ streaming = false;
+ }
+
+ // finished
+ function onfinish(err) {
+ if (err) return onerror(err);
+ if (done) return;
+
+ setImmediate(function () {
+ if (streaming !== false && !done) {
+ onaborted();
+ return;
+ }
+
+ if (done) return;
+ done = true;
+ callback();
+ });
+ }
+
+ // streaming
+ function onstream() {
+ streaming = true;
+ }
+
+ file.on('directory', ondirectory);
+ file.on('end', onend);
+ file.on('error', onerror);
+ file.on('file', onfile);
+ file.on('stream', onstream);
+ onFinished(res, onfinish);
+
+ if (options.headers) {
+ // set headers on successful transfer
+ file.on('headers', function headers(res) {
+ var obj = options.headers;
+ var keys = Object.keys(obj);
+
+ for (var i = 0; i < keys.length; i++) {
+ var k = keys[i];
+ res.setHeader(k, obj[k]);
+ }
+ });
+ }
+
+ // pipe
+ file.pipe(res);
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/lib/router/index.js b/dgbuilder/dgeflows/node_modules/express/lib/router/index.js
new file mode 100644
index 0000000..209f881
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/lib/router/index.js
@@ -0,0 +1,630 @@
+
+/**
+ * Module dependencies.
+ */
+
+var Route = require('./route');
+var Layer = require('./layer');
+var methods = require('methods');
+var mixin = require('utils-merge');
+var debug = require('debug')('express:router');
+var deprecate = require('depd')('express');
+var parseUrl = require('parseurl');
+var utils = require('../utils');
+
+/**
+ * Module variables.
+ */
+
+var objectRegExp = /^\[object (\S+)\]$/;
+var slice = Array.prototype.slice;
+var toString = Object.prototype.toString;
+
+/**
+ * Initialize a new `Router` with the given `options`.
+ *
+ * @param {Object} options
+ * @return {Router} which is an callable function
+ * @api public
+ */
+
+var proto = module.exports = function(options) {
+ options = options || {};
+
+ function router(req, res, next) {
+ router.handle(req, res, next);
+ }
+
+ // mixin Router class functions
+ router.__proto__ = proto;
+
+ router.params = {};
+ router._params = [];
+ router.caseSensitive = options.caseSensitive;
+ router.mergeParams = options.mergeParams;
+ router.strict = options.strict;
+ router.stack = [];
+
+ return router;
+};
+
+/**
+ * Map the given param placeholder `name`(s) to the given callback.
+ *
+ * Parameter mapping is used to provide pre-conditions to routes
+ * which use normalized placeholders. For example a _:user_id_ parameter
+ * could automatically load a user's information from the database without
+ * any additional code,
+ *
+ * The callback uses the same signature as middleware, the only difference
+ * being that the value of the placeholder is passed, in this case the _id_
+ * of the user. Once the `next()` function is invoked, just like middleware
+ * it will continue on to execute the route, or subsequent parameter functions.
+ *
+ * Just like in middleware, you must either respond to the request or call next
+ * to avoid stalling the request.
+ *
+ * app.param('user_id', function(req, res, next, id){
+ * User.find(id, function(err, user){
+ * if (err) {
+ * return next(err);
+ * } else if (!user) {
+ * return next(new Error('failed to load user'));
+ * }
+ * req.user = user;
+ * next();
+ * });
+ * });
+ *
+ * @param {String} name
+ * @param {Function} fn
+ * @return {app} for chaining
+ * @api public
+ */
+
+proto.param = function param(name, fn) {
+ // param logic
+ if (typeof name === 'function') {
+ deprecate('router.param(fn): Refactor to use path params');
+ this._params.push(name);
+ return;
+ }
+
+ // apply param functions
+ var params = this._params;
+ var len = params.length;
+ var ret;
+
+ if (name[0] === ':') {
+ deprecate('router.param(' + JSON.stringify(name) + ', fn): Use router.param(' + JSON.stringify(name.substr(1)) + ', fn) instead');
+ name = name.substr(1);
+ }
+
+ for (var i = 0; i < len; ++i) {
+ if (ret = params[i](name, fn)) {
+ fn = ret;
+ }
+ }
+
+ // ensure we end up with a
+ // middleware function
+ if ('function' != typeof fn) {
+ throw new Error('invalid param() call for ' + name + ', got ' + fn);
+ }
+
+ (this.params[name] = this.params[name] || []).push(fn);
+ return this;
+};
+
+/**
+ * Dispatch a req, res into the router.
+ *
+ * @api private
+ */
+
+proto.handle = function(req, res, done) {
+ var self = this;
+
+ debug('dispatching %s %s', req.method, req.url);
+
+ var search = 1 + req.url.indexOf('?');
+ var pathlength = search ? search - 1 : req.url.length;
+ var fqdn = req.url[0] !== '/' && 1 + req.url.substr(0, pathlength).indexOf('://');
+ var protohost = fqdn ? req.url.substr(0, req.url.indexOf('/', 2 + fqdn)) : '';
+ var idx = 0;
+ var removed = '';
+ var slashAdded = false;
+ var paramcalled = {};
+
+ // store options for OPTIONS request
+ // only used if OPTIONS request
+ var options = [];
+
+ // middleware and routes
+ var stack = self.stack;
+
+ // manage inter-router variables
+ var parentParams = req.params;
+ var parentUrl = req.baseUrl || '';
+ done = restore(done, req, 'baseUrl', 'next', 'params');
+
+ // setup next layer
+ req.next = next;
+
+ // for options requests, respond with a default if nothing else responds
+ if (req.method === 'OPTIONS') {
+ done = wrap(done, function(old, err) {
+ if (err || options.length === 0) return old(err);
+ sendOptionsResponse(res, options, old);
+ });
+ }
+
+ // setup basic req values
+ req.baseUrl = parentUrl;
+ req.originalUrl = req.originalUrl || req.url;
+
+ next();
+
+ function next(err) {
+ var layerError = err === 'route'
+ ? null
+ : err;
+
+ // remove added slash
+ if (slashAdded) {
+ req.url = req.url.substr(1);
+ slashAdded = false;
+ }
+
+ // restore altered req.url
+ if (removed.length !== 0) {
+ req.baseUrl = parentUrl;
+ req.url = protohost + removed + req.url.substr(protohost.length);
+ removed = '';
+ }
+
+ // no more matching layers
+ if (idx >= stack.length) {
+ setImmediate(done, layerError);
+ return;
+ }
+
+ // get pathname of request
+ var path = getPathname(req);
+
+ if (path == null) {
+ return done(layerError);
+ }
+
+ // find next matching layer
+ var layer;
+ var match;
+ var route;
+
+ while (match !== true && idx < stack.length) {
+ layer = stack[idx++];
+ match = matchLayer(layer, path);
+ route = layer.route;
+
+ if (typeof match !== 'boolean') {
+ // hold on to layerError
+ layerError = layerError || match;
+ }
+
+ if (match !== true) {
+ continue;
+ }
+
+ if (!route) {
+ // process non-route handlers normally
+ continue;
+ }
+
+ if (layerError) {
+ // routes do not match with a pending error
+ match = false;
+ continue;
+ }
+
+ var method = req.method;
+ var has_method = route._handles_method(method);
+
+ // build up automatic options response
+ if (!has_method && method === 'OPTIONS') {
+ appendMethods(options, route._options());
+ }
+
+ // don't even bother matching route
+ if (!has_method && method !== 'HEAD') {
+ match = false;
+ continue;
+ }
+ }
+
+ // no match
+ if (match !== true) {
+ return done(layerError);
+ }
+
+ // store route for dispatch on change
+ if (route) {
+ req.route = route;
+ }
+
+ // Capture one-time layer values
+ req.params = self.mergeParams
+ ? mergeParams(layer.params, parentParams)
+ : layer.params;
+ var layerPath = layer.path;
+
+ // this should be done for the layer
+ self.process_params(layer, paramcalled, req, res, function (err) {
+ if (err) {
+ return next(layerError || err);
+ }
+
+ if (route) {
+ return layer.handle_request(req, res, next);
+ }
+
+ trim_prefix(layer, layerError, layerPath, path);
+ });
+ }
+
+ function trim_prefix(layer, layerError, layerPath, path) {
+ var c = path[layerPath.length];
+ if (c && '/' !== c && '.' !== c) return next(layerError);
+
+ // Trim off the part of the url that matches the route
+ // middleware (.use stuff) needs to have the path stripped
+ if (layerPath.length !== 0) {
+ debug('trim prefix (%s) from url %s', layerPath, req.url);
+ removed = layerPath;
+ req.url = protohost + req.url.substr(protohost.length + removed.length);
+
+ // Ensure leading slash
+ if (!fqdn && req.url[0] !== '/') {
+ req.url = '/' + req.url;
+ slashAdded = true;
+ }
+
+ // Setup base URL (no trailing slash)
+ req.baseUrl = parentUrl + (removed[removed.length - 1] === '/'
+ ? removed.substring(0, removed.length - 1)
+ : removed);
+ }
+
+ debug('%s %s : %s', layer.name, layerPath, req.originalUrl);
+
+ if (layerError) {
+ layer.handle_error(layerError, req, res, next);
+ } else {
+ layer.handle_request(req, res, next);
+ }
+ }
+};
+
+/**
+ * Process any parameters for the layer.
+ *
+ * @api private
+ */
+
+proto.process_params = function(layer, called, req, res, done) {
+ var params = this.params;
+
+ // captured parameters from the layer, keys and values
+ var keys = layer.keys;
+
+ // fast track
+ if (!keys || keys.length === 0) {
+ return done();
+ }
+
+ var i = 0;
+ var name;
+ var paramIndex = 0;
+ var key;
+ var paramVal;
+ var paramCallbacks;
+ var paramCalled;
+
+ // process params in order
+ // param callbacks can be async
+ function param(err) {
+ if (err) {
+ return done(err);
+ }
+
+ if (i >= keys.length ) {
+ return done();
+ }
+
+ paramIndex = 0;
+ key = keys[i++];
+
+ if (!key) {
+ return done();
+ }
+
+ name = key.name;
+ paramVal = req.params[name];
+ paramCallbacks = params[name];
+ paramCalled = called[name];
+
+ if (paramVal === undefined || !paramCallbacks) {
+ return param();
+ }
+
+ // param previously called with same value or error occurred
+ if (paramCalled && (paramCalled.error || paramCalled.match === paramVal)) {
+ // restore value
+ req.params[name] = paramCalled.value;
+
+ // next param
+ return param(paramCalled.error);
+ }
+
+ called[name] = paramCalled = {
+ error: null,
+ match: paramVal,
+ value: paramVal
+ };
+
+ paramCallback();
+ }
+
+ // single param callbacks
+ function paramCallback(err) {
+ var fn = paramCallbacks[paramIndex++];
+
+ // store updated value
+ paramCalled.value = req.params[key.name];
+
+ if (err) {
+ // store error
+ paramCalled.error = err;
+ param(err);
+ return;
+ }
+
+ if (!fn) return param();
+
+ try {
+ fn(req, res, paramCallback, paramVal, key.name);
+ } catch (e) {
+ paramCallback(e);
+ }
+ }
+
+ param();
+};
+
+/**
+ * Use the given middleware function, with optional path, defaulting to "/".
+ *
+ * Use (like `.all`) will run for any http METHOD, but it will not add
+ * handlers for those methods so OPTIONS requests will not consider `.use`
+ * functions even if they could respond.
+ *
+ * The other difference is that _route_ path is stripped and not visible
+ * to the handler function. The main effect of this feature is that mounted
+ * handlers can operate without any code changes regardless of the "prefix"
+ * pathname.
+ *
+ * @api public
+ */
+
+proto.use = function use(fn) {
+ var offset = 0;
+ var path = '/';
+
+ // default path to '/'
+ // disambiguate router.use([fn])
+ if (typeof fn !== 'function') {
+ var arg = fn;
+
+ while (Array.isArray(arg) && arg.length !== 0) {
+ arg = arg[0];
+ }
+
+ // first arg is the path
+ if (typeof arg !== 'function') {
+ offset = 1;
+ path = fn;
+ }
+ }
+
+ var callbacks = utils.flatten(slice.call(arguments, offset));
+
+ if (callbacks.length === 0) {
+ throw new TypeError('Router.use() requires middleware functions');
+ }
+
+ callbacks.forEach(function (fn) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('Router.use() requires middleware function but got a ' + gettype(fn));
+ }
+
+ // add the middleware
+ debug('use %s %s', path, fn.name || '<anonymous>');
+
+ var layer = new Layer(path, {
+ sensitive: this.caseSensitive,
+ strict: false,
+ end: false
+ }, fn);
+
+ layer.route = undefined;
+
+ this.stack.push(layer);
+ }, this);
+
+ return this;
+};
+
+/**
+ * Create a new Route for the given path.
+ *
+ * Each route contains a separate middleware stack and VERB handlers.
+ *
+ * See the Route api documentation for details on adding handlers
+ * and middleware to routes.
+ *
+ * @param {String} path
+ * @return {Route}
+ * @api public
+ */
+
+proto.route = function(path){
+ var route = new Route(path);
+
+ var layer = new Layer(path, {
+ sensitive: this.caseSensitive,
+ strict: this.strict,
+ end: true
+ }, route.dispatch.bind(route));
+
+ layer.route = route;
+
+ this.stack.push(layer);
+ return route;
+};
+
+// create Router#VERB functions
+methods.concat('all').forEach(function(method){
+ proto[method] = function(path){
+ var route = this.route(path)
+ route[method].apply(route, slice.call(arguments, 1));
+ return this;
+ };
+});
+
+// append methods to a list of methods
+function appendMethods(list, addition) {
+ for (var i = 0; i < addition.length; i++) {
+ var method = addition[i];
+ if (list.indexOf(method) === -1) {
+ list.push(method);
+ }
+ }
+}
+
+// get pathname of request
+function getPathname(req) {
+ try {
+ return parseUrl(req).pathname;
+ } catch (err) {
+ return undefined;
+ }
+}
+
+// get type for error message
+function gettype(obj) {
+ var type = typeof obj;
+
+ if (type !== 'object') {
+ return type;
+ }
+
+ // inspect [[Class]] for objects
+ return toString.call(obj)
+ .replace(objectRegExp, '$1');
+}
+
+/**
+ * Match path to a layer.
+ *
+ * @param {Layer} layer
+ * @param {string} path
+ * @private
+ */
+
+function matchLayer(layer, path) {
+ try {
+ return layer.match(path);
+ } catch (err) {
+ return err;
+ }
+}
+
+// merge params with parent params
+function mergeParams(params, parent) {
+ if (typeof parent !== 'object' || !parent) {
+ return params;
+ }
+
+ // make copy of parent for base
+ var obj = mixin({}, parent);
+
+ // simple non-numeric merging
+ if (!(0 in params) || !(0 in parent)) {
+ return mixin(obj, params);
+ }
+
+ var i = 0;
+ var o = 0;
+
+ // determine numeric gaps
+ while (i === o || o in parent) {
+ if (i in params) i++;
+ if (o in parent) o++;
+ }
+
+ // offset numeric indices in params before merge
+ for (i--; i >= 0; i--) {
+ params[i + o] = params[i];
+
+ // create holes for the merge when necessary
+ if (i < o) {
+ delete params[i];
+ }
+ }
+
+ return mixin(parent, params);
+}
+
+// restore obj props after function
+function restore(fn, obj) {
+ var props = new Array(arguments.length - 2);
+ var vals = new Array(arguments.length - 2);
+
+ for (var i = 0; i < props.length; i++) {
+ props[i] = arguments[i + 2];
+ vals[i] = obj[props[i]];
+ }
+
+ return function(err){
+ // restore vals
+ for (var i = 0; i < props.length; i++) {
+ obj[props[i]] = vals[i];
+ }
+
+ return fn.apply(this, arguments);
+ };
+}
+
+// send an OPTIONS response
+function sendOptionsResponse(res, options, next) {
+ try {
+ var body = options.join(',');
+ res.set('Allow', body);
+ res.send(body);
+ } catch (err) {
+ next(err);
+ }
+}
+
+// wrap a function
+function wrap(old, fn) {
+ return function proxy() {
+ var args = new Array(arguments.length + 1);
+
+ args[0] = old;
+ for (var i = 0, len = arguments.length; i < len; i++) {
+ args[i + 1] = arguments[i];
+ }
+
+ fn.apply(this, args);
+ };
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/lib/router/layer.js b/dgbuilder/dgeflows/node_modules/express/lib/router/layer.js
new file mode 100644
index 0000000..88ebd39
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/lib/router/layer.js
@@ -0,0 +1,166 @@
+/**
+ * Module dependencies.
+ */
+
+var pathRegexp = require('path-to-regexp');
+var debug = require('debug')('express:router:layer');
+
+/**
+ * Module variables.
+ */
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+/**
+ * Expose `Layer`.
+ */
+
+module.exports = Layer;
+
+function Layer(path, options, fn) {
+ if (!(this instanceof Layer)) {
+ return new Layer(path, options, fn);
+ }
+
+ debug('new %s', path);
+ options = options || {};
+
+ this.handle = fn;
+ this.name = fn.name || '<anonymous>';
+ this.params = undefined;
+ this.path = undefined;
+ this.regexp = pathRegexp(path, this.keys = [], options);
+
+ if (path === '/' && options.end === false) {
+ this.regexp.fast_slash = true;
+ }
+}
+
+/**
+ * Handle the error for the layer.
+ *
+ * @param {Error} error
+ * @param {Request} req
+ * @param {Response} res
+ * @param {function} next
+ * @api private
+ */
+
+Layer.prototype.handle_error = function handle_error(error, req, res, next) {
+ var fn = this.handle;
+
+ if (fn.length !== 4) {
+ // not a standard error handler
+ return next(error);
+ }
+
+ try {
+ fn(error, req, res, next);
+ } catch (err) {
+ next(err);
+ }
+};
+
+/**
+ * Handle the request for the layer.
+ *
+ * @param {Request} req
+ * @param {Response} res
+ * @param {function} next
+ * @api private
+ */
+
+Layer.prototype.handle_request = function handle(req, res, next) {
+ var fn = this.handle;
+
+ if (fn.length > 3) {
+ // not a standard request handler
+ return next();
+ }
+
+ try {
+ fn(req, res, next);
+ } catch (err) {
+ next(err);
+ }
+};
+
+/**
+ * Check if this route matches `path`, if so
+ * populate `.params`.
+ *
+ * @param {String} path
+ * @return {Boolean}
+ * @api private
+ */
+
+Layer.prototype.match = function match(path) {
+ if (path == null) {
+ // no path, nothing matches
+ this.params = undefined;
+ this.path = undefined;
+ return false;
+ }
+
+ if (this.regexp.fast_slash) {
+ // fast path non-ending match for / (everything matches)
+ this.params = {};
+ this.path = '';
+ return true;
+ }
+
+ var m = this.regexp.exec(path);
+
+ if (!m) {
+ this.params = undefined;
+ this.path = undefined;
+ return false;
+ }
+
+ // store values
+ this.params = {};
+ this.path = m[0];
+
+ var keys = this.keys;
+ var params = this.params;
+ var prop;
+ var n = 0;
+ var key;
+ var val;
+
+ for (var i = 1, len = m.length; i < len; ++i) {
+ key = keys[i - 1];
+ prop = key
+ ? key.name
+ : n++;
+ val = decode_param(m[i]);
+
+ if (val !== undefined || !(hasOwnProperty.call(params, prop))) {
+ params[prop] = val;
+ }
+ }
+
+ return true;
+};
+
+/**
+ * Decode param value.
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function decode_param(val){
+ if (typeof val !== 'string') {
+ return val;
+ }
+
+ try {
+ return decodeURIComponent(val);
+ } catch (e) {
+ var err = new TypeError("Failed to decode param '" + val + "'");
+ err.status = 400;
+ throw err;
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/lib/router/route.js b/dgbuilder/dgeflows/node_modules/express/lib/router/route.js
new file mode 100644
index 0000000..6213b82
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/lib/router/route.js
@@ -0,0 +1,183 @@
+/**
+ * Module dependencies.
+ */
+
+var debug = require('debug')('express:router:route');
+var Layer = require('./layer');
+var methods = require('methods');
+var utils = require('../utils');
+
+/**
+ * Expose `Route`.
+ */
+
+module.exports = Route;
+
+/**
+ * Initialize `Route` with the given `path`,
+ *
+ * @param {String} path
+ * @api private
+ */
+
+function Route(path) {
+ debug('new %s', path);
+ this.path = path;
+ this.stack = [];
+
+ // route handlers for various http methods
+ this.methods = {};
+}
+
+/**
+ * @api private
+ */
+
+Route.prototype._handles_method = function _handles_method(method) {
+ if (this.methods._all) {
+ return true;
+ }
+
+ method = method.toLowerCase();
+
+ if (method === 'head' && !this.methods['head']) {
+ method = 'get';
+ }
+
+ return Boolean(this.methods[method]);
+};
+
+/**
+ * @return {Array} supported HTTP methods
+ * @api private
+ */
+
+Route.prototype._options = function _options() {
+ var methods = Object.keys(this.methods);
+
+ // append automatic head
+ if (this.methods.get && !this.methods.head) {
+ methods.push('head');
+ }
+
+ for (var i = 0; i < methods.length; i++) {
+ // make upper case
+ methods[i] = methods[i].toUpperCase();
+ }
+
+ return methods;
+};
+
+/**
+ * dispatch req, res into this route
+ *
+ * @api private
+ */
+
+Route.prototype.dispatch = function(req, res, done){
+ var idx = 0;
+ var stack = this.stack;
+ if (stack.length === 0) {
+ return done();
+ }
+
+ var method = req.method.toLowerCase();
+ if (method === 'head' && !this.methods['head']) {
+ method = 'get';
+ }
+
+ req.route = this;
+
+ next();
+
+ function next(err) {
+ if (err && err === 'route') {
+ return done();
+ }
+
+ var layer = stack[idx++];
+ if (!layer) {
+ return done(err);
+ }
+
+ if (layer.method && layer.method !== method) {
+ return next(err);
+ }
+
+ if (err) {
+ layer.handle_error(err, req, res, next);
+ } else {
+ layer.handle_request(req, res, next);
+ }
+ }
+};
+
+/**
+ * Add a handler for all HTTP verbs to this route.
+ *
+ * Behaves just like middleware and can respond or call `next`
+ * to continue processing.
+ *
+ * You can use multiple `.all` call to add multiple handlers.
+ *
+ * function check_something(req, res, next){
+ * next();
+ * };
+ *
+ * function validate_user(req, res, next){
+ * next();
+ * };
+ *
+ * route
+ * .all(validate_user)
+ * .all(check_something)
+ * .get(function(req, res, next){
+ * res.send('hello world');
+ * });
+ *
+ * @param {function} handler
+ * @return {Route} for chaining
+ * @api public
+ */
+
+Route.prototype.all = function(){
+ var callbacks = utils.flatten([].slice.call(arguments));
+ callbacks.forEach(function(fn) {
+ if (typeof fn !== 'function') {
+ var type = {}.toString.call(fn);
+ var msg = 'Route.all() requires callback functions but got a ' + type;
+ throw new Error(msg);
+ }
+
+ var layer = Layer('/', {}, fn);
+ layer.method = undefined;
+
+ this.methods._all = true;
+ this.stack.push(layer);
+ }, this);
+
+ return this;
+};
+
+methods.forEach(function(method){
+ Route.prototype[method] = function(){
+ var callbacks = utils.flatten([].slice.call(arguments));
+
+ callbacks.forEach(function(fn) {
+ if (typeof fn !== 'function') {
+ var type = {}.toString.call(fn);
+ var msg = 'Route.' + method + '() requires callback functions but got a ' + type;
+ throw new Error(msg);
+ }
+
+ debug('%s %s', method, this.path);
+
+ var layer = Layer('/', {}, fn);
+ layer.method = method;
+
+ this.methods[method] = true;
+ this.stack.push(layer);
+ }, this);
+ return this;
+ };
+});
diff --git a/dgbuilder/dgeflows/node_modules/express/lib/utils.js b/dgbuilder/dgeflows/node_modules/express/lib/utils.js
new file mode 100644
index 0000000..9c004cc
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/lib/utils.js
@@ -0,0 +1,283 @@
+/**
+ * Module dependencies.
+ */
+
+var contentDisposition = require('content-disposition');
+var deprecate = require('depd')('express');
+var mime = require('send').mime;
+var basename = require('path').basename;
+var etag = require('etag');
+var proxyaddr = require('proxy-addr');
+var qs = require('qs');
+var querystring = require('querystring');
+var typer = require('media-typer');
+
+/**
+ * Return strong ETag for `body`.
+ *
+ * @param {String|Buffer} body
+ * @param {String} [encoding]
+ * @return {String}
+ * @api private
+ */
+
+exports.etag = function (body, encoding) {
+ var buf = !Buffer.isBuffer(body)
+ ? new Buffer(body, encoding)
+ : body;
+
+ return etag(buf, {weak: false});
+};
+
+/**
+ * Return weak ETag for `body`.
+ *
+ * @param {String|Buffer} body
+ * @param {String} [encoding]
+ * @return {String}
+ * @api private
+ */
+
+exports.wetag = function wetag(body, encoding){
+ var buf = !Buffer.isBuffer(body)
+ ? new Buffer(body, encoding)
+ : body;
+
+ return etag(buf, {weak: true});
+};
+
+/**
+ * Check if `path` looks absolute.
+ *
+ * @param {String} path
+ * @return {Boolean}
+ * @api private
+ */
+
+exports.isAbsolute = function(path){
+ if ('/' == path[0]) return true;
+ if (':' == path[1] && '\\' == path[2]) return true;
+ if ('\\\\' == path.substring(0, 2)) return true; // Microsoft Azure absolute path
+};
+
+/**
+ * Flatten the given `arr`.
+ *
+ * @param {Array} arr
+ * @return {Array}
+ * @api private
+ */
+
+exports.flatten = function(arr, ret){
+ ret = ret || [];
+ var len = arr.length;
+ for (var i = 0; i < len; ++i) {
+ if (Array.isArray(arr[i])) {
+ exports.flatten(arr[i], ret);
+ } else {
+ ret.push(arr[i]);
+ }
+ }
+ return ret;
+};
+
+/**
+ * Normalize the given `type`, for example "html" becomes "text/html".
+ *
+ * @param {String} type
+ * @return {Object}
+ * @api private
+ */
+
+exports.normalizeType = function(type){
+ return ~type.indexOf('/')
+ ? acceptParams(type)
+ : { value: mime.lookup(type), params: {} };
+};
+
+/**
+ * Normalize `types`, for example "html" becomes "text/html".
+ *
+ * @param {Array} types
+ * @return {Array}
+ * @api private
+ */
+
+exports.normalizeTypes = function(types){
+ var ret = [];
+
+ for (var i = 0; i < types.length; ++i) {
+ ret.push(exports.normalizeType(types[i]));
+ }
+
+ return ret;
+};
+
+/**
+ * Generate Content-Disposition header appropriate for the filename.
+ * non-ascii filenames are urlencoded and a filename* parameter is added
+ *
+ * @param {String} filename
+ * @return {String}
+ * @api private
+ */
+
+exports.contentDisposition = deprecate.function(contentDisposition,
+ 'utils.contentDisposition: use content-disposition npm module instead');
+
+/**
+ * Parse accept params `str` returning an
+ * object with `.value`, `.quality` and `.params`.
+ * also includes `.originalIndex` for stable sorting
+ *
+ * @param {String} str
+ * @return {Object}
+ * @api private
+ */
+
+function acceptParams(str, index) {
+ var parts = str.split(/ *; */);
+ var ret = { value: parts[0], quality: 1, params: {}, originalIndex: index };
+
+ for (var i = 1; i < parts.length; ++i) {
+ var pms = parts[i].split(/ *= */);
+ if ('q' == pms[0]) {
+ ret.quality = parseFloat(pms[1]);
+ } else {
+ ret.params[pms[0]] = pms[1];
+ }
+ }
+
+ return ret;
+}
+
+/**
+ * Compile "etag" value to function.
+ *
+ * @param {Boolean|String|Function} val
+ * @return {Function}
+ * @api private
+ */
+
+exports.compileETag = function(val) {
+ var fn;
+
+ if (typeof val === 'function') {
+ return val;
+ }
+
+ switch (val) {
+ case true:
+ fn = exports.wetag;
+ break;
+ case false:
+ break;
+ case 'strong':
+ fn = exports.etag;
+ break;
+ case 'weak':
+ fn = exports.wetag;
+ break;
+ default:
+ throw new TypeError('unknown value for etag function: ' + val);
+ }
+
+ return fn;
+}
+
+/**
+ * Compile "query parser" value to function.
+ *
+ * @param {String|Function} val
+ * @return {Function}
+ * @api private
+ */
+
+exports.compileQueryParser = function compileQueryParser(val) {
+ var fn;
+
+ if (typeof val === 'function') {
+ return val;
+ }
+
+ switch (val) {
+ case true:
+ fn = querystring.parse;
+ break;
+ case false:
+ fn = newObject;
+ break;
+ case 'extended':
+ fn = qs.parse;
+ break;
+ case 'simple':
+ fn = querystring.parse;
+ break;
+ default:
+ throw new TypeError('unknown value for query parser function: ' + val);
+ }
+
+ return fn;
+}
+
+/**
+ * Compile "proxy trust" value to function.
+ *
+ * @param {Boolean|String|Number|Array|Function} val
+ * @return {Function}
+ * @api private
+ */
+
+exports.compileTrust = function(val) {
+ if (typeof val === 'function') return val;
+
+ if (val === true) {
+ // Support plain true/false
+ return function(){ return true };
+ }
+
+ if (typeof val === 'number') {
+ // Support trusting hop count
+ return function(a, i){ return i < val };
+ }
+
+ if (typeof val === 'string') {
+ // Support comma-separated values
+ val = val.split(/ *, */);
+ }
+
+ return proxyaddr.compile(val || []);
+}
+
+/**
+ * Set the charset in a given Content-Type string.
+ *
+ * @param {String} type
+ * @param {String} charset
+ * @return {String}
+ * @api private
+ */
+
+exports.setCharset = function(type, charset){
+ if (!type || !charset) return type;
+
+ // parse type
+ var parsed = typer.parse(type);
+
+ // set charset
+ parsed.parameters.charset = charset;
+
+ // format type
+ return typer.format(parsed);
+};
+
+/**
+ * Return new empty object.
+ *
+ * @return {Object}
+ * @api private
+ */
+
+function newObject() {
+ return {};
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/lib/view.js b/dgbuilder/dgeflows/node_modules/express/lib/view.js
new file mode 100644
index 0000000..e0989b4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/lib/view.js
@@ -0,0 +1,142 @@
+/**
+ * Module dependencies.
+ */
+
+var debug = require('debug')('express:view');
+var path = require('path');
+var fs = require('fs');
+var utils = require('./utils');
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var dirname = path.dirname;
+var basename = path.basename;
+var extname = path.extname;
+var join = path.join;
+var resolve = path.resolve;
+
+/**
+ * Expose `View`.
+ */
+
+module.exports = View;
+
+/**
+ * Initialize a new `View` with the given `name`.
+ *
+ * Options:
+ *
+ * - `defaultEngine` the default template engine name
+ * - `engines` template engine require() cache
+ * - `root` root path for view lookup
+ *
+ * @param {String} name
+ * @param {Object} options
+ * @api private
+ */
+
+function View(name, options) {
+ options = options || {};
+ this.name = name;
+ this.root = options.root;
+ var engines = options.engines;
+ this.defaultEngine = options.defaultEngine;
+ var ext = this.ext = extname(name);
+ if (!ext && !this.defaultEngine) throw new Error('No default engine was specified and no extension was provided.');
+ if (!ext) name += (ext = this.ext = ('.' != this.defaultEngine[0] ? '.' : '') + this.defaultEngine);
+ this.engine = engines[ext] || (engines[ext] = require(ext.slice(1)).__express);
+ this.path = this.lookup(name);
+}
+
+/**
+ * Lookup view by the given `name`
+ *
+ * @param {String} name
+ * @return {String}
+ * @api private
+ */
+
+View.prototype.lookup = function lookup(name) {
+ var path;
+ var roots = [].concat(this.root);
+
+ debug('lookup "%s"', name);
+
+ for (var i = 0; i < roots.length && !path; i++) {
+ var root = roots[i];
+
+ // resolve the path
+ var loc = resolve(root, name);
+ var dir = dirname(loc);
+ var file = basename(loc);
+
+ // resolve the file
+ path = this.resolve(dir, file);
+ }
+
+ return path;
+};
+
+/**
+ * Render with the given `options` and callback `fn(err, str)`.
+ *
+ * @param {Object} options
+ * @param {Function} fn
+ * @api private
+ */
+
+View.prototype.render = function render(options, fn) {
+ debug('render "%s"', this.path);
+ this.engine(this.path, options, fn);
+};
+
+/**
+ * Resolve the file within the given directory.
+ *
+ * @param {string} dir
+ * @param {string} file
+ * @private
+ */
+
+View.prototype.resolve = function resolve(dir, file) {
+ var ext = this.ext;
+ var path;
+ var stat;
+
+ // <path>.<ext>
+ path = join(dir, file);
+ stat = tryStat(path);
+
+ if (stat && stat.isFile()) {
+ return path;
+ }
+
+ // <path>/index.<ext>
+ path = join(dir, basename(file, ext), 'index' + ext);
+ stat = tryStat(path);
+
+ if (stat && stat.isFile()) {
+ return path;
+ }
+};
+
+/**
+ * Return a stat, maybe.
+ *
+ * @param {string} path
+ * @return {fs.Stats}
+ * @private
+ */
+
+function tryStat(path) {
+ debug('stat "%s"', path);
+
+ try {
+ return fs.statSync(path);
+ } catch (e) {
+ return undefined;
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/HISTORY.md
new file mode 100644
index 0000000..cf7ff1b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/HISTORY.md
@@ -0,0 +1,109 @@
+1.2.4 / 2015-02-14
+==================
+
+ * Support Node.js 0.6
+ * deps: mime-types@~2.0.9
+ - deps: mime-db@~1.7.0
+ * deps: negotiator@0.5.1
+ - Fix preference sorting to be stable for long acceptable lists
+
+1.2.3 / 2015-01-31
+==================
+
+ * deps: mime-types@~2.0.8
+ - deps: mime-db@~1.6.0
+
+1.2.2 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.7
+ - deps: mime-db@~1.5.0
+
+1.2.1 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.5
+ - deps: mime-db@~1.3.1
+
+1.2.0 / 2014-12-19
+==================
+
+ * deps: negotiator@0.5.0
+ - Fix list return order when large accepted list
+ - Fix missing identity encoding when q=0 exists
+ - Remove dynamic building of Negotiator class
+
+1.1.4 / 2014-12-10
+==================
+
+ * deps: mime-types@~2.0.4
+ - deps: mime-db@~1.3.0
+
+1.1.3 / 2014-11-09
+==================
+
+ * deps: mime-types@~2.0.3
+ - deps: mime-db@~1.2.0
+
+1.1.2 / 2014-10-14
+==================
+
+ * deps: negotiator@0.4.9
+ - Fix error when media type has invalid parameter
+
+1.1.1 / 2014-09-28
+==================
+
+ * deps: mime-types@~2.0.2
+ - deps: mime-db@~1.1.0
+ * deps: negotiator@0.4.8
+ - Fix all negotiations to be case-insensitive
+ - Stable sort preferences of same quality according to client order
+
+1.1.0 / 2014-09-02
+==================
+
+ * update `mime-types`
+
+1.0.7 / 2014-07-04
+==================
+
+ * Fix wrong type returned from `type` when match after unknown extension
+
+1.0.6 / 2014-06-24
+==================
+
+ * deps: negotiator@0.4.7
+
+1.0.5 / 2014-06-20
+==================
+
+ * fix crash when unknown extension given
+
+1.0.4 / 2014-06-19
+==================
+
+ * use `mime-types`
+
+1.0.3 / 2014-06-11
+==================
+
+ * deps: negotiator@0.4.6
+ - Order by specificity when quality is the same
+
+1.0.2 / 2014-05-29
+==================
+
+ * Fix interpretation when header not in request
+ * deps: pin negotiator@0.4.5
+
+1.0.1 / 2014-01-18
+==================
+
+ * Identity encoding isn't always acceptable
+ * deps: negotiator@~0.4.0
+
+1.0.0 / 2013-12-27
+==================
+
+ * Genesis
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/LICENSE
new file mode 100644
index 0000000..f23dca8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/README.md
new file mode 100644
index 0000000..e8361db
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/README.md
@@ -0,0 +1,135 @@
+# accepts
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
+
+In addition to negotiator, it allows:
+
+- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` as well as `('text/html', 'application/json')`.
+- Allows type shorthands such as `json`.
+- Returns `false` when no types match
+- Treats non-existent headers as `*`
+
+## Installation
+
+```sh
+npm install accepts
+```
+
+## API
+
+```js
+var accepts = require('accepts')
+```
+
+### accepts(req)
+
+Create a new `Accepts` object for the given `req`.
+
+#### .charset(charsets)
+
+Return the first accepted charset. If nothing in `charsets` is accepted,
+then `false` is returned.
+
+#### .charsets()
+
+Return the charsets that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .encoding(encodings)
+
+Return the first accepted encoding. If nothing in `encodings` is accepted,
+then `false` is returned.
+
+#### .encodings()
+
+Return the encodings that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .language(languages)
+
+Return the first accepted language. If nothing in `languages` is accepted,
+then `false` is returned.
+
+#### .languages()
+
+Return the languages that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .type(types)
+
+Return the first accepted type (and it is returned as the same text as what
+appears in the `types` array). If nothing in `types` is accepted, then `false`
+is returned.
+
+The `types` array can contain full MIME types or file extensions. Any value
+that is not a full MIME types is passed to `require('mime-types').lookup`.
+
+#### .types()
+
+Return the types that the request accepts, in the order of the client's
+preference (most preferred first).
+
+## Examples
+
+### Simple type negotiation
+
+This simple example shows how to use `accepts` to return a different typed
+respond body based on what the client wants to accept. The server lists it's
+preferences in order and will get back the best match between the client and
+server.
+
+```js
+var accepts = require('accepts')
+var http = require('http')
+
+function app(req, res) {
+ var accept = accepts(req)
+
+ // the order of this list is significant; should be server preferred order
+ switch(accept.type(['json', 'html'])) {
+ case 'json':
+ res.setHeader('Content-Type', 'application/json')
+ res.write('{"hello":"world!"}')
+ break
+ case 'html':
+ res.setHeader('Content-Type', 'text/html')
+ res.write('<b>hello, world!</b>')
+ break
+ default:
+ // the fallback is text/plain, so no need to specify it above
+ res.setHeader('Content-Type', 'text/plain')
+ res.write('hello, world!')
+ break
+ }
+
+ res.end()
+}
+
+http.createServer(app).listen(3000)
+```
+
+You can test this out with the cURL program:
+```sh
+curl -I -H'Accept: text/html' http://localhost:3000/
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/accepts.svg?style=flat
+[npm-url]: https://npmjs.org/package/accepts
+[node-version-image]: https://img.shields.io/node/v/accepts.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/accepts.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/accepts
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/accepts
+[downloads-image]: https://img.shields.io/npm/dm/accepts.svg?style=flat
+[downloads-url]: https://npmjs.org/package/accepts
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/index.js
new file mode 100644
index 0000000..805e33a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/index.js
@@ -0,0 +1,160 @@
+var Negotiator = require('negotiator')
+var mime = require('mime-types')
+
+var slice = [].slice
+
+module.exports = Accepts
+
+function Accepts(req) {
+ if (!(this instanceof Accepts))
+ return new Accepts(req)
+
+ this.headers = req.headers
+ this.negotiator = Negotiator(req)
+}
+
+/**
+ * Check if the given `type(s)` is acceptable, returning
+ * the best match when true, otherwise `undefined`, in which
+ * case you should respond with 406 "Not Acceptable".
+ *
+ * The `type` value may be a single mime type string
+ * such as "application/json", the extension name
+ * such as "json" or an array `["json", "html", "text/plain"]`. When a list
+ * or array is given the _best_ match, if any is returned.
+ *
+ * Examples:
+ *
+ * // Accept: text/html
+ * this.types('html');
+ * // => "html"
+ *
+ * // Accept: text/*, application/json
+ * this.types('html');
+ * // => "html"
+ * this.types('text/html');
+ * // => "text/html"
+ * this.types('json', 'text');
+ * // => "json"
+ * this.types('application/json');
+ * // => "application/json"
+ *
+ * // Accept: text/*, application/json
+ * this.types('image/png');
+ * this.types('png');
+ * // => undefined
+ *
+ * // Accept: text/*;q=.5, application/json
+ * this.types(['html', 'json']);
+ * this.types('html', 'json');
+ * // => "json"
+ *
+ * @param {String|Array} type(s)...
+ * @return {String|Array|Boolean}
+ * @api public
+ */
+
+Accepts.prototype.type =
+Accepts.prototype.types = function (types) {
+ if (!Array.isArray(types)) types = slice.call(arguments);
+ var n = this.negotiator;
+ if (!types.length) return n.mediaTypes();
+ if (!this.headers.accept) return types[0];
+ var mimes = types.map(extToMime);
+ var accepts = n.mediaTypes(mimes.filter(validMime));
+ var first = accepts[0];
+ if (!first) return false;
+ return types[mimes.indexOf(first)];
+}
+
+/**
+ * Return accepted encodings or best fit based on `encodings`.
+ *
+ * Given `Accept-Encoding: gzip, deflate`
+ * an array sorted by quality is returned:
+ *
+ * ['gzip', 'deflate']
+ *
+ * @param {String|Array} encoding(s)...
+ * @return {String|Array}
+ * @api public
+ */
+
+Accepts.prototype.encoding =
+Accepts.prototype.encodings = function (encodings) {
+ if (!Array.isArray(encodings)) encodings = slice.call(arguments);
+ var n = this.negotiator;
+ if (!encodings.length) return n.encodings();
+ return n.encodings(encodings)[0] || false;
+}
+
+/**
+ * Return accepted charsets or best fit based on `charsets`.
+ *
+ * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
+ * an array sorted by quality is returned:
+ *
+ * ['utf-8', 'utf-7', 'iso-8859-1']
+ *
+ * @param {String|Array} charset(s)...
+ * @return {String|Array}
+ * @api public
+ */
+
+Accepts.prototype.charset =
+Accepts.prototype.charsets = function (charsets) {
+ if (!Array.isArray(charsets)) charsets = [].slice.call(arguments);
+ var n = this.negotiator;
+ if (!charsets.length) return n.charsets();
+ if (!this.headers['accept-charset']) return charsets[0];
+ return n.charsets(charsets)[0] || false;
+}
+
+/**
+ * Return accepted languages or best fit based on `langs`.
+ *
+ * Given `Accept-Language: en;q=0.8, es, pt`
+ * an array sorted by quality is returned:
+ *
+ * ['es', 'pt', 'en']
+ *
+ * @param {String|Array} lang(s)...
+ * @return {Array|String}
+ * @api public
+ */
+
+Accepts.prototype.lang =
+Accepts.prototype.langs =
+Accepts.prototype.language =
+Accepts.prototype.languages = function (langs) {
+ if (!Array.isArray(langs)) langs = slice.call(arguments);
+ var n = this.negotiator;
+ if (!langs.length) return n.languages();
+ if (!this.headers['accept-language']) return langs[0];
+ return n.languages(langs)[0] || false;
+}
+
+/**
+ * Convert extnames to mime.
+ *
+ * @param {String} type
+ * @return {String}
+ * @api private
+ */
+
+function extToMime(type) {
+ if (~type.indexOf('/')) return type;
+ return mime.lookup(type);
+}
+
+/**
+ * Check if mime is valid.
+ *
+ * @param {String} type
+ * @return {String}
+ * @api private
+ */
+
+function validMime(type) {
+ return typeof type === 'string';
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md
new file mode 100644
index 0000000..da8b3f8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md
@@ -0,0 +1,85 @@
+2.0.9 / 2015-02-09
+==================
+
+ * deps: mime-db@~1.7.0
+ - Add new mime types
+ - Community extensions ownership transferred from `node-mime`
+
+2.0.8 / 2015-01-29
+==================
+
+ * deps: mime-db@~1.6.0
+ - Add new mime types
+
+2.0.7 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.5.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+
+2.0.6 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.4.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+
+2.0.5 / 2014-12-29
+==================
+
+ * deps: mime-db@~1.3.1
+ - Fix missing extensions
+
+2.0.4 / 2014-12-10
+==================
+
+ * deps: mime-db@~1.3.0
+ - Add new mime types
+
+2.0.3 / 2014-11-09
+==================
+
+ * deps: mime-db@~1.2.0
+ - Add new mime types
+
+2.0.2 / 2014-09-28
+==================
+
+ * deps: mime-db@~1.1.0
+ - Add new mime types
+ - Add additional compressible
+ - Update charsets
+
+2.0.1 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+
+2.0.0 / 2014-09-02
+==================
+
+ * Use `mime-db`
+ * Remove `.define()`
+
+1.0.2 / 2014-08-04
+==================
+
+ * Set charset=utf-8 for `text/javascript`
+
+1.0.1 / 2014-06-24
+==================
+
+ * Add `text/jsx` type
+
+1.0.0 / 2014-05-12
+==================
+
+ * Return `false` for unknown types
+ * Set charset=utf-8 for `application/json`
+
+0.1.0 / 2014-05-02
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md
new file mode 100644
index 0000000..99d658b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md
@@ -0,0 +1,99 @@
+# mime-types
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+The ultimate javascript content-type utility.
+
+Similar to [node-mime](https://github.com/broofa/node-mime), except:
+
+- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`,
+ so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
+- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
+- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db)
+- No `.define()` functionality
+
+Otherwise, the API is compatible.
+
+## Install
+
+```sh
+$ npm install mime-types
+```
+
+## Adding Types
+
+All mime types are based on [mime-db](https://github.com/jshttp/mime-db),
+so open a PR there if you'd like to add mime types.
+
+## API
+
+```js
+var mime = require('mime-types')
+```
+
+All functions return `false` if input is invalid or not found.
+
+### mime.lookup(path)
+
+Lookup the content-type associated with a file.
+
+```js
+mime.lookup('json') // 'application/json'
+mime.lookup('.md') // 'text/x-markdown'
+mime.lookup('file.html') // 'text/html'
+mime.lookup('folder/file.js') // 'application/javascript'
+
+mime.lookup('cats') // false
+```
+
+### mime.contentType(type)
+
+Create a full content-type header given a content-type or extension.
+
+```js
+mime.contentType('markdown') // 'text/x-markdown; charset=utf-8'
+mime.contentType('file.json') // 'application/json; charset=utf-8'
+```
+
+### mime.extension(type)
+
+Get the default extension for a content-type.
+
+```js
+mime.extension('application/octet-stream') // 'bin'
+```
+
+### mime.charset(type)
+
+Lookup the implied default charset of a content-type.
+
+```js
+mime.charset('text/x-markdown') // 'UTF-8'
+```
+
+### var type = mime.types[extension]
+
+A map of content-types by extension.
+
+### [extensions...] = mime.extensions[type]
+
+A map of extensions by content-type.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/mime-types.svg?style=flat
+[npm-url]: https://npmjs.org/package/mime-types
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/mime-types.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/mime-types
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-types
+[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg?style=flat
+[downloads-url]: https://npmjs.org/package/mime-types
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js
new file mode 100644
index 0000000..b46a202
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js
@@ -0,0 +1,63 @@
+
+var db = require('mime-db')
+
+// types[extension] = type
+exports.types = Object.create(null)
+// extensions[type] = [extensions]
+exports.extensions = Object.create(null)
+
+Object.keys(db).forEach(function (name) {
+ var mime = db[name]
+ var exts = mime.extensions
+ if (!exts || !exts.length) return
+ exports.extensions[name] = exts
+ exts.forEach(function (ext) {
+ exports.types[ext] = name
+ })
+})
+
+exports.lookup = function (string) {
+ if (!string || typeof string !== "string") return false
+ // remove any leading paths, though we should just use path.basename
+ string = string.replace(/.*[\.\/\\]/, '').toLowerCase()
+ if (!string) return false
+ return exports.types[string] || false
+}
+
+exports.extension = function (type) {
+ if (!type || typeof type !== "string") return false
+ // to do: use media-typer
+ type = type.match(/^\s*([^;\s]*)(?:;|\s|$)/)
+ if (!type) return false
+ var exts = exports.extensions[type[1].toLowerCase()]
+ if (!exts || !exts.length) return false
+ return exts[0]
+}
+
+// type has to be an exact mime type
+exports.charset = function (type) {
+ var mime = db[type]
+ if (mime && mime.charset) return mime.charset
+
+ // default text/* to utf-8
+ if (/^text\//.test(type)) return 'UTF-8'
+
+ return false
+}
+
+// backwards compatibility
+exports.charsets = {
+ lookup: exports.charset
+}
+
+// to do: maybe use set-type module or something
+exports.contentType = function (type) {
+ if (!type || typeof type !== "string") return false
+ if (!~type.indexOf('/')) type = exports.lookup(type)
+ if (!type) return false
+ if (!~type.indexOf('charset')) {
+ var charset = exports.charset(type)
+ if (charset) type += '; charset=' + charset.toLowerCase()
+ }
+ return type
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md
new file mode 100644
index 0000000..e5ffba4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md
@@ -0,0 +1,166 @@
+1.7.0 / 2015-02-08
+==================
+
+ * Add `application/vnd.gerber`
+ * Add `application/vnd.msa-disk-image`
+
+1.6.1 / 2015-02-05
+==================
+
+ * Community extensions ownership transferred from `node-mime`
+
+1.6.0 / 2015-01-29
+==================
+
+ * Add `application/jose`
+ * Add `application/jose+json`
+ * Add `application/json-seq`
+ * Add `application/jwk+json`
+ * Add `application/jwk-set+json`
+ * Add `application/jwt`
+ * Add `application/rdap+json`
+ * Add `application/vnd.gov.sk.e-form+xml`
+ * Add `application/vnd.ims.imsccv1p3`
+
+1.5.0 / 2014-12-30
+==================
+
+ * Add `application/vnd.oracle.resource+json`
+ * Fix various invalid MIME type entries
+ - `application/mbox+xml`
+ - `application/oscp-response`
+ - `application/vwg-multiplexed`
+ - `audio/g721`
+
+1.4.0 / 2014-12-21
+==================
+
+ * Add `application/vnd.ims.imsccv1p2`
+ * Fix various invalid MIME type entries
+ - `application/vnd-acucobol`
+ - `application/vnd-curl`
+ - `application/vnd-dart`
+ - `application/vnd-dxr`
+ - `application/vnd-fdf`
+ - `application/vnd-mif`
+ - `application/vnd-sema`
+ - `application/vnd-wap-wmlc`
+ - `application/vnd.adobe.flash-movie`
+ - `application/vnd.dece-zip`
+ - `application/vnd.dvb_service`
+ - `application/vnd.micrografx-igx`
+ - `application/vnd.sealed-doc`
+ - `application/vnd.sealed-eml`
+ - `application/vnd.sealed-mht`
+ - `application/vnd.sealed-ppt`
+ - `application/vnd.sealed-tiff`
+ - `application/vnd.sealed-xls`
+ - `application/vnd.sealedmedia.softseal-html`
+ - `application/vnd.sealedmedia.softseal-pdf`
+ - `application/vnd.wap-slc`
+ - `application/vnd.wap-wbxml`
+ - `audio/vnd.sealedmedia.softseal-mpeg`
+ - `image/vnd-djvu`
+ - `image/vnd-svf`
+ - `image/vnd-wap-wbmp`
+ - `image/vnd.sealed-png`
+ - `image/vnd.sealedmedia.softseal-gif`
+ - `image/vnd.sealedmedia.softseal-jpg`
+ - `model/vnd-dwf`
+ - `model/vnd.parasolid.transmit-binary`
+ - `model/vnd.parasolid.transmit-text`
+ - `text/vnd-a`
+ - `text/vnd-curl`
+ - `text/vnd.wap-wml`
+ * Remove example template MIME types
+ - `application/example`
+ - `audio/example`
+ - `image/example`
+ - `message/example`
+ - `model/example`
+ - `multipart/example`
+ - `text/example`
+ - `video/example`
+
+1.3.1 / 2014-12-16
+==================
+
+ * Fix missing extensions
+ - `application/json5`
+ - `text/hjson`
+
+1.3.0 / 2014-12-07
+==================
+
+ * Add `application/a2l`
+ * Add `application/aml`
+ * Add `application/atfx`
+ * Add `application/atxml`
+ * Add `application/cdfx+xml`
+ * Add `application/dii`
+ * Add `application/json5`
+ * Add `application/lxf`
+ * Add `application/mf4`
+ * Add `application/vnd.apache.thrift.compact`
+ * Add `application/vnd.apache.thrift.json`
+ * Add `application/vnd.coffeescript`
+ * Add `application/vnd.enphase.envoy`
+ * Add `application/vnd.ims.imsccv1p1`
+ * Add `text/csv-schema`
+ * Add `text/hjson`
+ * Add `text/markdown`
+ * Add `text/yaml`
+
+1.2.0 / 2014-11-09
+==================
+
+ * Add `application/cea`
+ * Add `application/dit`
+ * Add `application/vnd.gov.sk.e-form+zip`
+ * Add `application/vnd.tmd.mediaflex.api+xml`
+ * Type `application/epub+zip` is now IANA-registered
+
+1.1.2 / 2014-10-23
+==================
+
+ * Rebuild database for `application/x-www-form-urlencoded` change
+
+1.1.1 / 2014-10-20
+==================
+
+ * Mark `application/x-www-form-urlencoded` as compressible.
+
+1.1.0 / 2014-09-28
+==================
+
+ * Add `application/font-woff2`
+
+1.0.3 / 2014-09-25
+==================
+
+ * Fix engine requirement in package
+
+1.0.2 / 2014-09-25
+==================
+
+ * Add `application/coap-group+json`
+ * Add `application/dcd`
+ * Add `application/vnd.apache.thrift.binary`
+ * Add `image/vnd.tencent.tap`
+ * Mark all JSON-derived types as compressible
+ * Update `text/vtt` data
+
+1.0.1 / 2014-08-30
+==================
+
+ * Fix extension ordering
+
+1.0.0 / 2014-08-30
+==================
+
+ * Add `application/atf`
+ * Add `application/merge-patch+json`
+ * Add `multipart/x-mixed-replace`
+ * Add `source: 'apache'` metadata
+ * Add `source: 'iana'` metadata
+ * Remove badly-assumed charset data
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md
new file mode 100644
index 0000000..1dde234
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md
@@ -0,0 +1,76 @@
+# mime-db
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+
+This is a database of all mime types.
+It consists of a single, public JSON file and does not include any logic,
+allowing it to remain as un-opinionated as possible with an API.
+It aggregates data from the following sources:
+
+- http://www.iana.org/assignments/media-types/media-types.xhtml
+- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
+
+## Installation
+
+```bash
+npm install mime-db
+```
+
+If you're crazy enough to use this in the browser,
+you can just grab the JSON file:
+
+```
+https://cdn.rawgit.com/jshttp/mime-db/master/db.json
+```
+
+## Usage
+
+```js
+var db = require('mime-db');
+
+// grab data on .js files
+var data = db['application/javascript'];
+```
+
+## Data Structure
+
+The JSON file is a map lookup for lowercased mime types.
+Each mime type has the following properties:
+
+- `.source` - where the mime type is defined.
+ If not set, it's probably a custom media type.
+ - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
+ - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
+- `.extensions[]` - known extensions associated with this mime type.
+- `.compressible` - whether a file of this type is can be gzipped.
+- `.charset` - the default charset associated with this type, if any.
+
+If unknown, every property could be `undefined`.
+
+## Contributing
+
+To edit the database, only make PRs against `src/custom.json` or
+`src/custom-suffix.json`.
+
+To update the build, run `npm run update`.
+
+## Adding Custom Media Types
+
+The best way to get new media types included in this library is to register
+them with the IANA. The community registration procedure is outlined in
+[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
+registered with the IANA are automatically pulled into this library.
+
+[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg?style=flat
+[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg?style=flat
+[npm-url]: https://npmjs.org/package/mime-db
+[travis-image]: https://img.shields.io/travis/jshttp/mime-db.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/mime-db
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master
+[node-image]: https://img.shields.io/node/v/mime-db.svg?style=flat
+[node-url]: http://nodejs.org/download/
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json
new file mode 100644
index 0000000..283c1de
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json
@@ -0,0 +1,6299 @@
+{
+ "application/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "application/3gpdash-qoe-report+xml": {
+ "source": "iana"
+ },
+ "application/3gpp-ims+xml": {
+ "source": "iana"
+ },
+ "application/a2l": {
+ "source": "iana"
+ },
+ "application/activemessage": {
+ "source": "iana"
+ },
+ "application/alto-costmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-costmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-directory+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcost+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcostparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointprop+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointpropparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-error+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/aml": {
+ "source": "iana"
+ },
+ "application/andrew-inset": {
+ "source": "iana",
+ "extensions": ["ez"]
+ },
+ "application/applefile": {
+ "source": "iana"
+ },
+ "application/applixware": {
+ "source": "apache",
+ "extensions": ["aw"]
+ },
+ "application/atf": {
+ "source": "iana"
+ },
+ "application/atfx": {
+ "source": "iana"
+ },
+ "application/atom+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["atom"]
+ },
+ "application/atomcat+xml": {
+ "source": "iana",
+ "extensions": ["atomcat"]
+ },
+ "application/atomdeleted+xml": {
+ "source": "iana"
+ },
+ "application/atomicmail": {
+ "source": "iana"
+ },
+ "application/atomsvc+xml": {
+ "source": "iana",
+ "extensions": ["atomsvc"]
+ },
+ "application/atxml": {
+ "source": "iana"
+ },
+ "application/auth-policy+xml": {
+ "source": "iana"
+ },
+ "application/bacnet-xdd+zip": {
+ "source": "iana"
+ },
+ "application/batch-smtp": {
+ "source": "iana"
+ },
+ "application/beep+xml": {
+ "source": "iana"
+ },
+ "application/calendar+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/calendar+xml": {
+ "source": "iana"
+ },
+ "application/call-completion": {
+ "source": "iana"
+ },
+ "application/cals-1840": {
+ "source": "iana"
+ },
+ "application/cbor": {
+ "source": "iana"
+ },
+ "application/ccmp+xml": {
+ "source": "iana"
+ },
+ "application/ccxml+xml": {
+ "source": "iana",
+ "extensions": ["ccxml"]
+ },
+ "application/cdfx+xml": {
+ "source": "iana"
+ },
+ "application/cdmi-capability": {
+ "source": "iana",
+ "extensions": ["cdmia"]
+ },
+ "application/cdmi-container": {
+ "source": "iana",
+ "extensions": ["cdmic"]
+ },
+ "application/cdmi-domain": {
+ "source": "iana",
+ "extensions": ["cdmid"]
+ },
+ "application/cdmi-object": {
+ "source": "iana",
+ "extensions": ["cdmio"]
+ },
+ "application/cdmi-queue": {
+ "source": "iana",
+ "extensions": ["cdmiq"]
+ },
+ "application/cea": {
+ "source": "iana"
+ },
+ "application/cea-2018+xml": {
+ "source": "iana"
+ },
+ "application/cellml+xml": {
+ "source": "iana"
+ },
+ "application/cfw": {
+ "source": "iana"
+ },
+ "application/cms": {
+ "source": "iana"
+ },
+ "application/cnrp+xml": {
+ "source": "iana"
+ },
+ "application/coap-group+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/commonground": {
+ "source": "iana"
+ },
+ "application/conference-info+xml": {
+ "source": "iana"
+ },
+ "application/cpl+xml": {
+ "source": "iana"
+ },
+ "application/csrattrs": {
+ "source": "iana"
+ },
+ "application/csta+xml": {
+ "source": "iana"
+ },
+ "application/cstadata+xml": {
+ "source": "iana"
+ },
+ "application/cu-seeme": {
+ "source": "apache",
+ "extensions": ["cu"]
+ },
+ "application/cybercash": {
+ "source": "iana"
+ },
+ "application/dart": {
+ "compressible": true
+ },
+ "application/dash+xml": {
+ "source": "iana",
+ "extensions": ["mdp"]
+ },
+ "application/dashdelta": {
+ "source": "iana"
+ },
+ "application/davmount+xml": {
+ "source": "iana",
+ "extensions": ["davmount"]
+ },
+ "application/dca-rft": {
+ "source": "iana"
+ },
+ "application/dcd": {
+ "source": "iana"
+ },
+ "application/dec-dx": {
+ "source": "iana"
+ },
+ "application/dialog-info+xml": {
+ "source": "iana"
+ },
+ "application/dicom": {
+ "source": "iana"
+ },
+ "application/dii": {
+ "source": "iana"
+ },
+ "application/dit": {
+ "source": "iana"
+ },
+ "application/dns": {
+ "source": "iana"
+ },
+ "application/docbook+xml": {
+ "source": "apache",
+ "extensions": ["dbk"]
+ },
+ "application/dskpp+xml": {
+ "source": "iana"
+ },
+ "application/dssc+der": {
+ "source": "iana",
+ "extensions": ["dssc"]
+ },
+ "application/dssc+xml": {
+ "source": "iana",
+ "extensions": ["xdssc"]
+ },
+ "application/dvcs": {
+ "source": "iana"
+ },
+ "application/ecmascript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ecma"]
+ },
+ "application/edi-consent": {
+ "source": "iana"
+ },
+ "application/edi-x12": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/edifact": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/emma+xml": {
+ "source": "iana",
+ "extensions": ["emma"]
+ },
+ "application/emotionml+xml": {
+ "source": "iana"
+ },
+ "application/encaprtp": {
+ "source": "iana"
+ },
+ "application/epp+xml": {
+ "source": "iana"
+ },
+ "application/epub+zip": {
+ "source": "iana",
+ "extensions": ["epub"]
+ },
+ "application/eshop": {
+ "source": "iana"
+ },
+ "application/exi": {
+ "source": "iana",
+ "extensions": ["exi"]
+ },
+ "application/fastinfoset": {
+ "source": "iana"
+ },
+ "application/fastsoap": {
+ "source": "iana"
+ },
+ "application/fdt+xml": {
+ "source": "iana"
+ },
+ "application/fits": {
+ "source": "iana"
+ },
+ "application/font-sfnt": {
+ "source": "iana"
+ },
+ "application/font-tdpfr": {
+ "source": "iana",
+ "extensions": ["pfr"]
+ },
+ "application/font-woff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["woff"]
+ },
+ "application/font-woff2": {
+ "compressible": false,
+ "extensions": ["woff2"]
+ },
+ "application/framework-attributes+xml": {
+ "source": "iana"
+ },
+ "application/gml+xml": {
+ "source": "apache",
+ "extensions": ["gml"]
+ },
+ "application/gpx+xml": {
+ "source": "apache",
+ "extensions": ["gpx"]
+ },
+ "application/gxf": {
+ "source": "apache",
+ "extensions": ["gxf"]
+ },
+ "application/gzip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/h224": {
+ "source": "iana"
+ },
+ "application/held+xml": {
+ "source": "iana"
+ },
+ "application/http": {
+ "source": "iana"
+ },
+ "application/hyperstudio": {
+ "source": "iana",
+ "extensions": ["stk"]
+ },
+ "application/ibe-key-request+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pkg-reply+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pp-data": {
+ "source": "iana"
+ },
+ "application/iges": {
+ "source": "iana"
+ },
+ "application/im-iscomposing+xml": {
+ "source": "iana"
+ },
+ "application/index": {
+ "source": "iana"
+ },
+ "application/index.cmd": {
+ "source": "iana"
+ },
+ "application/index.obj": {
+ "source": "iana"
+ },
+ "application/index.response": {
+ "source": "iana"
+ },
+ "application/index.vnd": {
+ "source": "iana"
+ },
+ "application/inkml+xml": {
+ "source": "iana",
+ "extensions": ["ink","inkml"]
+ },
+ "application/iotp": {
+ "source": "iana"
+ },
+ "application/ipfix": {
+ "source": "iana",
+ "extensions": ["ipfix"]
+ },
+ "application/ipp": {
+ "source": "iana"
+ },
+ "application/isup": {
+ "source": "iana"
+ },
+ "application/its+xml": {
+ "source": "iana"
+ },
+ "application/java-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jar"]
+ },
+ "application/java-serialized-object": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ser"]
+ },
+ "application/java-vm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["class"]
+ },
+ "application/javascript": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["js"]
+ },
+ "application/jose": {
+ "source": "iana"
+ },
+ "application/jose+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jrd+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["json","map"]
+ },
+ "application/json-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json-seq": {
+ "source": "iana"
+ },
+ "application/json5": {
+ "extensions": ["json5"]
+ },
+ "application/jsonml+json": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["jsonml"]
+ },
+ "application/jwk+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwk-set+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwt": {
+ "source": "iana"
+ },
+ "application/kpml-request+xml": {
+ "source": "iana"
+ },
+ "application/kpml-response+xml": {
+ "source": "iana"
+ },
+ "application/ld+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/link-format": {
+ "source": "iana"
+ },
+ "application/load-control+xml": {
+ "source": "iana"
+ },
+ "application/lost+xml": {
+ "source": "iana",
+ "extensions": ["lostxml"]
+ },
+ "application/lostsync+xml": {
+ "source": "iana"
+ },
+ "application/lxf": {
+ "source": "iana"
+ },
+ "application/mac-binhex40": {
+ "source": "iana",
+ "extensions": ["hqx"]
+ },
+ "application/mac-compactpro": {
+ "source": "apache",
+ "extensions": ["cpt"]
+ },
+ "application/macwriteii": {
+ "source": "iana"
+ },
+ "application/mads+xml": {
+ "source": "iana",
+ "extensions": ["mads"]
+ },
+ "application/marc": {
+ "source": "iana",
+ "extensions": ["mrc"]
+ },
+ "application/marcxml+xml": {
+ "source": "iana",
+ "extensions": ["mrcx"]
+ },
+ "application/mathematica": {
+ "source": "iana",
+ "extensions": ["ma","nb","mb"]
+ },
+ "application/mathml+xml": {
+ "source": "iana",
+ "extensions": ["mathml"]
+ },
+ "application/mathml-content+xml": {
+ "source": "iana"
+ },
+ "application/mathml-presentation+xml": {
+ "source": "iana"
+ },
+ "application/mbms-associated-procedure-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-deregister+xml": {
+ "source": "iana"
+ },
+ "application/mbms-envelope+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-protection-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-reception-report+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-schedule+xml": {
+ "source": "iana"
+ },
+ "application/mbms-user-service-description+xml": {
+ "source": "iana"
+ },
+ "application/mbox": {
+ "source": "iana",
+ "extensions": ["mbox"]
+ },
+ "application/media-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/media_control+xml": {
+ "source": "iana"
+ },
+ "application/mediaservercontrol+xml": {
+ "source": "iana",
+ "extensions": ["mscml"]
+ },
+ "application/merge-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/metalink+xml": {
+ "source": "apache",
+ "extensions": ["metalink"]
+ },
+ "application/metalink4+xml": {
+ "source": "iana",
+ "extensions": ["meta4"]
+ },
+ "application/mets+xml": {
+ "source": "iana",
+ "extensions": ["mets"]
+ },
+ "application/mf4": {
+ "source": "iana"
+ },
+ "application/mikey": {
+ "source": "iana"
+ },
+ "application/mods+xml": {
+ "source": "iana",
+ "extensions": ["mods"]
+ },
+ "application/moss-keys": {
+ "source": "iana"
+ },
+ "application/moss-signature": {
+ "source": "iana"
+ },
+ "application/mosskey-data": {
+ "source": "iana"
+ },
+ "application/mosskey-request": {
+ "source": "iana"
+ },
+ "application/mp21": {
+ "source": "iana",
+ "extensions": ["m21","mp21"]
+ },
+ "application/mp4": {
+ "source": "iana",
+ "extensions": ["mp4s","m4p"]
+ },
+ "application/mpeg4-generic": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod-xmt": {
+ "source": "iana"
+ },
+ "application/mrb-consumer+xml": {
+ "source": "iana"
+ },
+ "application/mrb-publish+xml": {
+ "source": "iana"
+ },
+ "application/msc-ivr+xml": {
+ "source": "iana"
+ },
+ "application/msc-mixer+xml": {
+ "source": "iana"
+ },
+ "application/msword": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["doc","dot"]
+ },
+ "application/mxf": {
+ "source": "iana",
+ "extensions": ["mxf"]
+ },
+ "application/nasdata": {
+ "source": "iana"
+ },
+ "application/news-checkgroups": {
+ "source": "iana"
+ },
+ "application/news-groupinfo": {
+ "source": "iana"
+ },
+ "application/news-transmission": {
+ "source": "iana"
+ },
+ "application/nlsml+xml": {
+ "source": "iana"
+ },
+ "application/nss": {
+ "source": "iana"
+ },
+ "application/ocsp-request": {
+ "source": "iana"
+ },
+ "application/ocsp-response": {
+ "source": "iana"
+ },
+ "application/octet-stream": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","buffer"]
+ },
+ "application/oda": {
+ "source": "iana",
+ "extensions": ["oda"]
+ },
+ "application/odx": {
+ "source": "iana"
+ },
+ "application/oebps-package+xml": {
+ "source": "iana",
+ "extensions": ["opf"]
+ },
+ "application/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ogx"]
+ },
+ "application/omdoc+xml": {
+ "source": "apache",
+ "extensions": ["omdoc"]
+ },
+ "application/onenote": {
+ "source": "apache",
+ "extensions": ["onetoc","onetoc2","onetmp","onepkg"]
+ },
+ "application/oxps": {
+ "source": "iana",
+ "extensions": ["oxps"]
+ },
+ "application/p2p-overlay+xml": {
+ "source": "iana"
+ },
+ "application/parityfec": {
+ "source": "iana"
+ },
+ "application/patch-ops-error+xml": {
+ "source": "iana",
+ "extensions": ["xer"]
+ },
+ "application/pdf": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pdf"]
+ },
+ "application/pdx": {
+ "source": "iana"
+ },
+ "application/pgp-encrypted": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pgp"]
+ },
+ "application/pgp-keys": {
+ "source": "iana"
+ },
+ "application/pgp-signature": {
+ "source": "iana",
+ "extensions": ["asc","sig"]
+ },
+ "application/pics-rules": {
+ "source": "apache",
+ "extensions": ["prf"]
+ },
+ "application/pidf+xml": {
+ "source": "iana"
+ },
+ "application/pidf-diff+xml": {
+ "source": "iana"
+ },
+ "application/pkcs10": {
+ "source": "iana",
+ "extensions": ["p10"]
+ },
+ "application/pkcs7-mime": {
+ "source": "iana",
+ "extensions": ["p7m","p7c"]
+ },
+ "application/pkcs7-signature": {
+ "source": "iana",
+ "extensions": ["p7s"]
+ },
+ "application/pkcs8": {
+ "source": "iana",
+ "extensions": ["p8"]
+ },
+ "application/pkix-attr-cert": {
+ "source": "iana",
+ "extensions": ["ac"]
+ },
+ "application/pkix-cert": {
+ "source": "iana",
+ "extensions": ["cer"]
+ },
+ "application/pkix-crl": {
+ "source": "iana",
+ "extensions": ["crl"]
+ },
+ "application/pkix-pkipath": {
+ "source": "iana",
+ "extensions": ["pkipath"]
+ },
+ "application/pkixcmp": {
+ "source": "iana",
+ "extensions": ["pki"]
+ },
+ "application/pls+xml": {
+ "source": "iana",
+ "extensions": ["pls"]
+ },
+ "application/poc-settings+xml": {
+ "source": "iana"
+ },
+ "application/postscript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ai","eps","ps"]
+ },
+ "application/provenance+xml": {
+ "source": "iana"
+ },
+ "application/prs.alvestrand.titrax-sheet": {
+ "source": "iana"
+ },
+ "application/prs.cww": {
+ "source": "iana",
+ "extensions": ["cww"]
+ },
+ "application/prs.hpub+zip": {
+ "source": "iana"
+ },
+ "application/prs.nprend": {
+ "source": "iana"
+ },
+ "application/prs.plucker": {
+ "source": "iana"
+ },
+ "application/prs.rdf-xml-crypt": {
+ "source": "iana"
+ },
+ "application/prs.xsf+xml": {
+ "source": "iana"
+ },
+ "application/pskc+xml": {
+ "source": "iana",
+ "extensions": ["pskcxml"]
+ },
+ "application/qsig": {
+ "source": "iana"
+ },
+ "application/raptorfec": {
+ "source": "iana"
+ },
+ "application/rdap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/rdf+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rdf"]
+ },
+ "application/reginfo+xml": {
+ "source": "iana",
+ "extensions": ["rif"]
+ },
+ "application/relax-ng-compact-syntax": {
+ "source": "iana",
+ "extensions": ["rnc"]
+ },
+ "application/remote-printing": {
+ "source": "iana"
+ },
+ "application/reputon+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/resource-lists+xml": {
+ "source": "iana",
+ "extensions": ["rl"]
+ },
+ "application/resource-lists-diff+xml": {
+ "source": "iana",
+ "extensions": ["rld"]
+ },
+ "application/riscos": {
+ "source": "iana"
+ },
+ "application/rlmi+xml": {
+ "source": "iana"
+ },
+ "application/rls-services+xml": {
+ "source": "iana",
+ "extensions": ["rs"]
+ },
+ "application/rpki-ghostbusters": {
+ "source": "iana",
+ "extensions": ["gbr"]
+ },
+ "application/rpki-manifest": {
+ "source": "iana",
+ "extensions": ["mft"]
+ },
+ "application/rpki-roa": {
+ "source": "iana",
+ "extensions": ["roa"]
+ },
+ "application/rpki-updown": {
+ "source": "iana"
+ },
+ "application/rsd+xml": {
+ "source": "apache",
+ "extensions": ["rsd"]
+ },
+ "application/rss+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["rss"]
+ },
+ "application/rtf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtf"]
+ },
+ "application/rtploopback": {
+ "source": "iana"
+ },
+ "application/rtx": {
+ "source": "iana"
+ },
+ "application/samlassertion+xml": {
+ "source": "iana"
+ },
+ "application/samlmetadata+xml": {
+ "source": "iana"
+ },
+ "application/sbml+xml": {
+ "source": "iana",
+ "extensions": ["sbml"]
+ },
+ "application/scaip+xml": {
+ "source": "iana"
+ },
+ "application/scvp-cv-request": {
+ "source": "iana",
+ "extensions": ["scq"]
+ },
+ "application/scvp-cv-response": {
+ "source": "iana",
+ "extensions": ["scs"]
+ },
+ "application/scvp-vp-request": {
+ "source": "iana",
+ "extensions": ["spq"]
+ },
+ "application/scvp-vp-response": {
+ "source": "iana",
+ "extensions": ["spp"]
+ },
+ "application/sdp": {
+ "source": "iana",
+ "extensions": ["sdp"]
+ },
+ "application/sep+xml": {
+ "source": "iana"
+ },
+ "application/sep-exi": {
+ "source": "iana"
+ },
+ "application/session-info": {
+ "source": "iana"
+ },
+ "application/set-payment": {
+ "source": "iana"
+ },
+ "application/set-payment-initiation": {
+ "source": "iana",
+ "extensions": ["setpay"]
+ },
+ "application/set-registration": {
+ "source": "iana"
+ },
+ "application/set-registration-initiation": {
+ "source": "iana",
+ "extensions": ["setreg"]
+ },
+ "application/sgml": {
+ "source": "iana"
+ },
+ "application/sgml-open-catalog": {
+ "source": "iana"
+ },
+ "application/shf+xml": {
+ "source": "iana",
+ "extensions": ["shf"]
+ },
+ "application/sieve": {
+ "source": "iana"
+ },
+ "application/simple-filter+xml": {
+ "source": "iana"
+ },
+ "application/simple-message-summary": {
+ "source": "iana"
+ },
+ "application/simplesymbolcontainer": {
+ "source": "iana"
+ },
+ "application/slate": {
+ "source": "iana"
+ },
+ "application/smil": {
+ "source": "iana"
+ },
+ "application/smil+xml": {
+ "source": "iana",
+ "extensions": ["smi","smil"]
+ },
+ "application/smpte336m": {
+ "source": "iana"
+ },
+ "application/soap+fastinfoset": {
+ "source": "iana"
+ },
+ "application/soap+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/sparql-query": {
+ "source": "iana",
+ "extensions": ["rq"]
+ },
+ "application/sparql-results+xml": {
+ "source": "iana",
+ "extensions": ["srx"]
+ },
+ "application/spirits-event+xml": {
+ "source": "iana"
+ },
+ "application/sql": {
+ "source": "iana"
+ },
+ "application/srgs": {
+ "source": "iana",
+ "extensions": ["gram"]
+ },
+ "application/srgs+xml": {
+ "source": "iana",
+ "extensions": ["grxml"]
+ },
+ "application/sru+xml": {
+ "source": "iana",
+ "extensions": ["sru"]
+ },
+ "application/ssdl+xml": {
+ "source": "apache",
+ "extensions": ["ssdl"]
+ },
+ "application/ssml+xml": {
+ "source": "iana",
+ "extensions": ["ssml"]
+ },
+ "application/tamp-apex-update": {
+ "source": "iana"
+ },
+ "application/tamp-apex-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-community-update": {
+ "source": "iana"
+ },
+ "application/tamp-community-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-error": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-status-query": {
+ "source": "iana"
+ },
+ "application/tamp-status-response": {
+ "source": "iana"
+ },
+ "application/tamp-update": {
+ "source": "iana"
+ },
+ "application/tamp-update-confirm": {
+ "source": "iana"
+ },
+ "application/tar": {
+ "compressible": true
+ },
+ "application/tei+xml": {
+ "source": "iana",
+ "extensions": ["tei","teicorpus"]
+ },
+ "application/thraud+xml": {
+ "source": "iana",
+ "extensions": ["tfi"]
+ },
+ "application/timestamp-query": {
+ "source": "iana"
+ },
+ "application/timestamp-reply": {
+ "source": "iana"
+ },
+ "application/timestamped-data": {
+ "source": "iana",
+ "extensions": ["tsd"]
+ },
+ "application/ttml+xml": {
+ "source": "iana"
+ },
+ "application/tve-trigger": {
+ "source": "iana"
+ },
+ "application/ulpfec": {
+ "source": "iana"
+ },
+ "application/urc-grpsheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-ressheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-targetdesc+xml": {
+ "source": "iana"
+ },
+ "application/urc-uisocketdesc+xml": {
+ "source": "iana"
+ },
+ "application/vcard+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vcard+xml": {
+ "source": "iana"
+ },
+ "application/vemmi": {
+ "source": "iana"
+ },
+ "application/vividence.scriptfile": {
+ "source": "apache"
+ },
+ "application/vnd.3gpp.bsf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.pic-bw-large": {
+ "source": "iana",
+ "extensions": ["plb"]
+ },
+ "application/vnd.3gpp.pic-bw-small": {
+ "source": "iana",
+ "extensions": ["psb"]
+ },
+ "application/vnd.3gpp.pic-bw-var": {
+ "source": "iana",
+ "extensions": ["pvb"]
+ },
+ "application/vnd.3gpp.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.bcmcsinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.tcap": {
+ "source": "iana",
+ "extensions": ["tcap"]
+ },
+ "application/vnd.3m.post-it-notes": {
+ "source": "iana",
+ "extensions": ["pwn"]
+ },
+ "application/vnd.accpac.simply.aso": {
+ "source": "iana",
+ "extensions": ["aso"]
+ },
+ "application/vnd.accpac.simply.imp": {
+ "source": "iana",
+ "extensions": ["imp"]
+ },
+ "application/vnd.acucobol": {
+ "source": "iana",
+ "extensions": ["acu"]
+ },
+ "application/vnd.acucorp": {
+ "source": "iana",
+ "extensions": ["atc","acutc"]
+ },
+ "application/vnd.adobe.air-application-installer-package+zip": {
+ "source": "apache",
+ "extensions": ["air"]
+ },
+ "application/vnd.adobe.flash.movie": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.formscentral.fcdt": {
+ "source": "iana",
+ "extensions": ["fcdt"]
+ },
+ "application/vnd.adobe.fxp": {
+ "source": "iana",
+ "extensions": ["fxp","fxpl"]
+ },
+ "application/vnd.adobe.partial-upload": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.xdp+xml": {
+ "source": "iana",
+ "extensions": ["xdp"]
+ },
+ "application/vnd.adobe.xfdf": {
+ "source": "iana",
+ "extensions": ["xfdf"]
+ },
+ "application/vnd.aether.imp": {
+ "source": "iana"
+ },
+ "application/vnd.ah-barcode": {
+ "source": "iana"
+ },
+ "application/vnd.ahead.space": {
+ "source": "iana",
+ "extensions": ["ahead"]
+ },
+ "application/vnd.airzip.filesecure.azf": {
+ "source": "iana",
+ "extensions": ["azf"]
+ },
+ "application/vnd.airzip.filesecure.azs": {
+ "source": "iana",
+ "extensions": ["azs"]
+ },
+ "application/vnd.amazon.ebook": {
+ "source": "apache",
+ "extensions": ["azw"]
+ },
+ "application/vnd.americandynamics.acc": {
+ "source": "iana",
+ "extensions": ["acc"]
+ },
+ "application/vnd.amiga.ami": {
+ "source": "iana",
+ "extensions": ["ami"]
+ },
+ "application/vnd.amundsen.maze+xml": {
+ "source": "iana"
+ },
+ "application/vnd.android.package-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["apk"]
+ },
+ "application/vnd.anser-web-certificate-issue-initiation": {
+ "source": "iana",
+ "extensions": ["cii"]
+ },
+ "application/vnd.anser-web-funds-transfer-initiation": {
+ "source": "apache",
+ "extensions": ["fti"]
+ },
+ "application/vnd.antix.game-component": {
+ "source": "iana",
+ "extensions": ["atx"]
+ },
+ "application/vnd.apache.thrift.binary": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.compact": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.json": {
+ "source": "iana"
+ },
+ "application/vnd.api+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.apple.installer+xml": {
+ "source": "iana",
+ "extensions": ["mpkg"]
+ },
+ "application/vnd.apple.mpegurl": {
+ "source": "iana",
+ "extensions": ["m3u8"]
+ },
+ "application/vnd.arastra.swi": {
+ "source": "iana"
+ },
+ "application/vnd.aristanetworks.swi": {
+ "source": "iana",
+ "extensions": ["swi"]
+ },
+ "application/vnd.artsquare": {
+ "source": "iana"
+ },
+ "application/vnd.astraea-software.iota": {
+ "source": "iana",
+ "extensions": ["iota"]
+ },
+ "application/vnd.audiograph": {
+ "source": "iana",
+ "extensions": ["aep"]
+ },
+ "application/vnd.autopackage": {
+ "source": "iana"
+ },
+ "application/vnd.avistar+xml": {
+ "source": "iana"
+ },
+ "application/vnd.balsamiq.bmml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.bekitzur-stech+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.blueice.multipass": {
+ "source": "iana",
+ "extensions": ["mpm"]
+ },
+ "application/vnd.bluetooth.ep.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bluetooth.le.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bmi": {
+ "source": "iana",
+ "extensions": ["bmi"]
+ },
+ "application/vnd.businessobjects": {
+ "source": "iana",
+ "extensions": ["rep"]
+ },
+ "application/vnd.cab-jscript": {
+ "source": "iana"
+ },
+ "application/vnd.canon-cpdl": {
+ "source": "iana"
+ },
+ "application/vnd.canon-lips": {
+ "source": "iana"
+ },
+ "application/vnd.cendio.thinlinc.clientconf": {
+ "source": "iana"
+ },
+ "application/vnd.century-systems.tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.chemdraw+xml": {
+ "source": "iana",
+ "extensions": ["cdxml"]
+ },
+ "application/vnd.chipnuts.karaoke-mmd": {
+ "source": "iana",
+ "extensions": ["mmd"]
+ },
+ "application/vnd.cinderella": {
+ "source": "iana",
+ "extensions": ["cdy"]
+ },
+ "application/vnd.cirpack.isdn-ext": {
+ "source": "iana"
+ },
+ "application/vnd.claymore": {
+ "source": "iana",
+ "extensions": ["cla"]
+ },
+ "application/vnd.cloanto.rp9": {
+ "source": "iana",
+ "extensions": ["rp9"]
+ },
+ "application/vnd.clonk.c4group": {
+ "source": "iana",
+ "extensions": ["c4g","c4d","c4f","c4p","c4u"]
+ },
+ "application/vnd.cluetrust.cartomobile-config": {
+ "source": "iana",
+ "extensions": ["c11amc"]
+ },
+ "application/vnd.cluetrust.cartomobile-config-pkg": {
+ "source": "iana",
+ "extensions": ["c11amz"]
+ },
+ "application/vnd.coffeescript": {
+ "source": "iana"
+ },
+ "application/vnd.collection+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.doc+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.next+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.commerce-battelle": {
+ "source": "iana"
+ },
+ "application/vnd.commonspace": {
+ "source": "iana",
+ "extensions": ["csp"]
+ },
+ "application/vnd.contact.cmsg": {
+ "source": "iana",
+ "extensions": ["cdbcmsg"]
+ },
+ "application/vnd.cosmocaller": {
+ "source": "iana",
+ "extensions": ["cmc"]
+ },
+ "application/vnd.crick.clicker": {
+ "source": "iana",
+ "extensions": ["clkx"]
+ },
+ "application/vnd.crick.clicker.keyboard": {
+ "source": "iana",
+ "extensions": ["clkk"]
+ },
+ "application/vnd.crick.clicker.palette": {
+ "source": "iana",
+ "extensions": ["clkp"]
+ },
+ "application/vnd.crick.clicker.template": {
+ "source": "iana",
+ "extensions": ["clkt"]
+ },
+ "application/vnd.crick.clicker.wordbank": {
+ "source": "iana",
+ "extensions": ["clkw"]
+ },
+ "application/vnd.criticaltools.wbs+xml": {
+ "source": "iana",
+ "extensions": ["wbs"]
+ },
+ "application/vnd.ctc-posml": {
+ "source": "iana",
+ "extensions": ["pml"]
+ },
+ "application/vnd.ctct.ws+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cups-pdf": {
+ "source": "iana"
+ },
+ "application/vnd.cups-postscript": {
+ "source": "iana"
+ },
+ "application/vnd.cups-ppd": {
+ "source": "iana",
+ "extensions": ["ppd"]
+ },
+ "application/vnd.cups-raster": {
+ "source": "iana"
+ },
+ "application/vnd.cups-raw": {
+ "source": "iana"
+ },
+ "application/vnd.curl": {
+ "source": "iana"
+ },
+ "application/vnd.curl.car": {
+ "source": "apache",
+ "extensions": ["car"]
+ },
+ "application/vnd.curl.pcurl": {
+ "source": "apache",
+ "extensions": ["pcurl"]
+ },
+ "application/vnd.cyan.dean.root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cybank": {
+ "source": "iana"
+ },
+ "application/vnd.dart": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dart"]
+ },
+ "application/vnd.data-vision.rdz": {
+ "source": "iana",
+ "extensions": ["rdz"]
+ },
+ "application/vnd.debian.binary-package": {
+ "source": "iana"
+ },
+ "application/vnd.dece.data": {
+ "source": "iana",
+ "extensions": ["uvf","uvvf","uvd","uvvd"]
+ },
+ "application/vnd.dece.ttml+xml": {
+ "source": "iana",
+ "extensions": ["uvt","uvvt"]
+ },
+ "application/vnd.dece.unspecified": {
+ "source": "iana",
+ "extensions": ["uvx","uvvx"]
+ },
+ "application/vnd.dece.zip": {
+ "source": "iana",
+ "extensions": ["uvz","uvvz"]
+ },
+ "application/vnd.denovo.fcselayout-link": {
+ "source": "iana",
+ "extensions": ["fe_launch"]
+ },
+ "application/vnd.desmume-movie": {
+ "source": "iana"
+ },
+ "application/vnd.dir-bi.plate-dl-nosuffix": {
+ "source": "iana"
+ },
+ "application/vnd.dm.delegation+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dna": {
+ "source": "iana",
+ "extensions": ["dna"]
+ },
+ "application/vnd.document+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dolby.mlp": {
+ "source": "apache",
+ "extensions": ["mlp"]
+ },
+ "application/vnd.dolby.mobile.1": {
+ "source": "iana"
+ },
+ "application/vnd.dolby.mobile.2": {
+ "source": "iana"
+ },
+ "application/vnd.doremir.scorecloud-binary-document": {
+ "source": "iana"
+ },
+ "application/vnd.dpgraph": {
+ "source": "iana",
+ "extensions": ["dpg"]
+ },
+ "application/vnd.dreamfactory": {
+ "source": "iana",
+ "extensions": ["dfac"]
+ },
+ "application/vnd.ds-keypoint": {
+ "source": "apache",
+ "extensions": ["kpxx"]
+ },
+ "application/vnd.dtg.local": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.flash": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.html": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ait": {
+ "source": "iana",
+ "extensions": ["ait"]
+ },
+ "application/vnd.dvb.dvbj": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.esgcontainer": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcdftnotifaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess2": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgpdd": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcroaming": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-base": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-enhancement": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-aggregate-root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-container+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-generic+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-msglist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-response+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-init+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.pfr": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.service": {
+ "source": "iana",
+ "extensions": ["svc"]
+ },
+ "application/vnd.dxr": {
+ "source": "iana"
+ },
+ "application/vnd.dynageo": {
+ "source": "iana",
+ "extensions": ["geo"]
+ },
+ "application/vnd.dzr": {
+ "source": "iana"
+ },
+ "application/vnd.easykaraoke.cdgdownload": {
+ "source": "iana"
+ },
+ "application/vnd.ecdis-update": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.chart": {
+ "source": "iana",
+ "extensions": ["mag"]
+ },
+ "application/vnd.ecowin.filerequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.fileupdate": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.series": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesrequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesupdate": {
+ "source": "iana"
+ },
+ "application/vnd.emclient.accessrequest+xml": {
+ "source": "iana"
+ },
+ "application/vnd.enliven": {
+ "source": "iana",
+ "extensions": ["nml"]
+ },
+ "application/vnd.enphase.envoy": {
+ "source": "iana"
+ },
+ "application/vnd.eprints.data+xml": {
+ "source": "iana"
+ },
+ "application/vnd.epson.esf": {
+ "source": "iana",
+ "extensions": ["esf"]
+ },
+ "application/vnd.epson.msf": {
+ "source": "iana",
+ "extensions": ["msf"]
+ },
+ "application/vnd.epson.quickanime": {
+ "source": "iana",
+ "extensions": ["qam"]
+ },
+ "application/vnd.epson.salt": {
+ "source": "iana",
+ "extensions": ["slt"]
+ },
+ "application/vnd.epson.ssf": {
+ "source": "iana",
+ "extensions": ["ssf"]
+ },
+ "application/vnd.ericsson.quickcall": {
+ "source": "iana"
+ },
+ "application/vnd.eszigno3+xml": {
+ "source": "iana",
+ "extensions": ["es3","et3"]
+ },
+ "application/vnd.etsi.aoc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-e+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-s+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.cug+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvcommand+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-bc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-cod+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-npvr+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvservice+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsync+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mcid+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mheg5": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.overload-control-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.pstn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.sci+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.simservs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.timestamp-token": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl.der": {
+ "source": "iana"
+ },
+ "application/vnd.eudora.data": {
+ "source": "iana"
+ },
+ "application/vnd.ezpix-album": {
+ "source": "iana",
+ "extensions": ["ez2"]
+ },
+ "application/vnd.ezpix-package": {
+ "source": "iana",
+ "extensions": ["ez3"]
+ },
+ "application/vnd.f-secure.mobile": {
+ "source": "iana"
+ },
+ "application/vnd.fdf": {
+ "source": "iana",
+ "extensions": ["fdf"]
+ },
+ "application/vnd.fdsn.mseed": {
+ "source": "iana",
+ "extensions": ["mseed"]
+ },
+ "application/vnd.fdsn.seed": {
+ "source": "iana",
+ "extensions": ["seed","dataless"]
+ },
+ "application/vnd.ffsns": {
+ "source": "iana"
+ },
+ "application/vnd.fints": {
+ "source": "iana"
+ },
+ "application/vnd.flographit": {
+ "source": "iana",
+ "extensions": ["gph"]
+ },
+ "application/vnd.fluxtime.clip": {
+ "source": "iana",
+ "extensions": ["ftc"]
+ },
+ "application/vnd.font-fontforge-sfd": {
+ "source": "iana"
+ },
+ "application/vnd.framemaker": {
+ "source": "iana",
+ "extensions": ["fm","frame","maker","book"]
+ },
+ "application/vnd.frogans.fnc": {
+ "source": "iana",
+ "extensions": ["fnc"]
+ },
+ "application/vnd.frogans.ltf": {
+ "source": "iana",
+ "extensions": ["ltf"]
+ },
+ "application/vnd.fsc.weblaunch": {
+ "source": "iana",
+ "extensions": ["fsc"]
+ },
+ "application/vnd.fujitsu.oasys": {
+ "source": "iana",
+ "extensions": ["oas"]
+ },
+ "application/vnd.fujitsu.oasys2": {
+ "source": "iana",
+ "extensions": ["oa2"]
+ },
+ "application/vnd.fujitsu.oasys3": {
+ "source": "iana",
+ "extensions": ["oa3"]
+ },
+ "application/vnd.fujitsu.oasysgp": {
+ "source": "iana",
+ "extensions": ["fg5"]
+ },
+ "application/vnd.fujitsu.oasysprs": {
+ "source": "iana",
+ "extensions": ["bh2"]
+ },
+ "application/vnd.fujixerox.art-ex": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.art4": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.ddd": {
+ "source": "iana",
+ "extensions": ["ddd"]
+ },
+ "application/vnd.fujixerox.docuworks": {
+ "source": "iana",
+ "extensions": ["xdw"]
+ },
+ "application/vnd.fujixerox.docuworks.binder": {
+ "source": "iana",
+ "extensions": ["xbd"]
+ },
+ "application/vnd.fujixerox.docuworks.container": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.hbpl": {
+ "source": "iana"
+ },
+ "application/vnd.fut-misnet": {
+ "source": "iana"
+ },
+ "application/vnd.fuzzysheet": {
+ "source": "iana",
+ "extensions": ["fzs"]
+ },
+ "application/vnd.genomatix.tuxedo": {
+ "source": "iana",
+ "extensions": ["txd"]
+ },
+ "application/vnd.geo+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.geocube+xml": {
+ "source": "iana"
+ },
+ "application/vnd.geogebra.file": {
+ "source": "iana",
+ "extensions": ["ggb"]
+ },
+ "application/vnd.geogebra.tool": {
+ "source": "iana",
+ "extensions": ["ggt"]
+ },
+ "application/vnd.geometry-explorer": {
+ "source": "iana",
+ "extensions": ["gex","gre"]
+ },
+ "application/vnd.geonext": {
+ "source": "iana",
+ "extensions": ["gxt"]
+ },
+ "application/vnd.geoplan": {
+ "source": "iana",
+ "extensions": ["g2w"]
+ },
+ "application/vnd.geospace": {
+ "source": "iana",
+ "extensions": ["g3w"]
+ },
+ "application/vnd.gerber": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt-response": {
+ "source": "iana"
+ },
+ "application/vnd.gmx": {
+ "source": "iana",
+ "extensions": ["gmx"]
+ },
+ "application/vnd.google-earth.kml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["kml"]
+ },
+ "application/vnd.google-earth.kmz": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["kmz"]
+ },
+ "application/vnd.gov.sk.e-form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.gov.sk.e-form+zip": {
+ "source": "iana"
+ },
+ "application/vnd.grafeq": {
+ "source": "iana",
+ "extensions": ["gqf","gqs"]
+ },
+ "application/vnd.gridmp": {
+ "source": "iana"
+ },
+ "application/vnd.groove-account": {
+ "source": "iana",
+ "extensions": ["gac"]
+ },
+ "application/vnd.groove-help": {
+ "source": "iana",
+ "extensions": ["ghf"]
+ },
+ "application/vnd.groove-identity-message": {
+ "source": "iana",
+ "extensions": ["gim"]
+ },
+ "application/vnd.groove-injector": {
+ "source": "iana",
+ "extensions": ["grv"]
+ },
+ "application/vnd.groove-tool-message": {
+ "source": "iana",
+ "extensions": ["gtm"]
+ },
+ "application/vnd.groove-tool-template": {
+ "source": "iana",
+ "extensions": ["tpl"]
+ },
+ "application/vnd.groove-vcard": {
+ "source": "iana",
+ "extensions": ["vcg"]
+ },
+ "application/vnd.hal+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hal+xml": {
+ "source": "iana",
+ "extensions": ["hal"]
+ },
+ "application/vnd.handheld-entertainment+xml": {
+ "source": "iana",
+ "extensions": ["zmm"]
+ },
+ "application/vnd.hbci": {
+ "source": "iana",
+ "extensions": ["hbci"]
+ },
+ "application/vnd.hcl-bireports": {
+ "source": "iana"
+ },
+ "application/vnd.heroku+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hhe.lesson-player": {
+ "source": "iana",
+ "extensions": ["les"]
+ },
+ "application/vnd.hp-hpgl": {
+ "source": "iana",
+ "extensions": ["hpgl"]
+ },
+ "application/vnd.hp-hpid": {
+ "source": "iana",
+ "extensions": ["hpid"]
+ },
+ "application/vnd.hp-hps": {
+ "source": "iana",
+ "extensions": ["hps"]
+ },
+ "application/vnd.hp-jlyt": {
+ "source": "iana",
+ "extensions": ["jlt"]
+ },
+ "application/vnd.hp-pcl": {
+ "source": "iana",
+ "extensions": ["pcl"]
+ },
+ "application/vnd.hp-pclxl": {
+ "source": "iana",
+ "extensions": ["pclxl"]
+ },
+ "application/vnd.httphone": {
+ "source": "iana"
+ },
+ "application/vnd.hydrostatix.sof-data": {
+ "source": "iana"
+ },
+ "application/vnd.hzn-3d-crossword": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.afplinedata": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.electronic-media": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.minipay": {
+ "source": "iana",
+ "extensions": ["mpy"]
+ },
+ "application/vnd.ibm.modcap": {
+ "source": "iana",
+ "extensions": ["afp","listafp","list3820"]
+ },
+ "application/vnd.ibm.rights-management": {
+ "source": "iana",
+ "extensions": ["irm"]
+ },
+ "application/vnd.ibm.secure-container": {
+ "source": "iana",
+ "extensions": ["sc"]
+ },
+ "application/vnd.iccprofile": {
+ "source": "iana",
+ "extensions": ["icc","icm"]
+ },
+ "application/vnd.ieee.1905": {
+ "source": "iana"
+ },
+ "application/vnd.igloader": {
+ "source": "iana",
+ "extensions": ["igl"]
+ },
+ "application/vnd.immervision-ivp": {
+ "source": "iana",
+ "extensions": ["ivp"]
+ },
+ "application/vnd.immervision-ivu": {
+ "source": "iana",
+ "extensions": ["ivu"]
+ },
+ "application/vnd.ims.imsccv1p1": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p2": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p3": {
+ "source": "iana"
+ },
+ "application/vnd.ims.lis.v2.result+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolconsumerprofile+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy.id+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings.simple+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.informedcontrol.rms+xml": {
+ "source": "iana"
+ },
+ "application/vnd.informix-visionary": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project+xml": {
+ "source": "iana"
+ },
+ "application/vnd.innopath.wamp.notification": {
+ "source": "iana"
+ },
+ "application/vnd.insors.igm": {
+ "source": "iana",
+ "extensions": ["igm"]
+ },
+ "application/vnd.intercon.formnet": {
+ "source": "iana",
+ "extensions": ["xpw","xpx"]
+ },
+ "application/vnd.intergeo": {
+ "source": "iana",
+ "extensions": ["i2g"]
+ },
+ "application/vnd.intertrust.digibox": {
+ "source": "iana"
+ },
+ "application/vnd.intertrust.nncp": {
+ "source": "iana"
+ },
+ "application/vnd.intu.qbo": {
+ "source": "iana",
+ "extensions": ["qbo"]
+ },
+ "application/vnd.intu.qfx": {
+ "source": "iana",
+ "extensions": ["qfx"]
+ },
+ "application/vnd.iptc.g2.catalogitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.conceptitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.knowledgeitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.packageitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.planningitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ipunplugged.rcprofile": {
+ "source": "iana",
+ "extensions": ["rcprofile"]
+ },
+ "application/vnd.irepository.package+xml": {
+ "source": "iana",
+ "extensions": ["irp"]
+ },
+ "application/vnd.is-xpr": {
+ "source": "iana",
+ "extensions": ["xpr"]
+ },
+ "application/vnd.isac.fcs": {
+ "source": "iana",
+ "extensions": ["fcs"]
+ },
+ "application/vnd.jam": {
+ "source": "iana",
+ "extensions": ["jam"]
+ },
+ "application/vnd.japannet-directory-service": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-jpnstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-payment-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-setstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.jcp.javame.midlet-rms": {
+ "source": "iana",
+ "extensions": ["rms"]
+ },
+ "application/vnd.jisp": {
+ "source": "iana",
+ "extensions": ["jisp"]
+ },
+ "application/vnd.joost.joda-archive": {
+ "source": "iana",
+ "extensions": ["joda"]
+ },
+ "application/vnd.jsk.isdn-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.kahootz": {
+ "source": "iana",
+ "extensions": ["ktz","ktr"]
+ },
+ "application/vnd.kde.karbon": {
+ "source": "iana",
+ "extensions": ["karbon"]
+ },
+ "application/vnd.kde.kchart": {
+ "source": "iana",
+ "extensions": ["chrt"]
+ },
+ "application/vnd.kde.kformula": {
+ "source": "iana",
+ "extensions": ["kfo"]
+ },
+ "application/vnd.kde.kivio": {
+ "source": "iana",
+ "extensions": ["flw"]
+ },
+ "application/vnd.kde.kontour": {
+ "source": "iana",
+ "extensions": ["kon"]
+ },
+ "application/vnd.kde.kpresenter": {
+ "source": "iana",
+ "extensions": ["kpr","kpt"]
+ },
+ "application/vnd.kde.kspread": {
+ "source": "iana",
+ "extensions": ["ksp"]
+ },
+ "application/vnd.kde.kword": {
+ "source": "iana",
+ "extensions": ["kwd","kwt"]
+ },
+ "application/vnd.kenameaapp": {
+ "source": "iana",
+ "extensions": ["htke"]
+ },
+ "application/vnd.kidspiration": {
+ "source": "iana",
+ "extensions": ["kia"]
+ },
+ "application/vnd.kinar": {
+ "source": "iana",
+ "extensions": ["kne","knp"]
+ },
+ "application/vnd.koan": {
+ "source": "iana",
+ "extensions": ["skp","skd","skt","skm"]
+ },
+ "application/vnd.kodak-descriptor": {
+ "source": "iana",
+ "extensions": ["sse"]
+ },
+ "application/vnd.las.las+xml": {
+ "source": "iana",
+ "extensions": ["lasxml"]
+ },
+ "application/vnd.liberty-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.llamagraphics.life-balance.desktop": {
+ "source": "iana",
+ "extensions": ["lbd"]
+ },
+ "application/vnd.llamagraphics.life-balance.exchange+xml": {
+ "source": "iana",
+ "extensions": ["lbe"]
+ },
+ "application/vnd.lotus-1-2-3": {
+ "source": "iana",
+ "extensions": ["123"]
+ },
+ "application/vnd.lotus-approach": {
+ "source": "iana",
+ "extensions": ["apr"]
+ },
+ "application/vnd.lotus-freelance": {
+ "source": "iana",
+ "extensions": ["pre"]
+ },
+ "application/vnd.lotus-notes": {
+ "source": "iana",
+ "extensions": ["nsf"]
+ },
+ "application/vnd.lotus-organizer": {
+ "source": "iana",
+ "extensions": ["org"]
+ },
+ "application/vnd.lotus-screencam": {
+ "source": "iana",
+ "extensions": ["scm"]
+ },
+ "application/vnd.lotus-wordpro": {
+ "source": "iana",
+ "extensions": ["lwp"]
+ },
+ "application/vnd.macports.portpkg": {
+ "source": "iana",
+ "extensions": ["portpkg"]
+ },
+ "application/vnd.marlin.drm.actiontoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.conftoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.license+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.mdcf": {
+ "source": "iana"
+ },
+ "application/vnd.mason+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.maxmind.maxmind-db": {
+ "source": "iana"
+ },
+ "application/vnd.mcd": {
+ "source": "iana",
+ "extensions": ["mcd"]
+ },
+ "application/vnd.medcalcdata": {
+ "source": "iana",
+ "extensions": ["mc1"]
+ },
+ "application/vnd.mediastation.cdkey": {
+ "source": "iana",
+ "extensions": ["cdkey"]
+ },
+ "application/vnd.meridian-slingshot": {
+ "source": "iana"
+ },
+ "application/vnd.mfer": {
+ "source": "iana",
+ "extensions": ["mwf"]
+ },
+ "application/vnd.mfmp": {
+ "source": "iana",
+ "extensions": ["mfm"]
+ },
+ "application/vnd.micrografx.flo": {
+ "source": "iana",
+ "extensions": ["flo"]
+ },
+ "application/vnd.micrografx.igx": {
+ "source": "iana",
+ "extensions": ["igx"]
+ },
+ "application/vnd.miele+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.mif": {
+ "source": "iana",
+ "extensions": ["mif"]
+ },
+ "application/vnd.minisoft-hp3000-save": {
+ "source": "iana"
+ },
+ "application/vnd.mitsubishi.misty-guard.trustweb": {
+ "source": "iana"
+ },
+ "application/vnd.mobius.daf": {
+ "source": "iana",
+ "extensions": ["daf"]
+ },
+ "application/vnd.mobius.dis": {
+ "source": "iana",
+ "extensions": ["dis"]
+ },
+ "application/vnd.mobius.mbk": {
+ "source": "iana",
+ "extensions": ["mbk"]
+ },
+ "application/vnd.mobius.mqy": {
+ "source": "iana",
+ "extensions": ["mqy"]
+ },
+ "application/vnd.mobius.msl": {
+ "source": "iana",
+ "extensions": ["msl"]
+ },
+ "application/vnd.mobius.plc": {
+ "source": "iana",
+ "extensions": ["plc"]
+ },
+ "application/vnd.mobius.txf": {
+ "source": "iana",
+ "extensions": ["txf"]
+ },
+ "application/vnd.mophun.application": {
+ "source": "iana",
+ "extensions": ["mpn"]
+ },
+ "application/vnd.mophun.certificate": {
+ "source": "iana",
+ "extensions": ["mpc"]
+ },
+ "application/vnd.motorola.flexsuite": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.adsi": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.fis": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.gotap": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.kmr": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.ttc": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.wem": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.iprm": {
+ "source": "iana"
+ },
+ "application/vnd.mozilla.xul+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xul"]
+ },
+ "application/vnd.ms-3mfdocument": {
+ "source": "iana"
+ },
+ "application/vnd.ms-artgalry": {
+ "source": "iana",
+ "extensions": ["cil"]
+ },
+ "application/vnd.ms-asf": {
+ "source": "iana"
+ },
+ "application/vnd.ms-cab-compressed": {
+ "source": "iana",
+ "extensions": ["cab"]
+ },
+ "application/vnd.ms-color.iccprofile": {
+ "source": "apache"
+ },
+ "application/vnd.ms-excel": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xls","xlm","xla","xlc","xlt","xlw"]
+ },
+ "application/vnd.ms-excel.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlam"]
+ },
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsb"]
+ },
+ "application/vnd.ms-excel.sheet.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsm"]
+ },
+ "application/vnd.ms-excel.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xltm"]
+ },
+ "application/vnd.ms-fontobject": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eot"]
+ },
+ "application/vnd.ms-htmlhelp": {
+ "source": "iana",
+ "extensions": ["chm"]
+ },
+ "application/vnd.ms-ims": {
+ "source": "iana",
+ "extensions": ["ims"]
+ },
+ "application/vnd.ms-lrm": {
+ "source": "iana",
+ "extensions": ["lrm"]
+ },
+ "application/vnd.ms-office.activex+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-officetheme": {
+ "source": "iana",
+ "extensions": ["thmx"]
+ },
+ "application/vnd.ms-opentype": {
+ "source": "apache",
+ "compressible": true
+ },
+ "application/vnd.ms-package.obfuscated-opentype": {
+ "source": "apache"
+ },
+ "application/vnd.ms-pki.seccat": {
+ "source": "apache",
+ "extensions": ["cat"]
+ },
+ "application/vnd.ms-pki.stl": {
+ "source": "apache",
+ "extensions": ["stl"]
+ },
+ "application/vnd.ms-playready.initiator+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-powerpoint": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ppt","pps","pot"]
+ },
+ "application/vnd.ms-powerpoint.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppam"]
+ },
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["pptm"]
+ },
+ "application/vnd.ms-powerpoint.slide.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["sldm"]
+ },
+ "application/vnd.ms-powerpoint.slideshow.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppsm"]
+ },
+ "application/vnd.ms-powerpoint.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["potm"]
+ },
+ "application/vnd.ms-printing.printticket+xml": {
+ "source": "apache"
+ },
+ "application/vnd.ms-project": {
+ "source": "iana",
+ "extensions": ["mpp","mpt"]
+ },
+ "application/vnd.ms-tnef": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.printerpairing": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-word.document.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["docm"]
+ },
+ "application/vnd.ms-word.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["dotm"]
+ },
+ "application/vnd.ms-works": {
+ "source": "iana",
+ "extensions": ["wps","wks","wcm","wdb"]
+ },
+ "application/vnd.ms-wpl": {
+ "source": "iana",
+ "extensions": ["wpl"]
+ },
+ "application/vnd.ms-xpsdocument": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xps"]
+ },
+ "application/vnd.msa-disk-image": {
+ "source": "iana"
+ },
+ "application/vnd.mseq": {
+ "source": "iana",
+ "extensions": ["mseq"]
+ },
+ "application/vnd.msign": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator.cif": {
+ "source": "iana"
+ },
+ "application/vnd.music-niff": {
+ "source": "iana"
+ },
+ "application/vnd.musician": {
+ "source": "iana",
+ "extensions": ["mus"]
+ },
+ "application/vnd.muvee.style": {
+ "source": "iana",
+ "extensions": ["msty"]
+ },
+ "application/vnd.mynfc": {
+ "source": "iana",
+ "extensions": ["taglet"]
+ },
+ "application/vnd.ncd.control": {
+ "source": "iana"
+ },
+ "application/vnd.ncd.reference": {
+ "source": "iana"
+ },
+ "application/vnd.nervana": {
+ "source": "iana"
+ },
+ "application/vnd.netfpx": {
+ "source": "iana"
+ },
+ "application/vnd.neurolanguage.nlu": {
+ "source": "iana",
+ "extensions": ["nlu"]
+ },
+ "application/vnd.nintendo.nitro.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nintendo.snes.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nitf": {
+ "source": "iana",
+ "extensions": ["ntf","nitf"]
+ },
+ "application/vnd.noblenet-directory": {
+ "source": "iana",
+ "extensions": ["nnd"]
+ },
+ "application/vnd.noblenet-sealer": {
+ "source": "iana",
+ "extensions": ["nns"]
+ },
+ "application/vnd.noblenet-web": {
+ "source": "iana",
+ "extensions": ["nnw"]
+ },
+ "application/vnd.nokia.catalogs": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.iptv.config+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.isds-radio-presets": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmarkcollection+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.ac+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.data": {
+ "source": "iana",
+ "extensions": ["ngdat"]
+ },
+ "application/vnd.nokia.n-gage.symbian.install": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.ncd": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.radio-preset": {
+ "source": "iana",
+ "extensions": ["rpst"]
+ },
+ "application/vnd.nokia.radio-presets": {
+ "source": "iana",
+ "extensions": ["rpss"]
+ },
+ "application/vnd.novadigm.edm": {
+ "source": "iana",
+ "extensions": ["edm"]
+ },
+ "application/vnd.novadigm.edx": {
+ "source": "iana",
+ "extensions": ["edx"]
+ },
+ "application/vnd.novadigm.ext": {
+ "source": "iana",
+ "extensions": ["ext"]
+ },
+ "application/vnd.ntt-local.content-share": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.file-transfer": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.ogw_remote-access": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_remote": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.oasis.opendocument.chart": {
+ "source": "iana",
+ "extensions": ["odc"]
+ },
+ "application/vnd.oasis.opendocument.chart-template": {
+ "source": "iana",
+ "extensions": ["otc"]
+ },
+ "application/vnd.oasis.opendocument.database": {
+ "source": "iana",
+ "extensions": ["odb"]
+ },
+ "application/vnd.oasis.opendocument.formula": {
+ "source": "iana",
+ "extensions": ["odf"]
+ },
+ "application/vnd.oasis.opendocument.formula-template": {
+ "source": "iana",
+ "extensions": ["odft"]
+ },
+ "application/vnd.oasis.opendocument.graphics": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odg"]
+ },
+ "application/vnd.oasis.opendocument.graphics-template": {
+ "source": "iana",
+ "extensions": ["otg"]
+ },
+ "application/vnd.oasis.opendocument.image": {
+ "source": "iana",
+ "extensions": ["odi"]
+ },
+ "application/vnd.oasis.opendocument.image-template": {
+ "source": "iana",
+ "extensions": ["oti"]
+ },
+ "application/vnd.oasis.opendocument.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odp"]
+ },
+ "application/vnd.oasis.opendocument.presentation-template": {
+ "source": "iana",
+ "extensions": ["otp"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ods"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet-template": {
+ "source": "iana",
+ "extensions": ["ots"]
+ },
+ "application/vnd.oasis.opendocument.text": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odt"]
+ },
+ "application/vnd.oasis.opendocument.text-master": {
+ "source": "iana",
+ "extensions": ["odm"]
+ },
+ "application/vnd.oasis.opendocument.text-template": {
+ "source": "iana",
+ "extensions": ["ott"]
+ },
+ "application/vnd.oasis.opendocument.text-web": {
+ "source": "iana",
+ "extensions": ["oth"]
+ },
+ "application/vnd.obn": {
+ "source": "iana"
+ },
+ "application/vnd.oftn.l10n+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.contentaccessdownload+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.contentaccessstreaming+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.cspg-hexbinary": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.svg+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.xhtml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.mippvcontrolmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.pae.gem": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdlist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.ueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.userprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.olpc-sugar": {
+ "source": "iana",
+ "extensions": ["xo"]
+ },
+ "application/vnd.oma-scws-config": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-request": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-response": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.associated-procedure-parameter+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.drm-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.imd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.ltkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.notification+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.provisioningtrigger": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgboot": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdu": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.simple-symbol-container": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.smartcard-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sprov+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.stkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-address-book+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-feature-handler+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-pcc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-subs-invite+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-user-prefs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcd": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcdc": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dd2+xml": {
+ "source": "iana",
+ "extensions": ["dd2"]
+ },
+ "application/vnd.oma.drm.risd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.group-usage-list+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.pal+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.detailed-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.final-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.groups+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.invocation-descriptor+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.optimized-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.push": {
+ "source": "iana"
+ },
+ "application/vnd.oma.scidm.messages+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.xcap-directory+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-email+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-file+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-folder+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omaloc-supl-init": {
+ "source": "iana"
+ },
+ "application/vnd.openeye.oeb": {
+ "source": "iana"
+ },
+ "application/vnd.openofficeorg.extension": {
+ "source": "apache",
+ "extensions": ["oxt"]
+ },
+ "application/vnd.openxmlformats-officedocument.custom-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawing+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.extended-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pptx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide": {
+ "source": "iana",
+ "extensions": ["sldx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": {
+ "source": "iana",
+ "extensions": ["ppsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template": {
+ "source": "apache",
+ "extensions": ["potx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xlsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template": {
+ "source": "apache",
+ "extensions": ["xltx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.theme+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.themeoverride+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.vmldrawing": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["docx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template": {
+ "source": "apache",
+ "extensions": ["dotx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.core-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.relationships+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oracle.resource+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.orange.indata": {
+ "source": "iana"
+ },
+ "application/vnd.osa.netdeploy": {
+ "source": "iana"
+ },
+ "application/vnd.osgeo.mapguide.package": {
+ "source": "iana",
+ "extensions": ["mgp"]
+ },
+ "application/vnd.osgi.bundle": {
+ "source": "iana"
+ },
+ "application/vnd.osgi.dp": {
+ "source": "iana",
+ "extensions": ["dp"]
+ },
+ "application/vnd.osgi.subsystem": {
+ "source": "iana",
+ "extensions": ["esa"]
+ },
+ "application/vnd.otps.ct-kip+xml": {
+ "source": "iana"
+ },
+ "application/vnd.palm": {
+ "source": "iana",
+ "extensions": ["pdb","pqa","oprc"]
+ },
+ "application/vnd.panoply": {
+ "source": "iana"
+ },
+ "application/vnd.paos+xml": {
+ "source": "iana"
+ },
+ "application/vnd.paos.xml": {
+ "source": "apache"
+ },
+ "application/vnd.pawaafile": {
+ "source": "iana",
+ "extensions": ["paw"]
+ },
+ "application/vnd.pcos": {
+ "source": "iana"
+ },
+ "application/vnd.pg.format": {
+ "source": "iana",
+ "extensions": ["str"]
+ },
+ "application/vnd.pg.osasli": {
+ "source": "iana",
+ "extensions": ["ei6"]
+ },
+ "application/vnd.piaccess.application-licence": {
+ "source": "iana"
+ },
+ "application/vnd.picsel": {
+ "source": "iana",
+ "extensions": ["efif"]
+ },
+ "application/vnd.pmi.widget": {
+ "source": "iana",
+ "extensions": ["wg"]
+ },
+ "application/vnd.poc.group-advertisement+xml": {
+ "source": "iana"
+ },
+ "application/vnd.pocketlearn": {
+ "source": "iana",
+ "extensions": ["plf"]
+ },
+ "application/vnd.powerbuilder6": {
+ "source": "iana",
+ "extensions": ["pbd"]
+ },
+ "application/vnd.powerbuilder6-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75-s": {
+ "source": "iana"
+ },
+ "application/vnd.preminet": {
+ "source": "iana"
+ },
+ "application/vnd.previewsystems.box": {
+ "source": "iana",
+ "extensions": ["box"]
+ },
+ "application/vnd.proteus.magazine": {
+ "source": "iana",
+ "extensions": ["mgz"]
+ },
+ "application/vnd.publishare-delta-tree": {
+ "source": "iana",
+ "extensions": ["qps"]
+ },
+ "application/vnd.pvi.ptid1": {
+ "source": "iana",
+ "extensions": ["ptid"]
+ },
+ "application/vnd.pwg-multiplexed": {
+ "source": "iana"
+ },
+ "application/vnd.pwg-xhtml-print+xml": {
+ "source": "iana"
+ },
+ "application/vnd.qualcomm.brew-app-res": {
+ "source": "iana"
+ },
+ "application/vnd.quark.quarkxpress": {
+ "source": "iana",
+ "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"]
+ },
+ "application/vnd.quobject-quoxdocument": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.moml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-stream+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-base+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-detect+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-group+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-speech+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-transform+xml": {
+ "source": "iana"
+ },
+ "application/vnd.rainstor.data": {
+ "source": "iana"
+ },
+ "application/vnd.rapid": {
+ "source": "iana"
+ },
+ "application/vnd.realvnc.bed": {
+ "source": "iana",
+ "extensions": ["bed"]
+ },
+ "application/vnd.recordare.musicxml": {
+ "source": "iana",
+ "extensions": ["mxl"]
+ },
+ "application/vnd.recordare.musicxml+xml": {
+ "source": "iana",
+ "extensions": ["musicxml"]
+ },
+ "application/vnd.renlearn.rlprint": {
+ "source": "iana"
+ },
+ "application/vnd.rig.cryptonote": {
+ "source": "iana",
+ "extensions": ["cryptonote"]
+ },
+ "application/vnd.rim.cod": {
+ "source": "apache",
+ "extensions": ["cod"]
+ },
+ "application/vnd.rn-realmedia": {
+ "source": "apache",
+ "extensions": ["rm"]
+ },
+ "application/vnd.rn-realmedia-vbr": {
+ "source": "apache",
+ "extensions": ["rmvb"]
+ },
+ "application/vnd.route66.link66+xml": {
+ "source": "iana",
+ "extensions": ["link66"]
+ },
+ "application/vnd.rs-274x": {
+ "source": "iana"
+ },
+ "application/vnd.ruckus.download": {
+ "source": "iana"
+ },
+ "application/vnd.s3sms": {
+ "source": "iana"
+ },
+ "application/vnd.sailingtracker.track": {
+ "source": "iana",
+ "extensions": ["st"]
+ },
+ "application/vnd.sbm.cid": {
+ "source": "iana"
+ },
+ "application/vnd.sbm.mid2": {
+ "source": "iana"
+ },
+ "application/vnd.scribus": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.3df": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.csf": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.doc": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.eml": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.mht": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.net": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.ppt": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.tiff": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.xls": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.html": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.pdf": {
+ "source": "iana"
+ },
+ "application/vnd.seemail": {
+ "source": "iana",
+ "extensions": ["see"]
+ },
+ "application/vnd.sema": {
+ "source": "iana",
+ "extensions": ["sema"]
+ },
+ "application/vnd.semd": {
+ "source": "iana",
+ "extensions": ["semd"]
+ },
+ "application/vnd.semf": {
+ "source": "iana",
+ "extensions": ["semf"]
+ },
+ "application/vnd.shana.informed.formdata": {
+ "source": "iana",
+ "extensions": ["ifm"]
+ },
+ "application/vnd.shana.informed.formtemplate": {
+ "source": "iana",
+ "extensions": ["itp"]
+ },
+ "application/vnd.shana.informed.interchange": {
+ "source": "iana",
+ "extensions": ["iif"]
+ },
+ "application/vnd.shana.informed.package": {
+ "source": "iana",
+ "extensions": ["ipk"]
+ },
+ "application/vnd.simtech-mindmapper": {
+ "source": "iana",
+ "extensions": ["twd","twds"]
+ },
+ "application/vnd.siren+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.smaf": {
+ "source": "iana",
+ "extensions": ["mmf"]
+ },
+ "application/vnd.smart.notebook": {
+ "source": "iana"
+ },
+ "application/vnd.smart.teacher": {
+ "source": "iana",
+ "extensions": ["teacher"]
+ },
+ "application/vnd.software602.filler.form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.software602.filler.form-xml-zip": {
+ "source": "iana"
+ },
+ "application/vnd.solent.sdkm+xml": {
+ "source": "iana",
+ "extensions": ["sdkm","sdkd"]
+ },
+ "application/vnd.spotfire.dxp": {
+ "source": "iana",
+ "extensions": ["dxp"]
+ },
+ "application/vnd.spotfire.sfs": {
+ "source": "iana",
+ "extensions": ["sfs"]
+ },
+ "application/vnd.sss-cod": {
+ "source": "iana"
+ },
+ "application/vnd.sss-dtf": {
+ "source": "iana"
+ },
+ "application/vnd.sss-ntf": {
+ "source": "iana"
+ },
+ "application/vnd.stardivision.calc": {
+ "source": "apache",
+ "extensions": ["sdc"]
+ },
+ "application/vnd.stardivision.draw": {
+ "source": "apache",
+ "extensions": ["sda"]
+ },
+ "application/vnd.stardivision.impress": {
+ "source": "apache",
+ "extensions": ["sdd"]
+ },
+ "application/vnd.stardivision.math": {
+ "source": "apache",
+ "extensions": ["smf"]
+ },
+ "application/vnd.stardivision.writer": {
+ "source": "apache",
+ "extensions": ["sdw","vor"]
+ },
+ "application/vnd.stardivision.writer-global": {
+ "source": "apache",
+ "extensions": ["sgl"]
+ },
+ "application/vnd.stepmania.package": {
+ "source": "iana",
+ "extensions": ["smzip"]
+ },
+ "application/vnd.stepmania.stepchart": {
+ "source": "iana",
+ "extensions": ["sm"]
+ },
+ "application/vnd.street-stream": {
+ "source": "iana"
+ },
+ "application/vnd.sun.wadl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.sun.xml.calc": {
+ "source": "apache",
+ "extensions": ["sxc"]
+ },
+ "application/vnd.sun.xml.calc.template": {
+ "source": "apache",
+ "extensions": ["stc"]
+ },
+ "application/vnd.sun.xml.draw": {
+ "source": "apache",
+ "extensions": ["sxd"]
+ },
+ "application/vnd.sun.xml.draw.template": {
+ "source": "apache",
+ "extensions": ["std"]
+ },
+ "application/vnd.sun.xml.impress": {
+ "source": "apache",
+ "extensions": ["sxi"]
+ },
+ "application/vnd.sun.xml.impress.template": {
+ "source": "apache",
+ "extensions": ["sti"]
+ },
+ "application/vnd.sun.xml.math": {
+ "source": "apache",
+ "extensions": ["sxm"]
+ },
+ "application/vnd.sun.xml.writer": {
+ "source": "apache",
+ "extensions": ["sxw"]
+ },
+ "application/vnd.sun.xml.writer.global": {
+ "source": "apache",
+ "extensions": ["sxg"]
+ },
+ "application/vnd.sun.xml.writer.template": {
+ "source": "apache",
+ "extensions": ["stw"]
+ },
+ "application/vnd.sus-calendar": {
+ "source": "iana",
+ "extensions": ["sus","susp"]
+ },
+ "application/vnd.svd": {
+ "source": "iana",
+ "extensions": ["svd"]
+ },
+ "application/vnd.swiftview-ics": {
+ "source": "iana"
+ },
+ "application/vnd.symbian.install": {
+ "source": "apache",
+ "extensions": ["sis","sisx"]
+ },
+ "application/vnd.syncml+xml": {
+ "source": "iana",
+ "extensions": ["xsm"]
+ },
+ "application/vnd.syncml.dm+wbxml": {
+ "source": "iana",
+ "extensions": ["bdm"]
+ },
+ "application/vnd.syncml.dm+xml": {
+ "source": "iana",
+ "extensions": ["xdm"]
+ },
+ "application/vnd.syncml.dm.notification": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.ds.notification": {
+ "source": "iana"
+ },
+ "application/vnd.tao.intent-module-archive": {
+ "source": "iana",
+ "extensions": ["tao"]
+ },
+ "application/vnd.tcpdump.pcap": {
+ "source": "iana",
+ "extensions": ["pcap","cap","dmp"]
+ },
+ "application/vnd.tmd.mediaflex.api+xml": {
+ "source": "iana"
+ },
+ "application/vnd.tmobile-livetv": {
+ "source": "iana",
+ "extensions": ["tmo"]
+ },
+ "application/vnd.trid.tpt": {
+ "source": "iana",
+ "extensions": ["tpt"]
+ },
+ "application/vnd.triscape.mxs": {
+ "source": "iana",
+ "extensions": ["mxs"]
+ },
+ "application/vnd.trueapp": {
+ "source": "iana",
+ "extensions": ["tra"]
+ },
+ "application/vnd.truedoc": {
+ "source": "iana"
+ },
+ "application/vnd.ubisoft.webplayer": {
+ "source": "iana"
+ },
+ "application/vnd.ufdl": {
+ "source": "iana",
+ "extensions": ["ufd","ufdl"]
+ },
+ "application/vnd.uiq.theme": {
+ "source": "iana",
+ "extensions": ["utz"]
+ },
+ "application/vnd.umajin": {
+ "source": "iana",
+ "extensions": ["umj"]
+ },
+ "application/vnd.unity": {
+ "source": "iana",
+ "extensions": ["unityweb"]
+ },
+ "application/vnd.uoml+xml": {
+ "source": "iana",
+ "extensions": ["uoml"]
+ },
+ "application/vnd.uplanet.alert": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.alert-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.signal": {
+ "source": "iana"
+ },
+ "application/vnd.valve.source.material": {
+ "source": "iana"
+ },
+ "application/vnd.vcx": {
+ "source": "iana",
+ "extensions": ["vcx"]
+ },
+ "application/vnd.vd-study": {
+ "source": "iana"
+ },
+ "application/vnd.vectorworks": {
+ "source": "iana"
+ },
+ "application/vnd.verimatrix.vcas": {
+ "source": "iana"
+ },
+ "application/vnd.vidsoft.vidconference": {
+ "source": "iana"
+ },
+ "application/vnd.visio": {
+ "source": "iana",
+ "extensions": ["vsd","vst","vss","vsw"]
+ },
+ "application/vnd.visionary": {
+ "source": "iana",
+ "extensions": ["vis"]
+ },
+ "application/vnd.vividence.scriptfile": {
+ "source": "iana"
+ },
+ "application/vnd.vsf": {
+ "source": "iana",
+ "extensions": ["vsf"]
+ },
+ "application/vnd.wap.sic": {
+ "source": "iana"
+ },
+ "application/vnd.wap.slc": {
+ "source": "iana"
+ },
+ "application/vnd.wap.wbxml": {
+ "source": "iana",
+ "extensions": ["wbxml"]
+ },
+ "application/vnd.wap.wmlc": {
+ "source": "iana",
+ "extensions": ["wmlc"]
+ },
+ "application/vnd.wap.wmlscriptc": {
+ "source": "iana",
+ "extensions": ["wmlsc"]
+ },
+ "application/vnd.webturbo": {
+ "source": "iana",
+ "extensions": ["wtb"]
+ },
+ "application/vnd.wfa.p2p": {
+ "source": "iana"
+ },
+ "application/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "application/vnd.windows.devicepairing": {
+ "source": "iana"
+ },
+ "application/vnd.wmc": {
+ "source": "iana"
+ },
+ "application/vnd.wmf.bootstrap": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica.package": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.player": {
+ "source": "iana",
+ "extensions": ["nbp"]
+ },
+ "application/vnd.wordperfect": {
+ "source": "iana",
+ "extensions": ["wpd"]
+ },
+ "application/vnd.wqd": {
+ "source": "iana",
+ "extensions": ["wqd"]
+ },
+ "application/vnd.wrq-hp3000-labelled": {
+ "source": "iana"
+ },
+ "application/vnd.wt.stf": {
+ "source": "iana",
+ "extensions": ["stf"]
+ },
+ "application/vnd.wv.csp+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.csp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.ssp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xacml+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.xara": {
+ "source": "iana",
+ "extensions": ["xar"]
+ },
+ "application/vnd.xfdl": {
+ "source": "iana",
+ "extensions": ["xfdl"]
+ },
+ "application/vnd.xfdl.webform": {
+ "source": "iana"
+ },
+ "application/vnd.xmi+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.cpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.dpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.plan": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.ppkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.xlim": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.hv-dic": {
+ "source": "iana",
+ "extensions": ["hvd"]
+ },
+ "application/vnd.yamaha.hv-script": {
+ "source": "iana",
+ "extensions": ["hvs"]
+ },
+ "application/vnd.yamaha.hv-voice": {
+ "source": "iana",
+ "extensions": ["hvp"]
+ },
+ "application/vnd.yamaha.openscoreformat": {
+ "source": "iana",
+ "extensions": ["osf"]
+ },
+ "application/vnd.yamaha.openscoreformat.osfpvg+xml": {
+ "source": "iana",
+ "extensions": ["osfpvg"]
+ },
+ "application/vnd.yamaha.remote-setup": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.smaf-audio": {
+ "source": "iana",
+ "extensions": ["saf"]
+ },
+ "application/vnd.yamaha.smaf-phrase": {
+ "source": "iana",
+ "extensions": ["spf"]
+ },
+ "application/vnd.yamaha.through-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.tunnel-udpencap": {
+ "source": "iana"
+ },
+ "application/vnd.yaoweme": {
+ "source": "iana"
+ },
+ "application/vnd.yellowriver-custom-menu": {
+ "source": "iana",
+ "extensions": ["cmp"]
+ },
+ "application/vnd.zul": {
+ "source": "iana",
+ "extensions": ["zir","zirz"]
+ },
+ "application/vnd.zzazz.deck+xml": {
+ "source": "iana",
+ "extensions": ["zaz"]
+ },
+ "application/voicexml+xml": {
+ "source": "iana",
+ "extensions": ["vxml"]
+ },
+ "application/vq-rtcpxr": {
+ "source": "iana"
+ },
+ "application/watcherinfo+xml": {
+ "source": "iana"
+ },
+ "application/whoispp-query": {
+ "source": "iana"
+ },
+ "application/whoispp-response": {
+ "source": "iana"
+ },
+ "application/widget": {
+ "source": "iana",
+ "extensions": ["wgt"]
+ },
+ "application/winhlp": {
+ "source": "apache",
+ "extensions": ["hlp"]
+ },
+ "application/wita": {
+ "source": "iana"
+ },
+ "application/wordperfect5.1": {
+ "source": "iana"
+ },
+ "application/wsdl+xml": {
+ "source": "iana",
+ "extensions": ["wsdl"]
+ },
+ "application/wspolicy+xml": {
+ "source": "iana",
+ "extensions": ["wspolicy"]
+ },
+ "application/x-7z-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["7z"]
+ },
+ "application/x-abiword": {
+ "source": "apache",
+ "extensions": ["abw"]
+ },
+ "application/x-ace-compressed": {
+ "source": "apache",
+ "extensions": ["ace"]
+ },
+ "application/x-amf": {
+ "source": "apache"
+ },
+ "application/x-apple-diskimage": {
+ "source": "apache",
+ "extensions": ["dmg"]
+ },
+ "application/x-authorware-bin": {
+ "source": "apache",
+ "extensions": ["aab","x32","u32","vox"]
+ },
+ "application/x-authorware-map": {
+ "source": "apache",
+ "extensions": ["aam"]
+ },
+ "application/x-authorware-seg": {
+ "source": "apache",
+ "extensions": ["aas"]
+ },
+ "application/x-bcpio": {
+ "source": "apache",
+ "extensions": ["bcpio"]
+ },
+ "application/x-bittorrent": {
+ "source": "apache",
+ "extensions": ["torrent"]
+ },
+ "application/x-blorb": {
+ "source": "apache",
+ "extensions": ["blb","blorb"]
+ },
+ "application/x-bzip": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz"]
+ },
+ "application/x-bzip2": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz2","boz"]
+ },
+ "application/x-cbr": {
+ "source": "apache",
+ "extensions": ["cbr","cba","cbt","cbz","cb7"]
+ },
+ "application/x-cdlink": {
+ "source": "apache",
+ "extensions": ["vcd"]
+ },
+ "application/x-cfs-compressed": {
+ "source": "apache",
+ "extensions": ["cfs"]
+ },
+ "application/x-chat": {
+ "source": "apache",
+ "extensions": ["chat"]
+ },
+ "application/x-chess-pgn": {
+ "source": "apache",
+ "extensions": ["pgn"]
+ },
+ "application/x-chrome-extension": {
+ "extensions": ["crx"]
+ },
+ "application/x-compress": {
+ "source": "apache"
+ },
+ "application/x-conference": {
+ "source": "apache",
+ "extensions": ["nsc"]
+ },
+ "application/x-cpio": {
+ "source": "apache",
+ "extensions": ["cpio"]
+ },
+ "application/x-csh": {
+ "source": "apache",
+ "extensions": ["csh"]
+ },
+ "application/x-deb": {
+ "compressible": false
+ },
+ "application/x-debian-package": {
+ "source": "apache",
+ "extensions": ["deb","udeb"]
+ },
+ "application/x-dgc-compressed": {
+ "source": "apache",
+ "extensions": ["dgc"]
+ },
+ "application/x-director": {
+ "source": "apache",
+ "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]
+ },
+ "application/x-doom": {
+ "source": "apache",
+ "extensions": ["wad"]
+ },
+ "application/x-dtbncx+xml": {
+ "source": "apache",
+ "extensions": ["ncx"]
+ },
+ "application/x-dtbook+xml": {
+ "source": "apache",
+ "extensions": ["dtb"]
+ },
+ "application/x-dtbresource+xml": {
+ "source": "apache",
+ "extensions": ["res"]
+ },
+ "application/x-dvi": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["dvi"]
+ },
+ "application/x-envoy": {
+ "source": "apache",
+ "extensions": ["evy"]
+ },
+ "application/x-eva": {
+ "source": "apache",
+ "extensions": ["eva"]
+ },
+ "application/x-font-bdf": {
+ "source": "apache",
+ "extensions": ["bdf"]
+ },
+ "application/x-font-dos": {
+ "source": "apache"
+ },
+ "application/x-font-framemaker": {
+ "source": "apache"
+ },
+ "application/x-font-ghostscript": {
+ "source": "apache",
+ "extensions": ["gsf"]
+ },
+ "application/x-font-libgrx": {
+ "source": "apache"
+ },
+ "application/x-font-linux-psf": {
+ "source": "apache",
+ "extensions": ["psf"]
+ },
+ "application/x-font-otf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "application/x-font-pcf": {
+ "source": "apache",
+ "extensions": ["pcf"]
+ },
+ "application/x-font-snf": {
+ "source": "apache",
+ "extensions": ["snf"]
+ },
+ "application/x-font-speedo": {
+ "source": "apache"
+ },
+ "application/x-font-sunos-news": {
+ "source": "apache"
+ },
+ "application/x-font-ttf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ttf","ttc"]
+ },
+ "application/x-font-type1": {
+ "source": "apache",
+ "extensions": ["pfa","pfb","pfm","afm"]
+ },
+ "application/x-font-vfont": {
+ "source": "apache"
+ },
+ "application/x-freearc": {
+ "source": "apache",
+ "extensions": ["arc"]
+ },
+ "application/x-futuresplash": {
+ "source": "apache",
+ "extensions": ["spl"]
+ },
+ "application/x-gca-compressed": {
+ "source": "apache",
+ "extensions": ["gca"]
+ },
+ "application/x-glulx": {
+ "source": "apache",
+ "extensions": ["ulx"]
+ },
+ "application/x-gnumeric": {
+ "source": "apache",
+ "extensions": ["gnumeric"]
+ },
+ "application/x-gramps-xml": {
+ "source": "apache",
+ "extensions": ["gramps"]
+ },
+ "application/x-gtar": {
+ "source": "apache",
+ "extensions": ["gtar"]
+ },
+ "application/x-gzip": {
+ "source": "apache"
+ },
+ "application/x-hdf": {
+ "source": "apache",
+ "extensions": ["hdf"]
+ },
+ "application/x-install-instructions": {
+ "source": "apache",
+ "extensions": ["install"]
+ },
+ "application/x-iso9660-image": {
+ "source": "apache",
+ "extensions": ["iso"]
+ },
+ "application/x-java-jnlp-file": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jnlp"]
+ },
+ "application/x-javascript": {
+ "compressible": true
+ },
+ "application/x-latex": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["latex"]
+ },
+ "application/x-lua-bytecode": {
+ "extensions": ["luac"]
+ },
+ "application/x-lzh-compressed": {
+ "source": "apache",
+ "extensions": ["lzh","lha"]
+ },
+ "application/x-mie": {
+ "source": "apache",
+ "extensions": ["mie"]
+ },
+ "application/x-mobipocket-ebook": {
+ "source": "apache",
+ "extensions": ["prc","mobi"]
+ },
+ "application/x-mpegurl": {
+ "compressible": false
+ },
+ "application/x-ms-application": {
+ "source": "apache",
+ "extensions": ["application"]
+ },
+ "application/x-ms-shortcut": {
+ "source": "apache",
+ "extensions": ["lnk"]
+ },
+ "application/x-ms-wmd": {
+ "source": "apache",
+ "extensions": ["wmd"]
+ },
+ "application/x-ms-wmz": {
+ "source": "apache",
+ "extensions": ["wmz"]
+ },
+ "application/x-ms-xbap": {
+ "source": "apache",
+ "extensions": ["xbap"]
+ },
+ "application/x-msaccess": {
+ "source": "apache",
+ "extensions": ["mdb"]
+ },
+ "application/x-msbinder": {
+ "source": "apache",
+ "extensions": ["obd"]
+ },
+ "application/x-mscardfile": {
+ "source": "apache",
+ "extensions": ["crd"]
+ },
+ "application/x-msclip": {
+ "source": "apache",
+ "extensions": ["clp"]
+ },
+ "application/x-msdownload": {
+ "source": "apache",
+ "extensions": ["exe","dll","com","bat","msi"]
+ },
+ "application/x-msmediaview": {
+ "source": "apache",
+ "extensions": ["mvb","m13","m14"]
+ },
+ "application/x-msmetafile": {
+ "source": "apache",
+ "extensions": ["wmf","wmz","emf","emz"]
+ },
+ "application/x-msmoney": {
+ "source": "apache",
+ "extensions": ["mny"]
+ },
+ "application/x-mspublisher": {
+ "source": "apache",
+ "extensions": ["pub"]
+ },
+ "application/x-msschedule": {
+ "source": "apache",
+ "extensions": ["scd"]
+ },
+ "application/x-msterminal": {
+ "source": "apache",
+ "extensions": ["trm"]
+ },
+ "application/x-mswrite": {
+ "source": "apache",
+ "extensions": ["wri"]
+ },
+ "application/x-netcdf": {
+ "source": "apache",
+ "extensions": ["nc","cdf"]
+ },
+ "application/x-nzb": {
+ "source": "apache",
+ "extensions": ["nzb"]
+ },
+ "application/x-pkcs12": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["p12","pfx"]
+ },
+ "application/x-pkcs7-certificates": {
+ "source": "apache",
+ "extensions": ["p7b","spc"]
+ },
+ "application/x-pkcs7-certreqresp": {
+ "source": "apache",
+ "extensions": ["p7r"]
+ },
+ "application/x-rar-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["rar"]
+ },
+ "application/x-research-info-systems": {
+ "source": "apache",
+ "extensions": ["ris"]
+ },
+ "application/x-sh": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["sh"]
+ },
+ "application/x-shar": {
+ "source": "apache",
+ "extensions": ["shar"]
+ },
+ "application/x-shockwave-flash": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["swf"]
+ },
+ "application/x-silverlight-app": {
+ "source": "apache",
+ "extensions": ["xap"]
+ },
+ "application/x-sql": {
+ "source": "apache",
+ "extensions": ["sql"]
+ },
+ "application/x-stuffit": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["sit"]
+ },
+ "application/x-stuffitx": {
+ "source": "apache",
+ "extensions": ["sitx"]
+ },
+ "application/x-subrip": {
+ "source": "apache",
+ "extensions": ["srt"]
+ },
+ "application/x-sv4cpio": {
+ "source": "apache",
+ "extensions": ["sv4cpio"]
+ },
+ "application/x-sv4crc": {
+ "source": "apache",
+ "extensions": ["sv4crc"]
+ },
+ "application/x-t3vm-image": {
+ "source": "apache",
+ "extensions": ["t3"]
+ },
+ "application/x-tads": {
+ "source": "apache",
+ "extensions": ["gam"]
+ },
+ "application/x-tar": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["tar"]
+ },
+ "application/x-tcl": {
+ "source": "apache",
+ "extensions": ["tcl"]
+ },
+ "application/x-tex": {
+ "source": "apache",
+ "extensions": ["tex"]
+ },
+ "application/x-tex-tfm": {
+ "source": "apache",
+ "extensions": ["tfm"]
+ },
+ "application/x-texinfo": {
+ "source": "apache",
+ "extensions": ["texinfo","texi"]
+ },
+ "application/x-tgif": {
+ "source": "apache",
+ "extensions": ["obj"]
+ },
+ "application/x-ustar": {
+ "source": "apache",
+ "extensions": ["ustar"]
+ },
+ "application/x-wais-source": {
+ "source": "apache",
+ "extensions": ["src"]
+ },
+ "application/x-web-app-manifest+json": {
+ "compressible": true,
+ "extensions": ["webapp"]
+ },
+ "application/x-www-form-urlencoded": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/x-x509-ca-cert": {
+ "source": "apache",
+ "extensions": ["der","crt"]
+ },
+ "application/x-xfig": {
+ "source": "apache",
+ "extensions": ["fig"]
+ },
+ "application/x-xliff+xml": {
+ "source": "apache",
+ "extensions": ["xlf"]
+ },
+ "application/x-xpinstall": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["xpi"]
+ },
+ "application/x-xz": {
+ "source": "apache",
+ "extensions": ["xz"]
+ },
+ "application/x-zmachine": {
+ "source": "apache",
+ "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"]
+ },
+ "application/x400-bp": {
+ "source": "iana"
+ },
+ "application/xacml+xml": {
+ "source": "iana"
+ },
+ "application/xaml+xml": {
+ "source": "apache",
+ "extensions": ["xaml"]
+ },
+ "application/xcap-att+xml": {
+ "source": "iana"
+ },
+ "application/xcap-caps+xml": {
+ "source": "iana"
+ },
+ "application/xcap-diff+xml": {
+ "source": "iana",
+ "extensions": ["xdf"]
+ },
+ "application/xcap-el+xml": {
+ "source": "iana"
+ },
+ "application/xcap-error+xml": {
+ "source": "iana"
+ },
+ "application/xcap-ns+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info-diff+xml": {
+ "source": "iana"
+ },
+ "application/xenc+xml": {
+ "source": "iana",
+ "extensions": ["xenc"]
+ },
+ "application/xhtml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xhtml","xht"]
+ },
+ "application/xhtml-voice+xml": {
+ "source": "iana"
+ },
+ "application/xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xml","xsl","xsd"]
+ },
+ "application/xml-dtd": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dtd"]
+ },
+ "application/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "application/xml-patch+xml": {
+ "source": "iana"
+ },
+ "application/xmpp+xml": {
+ "source": "iana"
+ },
+ "application/xop+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xop"]
+ },
+ "application/xproc+xml": {
+ "source": "apache",
+ "extensions": ["xpl"]
+ },
+ "application/xslt+xml": {
+ "source": "iana",
+ "extensions": ["xslt"]
+ },
+ "application/xspf+xml": {
+ "source": "apache",
+ "extensions": ["xspf"]
+ },
+ "application/xv+xml": {
+ "source": "iana",
+ "extensions": ["mxml","xhvml","xvml","xvm"]
+ },
+ "application/yang": {
+ "source": "iana",
+ "extensions": ["yang"]
+ },
+ "application/yin+xml": {
+ "source": "iana",
+ "extensions": ["yin"]
+ },
+ "application/zip": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["zip"]
+ },
+ "application/zlib": {
+ "source": "iana"
+ },
+ "audio/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "audio/32kadpcm": {
+ "source": "iana"
+ },
+ "audio/3gpp": {
+ "source": "iana"
+ },
+ "audio/3gpp2": {
+ "source": "iana"
+ },
+ "audio/ac3": {
+ "source": "iana"
+ },
+ "audio/adpcm": {
+ "source": "apache",
+ "extensions": ["adp"]
+ },
+ "audio/amr": {
+ "source": "iana"
+ },
+ "audio/amr-wb": {
+ "source": "iana"
+ },
+ "audio/amr-wb+": {
+ "source": "iana"
+ },
+ "audio/aptx": {
+ "source": "iana"
+ },
+ "audio/asc": {
+ "source": "iana"
+ },
+ "audio/atrac-advanced-lossless": {
+ "source": "iana"
+ },
+ "audio/atrac-x": {
+ "source": "iana"
+ },
+ "audio/atrac3": {
+ "source": "iana"
+ },
+ "audio/basic": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["au","snd"]
+ },
+ "audio/bv16": {
+ "source": "iana"
+ },
+ "audio/bv32": {
+ "source": "iana"
+ },
+ "audio/clearmode": {
+ "source": "iana"
+ },
+ "audio/cn": {
+ "source": "iana"
+ },
+ "audio/dat12": {
+ "source": "iana"
+ },
+ "audio/dls": {
+ "source": "iana"
+ },
+ "audio/dsr-es201108": {
+ "source": "iana"
+ },
+ "audio/dsr-es202050": {
+ "source": "iana"
+ },
+ "audio/dsr-es202211": {
+ "source": "iana"
+ },
+ "audio/dsr-es202212": {
+ "source": "iana"
+ },
+ "audio/dv": {
+ "source": "iana"
+ },
+ "audio/dvi4": {
+ "source": "iana"
+ },
+ "audio/eac3": {
+ "source": "iana"
+ },
+ "audio/encaprtp": {
+ "source": "iana"
+ },
+ "audio/evrc": {
+ "source": "iana"
+ },
+ "audio/evrc-qcp": {
+ "source": "iana"
+ },
+ "audio/evrc0": {
+ "source": "iana"
+ },
+ "audio/evrc1": {
+ "source": "iana"
+ },
+ "audio/evrcb": {
+ "source": "iana"
+ },
+ "audio/evrcb0": {
+ "source": "iana"
+ },
+ "audio/evrcb1": {
+ "source": "iana"
+ },
+ "audio/evrcnw": {
+ "source": "iana"
+ },
+ "audio/evrcnw0": {
+ "source": "iana"
+ },
+ "audio/evrcnw1": {
+ "source": "iana"
+ },
+ "audio/evrcwb": {
+ "source": "iana"
+ },
+ "audio/evrcwb0": {
+ "source": "iana"
+ },
+ "audio/evrcwb1": {
+ "source": "iana"
+ },
+ "audio/fwdred": {
+ "source": "iana"
+ },
+ "audio/g719": {
+ "source": "iana"
+ },
+ "audio/g722": {
+ "source": "iana"
+ },
+ "audio/g7221": {
+ "source": "iana"
+ },
+ "audio/g723": {
+ "source": "iana"
+ },
+ "audio/g726-16": {
+ "source": "iana"
+ },
+ "audio/g726-24": {
+ "source": "iana"
+ },
+ "audio/g726-32": {
+ "source": "iana"
+ },
+ "audio/g726-40": {
+ "source": "iana"
+ },
+ "audio/g728": {
+ "source": "iana"
+ },
+ "audio/g729": {
+ "source": "iana"
+ },
+ "audio/g7291": {
+ "source": "iana"
+ },
+ "audio/g729d": {
+ "source": "iana"
+ },
+ "audio/g729e": {
+ "source": "iana"
+ },
+ "audio/gsm": {
+ "source": "iana"
+ },
+ "audio/gsm-efr": {
+ "source": "iana"
+ },
+ "audio/gsm-hr-08": {
+ "source": "iana"
+ },
+ "audio/ilbc": {
+ "source": "iana"
+ },
+ "audio/ip-mr_v2.5": {
+ "source": "iana"
+ },
+ "audio/isac": {
+ "source": "apache"
+ },
+ "audio/l16": {
+ "source": "iana"
+ },
+ "audio/l20": {
+ "source": "iana"
+ },
+ "audio/l24": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/l8": {
+ "source": "iana"
+ },
+ "audio/lpc": {
+ "source": "iana"
+ },
+ "audio/midi": {
+ "source": "apache",
+ "extensions": ["mid","midi","kar","rmi"]
+ },
+ "audio/mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/mp4": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mp4a","m4a"]
+ },
+ "audio/mp4a-latm": {
+ "source": "iana"
+ },
+ "audio/mpa": {
+ "source": "iana"
+ },
+ "audio/mpa-robust": {
+ "source": "iana"
+ },
+ "audio/mpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"]
+ },
+ "audio/mpeg4-generic": {
+ "source": "iana"
+ },
+ "audio/musepack": {
+ "source": "apache"
+ },
+ "audio/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["oga","ogg","spx"]
+ },
+ "audio/opus": {
+ "source": "apache"
+ },
+ "audio/parityfec": {
+ "source": "iana"
+ },
+ "audio/pcma": {
+ "source": "iana"
+ },
+ "audio/pcma-wb": {
+ "source": "iana"
+ },
+ "audio/pcmu": {
+ "source": "iana"
+ },
+ "audio/pcmu-wb": {
+ "source": "iana"
+ },
+ "audio/prs.sid": {
+ "source": "iana"
+ },
+ "audio/qcelp": {
+ "source": "iana"
+ },
+ "audio/raptorfec": {
+ "source": "iana"
+ },
+ "audio/red": {
+ "source": "iana"
+ },
+ "audio/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "audio/rtp-midi": {
+ "source": "iana"
+ },
+ "audio/rtploopback": {
+ "source": "iana"
+ },
+ "audio/rtx": {
+ "source": "iana"
+ },
+ "audio/s3m": {
+ "source": "apache",
+ "extensions": ["s3m"]
+ },
+ "audio/silk": {
+ "source": "apache",
+ "extensions": ["sil"]
+ },
+ "audio/smv": {
+ "source": "iana"
+ },
+ "audio/smv-qcp": {
+ "source": "iana"
+ },
+ "audio/smv0": {
+ "source": "iana"
+ },
+ "audio/sp-midi": {
+ "source": "iana"
+ },
+ "audio/speex": {
+ "source": "iana"
+ },
+ "audio/t140c": {
+ "source": "iana"
+ },
+ "audio/t38": {
+ "source": "iana"
+ },
+ "audio/telephone-event": {
+ "source": "iana"
+ },
+ "audio/tone": {
+ "source": "iana"
+ },
+ "audio/uemclip": {
+ "source": "iana"
+ },
+ "audio/ulpfec": {
+ "source": "iana"
+ },
+ "audio/vdvi": {
+ "source": "iana"
+ },
+ "audio/vmr-wb": {
+ "source": "iana"
+ },
+ "audio/vnd.3gpp.iufp": {
+ "source": "iana"
+ },
+ "audio/vnd.4sb": {
+ "source": "iana"
+ },
+ "audio/vnd.audiokoz": {
+ "source": "iana"
+ },
+ "audio/vnd.celp": {
+ "source": "iana"
+ },
+ "audio/vnd.cisco.nse": {
+ "source": "iana"
+ },
+ "audio/vnd.cmles.radio-events": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.anp1": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.inf1": {
+ "source": "iana"
+ },
+ "audio/vnd.dece.audio": {
+ "source": "iana",
+ "extensions": ["uva","uvva"]
+ },
+ "audio/vnd.digital-winds": {
+ "source": "iana",
+ "extensions": ["eol"]
+ },
+ "audio/vnd.dlna.adts": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mlp": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mps": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2x": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2z": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pulse.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dra": {
+ "source": "iana",
+ "extensions": ["dra"]
+ },
+ "audio/vnd.dts": {
+ "source": "iana",
+ "extensions": ["dts"]
+ },
+ "audio/vnd.dts.hd": {
+ "source": "iana",
+ "extensions": ["dtshd"]
+ },
+ "audio/vnd.dvb.file": {
+ "source": "iana"
+ },
+ "audio/vnd.everad.plj": {
+ "source": "iana"
+ },
+ "audio/vnd.hns.audio": {
+ "source": "iana"
+ },
+ "audio/vnd.lucent.voice": {
+ "source": "iana",
+ "extensions": ["lvp"]
+ },
+ "audio/vnd.ms-playready.media.pya": {
+ "source": "iana",
+ "extensions": ["pya"]
+ },
+ "audio/vnd.nokia.mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/vnd.nortel.vbk": {
+ "source": "iana"
+ },
+ "audio/vnd.nuera.ecelp4800": {
+ "source": "iana",
+ "extensions": ["ecelp4800"]
+ },
+ "audio/vnd.nuera.ecelp7470": {
+ "source": "iana",
+ "extensions": ["ecelp7470"]
+ },
+ "audio/vnd.nuera.ecelp9600": {
+ "source": "iana",
+ "extensions": ["ecelp9600"]
+ },
+ "audio/vnd.octel.sbc": {
+ "source": "iana"
+ },
+ "audio/vnd.qcelp": {
+ "source": "iana"
+ },
+ "audio/vnd.rhetorex.32kadpcm": {
+ "source": "iana"
+ },
+ "audio/vnd.rip": {
+ "source": "iana",
+ "extensions": ["rip"]
+ },
+ "audio/vnd.rn-realaudio": {
+ "compressible": false
+ },
+ "audio/vnd.sealedmedia.softseal.mpeg": {
+ "source": "iana"
+ },
+ "audio/vnd.vmx.cvsd": {
+ "source": "iana"
+ },
+ "audio/vnd.wave": {
+ "compressible": false
+ },
+ "audio/vorbis": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/vorbis-config": {
+ "source": "iana"
+ },
+ "audio/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["weba"]
+ },
+ "audio/x-aac": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["aac"]
+ },
+ "audio/x-aiff": {
+ "source": "apache",
+ "extensions": ["aif","aiff","aifc"]
+ },
+ "audio/x-caf": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["caf"]
+ },
+ "audio/x-flac": {
+ "source": "apache",
+ "extensions": ["flac"]
+ },
+ "audio/x-matroska": {
+ "source": "apache",
+ "extensions": ["mka"]
+ },
+ "audio/x-mpegurl": {
+ "source": "apache",
+ "extensions": ["m3u"]
+ },
+ "audio/x-ms-wax": {
+ "source": "apache",
+ "extensions": ["wax"]
+ },
+ "audio/x-ms-wma": {
+ "source": "apache",
+ "extensions": ["wma"]
+ },
+ "audio/x-pn-realaudio": {
+ "source": "apache",
+ "extensions": ["ram","ra"]
+ },
+ "audio/x-pn-realaudio-plugin": {
+ "source": "apache",
+ "extensions": ["rmp"]
+ },
+ "audio/x-tta": {
+ "source": "apache"
+ },
+ "audio/x-wav": {
+ "source": "apache",
+ "extensions": ["wav"]
+ },
+ "audio/xm": {
+ "source": "apache",
+ "extensions": ["xm"]
+ },
+ "chemical/x-cdx": {
+ "source": "apache",
+ "extensions": ["cdx"]
+ },
+ "chemical/x-cif": {
+ "source": "apache",
+ "extensions": ["cif"]
+ },
+ "chemical/x-cmdf": {
+ "source": "apache",
+ "extensions": ["cmdf"]
+ },
+ "chemical/x-cml": {
+ "source": "apache",
+ "extensions": ["cml"]
+ },
+ "chemical/x-csml": {
+ "source": "apache",
+ "extensions": ["csml"]
+ },
+ "chemical/x-pdb": {
+ "source": "apache"
+ },
+ "chemical/x-xyz": {
+ "source": "apache",
+ "extensions": ["xyz"]
+ },
+ "font/opentype": {
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "image/bmp": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["bmp"]
+ },
+ "image/cgm": {
+ "source": "iana",
+ "extensions": ["cgm"]
+ },
+ "image/fits": {
+ "source": "iana"
+ },
+ "image/g3fax": {
+ "source": "iana",
+ "extensions": ["g3"]
+ },
+ "image/gif": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["gif"]
+ },
+ "image/ief": {
+ "source": "iana",
+ "extensions": ["ief"]
+ },
+ "image/jp2": {
+ "source": "iana"
+ },
+ "image/jpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["jpeg","jpg","jpe"]
+ },
+ "image/jpm": {
+ "source": "iana"
+ },
+ "image/jpx": {
+ "source": "iana"
+ },
+ "image/ktx": {
+ "source": "iana",
+ "extensions": ["ktx"]
+ },
+ "image/naplps": {
+ "source": "iana"
+ },
+ "image/pjpeg": {
+ "compressible": false
+ },
+ "image/png": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["png"]
+ },
+ "image/prs.btif": {
+ "source": "iana",
+ "extensions": ["btif"]
+ },
+ "image/prs.pti": {
+ "source": "iana"
+ },
+ "image/pwg-raster": {
+ "source": "iana"
+ },
+ "image/sgi": {
+ "source": "apache",
+ "extensions": ["sgi"]
+ },
+ "image/svg+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["svg","svgz"]
+ },
+ "image/t38": {
+ "source": "iana"
+ },
+ "image/tiff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["tiff","tif"]
+ },
+ "image/tiff-fx": {
+ "source": "iana"
+ },
+ "image/vnd.adobe.photoshop": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["psd"]
+ },
+ "image/vnd.airzip.accelerator.azv": {
+ "source": "iana"
+ },
+ "image/vnd.cns.inf2": {
+ "source": "iana"
+ },
+ "image/vnd.dece.graphic": {
+ "source": "iana",
+ "extensions": ["uvi","uvvi","uvg","uvvg"]
+ },
+ "image/vnd.djvu": {
+ "source": "iana",
+ "extensions": ["djvu","djv"]
+ },
+ "image/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "image/vnd.dwg": {
+ "source": "iana",
+ "extensions": ["dwg"]
+ },
+ "image/vnd.dxf": {
+ "source": "iana",
+ "extensions": ["dxf"]
+ },
+ "image/vnd.fastbidsheet": {
+ "source": "iana",
+ "extensions": ["fbs"]
+ },
+ "image/vnd.fpx": {
+ "source": "iana",
+ "extensions": ["fpx"]
+ },
+ "image/vnd.fst": {
+ "source": "iana",
+ "extensions": ["fst"]
+ },
+ "image/vnd.fujixerox.edmics-mmr": {
+ "source": "iana",
+ "extensions": ["mmr"]
+ },
+ "image/vnd.fujixerox.edmics-rlc": {
+ "source": "iana",
+ "extensions": ["rlc"]
+ },
+ "image/vnd.globalgraphics.pgb": {
+ "source": "iana"
+ },
+ "image/vnd.microsoft.icon": {
+ "source": "iana"
+ },
+ "image/vnd.mix": {
+ "source": "iana"
+ },
+ "image/vnd.ms-modi": {
+ "source": "iana",
+ "extensions": ["mdi"]
+ },
+ "image/vnd.ms-photo": {
+ "source": "apache",
+ "extensions": ["wdp"]
+ },
+ "image/vnd.net-fpx": {
+ "source": "iana",
+ "extensions": ["npx"]
+ },
+ "image/vnd.radiance": {
+ "source": "iana"
+ },
+ "image/vnd.sealed.png": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.gif": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.jpg": {
+ "source": "iana"
+ },
+ "image/vnd.svf": {
+ "source": "iana"
+ },
+ "image/vnd.tencent.tap": {
+ "source": "iana"
+ },
+ "image/vnd.valve.source.texture": {
+ "source": "iana"
+ },
+ "image/vnd.wap.wbmp": {
+ "source": "iana",
+ "extensions": ["wbmp"]
+ },
+ "image/vnd.xiff": {
+ "source": "iana",
+ "extensions": ["xif"]
+ },
+ "image/webp": {
+ "source": "apache",
+ "extensions": ["webp"]
+ },
+ "image/x-3ds": {
+ "source": "apache",
+ "extensions": ["3ds"]
+ },
+ "image/x-cmu-raster": {
+ "source": "apache",
+ "extensions": ["ras"]
+ },
+ "image/x-cmx": {
+ "source": "apache",
+ "extensions": ["cmx"]
+ },
+ "image/x-freehand": {
+ "source": "apache",
+ "extensions": ["fh","fhc","fh4","fh5","fh7"]
+ },
+ "image/x-icon": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ico"]
+ },
+ "image/x-mrsid-image": {
+ "source": "apache",
+ "extensions": ["sid"]
+ },
+ "image/x-pcx": {
+ "source": "apache",
+ "extensions": ["pcx"]
+ },
+ "image/x-pict": {
+ "source": "apache",
+ "extensions": ["pic","pct"]
+ },
+ "image/x-portable-anymap": {
+ "source": "apache",
+ "extensions": ["pnm"]
+ },
+ "image/x-portable-bitmap": {
+ "source": "apache",
+ "extensions": ["pbm"]
+ },
+ "image/x-portable-graymap": {
+ "source": "apache",
+ "extensions": ["pgm"]
+ },
+ "image/x-portable-pixmap": {
+ "source": "apache",
+ "extensions": ["ppm"]
+ },
+ "image/x-rgb": {
+ "source": "apache",
+ "extensions": ["rgb"]
+ },
+ "image/x-tga": {
+ "source": "apache",
+ "extensions": ["tga"]
+ },
+ "image/x-xbitmap": {
+ "source": "apache",
+ "extensions": ["xbm"]
+ },
+ "image/x-xcf": {
+ "compressible": false
+ },
+ "image/x-xpixmap": {
+ "source": "apache",
+ "extensions": ["xpm"]
+ },
+ "image/x-xwindowdump": {
+ "source": "apache",
+ "extensions": ["xwd"]
+ },
+ "message/cpim": {
+ "source": "iana"
+ },
+ "message/delivery-status": {
+ "source": "iana"
+ },
+ "message/disposition-notification": {
+ "source": "iana"
+ },
+ "message/external-body": {
+ "source": "iana"
+ },
+ "message/feedback-report": {
+ "source": "iana"
+ },
+ "message/global": {
+ "source": "iana"
+ },
+ "message/global-delivery-status": {
+ "source": "iana"
+ },
+ "message/global-disposition-notification": {
+ "source": "iana"
+ },
+ "message/global-headers": {
+ "source": "iana"
+ },
+ "message/http": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/imdn+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "message/news": {
+ "source": "iana"
+ },
+ "message/partial": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/rfc822": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eml","mime"]
+ },
+ "message/s-http": {
+ "source": "iana"
+ },
+ "message/sip": {
+ "source": "iana"
+ },
+ "message/sipfrag": {
+ "source": "iana"
+ },
+ "message/tracking-status": {
+ "source": "iana"
+ },
+ "message/vnd.si.simp": {
+ "source": "iana"
+ },
+ "message/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "model/iges": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["igs","iges"]
+ },
+ "model/mesh": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["msh","mesh","silo"]
+ },
+ "model/vnd.collada+xml": {
+ "source": "iana",
+ "extensions": ["dae"]
+ },
+ "model/vnd.dwf": {
+ "source": "iana",
+ "extensions": ["dwf"]
+ },
+ "model/vnd.flatland.3dml": {
+ "source": "iana"
+ },
+ "model/vnd.gdl": {
+ "source": "iana",
+ "extensions": ["gdl"]
+ },
+ "model/vnd.gs-gdl": {
+ "source": "apache"
+ },
+ "model/vnd.gs.gdl": {
+ "source": "iana"
+ },
+ "model/vnd.gtw": {
+ "source": "iana",
+ "extensions": ["gtw"]
+ },
+ "model/vnd.moml+xml": {
+ "source": "iana"
+ },
+ "model/vnd.mts": {
+ "source": "iana",
+ "extensions": ["mts"]
+ },
+ "model/vnd.opengex": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.binary": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.text": {
+ "source": "iana"
+ },
+ "model/vnd.valve.source.compiled-map": {
+ "source": "iana"
+ },
+ "model/vnd.vtu": {
+ "source": "iana",
+ "extensions": ["vtu"]
+ },
+ "model/vrml": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["wrl","vrml"]
+ },
+ "model/x3d+binary": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3db","x3dbz"]
+ },
+ "model/x3d+fastinfoset": {
+ "source": "iana"
+ },
+ "model/x3d+vrml": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3dv","x3dvz"]
+ },
+ "model/x3d+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["x3d","x3dz"]
+ },
+ "model/x3d-vrml": {
+ "source": "iana"
+ },
+ "multipart/alternative": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/appledouble": {
+ "source": "iana"
+ },
+ "multipart/byteranges": {
+ "source": "iana"
+ },
+ "multipart/digest": {
+ "source": "iana"
+ },
+ "multipart/encrypted": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/form-data": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/header-set": {
+ "source": "iana"
+ },
+ "multipart/mixed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/parallel": {
+ "source": "iana"
+ },
+ "multipart/related": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/report": {
+ "source": "iana"
+ },
+ "multipart/signed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/voice-message": {
+ "source": "iana"
+ },
+ "multipart/x-mixed-replace": {
+ "source": "iana"
+ },
+ "text/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "text/cache-manifest": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["appcache","manifest"]
+ },
+ "text/calendar": {
+ "source": "iana",
+ "extensions": ["ics","ifb"]
+ },
+ "text/calender": {
+ "compressible": true
+ },
+ "text/cmd": {
+ "compressible": true
+ },
+ "text/coffeescript": {
+ "extensions": ["coffee"]
+ },
+ "text/css": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["css"]
+ },
+ "text/csv": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["csv"]
+ },
+ "text/csv-schema": {
+ "source": "iana"
+ },
+ "text/directory": {
+ "source": "iana"
+ },
+ "text/dns": {
+ "source": "iana"
+ },
+ "text/ecmascript": {
+ "source": "iana"
+ },
+ "text/encaprtp": {
+ "source": "iana"
+ },
+ "text/enriched": {
+ "source": "iana"
+ },
+ "text/fwdred": {
+ "source": "iana"
+ },
+ "text/grammar-ref-list": {
+ "source": "iana"
+ },
+ "text/hjson": {
+ "extensions": ["hjson"]
+ },
+ "text/html": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["html","htm"]
+ },
+ "text/jade": {
+ "extensions": ["jade"]
+ },
+ "text/javascript": {
+ "source": "iana",
+ "compressible": true
+ },
+ "text/jcr-cnd": {
+ "source": "iana"
+ },
+ "text/jsx": {
+ "compressible": true,
+ "extensions": ["jsx"]
+ },
+ "text/less": {
+ "extensions": ["less"]
+ },
+ "text/markdown": {
+ "source": "iana"
+ },
+ "text/mizar": {
+ "source": "iana"
+ },
+ "text/n3": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["n3"]
+ },
+ "text/parameters": {
+ "source": "iana"
+ },
+ "text/parityfec": {
+ "source": "iana"
+ },
+ "text/plain": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["txt","text","conf","def","list","log","in","ini"]
+ },
+ "text/provenance-notation": {
+ "source": "iana"
+ },
+ "text/prs.fallenstein.rst": {
+ "source": "iana"
+ },
+ "text/prs.lines.tag": {
+ "source": "iana",
+ "extensions": ["dsc"]
+ },
+ "text/raptorfec": {
+ "source": "iana"
+ },
+ "text/red": {
+ "source": "iana"
+ },
+ "text/rfc822-headers": {
+ "source": "iana"
+ },
+ "text/richtext": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtx"]
+ },
+ "text/rtf": {
+ "source": "iana"
+ },
+ "text/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "text/rtploopback": {
+ "source": "iana"
+ },
+ "text/rtx": {
+ "source": "iana"
+ },
+ "text/sgml": {
+ "source": "iana",
+ "extensions": ["sgml","sgm"]
+ },
+ "text/stylus": {
+ "extensions": ["stylus","styl"]
+ },
+ "text/t140": {
+ "source": "iana"
+ },
+ "text/tab-separated-values": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["tsv"]
+ },
+ "text/troff": {
+ "source": "iana",
+ "extensions": ["t","tr","roff","man","me","ms"]
+ },
+ "text/turtle": {
+ "source": "iana",
+ "extensions": ["ttl"]
+ },
+ "text/ulpfec": {
+ "source": "iana"
+ },
+ "text/uri-list": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["uri","uris","urls"]
+ },
+ "text/vcard": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["vcard"]
+ },
+ "text/vnd.a": {
+ "source": "iana"
+ },
+ "text/vnd.abc": {
+ "source": "iana"
+ },
+ "text/vnd.curl": {
+ "source": "iana",
+ "extensions": ["curl"]
+ },
+ "text/vnd.curl.dcurl": {
+ "source": "apache",
+ "extensions": ["dcurl"]
+ },
+ "text/vnd.curl.mcurl": {
+ "source": "apache",
+ "extensions": ["mcurl"]
+ },
+ "text/vnd.curl.scurl": {
+ "source": "apache",
+ "extensions": ["scurl"]
+ },
+ "text/vnd.debian.copyright": {
+ "source": "iana"
+ },
+ "text/vnd.dmclientscript": {
+ "source": "iana"
+ },
+ "text/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "text/vnd.esmertec.theme-descriptor": {
+ "source": "iana"
+ },
+ "text/vnd.fly": {
+ "source": "iana",
+ "extensions": ["fly"]
+ },
+ "text/vnd.fmi.flexstor": {
+ "source": "iana",
+ "extensions": ["flx"]
+ },
+ "text/vnd.graphviz": {
+ "source": "iana",
+ "extensions": ["gv"]
+ },
+ "text/vnd.in3d.3dml": {
+ "source": "iana",
+ "extensions": ["3dml"]
+ },
+ "text/vnd.in3d.spot": {
+ "source": "iana",
+ "extensions": ["spot"]
+ },
+ "text/vnd.iptc.newsml": {
+ "source": "iana"
+ },
+ "text/vnd.iptc.nitf": {
+ "source": "iana"
+ },
+ "text/vnd.latex-z": {
+ "source": "iana"
+ },
+ "text/vnd.motorola.reflex": {
+ "source": "iana"
+ },
+ "text/vnd.ms-mediapackage": {
+ "source": "iana"
+ },
+ "text/vnd.net2phone.commcenter.command": {
+ "source": "iana"
+ },
+ "text/vnd.radisys.msml-basic-layout": {
+ "source": "iana"
+ },
+ "text/vnd.si.uricatalogue": {
+ "source": "iana"
+ },
+ "text/vnd.sun.j2me.app-descriptor": {
+ "source": "iana",
+ "extensions": ["jad"]
+ },
+ "text/vnd.trolltech.linguist": {
+ "source": "iana"
+ },
+ "text/vnd.wap.si": {
+ "source": "iana"
+ },
+ "text/vnd.wap.sl": {
+ "source": "iana"
+ },
+ "text/vnd.wap.wml": {
+ "source": "iana",
+ "extensions": ["wml"]
+ },
+ "text/vnd.wap.wmlscript": {
+ "source": "iana",
+ "extensions": ["wmls"]
+ },
+ "text/vtt": {
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["vtt"]
+ },
+ "text/x-asm": {
+ "source": "apache",
+ "extensions": ["s","asm"]
+ },
+ "text/x-c": {
+ "source": "apache",
+ "extensions": ["c","cc","cxx","cpp","h","hh","dic"]
+ },
+ "text/x-component": {
+ "extensions": ["htc"]
+ },
+ "text/x-fortran": {
+ "source": "apache",
+ "extensions": ["f","for","f77","f90"]
+ },
+ "text/x-gwt-rpc": {
+ "compressible": true
+ },
+ "text/x-handlebars-template": {
+ "extensions": ["hbs"]
+ },
+ "text/x-java-source": {
+ "source": "apache",
+ "extensions": ["java"]
+ },
+ "text/x-jquery-tmpl": {
+ "compressible": true
+ },
+ "text/x-lua": {
+ "extensions": ["lua"]
+ },
+ "text/x-markdown": {
+ "compressible": true,
+ "extensions": ["markdown","md","mkd"]
+ },
+ "text/x-nfo": {
+ "source": "apache",
+ "extensions": ["nfo"]
+ },
+ "text/x-opml": {
+ "source": "apache",
+ "extensions": ["opml"]
+ },
+ "text/x-pascal": {
+ "source": "apache",
+ "extensions": ["p","pas"]
+ },
+ "text/x-sass": {
+ "extensions": ["sass"]
+ },
+ "text/x-scss": {
+ "extensions": ["scss"]
+ },
+ "text/x-setext": {
+ "source": "apache",
+ "extensions": ["etx"]
+ },
+ "text/x-sfv": {
+ "source": "apache",
+ "extensions": ["sfv"]
+ },
+ "text/x-uuencode": {
+ "source": "apache",
+ "extensions": ["uu"]
+ },
+ "text/x-vcalendar": {
+ "source": "apache",
+ "extensions": ["vcs"]
+ },
+ "text/x-vcard": {
+ "source": "apache",
+ "extensions": ["vcf"]
+ },
+ "text/xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "text/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "text/yaml": {
+ "extensions": ["yaml","yml"]
+ },
+ "video/1d-interleaved-parityfec": {
+ "source": "apache"
+ },
+ "video/3gpp": {
+ "source": "apache",
+ "extensions": ["3gp"]
+ },
+ "video/3gpp-tt": {
+ "source": "apache"
+ },
+ "video/3gpp2": {
+ "source": "apache",
+ "extensions": ["3g2"]
+ },
+ "video/bmpeg": {
+ "source": "apache"
+ },
+ "video/bt656": {
+ "source": "apache"
+ },
+ "video/celb": {
+ "source": "apache"
+ },
+ "video/dv": {
+ "source": "apache"
+ },
+ "video/h261": {
+ "source": "apache",
+ "extensions": ["h261"]
+ },
+ "video/h263": {
+ "source": "apache",
+ "extensions": ["h263"]
+ },
+ "video/h263-1998": {
+ "source": "apache"
+ },
+ "video/h263-2000": {
+ "source": "apache"
+ },
+ "video/h264": {
+ "source": "apache",
+ "extensions": ["h264"]
+ },
+ "video/h264-rcdo": {
+ "source": "apache"
+ },
+ "video/h264-svc": {
+ "source": "apache"
+ },
+ "video/jpeg": {
+ "source": "apache",
+ "extensions": ["jpgv"]
+ },
+ "video/jpeg2000": {
+ "source": "apache"
+ },
+ "video/jpm": {
+ "source": "apache",
+ "extensions": ["jpm","jpgm"]
+ },
+ "video/mj2": {
+ "source": "apache",
+ "extensions": ["mj2","mjp2"]
+ },
+ "video/mp1s": {
+ "source": "apache"
+ },
+ "video/mp2p": {
+ "source": "apache"
+ },
+ "video/mp2t": {
+ "source": "apache",
+ "extensions": ["ts"]
+ },
+ "video/mp4": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mp4","mp4v","mpg4"]
+ },
+ "video/mp4v-es": {
+ "source": "apache"
+ },
+ "video/mpeg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mpeg","mpg","mpe","m1v","m2v"]
+ },
+ "video/mpeg4-generic": {
+ "source": "apache"
+ },
+ "video/mpv": {
+ "source": "apache"
+ },
+ "video/nv": {
+ "source": "apache"
+ },
+ "video/ogg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ogv"]
+ },
+ "video/parityfec": {
+ "source": "apache"
+ },
+ "video/pointer": {
+ "source": "apache"
+ },
+ "video/quicktime": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["qt","mov"]
+ },
+ "video/raw": {
+ "source": "apache"
+ },
+ "video/rtp-enc-aescm128": {
+ "source": "apache"
+ },
+ "video/rtx": {
+ "source": "apache"
+ },
+ "video/smpte292m": {
+ "source": "apache"
+ },
+ "video/ulpfec": {
+ "source": "apache"
+ },
+ "video/vc1": {
+ "source": "apache"
+ },
+ "video/vnd.cctv": {
+ "source": "apache"
+ },
+ "video/vnd.dece.hd": {
+ "source": "apache",
+ "extensions": ["uvh","uvvh"]
+ },
+ "video/vnd.dece.mobile": {
+ "source": "apache",
+ "extensions": ["uvm","uvvm"]
+ },
+ "video/vnd.dece.mp4": {
+ "source": "apache"
+ },
+ "video/vnd.dece.pd": {
+ "source": "apache",
+ "extensions": ["uvp","uvvp"]
+ },
+ "video/vnd.dece.sd": {
+ "source": "apache",
+ "extensions": ["uvs","uvvs"]
+ },
+ "video/vnd.dece.video": {
+ "source": "apache",
+ "extensions": ["uvv","uvvv"]
+ },
+ "video/vnd.directv.mpeg": {
+ "source": "apache"
+ },
+ "video/vnd.directv.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dlna.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dvb.file": {
+ "source": "apache",
+ "extensions": ["dvb"]
+ },
+ "video/vnd.fvt": {
+ "source": "apache",
+ "extensions": ["fvt"]
+ },
+ "video/vnd.hns.video": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsavc": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsmpeg2": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.video": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.videop": {
+ "source": "apache"
+ },
+ "video/vnd.mpegurl": {
+ "source": "apache",
+ "extensions": ["mxu","m4u"]
+ },
+ "video/vnd.ms-playready.media.pyv": {
+ "source": "apache",
+ "extensions": ["pyv"]
+ },
+ "video/vnd.nokia.interleaved-multimedia": {
+ "source": "apache"
+ },
+ "video/vnd.nokia.videovoip": {
+ "source": "apache"
+ },
+ "video/vnd.objectvideo": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg1": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg4": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.swf": {
+ "source": "apache"
+ },
+ "video/vnd.sealedmedia.softseal.mov": {
+ "source": "apache"
+ },
+ "video/vnd.uvvu.mp4": {
+ "source": "apache",
+ "extensions": ["uvu","uvvu"]
+ },
+ "video/vnd.vivo": {
+ "source": "apache",
+ "extensions": ["viv"]
+ },
+ "video/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["webm"]
+ },
+ "video/x-f4v": {
+ "source": "apache",
+ "extensions": ["f4v"]
+ },
+ "video/x-fli": {
+ "source": "apache",
+ "extensions": ["fli"]
+ },
+ "video/x-flv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["flv"]
+ },
+ "video/x-m4v": {
+ "source": "apache",
+ "extensions": ["m4v"]
+ },
+ "video/x-matroska": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mkv","mk3d","mks"]
+ },
+ "video/x-mng": {
+ "source": "apache",
+ "extensions": ["mng"]
+ },
+ "video/x-ms-asf": {
+ "source": "apache",
+ "extensions": ["asf","asx"]
+ },
+ "video/x-ms-vob": {
+ "source": "apache",
+ "extensions": ["vob"]
+ },
+ "video/x-ms-wm": {
+ "source": "apache",
+ "extensions": ["wm"]
+ },
+ "video/x-ms-wmv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["wmv"]
+ },
+ "video/x-ms-wmx": {
+ "source": "apache",
+ "extensions": ["wmx"]
+ },
+ "video/x-ms-wvx": {
+ "source": "apache",
+ "extensions": ["wvx"]
+ },
+ "video/x-msvideo": {
+ "source": "apache",
+ "extensions": ["avi"]
+ },
+ "video/x-sgi-movie": {
+ "source": "apache",
+ "extensions": ["movie"]
+ },
+ "video/x-smv": {
+ "source": "apache",
+ "extensions": ["smv"]
+ },
+ "x-conference/x-cooltalk": {
+ "source": "apache",
+ "extensions": ["ice"]
+ },
+ "x-shader/x-fragment": {
+ "compressible": true
+ },
+ "x-shader/x-vertex": {
+ "compressible": true
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js
new file mode 100644
index 0000000..551031f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js
@@ -0,0 +1,11 @@
+/*!
+ * mime-db
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = require('./db.json')
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json
new file mode 100644
index 0000000..135ef18
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json
@@ -0,0 +1,93 @@
+{
+ "name": "mime-db",
+ "description": "Media Type Database",
+ "version": "1.7.0",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "db",
+ "type",
+ "types",
+ "database",
+ "charset",
+ "charsets"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/mime-db"
+ },
+ "devDependencies": {
+ "co": "4",
+ "cogent": "1",
+ "csv-parse": "0",
+ "gnode": "0.1.0",
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.4",
+ "raw-body": "~1.3.2",
+ "stream-to-array": "2"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "db.json",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "build": "node scripts/build",
+ "fetch": "gnode scripts/extensions && gnode scripts/types",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "update": "npm run fetch && npm run build"
+ },
+ "gitHead": "972cc3ed48530ab7aca7a155bf2dbd1b13aa8f86",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-db/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-db",
+ "_id": "mime-db@1.7.0",
+ "_shasum": "36cf66a6c52ea71827bde287f77c254f5ef1b8d3",
+ "_from": "mime-db@~1.7.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "36cf66a6c52ea71827bde287f77c254f5ef1b8d3",
+ "tarball": "http://registry.npmjs.org/mime-db/-/mime-db-1.7.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.7.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json
new file mode 100644
index 0000000..9b5b766
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json
@@ -0,0 +1,84 @@
+{
+ "name": "mime-types",
+ "description": "The ultimate javascript content-type utility.",
+ "version": "2.0.9",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jeremiah Senkpiel",
+ "email": "fishrock123@rocketmail.com",
+ "url": "https://searchbeam.jit.su"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "types"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/mime-types"
+ },
+ "dependencies": {
+ "mime-db": "~1.7.0"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec test/test.js",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
+ },
+ "gitHead": "1c6d55da440b6a9d2c0e9c2faac98e6b1be47fc7",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-types/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-types",
+ "_id": "mime-types@2.0.9",
+ "_shasum": "e8449aff27b1245ddc6641b524439ae80c4b78a6",
+ "_from": "mime-types@~2.0.9",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e8449aff27b1245ddc6641b524439ae80c4b78a6",
+ "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-2.0.9.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.9.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md
new file mode 100644
index 0000000..8a03025
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md
@@ -0,0 +1,65 @@
+0.5.1 / 2015-02-14
+==================
+
+ * Fix preference sorting to be stable for long acceptable lists
+
+0.5.0 / 2014-12-18
+==================
+
+ * Fix list return order when large accepted list
+ * Fix missing identity encoding when q=0 exists
+ * Remove dynamic building of Negotiator class
+
+0.4.9 / 2014-10-14
+==================
+
+ * Fix error when media type has invalid parameter
+
+0.4.8 / 2014-09-28
+==================
+
+ * Fix all negotiations to be case-insensitive
+ * Stable sort preferences of same quality according to client order
+ * Support Node.js 0.6
+
+0.4.7 / 2014-06-24
+==================
+
+ * Handle invalid provided languages
+ * Handle invalid provided media types
+
+0.4.6 / 2014-06-11
+==================
+
+ * Order by specificity when quality is the same
+
+0.4.5 / 2014-05-29
+==================
+
+ * Fix regression in empty header handling
+
+0.4.4 / 2014-05-29
+==================
+
+ * Fix behaviors when headers are not present
+
+0.4.3 / 2014-04-16
+==================
+
+ * Handle slashes on media params correctly
+
+0.4.2 / 2014-02-28
+==================
+
+ * Fix media type sorting
+ * Handle media types params strictly
+
+0.4.1 / 2014-01-16
+==================
+
+ * Use most specific matches
+
+0.4.0 / 2014-01-09
+==================
+
+ * Remove preferred prefix from methods
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE
new file mode 100644
index 0000000..692b534
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2012 Federico Romero
+Copyright (c) 2012-2014 Isaac Z. Schlueter
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md
new file mode 100644
index 0000000..ef507fa
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md
@@ -0,0 +1,203 @@
+# negotiator
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+An HTTP content negotiator for Node.js
+
+## Installation
+
+```sh
+$ npm install negotiator
+```
+
+## API
+
+```js
+var Negotiator = require('negotiator')
+```
+
+### Accept Negotiation
+
+```js
+availableMediaTypes = ['text/html', 'text/plain', 'application/json']
+
+// The negotiator constructor receives a request object
+negotiator = new Negotiator(request)
+
+// Let's say Accept header is 'text/html, application/*;q=0.2, image/jpeg;q=0.8'
+
+negotiator.mediaTypes()
+// -> ['text/html', 'image/jpeg', 'application/*']
+
+negotiator.mediaTypes(availableMediaTypes)
+// -> ['text/html', 'application/json']
+
+negotiator.mediaType(availableMediaTypes)
+// -> 'text/html'
+```
+
+You can check a working example at `examples/accept.js`.
+
+#### Methods
+
+##### mediaType()
+
+Returns the most preferred media type from the client.
+
+##### mediaType(availableMediaType)
+
+Returns the most preferred media type from a list of available media types.
+
+##### mediaTypes()
+
+Returns an array of preferred media types ordered by the client preference.
+
+##### mediaTypes(availableMediaTypes)
+
+Returns an array of preferred media types ordered by priority from a list of
+available media types.
+
+### Accept-Language Negotiation
+
+```js
+negotiator = new Negotiator(request)
+
+availableLanguages = 'en', 'es', 'fr'
+
+// Let's say Accept-Language header is 'en;q=0.8, es, pt'
+
+negotiator.languages()
+// -> ['es', 'pt', 'en']
+
+negotiator.languages(availableLanguages)
+// -> ['es', 'en']
+
+language = negotiator.language(availableLanguages)
+// -> 'es'
+```
+
+You can check a working example at `examples/language.js`.
+
+#### Methods
+
+##### language()
+
+Returns the most preferred language from the client.
+
+##### language(availableLanguages)
+
+Returns the most preferred language from a list of available languages.
+
+##### languages()
+
+Returns an array of preferred languages ordered by the client preference.
+
+##### languages(availableLanguages)
+
+Returns an array of preferred languages ordered by priority from a list of
+available languages.
+
+### Accept-Charset Negotiation
+
+```js
+availableCharsets = ['utf-8', 'iso-8859-1', 'iso-8859-5']
+
+negotiator = new Negotiator(request)
+
+// Let's say Accept-Charset header is 'utf-8, iso-8859-1;q=0.8, utf-7;q=0.2'
+
+negotiator.charsets()
+// -> ['utf-8', 'iso-8859-1', 'utf-7']
+
+negotiator.charsets(availableCharsets)
+// -> ['utf-8', 'iso-8859-1']
+
+negotiator.charset(availableCharsets)
+// -> 'utf-8'
+```
+
+You can check a working example at `examples/charset.js`.
+
+#### Methods
+
+##### charset()
+
+Returns the most preferred charset from the client.
+
+##### charset(availableCharsets)
+
+Returns the most preferred charset from a list of available charsets.
+
+##### charsets()
+
+Returns an array of preferred charsets ordered by the client preference.
+
+##### charsets(availableCharsets)
+
+Returns an array of preferred charsets ordered by priority from a list of
+available charsets.
+
+### Accept-Encoding Negotiation
+
+```js
+availableEncodings = ['identity', 'gzip']
+
+negotiator = new Negotiator(request)
+
+// Let's say Accept-Encoding header is 'gzip, compress;q=0.2, identity;q=0.5'
+
+negotiator.encodings()
+// -> ['gzip', 'identity', 'compress']
+
+negotiator.encodings(availableEncodings)
+// -> ['gzip', 'identity']
+
+negotiator.encoding(availableEncodings)
+// -> 'gzip'
+```
+
+You can check a working example at `examples/encoding.js`.
+
+#### Methods
+
+##### encoding()
+
+Returns the most preferred encoding from the client.
+
+##### encoding(availableEncodings)
+
+Returns the most preferred encoding from a list of available encodings.
+
+##### encodings()
+
+Returns an array of preferred encodings ordered by the client preference.
+
+##### encodings(availableEncodings)
+
+Returns an array of preferred encodings ordered by priority from a list of
+available encodings.
+
+## See Also
+
+The [accepts](https://npmjs.org/package/accepts#readme) module builds on
+this module and provides an alternative interface, mime type validation,
+and more.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/negotiator.svg
+[npm-url]: https://npmjs.org/package/negotiator
+[node-version-image]: https://img.shields.io/node/v/negotiator.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/negotiator/master.svg
+[travis-url]: https://travis-ci.org/jshttp/negotiator
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/negotiator/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/negotiator?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/negotiator.svg
+[downloads-url]: https://npmjs.org/package/negotiator
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js
new file mode 100644
index 0000000..edae9cf
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js
@@ -0,0 +1,62 @@
+
+var preferredCharsets = require('./lib/charset');
+var preferredEncodings = require('./lib/encoding');
+var preferredLanguages = require('./lib/language');
+var preferredMediaTypes = require('./lib/mediaType');
+
+module.exports = Negotiator;
+Negotiator.Negotiator = Negotiator;
+
+function Negotiator(request) {
+ if (!(this instanceof Negotiator)) {
+ return new Negotiator(request);
+ }
+
+ this.request = request;
+}
+
+Negotiator.prototype.charset = function charset(available) {
+ var set = this.charsets(available);
+ return set && set[0];
+};
+
+Negotiator.prototype.charsets = function charsets(available) {
+ return preferredCharsets(this.request.headers['accept-charset'], available);
+};
+
+Negotiator.prototype.encoding = function encoding(available) {
+ var set = this.encodings(available);
+ return set && set[0];
+};
+
+Negotiator.prototype.encodings = function encodings(available) {
+ return preferredEncodings(this.request.headers['accept-encoding'], available);
+};
+
+Negotiator.prototype.language = function language(available) {
+ var set = this.languages(available);
+ return set && set[0];
+};
+
+Negotiator.prototype.languages = function languages(available) {
+ return preferredLanguages(this.request.headers['accept-language'], available);
+};
+
+Negotiator.prototype.mediaType = function mediaType(available) {
+ var set = this.mediaTypes(available);
+ return set && set[0];
+};
+
+Negotiator.prototype.mediaTypes = function mediaTypes(available) {
+ return preferredMediaTypes(this.request.headers.accept, available);
+};
+
+// Backwards compatibility
+Negotiator.prototype.preferredCharset = Negotiator.prototype.charset;
+Negotiator.prototype.preferredCharsets = Negotiator.prototype.charsets;
+Negotiator.prototype.preferredEncoding = Negotiator.prototype.encoding;
+Negotiator.prototype.preferredEncodings = Negotiator.prototype.encodings;
+Negotiator.prototype.preferredLanguage = Negotiator.prototype.language;
+Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages;
+Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType;
+Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes;
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js
new file mode 100644
index 0000000..7abd17c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js
@@ -0,0 +1,102 @@
+module.exports = preferredCharsets;
+preferredCharsets.preferredCharsets = preferredCharsets;
+
+function parseAcceptCharset(accept) {
+ var accepts = accept.split(',');
+
+ for (var i = 0, j = 0; i < accepts.length; i++) {
+ var charset = parseCharset(accepts[i].trim(), i);
+
+ if (charset) {
+ accepts[j++] = charset;
+ }
+ }
+
+ // trim accepts
+ accepts.length = j;
+
+ return accepts;
+}
+
+function parseCharset(s, i) {
+ var match = s.match(/^\s*(\S+?)\s*(?:;(.*))?$/);
+ if (!match) return null;
+
+ var charset = match[1];
+ var q = 1;
+ if (match[2]) {
+ var params = match[2].split(';')
+ for (var i = 0; i < params.length; i ++) {
+ var p = params[i].trim().split('=');
+ if (p[0] === 'q') {
+ q = parseFloat(p[1]);
+ break;
+ }
+ }
+ }
+
+ return {
+ charset: charset,
+ q: q,
+ i: i
+ };
+}
+
+function getCharsetPriority(charset, accepted, index) {
+ var priority = {o: -1, q: 0, s: 0};
+
+ for (var i = 0; i < accepted.length; i++) {
+ var spec = specify(charset, accepted[i], index);
+
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
+ priority = spec;
+ }
+ }
+
+ return priority;
+}
+
+function specify(charset, spec, index) {
+ var s = 0;
+ if(spec.charset.toLowerCase() === charset.toLowerCase()){
+ s |= 1;
+ } else if (spec.charset !== '*' ) {
+ return null
+ }
+
+ return {
+ i: index,
+ o: spec.i,
+ q: spec.q,
+ s: s
+ }
+}
+
+function preferredCharsets(accept, provided) {
+ // RFC 2616 sec 14.2: no header = *
+ var accepts = parseAcceptCharset(accept === undefined ? '*' : accept || '');
+
+ if (!provided) {
+ // sorted list of all charsets
+ return accepts.filter(isQuality).sort(compareSpecs).map(function getCharset(spec) {
+ return spec.charset;
+ });
+ }
+
+ var priorities = provided.map(function getPriority(type, index) {
+ return getCharsetPriority(type, accepts, index);
+ });
+
+ // sorted list of accepted charsets
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) {
+ return provided[priorities.indexOf(priority)];
+ });
+}
+
+function compareSpecs(a, b) {
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
+}
+
+function isQuality(spec) {
+ return spec.q > 0;
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js
new file mode 100644
index 0000000..7fed673
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js
@@ -0,0 +1,118 @@
+module.exports = preferredEncodings;
+preferredEncodings.preferredEncodings = preferredEncodings;
+
+function parseAcceptEncoding(accept) {
+ var accepts = accept.split(',');
+ var hasIdentity = false;
+ var minQuality = 1;
+
+ for (var i = 0, j = 0; i < accepts.length; i++) {
+ var encoding = parseEncoding(accepts[i].trim(), i);
+
+ if (encoding) {
+ accepts[j++] = encoding;
+ hasIdentity = hasIdentity || specify('identity', encoding);
+ minQuality = Math.min(minQuality, encoding.q || 1);
+ }
+ }
+
+ if (!hasIdentity) {
+ /*
+ * If identity doesn't explicitly appear in the accept-encoding header,
+ * it's added to the list of acceptable encoding with the lowest q
+ */
+ accepts[j++] = {
+ encoding: 'identity',
+ q: minQuality,
+ i: i
+ };
+ }
+
+ // trim accepts
+ accepts.length = j;
+
+ return accepts;
+}
+
+function parseEncoding(s, i) {
+ var match = s.match(/^\s*(\S+?)\s*(?:;(.*))?$/);
+
+ if (!match) return null;
+
+ var encoding = match[1];
+ var q = 1;
+ if (match[2]) {
+ var params = match[2].split(';');
+ for (var i = 0; i < params.length; i ++) {
+ var p = params[i].trim().split('=');
+ if (p[0] === 'q') {
+ q = parseFloat(p[1]);
+ break;
+ }
+ }
+ }
+
+ return {
+ encoding: encoding,
+ q: q,
+ i: i
+ };
+}
+
+function getEncodingPriority(encoding, accepted, index) {
+ var priority = {o: -1, q: 0, s: 0};
+
+ for (var i = 0; i < accepted.length; i++) {
+ var spec = specify(encoding, accepted[i], index);
+
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
+ priority = spec;
+ }
+ }
+
+ return priority;
+}
+
+function specify(encoding, spec, index) {
+ var s = 0;
+ if(spec.encoding.toLowerCase() === encoding.toLowerCase()){
+ s |= 1;
+ } else if (spec.encoding !== '*' ) {
+ return null
+ }
+
+ return {
+ i: index,
+ o: spec.i,
+ q: spec.q,
+ s: s
+ }
+};
+
+function preferredEncodings(accept, provided) {
+ var accepts = parseAcceptEncoding(accept || '');
+
+ if (!provided) {
+ // sorted list of all encodings
+ return accepts.filter(isQuality).sort(compareSpecs).map(function getEncoding(spec) {
+ return spec.encoding;
+ });
+ }
+
+ var priorities = provided.map(function getPriority(type, index) {
+ return getEncodingPriority(type, accepts, index);
+ });
+
+ // sorted list of accepted encodings
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getEncoding(priority) {
+ return provided[priorities.indexOf(priority)];
+ });
+}
+
+function compareSpecs(a, b) {
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
+}
+
+function isQuality(spec) {
+ return spec.q > 0;
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js
new file mode 100644
index 0000000..ed9e1ec
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js
@@ -0,0 +1,112 @@
+module.exports = preferredLanguages;
+preferredLanguages.preferredLanguages = preferredLanguages;
+
+function parseAcceptLanguage(accept) {
+ var accepts = accept.split(',');
+
+ for (var i = 0, j = 0; i < accepts.length; i++) {
+ var langauge = parseLanguage(accepts[i].trim(), i);
+
+ if (langauge) {
+ accepts[j++] = langauge;
+ }
+ }
+
+ // trim accepts
+ accepts.length = j;
+
+ return accepts;
+}
+
+function parseLanguage(s, i) {
+ var match = s.match(/^\s*(\S+?)(?:-(\S+?))?\s*(?:;(.*))?$/);
+ if (!match) return null;
+
+ var prefix = match[1],
+ suffix = match[2],
+ full = prefix;
+
+ if (suffix) full += "-" + suffix;
+
+ var q = 1;
+ if (match[3]) {
+ var params = match[3].split(';')
+ for (var i = 0; i < params.length; i ++) {
+ var p = params[i].split('=');
+ if (p[0] === 'q') q = parseFloat(p[1]);
+ }
+ }
+
+ return {
+ prefix: prefix,
+ suffix: suffix,
+ q: q,
+ i: i,
+ full: full
+ };
+}
+
+function getLanguagePriority(language, accepted, index) {
+ var priority = {o: -1, q: 0, s: 0};
+
+ for (var i = 0; i < accepted.length; i++) {
+ var spec = specify(language, accepted[i], index);
+
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
+ priority = spec;
+ }
+ }
+
+ return priority;
+}
+
+function specify(language, spec, index) {
+ var p = parseLanguage(language)
+ if (!p) return null;
+ var s = 0;
+ if(spec.full.toLowerCase() === p.full.toLowerCase()){
+ s |= 4;
+ } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) {
+ s |= 2;
+ } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) {
+ s |= 1;
+ } else if (spec.full !== '*' ) {
+ return null
+ }
+
+ return {
+ i: index,
+ o: spec.i,
+ q: spec.q,
+ s: s
+ }
+};
+
+function preferredLanguages(accept, provided) {
+ // RFC 2616 sec 14.4: no header = *
+ var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');
+
+ if (!provided) {
+ // sorted list of all languages
+ return accepts.filter(isQuality).sort(compareSpecs).map(function getLanguage(spec) {
+ return spec.full;
+ });
+ }
+
+ var priorities = provided.map(function getPriority(type, index) {
+ return getLanguagePriority(type, accepts, index);
+ });
+
+ // sorted list of accepted languages
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {
+ return provided[priorities.indexOf(priority)];
+ });
+}
+
+function compareSpecs(a, b) {
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
+}
+
+function isQuality(spec) {
+ return spec.q > 0;
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js
new file mode 100644
index 0000000..167956a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js
@@ -0,0 +1,136 @@
+module.exports = preferredMediaTypes;
+preferredMediaTypes.preferredMediaTypes = preferredMediaTypes;
+
+function parseAccept(accept) {
+ var accepts = accept.split(',');
+
+ for (var i = 0, j = 0; i < accepts.length; i++) {
+ var mediaType = parseMediaType(accepts[i].trim(), i);
+
+ if (mediaType) {
+ accepts[j++] = mediaType;
+ }
+ }
+
+ // trim accepts
+ accepts.length = j;
+
+ return accepts;
+};
+
+function parseMediaType(s, i) {
+ var match = s.match(/\s*(\S+?)\/([^;\s]+)\s*(?:;(.*))?/);
+ if (!match) return null;
+
+ var type = match[1],
+ subtype = match[2],
+ full = "" + type + "/" + subtype,
+ params = {},
+ q = 1;
+
+ if (match[3]) {
+ params = match[3].split(';').map(function(s) {
+ return s.trim().split('=');
+ }).reduce(function (set, p) {
+ set[p[0]] = p[1];
+ return set
+ }, params);
+
+ if (params.q != null) {
+ q = parseFloat(params.q);
+ delete params.q;
+ }
+ }
+
+ return {
+ type: type,
+ subtype: subtype,
+ params: params,
+ q: q,
+ i: i,
+ full: full
+ };
+}
+
+function getMediaTypePriority(type, accepted, index) {
+ var priority = {o: -1, q: 0, s: 0};
+
+ for (var i = 0; i < accepted.length; i++) {
+ var spec = specify(type, accepted[i], index);
+
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
+ priority = spec;
+ }
+ }
+
+ return priority;
+}
+
+function specify(type, spec, index) {
+ var p = parseMediaType(type);
+ var s = 0;
+
+ if (!p) {
+ return null;
+ }
+
+ if(spec.type.toLowerCase() == p.type.toLowerCase()) {
+ s |= 4
+ } else if(spec.type != '*') {
+ return null;
+ }
+
+ if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) {
+ s |= 2
+ } else if(spec.subtype != '*') {
+ return null;
+ }
+
+ var keys = Object.keys(spec.params);
+ if (keys.length > 0) {
+ if (keys.every(function (k) {
+ return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase();
+ })) {
+ s |= 1
+ } else {
+ return null
+ }
+ }
+
+ return {
+ i: index,
+ o: spec.i,
+ q: spec.q,
+ s: s,
+ }
+
+}
+
+function preferredMediaTypes(accept, provided) {
+ // RFC 2616 sec 14.2: no header = */*
+ var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');
+
+ if (!provided) {
+ // sorted list of all types
+ return accepts.filter(isQuality).sort(compareSpecs).map(function getType(spec) {
+ return spec.full;
+ });
+ }
+
+ var priorities = provided.map(function getPriority(type, index) {
+ return getMediaTypePriority(type, accepts, index);
+ });
+
+ // sorted list of accepted types
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {
+ return provided[priorities.indexOf(priority)];
+ });
+}
+
+function compareSpecs(a, b) {
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
+}
+
+function isQuality(spec) {
+ return spec.q > 0;
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json
new file mode 100644
index 0000000..d49cccf
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json
@@ -0,0 +1,86 @@
+{
+ "name": "negotiator",
+ "description": "HTTP content negotiation",
+ "version": "0.5.1",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Federico Romero",
+ "email": "federico.romero@outboxlabs.com"
+ },
+ {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "http",
+ "content negotiation",
+ "accept",
+ "accept-language",
+ "accept-encoding",
+ "accept-charset"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/negotiator"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "nodeunit": "0.9.0",
+ "tap": "0.5.0"
+ },
+ "files": [
+ "lib/",
+ "HISTORY.md",
+ "LICENSE",
+ "index.js",
+ "README.md"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "nodeunit test",
+ "test-cov": "istanbul cover ./node_modules/nodeunit/bin/nodeunit test"
+ },
+ "gitHead": "bfee971fe0503518cc93d1956518212203b7e68c",
+ "bugs": {
+ "url": "https://github.com/jshttp/negotiator/issues"
+ },
+ "homepage": "https://github.com/jshttp/negotiator",
+ "_id": "negotiator@0.5.1",
+ "_shasum": "498f661c522470153c6086ac83019cb3eb66f61c",
+ "_from": "negotiator@0.5.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "federomero",
+ "email": "federomero@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "498f661c522470153c6086ac83019cb3eb66f61c",
+ "tarball": "http://registry.npmjs.org/negotiator/-/negotiator-0.5.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.5.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/package.json
new file mode 100644
index 0000000..7f55cfd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/accepts/package.json
@@ -0,0 +1,92 @@
+{
+ "name": "accepts",
+ "description": "Higher-level content negotiation",
+ "version": "1.2.4",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/accepts"
+ },
+ "dependencies": {
+ "mime-types": "~2.0.9",
+ "negotiator": "0.5.1"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "keywords": [
+ "content",
+ "negotiation",
+ "accept",
+ "accepts"
+ ],
+ "gitHead": "dfa143a31879bf5fb4934bbefc5741504a1cc15f",
+ "bugs": {
+ "url": "https://github.com/jshttp/accepts/issues"
+ },
+ "homepage": "https://github.com/jshttp/accepts",
+ "_id": "accepts@1.2.4",
+ "_shasum": "f4e6c66f4faf69c76bd7a63a1ffc5bd2dacfb2ac",
+ "_from": "accepts@~1.2.3",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "federomero",
+ "email": "federomero@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "f4e6c66f4faf69c76bd7a63a1ffc5bd2dacfb2ac",
+ "tarball": "http://registry.npmjs.org/accepts/-/accepts-1.2.4.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.2.4.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/HISTORY.md
new file mode 100644
index 0000000..1192551
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/HISTORY.md
@@ -0,0 +1,40 @@
+0.5.0 / 2014-10-11
+==================
+
+ * Add `parse` function
+
+0.4.0 / 2014-09-21
+==================
+
+ * Expand non-Unicode `filename` to the full ISO-8859-1 charset
+
+0.3.0 / 2014-09-20
+==================
+
+ * Add `fallback` option
+ * Add `type` option
+
+0.2.0 / 2014-09-19
+==================
+
+ * Reduce ambiguity of file names with hex escape in buggy browsers
+
+0.1.2 / 2014-09-19
+==================
+
+ * Fix periodic invalid Unicode filename header
+
+0.1.1 / 2014-09-19
+==================
+
+ * Fix invalid characters appearing in `filename*` parameter
+
+0.1.0 / 2014-09-18
+==================
+
+ * Make the `filename` argument optional
+
+0.0.0 / 2014-09-18
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/README.md
new file mode 100644
index 0000000..d265431
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/README.md
@@ -0,0 +1,141 @@
+# content-disposition
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create and parse HTTP `Content-Disposition` header
+
+## Installation
+
+```sh
+$ npm install content-disposition
+```
+
+## API
+
+```js
+var contentDisposition = require('content-disposition')
+```
+
+### contentDisposition(filename, options)
+
+Create an attachment `Content-Disposition` header value using the given file name,
+if supplied. The `filename` is optional and if no file name is desired, but you
+want to specify `options`, set `filename` to `undefined`.
+
+```js
+res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf'))
+```
+
+**note** HTTP headers are of the ISO-8859-1 character set. If you are writing this
+header through a means different from `setHeader` in Node.js, you'll want to specify
+the `'binary'` encoding in Node.js.
+
+#### Options
+
+`contentDisposition` accepts these properties in the options object.
+
+##### fallback
+
+If the `filename` option is outside ISO-8859-1, then the file name is actually
+stored in a supplemental field for clients that support Unicode file names and
+a ISO-8859-1 version of the file name is automatically generated.
+
+This specifies the ISO-8859-1 file name to override the automatic generation or
+disables the generation all together, defaults to `true`.
+
+ - A string will specify the ISO-8859-1 file name to use in place of automatic
+ generation.
+ - `false` will disable including a ISO-8859-1 file name and only include the
+ Unicode version (unless the file name is already ISO-8859-1).
+ - `true` will enable automatic generation if the file name is outside ISO-8859-1.
+
+If the `filename` option is ISO-8859-1 and this option is specified and has a
+different value, then the `filename` option is encoded in the extended field
+and this set as the fallback field, even though they are both ISO-8859-1.
+
+##### type
+
+Specifies the disposition type, defaults to `"attachment"`. This can also be
+`"inline"`, or any other value (all values except inline are treated like
+`attachment`, but can convey additional information if both parties agree to
+it). The type is normalized to lower-case.
+
+### contentDisposition.parse(string)
+
+```js
+var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt"');
+```
+
+Parse a `Content-Disposition` header string. This automatically handles extended
+("Unicode") parameters by decoding them and providing them under the standard
+parameter name. This will return an object with the following properties (examples
+are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`):
+
+ - `type`: The disposition type (always lower case). Example: `'attachment'`
+
+ - `parameters`: An object of the parameters in the disposition (name of parameter
+ always lower case and extended versions replace non-extended versions). Example:
+ `{filename: "€ rates.txt"}`
+
+## Examples
+
+### Send a file for download
+
+```js
+var contentDisposition = require('content-disposition')
+var destroy = require('destroy')
+var http = require('http')
+var onFinished = require('on-finished')
+
+var filePath = '/path/to/public/plans.pdf'
+
+http.createServer(function onRequest(req, res) {
+ // set headers
+ res.setHeader('Content-Type', 'application/pdf')
+ res.setHeader('Content-Disposition', contentDisposition(filePath))
+
+ // send file
+ var stream = fs.createReadStream(filePath)
+ stream.pipe(res)
+ onFinished(res, function (err) {
+ destroy(stream)
+ })
+})
+```
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## References
+
+- [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1][rfc-2616]
+- [RFC 5987: Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters][rfc-5987]
+- [RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)][rfc-6266]
+- [Test Cases for HTTP Content-Disposition header field (RFC 6266) and the Encodings defined in RFCs 2047, 2231 and 5987][tc-2231]
+
+[rfc-2616]: https://tools.ietf.org/html/rfc2616
+[rfc-5987]: https://tools.ietf.org/html/rfc5987
+[rfc-6266]: https://tools.ietf.org/html/rfc6266
+[tc-2231]: http://greenbytes.de/tech/tc2231/
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/content-disposition.svg?style=flat
+[npm-url]: https://npmjs.org/package/content-disposition
+[node-version-image]: https://img.shields.io/node/v/content-disposition.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/content-disposition.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/content-disposition
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg?style=flat
+[downloads-url]: https://npmjs.org/package/content-disposition
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/index.js
new file mode 100644
index 0000000..fa3bc74
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/index.js
@@ -0,0 +1,443 @@
+/*!
+ * content-disposition
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = contentDisposition
+module.exports.parse = parse
+
+/**
+ * Module dependencies.
+ */
+
+var basename = require('path').basename
+
+/**
+ * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%")
+ */
+
+var encodeUriAttrCharRegExp = /[\x00-\x20"'\(\)*,\/:;<=>?@\[\\\]\{\}\x7f]/g
+
+/**
+ * RegExp to match percent encoding escape.
+ */
+
+var hexEscapeRegExp = /%[0-9A-Fa-f]{2}/
+var hexEscapeReplaceRegExp = /%([0-9A-Fa-f]{2})/g
+
+/**
+ * RegExp to match non-latin1 characters.
+ */
+
+var nonLatin1RegExp = /[^\x20-\x7e\xa0-\xff]/g
+
+/**
+ * RegExp to match quoted-pair in RFC 2616
+ *
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ */
+
+var qescRegExp = /\\([\u0000-\u007f])/g;
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 2616
+ */
+
+var quoteRegExp = /([\\"])/g
+
+/**
+ * RegExp for various RFC 2616 grammar
+ *
+ * parameter = token "=" ( token | quoted-string )
+ * token = 1*<any CHAR except CTLs or separators>
+ * separators = "(" | ")" | "<" | ">" | "@"
+ * | "," | ";" | ":" | "\" | <">
+ * | "/" | "[" | "]" | "?" | "="
+ * | "{" | "}" | SP | HT
+ * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
+ * qdtext = <any TEXT except <">>
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ * TEXT = <any OCTET except CTLs, but including LWS>
+ * LWS = [CRLF] 1*( SP | HT )
+ * CRLF = CR LF
+ * CR = <US-ASCII CR, carriage return (13)>
+ * LF = <US-ASCII LF, linefeed (10)>
+ * SP = <US-ASCII SP, space (32)>
+ * HT = <US-ASCII HT, horizontal-tab (9)>
+ * CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
+ * OCTET = <any 8-bit sequence of data>
+ */
+
+var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g
+var textRegExp = /^[\x20-\x7e\x80-\xff]+$/
+var tokenRegExp = /^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/
+
+/**
+ * RegExp for various RFC 5987 grammar
+ *
+ * ext-value = charset "'" [ language ] "'" value-chars
+ * charset = "UTF-8" / "ISO-8859-1" / mime-charset
+ * mime-charset = 1*mime-charsetc
+ * mime-charsetc = ALPHA / DIGIT
+ * / "!" / "#" / "$" / "%" / "&"
+ * / "+" / "-" / "^" / "_" / "`"
+ * / "{" / "}" / "~"
+ * language = ( 2*3ALPHA [ extlang ] )
+ * / 4ALPHA
+ * / 5*8ALPHA
+ * extlang = *3( "-" 3ALPHA )
+ * value-chars = *( pct-encoded / attr-char )
+ * pct-encoded = "%" HEXDIG HEXDIG
+ * attr-char = ALPHA / DIGIT
+ * / "!" / "#" / "$" / "&" / "+" / "-" / "."
+ * / "^" / "_" / "`" / "|" / "~"
+ */
+
+var extValueRegExp = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+\-\.^_`|~])+)$/
+
+/**
+ * RegExp for various RFC 6266 grammar
+ *
+ * disposition-type = "inline" | "attachment" | disp-ext-type
+ * disp-ext-type = token
+ * disposition-parm = filename-parm | disp-ext-parm
+ * filename-parm = "filename" "=" value
+ * | "filename*" "=" ext-value
+ * disp-ext-parm = token "=" value
+ * | ext-token "=" ext-value
+ * ext-token = <the characters in token, followed by "*">
+ */
+
+var dispositionTypeRegExp = /^([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *(?:$|;)/
+
+/**
+ * Create an attachment Content-Disposition header.
+ *
+ * @param {string} [filename]
+ * @param {object} [options]
+ * @param {string} [options.type=attachment]
+ * @param {string|boolean} [options.fallback=true]
+ * @return {string}
+ * @api public
+ */
+
+function contentDisposition(filename, options) {
+ var opts = options || {}
+
+ // get type
+ var type = opts.type || 'attachment'
+
+ // get parameters
+ var params = createparams(filename, opts.fallback)
+
+ // format into string
+ return format(new ContentDisposition(type, params))
+}
+
+/**
+ * Create parameters object from filename and fallback.
+ *
+ * @param {string} [filename]
+ * @param {string|boolean} [fallback=true]
+ * @return {object}
+ * @api private
+ */
+
+function createparams(filename, fallback) {
+ if (filename === undefined) {
+ return
+ }
+
+ var params = {}
+
+ if (typeof filename !== 'string') {
+ throw new TypeError('filename must be a string')
+ }
+
+ // fallback defaults to true
+ if (fallback === undefined) {
+ fallback = true
+ }
+
+ if (typeof fallback !== 'string' && typeof fallback !== 'boolean') {
+ throw new TypeError('fallback must be a string or boolean')
+ }
+
+ if (typeof fallback === 'string' && nonLatin1RegExp.test(fallback)) {
+ throw new TypeError('fallback must be ISO-8859-1 string')
+ }
+
+ // restrict to file base name
+ var name = basename(filename)
+
+ // determine if name is suitable for quoted string
+ var isQuotedString = textRegExp.test(name)
+
+ // generate fallback name
+ var fallbackName = typeof fallback !== 'string'
+ ? fallback && getlatin1(name)
+ : basename(fallback)
+ var hasFallback = typeof fallbackName === 'string' && fallbackName !== name
+
+ // set extended filename parameter
+ if (hasFallback || !isQuotedString || hexEscapeRegExp.test(name)) {
+ params['filename*'] = name
+ }
+
+ // set filename parameter
+ if (isQuotedString || hasFallback) {
+ params.filename = hasFallback
+ ? fallbackName
+ : name
+ }
+
+ return params
+}
+
+/**
+ * Format object to Content-Disposition header.
+ *
+ * @param {object} obj
+ * @param {string} obj.type
+ * @param {object} [obj.parameters]
+ * @return {string}
+ * @api private
+ */
+
+function format(obj) {
+ var parameters = obj.parameters
+ var type = obj.type
+
+ if (!type || typeof type !== 'string' || !tokenRegExp.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ // start with normalized type
+ var string = String(type).toLowerCase()
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ var val = param.substr(-1) === '*'
+ ? ustring(parameters[param])
+ : qstring(parameters[param])
+
+ string += '; ' + param + '=' + val
+ }
+ }
+
+ return string
+}
+
+/**
+ * Decode a RFC 6987 field value (gracefully).
+ *
+ * @param {string} str
+ * @return {string}
+ * @api private
+ */
+
+function decodefield(str) {
+ var match = extValueRegExp.exec(str)
+
+ if (!match) {
+ throw new TypeError('invalid extended field value')
+ }
+
+ var charset = match[1].toLowerCase()
+ var encoded = match[2]
+ var value
+
+ // to binary string
+ var binary = encoded.replace(hexEscapeReplaceRegExp, pdecode)
+
+ switch (charset) {
+ case 'iso-8859-1':
+ value = getlatin1(binary)
+ break
+ case 'utf-8':
+ value = new Buffer(binary, 'binary').toString('utf8')
+ break
+ default:
+ throw new TypeError('unsupported charset in extended field')
+ }
+
+ return value
+}
+
+/**
+ * Get ISO-8859-1 version of string.
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function getlatin1(val) {
+ // simple Unicode -> ISO-8859-1 transformation
+ return String(val).replace(nonLatin1RegExp, '?')
+}
+
+/**
+ * Parse Content-Disposition header string.
+ *
+ * @param {string} string
+ * @return {object}
+ * @api private
+ */
+
+function parse(string) {
+ if (!string || typeof string !== 'string') {
+ throw new TypeError('argument string is required')
+ }
+
+ var match = dispositionTypeRegExp.exec(string)
+
+ if (!match) {
+ throw new TypeError('invalid type format')
+ }
+
+ // normalize type
+ var index = match[0].length
+ var type = match[1].toLowerCase()
+
+ var key
+ var names = []
+ var params = {}
+ var value
+
+ // calculate index to start at
+ index = paramRegExp.lastIndex = match[0].substr(-1) === ';'
+ ? index - 1
+ : index
+
+ // match parameters
+ while (match = paramRegExp.exec(string)) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (names.indexOf(key) !== -1) {
+ throw new TypeError('invalid duplicate parameter')
+ }
+
+ names.push(key)
+
+ if (key.indexOf('*') + 1 === key.length) {
+ // decode extended value
+ key = key.slice(0, -1)
+ value = decodefield(value)
+
+ // overwrite existing value
+ params[key] = value
+ continue
+ }
+
+ if (typeof params[key] === 'string') {
+ continue
+ }
+
+ if (value[0] === '"') {
+ // remove quotes and escapes
+ value = value
+ .substr(1, value.length - 2)
+ .replace(qescRegExp, '$1')
+ }
+
+ params[key] = value
+ }
+
+ if (index !== -1 && index !== string.length) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ return new ContentDisposition(type, params)
+}
+
+/**
+ * Percent decode a single character.
+ *
+ * @param {string} str
+ * @param {string} hex
+ * @return {string}
+ * @api private
+ */
+
+function pdecode(str, hex) {
+ return String.fromCharCode(parseInt(hex, 16))
+}
+
+/**
+ * Percent encode a single character.
+ *
+ * @param {string} char
+ * @return {string}
+ * @api private
+ */
+
+function pencode(char) {
+ var hex = String(char)
+ .charCodeAt(0)
+ .toString(16)
+ .toUpperCase()
+ return hex.length === 1
+ ? '%0' + hex
+ : '%' + hex
+}
+
+/**
+ * Quote a string for HTTP.
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function qstring(val) {
+ var str = String(val)
+
+ return '"' + str.replace(quoteRegExp, '\\$1') + '"'
+}
+
+/**
+ * Encode a Unicode string for HTTP (RFC 5987).
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function ustring(val) {
+ var str = String(val)
+
+ // percent encode as UTF-8
+ var encoded = encodeURIComponent(str)
+ .replace(encodeUriAttrCharRegExp, pencode)
+
+ return 'UTF-8\'\'' + encoded
+}
+
+/**
+ * Class for parsed Content-Disposition header for v8 optimization
+ */
+
+function ContentDisposition(type, parameters) {
+ this.type = type
+ this.parameters = parameters
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/package.json
new file mode 100644
index 0000000..eb33aec
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/content-disposition/package.json
@@ -0,0 +1,65 @@
+{
+ "name": "content-disposition",
+ "description": "Create and parse Content-Disposition header",
+ "version": "0.5.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "content-disposition",
+ "http",
+ "rfc6266",
+ "res"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/content-disposition"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "f3c915f0c9d9f5ec79713dba24c8c6181b73305d",
+ "bugs": {
+ "url": "https://github.com/jshttp/content-disposition/issues"
+ },
+ "homepage": "https://github.com/jshttp/content-disposition",
+ "_id": "content-disposition@0.5.0",
+ "_shasum": "4284fe6ae0630874639e44e80a418c2934135e9e",
+ "_from": "content-disposition@0.5.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "4284fe6ae0630874639e44e80a418c2934135e9e",
+ "tarball": "http://registry.npmjs.org/content-disposition/-/content-disposition-0.5.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.0.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/.npmignore b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/.npmignore
new file mode 100644
index 0000000..f1250e5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/.npmignore
@@ -0,0 +1,4 @@
+support
+test
+examples
+*.sock
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/History.md b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/History.md
new file mode 100644
index 0000000..2bbc4b3
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/History.md
@@ -0,0 +1,27 @@
+1.0.4 / 2014-06-25
+==================
+
+ * corrected avoidance of timing attacks (thanks @tenbits!)
+
+
+1.0.3 / 2014-01-28
+==================
+
+ * [incorrect] fix for timing attacks
+
+1.0.2 / 2014-01-28
+==================
+
+ * fix missing repository warning
+ * fix typo in test
+
+1.0.1 / 2013-04-15
+==================
+
+ * Revert "Changed underlying HMAC algo. to sha512."
+ * Revert "Fix for timing attacks on MAC verification."
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/Makefile b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/Makefile
new file mode 100644
index 0000000..4e9c8d3
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/Makefile
@@ -0,0 +1,7 @@
+
+test:
+ @./node_modules/.bin/mocha \
+ --require should \
+ --reporter spec
+
+.PHONY: test
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/Readme.md b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/Readme.md
new file mode 100644
index 0000000..2559e84
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/Readme.md
@@ -0,0 +1,42 @@
+
+# cookie-signature
+
+ Sign and unsign cookies.
+
+## Example
+
+```js
+var cookie = require('cookie-signature');
+
+var val = cookie.sign('hello', 'tobiiscool');
+val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');
+
+var val = cookie.sign('hello', 'tobiiscool');
+cookie.unsign(val, 'tobiiscool').should.equal('hello');
+cookie.unsign(val, 'luna').should.be.false;
+```
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2012 LearnBoost <tj@learnboost.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/index.js
new file mode 100644
index 0000000..b63bf84
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/index.js
@@ -0,0 +1,51 @@
+/**
+ * Module dependencies.
+ */
+
+var crypto = require('crypto');
+
+/**
+ * Sign the given `val` with `secret`.
+ *
+ * @param {String} val
+ * @param {String} secret
+ * @return {String}
+ * @api private
+ */
+
+exports.sign = function(val, secret){
+ if ('string' != typeof val) throw new TypeError('cookie required');
+ if ('string' != typeof secret) throw new TypeError('secret required');
+ return val + '.' + crypto
+ .createHmac('sha256', secret)
+ .update(val)
+ .digest('base64')
+ .replace(/\=+$/, '');
+};
+
+/**
+ * Unsign and decode the given `val` with `secret`,
+ * returning `false` if the signature is invalid.
+ *
+ * @param {String} val
+ * @param {String} secret
+ * @return {String|Boolean}
+ * @api private
+ */
+
+exports.unsign = function(val, secret){
+ if ('string' != typeof val) throw new TypeError('cookie required');
+ if ('string' != typeof secret) throw new TypeError('secret required');
+ var str = val.slice(0, val.lastIndexOf('.'))
+ , mac = exports.sign(str, secret);
+
+ return sha1(mac) == sha1(val) ? str : false;
+};
+
+/**
+ * Private
+ */
+
+function sha1(str){
+ return crypto.createHash('sha1').update(str).digest('hex');
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/package.json
new file mode 100644
index 0000000..ac74d61
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie-signature/package.json
@@ -0,0 +1,55 @@
+{
+ "name": "cookie-signature",
+ "version": "1.0.5",
+ "description": "Sign and unsign cookies",
+ "keywords": [
+ "cookie",
+ "sign",
+ "unsign"
+ ],
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@learnboost.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/visionmedia/node-cookie-signature.git"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "mocha": "*",
+ "should": "*"
+ },
+ "main": "index",
+ "gitHead": "73ed69b511b3ef47555d71b4ed1deea9e5ed6e1f",
+ "bugs": {
+ "url": "https://github.com/visionmedia/node-cookie-signature/issues"
+ },
+ "homepage": "https://github.com/visionmedia/node-cookie-signature",
+ "_id": "cookie-signature@1.0.5",
+ "scripts": {},
+ "_shasum": "a122e3f1503eca0f5355795b0711bb2368d450f9",
+ "_from": "cookie-signature@1.0.5",
+ "_npmVersion": "1.4.20",
+ "_npmUser": {
+ "name": "natevw",
+ "email": "natevw@yahoo.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "natevw",
+ "email": "natevw@yahoo.com"
+ }
+ ],
+ "dist": {
+ "shasum": "a122e3f1503eca0f5355795b0711bb2368d450f9",
+ "tarball": "http://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.5.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.5.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/.npmignore b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/.npmignore
new file mode 100644
index 0000000..efab07f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/.npmignore
@@ -0,0 +1,2 @@
+test
+.travis.yml
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/LICENSE
new file mode 100644
index 0000000..249d9de
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/LICENSE
@@ -0,0 +1,9 @@
+// MIT License
+
+Copyright (C) Roman Shtylman <shtylman@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/README.md
new file mode 100644
index 0000000..3170b4b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/README.md
@@ -0,0 +1,44 @@
+# cookie [![Build Status](https://secure.travis-ci.org/defunctzombie/node-cookie.png?branch=master)](http://travis-ci.org/defunctzombie/node-cookie) #
+
+cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers.
+
+See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies.
+
+## how?
+
+```
+npm install cookie
+```
+
+```javascript
+var cookie = require('cookie');
+
+var hdr = cookie.serialize('foo', 'bar');
+// hdr = 'foo=bar';
+
+var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff');
+// cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' };
+```
+
+## more
+
+The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values.
+
+### path
+> cookie path
+
+### expires
+> absolute expiration date for the cookie (Date object)
+
+### maxAge
+> relative max age of the cookie from when the client receives it (seconds)
+
+### domain
+> domain for the cookie
+
+### secure
+> true or false
+
+### httpOnly
+> true or false
+
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/index.js
new file mode 100644
index 0000000..00d54a7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/index.js
@@ -0,0 +1,75 @@
+
+/// Serialize the a name value pair into a cookie string suitable for
+/// http headers. An optional options object specified cookie parameters
+///
+/// serialize('foo', 'bar', { httpOnly: true })
+/// => "foo=bar; httpOnly"
+///
+/// @param {String} name
+/// @param {String} val
+/// @param {Object} options
+/// @return {String}
+var serialize = function(name, val, opt){
+ opt = opt || {};
+ var enc = opt.encode || encode;
+ var pairs = [name + '=' + enc(val)];
+
+ if (null != opt.maxAge) {
+ var maxAge = opt.maxAge - 0;
+ if (isNaN(maxAge)) throw new Error('maxAge should be a Number');
+ pairs.push('Max-Age=' + maxAge);
+ }
+
+ if (opt.domain) pairs.push('Domain=' + opt.domain);
+ if (opt.path) pairs.push('Path=' + opt.path);
+ if (opt.expires) pairs.push('Expires=' + opt.expires.toUTCString());
+ if (opt.httpOnly) pairs.push('HttpOnly');
+ if (opt.secure) pairs.push('Secure');
+
+ return pairs.join('; ');
+};
+
+/// Parse the given cookie header string into an object
+/// The object has the various cookies as keys(names) => values
+/// @param {String} str
+/// @return {Object}
+var parse = function(str, opt) {
+ opt = opt || {};
+ var obj = {}
+ var pairs = str.split(/; */);
+ var dec = opt.decode || decode;
+
+ pairs.forEach(function(pair) {
+ var eq_idx = pair.indexOf('=')
+
+ // skip things that don't look like key=value
+ if (eq_idx < 0) {
+ return;
+ }
+
+ var key = pair.substr(0, eq_idx).trim()
+ var val = pair.substr(++eq_idx, pair.length).trim();
+
+ // quoted values
+ if ('"' == val[0]) {
+ val = val.slice(1, -1);
+ }
+
+ // only assign once
+ if (undefined == obj[key]) {
+ try {
+ obj[key] = dec(val);
+ } catch (e) {
+ obj[key] = val;
+ }
+ }
+ });
+
+ return obj;
+};
+
+var encode = encodeURIComponent;
+var decode = decodeURIComponent;
+
+module.exports.serialize = serialize;
+module.exports.parse = parse;
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/package.json
new file mode 100644
index 0000000..7dbb395
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/cookie/package.json
@@ -0,0 +1,54 @@
+{
+ "author": {
+ "name": "Roman Shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ "name": "cookie",
+ "description": "cookie parsing and serialization",
+ "version": "0.1.2",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/shtylman/node-cookie.git"
+ },
+ "keywords": [
+ "cookie",
+ "cookies"
+ ],
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "mocha": "1.x.x"
+ },
+ "optionalDependencies": {},
+ "engines": {
+ "node": "*"
+ },
+ "bugs": {
+ "url": "https://github.com/shtylman/node-cookie/issues"
+ },
+ "homepage": "https://github.com/shtylman/node-cookie",
+ "_id": "cookie@0.1.2",
+ "dist": {
+ "shasum": "72fec3d24e48a3432073d90c12642005061004b1",
+ "tarball": "http://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz"
+ },
+ "_from": "cookie@0.1.2",
+ "_npmVersion": "1.4.6",
+ "_npmUser": {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_shasum": "72fec3d24e48a3432073d90c12642005061004b1",
+ "_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/depd/History.md b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/History.md
new file mode 100644
index 0000000..bdbcf58
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/History.md
@@ -0,0 +1,67 @@
+1.0.0 / 2014-09-17
+==================
+
+ * No changes
+
+0.4.5 / 2014-09-09
+==================
+
+ * Improve call speed to functions using the function wrapper
+ * Support Node.js 0.6
+
+0.4.4 / 2014-07-27
+==================
+
+ * Work-around v8 generating empty stack traces
+
+0.4.3 / 2014-07-26
+==================
+
+ * Fix exception when global `Error.stackTraceLimit` is too low
+
+0.4.2 / 2014-07-19
+==================
+
+ * Correct call site for wrapped functions and properties
+
+0.4.1 / 2014-07-19
+==================
+
+ * Improve automatic message generation for function properties
+
+0.4.0 / 2014-07-19
+==================
+
+ * Add `TRACE_DEPRECATION` environment variable
+ * Remove non-standard grey color from color output
+ * Support `--no-deprecation` argument
+ * Support `--trace-deprecation` argument
+ * Support `deprecate.property(fn, prop, message)`
+
+0.3.0 / 2014-06-16
+==================
+
+ * Add `NO_DEPRECATION` environment variable
+
+0.2.0 / 2014-06-15
+==================
+
+ * Add `deprecate.property(obj, prop, message)`
+ * Remove `supports-color` dependency for node.js 0.8
+
+0.1.0 / 2014-06-15
+==================
+
+ * Add `deprecate.function(fn, message)`
+ * Add `process.on('deprecation', fn)` emitter
+ * Automatically generate message when omitted from `deprecate()`
+
+0.0.1 / 2014-06-15
+==================
+
+ * Fix warning for dynamic calls at singe call site
+
+0.0.0 / 2014-06-15
+==================
+
+ * Initial implementation
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/depd/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/depd/Readme.md b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/Readme.md
new file mode 100644
index 0000000..9fb2737
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/Readme.md
@@ -0,0 +1,271 @@
+# depd
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+Deprecate all the things
+
+> With great modules comes great responsibility; mark things deprecated!
+
+## Install
+
+```sh
+$ npm install depd
+```
+
+## API
+
+```js
+var deprecate = require('depd')('my-module')
+```
+
+This library allows you to display deprecation messages to your users.
+This library goes above and beyond with deprecation warnings by
+introspection of the call stack (but only the bits that it is interested
+in).
+
+Instead of just warning on the first invocation of a deprecated
+function and never again, this module will warn on the first invocation
+of a deprecated function per unique call site, making it ideal to alert
+users of all deprecated uses across the code base, rather than just
+whatever happens to execute first.
+
+The deprecation warnings from this module also include the file and line
+information for the call into the module that the deprecated function was
+in.
+
+**NOTE** this library has a similar interface to the `debug` module, and
+this module uses the calling file to get the boundary for the call stacks,
+so you should always create a new `deprecate` object in each file and not
+within some central file.
+
+### depd(namespace)
+
+Create a new deprecate function that uses the given namespace name in the
+messages and will display the call site prior to the stack entering the
+file this function was called from. It is highly suggested you use the
+name of your module as the namespace.
+
+### deprecate(message)
+
+Call this function from deprecated code to display a deprecation message.
+This message will appear once per unique caller site. Caller site is the
+first call site in the stack in a different file from the caller of this
+function.
+
+If the message is omitted, a message is generated for you based on the site
+of the `deprecate()` call and will display the name of the function called,
+similar to the name displayed in a stack trace.
+
+### deprecate.function(fn, message)
+
+Call this function to wrap a given function in a deprecation message on any
+call to the function. An optional message can be supplied to provide a custom
+message.
+
+### deprecate.property(obj, prop, message)
+
+Call this function to wrap a given property on object in a deprecation message
+on any accessing or setting of the property. An optional message can be supplied
+to provide a custom message.
+
+The method must be called on the object where the property belongs (not
+inherited from the prototype).
+
+If the property is a data descriptor, it will be converted to an accessor
+descriptor in order to display the deprecation message.
+
+### process.on('deprecation', fn)
+
+This module will allow easy capturing of deprecation errors by emitting the
+errors as the type "deprecation" on the global `process`. If there are no
+listeners for this type, the errors are written to STDERR as normal, but if
+there are any listeners, nothing will be written to STDERR and instead only
+emitted. From there, you can write the errors in a different format or to a
+logging source.
+
+The error represents the deprecation and is emitted only once with the same
+rules as writing to STDERR. The error has the following properties:
+
+ - `message` - This is the message given by the library
+ - `name` - This is always `'DeprecationError'`
+ - `namespace` - This is the namespace the deprecation came from
+ - `stack` - This is the stack of the call to the deprecated thing
+
+Example `error.stack` output:
+
+```
+DeprecationError: my-cool-module deprecated oldfunction
+ at Object.<anonymous> ([eval]-wrapper:6:22)
+ at Module._compile (module.js:456:26)
+ at evalScript (node.js:532:25)
+ at startup (node.js:80:7)
+ at node.js:902:3
+```
+
+### process.env.NO_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `NO_DEPRECATION`
+is provided as a quick solution to silencing deprecation warnings from being
+output. The format of this is similar to that of `DEBUG`:
+
+```sh
+$ NO_DEPRECATION=my-module,othermod node app.js
+```
+
+This will suppress deprecations from being output for "my-module" and "othermod".
+The value is a list of comma-separated namespaces. To suppress every warning
+across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--no-deprecation` to the `node` executable will suppress
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not suppress the deperecations given to any "deprecation"
+event listeners, just the output to STDERR.
+
+### process.env.TRACE_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION`
+is provided as a solution to getting more detailed location information in deprecation
+warnings by including the entire stack trace. The format of this is the same as
+`NO_DEPRECATION`:
+
+```sh
+$ TRACE_DEPRECATION=my-module,othermod node app.js
+```
+
+This will include stack traces for deprecations being output for "my-module" and
+"othermod". The value is a list of comma-separated namespaces. To trace every
+warning across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--trace-deprecation` to the `node` executable will trace
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`.
+
+## Display
+
+![message](files/message.png)
+
+When a user calls a function in your library that you mark deprecated, they
+will see the following written to STDERR (in the given colors, similar colors
+and layout to the `debug` module):
+
+```
+bright cyan bright yellow
+| | reset cyan
+| | | |
+▼ ▼ ▼ ▼
+my-cool-module deprecated oldfunction [eval]-wrapper:6:22
+▲ ▲ ▲ ▲
+| | | |
+namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+If the user redirects their STDERR to a file or somewhere that does not support
+colors, they see (similar layout to the `debug` module):
+
+```
+Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22
+▲ ▲ ▲ ▲ ▲
+| | | | |
+timestamp of message namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+## Examples
+
+### Deprecating all calls to a function
+
+This will display a deprecated message about "oldfunction" being deprecated
+from "my-module" on STDERR.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+// message automatically derived from function name
+// Object.oldfunction
+exports.oldfunction = deprecate.function(function oldfunction() {
+ // all calls to function are deprecated
+})
+
+// specific message
+exports.oldfunction = deprecate.function(function () {
+ // all calls to function are deprecated
+}, 'oldfunction')
+```
+
+### Conditionally deprecating a function call
+
+This will display a deprecated message about "weirdfunction" being deprecated
+from "my-module" on STDERR when called with less than 2 arguments.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ }
+}
+```
+
+When calling `deprecate` as a function, the warning is counted per call site
+within your own module, so you can display different deprecations depending
+on different situations and the users will still get all the warnings:
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ } else if (typeof arguments[0] !== 'string') {
+ // calls with non-string first argument are deprecated
+ deprecate('weirdfunction non-string first arg')
+ }
+}
+```
+
+### Deprecating property access
+
+This will display a deprecated message about "oldprop" being deprecated
+from "my-module" on STDERR when accessed. A deprecation will be displayed
+when setting the value and when getting the value.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.oldprop = 'something'
+
+// message automatically derives from property name
+deprecate.property(exports, 'oldprop')
+
+// explicit message
+deprecate.property(exports, 'oldprop', 'oldprop >= 0.10')
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-version-image]: https://img.shields.io/npm/v/depd.svg?style=flat
+[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg?style=flat
+[npm-url]: https://npmjs.org/package/depd
+[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd.svg?style=flat
+[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd
+[coveralls-image]: https://img.shields.io/coveralls/dougwilson/nodejs-depd.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master
+[node-image]: https://img.shields.io/node/v/depd.svg?style=flat
+[node-url]: http://nodejs.org/download/
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat
+[gratipay-url]: https://www.gratipay.com/dougwilson/
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/depd/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/index.js
new file mode 100644
index 0000000..4fee4d9
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/index.js
@@ -0,0 +1,522 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var callSiteToString = require('./lib/compat').callSiteToString
+var EventEmitter = require('events').EventEmitter
+var relative = require('path').relative
+
+/**
+ * Module exports.
+ */
+
+module.exports = depd
+
+/**
+ * Get the path to base files on.
+ */
+
+var basePath = process.cwd()
+
+/**
+ * Get listener count on event emitter.
+ */
+
+/*istanbul ignore next*/
+var eventListenerCount = EventEmitter.listenerCount
+ || function (emitter, type) { return emitter.listeners(type).length }
+
+/**
+ * Determine if namespace is contained in the string.
+ */
+
+function containsNamespace(str, namespace) {
+ var val = str.split(/[ ,]+/)
+
+ namespace = String(namespace).toLowerCase()
+
+ for (var i = 0 ; i < val.length; i++) {
+ if (!(str = val[i])) continue;
+
+ // namespace contained
+ if (str === '*' || str.toLowerCase() === namespace) {
+ return true
+ }
+ }
+
+ return false
+}
+
+/**
+ * Convert a data descriptor to accessor descriptor.
+ */
+
+function convertDataDescriptorToAccessor(obj, prop, message) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+ var value = descriptor.value
+
+ descriptor.get = function getter() { return value }
+
+ if (descriptor.writable) {
+ descriptor.set = function setter(val) { return value = val }
+ }
+
+ delete descriptor.value
+ delete descriptor.writable
+
+ Object.defineProperty(obj, prop, descriptor)
+
+ return descriptor
+}
+
+/**
+ * Create arguments string to keep arity.
+ */
+
+function createArgumentsString(arity) {
+ var str = ''
+
+ for (var i = 0; i < arity; i++) {
+ str += ', arg' + i
+ }
+
+ return str.substr(2)
+}
+
+/**
+ * Create stack string from stack.
+ */
+
+function createStackString(stack) {
+ var str = this.name + ': ' + this.namespace
+
+ if (this.message) {
+ str += ' deprecated ' + this.message
+ }
+
+ for (var i = 0; i < stack.length; i++) {
+ str += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return str
+}
+
+/**
+ * Create deprecate for namespace in caller.
+ */
+
+function depd(namespace) {
+ if (!namespace) {
+ throw new TypeError('argument namespace is required')
+ }
+
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+ var file = site[0]
+
+ function deprecate(message) {
+ // call to self as log
+ log.call(deprecate, message)
+ }
+
+ deprecate._file = file
+ deprecate._ignored = isignored(namespace)
+ deprecate._namespace = namespace
+ deprecate._traced = istraced(namespace)
+ deprecate._warned = Object.create(null)
+
+ deprecate.function = wrapfunction
+ deprecate.property = wrapproperty
+
+ return deprecate
+}
+
+/**
+ * Determine if namespace is ignored.
+ */
+
+function isignored(namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.noDeprecation) {
+ // --no-deprecation support
+ return true
+ }
+
+ var str = process.env.NO_DEPRECATION || ''
+
+ // namespace ignored
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Determine if namespace is traced.
+ */
+
+function istraced(namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.traceDeprecation) {
+ // --trace-deprecation support
+ return true
+ }
+
+ var str = process.env.TRACE_DEPRECATION || ''
+
+ // namespace traced
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Display deprecation message.
+ */
+
+function log(message, site) {
+ var haslisteners = eventListenerCount(process, 'deprecation') !== 0
+
+ // abort early if no destination
+ if (!haslisteners && this._ignored) {
+ return
+ }
+
+ var caller
+ var callFile
+ var callSite
+ var i = 0
+ var seen = false
+ var stack = getStack()
+ var file = this._file
+
+ if (site) {
+ // provided site
+ callSite = callSiteLocation(stack[1])
+ callSite.name = site.name
+ file = callSite[0]
+ } else {
+ // get call site
+ i = 2
+ site = callSiteLocation(stack[i])
+ callSite = site
+ }
+
+ // get caller of deprecated thing in relation to file
+ for (; i < stack.length; i++) {
+ caller = callSiteLocation(stack[i])
+ callFile = caller[0]
+
+ if (callFile === file) {
+ seen = true
+ } else if (callFile === this._file) {
+ file = this._file
+ } else if (seen) {
+ break
+ }
+ }
+
+ var key = caller
+ ? site.join(':') + '__' + caller.join(':')
+ : undefined
+
+ if (key !== undefined && key in this._warned) {
+ // already warned
+ return
+ }
+
+ this._warned[key] = true
+
+ // generate automatic message from call site
+ if (!message) {
+ message = callSite === site || !callSite.name
+ ? defaultMessage(site)
+ : defaultMessage(callSite)
+ }
+
+ // emit deprecation if listeners exist
+ if (haslisteners) {
+ var err = DeprecationError(this._namespace, message, stack.slice(i))
+ process.emit('deprecation', err)
+ return
+ }
+
+ // format and write message
+ var format = process.stderr.isTTY
+ ? formatColor
+ : formatPlain
+ var msg = format.call(this, message, caller, stack.slice(i))
+ process.stderr.write(msg + '\n', 'utf8')
+
+ return
+}
+
+/**
+ * Get call site location as array.
+ */
+
+function callSiteLocation(callSite) {
+ var file = callSite.getFileName() || '<anonymous>'
+ var line = callSite.getLineNumber()
+ var colm = callSite.getColumnNumber()
+
+ if (callSite.isEval()) {
+ file = callSite.getEvalOrigin() + ', ' + file
+ }
+
+ var site = [file, line, colm]
+
+ site.callSite = callSite
+ site.name = callSite.getFunctionName()
+
+ return site
+}
+
+/**
+ * Generate a default message from the site.
+ */
+
+function defaultMessage(site) {
+ var callSite = site.callSite
+ var funcName = site.name
+ var typeName = callSite.getTypeName()
+
+ // make useful anonymous name
+ if (!funcName) {
+ funcName = '<anonymous@' + formatLocation(site) + '>'
+ }
+
+ // make useful type name
+ if (typeName === 'Function') {
+ typeName = callSite.getThis().name || typeName
+ }
+
+ return callSite.getMethodName()
+ ? typeName + '.' + funcName
+ : funcName
+}
+
+/**
+ * Format deprecation message without color.
+ */
+
+function formatPlain(msg, caller, stack) {
+ var timestamp = new Date().toUTCString()
+
+ var formatted = timestamp
+ + ' ' + this._namespace
+ + ' deprecated ' + msg
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' at ' + formatLocation(caller)
+ }
+
+ return formatted
+}
+
+/**
+ * Format deprecation message with color.
+ */
+
+function formatColor(msg, caller, stack) {
+ var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' // bold cyan
+ + ' \x1b[33;1mdeprecated\x1b[22;39m' // bold yellow
+ + ' \x1b[0m' + msg + '\x1b[39m' // reset
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+}
+
+/**
+ * Format call site location.
+ */
+
+function formatLocation(callSite) {
+ return relative(basePath, callSite[0])
+ + ':' + callSite[1]
+ + ':' + callSite[2]
+}
+
+/**
+ * Get the stack as array of call sites.
+ */
+
+function getStack() {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = Math.max(10, limit)
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice this function off the top
+ var stack = obj.stack.slice(1)
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack
+}
+
+/**
+ * Capture call site stack from v8.
+ */
+
+function prepareObjectStackTrace(obj, stack) {
+ return stack
+}
+
+/**
+ * Return a wrapped function in a deprecation message.
+ */
+
+function wrapfunction(fn, message) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('argument fn must be a function')
+ }
+
+ var args = createArgumentsString(fn.length)
+ var deprecate = this
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ site.name = fn.name
+
+ var deprecatedfn = eval('(function (' + args + ') {\n'
+ + '"use strict"\n'
+ + 'log.call(deprecate, message, site)\n'
+ + 'return fn.apply(this, arguments)\n'
+ + '})')
+
+ return deprecatedfn
+}
+
+/**
+ * Wrap property in a deprecation message.
+ */
+
+function wrapproperty(obj, prop, message) {
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
+ throw new TypeError('argument obj must be object')
+ }
+
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+
+ if (!descriptor) {
+ throw new TypeError('must call property on owner object')
+ }
+
+ if (!descriptor.configurable) {
+ throw new TypeError('property must be configurable')
+ }
+
+ var deprecate = this
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ // set site name
+ site.name = prop
+
+ // convert data descriptor
+ if ('value' in descriptor) {
+ descriptor = convertDataDescriptorToAccessor(obj, prop, message)
+ }
+
+ var get = descriptor.get
+ var set = descriptor.set
+
+ // wrap getter
+ if (typeof get === 'function') {
+ descriptor.get = function getter() {
+ log.call(deprecate, message, site)
+ return get.apply(this, arguments)
+ }
+ }
+
+ // wrap setter
+ if (typeof set === 'function') {
+ descriptor.set = function setter() {
+ log.call(deprecate, message, site)
+ return set.apply(this, arguments)
+ }
+ }
+
+ Object.defineProperty(obj, prop, descriptor)
+}
+
+/**
+ * Create DeprecationError for deprecation
+ */
+
+function DeprecationError(namespace, message, stack) {
+ var error = new Error()
+ var stackString
+
+ Object.defineProperty(error, 'constructor', {
+ value: DeprecationError
+ })
+
+ Object.defineProperty(error, 'message', {
+ configurable: true,
+ enumerable: false,
+ value: message,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'name', {
+ enumerable: false,
+ configurable: true,
+ value: 'DeprecationError',
+ writable: true
+ })
+
+ Object.defineProperty(error, 'namespace', {
+ configurable: true,
+ enumerable: false,
+ value: namespace,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'stack', {
+ configurable: true,
+ enumerable: false,
+ get: function () {
+ if (stackString !== undefined) {
+ return stackString
+ }
+
+ // prepare stack trace
+ return stackString = createStackString.call(this, stack)
+ },
+ set: function setter(val) {
+ stackString = val
+ }
+ })
+
+ return error
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js
new file mode 100644
index 0000000..09d9721
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js
@@ -0,0 +1,33 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = bufferConcat
+
+/**
+ * Concatenate an array of Buffers.
+ */
+
+function bufferConcat(bufs) {
+ var length = 0
+
+ for (var i = 0, len = bufs.length; i < len; i++) {
+ length += bufs[i].length
+ }
+
+ var buf = new Buffer(length)
+ var pos = 0
+
+ for (var i = 0, len = bufs.length; i < len; i++) {
+ bufs[i].copy(buf, pos)
+ pos += bufs[i].length
+ }
+
+ return buf
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js
new file mode 100644
index 0000000..17cf7ed
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js
@@ -0,0 +1,101 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = callSiteToString
+
+/**
+ * Format a CallSite file location to a string.
+ */
+
+function callSiteFileLocation(callSite) {
+ var fileName
+ var fileLocation = ''
+
+ if (callSite.isNative()) {
+ fileLocation = 'native'
+ } else if (callSite.isEval()) {
+ fileName = callSite.getScriptNameOrSourceURL()
+ if (!fileName) {
+ fileLocation = callSite.getEvalOrigin()
+ }
+ } else {
+ fileName = callSite.getFileName()
+ }
+
+ if (fileName) {
+ fileLocation += fileName
+
+ var lineNumber = callSite.getLineNumber()
+ if (lineNumber != null) {
+ fileLocation += ':' + lineNumber
+
+ var columnNumber = callSite.getColumnNumber()
+ if (columnNumber) {
+ fileLocation += ':' + columnNumber
+ }
+ }
+ }
+
+ return fileLocation || 'unknown source'
+}
+
+/**
+ * Format a CallSite to a string.
+ */
+
+function callSiteToString(callSite) {
+ var addSuffix = true
+ var fileLocation = callSiteFileLocation(callSite)
+ var functionName = callSite.getFunctionName()
+ var isConstructor = callSite.isConstructor()
+ var isMethodCall = !(callSite.isToplevel() || isConstructor)
+ var line = ''
+
+ if (isMethodCall) {
+ var methodName = callSite.getMethodName()
+ var typeName = getConstructorName(callSite)
+
+ if (functionName) {
+ if (typeName && functionName.indexOf(typeName) !== 0) {
+ line += typeName + '.'
+ }
+
+ line += functionName
+
+ if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) {
+ line += ' [as ' + methodName + ']'
+ }
+ } else {
+ line += typeName + '.' + (methodName || '<anonymous>')
+ }
+ } else if (isConstructor) {
+ line += 'new ' + (functionName || '<anonymous>')
+ } else if (functionName) {
+ line += functionName
+ } else {
+ addSuffix = false
+ line += fileLocation
+ }
+
+ if (addSuffix) {
+ line += ' (' + fileLocation + ')'
+ }
+
+ return line
+}
+
+/**
+ * Get constructor name of reviver.
+ */
+
+function getConstructorName(obj) {
+ var receiver = obj.receiver
+ return (receiver.constructor && receiver.constructor.name) || null
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/depd/lib/compat/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/lib/compat/index.js
new file mode 100644
index 0000000..7fee026
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/lib/compat/index.js
@@ -0,0 +1,69 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+lazyProperty(module.exports, 'bufferConcat', function bufferConcat() {
+ return Buffer.concat || require('./buffer-concat')
+})
+
+lazyProperty(module.exports, 'callSiteToString', function callSiteToString() {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ function prepareObjectStackTrace(obj, stack) {
+ return stack
+ }
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = 2
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice the stack
+ var stack = obj.stack.slice()
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack[0].toString ? toString : require('./callsite-tostring')
+})
+
+/**
+ * Define a lazy property.
+ */
+
+function lazyProperty(obj, prop, getter) {
+ function get() {
+ var val = getter()
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ value: val
+ })
+
+ return val
+ }
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ get: get
+ })
+}
+
+/**
+ * Call toString() on the obj
+ */
+
+function toString(obj) {
+ return obj.toString()
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/depd/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/package.json
new file mode 100644
index 0000000..b72bf60
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/depd/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "depd",
+ "description": "Deprecate all the things",
+ "version": "1.0.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "deprecate",
+ "deprecated"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dougwilson/nodejs-depd"
+ },
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4",
+ "should": "~4.0.4"
+ },
+ "files": [
+ "lib/",
+ "History.md",
+ "LICENSE",
+ "index.js",
+ "Readme.md"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --reporter spec --bail --require should test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --require should test/"
+ },
+ "gitHead": "08b5a2182c8c1fdf7420e4ff8532bfd7e266a7b2",
+ "bugs": {
+ "url": "https://github.com/dougwilson/nodejs-depd/issues"
+ },
+ "homepage": "https://github.com/dougwilson/nodejs-depd",
+ "_id": "depd@1.0.0",
+ "_shasum": "2fda0d00e98aae2845d4991ab1bf1f2a199073d5",
+ "_from": "depd@~1.0.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "2fda0d00e98aae2845d4991ab1bf1f2a199073d5",
+ "tarball": "http://registry.npmjs.org/depd/-/depd-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/depd/-/depd-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/.npmignore b/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/.npmignore
new file mode 100644
index 0000000..48a2e24
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/.npmignore
@@ -0,0 +1,2 @@
+components
+build
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/Makefile b/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/Makefile
new file mode 100644
index 0000000..3f6119d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/Makefile
@@ -0,0 +1,11 @@
+
+build: components index.js
+ @component build
+
+components:
+ @Component install
+
+clean:
+ rm -fr build components template.js
+
+.PHONY: clean
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/Readme.md b/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/Readme.md
new file mode 100644
index 0000000..2cfcc99
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/Readme.md
@@ -0,0 +1,15 @@
+
+# escape-html
+
+ Escape HTML entities
+
+## Example
+
+```js
+var escape = require('escape-html');
+escape(str);
+```
+
+## License
+
+ MIT
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/component.json b/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/component.json
new file mode 100644
index 0000000..cb9740f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/component.json
@@ -0,0 +1,10 @@
+{
+ "name": "escape-html",
+ "description": "Escape HTML entities",
+ "version": "1.0.1",
+ "keywords": ["escape", "html", "utility"],
+ "dependencies": {},
+ "scripts": [
+ "index.js"
+ ]
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/index.js
new file mode 100644
index 0000000..2765211
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/index.js
@@ -0,0 +1,16 @@
+/**
+ * Escape special characters in the given string of html.
+ *
+ * @param {String} html
+ * @return {String}
+ * @api private
+ */
+
+module.exports = function(html) {
+ return String(html)
+ .replace(/&/g, '&')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''')
+ .replace(/</g, '<')
+ .replace(/>/g, '>');
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/package.json
new file mode 100644
index 0000000..fefdb4e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/escape-html/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "escape-html",
+ "description": "Escape HTML entities",
+ "version": "1.0.1",
+ "keywords": [
+ "escape",
+ "html",
+ "utility"
+ ],
+ "dependencies": {},
+ "main": "index.js",
+ "component": {
+ "scripts": {
+ "escape-html/index.js": "index.js"
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/component/escape-html.git"
+ },
+ "bugs": {
+ "url": "https://github.com/component/escape-html/issues"
+ },
+ "homepage": "https://github.com/component/escape-html",
+ "_id": "escape-html@1.0.1",
+ "dist": {
+ "shasum": "181a286ead397a39a92857cfb1d43052e356bff0",
+ "tarball": "http://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz"
+ },
+ "_from": "escape-html@1.0.1",
+ "_npmVersion": "1.3.15",
+ "_npmUser": {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ }
+ ],
+ "directories": {},
+ "_shasum": "181a286ead397a39a92857cfb1d43052e356bff0",
+ "_resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/HISTORY.md
new file mode 100644
index 0000000..10cf504
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/HISTORY.md
@@ -0,0 +1,55 @@
+1.5.1 / 2014-11-19
+==================
+
+ * deps: crc@3.2.1
+ - Minor fixes
+
+1.5.0 / 2014-10-14
+==================
+
+ * Improve string performance
+ * Slightly improve speed for weak ETags over 1KB
+
+1.4.0 / 2014-09-21
+==================
+
+ * Support "fake" stats objects
+ * Support Node.js 0.6
+
+1.3.1 / 2014-09-14
+==================
+
+ * Use the (new and improved) `crc` for crc32
+
+1.3.0 / 2014-08-29
+==================
+
+ * Default strings to strong ETags
+ * Improve speed for weak ETags over 1KB
+
+1.2.1 / 2014-08-29
+==================
+
+ * Use the (much faster) `buffer-crc32` for crc32
+
+1.2.0 / 2014-08-24
+==================
+
+ * Add support for file stat objects
+
+1.1.0 / 2014-08-24
+==================
+
+ * Add fast-path for empty entity
+ * Add weak ETag generation
+ * Shrink size of generated ETags
+
+1.0.1 / 2014-08-24
+==================
+
+ * Fix behavior of string containing Unicode
+
+1.0.0 / 2014-05-18
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/README.md
new file mode 100644
index 0000000..68c16d5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/README.md
@@ -0,0 +1,141 @@
+# etag
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create simple ETags
+
+## Installation
+
+```sh
+$ npm install etag
+```
+
+## API
+
+```js
+var etag = require('etag')
+```
+
+### etag(entity, [options])
+
+Generate a strong ETag for the given entity. This should be the complete
+body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By
+default, a strong ETag is generated except for `fs.Stats`, which will
+generate a weak ETag (this can be overwritten by `options.weak`).
+
+```js
+res.setHeader('ETag', etag(body))
+```
+
+#### Options
+
+`etag` accepts these properties in the options object.
+
+##### weak
+
+Specifies if a "strong" or a "weak" ETag will be generated. The ETag can only
+really be a strong as the given input.
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## Benchmark
+
+```bash
+$ npm run-script bench
+
+> etag@1.5.1 bench nodejs-etag
+> node benchmark/index.js
+
+> node benchmark/body0-100b.js
+
+ 100B body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 425,007 ops/sec ±1.47% (184 runs sampled)
+* buffer - weak x 1,009,859 ops/sec ±0.18% (197 runs sampled)
+ string - strong x 442,096 ops/sec ±1.20% (181 runs sampled)
+ string - weak x 325,063 ops/sec ±0.31% (192 runs sampled)
+
+> node benchmark/body1-1kb.js
+
+ 1KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 263,069 ops/sec ±1.60% (190 runs sampled)
+* buffer - weak x 295,732 ops/sec ±0.43% (199 runs sampled)
+ string - strong x 274,822 ops/sec ±1.15% (191 runs sampled)
+ string - weak x 169,473 ops/sec ±1.59% (194 runs sampled)
+
+> node benchmark/body2-5kb.js
+
+ 5KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 104,299 ops/sec ±0.60% (193 runs sampled)
+* buffer - weak x 108,126 ops/sec ±0.65% (196 runs sampled)
+ string - strong x 101,736 ops/sec ±0.78% (194 runs sampled)
+ string - weak x 101,266 ops/sec ±0.85% (192 runs sampled)
+
+> node benchmark/body3-10kb.js
+
+ 10KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 59,007 ops/sec ±0.29% (198 runs sampled)
+* buffer - weak x 60,968 ops/sec ±0.48% (197 runs sampled)
+ string - strong x 51,873 ops/sec ±1.78% (178 runs sampled)
+ string - weak x 52,307 ops/sec ±2.63% (193 runs sampled)
+
+> node benchmark/body4-100kb.js
+
+ 100KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 6,712 ops/sec ±0.11% (198 runs sampled)
+* buffer - weak x 6,716 ops/sec ±0.50% (196 runs sampled)
+ string - strong x 6,397 ops/sec ±0.36% (196 runs sampled)
+ string - weak x 6,635 ops/sec ±0.15% (198 runs sampled)
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/etag.svg?style=flat
+[npm-url]: https://npmjs.org/package/etag
+[node-version-image]: https://img.shields.io/node/v/etag.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/etag.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/etag
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/etag.svg?style=flat
+[downloads-url]: https://npmjs.org/package/etag
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/index.js
new file mode 100644
index 0000000..bb05eb7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/index.js
@@ -0,0 +1,171 @@
+/*!
+ * etag
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = etag
+
+/**
+ * Module dependencies.
+ */
+
+var crc = require('crc').crc32
+var crypto = require('crypto')
+var Stats = require('fs').Stats
+
+/**
+ * Module variables.
+ */
+
+var crc32threshold = 1000 // 1KB
+var NULL = new Buffer([0])
+var toString = Object.prototype.toString
+
+/**
+ * Create a simple ETag.
+ *
+ * @param {string|Buffer|Stats} entity
+ * @param {object} [options]
+ * @param {boolean} [options.weak]
+ * @return {String}
+ * @api public
+ */
+
+function etag(entity, options) {
+ if (entity == null) {
+ throw new TypeError('argument entity is required')
+ }
+
+ var isStats = isstats(entity)
+ var weak = options && typeof options.weak === 'boolean'
+ ? options.weak
+ : isStats
+
+ // support fs.Stats object
+ if (isStats) {
+ return stattag(entity, weak)
+ }
+
+ if (typeof entity !== 'string' && !Buffer.isBuffer(entity)) {
+ throw new TypeError('argument entity must be string, Buffer, or fs.Stats')
+ }
+
+ var hash = weak
+ ? weakhash(entity)
+ : stronghash(entity)
+
+ return weak
+ ? 'W/"' + hash + '"'
+ : '"' + hash + '"'
+}
+
+/**
+ * Determine if object is a Stats object.
+ *
+ * @param {object} obj
+ * @return {boolean}
+ * @api private
+ */
+
+function isstats(obj) {
+ // not even an object
+ if (obj === null || typeof obj !== 'object') {
+ return false
+ }
+
+ // genuine fs.Stats
+ if (obj instanceof Stats) {
+ return true
+ }
+
+ // quack quack
+ return 'atime' in obj && toString.call(obj.atime) === '[object Date]'
+ && 'ctime' in obj && toString.call(obj.ctime) === '[object Date]'
+ && 'mtime' in obj && toString.call(obj.mtime) === '[object Date]'
+ && 'ino' in obj && typeof obj.ino === 'number'
+ && 'size' in obj && typeof obj.size === 'number'
+}
+
+/**
+ * Generate a tag for a stat.
+ *
+ * @param {Buffer} entity
+ * @return {String}
+ * @api private
+ */
+
+function stattag(stat, weak) {
+ var mtime = stat.mtime.toISOString()
+ var size = stat.size.toString(16)
+
+ if (weak) {
+ return 'W/"' + size + '-' + crc(mtime) + '"'
+ }
+
+ var hash = crypto
+ .createHash('md5')
+ .update('file', 'utf8')
+ .update(NULL)
+ .update(size, 'utf8')
+ .update(NULL)
+ .update(mtime, 'utf8')
+ .digest('base64')
+
+ return '"' + hash + '"'
+}
+
+/**
+ * Generate a strong hash.
+ *
+ * @param {Buffer} entity
+ * @return {String}
+ * @api private
+ */
+
+function stronghash(entity) {
+ if (entity.length === 0) {
+ // fast-path empty
+ return '1B2M2Y8AsgTpgAmY7PhCfg=='
+ }
+
+ return crypto
+ .createHash('md5')
+ .update(entity, 'utf8')
+ .digest('base64')
+}
+
+/**
+ * Generate a weak hash.
+ *
+ * @param {Buffer} entity
+ * @return {String}
+ * @api private
+ */
+
+function weakhash(entity) {
+ if (entity.length === 0) {
+ // fast-path empty
+ return '0-0'
+ }
+
+ var len = typeof entity === 'string'
+ ? Buffer.byteLength(entity, 'utf8')
+ : entity.length
+
+ if (len <= crc32threshold) {
+ // crc32 plus length when it's fast
+ // crc(str) only accepts utf-8 encoding
+ return len.toString(16) + '-' + crc(entity).toString(16)
+ }
+
+ // use md4 for long strings
+ return crypto
+ .createHash('md4')
+ .update(entity, 'utf8')
+ .digest('base64')
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/.npmignore b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/.npmignore
new file mode 100644
index 0000000..57d4cb8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/.npmignore
@@ -0,0 +1,5 @@
+benchmark
+src
+test
+.travis.yml
+bitcoin.png
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/LICENSE
new file mode 100644
index 0000000..c49097c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright 2014 Alex Gorbatchev
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/README.md
new file mode 100644
index 0000000..6473cbd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/README.md
@@ -0,0 +1,98 @@
+# crc
+
+[![GitTip](http://img.shields.io/gittip/alexgorbatchev.svg?style=flat)](https://www.gittip.com/alexgorbatchev/)
+[![Dependency status](http://img.shields.io/david/alexgorbatchev/node-crc.svg?style=flat)](https://david-dm.org/alexgorbatchev/node-crc)
+[![devDependency Status](http://img.shields.io/david/dev/alexgorbatchev/node-crc.svg?style=flat)](https://david-dm.org/alexgorbatchev/node-crc#info=devDependencies)
+[![Build Status](http://img.shields.io/travis/alexgorbatchev/node-crc.svg?style=flat&branch=master)](https://travis-ci.org/alexgorbatchev/node-crc)
+
+[![NPM](https://nodei.co/npm/crc.svg?style=flat)](https://npmjs.org/package/node-crc)
+
+Module for calculating Cyclic Redundancy Check (CRC).
+
+## Features
+
+* Full test suite comparing values against reference `pycrc` implementation.
+* Version 3.x is 3x to 4x faster than version 2.x.
+* Pure JavaScript implementation, no dependencies.
+* Provides CRC Tables for optimized calculations.
+* Provides support for the following CRC algorithms:
+ * CRC1 `crc.crc1(…)`
+ * CRC8 `crc.crc8(…)`
+ * CRC8 1-Wire `crc.crc81wire(…)`
+ * CRC16 `crc.crc16(…)`
+ * CRC16 CCITT `crc.crc16ccitt(…)`
+ * CRC16 Modbus `crc.crc16modbus(…)`
+ * CRC24 `crc.crc24(…)`
+ * CRC32 `crc.crc32(…)`
+
+## IMPORTANT
+
+If you've used `crc` module prior to version 2.x, you might have some inconsistentcies with the current implementation because it relied on very old code and wasn't checked against reference implementation. If you upgrading from 1.x, please take special care.
+
+## Support
+
+<a href="https://blockchain.info/address/1CZyBREeHTmy8C5zVGHZHPwqBuWFmEuUCQ"><img src="bitcoin.png" width="150" align="right"/></a> Please support me on [GitTip](https://www.gittip.com/alexgorbatchev/). I've spend days developing and grooming this module and hope to spend more time. If you have bitcoin, please use the QR code or this wallet address [`1CZyBREeHTmy8C5zVGHZHPwqBuWFmEuUCQ`](https://blockchain.info/address/1CZyBREeHTmy8C5zVGHZHPwqBuWFmEuUCQ):
+
+## Installation
+
+ npm install crc
+
+## Running tests
+
+ $ npm install
+ $ npm test
+
+## Usage Example
+
+Calculate a CRC32:
+
+ var crc = require('crc');
+
+ crc.crc32('hello').toString(16);
+ # => "3610a686"
+
+Calculate a CRC32 of a file:
+
+ crc.crc32(fs.readFileSync('README.md', 'utf8')).toString(16);
+ # => "127ad531"
+
+Or using a `Buffer`:
+
+ crc.crc32(fs.readFileSync('README.md')).toString(16);
+ # => "127ad531"
+
+Incrementally calculate a CRC32:
+
+ value = crc32('one');
+ value = crc32('two', value);
+ value = crc32('three', value);
+ value.toString(16);
+ # => "09e1c092"
+
+## Thanks!
+
+[pycrc](http://www.tty1.net/pycrc/) library is which the source of all of the CRC tables.
+
+# License
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Alex Gorbatchev
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc.js b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc.js
new file mode 100644
index 0000000..1c342b7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc.js
@@ -0,0 +1,71 @@
+// Generated by CoffeeScript 1.7.1
+var CRC, hex;
+
+hex = require('./hex');
+
+module.exports = CRC = (function() {
+ CRC.prototype.INIT_CRC = 0x00;
+
+ CRC.prototype.XOR_MASK = 0x00;
+
+ CRC.prototype.WIDTH = 0;
+
+ CRC.prototype.pack = function(crc) {
+ return '';
+ };
+
+ CRC.prototype.each_byte = function(buf, cb) {
+ var i, _i, _ref, _results;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ _results = [];
+ for (i = _i = 0, _ref = buf.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
+ _results.push(cb(buf[i]));
+ }
+ return _results;
+ };
+
+ function CRC() {
+ this.crc = this.INIT_CRC;
+ }
+
+ CRC.prototype.digest_length = function() {
+ return Math.ceil(this.WIDTH / 8.0);
+ };
+
+ CRC.prototype.update = function(data) {};
+
+ CRC.prototype.reset = function() {
+ return this.crc = this.INIT_CRC;
+ };
+
+ CRC.prototype.checksum = function(signed) {
+ var sum;
+ if (signed == null) {
+ signed = true;
+ }
+ sum = this.crc ^ this.XOR_MASK;
+ if (signed) {
+ sum = sum >>> 0;
+ }
+ return sum;
+ };
+
+ CRC.prototype.finish = function() {
+ return this.pack(this.checksum());
+ };
+
+ CRC.prototype.hexdigest = function(value) {
+ var result;
+ if (value != null) {
+ this.update(value);
+ }
+ result = this.finish();
+ this.reset();
+ return result;
+ };
+
+ return CRC;
+
+})();
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc1.js b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc1.js
new file mode 100644
index 0000000..f094567
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc1.js
@@ -0,0 +1,21 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+module.exports = create('crc1', function(buf, previous) {
+ var accum, byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = ~~previous;
+ accum = 0;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ accum += byte;
+ }
+ crc += accum % 256;
+ return crc % 256;
+});
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16.js b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16.js
new file mode 100644
index 0000000..a09cd1e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241, 0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440, 0xcc01, 0x0cc0, 0x0d80, 0xcd41, 0x0f00, 0xcfc1, 0xce81, 0x0e40, 0x0a00, 0xcac1, 0xcb81, 0x0b40, 0xc901, 0x09c0, 0x0880, 0xc841, 0xd801, 0x18c0, 0x1980, 0xd941, 0x1b00, 0xdbc1, 0xda81, 0x1a40, 0x1e00, 0xdec1, 0xdf81, 0x1f40, 0xdd01, 0x1dc0, 0x1c80, 0xdc41, 0x1400, 0xd4c1, 0xd581, 0x1540, 0xd701, 0x17c0, 0x1680, 0xd641, 0xd201, 0x12c0, 0x1380, 0xd341, 0x1100, 0xd1c1, 0xd081, 0x1040, 0xf001, 0x30c0, 0x3180, 0xf141, 0x3300, 0xf3c1, 0xf281, 0x3240, 0x3600, 0xf6c1, 0xf781, 0x3740, 0xf501, 0x35c0, 0x3480, 0xf441, 0x3c00, 0xfcc1, 0xfd81, 0x3d40, 0xff01, 0x3fc0, 0x3e80, 0xfe41, 0xfa01, 0x3ac0, 0x3b80, 0xfb41, 0x3900, 0xf9c1, 0xf881, 0x3840, 0x2800, 0xe8c1, 0xe981, 0x2940, 0xeb01, 0x2bc0, 0x2a80, 0xea41, 0xee01, 0x2ec0, 0x2f80, 0xef41, 0x2d00, 0xedc1, 0xec81, 0x2c40, 0xe401, 0x24c0, 0x2580, 0xe541, 0x2700, 0xe7c1, 0xe681, 0x2640, 0x2200, 0xe2c1, 0xe381, 0x2340, 0xe101, 0x21c0, 0x2080, 0xe041, 0xa001, 0x60c0, 0x6180, 0xa141, 0x6300, 0xa3c1, 0xa281, 0x6240, 0x6600, 0xa6c1, 0xa781, 0x6740, 0xa501, 0x65c0, 0x6480, 0xa441, 0x6c00, 0xacc1, 0xad81, 0x6d40, 0xaf01, 0x6fc0, 0x6e80, 0xae41, 0xaa01, 0x6ac0, 0x6b80, 0xab41, 0x6900, 0xa9c1, 0xa881, 0x6840, 0x7800, 0xb8c1, 0xb981, 0x7940, 0xbb01, 0x7bc0, 0x7a80, 0xba41, 0xbe01, 0x7ec0, 0x7f80, 0xbf41, 0x7d00, 0xbdc1, 0xbc81, 0x7c40, 0xb401, 0x74c0, 0x7580, 0xb541, 0x7700, 0xb7c1, 0xb681, 0x7640, 0x7200, 0xb2c1, 0xb381, 0x7340, 0xb101, 0x71c0, 0x7080, 0xb041, 0x5000, 0x90c1, 0x9181, 0x5140, 0x9301, 0x53c0, 0x5280, 0x9241, 0x9601, 0x56c0, 0x5780, 0x9741, 0x5500, 0x95c1, 0x9481, 0x5440, 0x9c01, 0x5cc0, 0x5d80, 0x9d41, 0x5f00, 0x9fc1, 0x9e81, 0x5e40, 0x5a00, 0x9ac1, 0x9b81, 0x5b40, 0x9901, 0x59c0, 0x5880, 0x9841, 0x8801, 0x48c0, 0x4980, 0x8941, 0x4b00, 0x8bc1, 0x8a81, 0x4a40, 0x4e00, 0x8ec1, 0x8f81, 0x4f40, 0x8d01, 0x4dc0, 0x4c80, 0x8c41, 0x4400, 0x84c1, 0x8581, 0x4540, 0x8701, 0x47c0, 0x4680, 0x8641, 0x8201, 0x42c0, 0x4380, 0x8341, 0x4100, 0x81c1, 0x8081, 0x4040];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-16', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = ~~previous;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = (TABLE[(crc ^ byte) & 0xff] ^ (crc >> 8)) & 0xffff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_ccitt.js b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_ccitt.js
new file mode 100644
index 0000000..0bdb0bf
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_ccitt.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('ccitt', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = previous != null ? ~~previous : 0xffff;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = (TABLE[((crc >> 8) ^ byte) & 0xff] ^ (crc << 8)) & 0xffff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_modbus.js b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_modbus.js
new file mode 100644
index 0000000..52a536a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_modbus.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241, 0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440, 0xcc01, 0x0cc0, 0x0d80, 0xcd41, 0x0f00, 0xcfc1, 0xce81, 0x0e40, 0x0a00, 0xcac1, 0xcb81, 0x0b40, 0xc901, 0x09c0, 0x0880, 0xc841, 0xd801, 0x18c0, 0x1980, 0xd941, 0x1b00, 0xdbc1, 0xda81, 0x1a40, 0x1e00, 0xdec1, 0xdf81, 0x1f40, 0xdd01, 0x1dc0, 0x1c80, 0xdc41, 0x1400, 0xd4c1, 0xd581, 0x1540, 0xd701, 0x17c0, 0x1680, 0xd641, 0xd201, 0x12c0, 0x1380, 0xd341, 0x1100, 0xd1c1, 0xd081, 0x1040, 0xf001, 0x30c0, 0x3180, 0xf141, 0x3300, 0xf3c1, 0xf281, 0x3240, 0x3600, 0xf6c1, 0xf781, 0x3740, 0xf501, 0x35c0, 0x3480, 0xf441, 0x3c00, 0xfcc1, 0xfd81, 0x3d40, 0xff01, 0x3fc0, 0x3e80, 0xfe41, 0xfa01, 0x3ac0, 0x3b80, 0xfb41, 0x3900, 0xf9c1, 0xf881, 0x3840, 0x2800, 0xe8c1, 0xe981, 0x2940, 0xeb01, 0x2bc0, 0x2a80, 0xea41, 0xee01, 0x2ec0, 0x2f80, 0xef41, 0x2d00, 0xedc1, 0xec81, 0x2c40, 0xe401, 0x24c0, 0x2580, 0xe541, 0x2700, 0xe7c1, 0xe681, 0x2640, 0x2200, 0xe2c1, 0xe381, 0x2340, 0xe101, 0x21c0, 0x2080, 0xe041, 0xa001, 0x60c0, 0x6180, 0xa141, 0x6300, 0xa3c1, 0xa281, 0x6240, 0x6600, 0xa6c1, 0xa781, 0x6740, 0xa501, 0x65c0, 0x6480, 0xa441, 0x6c00, 0xacc1, 0xad81, 0x6d40, 0xaf01, 0x6fc0, 0x6e80, 0xae41, 0xaa01, 0x6ac0, 0x6b80, 0xab41, 0x6900, 0xa9c1, 0xa881, 0x6840, 0x7800, 0xb8c1, 0xb981, 0x7940, 0xbb01, 0x7bc0, 0x7a80, 0xba41, 0xbe01, 0x7ec0, 0x7f80, 0xbf41, 0x7d00, 0xbdc1, 0xbc81, 0x7c40, 0xb401, 0x74c0, 0x7580, 0xb541, 0x7700, 0xb7c1, 0xb681, 0x7640, 0x7200, 0xb2c1, 0xb381, 0x7340, 0xb101, 0x71c0, 0x7080, 0xb041, 0x5000, 0x90c1, 0x9181, 0x5140, 0x9301, 0x53c0, 0x5280, 0x9241, 0x9601, 0x56c0, 0x5780, 0x9741, 0x5500, 0x95c1, 0x9481, 0x5440, 0x9c01, 0x5cc0, 0x5d80, 0x9d41, 0x5f00, 0x9fc1, 0x9e81, 0x5e40, 0x5a00, 0x9ac1, 0x9b81, 0x5b40, 0x9901, 0x59c0, 0x5880, 0x9841, 0x8801, 0x48c0, 0x4980, 0x8941, 0x4b00, 0x8bc1, 0x8a81, 0x4a40, 0x4e00, 0x8ec1, 0x8f81, 0x4f40, 0x8d01, 0x4dc0, 0x4c80, 0x8c41, 0x4400, 0x84c1, 0x8581, 0x4540, 0x8701, 0x47c0, 0x4680, 0x8641, 0x8201, 0x42c0, 0x4380, 0x8341, 0x4100, 0x81c1, 0x8081, 0x4040];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-16-modbus', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = previous != null ? ~~previous : 0xffff;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = (TABLE[(crc ^ byte) & 0xff] ^ (crc >> 8)) & 0xffff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc24.js b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc24.js
new file mode 100644
index 0000000..ff67bc1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc24.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x000000, 0x864cfb, 0x8ad50d, 0x0c99f6, 0x93e6e1, 0x15aa1a, 0x1933ec, 0x9f7f17, 0xa18139, 0x27cdc2, 0x2b5434, 0xad18cf, 0x3267d8, 0xb42b23, 0xb8b2d5, 0x3efe2e, 0xc54e89, 0x430272, 0x4f9b84, 0xc9d77f, 0x56a868, 0xd0e493, 0xdc7d65, 0x5a319e, 0x64cfb0, 0xe2834b, 0xee1abd, 0x685646, 0xf72951, 0x7165aa, 0x7dfc5c, 0xfbb0a7, 0x0cd1e9, 0x8a9d12, 0x8604e4, 0x00481f, 0x9f3708, 0x197bf3, 0x15e205, 0x93aefe, 0xad50d0, 0x2b1c2b, 0x2785dd, 0xa1c926, 0x3eb631, 0xb8faca, 0xb4633c, 0x322fc7, 0xc99f60, 0x4fd39b, 0x434a6d, 0xc50696, 0x5a7981, 0xdc357a, 0xd0ac8c, 0x56e077, 0x681e59, 0xee52a2, 0xe2cb54, 0x6487af, 0xfbf8b8, 0x7db443, 0x712db5, 0xf7614e, 0x19a3d2, 0x9fef29, 0x9376df, 0x153a24, 0x8a4533, 0x0c09c8, 0x00903e, 0x86dcc5, 0xb822eb, 0x3e6e10, 0x32f7e6, 0xb4bb1d, 0x2bc40a, 0xad88f1, 0xa11107, 0x275dfc, 0xdced5b, 0x5aa1a0, 0x563856, 0xd074ad, 0x4f0bba, 0xc94741, 0xc5deb7, 0x43924c, 0x7d6c62, 0xfb2099, 0xf7b96f, 0x71f594, 0xee8a83, 0x68c678, 0x645f8e, 0xe21375, 0x15723b, 0x933ec0, 0x9fa736, 0x19ebcd, 0x8694da, 0x00d821, 0x0c41d7, 0x8a0d2c, 0xb4f302, 0x32bff9, 0x3e260f, 0xb86af4, 0x2715e3, 0xa15918, 0xadc0ee, 0x2b8c15, 0xd03cb2, 0x567049, 0x5ae9bf, 0xdca544, 0x43da53, 0xc596a8, 0xc90f5e, 0x4f43a5, 0x71bd8b, 0xf7f170, 0xfb6886, 0x7d247d, 0xe25b6a, 0x641791, 0x688e67, 0xeec29c, 0x3347a4, 0xb50b5f, 0xb992a9, 0x3fde52, 0xa0a145, 0x26edbe, 0x2a7448, 0xac38b3, 0x92c69d, 0x148a66, 0x181390, 0x9e5f6b, 0x01207c, 0x876c87, 0x8bf571, 0x0db98a, 0xf6092d, 0x7045d6, 0x7cdc20, 0xfa90db, 0x65efcc, 0xe3a337, 0xef3ac1, 0x69763a, 0x578814, 0xd1c4ef, 0xdd5d19, 0x5b11e2, 0xc46ef5, 0x42220e, 0x4ebbf8, 0xc8f703, 0x3f964d, 0xb9dab6, 0xb54340, 0x330fbb, 0xac70ac, 0x2a3c57, 0x26a5a1, 0xa0e95a, 0x9e1774, 0x185b8f, 0x14c279, 0x928e82, 0x0df195, 0x8bbd6e, 0x872498, 0x016863, 0xfad8c4, 0x7c943f, 0x700dc9, 0xf64132, 0x693e25, 0xef72de, 0xe3eb28, 0x65a7d3, 0x5b59fd, 0xdd1506, 0xd18cf0, 0x57c00b, 0xc8bf1c, 0x4ef3e7, 0x426a11, 0xc426ea, 0x2ae476, 0xaca88d, 0xa0317b, 0x267d80, 0xb90297, 0x3f4e6c, 0x33d79a, 0xb59b61, 0x8b654f, 0x0d29b4, 0x01b042, 0x87fcb9, 0x1883ae, 0x9ecf55, 0x9256a3, 0x141a58, 0xefaaff, 0x69e604, 0x657ff2, 0xe33309, 0x7c4c1e, 0xfa00e5, 0xf69913, 0x70d5e8, 0x4e2bc6, 0xc8673d, 0xc4fecb, 0x42b230, 0xddcd27, 0x5b81dc, 0x57182a, 0xd154d1, 0x26359f, 0xa07964, 0xace092, 0x2aac69, 0xb5d37e, 0x339f85, 0x3f0673, 0xb94a88, 0x87b4a6, 0x01f85d, 0x0d61ab, 0x8b2d50, 0x145247, 0x921ebc, 0x9e874a, 0x18cbb1, 0xe37b16, 0x6537ed, 0x69ae1b, 0xefe2e0, 0x709df7, 0xf6d10c, 0xfa48fa, 0x7c0401, 0x42fa2f, 0xc4b6d4, 0xc82f22, 0x4e63d9, 0xd11cce, 0x575035, 0x5bc9c3, 0xdd8538];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-24', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = previous != null ? ~~previous : 0xb704ce;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = (TABLE[((crc >> 16) ^ byte) & 0xff] ^ (crc << 8)) & 0xffffff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc32.js b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc32.js
new file mode 100644
index 0000000..20bc024
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc32.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-32', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = previous === 0 ? 0 : ~~previous ^ -1;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = TABLE[(crc ^ byte) & 0xff] ^ (crc >>> 8);
+ }
+ return crc ^ -1;
+});
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8.js b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8.js
new file mode 100644
index 0000000..6ebe77c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15, 0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d, 0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65, 0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d, 0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb, 0xf2, 0xf5, 0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd, 0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85, 0xa8, 0xaf, 0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd, 0xc7, 0xc0, 0xc9, 0xce, 0xdb, 0xdc, 0xd5, 0xd2, 0xff, 0xf8, 0xf1, 0xf6, 0xe3, 0xe4, 0xed, 0xea, 0xb7, 0xb0, 0xb9, 0xbe, 0xab, 0xac, 0xa5, 0xa2, 0x8f, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9d, 0x9a, 0x27, 0x20, 0x29, 0x2e, 0x3b, 0x3c, 0x35, 0x32, 0x1f, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0d, 0x0a, 0x57, 0x50, 0x59, 0x5e, 0x4b, 0x4c, 0x45, 0x42, 0x6f, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7d, 0x7a, 0x89, 0x8e, 0x87, 0x80, 0x95, 0x92, 0x9b, 0x9c, 0xb1, 0xb6, 0xbf, 0xb8, 0xad, 0xaa, 0xa3, 0xa4, 0xf9, 0xfe, 0xf7, 0xf0, 0xe5, 0xe2, 0xeb, 0xec, 0xc1, 0xc6, 0xcf, 0xc8, 0xdd, 0xda, 0xd3, 0xd4, 0x69, 0x6e, 0x67, 0x60, 0x75, 0x72, 0x7b, 0x7c, 0x51, 0x56, 0x5f, 0x58, 0x4d, 0x4a, 0x43, 0x44, 0x19, 0x1e, 0x17, 0x10, 0x05, 0x02, 0x0b, 0x0c, 0x21, 0x26, 0x2f, 0x28, 0x3d, 0x3a, 0x33, 0x34, 0x4e, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5c, 0x5b, 0x76, 0x71, 0x78, 0x7f, 0x6a, 0x6d, 0x64, 0x63, 0x3e, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2c, 0x2b, 0x06, 0x01, 0x08, 0x0f, 0x1a, 0x1d, 0x14, 0x13, 0xae, 0xa9, 0xa0, 0xa7, 0xb2, 0xb5, 0xbc, 0xbb, 0x96, 0x91, 0x98, 0x9f, 0x8a, 0x8d, 0x84, 0x83, 0xde, 0xd9, 0xd0, 0xd7, 0xc2, 0xc5, 0xcc, 0xcb, 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-8', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = ~~previous;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = TABLE[(crc ^ byte) & 0xff] & 0xff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8_1wire.js b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8_1wire.js
new file mode 100644
index 0000000..b561246
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8_1wire.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x00, 0x5e, 0xbc, 0xe2, 0x61, 0x3f, 0xdd, 0x83, 0xc2, 0x9c, 0x7e, 0x20, 0xa3, 0xfd, 0x1f, 0x41, 0x9d, 0xc3, 0x21, 0x7f, 0xfc, 0xa2, 0x40, 0x1e, 0x5f, 0x01, 0xe3, 0xbd, 0x3e, 0x60, 0x82, 0xdc, 0x23, 0x7d, 0x9f, 0xc1, 0x42, 0x1c, 0xfe, 0xa0, 0xe1, 0xbf, 0x5d, 0x03, 0x80, 0xde, 0x3c, 0x62, 0xbe, 0xe0, 0x02, 0x5c, 0xdf, 0x81, 0x63, 0x3d, 0x7c, 0x22, 0xc0, 0x9e, 0x1d, 0x43, 0xa1, 0xff, 0x46, 0x18, 0xfa, 0xa4, 0x27, 0x79, 0x9b, 0xc5, 0x84, 0xda, 0x38, 0x66, 0xe5, 0xbb, 0x59, 0x07, 0xdb, 0x85, 0x67, 0x39, 0xba, 0xe4, 0x06, 0x58, 0x19, 0x47, 0xa5, 0xfb, 0x78, 0x26, 0xc4, 0x9a, 0x65, 0x3b, 0xd9, 0x87, 0x04, 0x5a, 0xb8, 0xe6, 0xa7, 0xf9, 0x1b, 0x45, 0xc6, 0x98, 0x7a, 0x24, 0xf8, 0xa6, 0x44, 0x1a, 0x99, 0xc7, 0x25, 0x7b, 0x3a, 0x64, 0x86, 0xd8, 0x5b, 0x05, 0xe7, 0xb9, 0x8c, 0xd2, 0x30, 0x6e, 0xed, 0xb3, 0x51, 0x0f, 0x4e, 0x10, 0xf2, 0xac, 0x2f, 0x71, 0x93, 0xcd, 0x11, 0x4f, 0xad, 0xf3, 0x70, 0x2e, 0xcc, 0x92, 0xd3, 0x8d, 0x6f, 0x31, 0xb2, 0xec, 0x0e, 0x50, 0xaf, 0xf1, 0x13, 0x4d, 0xce, 0x90, 0x72, 0x2c, 0x6d, 0x33, 0xd1, 0x8f, 0x0c, 0x52, 0xb0, 0xee, 0x32, 0x6c, 0x8e, 0xd0, 0x53, 0x0d, 0xef, 0xb1, 0xf0, 0xae, 0x4c, 0x12, 0x91, 0xcf, 0x2d, 0x73, 0xca, 0x94, 0x76, 0x28, 0xab, 0xf5, 0x17, 0x49, 0x08, 0x56, 0xb4, 0xea, 0x69, 0x37, 0xd5, 0x8b, 0x57, 0x09, 0xeb, 0xb5, 0x36, 0x68, 0x8a, 0xd4, 0x95, 0xcb, 0x29, 0x77, 0xf4, 0xaa, 0x48, 0x16, 0xe9, 0xb7, 0x55, 0x0b, 0x88, 0xd6, 0x34, 0x6a, 0x2b, 0x75, 0x97, 0xc9, 0x4a, 0x14, 0xf6, 0xa8, 0x74, 0x2a, 0xc8, 0x96, 0x15, 0x4b, 0xa9, 0xf7, 0xb6, 0xe8, 0x0a, 0x54, 0xd7, 0x89, 0x6b, 0x35];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('dallas-1-wire', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = ~~previous;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = TABLE[(crc ^ byte) & 0xff] & 0xff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/create.js b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/create.js
new file mode 100644
index 0000000..2d856bd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/create.js
@@ -0,0 +1,11 @@
+// Generated by CoffeeScript 1.7.1
+module.exports = function(model, calc) {
+ var fn;
+ fn = function(buf, previous) {
+ return calc(buf, previous) >>> 0;
+ };
+ fn.signed = calc;
+ fn.unsigned = fn;
+ fn.model = model;
+ return fn;
+};
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/hex.js b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/hex.js
new file mode 100644
index 0000000..0a6aa4c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/hex.js
@@ -0,0 +1,9 @@
+// Generated by CoffeeScript 1.7.1
+module.exports = function(number) {
+ var result;
+ result = number.toString(16);
+ while (result.length % 2) {
+ result = "0" + result;
+ }
+ return result;
+};
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/index.js
new file mode 100644
index 0000000..15ac34c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/lib/index.js
@@ -0,0 +1,11 @@
+// Generated by CoffeeScript 1.7.1
+module.exports = {
+ crc1: require('./crc1'),
+ crc8: require('./crc8'),
+ crc81wire: require('./crc8_1wire'),
+ crc16: require('./crc16'),
+ crc16ccitt: require('./crc16_ccitt'),
+ crc16modbus: require('./crc16_modbus'),
+ crc24: require('./crc24'),
+ crc32: require('./crc32')
+};
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/package.json
new file mode 100644
index 0000000..e6ceeb7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/node_modules/crc/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "crc",
+ "version": "3.2.1",
+ "description": "Various CRC JavaScript implementations",
+ "keywords": [
+ "crc"
+ ],
+ "main": "./lib/index.js",
+ "scripts": {
+ "test": "mocha test/*.spec.coffee",
+ "pretest": "coffee --bare --output ./lib --compile ./src/*.coffee"
+ },
+ "author": {
+ "name": "Alex Gorbatchev",
+ "url": "https://github.com/alexgorbatchev"
+ },
+ "devDependencies": {
+ "beautify-benchmark": "^0.2.4",
+ "benchmark": "^1.0.0",
+ "buffer-crc32": "^0.2.3",
+ "chai": "~1.9.1",
+ "coffee-errors": "~0.8.6",
+ "coffee-script": "~1.7.1",
+ "mocha": "*",
+ "seedrandom": "^2.3.6"
+ },
+ "homepage": "https://github.com/alexgorbatchev/node-crc",
+ "bugs": {
+ "url": "https://github.com/alexgorbatchev/node-crc/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/alexgorbatchev/node-crc.git"
+ },
+ "license": "MIT",
+ "gitHead": "71caf362b061992bfe4ca8706ee264e764d2e88e",
+ "_id": "crc@3.2.1",
+ "_shasum": "5d9c8fb77a245cd5eca291e5d2d005334bab0082",
+ "_from": "crc@3.2.1",
+ "_npmVersion": "1.4.13",
+ "_npmUser": {
+ "name": "alexgorbatchev",
+ "email": "alex.gorbatchev@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "alexgorbatchev",
+ "email": "alex.gorbatchev@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "5d9c8fb77a245cd5eca291e5d2d005334bab0082",
+ "tarball": "http://registry.npmjs.org/crc/-/crc-3.2.1.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/crc/-/crc-3.2.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/etag/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/package.json
new file mode 100644
index 0000000..57e6f57
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/etag/package.json
@@ -0,0 +1,75 @@
+{
+ "name": "etag",
+ "description": "Create simple ETags",
+ "version": "1.5.1",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "David Björklund",
+ "email": "david.bjorklund@gmail.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "etag",
+ "http",
+ "res"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/etag"
+ },
+ "dependencies": {
+ "crc": "3.2.1"
+ },
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4",
+ "seedrandom": "~2.3.6"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "27335e2265388109e50a9f037452081dc8a8260f",
+ "bugs": {
+ "url": "https://github.com/jshttp/etag/issues"
+ },
+ "homepage": "https://github.com/jshttp/etag",
+ "_id": "etag@1.5.1",
+ "_shasum": "54c50de04ee42695562925ac566588291be7e9ea",
+ "_from": "etag@~1.5.1",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "54c50de04ee42695562925ac566588291be7e9ea",
+ "tarball": "http://registry.npmjs.org/etag/-/etag-1.5.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/etag/-/etag-1.5.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/HISTORY.md
new file mode 100644
index 0000000..6f5cb71
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/HISTORY.md
@@ -0,0 +1,57 @@
+0.3.3 / 2015-01-01
+==================
+
+ * deps: debug@~2.1.1
+ * deps: on-finished@~2.2.0
+
+0.3.2 / 2014-10-22
+==================
+
+ * deps: on-finished@~2.1.1
+ - Fix handling of pipelined requests
+
+0.3.1 / 2014-10-16
+==================
+
+ * deps: debug@~2.1.0
+ - Implement `DEBUG_FD` env variable support
+
+0.3.0 / 2014-09-17
+==================
+
+ * Terminate in progress response only on error
+ * Use `on-finished` to determine request status
+
+0.2.0 / 2014-09-03
+==================
+
+ * Set `X-Content-Type-Options: nosniff` header
+ * deps: debug@~2.0.0
+
+0.1.0 / 2014-07-16
+==================
+
+ * Respond after request fully read
+ - prevents hung responses and socket hang ups
+ * deps: debug@1.0.4
+
+0.0.3 / 2014-07-11
+==================
+
+ * deps: debug@1.0.3
+ - Add support for multiple wildcards in namespaces
+
+0.0.2 / 2014-06-19
+==================
+
+ * Handle invalid status codes
+
+0.0.1 / 2014-06-05
+==================
+
+ * deps: debug@1.0.2
+
+0.0.0 / 2014-06-05
+==================
+
+ * Extracted from connect/express
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/LICENSE
new file mode 100644
index 0000000..eda2305
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/README.md
new file mode 100644
index 0000000..2015ac0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/README.md
@@ -0,0 +1,133 @@
+# finalhandler
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Node.js function to invoke as the final step to respond to HTTP request.
+
+## Installation
+
+```sh
+$ npm install finalhandler
+```
+
+## API
+
+```js
+var finalhandler = require('finalhandler')
+```
+
+### finalhandler(req, res, [options])
+
+Returns function to be invoked as the final step for the given `req` and `res`.
+This function is to be invoked as `fn(err)`. If `err` is falsy, the handler will
+write out a 404 response to the `res`. If it is truthy, an error response will
+be written out to the `res`, and `res.statusCode` is set from `err.status`.
+
+The final handler will also unpipe anything from `req` when it is invoked.
+
+#### options.env
+
+By default, the environment is determined by `NODE_ENV` variable, but it can be
+overridden by this option.
+
+#### options.onerror
+
+Provide a function to be called with the `err` when it exists. Can be used for
+writing errors to a central location without excessive function generation. Called
+as `onerror(err, req, res)`.
+
+## Examples
+
+### always 404
+
+```js
+var finalhandler = require('finalhandler')
+var http = require('http')
+
+var server = http.createServer(function (req, res) {
+ var done = finalhandler(req, res)
+ done()
+})
+
+server.listen(3000)
+```
+
+### perform simple action
+
+```js
+var finalhandler = require('finalhandler')
+var fs = require('fs')
+var http = require('http')
+
+var server = http.createServer(function (req, res) {
+ var done = finalhandler(req, res)
+
+ fs.readFile('index.html', function (err, buf) {
+ if (err) return done(err)
+ res.setHeader('Content-Type', 'text/html')
+ res.end(buf)
+ })
+})
+
+server.listen(3000)
+```
+
+### use with middleware-style functions
+
+```js
+var finalhandler = require('finalhandler')
+var http = require('http')
+var serveStatic = require('serve-static')
+
+var serve = serveStatic('public')
+
+var server = http.createServer(function (req, res) {
+ var done = finalhandler(req, res)
+ serve(req, res, done)
+})
+
+server.listen(3000)
+```
+
+### keep log of all errors
+
+```js
+var finalhandler = require('finalhandler')
+var fs = require('fs')
+var http = require('http')
+
+var server = http.createServer(function (req, res) {
+ var done = finalhandler(req, res, {onerror: logerror})
+
+ fs.readFile('index.html', function (err, buf) {
+ if (err) return done(err)
+ res.setHeader('Content-Type', 'text/html')
+ res.end(buf)
+ })
+})
+
+server.listen(3000)
+
+function logerror(err) {
+ console.error(err.stack || err.toString())
+}
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/finalhandler.svg?style=flat
+[npm-url]: https://npmjs.org/package/finalhandler
+[node-image]: https://img.shields.io/node/v/finalhandler.svg?style=flat
+[node-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/pillarjs/finalhandler.svg?style=flat
+[travis-url]: https://travis-ci.org/pillarjs/finalhandler
+[coveralls-image]: https://img.shields.io/coveralls/pillarjs/finalhandler.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/pillarjs/finalhandler?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/finalhandler.svg?style=flat
+[downloads-url]: https://npmjs.org/package/finalhandler
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/index.js
new file mode 100644
index 0000000..bb2bb58
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/index.js
@@ -0,0 +1,171 @@
+/*!
+ * finalhandler
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var debug = require('debug')('finalhandler')
+var escapeHtml = require('escape-html')
+var http = require('http')
+var onFinished = require('on-finished')
+
+/**
+ * Variables.
+ */
+
+/* istanbul ignore next */
+var defer = typeof setImmediate === 'function'
+ ? setImmediate
+ : function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) }
+var isFinished = onFinished.isFinished
+
+/**
+ * Module exports.
+ */
+
+module.exports = finalhandler
+
+/**
+ * Final handler:
+ *
+ * @param {Request} req
+ * @param {Response} res
+ * @param {Object} [options]
+ * @return {Function}
+ * @api public
+ */
+
+function finalhandler(req, res, options) {
+ options = options || {}
+
+ // get environment
+ var env = options.env || process.env.NODE_ENV || 'development'
+
+ // get error callback
+ var onerror = options.onerror
+
+ return function (err) {
+ var msg
+
+ // ignore 404 on in-flight response
+ if (!err && res._header) {
+ debug('cannot 404 after headers sent')
+ return
+ }
+
+ // unhandled error
+ if (err) {
+ // default status code to 500
+ if (!res.statusCode || res.statusCode < 400) {
+ res.statusCode = 500
+ }
+
+ // respect err.status
+ if (err.status) {
+ res.statusCode = err.status
+ }
+
+ // production gets a basic error message
+ var msg = env === 'production'
+ ? http.STATUS_CODES[res.statusCode]
+ : err.stack || err.toString()
+ msg = escapeHtml(msg)
+ .replace(/\n/g, '<br>')
+ .replace(/ /g, ' ') + '\n'
+ } else {
+ res.statusCode = 404
+ msg = 'Cannot ' + escapeHtml(req.method) + ' ' + escapeHtml(req.originalUrl || req.url) + '\n'
+ }
+
+ debug('default %s', res.statusCode)
+
+ // schedule onerror callback
+ if (err && onerror) {
+ defer(onerror, err, req, res)
+ }
+
+ // cannot actually respond
+ if (res._header) {
+ return req.socket.destroy()
+ }
+
+ send(req, res, res.statusCode, msg)
+ }
+}
+
+/**
+ * Send response.
+ *
+ * @param {IncomingMessage} req
+ * @param {OutgoingMessage} res
+ * @param {number} status
+ * @param {string} body
+ * @api private
+ */
+
+function send(req, res, status, body) {
+ function write() {
+ res.statusCode = status
+
+ // security header for content sniffing
+ res.setHeader('X-Content-Type-Options', 'nosniff')
+
+ // standard headers
+ res.setHeader('Content-Type', 'text/html; charset=utf-8')
+ res.setHeader('Content-Length', Buffer.byteLength(body, 'utf8'))
+
+ if (req.method === 'HEAD') {
+ res.end()
+ return
+ }
+
+ res.end(body, 'utf8')
+ }
+
+ if (isFinished(req)) {
+ write()
+ return
+ }
+
+ // unpipe everything from the request
+ unpipe(req)
+
+ // flush the request
+ onFinished(req, write)
+ req.resume()
+}
+
+/**
+ * Unpipe everything from a stream.
+ *
+ * @param {Object} stream
+ * @api private
+ */
+
+/* istanbul ignore next: implementation differs between versions */
+function unpipe(stream) {
+ if (typeof stream.unpipe === 'function') {
+ // new-style
+ stream.unpipe()
+ return
+ }
+
+ // Node.js 0.8 hack
+ var listener
+ var listeners = stream.listeners('close')
+
+ for (var i = 0; i < listeners.length; i++) {
+ listener = listeners[i]
+
+ if (listener.name !== 'cleanup' && listener.name !== 'onclose') {
+ continue
+ }
+
+ // invoke the listener
+ listener.call(stream)
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/package.json
new file mode 100644
index 0000000..4eba223
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/package.json
@@ -0,0 +1,79 @@
+{
+ "name": "finalhandler",
+ "description": "Node.js final http responder",
+ "version": "0.3.3",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/pillarjs/finalhandler"
+ },
+ "dependencies": {
+ "debug": "~2.1.1",
+ "escape-html": "1.0.1",
+ "on-finished": "~2.2.0"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~2.1.0",
+ "readable-stream": "~1.0.33",
+ "supertest": "~0.15.0"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "dfce5042f996ba93ac85b9282e6d1cae1561acc6",
+ "bugs": {
+ "url": "https://github.com/pillarjs/finalhandler/issues"
+ },
+ "homepage": "https://github.com/pillarjs/finalhandler",
+ "_id": "finalhandler@0.3.3",
+ "_shasum": "b1a09aa1e6a607b3541669b09bcb727f460cd426",
+ "_from": "finalhandler@0.3.3",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b1a09aa1e6a607b3541669b09bcb727f460cd426",
+ "tarball": "http://registry.npmjs.org/finalhandler/-/finalhandler-0.3.3.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.3.3.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/HISTORY.md
new file mode 100644
index 0000000..56361df
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/HISTORY.md
@@ -0,0 +1,24 @@
+0.2.4 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+
+0.2.3 / 2014-09-07
+==================
+
+ * Move repository to jshttp
+
+0.2.2 / 2014-02-19
+==================
+
+ * Revert "Fix for blank page on Safari reload"
+
+0.2.1 / 2014-01-29
+==================
+
+ * fix: support max-age=0 for end-to-end revalidation
+
+0.2.0 / 2013-08-11
+==================
+
+ * fix: return false for no-cache
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/LICENSE
new file mode 100644
index 0000000..f527394
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/README.md
new file mode 100644
index 0000000..54a885f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/README.md
@@ -0,0 +1,58 @@
+# fresh
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+HTTP response freshness testing
+
+## Installation
+
+```
+$ npm install fresh
+```
+
+## API
+
+```js
+var fresh = require('fresh')
+```
+
+### fresh(req, res)
+
+ Check freshness of `req` and `res` headers.
+
+ When the cache is "fresh" __true__ is returned,
+ otherwise __false__ is returned to indicate that
+ the cache is now stale.
+
+## Example
+
+```js
+var req = { 'if-none-match': 'tobi' };
+var res = { 'etag': 'luna' };
+fresh(req, res);
+// => false
+
+var req = { 'if-none-match': 'tobi' };
+var res = { 'etag': 'tobi' };
+fresh(req, res);
+// => true
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/fresh.svg?style=flat
+[npm-url]: https://npmjs.org/package/fresh
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/fresh.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/fresh
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/fresh.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/fresh?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/fresh.svg?style=flat
+[downloads-url]: https://npmjs.org/package/fresh
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/index.js
new file mode 100644
index 0000000..9c3f47d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/index.js
@@ -0,0 +1,53 @@
+
+/**
+ * Expose `fresh()`.
+ */
+
+module.exports = fresh;
+
+/**
+ * Check freshness of `req` and `res` headers.
+ *
+ * When the cache is "fresh" __true__ is returned,
+ * otherwise __false__ is returned to indicate that
+ * the cache is now stale.
+ *
+ * @param {Object} req
+ * @param {Object} res
+ * @return {Boolean}
+ * @api public
+ */
+
+function fresh(req, res) {
+ // defaults
+ var etagMatches = true;
+ var notModified = true;
+
+ // fields
+ var modifiedSince = req['if-modified-since'];
+ var noneMatch = req['if-none-match'];
+ var lastModified = res['last-modified'];
+ var etag = res['etag'];
+ var cc = req['cache-control'];
+
+ // unconditional request
+ if (!modifiedSince && !noneMatch) return false;
+
+ // check for no-cache cache request directive
+ if (cc && cc.indexOf('no-cache') !== -1) return false;
+
+ // parse if-none-match
+ if (noneMatch) noneMatch = noneMatch.split(/ *, */);
+
+ // if-none-match
+ if (noneMatch) etagMatches = ~noneMatch.indexOf(etag) || '*' == noneMatch[0];
+
+ // if-modified-since
+ if (modifiedSince) {
+ modifiedSince = new Date(modifiedSince);
+ lastModified = new Date(lastModified);
+ notModified = lastModified <= modifiedSince;
+ }
+
+ return !! (etagMatches && notModified);
+}
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/package.json
new file mode 100644
index 0000000..a153522
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/fresh/package.json
@@ -0,0 +1,77 @@
+{
+ "name": "fresh",
+ "description": "HTTP response freshness testing",
+ "version": "0.2.4",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "fresh",
+ "http",
+ "conditional",
+ "cache"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/fresh"
+ },
+ "devDependencies": {
+ "istanbul": "0",
+ "mocha": "1",
+ "should": "3"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --require should",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --require should"
+ },
+ "gitHead": "8440a4ca75fb091dec06e88654b3b1c31d7e7164",
+ "bugs": {
+ "url": "https://github.com/jshttp/fresh/issues"
+ },
+ "homepage": "https://github.com/jshttp/fresh",
+ "_id": "fresh@0.2.4",
+ "_shasum": "3582499206c9723714190edd74b4604feb4a614c",
+ "_from": "fresh@0.2.4",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "3582499206c9723714190edd74b4604feb4a614c",
+ "tarball": "http://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/HISTORY.md
new file mode 100644
index 0000000..62c2003
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/HISTORY.md
@@ -0,0 +1,22 @@
+0.3.0 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+ * Throw error when parameter format invalid on parse
+
+0.2.0 / 2014-06-18
+==================
+
+ * Add `typer.format()` to format media types
+
+0.1.0 / 2014-06-17
+==================
+
+ * Accept `req` as argument to `parse`
+ * Accept `res` as argument to `parse`
+ * Parse media type with extra LWS between type and first parameter
+
+0.0.0 / 2014-06-13
+==================
+
+ * Initial implementation
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/README.md
new file mode 100644
index 0000000..d8df623
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/README.md
@@ -0,0 +1,81 @@
+# media-typer
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Simple RFC 6838 media type parser
+
+## Installation
+
+```sh
+$ npm install media-typer
+```
+
+## API
+
+```js
+var typer = require('media-typer')
+```
+
+### typer.parse(string)
+
+```js
+var obj = typer.parse('image/svg+xml; charset=utf-8')
+```
+
+Parse a media type string. This will return an object with the following
+properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The type of the media type (always lower case). Example: `'image'`
+
+ - `subtype`: The subtype of the media type (always lower case). Example: `'svg'`
+
+ - `suffix`: The suffix of the media type (always lower case). Example: `'xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of parameter always lower case). Example: `{charset: 'utf-8'}`
+
+### typer.parse(req)
+
+```js
+var obj = typer.parse(req)
+```
+
+Parse the `content-type` header from the given `req`. Short-cut for
+`typer.parse(req.headers['content-type'])`.
+
+### typer.parse(res)
+
+```js
+var obj = typer.parse(res)
+```
+
+Parse the `content-type` header set on the given `res`. Short-cut for
+`typer.parse(res.getHeader('content-type'))`.
+
+### typer.format(obj)
+
+```js
+var obj = typer.format({type: 'image', subtype: 'svg', suffix: 'xml'})
+```
+
+Format an object into a media type string. This will return a string of the
+mime type for the given object. For the properties of the object, see the
+documentation for `typer.parse(string)`.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/media-typer.svg?style=flat
+[npm-url]: https://npmjs.org/package/media-typer
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/media-typer.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/media-typer
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/media-typer.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/media-typer
+[downloads-image]: https://img.shields.io/npm/dm/media-typer.svg?style=flat
+[downloads-url]: https://npmjs.org/package/media-typer
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/index.js
new file mode 100644
index 0000000..07f7295
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/index.js
@@ -0,0 +1,270 @@
+/*!
+ * media-typer
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * RegExp to match *( ";" parameter ) in RFC 2616 sec 3.7
+ *
+ * parameter = token "=" ( token | quoted-string )
+ * token = 1*<any CHAR except CTLs or separators>
+ * separators = "(" | ")" | "<" | ">" | "@"
+ * | "," | ";" | ":" | "\" | <">
+ * | "/" | "[" | "]" | "?" | "="
+ * | "{" | "}" | SP | HT
+ * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
+ * qdtext = <any TEXT except <">>
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ * TEXT = <any OCTET except CTLs, but including LWS>
+ * LWS = [CRLF] 1*( SP | HT )
+ * CRLF = CR LF
+ * CR = <US-ASCII CR, carriage return (13)>
+ * LF = <US-ASCII LF, linefeed (10)>
+ * SP = <US-ASCII SP, space (32)>
+ * SHT = <US-ASCII HT, horizontal-tab (9)>
+ * CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
+ * OCTET = <any 8-bit sequence of data>
+ */
+var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g;
+var textRegExp = /^[\u0020-\u007e\u0080-\u00ff]+$/
+var tokenRegExp = /^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/
+
+/**
+ * RegExp to match quoted-pair in RFC 2616
+ *
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ */
+var qescRegExp = /\\([\u0000-\u007f])/g;
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 2616
+ */
+var quoteRegExp = /([\\"])/g;
+
+/**
+ * RegExp to match type in RFC 6838
+ *
+ * type-name = restricted-name
+ * subtype-name = restricted-name
+ * restricted-name = restricted-name-first *126restricted-name-chars
+ * restricted-name-first = ALPHA / DIGIT
+ * restricted-name-chars = ALPHA / DIGIT / "!" / "#" /
+ * "$" / "&" / "-" / "^" / "_"
+ * restricted-name-chars =/ "." ; Characters before first dot always
+ * ; specify a facet name
+ * restricted-name-chars =/ "+" ; Characters after last plus always
+ * ; specify a structured syntax suffix
+ * ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
+ * DIGIT = %x30-39 ; 0-9
+ */
+var subtypeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/
+var typeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/
+var typeRegExp = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;
+
+/**
+ * Module exports.
+ */
+
+exports.format = format
+exports.parse = parse
+
+/**
+ * Format object to media type.
+ *
+ * @param {object} obj
+ * @return {string}
+ * @api public
+ */
+
+function format(obj) {
+ if (!obj || typeof obj !== 'object') {
+ throw new TypeError('argument obj is required')
+ }
+
+ var parameters = obj.parameters
+ var subtype = obj.subtype
+ var suffix = obj.suffix
+ var type = obj.type
+
+ if (!type || !typeNameRegExp.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ if (!subtype || !subtypeNameRegExp.test(subtype)) {
+ throw new TypeError('invalid subtype')
+ }
+
+ // format as type/subtype
+ var string = type + '/' + subtype
+
+ // append +suffix
+ if (suffix) {
+ if (!typeNameRegExp.test(suffix)) {
+ throw new TypeError('invalid suffix')
+ }
+
+ string += '+' + suffix
+ }
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ if (!tokenRegExp.test(param)) {
+ throw new TypeError('invalid parameter name')
+ }
+
+ string += '; ' + param + '=' + qstring(parameters[param])
+ }
+ }
+
+ return string
+}
+
+/**
+ * Parse media type to object.
+ *
+ * @param {string|object} string
+ * @return {Object}
+ * @api public
+ */
+
+function parse(string) {
+ if (!string) {
+ throw new TypeError('argument string is required')
+ }
+
+ // support req/res-like objects as argument
+ if (typeof string === 'object') {
+ string = getcontenttype(string)
+ }
+
+ if (typeof string !== 'string') {
+ throw new TypeError('argument string is required to be a string')
+ }
+
+ var index = string.indexOf(';')
+ var type = index !== -1
+ ? string.substr(0, index)
+ : string
+
+ var key
+ var match
+ var obj = splitType(type)
+ var params = {}
+ var value
+
+ paramRegExp.lastIndex = index
+
+ while (match = paramRegExp.exec(string)) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (value[0] === '"') {
+ // remove quotes and escapes
+ value = value
+ .substr(1, value.length - 2)
+ .replace(qescRegExp, '$1')
+ }
+
+ params[key] = value
+ }
+
+ if (index !== -1 && index !== string.length) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ obj.parameters = params
+
+ return obj
+}
+
+/**
+ * Get content-type from req/res objects.
+ *
+ * @param {object}
+ * @return {Object}
+ * @api private
+ */
+
+function getcontenttype(obj) {
+ if (typeof obj.getHeader === 'function') {
+ // res-like
+ return obj.getHeader('content-type')
+ }
+
+ if (typeof obj.headers === 'object') {
+ // req-like
+ return obj.headers && obj.headers['content-type']
+ }
+}
+
+/**
+ * Quote a string if necessary.
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function qstring(val) {
+ var str = String(val)
+
+ // no need to quote tokens
+ if (tokenRegExp.test(str)) {
+ return str
+ }
+
+ if (str.length > 0 && !textRegExp.test(str)) {
+ throw new TypeError('invalid parameter value')
+ }
+
+ return '"' + str.replace(quoteRegExp, '\\$1') + '"'
+}
+
+/**
+ * Simply "type/subtype+siffx" into parts.
+ *
+ * @param {string} string
+ * @return {Object}
+ * @api private
+ */
+
+function splitType(string) {
+ var match = typeRegExp.exec(string.toLowerCase())
+
+ if (!match) {
+ throw new TypeError('invalid media type')
+ }
+
+ var type = match[1]
+ var subtype = match[2]
+ var suffix
+
+ // suffix after last +
+ var index = subtype.lastIndexOf('+')
+ if (index !== -1) {
+ suffix = subtype.substr(index + 1)
+ subtype = subtype.substr(0, index)
+ }
+
+ var obj = {
+ type: type,
+ subtype: subtype,
+ suffix: suffix
+ }
+
+ return obj
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/package.json
new file mode 100644
index 0000000..4bd1a51
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/media-typer/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "media-typer",
+ "description": "Simple RFC 6838 media type parser and formatter",
+ "version": "0.3.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/media-typer"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4",
+ "should": "~4.0.4"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "d49d41ffd0bb5a0655fa44a59df2ec0bfc835b16",
+ "bugs": {
+ "url": "https://github.com/jshttp/media-typer/issues"
+ },
+ "homepage": "https://github.com/jshttp/media-typer",
+ "_id": "media-typer@0.3.0",
+ "_shasum": "8710d7af0aa626f8fffa1ce00168545263255748",
+ "_from": "media-typer@0.3.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "8710d7af0aa626f8fffa1ce00168545263255748",
+ "tarball": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/.npmignore b/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/.npmignore
new file mode 100644
index 0000000..f62e605
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/.npmignore
@@ -0,0 +1,59 @@
+# Compiled source #
+###################
+*.com
+*.class
+*.dll
+*.exe
+*.o
+*.so
+
+# Packages #
+############
+# it's better to unpack these files and commit the raw source
+# git has its own built in compression methods
+*.7z
+*.dmg
+*.gz
+*.iso
+*.jar
+*.rar
+*.tar
+*.zip
+
+# Logs and databases #
+######################
+*.log
+*.sql
+*.sqlite
+
+# OS generated files #
+######################
+.DS_Store*
+ehthumbs.db
+Icon?
+Thumbs.db
+
+# Node.js #
+###########
+lib-cov
+*.seed
+*.log
+*.csv
+*.dat
+*.out
+*.pid
+*.gz
+
+pids
+logs
+results
+
+node_modules
+npm-debug.log
+
+# Components #
+##############
+
+/build
+/components
+/vendors
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/README.md
new file mode 100644
index 0000000..50cf50c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/README.md
@@ -0,0 +1,49 @@
+# Merge Descriptors [![Build Status](https://travis-ci.org/component/merge-descriptors.png)](https://travis-ci.org/component/merge-descriptors)
+
+Merge objects using descriptors.
+
+```js
+var thing = {
+ get name() {
+ return 'jon'
+ }
+}
+
+var animal = {
+
+}
+
+merge(animal, thing)
+
+animal.name === 'jon'
+```
+
+## API
+
+### merge(destination, source)
+
+Overwrites `destination`'s descriptors with `source`'s.
+
+## License
+
+The MIT License (MIT)
+
+Copyright (c) 2013 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/component.json b/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/component.json
new file mode 100644
index 0000000..7653906
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/component.json
@@ -0,0 +1,10 @@
+{
+ "name": "merge-descriptors",
+ "description": "Merge objects using descriptors",
+ "version": "0.0.2",
+ "scripts": [
+ "index.js"
+ ],
+ "repo": "component/merge-descriptors",
+ "license": "MIT"
+}
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/index.js
new file mode 100644
index 0000000..e4e2379
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/index.js
@@ -0,0 +1,8 @@
+module.exports = function (dest, src) {
+ Object.getOwnPropertyNames(src).forEach(function (name) {
+ var descriptor = Object.getOwnPropertyDescriptor(src, name)
+ Object.defineProperty(dest, name, descriptor)
+ })
+
+ return dest
+}
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/package.json
new file mode 100644
index 0000000..76673a2
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/merge-descriptors/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "merge-descriptors",
+ "description": "Merge objects using descriptors",
+ "version": "0.0.2",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/component/merge-descriptors.git"
+ },
+ "bugs": {
+ "url": "https://github.com/component/merge-descriptors/issues"
+ },
+ "scripts": {
+ "test": "make test;"
+ },
+ "homepage": "https://github.com/component/merge-descriptors",
+ "_id": "merge-descriptors@0.0.2",
+ "dist": {
+ "shasum": "c36a52a781437513c57275f39dd9d317514ac8c7",
+ "tarball": "http://registry.npmjs.org/merge-descriptors/-/merge-descriptors-0.0.2.tgz"
+ },
+ "_from": "merge-descriptors@0.0.2",
+ "_npmVersion": "1.3.17",
+ "_npmUser": {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_shasum": "c36a52a781437513c57275f39dd9d317514ac8c7",
+ "_resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-0.0.2.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/methods/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/methods/HISTORY.md
new file mode 100644
index 0000000..c9e302c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/methods/HISTORY.md
@@ -0,0 +1,24 @@
+1.1.1 / 2014-12-30
+==================
+
+ * Improve `browserify` support
+
+1.1.0 / 2014-07-05
+==================
+
+ * Add `CONNECT` method
+
+1.0.1 / 2014-06-02
+==================
+
+ * Fix module to work with harmony transform
+
+1.0.0 / 2014-05-08
+==================
+
+ * Add `PURGE` method
+
+0.1.0 / 2013-10-28
+==================
+
+ * Add `http.METHODS` support
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/methods/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/methods/LICENSE
new file mode 100644
index 0000000..8bce401
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/methods/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2013-2014 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/methods/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/methods/README.md
new file mode 100644
index 0000000..dccc473
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/methods/README.md
@@ -0,0 +1,41 @@
+# Methods
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+ HTTP verbs that node core's parser supports.
+
+
+## Install
+
+```bash
+$ npm install methods
+```
+
+## API
+
+```js
+var methods = require('methods')
+```
+
+### methods
+
+This is an array of lower-case method names that Node.js supports.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/methods.svg?style=flat
+[npm-url]: https://npmjs.org/package/methods
+[node-version-image]: https://img.shields.io/node/v/methods.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/methods.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/methods
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/methods.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/methods?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/methods.svg?style=flat
+[downloads-url]: https://npmjs.org/package/methods
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/methods/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/methods/index.js
new file mode 100644
index 0000000..e89c7fd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/methods/index.js
@@ -0,0 +1,42 @@
+
+var http = require('http');
+
+/* istanbul ignore next: implementation differs on version */
+if (http.METHODS) {
+
+ module.exports = http.METHODS.map(function(method){
+ return method.toLowerCase();
+ });
+
+} else {
+
+ module.exports = [
+ 'get',
+ 'post',
+ 'put',
+ 'head',
+ 'delete',
+ 'options',
+ 'trace',
+ 'copy',
+ 'lock',
+ 'mkcol',
+ 'move',
+ 'purge',
+ 'propfind',
+ 'proppatch',
+ 'unlock',
+ 'report',
+ 'mkactivity',
+ 'checkout',
+ 'merge',
+ 'm-search',
+ 'notify',
+ 'subscribe',
+ 'unsubscribe',
+ 'patch',
+ 'search',
+ 'connect'
+ ];
+
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/methods/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/methods/package.json
new file mode 100644
index 0000000..c1806ac
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/methods/package.json
@@ -0,0 +1,88 @@
+{
+ "name": "methods",
+ "description": "HTTP methods that node supports",
+ "version": "1.1.1",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/methods"
+ },
+ "devDependencies": {
+ "istanbul": "0.3",
+ "mocha": "1"
+ },
+ "files": [
+ "index.js",
+ "HISTORY.md",
+ "LICENSE"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
+ },
+ "browser": {
+ "http": false
+ },
+ "keywords": [
+ "http",
+ "methods"
+ ],
+ "gitHead": "6293c6b27c5fb963acf67a347af80ad2ebd7247f",
+ "bugs": {
+ "url": "https://github.com/jshttp/methods/issues"
+ },
+ "homepage": "https://github.com/jshttp/methods",
+ "_id": "methods@1.1.1",
+ "_shasum": "17ea6366066d00c58e375b8ec7dfd0453c89822a",
+ "_from": "methods@~1.1.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "17ea6366066d00c58e375b8ec7dfd0453c89822a",
+ "tarball": "http://registry.npmjs.org/methods/-/methods-1.1.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/methods/-/methods-1.1.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/HISTORY.md
new file mode 100644
index 0000000..5d1e1c9
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/HISTORY.md
@@ -0,0 +1,76 @@
+2.2.0 / 2014-12-22
+==================
+
+ * Add message object to callback arguments
+
+2.1.1 / 2014-10-22
+==================
+
+ * Fix handling of pipelined requests
+
+2.1.0 / 2014-08-16
+==================
+
+ * Check if `socket` is detached
+ * Return `undefined` for `isFinished` if state unknown
+
+2.0.0 / 2014-08-16
+==================
+
+ * Add `isFinished` function
+ * Move to `jshttp` organization
+ * Remove support for plain socket argument
+ * Rename to `on-finished`
+ * Support both `req` and `res` as arguments
+ * deps: ee-first@1.0.5
+
+1.2.2 / 2014-06-10
+==================
+
+ * Reduce listeners added to emitters
+ - avoids "event emitter leak" warnings when used multiple times on same request
+
+1.2.1 / 2014-06-08
+==================
+
+ * Fix returned value when already finished
+
+1.2.0 / 2014-06-05
+==================
+
+ * Call callback when called on already-finished socket
+
+1.1.4 / 2014-05-27
+==================
+
+ * Support node.js 0.8
+
+1.1.3 / 2014-04-30
+==================
+
+ * Make sure errors passed as instanceof `Error`
+
+1.1.2 / 2014-04-18
+==================
+
+ * Default the `socket` to passed-in object
+
+1.1.1 / 2014-01-16
+==================
+
+ * Rename module to `finished`
+
+1.1.0 / 2013-12-25
+==================
+
+ * Call callback when called on already-errored socket
+
+1.0.1 / 2013-12-20
+==================
+
+ * Actually pass the error to the callback
+
+1.0.0 / 2013-12-20
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/LICENSE
new file mode 100644
index 0000000..5931fd2
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/README.md
new file mode 100644
index 0000000..29d6991
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/README.md
@@ -0,0 +1,109 @@
+# on-finished
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Execute a callback when a request closes, finishes, or errors.
+
+## Install
+
+```sh
+$ npm install on-finished
+```
+
+## API
+
+```js
+var onFinished = require('on-finished')
+```
+
+### onFinished(res, listener)
+
+Attach a listener to listen for the response to finish. The listener will
+be invoked only once when the response finished. If the response finished
+to to an error, the first argument will contain the error. If the response
+has already finished, the listener will be invoked.
+
+Listening to the end of a response would be used to close things associated
+with the response, like open files.
+
+Listener is invoked as `listener(err, res)`.
+
+```js
+onFinished(res, function (err, res) {
+ // clean up open fds, etc.
+ // err contains the error is request error'd
+})
+```
+
+### onFinished(req, listener)
+
+Attach a listener to listen for the request to finish. The listener will
+be invoked only once when the request finished. If the request finished
+to to an error, the first argument will contain the error. If the request
+has already finished, the listener will be invoked.
+
+Listening to the end of a request would be used to know when to continue
+after reading the data.
+
+Listener is invoked as `listener(err, req)`.
+
+```js
+var data = ''
+
+req.setEncoding('utf8')
+res.on('data', function (str) {
+ data += str
+})
+
+onFinished(req, function (err, req) {
+ // data is read unless there is err
+})
+```
+
+### onFinished.isFinished(res)
+
+Determine if `res` is already finished. This would be useful to check and
+not even start certain operations if the response has already finished.
+
+### onFinished.isFinished(req)
+
+Determine if `req` is already finished. This would be useful to check and
+not even start certain operations if the request has already finished.
+
+### Example
+
+The following code ensures that file descriptors are always closed
+once the response finishes.
+
+```js
+var destroy = require('destroy')
+var http = require('http')
+var onFinished = require('on-finished')
+
+http.createServer(function onRequest(req, res) {
+ var stream = fs.createReadStream('package.json')
+ stream.pipe(res)
+ onFinished(res, function (err) {
+ destroy(stream)
+ })
+})
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/on-finished.svg?style=flat
+[npm-url]: https://npmjs.org/package/on-finished
+[node-version-image]: https://img.shields.io/node/v/on-finished.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/on-finished.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/on-finished
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/on-finished.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/on-finished?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/on-finished.svg?style=flat
+[downloads-url]: https://npmjs.org/package/on-finished
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/index.js
new file mode 100644
index 0000000..f68161c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/index.js
@@ -0,0 +1,191 @@
+/*!
+ * on-finished
+ * Copyright(c) 2013 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = onFinished;
+module.exports.isFinished = isFinished;
+
+/**
+* Module dependencies.
+*/
+
+var first = require('ee-first')
+
+/**
+* Variables.
+*/
+
+/* istanbul ignore next */
+var defer = typeof setImmediate === 'function'
+ ? setImmediate
+ : function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) }
+
+/**
+ * Invoke callback when the response has finished, useful for
+ * cleaning up resources afterwards.
+ *
+ * @param {object} msg
+ * @param {function} listener
+ * @return {object}
+ * @api public
+ */
+
+function onFinished(msg, listener) {
+ if (isFinished(msg) !== false) {
+ defer(listener, null, msg)
+ return msg
+ }
+
+ // attach the listener to the message
+ attachListener(msg, listener)
+
+ return msg
+}
+
+/**
+ * Determine if message is already finished.
+ *
+ * @param {object} msg
+ * @return {boolean}
+ * @api public
+ */
+
+function isFinished(msg) {
+ var socket = msg.socket
+
+ if (typeof msg.finished === 'boolean') {
+ // OutgoingMessage
+ return Boolean(msg.finished || (socket && !socket.writable))
+ }
+
+ if (typeof msg.complete === 'boolean') {
+ // IncomingMessage
+ return Boolean(!socket || msg.complete || !socket.readable)
+ }
+
+ // don't know
+ return undefined
+}
+
+/**
+ * Attach a finished listener to the message.
+ *
+ * @param {object} msg
+ * @param {function} callback
+ * @private
+ */
+
+function attachFinishedListener(msg, callback) {
+ var eeMsg
+ var eeSocket
+ var finished = false
+
+ function onFinish(error) {
+ eeMsg.cancel()
+ eeSocket.cancel()
+
+ finished = true
+ callback(error)
+ }
+
+ // finished on first message event
+ eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish)
+
+ function onSocket(socket) {
+ // remove listener
+ msg.removeListener('socket', onSocket)
+
+ if (finished) return
+ if (eeMsg !== eeSocket) return
+
+ // finished on first socket event
+ eeSocket = first([[socket, 'error', 'close']], onFinish)
+ }
+
+ if (msg.socket) {
+ // socket already assigned
+ onSocket(msg.socket)
+ return
+ }
+
+ // wait for socket to be assigned
+ msg.on('socket', onSocket)
+
+ if (msg.socket === undefined) {
+ // node.js 0.8 patch
+ patchAssignSocket(msg, onSocket)
+ }
+}
+
+/**
+ * Attach the listener to the message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @api private
+ */
+
+function attachListener(msg, listener) {
+ var attached = msg.__onFinished
+
+ // create a private single listener with queue
+ if (!attached || !attached.queue) {
+ attached = msg.__onFinished = createListener(msg)
+ attachFinishedListener(msg, attached)
+ }
+
+ attached.queue.push(listener)
+}
+
+/**
+ * Create listener on message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @api private
+ */
+
+function createListener(msg) {
+ function listener(err) {
+ if (msg.__onFinished === listener) msg.__onFinished = null
+ if (!listener.queue) return
+
+ var queue = listener.queue
+ listener.queue = null
+
+ for (var i = 0; i < queue.length; i++) {
+ queue[i](err, msg)
+ }
+ }
+
+ listener.queue = []
+
+ return listener
+}
+
+/**
+ * Patch ServerResponse.prototype.assignSocket for node.js 0.8.
+ *
+ * @param {ServerResponse} res
+ * @param {function} callback
+ * @private
+ */
+
+function patchAssignSocket(res, callback) {
+ var assignSocket = res.assignSocket
+
+ if (typeof assignSocket !== 'function') return
+
+ // res.on('socket', callback) is broken in 0.8
+ res.assignSocket = function _assignSocket(socket) {
+ assignSocket.call(this, socket)
+ callback(socket)
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE
new file mode 100644
index 0000000..c1b15a1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md
new file mode 100644
index 0000000..bb16aab
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md
@@ -0,0 +1,80 @@
+# EE First
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Get the first event in a set of event emitters and event pairs,
+then clean up after itself.
+
+## Install
+
+```sh
+$ npm install ee-first
+```
+
+## API
+
+```js
+var first = require('ee-first')
+```
+
+### first(arr, listener)
+
+Invoke `listener` on the first event from the list specified in `arr`. `arr` is
+an array of arrays, with each array in the format `[ee, ...event]`. `listener`
+will be called only once, the first time any of the given events are emitted. If
+`error` is one of the listened events, then if that fires first, the `listener`
+will be given the `err` argument.
+
+The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the
+first argument emitted from an `error` event, if applicable; `ee` is the event
+emitter that fired; `event` is the string event name that fired; and `args` is an
+array of the arguments that were emitted on the event.
+
+```js
+var ee1 = new EventEmitter()
+var ee2 = new EventEmitter()
+
+first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+```
+
+#### .cancel()
+
+The group of listeners can be cancelled before being invoked and have all the event
+listeners removed from the underlying event emitters.
+
+```js
+var thunk = first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+
+// cancel and clean up
+thunk.cancel()
+```
+
+[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/ee-first
+[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square
+[github-url]: https://github.com/jonathanong/ee-first/tags
+[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square
+[travis-url]: https://travis-ci.org/jonathanong/ee-first
+[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master
+[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/ee-first
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js
new file mode 100644
index 0000000..1d66203
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js
@@ -0,0 +1,68 @@
+
+module.exports = function first(stuff, done) {
+ if (!Array.isArray(stuff))
+ throw new TypeError('arg must be an array of [ee, events...] arrays')
+
+ var cleanups = []
+
+ for (var i = 0; i < stuff.length; i++) {
+ var arr = stuff[i]
+
+ if (!Array.isArray(arr) || arr.length < 2)
+ throw new TypeError('each array member must be [ee, events...]')
+
+ var ee = arr[0]
+
+ for (var j = 1; j < arr.length; j++) {
+ var event = arr[j]
+ var fn = listener(event, callback)
+
+ // listen to the event
+ ee.on(event, fn)
+ // push this listener to the list of cleanups
+ cleanups.push({
+ ee: ee,
+ event: event,
+ fn: fn,
+ })
+ }
+ }
+
+ function callback() {
+ cleanup()
+ done.apply(null, arguments)
+ }
+
+ function cleanup() {
+ var x
+ for (var i = 0; i < cleanups.length; i++) {
+ x = cleanups[i]
+ x.ee.removeListener(x.event, x.fn)
+ }
+ }
+
+ function thunk(fn) {
+ done = fn
+ }
+
+ thunk.cancel = cleanup
+
+ return thunk
+}
+
+function listener(event, done) {
+ return function onevent(arg1) {
+ var args = new Array(arguments.length)
+ var ee = this
+ var err = event === 'error'
+ ? arg1
+ : null
+
+ // copy args to prevent arguments escaping scope
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
+ }
+
+ done(err, ee, event, args)
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json
new file mode 100644
index 0000000..5b39931
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "ee-first",
+ "description": "return the first event in a set of ee/event pairs",
+ "version": "1.1.0",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jonathanong/ee-first"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.2",
+ "mocha": "1"
+ },
+ "files": [
+ "index.js",
+ "LICENSE"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "a6412004da4745941af2fc98ec30c8da570da7ea",
+ "bugs": {
+ "url": "https://github.com/jonathanong/ee-first/issues"
+ },
+ "homepage": "https://github.com/jonathanong/ee-first",
+ "_id": "ee-first@1.1.0",
+ "_shasum": "6a0d7c6221e490feefd92ec3f441c9ce8cd097f4",
+ "_from": "ee-first@1.1.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "6a0d7c6221e490feefd92ec3f441c9ce8cd097f4",
+ "tarball": "http://registry.npmjs.org/ee-first/-/ee-first-1.1.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/package.json
new file mode 100644
index 0000000..426e3ff
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/on-finished/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "on-finished",
+ "description": "Execute a callback when a request closes, finishes, or errors",
+ "version": "2.2.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/on-finished"
+ },
+ "dependencies": {
+ "ee-first": "1.1.0"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "fcd56f5674721cac92a16eff93547929716f5192",
+ "bugs": {
+ "url": "https://github.com/jshttp/on-finished/issues"
+ },
+ "homepage": "https://github.com/jshttp/on-finished",
+ "_id": "on-finished@2.2.0",
+ "_shasum": "e6ba6a09a3482d6b7969bc3da92c86f0a967605e",
+ "_from": "on-finished@~2.2.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e6ba6a09a3482d6b7969bc3da92c86f0a967605e",
+ "tarball": "http://registry.npmjs.org/on-finished/-/on-finished-2.2.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.2.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/.npmignore b/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/.npmignore
new file mode 100644
index 0000000..85c82a5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/.npmignore
@@ -0,0 +1,4 @@
+benchmark/
+coverage/
+test/
+.travis.yml
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/HISTORY.md
new file mode 100644
index 0000000..65a0860
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/HISTORY.md
@@ -0,0 +1,42 @@
+1.3.0 / 2014-08-09
+==================
+
+ * Add `parseurl.original` for parsing `req.originalUrl` with fallback
+ * Return `undefined` if `req.url` is `undefined`
+
+1.2.0 / 2014-07-21
+==================
+
+ * Cache URLs based on original value
+ * Remove no-longer-needed URL mis-parse work-around
+ * Simplify the "fast-path" `RegExp`
+
+1.1.3 / 2014-07-08
+==================
+
+ * Fix typo
+
+1.1.2 / 2014-07-08
+==================
+
+ * Seriously fix Node.js 0.8 compatibility
+
+1.1.1 / 2014-07-08
+==================
+
+ * Fix Node.js 0.8 compatibility
+
+1.1.0 / 2014-07-08
+==================
+
+ * Incorporate URL href-only parse fast-path
+
+1.0.1 / 2014-03-08
+==================
+
+ * Add missing `require`
+
+1.0.0 / 2014-03-08
+==================
+
+ * Genesis from `connect`
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/LICENSE
new file mode 100644
index 0000000..ec7dfe7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/LICENSE
@@ -0,0 +1,24 @@
+
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/README.md
new file mode 100644
index 0000000..0db1d02
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/README.md
@@ -0,0 +1,107 @@
+# parseurl
+
+[![NPM version](https://badge.fury.io/js/parseurl.svg)](http://badge.fury.io/js/parseurl)
+[![Build Status](https://travis-ci.org/expressjs/parseurl.svg?branch=master)](https://travis-ci.org/expressjs/parseurl)
+[![Coverage Status](https://img.shields.io/coveralls/expressjs/parseurl.svg?branch=master)](https://coveralls.io/r/expressjs/parseurl)
+
+Parse a URL with memoization.
+
+## Install
+
+```bash
+$ npm install parseurl
+```
+
+## API
+
+```js
+var parseurl = require('parseurl')
+```
+
+### parseurl(req)
+
+Parse the URL of the given request object (looks at the `req.url` property)
+and return the result. The result is the same as `url.parse` in Node.js core.
+Calling this function multiple times on the same `req` where `req.url` does
+not change will return a cached parsed object, rather than parsing again.
+
+### parseurl.original(req)
+
+Parse the original URL of the given request object and return the result.
+This works by trying to parse `req.originalUrl` if it is a string, otherwise
+parses `req.url`. The result is the same as `url.parse` in Node.js core.
+Calling this function multiple times on the same `req` where `req.originalUrl`
+does not change will return a cached parsed object, rather than parsing again.
+
+## Benchmark
+
+```bash
+$ npm run-script bench
+
+> parseurl@1.3.0 bench nodejs-parseurl
+> node benchmark/index.js
+
+> node benchmark/fullurl.js
+
+ Parsing URL "http://localhost:8888/foo/bar?user=tj&pet=fluffy"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 1,290,780 ops/sec ±0.46% (195 runs sampled)
+ nativeurl x 56,401 ops/sec ±0.22% (196 runs sampled)
+ parseurl x 55,231 ops/sec ±0.22% (194 runs sampled)
+
+> node benchmark/pathquery.js
+
+ Parsing URL "/foo/bar?user=tj&pet=fluffy"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 1,986,668 ops/sec ±0.27% (190 runs sampled)
+ nativeurl x 98,740 ops/sec ±0.21% (195 runs sampled)
+ parseurl x 2,628,171 ops/sec ±0.36% (195 runs sampled)
+
+> node benchmark/samerequest.js
+
+ Parsing URL "/foo/bar?user=tj&pet=fluffy" on same request object
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 2,184,468 ops/sec ±0.40% (194 runs sampled)
+ nativeurl x 99,437 ops/sec ±0.71% (194 runs sampled)
+ parseurl x 10,498,005 ops/sec ±0.61% (186 runs sampled)
+
+> node benchmark/simplepath.js
+
+ Parsing URL "/foo/bar"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 4,535,825 ops/sec ±0.27% (191 runs sampled)
+ nativeurl x 98,769 ops/sec ±0.54% (191 runs sampled)
+ parseurl x 4,164,865 ops/sec ±0.34% (192 runs sampled)
+
+> node benchmark/slash.js
+
+ Parsing URL "/"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 4,908,405 ops/sec ±0.42% (191 runs sampled)
+ nativeurl x 100,945 ops/sec ±0.59% (188 runs sampled)
+ parseurl x 4,333,208 ops/sec ±0.27% (194 runs sampled)
+```
+
+## License
+
+ [MIT](LICENSE)
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/index.js
new file mode 100644
index 0000000..8632347
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/index.js
@@ -0,0 +1,136 @@
+/*!
+ * parseurl
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var url = require('url')
+var parse = url.parse
+var Url = url.Url
+
+/**
+ * Pattern for a simple path case.
+ * See: https://github.com/joyent/node/pull/7878
+ */
+
+var simplePathRegExp = /^(\/\/?(?!\/)[^\?#\s]*)(\?[^#\s]*)?$/
+
+/**
+ * Exports.
+ */
+
+module.exports = parseurl
+module.exports.original = originalurl
+
+/**
+ * Parse the `req` url with memoization.
+ *
+ * @param {ServerRequest} req
+ * @return {Object}
+ * @api public
+ */
+
+function parseurl(req) {
+ var url = req.url
+
+ if (url === undefined) {
+ // URL is undefined
+ return undefined
+ }
+
+ var parsed = req._parsedUrl
+
+ if (fresh(url, parsed)) {
+ // Return cached URL parse
+ return parsed
+ }
+
+ // Parse the URL
+ parsed = fastparse(url)
+ parsed._raw = url
+
+ return req._parsedUrl = parsed
+};
+
+/**
+ * Parse the `req` original url with fallback and memoization.
+ *
+ * @param {ServerRequest} req
+ * @return {Object}
+ * @api public
+ */
+
+function originalurl(req) {
+ var url = req.originalUrl
+
+ if (typeof url !== 'string') {
+ // Fallback
+ return parseurl(req)
+ }
+
+ var parsed = req._parsedOriginalUrl
+
+ if (fresh(url, parsed)) {
+ // Return cached URL parse
+ return parsed
+ }
+
+ // Parse the URL
+ parsed = fastparse(url)
+ parsed._raw = url
+
+ return req._parsedOriginalUrl = parsed
+};
+
+/**
+ * Parse the `str` url with fast-path short-cut.
+ *
+ * @param {string} str
+ * @return {Object}
+ * @api private
+ */
+
+function fastparse(str) {
+ // Try fast path regexp
+ // See: https://github.com/joyent/node/pull/7878
+ var simplePath = typeof str === 'string' && simplePathRegExp.exec(str)
+
+ // Construct simple URL
+ if (simplePath) {
+ var pathname = simplePath[1]
+ var search = simplePath[2] || null
+ var url = Url !== undefined
+ ? new Url()
+ : {}
+ url.path = str
+ url.href = str
+ url.pathname = pathname
+ url.search = search
+ url.query = search && search.substr(1)
+
+ return url
+ }
+
+ return parse(str)
+}
+
+/**
+ * Determine if parsed is still fresh for url.
+ *
+ * @param {string} url
+ * @param {object} parsedUrl
+ * @return {boolean}
+ * @api private
+ */
+
+function fresh(url, parsedUrl) {
+ return typeof parsedUrl === 'object'
+ && parsedUrl !== null
+ && (Url === undefined || parsedUrl instanceof Url)
+ && parsedUrl._raw === url
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/package.json
new file mode 100644
index 0000000..6fbd23e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/parseurl/package.json
@@ -0,0 +1,80 @@
+{
+ "name": "parseurl",
+ "description": "parse a url with memoization",
+ "version": "1.3.0",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/expressjs/parseurl"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "fast-url-parser": "~1.0.0",
+ "istanbul": "0.3.0",
+ "mocha": "~1.21.4"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --check-leaks --bail --reporter spec test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/"
+ },
+ "gitHead": "03b7ccca240e2bef5df6c25797e99175d28fb2cb",
+ "bugs": {
+ "url": "https://github.com/expressjs/parseurl/issues"
+ },
+ "homepage": "https://github.com/expressjs/parseurl",
+ "_id": "parseurl@1.3.0",
+ "_shasum": "b58046db4223e145afa76009e61bac87cc2281b3",
+ "_from": "parseurl@~1.3.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b58046db4223e145afa76009e61bac87cc2281b3",
+ "tarball": "http://registry.npmjs.org/parseurl/-/parseurl-1.3.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/.npmignore b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/.npmignore
new file mode 100644
index 0000000..ba2a97b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/.npmignore
@@ -0,0 +1,2 @@
+node_modules
+coverage
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/History.md b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/History.md
new file mode 100644
index 0000000..f962cfa
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/History.md
@@ -0,0 +1,16 @@
+0.1.3 / 2014-07-06
+==================
+
+ * Better array support
+ * Improved support for trailing slash in non-ending mode
+
+0.1.0 / 2014-03-06
+==================
+
+ * add options.end
+
+0.0.2 / 2013-02-10
+==================
+
+ * Update to match current express
+ * add .license property to component.json
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/Readme.md b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/Readme.md
new file mode 100644
index 0000000..9199e38
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/Readme.md
@@ -0,0 +1,33 @@
+
+# Path-to-RegExp
+
+ Turn an Express-style path string such as `/user/:name` into a regular expression.
+
+## Usage
+
+```javascript
+var pathToRegexp = require('path-to-regexp');
+```
+### pathToRegexp(path, keys, options)
+
+ - **path** A string in the express format, an array of such strings, or a regular expression
+ - **keys** An array to be populated with the keys present in the url. Once the function completes, this will be an array of strings.
+ - **options**
+ - **options.sensitive** Defaults to false, set this to true to make routes case sensitive
+ - **options.strict** Defaults to false, set this to true to make the trailing slash matter.
+ - **options.end** Defaults to true, set this to false to only match the prefix of the URL.
+
+```javascript
+var keys = [];
+var exp = pathToRegexp('/foo/:bar', keys);
+//keys = ['bar']
+//exp = /^\/foo\/(?:([^\/]+?))\/?$/i
+```
+
+## Live Demo
+
+You can see a live demo of this library in use at [express-route-tester](http://forbeslindesay.github.com/express-route-tester/).
+
+## License
+
+ MIT
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/component.json b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/component.json
new file mode 100644
index 0000000..6ab37d3
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/component.json
@@ -0,0 +1,15 @@
+{
+ "name": "path-to-regexp",
+ "description": "Express style path to RegExp utility",
+ "version": "0.1.3",
+ "keywords": [
+ "express",
+ "regexp",
+ "route",
+ "routing"
+ ],
+ "scripts": [
+ "index.js"
+ ],
+ "license": "MIT"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/index.js
new file mode 100644
index 0000000..2801f91
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/index.js
@@ -0,0 +1,70 @@
+/**
+ * Expose `pathtoRegexp`.
+ */
+
+module.exports = pathtoRegexp;
+
+/**
+ * Normalize the given path string,
+ * returning a regular expression.
+ *
+ * An empty array should be passed,
+ * which will contain the placeholder
+ * key names. For example "/user/:id" will
+ * then contain ["id"].
+ *
+ * @param {String|RegExp|Array} path
+ * @param {Array} keys
+ * @param {Object} options
+ * @return {RegExp}
+ * @api private
+ */
+
+function pathtoRegexp(path, keys, options) {
+ options = options || {};
+ var strict = options.strict;
+ var end = options.end !== false;
+ var flags = options.sensitive ? '' : 'i';
+ keys = keys || [];
+
+ if (path instanceof RegExp) {
+ return path;
+ }
+
+ if (Array.isArray(path)) {
+ // Map array parts into regexps and return their source. We also pass
+ // the same keys and options instance into every generation to get
+ // consistent matching groups before we join the sources together.
+ path = path.map(function (value) {
+ return pathtoRegexp(value, keys, options).source;
+ });
+
+ return new RegExp('(?:' + path.join('|') + ')', flags);
+ }
+
+ path = ('^' + path + (strict ? '' : path[path.length - 1] === '/' ? '?' : '/?'))
+ .replace(/\/\(/g, '/(?:')
+ .replace(/([\/\.])/g, '\\$1')
+ .replace(/(\\\/)?(\\\.)?:(\w+)(\(.*?\))?(\*)?(\?)?/g, function (match, slash, format, key, capture, star, optional) {
+ slash = slash || '';
+ format = format || '';
+ capture = capture || '([^\\/' + format + ']+?)';
+ optional = optional || '';
+
+ keys.push({ name: key, optional: !!optional });
+
+ return ''
+ + (optional ? '' : slash)
+ + '(?:'
+ + format + (optional ? slash : '') + capture
+ + (star ? '((?:[\\/' + format + '].+?)?)' : '')
+ + ')'
+ + optional;
+ })
+ .replace(/\*/g, '(.*)');
+
+ // If the path is non-ending, match until the end or a slash.
+ path += (end ? '$' : (path[path.length - 1] === '/' ? '' : '(?=\\/|$)'));
+
+ return new RegExp(path, flags);
+};
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/package.json
new file mode 100644
index 0000000..e682677
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/package.json
@@ -0,0 +1,161 @@
+{
+ "name": "path-to-regexp",
+ "description": "Express style path to RegExp utility",
+ "version": "0.1.3",
+ "scripts": {
+ "test": "istanbul cover _mocha -- -R spec"
+ },
+ "keywords": [
+ "express",
+ "regexp"
+ ],
+ "component": {
+ "scripts": {
+ "path-to-regexp": "index.js"
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/component/path-to-regexp.git"
+ },
+ "devDependencies": {
+ "mocha": "^1.17.1",
+ "istanbul": "^0.2.6"
+ },
+ "bugs": {
+ "url": "https://github.com/component/path-to-regexp/issues"
+ },
+ "homepage": "https://github.com/component/path-to-regexp",
+ "_id": "path-to-regexp@0.1.3",
+ "_shasum": "21b9ab82274279de25b156ea08fd12ca51b8aecb",
+ "_from": "path-to-regexp@0.1.3",
+ "_npmVersion": "1.4.9",
+ "_npmUser": {
+ "name": "blakeembrey",
+ "email": "hello@blakeembrey.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dominicbarnes",
+ "email": "dominic@dbarnes.info"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ },
+ {
+ "name": "retrofox",
+ "email": "rdsuarez@gmail.com"
+ },
+ {
+ "name": "coreh",
+ "email": "thecoreh@gmail.com"
+ },
+ {
+ "name": "forbeslindesay",
+ "email": "forbes@lindesay.co.uk"
+ },
+ {
+ "name": "kelonye",
+ "email": "kelonyemitchel@gmail.com"
+ },
+ {
+ "name": "mattmueller",
+ "email": "mattmuelle@gmail.com"
+ },
+ {
+ "name": "yields",
+ "email": "yields@icloud.com"
+ },
+ {
+ "name": "anthonyshort",
+ "email": "antshort@gmail.com"
+ },
+ {
+ "name": "ianstormtaylor",
+ "email": "ian@ianstormtaylor.com"
+ },
+ {
+ "name": "cristiandouce",
+ "email": "cristian@gravityonmars.com"
+ },
+ {
+ "name": "swatinem",
+ "email": "arpad.borsos@googlemail.com"
+ },
+ {
+ "name": "stagas",
+ "email": "gstagas@gmail.com"
+ },
+ {
+ "name": "amasad",
+ "email": "amjad.masad@gmail.com"
+ },
+ {
+ "name": "juliangruber",
+ "email": "julian@juliangruber.com"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "calvinfo",
+ "email": "calvin@calv.info"
+ },
+ {
+ "name": "blakeembrey",
+ "email": "hello@blakeembrey.com"
+ },
+ {
+ "name": "timoxley",
+ "email": "secoif@gmail.com"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "queckezz",
+ "email": "fabian.eichenberger@gmail.com"
+ },
+ {
+ "name": "nami-doc",
+ "email": "vendethiel@hotmail.fr"
+ },
+ {
+ "name": "clintwood",
+ "email": "clint@anotherway.co.za"
+ },
+ {
+ "name": "thehydroimpulse",
+ "email": "dnfagnan@gmail.com"
+ },
+ {
+ "name": "stephenmathieson",
+ "email": "me@stephenmathieson.com"
+ },
+ {
+ "name": "trevorgerhardt",
+ "email": "trevorgerhardt@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "21b9ab82274279de25b156ea08fd12ca51b8aecb",
+ "tarball": "http://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.3.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.3.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/test.js b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/test.js
new file mode 100644
index 0000000..4a0c270
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/path-to-regexp/test.js
@@ -0,0 +1,616 @@
+var pathToRegExp = require('./');
+var assert = require('assert');
+
+describe('path-to-regexp', function () {
+ describe('strings', function () {
+ it('should match simple paths', function () {
+ var params = [];
+ var m = pathToRegExp('/test', params).exec('/test');
+
+ assert.equal(params.length, 0);
+
+ assert.equal(m.length, 1);
+ assert.equal(m[0], '/test');
+ });
+
+ it('should match express format params', function () {
+ var params = [];
+ var m = pathToRegExp('/:test', params).exec('/pathname');
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/pathname');
+ assert.equal(m[1], 'pathname');
+ });
+
+ it('should do strict matches', function () {
+ var params = [];
+ var re = pathToRegExp('/:test', params, { strict: true });
+ var m;
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+
+ m = re.exec('/route');
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/route');
+ assert.equal(m[1], 'route');
+
+ m = re.exec('/route/');
+
+ assert.ok(!m);
+ });
+
+ it('should do strict matches with trailing slashes', function () {
+ var params = [];
+ var re = pathToRegExp('/:test/', params, { strict: true });
+ var m;
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+
+ m = re.exec('/route');
+
+ assert.ok(!m);
+
+ m = re.exec('/route/');
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/route/');
+ assert.equal(m[1], 'route');
+
+ m = re.exec('/route//');
+
+ assert.ok(!m);
+ });
+
+ it('should allow optional express format params', function () {
+ var params = [];
+ var re = pathToRegExp('/:test?', params);
+ var m;
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, true);
+
+ m = re.exec('/route');
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/route');
+ assert.equal(m[1], 'route');
+
+ m = re.exec('/');
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/');
+ assert.equal(m[1], undefined);
+ });
+
+ it('should allow express format param regexps', function () {
+ var params = [];
+ var m = pathToRegExp('/:page(\\d+)', params).exec('/56');
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'page');
+ assert.equal(params[0].optional, false);
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/56');
+ assert.equal(m[1], '56');
+ });
+
+ it('should match without a prefixed slash', function () {
+ var params = [];
+ var m = pathToRegExp(':test', params).exec('string');
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], 'string');
+ assert.equal(m[1], 'string');
+ });
+
+ it('should not match format parts', function () {
+ var params = [];
+ var m = pathToRegExp('/:test.json', params).exec('/route.json');
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/route.json');
+ assert.equal(m[1], 'route');
+ });
+
+ it('should match format parts', function () {
+ var params = [];
+ var re = pathToRegExp('/:test.:format', params);
+ var m;
+
+ assert.equal(params.length, 2);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+ assert.equal(params[1].name, 'format');
+ assert.equal(params[1].optional, false);
+
+ m = re.exec('/route.json');
+
+ assert.equal(m.length, 3);
+ assert.equal(m[0], '/route.json');
+ assert.equal(m[1], 'route');
+ assert.equal(m[2], 'json');
+
+ m = re.exec('/route');
+
+ assert.ok(!m);
+ });
+
+ it('should match route parts with a trailing format', function () {
+ var params = [];
+ var m = pathToRegExp('/:test.json', params).exec('/route.json');
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/route.json');
+ assert.equal(m[1], 'route');
+ });
+
+ it('should match optional trailing routes', function () {
+ var params = [];
+ var m = pathToRegExp('/test*', params).exec('/test/route');
+
+ assert.equal(params.length, 0);
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/test/route');
+ assert.equal(m[1], '/route');
+ });
+
+ it('should match optional trailing routes after a param', function () {
+ var params = [];
+ var re = pathToRegExp('/:test*', params);
+ var m;
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+
+ m = re.exec('/test/route');
+
+ assert.equal(m.length, 3);
+ assert.equal(m[0], '/test/route');
+ assert.equal(m[1], 'test');
+ assert.equal(m[2], '/route');
+
+ m = re.exec('/testing');
+
+ assert.equal(m.length, 3);
+ assert.equal(m[0], '/testing');
+ assert.equal(m[1], 'testing');
+ assert.equal(m[2], '');
+ });
+
+ it('should match optional trailing routes before a format', function () {
+ var params = [];
+ var re = pathToRegExp('/test*.json', params);
+ var m;
+
+ assert.equal(params.length, 0);
+
+ m = re.exec('/test.json');
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/test.json');
+ assert.equal(m[1], '');
+
+ m = re.exec('/testing.json');
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/testing.json');
+ assert.equal(m[1], 'ing');
+
+ m = re.exec('/test/route.json');
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/test/route.json');
+ assert.equal(m[1], '/route');
+ });
+
+ it('should match optional trailing routes after a param and before a format', function () {
+ var params = [];
+ var re = pathToRegExp('/:test*.json', params);
+ var m;
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+
+ m = re.exec('/testing.json');
+
+ assert.equal(m.length, 3);
+ assert.equal(m[0], '/testing.json');
+ assert.equal(m[1], 'testing');
+ assert.equal(m[2], '');
+
+ m = re.exec('/test/route.json');
+
+ assert.equal(m.length, 3);
+ assert.equal(m[0], '/test/route.json');
+ assert.equal(m[1], 'test');
+ assert.equal(m[2], '/route');
+
+ m = re.exec('.json');
+
+ assert.ok(!m);
+ });
+
+ it('should match optional trailing routes between a normal param and a format param', function () {
+ var params = [];
+ var re = pathToRegExp('/:test*.:format', params);
+ var m;
+
+ assert.equal(params.length, 2);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+ assert.equal(params[1].name, 'format');
+ assert.equal(params[1].optional, false);
+
+ m = re.exec('/testing.json');
+
+ assert.equal(m.length, 4);
+ assert.equal(m[0], '/testing.json');
+ assert.equal(m[1], 'testing');
+ assert.equal(m[2], '');
+ assert.equal(m[3], 'json');
+
+ m = re.exec('/test/route.json');
+
+ assert.equal(m.length, 4);
+ assert.equal(m[0], '/test/route.json');
+ assert.equal(m[1], 'test');
+ assert.equal(m[2], '/route');
+ assert.equal(m[3], 'json');
+
+ m = re.exec('/test');
+
+ assert.ok(!m);
+
+ m = re.exec('.json');
+
+ assert.ok(!m);
+ });
+
+ it('should match optional trailing routes after a param and before an optional format param', function () {
+ var params = [];
+ var re = pathToRegExp('/:test*.:format?', params);
+ var m;
+
+ assert.equal(params.length, 2);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+ assert.equal(params[1].name, 'format');
+ assert.equal(params[1].optional, true);
+
+ m = re.exec('/testing.json');
+
+ assert.equal(m.length, 4);
+ assert.equal(m[0], '/testing.json');
+ assert.equal(m[1], 'testing');
+ assert.equal(m[2], '');
+ assert.equal(m[3], 'json');
+
+ m = re.exec('/test/route.json');
+
+ assert.equal(m.length, 4);
+ assert.equal(m[0], '/test/route.json');
+ assert.equal(m[1], 'test');
+ assert.equal(m[2], '/route');
+ assert.equal(m[3], 'json');
+
+ m = re.exec('/test');
+
+ assert.equal(m.length, 4);
+ assert.equal(m[0], '/test');
+ assert.equal(m[1], 'test');
+ assert.equal(m[2], '');
+ assert.equal(m[3], undefined);
+
+ m = re.exec('.json');
+
+ assert.ok(!m);
+ });
+
+ it('should match optional trailing routes inside optional express param', function () {
+ var params = [];
+ var re = pathToRegExp('/:test*?', params);
+ var m;
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, true);
+
+ m = re.exec('/test/route');
+
+ assert.equal(m.length, 3);
+ assert.equal(m[0], '/test/route');
+ assert.equal(m[1], 'test');
+ assert.equal(m[2], '/route');
+
+ m = re.exec('/test');
+
+ assert.equal(m.length, 3);
+ assert.equal(m[0], '/test');
+ assert.equal(m[1], 'test');
+ assert.equal(m[2], '');
+
+ m = re.exec('/');
+
+ assert.equal(m.length, 3);
+ assert.equal(m[0], '/');
+ assert.equal(m[1], undefined);
+ assert.equal(m[2], undefined);
+ });
+
+ it('should do case insensitive matches', function () {
+ var m = pathToRegExp('/test').exec('/TEST');
+
+ assert.equal(m[0], '/TEST');
+ });
+
+ it('should do case sensitive matches', function () {
+ var re = pathToRegExp('/test', null, { sensitive: true });
+ var m;
+
+ m = re.exec('/test');
+
+ assert.equal(m.length, 1);
+ assert.equal(m[0], '/test');
+
+ m = re.exec('/TEST');
+
+ assert.ok(!m);
+ });
+
+ it('should do non-ending matches', function () {
+ var params = [];
+ var m = pathToRegExp('/:test', params, { end: false }).exec('/test/route');
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/test');
+ assert.equal(m[1], 'test');
+ });
+
+ it('should match trailing slashes in non-ending non-strict mode', function () {
+ var params = [];
+ var re = pathToRegExp('/:test', params, { end: false });
+ var m;
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+
+ m = re.exec('/test/');
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/test/');
+ assert.equal(m[1], 'test');
+ });
+
+ it('should match trailing slashes in non-ending non-strict mode', function () {
+ var params = [];
+ var re = pathToRegExp('/route/', params, { end: false });
+ var m;
+
+ assert.equal(params.length, 0);
+
+ m = re.exec('/route/');
+
+ assert.equal(m.length, 1);
+ assert.equal(m[0], '/route/');
+
+ m = re.exec('/route/test');
+
+ assert.equal(m.length, 1);
+ assert.equal(m[0], '/route');
+
+ m = re.exec('/route');
+
+ assert.equal(m.length, 1);
+ assert.equal(m[0], '/route');
+
+ m = re.exec('/route//');
+
+ assert.equal(m.length, 1);
+ assert.equal(m[0], '/route/');
+ });
+
+ it('should match trailing slashing in non-ending strict mode', function () {
+ var params = [];
+ var re = pathToRegExp('/route/', params, { end: false, strict: true });
+
+ assert.equal(params.length, 0);
+
+ m = re.exec('/route/');
+
+ assert.equal(m.length, 1);
+ assert.equal(m[0], '/route/');
+
+ m = re.exec('/route/test');
+
+ assert.equal(m.length, 1);
+ assert.equal(m[0], '/route/');
+
+ m = re.exec('/route');
+
+ assert.ok(!m);
+
+ m = re.exec('/route//');
+
+ assert.equal(m.length, 1);
+ assert.equal(m[0], '/route/');
+ });
+
+ it('should not match trailing slashes in non-ending strict mode', function () {
+ var params = [];
+ var re = pathToRegExp('/route', params, { end: false, strict: true });
+
+ assert.equal(params.length, 0);
+
+ m = re.exec('/route');
+
+ assert.equal(m.length, 1);
+ assert.equal(m[0], '/route');
+
+ m = re.exec('/route/');
+
+ assert.ok(m.length, 1);
+ assert.equal(m[0], '/route');
+ });
+
+ it('should match text after an express param', function () {
+ var params = [];
+ var re = pathToRegExp('/(:test)route', params);
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+
+ m = re.exec('/route');
+
+ assert.ok(!m);
+
+ m = re.exec('/testroute');
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/testroute');
+ assert.equal(m[1], 'test');
+
+ m = re.exec('testroute');
+
+ assert.ok(!m);
+ });
+
+ it('should match text after an optional express param', function () {
+ var params = [];
+ var re = pathToRegExp('/(:test?)route', params);
+ var m;
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, true);
+
+ m = re.exec('/route');
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/route');
+ assert.equal(m[1], undefined);
+
+ m = re.exec('/testroute');
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/testroute');
+ assert.equal(m[1], 'test');
+
+ m = re.exec('route');
+
+ assert.ok(!m);
+ });
+
+ it('should match optional formats', function () {
+ var params = [];
+ var re = pathToRegExp('/:test.:format?', params);
+ var m;
+
+ assert.equal(params.length, 2);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+ assert.equal(params[1].name, 'format');
+ assert.equal(params[1].optional, true);
+
+ m = re.exec('/route');
+
+ assert.equal(m.length, 3);
+ assert.equal(m[0], '/route');
+ assert.equal(m[1], 'route');
+ assert.equal(m[2], undefined);
+
+ m = re.exec('/route.json');
+
+ assert.equal(m.length, 3);
+ assert.equal(m[0], '/route.json');
+ assert.equal(m[1], 'route');
+ assert.equal(m[2], 'json');
+ });
+
+ it('should match full paths with format by default', function () {
+ var params = [];
+ var m = pathToRegExp('/:test', params).exec('/test.json');
+
+ assert.equal(params.length, 1);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+
+ assert.equal(m.length, 2);
+ assert.equal(m[0], '/test.json');
+ assert.equal(m[1], 'test.json');
+ });
+ });
+
+ describe('regexps', function () {
+ it('should return the regexp', function () {
+ assert.deepEqual(pathToRegExp(/.*/), /.*/);
+ });
+ });
+
+ describe('arrays', function () {
+ it('should join arrays parts', function () {
+ var re = pathToRegExp(['/test', '/route']);
+
+ assert.ok(re.test('/test'));
+ assert.ok(re.test('/route'));
+ assert.ok(!re.test('/else'));
+ });
+
+ it('should match parts properly', function () {
+ var params = [];
+ var re = pathToRegExp(['/:test', '/test/:route'], params);
+ var m;
+
+ assert.equal(params.length, 2);
+ assert.equal(params[0].name, 'test');
+ assert.equal(params[0].optional, false);
+ assert.equal(params[1].name, 'route');
+ assert.equal(params[1].optional, false);
+
+ m = re.exec('/route');
+
+ assert.equal(m.length, 3);
+ assert.equal(m[0], '/route');
+ assert.equal(m[1], 'route');
+ assert.equal(m[2], undefined);
+
+ m = re.exec('/test/path');
+
+ assert.equal(m.length, 3);
+ assert.equal(m[0], '/test/path');
+ assert.equal(m[1], undefined);
+ assert.equal(m[2], 'path');
+ });
+ });
+});
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/HISTORY.md
new file mode 100644
index 0000000..319b2ad
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/HISTORY.md
@@ -0,0 +1,55 @@
+1.0.6 / 2015-02-01
+==================
+
+ * deps: ipaddr.js@0.1.8
+
+1.0.5 / 2015-01-08
+==================
+
+ * deps: ipaddr.js@0.1.6
+
+1.0.4 / 2014-11-23
+==================
+
+ * deps: ipaddr.js@0.1.5
+ - Fix edge cases with `isValid`
+
+1.0.3 / 2014-09-21
+==================
+
+ * Use `forwarded` npm module
+
+1.0.2 / 2014-09-18
+==================
+
+ * Fix a global leak when multiple subnets are trusted
+ * Support Node.js 0.6
+ * deps: ipaddr.js@0.1.3
+
+1.0.1 / 2014-06-03
+==================
+
+ * Fix links in npm package
+
+1.0.0 / 2014-05-08
+==================
+
+ * Add `trust` argument to determine proxy trust on
+ * Accepts custom function
+ * Accepts IPv4/IPv6 address(es)
+ * Accepts subnets
+ * Accepts pre-defined names
+ * Add optional `trust` argument to `proxyaddr.all` to
+ stop at first untrusted
+ * Add `proxyaddr.compile` to pre-compile `trust` function
+ to make subsequent calls faster
+
+0.0.1 / 2014-05-04
+==================
+
+ * Fix bad npm publish
+
+0.0.0 / 2014-05-04
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/README.md
new file mode 100644
index 0000000..57ec4cd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/README.md
@@ -0,0 +1,137 @@
+# proxy-addr
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Determine address of proxied request
+
+## Install
+
+```sh
+$ npm install proxy-addr
+```
+
+## API
+
+```js
+var proxyaddr = require('proxy-addr')
+```
+
+### proxyaddr(req, trust)
+
+Return the address of the request, using the given `trust` parameter.
+
+The `trust` argument is a function that returns `true` if you trust
+the address, `false` if you don't. The closest untrusted address is
+returned.
+
+```js
+proxyaddr(req, function(addr){ return addr === '127.0.0.1' })
+proxyaddr(req, function(addr, i){ return i < 1 })
+```
+
+The `trust` arugment may also be a single IP address string or an
+array of trusted addresses, as plain IP addresses, CIDR-formatted
+strings, or IP/netmask strings.
+
+```js
+proxyaddr(req, '127.0.0.1')
+proxyaddr(req, ['127.0.0.0/8', '10.0.0.0/8'])
+proxyaddr(req, ['127.0.0.0/255.0.0.0', '192.168.0.0/255.255.0.0'])
+```
+
+This module also supports IPv6. Your IPv6 addresses will be normalized
+automatically (i.e. `fe80::00ed:1` equals `fe80:0:0:0:0:0:ed:1`).
+
+```js
+proxyaddr(req, '::1')
+proxyaddr(req, ['::1/128', 'fe80::/10'])
+proxyaddr(req, ['fe80::/ffc0::'])
+```
+
+This module will automatically work with IPv4-mapped IPv6 addresses
+as well to support node.js in IPv6-only mode. This means that you do
+not have to specify both `::ffff:a00:1` and `10.0.0.1`.
+
+As a convenience, this module also takes certain pre-defined names
+in addition to IP addresses, which expand into IP addresses:
+
+```js
+proxyaddr(req, 'loopback')
+proxyaddr(req, ['loopback', 'fc00:ac:1ab5:fff::1/64'])
+```
+
+ * `loopback`: IPv4 and IPv6 loopback addresses (like `::1` and
+ `127.0.0.1`).
+ * `linklocal`: IPv4 and IPv6 link-local addresses (like
+ `fe80::1:1:1:1` and `169.254.0.1`).
+ * `uniquelocal`: IPv4 private addresses and IPv6 unique-local
+ addresses (like `fc00:ac:1ab5:fff::1` and `192.168.0.1`).
+
+When `trust` is specified as a function, it will be called for each
+address to determine if it is a trusted address. The function is
+given two arguments: `addr` and `i`, where `addr` is a string of
+the address to check and `i` is a number that represents the distance
+from the socket address.
+
+### proxyaddr.all(req, [trust])
+
+Return all the addresses of the request, optionally stopping at the
+first untrusted. This array is ordered from closest to furthest
+(i.e. `arr[0] === req.connection.remoteAddress`).
+
+```js
+proxyaddr.all(req)
+```
+
+The optional `trust` argument takes the same arguments as `trust`
+does in `proxyaddr(req, trust)`.
+
+```js
+proxyaddr.all(req, 'loopback')
+```
+
+### proxyaddr.compile(val)
+
+Compiles argument `val` into a `trust` function. This function takes
+the same arguments as `trust` does in `proxyaddr(req, trust)` and
+returns a function suitable for `proxyaddr(req, trust)`.
+
+```js
+var trust = proxyaddr.compile('localhost')
+var addr = proxyaddr(req, trust)
+```
+
+This function is meant to be optimized for use against every request.
+It is recommend to compile a trust function up-front for the trusted
+configuration and pass that to `proxyaddr(req, trust)` for each request.
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## Benchmarks
+
+```sh
+$ npm run-script bench
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/proxy-addr.svg?style=flat
+[npm-url]: https://npmjs.org/package/proxy-addr
+[node-version-image]: https://img.shields.io/node/v/proxy-addr.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/proxy-addr.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/proxy-addr
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/proxy-addr.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/proxy-addr?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/proxy-addr.svg?style=flat
+[downloads-url]: https://npmjs.org/package/proxy-addr
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/index.js
new file mode 100644
index 0000000..d739513
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/index.js
@@ -0,0 +1,345 @@
+/*!
+ * proxy-addr
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = proxyaddr;
+module.exports.all = alladdrs;
+module.exports.compile = compile;
+
+/**
+ * Module dependencies.
+ */
+
+var forwarded = require('forwarded');
+var ipaddr = require('ipaddr.js');
+
+/**
+ * Variables.
+ */
+
+var digitre = /^[0-9]+$/;
+var isip = ipaddr.isValid;
+var parseip = ipaddr.parse;
+
+/**
+ * Pre-defined IP ranges.
+ */
+
+var ipranges = {
+ linklocal: ['169.254.0.0/16', 'fe80::/10'],
+ loopback: ['127.0.0.1/8', '::1/128'],
+ uniquelocal: ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', 'fc00::/7']
+};
+
+/**
+ * Get all addresses in the request, optionally stopping
+ * at the first untrusted.
+ *
+ * @param {Object} request
+ * @param {Function|Array|String} [trust]
+ * @api public
+ */
+
+function alladdrs(req, trust) {
+ // get addresses
+ var addrs = forwarded(req);
+
+ if (!trust) {
+ // Return all addresses
+ return addrs;
+ }
+
+ if (typeof trust !== 'function') {
+ trust = compile(trust);
+ }
+
+ for (var i = 0; i < addrs.length - 1; i++) {
+ if (trust(addrs[i], i)) continue;
+
+ addrs.length = i + 1;
+ }
+
+ return addrs;
+}
+
+/**
+ * Compile argument into trust function.
+ *
+ * @param {Array|String} val
+ * @api private
+ */
+
+function compile(val) {
+ if (!val) {
+ throw new TypeError('argument is required');
+ }
+
+ var trust = typeof val === 'string'
+ ? [val]
+ : val;
+
+ if (!Array.isArray(trust)) {
+ throw new TypeError('unsupported trust argument');
+ }
+
+ for (var i = 0; i < trust.length; i++) {
+ val = trust[i];
+
+ if (!ipranges.hasOwnProperty(val)) {
+ continue;
+ }
+
+ // Splice in pre-defined range
+ val = ipranges[val];
+ trust.splice.apply(trust, [i, 1].concat(val));
+ i += val.length - 1;
+ }
+
+ return compileTrust(compileRangeSubnets(trust));
+}
+
+/**
+ * Compile `arr` elements into range subnets.
+ *
+ * @param {Array} arr
+ * @api private
+ */
+
+function compileRangeSubnets(arr) {
+ var rangeSubnets = new Array(arr.length);
+
+ for (var i = 0; i < arr.length; i++) {
+ rangeSubnets[i] = parseipNotation(arr[i]);
+ }
+
+ return rangeSubnets;
+}
+
+/**
+ * Compile range subnet array into trust function.
+ *
+ * @param {Array} rangeSubnets
+ * @api private
+ */
+
+function compileTrust(rangeSubnets) {
+ // Return optimized function based on length
+ var len = rangeSubnets.length;
+ return len === 0
+ ? trustNone
+ : len === 1
+ ? trustSingle(rangeSubnets[0])
+ : trustMulti(rangeSubnets);
+}
+
+/**
+ * Parse IP notation string into range subnet.
+ *
+ * @param {String} note
+ * @api private
+ */
+
+function parseipNotation(note) {
+ var ip;
+ var kind;
+ var max;
+ var pos = note.lastIndexOf('/');
+ var range;
+
+ ip = pos !== -1
+ ? note.substring(0, pos)
+ : note;
+
+ if (!isip(ip)) {
+ throw new TypeError('invalid IP address: ' + ip);
+ }
+
+ ip = parseip(ip);
+
+ kind = ip.kind();
+ max = kind === 'ipv6'
+ ? 128
+ : 32;
+
+ range = pos !== -1
+ ? note.substring(pos + 1, note.length)
+ : max;
+
+ if (typeof range !== 'number') {
+ range = digitre.test(range)
+ ? parseInt(range, 10)
+ : isip(range)
+ ? parseNetmask(range)
+ : 0;
+ }
+
+ if (ip.kind() === 'ipv6' && ip.isIPv4MappedAddress()) {
+ // Store as IPv4
+ ip = ip.toIPv4Address();
+ range = range <= max
+ ? range - 96
+ : range;
+ }
+
+ if (range <= 0 || range > max) {
+ throw new TypeError('invalid range on address: ' + note);
+ }
+
+ return [ip, range];
+}
+
+/**
+ * Parse netmask string into CIDR range.
+ *
+ * @param {String} note
+ * @api private
+ */
+
+function parseNetmask(netmask) {
+ var ip = parseip(netmask);
+ var parts;
+ var size;
+
+ switch (ip.kind()) {
+ case 'ipv4':
+ parts = ip.octets;
+ size = 8;
+ break;
+ case 'ipv6':
+ parts = ip.parts;
+ size = 16;
+ break;
+ }
+
+ var max = Math.pow(2, size) - 1;
+ var part;
+ var range = 0;
+
+ for (var i = 0; i < parts.length; i++) {
+ part = parts[i] & max;
+
+ if (part === max) {
+ range += size;
+ continue;
+ }
+
+ while (part) {
+ part = (part << 1) & max;
+ range += 1;
+ }
+
+ break;
+ }
+
+ return range;
+}
+
+/**
+ * Determine address of proxied request.
+ *
+ * @param {Object} request
+ * @param {Function|Array|String} trust
+ * @api public
+ */
+
+function proxyaddr(req, trust) {
+ if (!req) {
+ throw new TypeError('req argument is required');
+ }
+
+ if (!trust) {
+ throw new TypeError('trust argument is required');
+ }
+
+ var addrs = alladdrs(req, trust);
+ var addr = addrs[addrs.length - 1];
+
+ return addr;
+}
+
+/**
+ * Static trust function to trust nothing.
+ *
+ * @api private
+ */
+
+function trustNone() {
+ return false;
+}
+
+/**
+ * Compile trust function for multiple subnets.
+ *
+ * @param {Array} subnets
+ * @api private
+ */
+
+function trustMulti(subnets) {
+ return function trust(addr) {
+ if (!isip(addr)) return false;
+
+ var ip = parseip(addr);
+ var ipv4;
+ var kind = ip.kind();
+ var subnet;
+ var subnetip;
+ var subnetkind;
+ var subnetrange;
+ var trusted;
+
+ for (var i = 0; i < subnets.length; i++) {
+ subnet = subnets[i];
+ subnetip = subnet[0];
+ subnetkind = subnetip.kind();
+ subnetrange = subnet[1];
+ trusted = ip;
+
+ if (kind !== subnetkind) {
+ if (kind !== 'ipv6' || subnetkind !== 'ipv4' || !ip.isIPv4MappedAddress()) {
+ continue;
+ }
+
+ // Store addr as IPv4
+ ipv4 = ipv4 || ip.toIPv4Address();
+ trusted = ipv4;
+ }
+
+ if (trusted.match(subnetip, subnetrange)) return true;
+ }
+
+ return false;
+ };
+}
+
+/**
+ * Compile trust function for single subnet.
+ *
+ * @param {Object} subnet
+ * @api private
+ */
+
+function trustSingle(subnet) {
+ var subnetip = subnet[0];
+ var subnetkind = subnetip.kind();
+ var subnetisipv4 = subnetkind === 'ipv4';
+ var subnetrange = subnet[1];
+
+ return function trust(addr) {
+ if (!isip(addr)) return false;
+
+ var ip = parseip(addr);
+ var kind = ip.kind();
+
+ return kind === subnetkind
+ ? ip.match(subnetip, subnetrange)
+ : subnetisipv4 && kind === 'ipv6' && ip.isIPv4MappedAddress()
+ ? ip.toIPv4Address().match(subnetip, subnetrange)
+ : false;
+ };
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md
new file mode 100644
index 0000000..97fa1d1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md
@@ -0,0 +1,4 @@
+0.1.0 / 2014-09-21
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md
new file mode 100644
index 0000000..2b4988f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md
@@ -0,0 +1,53 @@
+# forwarded
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Parse HTTP X-Forwarded-For header
+
+## Installation
+
+```sh
+$ npm install forwarded
+```
+
+## API
+
+```js
+var forwarded = require('forwarded')
+```
+
+### forwarded(req)
+
+```js
+var addresses = forwarded(req)
+```
+
+Parse the `X-Forwarded-For` header from the request. Returns an array
+of the addresses, including the socket address for the `req`. In reverse
+order (i.e. index `0` is the socket address and the last index is the
+furthest address, typically the end-user).
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/forwarded.svg?style=flat
+[npm-url]: https://npmjs.org/package/forwarded
+[node-version-image]: https://img.shields.io/node/v/forwarded.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/forwarded.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/forwarded
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/forwarded.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/forwarded?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/forwarded.svg?style=flat
+[downloads-url]: https://npmjs.org/package/forwarded
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js
new file mode 100644
index 0000000..2f5c340
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js
@@ -0,0 +1,35 @@
+/*!
+ * forwarded
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = forwarded
+
+/**
+ * Get all addresses in the request, using the `X-Forwarded-For` header.
+ *
+ * @param {Object} req
+ * @api public
+ */
+
+function forwarded(req) {
+ if (!req) {
+ throw new TypeError('argument req is required')
+ }
+
+ // simple header parsing
+ var proxyAddrs = (req.headers['x-forwarded-for'] || '')
+ .split(/ *, */)
+ .filter(Boolean)
+ .reverse()
+ var socketAddr = req.connection.remoteAddress
+ var addrs = [socketAddr].concat(proxyAddrs)
+
+ // return all addresses
+ return addrs
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json
new file mode 100644
index 0000000..4bb007f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json
@@ -0,0 +1,65 @@
+{
+ "name": "forwarded",
+ "description": "Parse HTTP X-Forwarded-For header",
+ "version": "0.1.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "x-forwarded-for",
+ "http",
+ "req"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/forwarded"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "e9a9faeb3cfaadf40eb57d144fff26bca9b818e8",
+ "bugs": {
+ "url": "https://github.com/jshttp/forwarded/issues"
+ },
+ "homepage": "https://github.com/jshttp/forwarded",
+ "_id": "forwarded@0.1.0",
+ "_shasum": "19ef9874c4ae1c297bcf078fde63a09b66a84363",
+ "_from": "forwarded@~0.1.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "19ef9874c4ae1c297bcf078fde63a09b66a84363",
+ "tarball": "http://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore
new file mode 100644
index 0000000..7a1537b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore
@@ -0,0 +1,2 @@
+.idea
+node_modules
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile
new file mode 100644
index 0000000..7fd355a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile
@@ -0,0 +1,18 @@
+fs = require 'fs'
+CoffeeScript = require 'coffee-script'
+nodeunit = require 'nodeunit'
+UglifyJS = require 'uglify-js'
+
+task 'build', 'build the JavaScript files from CoffeeScript source', build = (cb) ->
+ source = fs.readFileSync 'src/ipaddr.coffee'
+ fs.writeFileSync 'lib/ipaddr.js', CoffeeScript.compile source.toString()
+
+ invoke 'test'
+ invoke 'compress'
+
+task 'test', 'run the bundled tests', (cb) ->
+ nodeunit.reporters.default.run ['test']
+
+task 'compress', 'uglify the resulting javascript', (cb) ->
+ result = UglifyJS.minify('lib/ipaddr.js')
+ fs.writeFileSync('ipaddr.min.js', result.code)
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE
new file mode 100644
index 0000000..3493f0d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2011 Peter Zotov <whitequark@whitequark.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md
new file mode 100644
index 0000000..a816672
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md
@@ -0,0 +1,149 @@
+# ipaddr.js — an IPv6 and IPv4 address manipulation library
+
+ipaddr.js is a small (1.9K minified and gzipped) library for manipulating
+IP addresses in JavaScript environments. It runs on both CommonJS runtimes
+(e.g. [nodejs]) and in a web browser.
+
+ipaddr.js allows you to verify and parse string representation of an IP
+address, match it against a CIDR range or range list, determine if it falls
+into some reserved ranges (examples include loopback and private ranges),
+and convert between IPv4 and IPv4-mapped IPv6 addresses.
+
+[nodejs]: http://nodejs.org
+
+## Installation
+
+`npm install ipaddr.js`
+
+## API
+
+ipaddr.js defines one object in the global scope: `ipaddr`. In CommonJS,
+it is exported from the module:
+
+```js
+var ipaddr = require('ipaddr.js');
+```
+
+The API consists of several global methods and two classes: ipaddr.IPv6 and ipaddr.IPv4.
+
+### Global methods
+
+There are three global methods defined: `ipaddr.isValid`, `ipaddr.parse` and
+`ipaddr.process`. All of them receive a string as a single parameter.
+
+The `ipaddr.isValid` method returns `true` if the address is a valid IPv4 or
+IPv6 address, and `false` otherwise. It does not throw any exceptions.
+
+The `ipaddr.parse` method returns an object representing the IP address,
+or throws an `Error` if the passed string is not a valid representation of an
+IP address.
+
+The `ipaddr.process` method works just like the `ipaddr.parse` one, but it
+automatically converts IPv4-mapped IPv6 addresses to their IPv4 couterparts
+before returning. It is useful when you have a Node.js instance listening
+on an IPv6 socket, and the `net.ivp6.bindv6only` sysctl parameter (or its
+equivalent on non-Linux OS) is set to 0. In this case, you can accept IPv4
+connections on your IPv6-only socket, but the remote address will be mangled.
+Use `ipaddr.process` method to automatically demangle it.
+
+### Object representation
+
+Parsing methods return an object which descends from `ipaddr.IPv6` or
+`ipaddr.IPv4`. These objects share some properties, but most of them differ.
+
+#### Shared properties
+
+One can determine the type of address by calling `addr.kind()`. It will return
+either `"ipv6"` or `"ipv4"`.
+
+An address can be converted back to its string representation with `addr.toString()`.
+Note that this method:
+ * does not return the original string used to create the object (in fact, there is
+ no way of getting that string)
+ * returns a compact representation (when it is applicable)
+
+A `match(range, bits)` method can be used to check if the address falls into a
+certain CIDR range.
+Note that an address can be (obviously) matched only against an address of the same type.
+
+For example:
+
+```js
+var addr = ipaddr.parse("2001:db8:1234::1");
+var range = ipaddr.parse("2001:db8::");
+
+addr.match(range, 32); // => true
+```
+
+A `range()` method returns one of predefined names for several special ranges defined
+by IP protocols. The exact names (and their respective CIDR ranges) can be looked up
+in the source: [IPv6 ranges] and [IPv4 ranges]. Some common ones include `"unicast"`
+(the default one) and `"reserved"`.
+
+You can match against your own range list by using
+`ipaddr.subnetMatch(address, rangeList, defaultName)` method. It can work with both
+IPv6 and IPv4 addresses, and accepts a name-to-subnet map as the range list. For example:
+
+```js
+var rangeList = {
+ documentationOnly: [ ipaddr.parse('2001:db8::'), 32 ],
+ tunnelProviders: [
+ [ ipaddr.parse('2001:470::'), 32 ], // he.net
+ [ ipaddr.parse('2001:5c0::'), 32 ] // freenet6
+ ]
+};
+ipaddr.subnetMatch(ipaddr.parse('2001:470:8:66::1'), rangeList, 'unknown'); // => "he.net"
+```
+
+The addresses can be converted to their byte representation with `toByteArray()`.
+(Actually, JavaScript mostly does not know about byte buffers. They are emulated with
+arrays of numbers, each in range of 0..255.)
+
+```js
+var bytes = ipaddr.parse('2a00:1450:8007::68').toByteArray(); // ipv6.google.com
+bytes // => [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, <zeroes...>, 0x00, 0x68 ]
+```
+
+The `ipaddr.IPv4` and `ipaddr.IPv6` objects have some methods defined, too. All of them
+have the same interface for both protocols, and are similar to global methods.
+
+`ipaddr.IPvX.isValid(string)` can be used to check if the string is a valid address
+for particular protocol, and `ipaddr.IPvX.parse(string)` is the error-throwing parser.
+
+[IPv6 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L186
+[IPv4 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L71
+
+#### IPv6 properties
+
+Sometimes you will want to convert IPv6 not to a compact string representation (with
+the `::` substitution); the `toNormalizedString()` method will return an address where
+all zeroes are explicit.
+
+For example:
+
+```js
+var addr = ipaddr.parse("2001:0db8::0001");
+addr.toString(); // => "2001:db8::1"
+addr.toNormalizedString(); // => "2001:db8:0:0:0:0:0:1"
+```
+
+The `isIPv4MappedAddress()` method will return `true` if this address is an IPv4-mapped
+one, and `toIPv4Address()` will return an IPv4 object address.
+
+To access the underlying binary representation of the address, use `addr.parts`.
+
+```js
+var addr = ipaddr.parse("2001:db8:10::1234:DEAD");
+addr.parts // => [0x2001, 0xdb8, 0x10, 0, 0, 0, 0x1234, 0xdead]
+```
+
+#### IPv4 properties
+
+`toIPv4MappedAddress()` will return a corresponding IPv4-mapped IPv6 address.
+
+To access the underlying representation of the address, use `addr.octets`.
+
+```js
+var addr = ipaddr.parse("192.168.1.1");
+addr.octets // => [192, 168, 1, 1]
+```
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js
new file mode 100644
index 0000000..9d5c657
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js
@@ -0,0 +1 @@
+(function(){var t,r,n,e,i,o,a,s;r={},s=this,"undefined"!=typeof module&&null!==module&&module.exports?module.exports=r:s.ipaddr=r,a=function(t,r,n,e){var i,o;if(t.length!==r.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");for(i=0;e>0;){if(o=n-e,0>o&&(o=0),t[i]>>o!==r[i]>>o)return!1;e-=n,i+=1}return!0},r.subnetMatch=function(t,r,n){var e,i,o,a,s;null==n&&(n="unicast");for(e in r)for(i=r[e],"[object Array]"!==toString.call(i[0])&&(i=[i]),a=0,s=i.length;s>a;a++)if(o=i[a],t.match.apply(t,o))return e;return n},r.IPv4=function(){function t(t){var r,n,e;if(4!==t.length)throw new Error("ipaddr: ipv4 octet count should be 4");for(n=0,e=t.length;e>n;n++)if(r=t[n],!(r>=0&&255>=r))throw new Error("ipaddr: ipv4 octet is a byte");this.octets=t}return t.prototype.kind=function(){return"ipv4"},t.prototype.toString=function(){return this.octets.join(".")},t.prototype.toByteArray=function(){return this.octets.slice(0)},t.prototype.match=function(t,r){if("ipv4"!==t.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return a(this.octets,t.octets,8,r)},t.prototype.SpecialRanges={unspecified:[[new t([0,0,0,0]),8]],broadcast:[[new t([255,255,255,255]),32]],multicast:[[new t([224,0,0,0]),4]],linkLocal:[[new t([169,254,0,0]),16]],loopback:[[new t([127,0,0,0]),8]],"private":[[new t([10,0,0,0]),8],[new t([172,16,0,0]),12],[new t([192,168,0,0]),16]],reserved:[[new t([192,0,0,0]),24],[new t([192,0,2,0]),24],[new t([192,88,99,0]),24],[new t([198,51,100,0]),24],[new t([203,0,113,0]),24],[new t([240,0,0,0]),4]]},t.prototype.range=function(){return r.subnetMatch(this,this.SpecialRanges)},t.prototype.toIPv4MappedAddress=function(){return r.IPv6.parse("::ffff:"+this.toString())},t}(),n="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp("^"+n+"\\."+n+"\\."+n+"\\."+n+"$","i"),longValue:new RegExp("^"+n+"$","i")},r.IPv4.parser=function(t){var r,n,i,o,a;if(n=function(t){return"0"===t[0]&&"x"!==t[1]?parseInt(t,8):parseInt(t)},r=t.match(e.fourOctet))return function(){var t,e,o,a;for(o=r.slice(1,6),a=[],t=0,e=o.length;e>t;t++)i=o[t],a.push(n(i));return a}();if(r=t.match(e.longValue)){if(a=n(r[1]),a>4294967295||0>a)throw new Error("ipaddr: address outside defined range");return function(){var t,r;for(r=[],o=t=0;24>=t;o=t+=8)r.push(a>>o&255);return r}().reverse()}return null},r.IPv6=function(){function t(t){var r,n,e;if(8!==t.length)throw new Error("ipaddr: ipv6 part count should be 8");for(n=0,e=t.length;e>n;n++)if(r=t[n],!(r>=0&&65535>=r))throw new Error("ipaddr: ipv6 part should fit to two octets");this.parts=t}return t.prototype.kind=function(){return"ipv6"},t.prototype.toString=function(){var t,r,n,e,i,o,a;for(i=function(){var t,n,e,i;for(e=this.parts,i=[],t=0,n=e.length;n>t;t++)r=e[t],i.push(r.toString(16));return i}.call(this),t=[],n=function(r){return t.push(r)},e=0,o=0,a=i.length;a>o;o++)switch(r=i[o],e){case 0:n("0"===r?"":r),e=1;break;case 1:"0"===r?e=2:n(r);break;case 2:"0"!==r&&(n(""),n(r),e=3);break;case 3:n(r)}return 2===e&&(n(""),n("")),t.join(":")},t.prototype.toByteArray=function(){var t,r,n,e,i;for(t=[],i=this.parts,n=0,e=i.length;e>n;n++)r=i[n],t.push(r>>8),t.push(255&r);return t},t.prototype.toNormalizedString=function(){var t;return function(){var r,n,e,i;for(e=this.parts,i=[],r=0,n=e.length;n>r;r++)t=e[r],i.push(t.toString(16));return i}.call(this).join(":")},t.prototype.match=function(t,r){if("ipv6"!==t.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return a(this.parts,t.parts,16,r)},t.prototype.SpecialRanges={unspecified:[new t([0,0,0,0,0,0,0,0]),128],linkLocal:[new t([65152,0,0,0,0,0,0,0]),10],multicast:[new t([65280,0,0,0,0,0,0,0]),8],loopback:[new t([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new t([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new t([0,0,0,0,0,65535,0,0]),96],rfc6145:[new t([0,0,0,0,65535,0,0,0]),96],rfc6052:[new t([100,65435,0,0,0,0,0,0]),96],"6to4":[new t([8194,0,0,0,0,0,0,0]),16],teredo:[new t([8193,0,0,0,0,0,0,0]),32],reserved:[[new t([8193,3512,0,0,0,0,0,0]),32]]},t.prototype.range=function(){return r.subnetMatch(this,this.SpecialRanges)},t.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},t.prototype.toIPv4Address=function(){var t,n,e;if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");return e=this.parts.slice(-2),t=e[0],n=e[1],new r.IPv4([t>>8,255&t,n>>8,255&n])},t}(),i="(?:[0-9a-f]+::?)+",o={"native":new RegExp("^(::)?("+i+")?([0-9a-f]+)?(::)?$","i"),transitional:new RegExp("^((?:"+i+")|(?:::)(?:"+i+")?)"+(""+n+"\\."+n+"\\."+n+"\\."+n+"$"),"i")},t=function(t,r){var n,e,i,o,a;if(t.indexOf("::")!==t.lastIndexOf("::"))return null;for(n=0,e=-1;(e=t.indexOf(":",e+1))>=0;)n++;for(":"===t[0]&&n--,":"===t[t.length-1]&&n--,a=r-n,o=":";a--;)o+="0:";return t=t.replace("::",o),":"===t[0]&&(t=t.slice(1)),":"===t[t.length-1]&&(t=t.slice(0,-1)),function(){var r,n,e,o;for(e=t.split(":"),o=[],r=0,n=e.length;n>r;r++)i=e[r],o.push(parseInt(i,16));return o}()},r.IPv6.parser=function(r){var n,e;return r.match(o["native"])?t(r,8):(n=r.match(o.transitional))&&(e=t(n[1].slice(0,-1),6))?(e.push(parseInt(n[2])<<8|parseInt(n[3])),e.push(parseInt(n[4])<<8|parseInt(n[5])),e):null},r.IPv4.isIPv4=r.IPv6.isIPv6=function(t){return null!==this.parser(t)},r.IPv4.isValid=r.IPv6.isValid=function(t){var r;try{return new this(this.parser(t)),!0}catch(n){return r=n,!1}},r.IPv4.parse=r.IPv6.parse=function(t){var r;if(r=this.parser(t),null===r)throw new Error("ipaddr: string is not formatted like ip address");return new this(r)},r.isValid=function(t){return r.IPv6.isValid(t)||r.IPv4.isValid(t)},r.parse=function(t){if(r.IPv6.isValid(t))return r.IPv6.parse(t);if(r.IPv4.isValid(t))return r.IPv4.parse(t);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},r.process=function(t){var r;return r=this.parse(t),"ipv6"===r.kind()&&r.isIPv4MappedAddress()?r.toIPv4Address():r}}).call(this);
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js
new file mode 100644
index 0000000..8b1ed5d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js
@@ -0,0 +1,405 @@
+(function() {
+ var expandIPv6, ipaddr, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root;
+
+ ipaddr = {};
+
+ root = this;
+
+ if ((typeof module !== "undefined" && module !== null) && module.exports) {
+ module.exports = ipaddr;
+ } else {
+ root['ipaddr'] = ipaddr;
+ }
+
+ matchCIDR = function(first, second, partSize, cidrBits) {
+ var part, shift;
+ if (first.length !== second.length) {
+ throw new Error("ipaddr: cannot match CIDR for objects with different lengths");
+ }
+ part = 0;
+ while (cidrBits > 0) {
+ shift = partSize - cidrBits;
+ if (shift < 0) {
+ shift = 0;
+ }
+ if (first[part] >> shift !== second[part] >> shift) {
+ return false;
+ }
+ cidrBits -= partSize;
+ part += 1;
+ }
+ return true;
+ };
+
+ ipaddr.subnetMatch = function(address, rangeList, defaultName) {
+ var rangeName, rangeSubnets, subnet, _i, _len;
+ if (defaultName == null) {
+ defaultName = 'unicast';
+ }
+ for (rangeName in rangeList) {
+ rangeSubnets = rangeList[rangeName];
+ if (toString.call(rangeSubnets[0]) !== '[object Array]') {
+ rangeSubnets = [rangeSubnets];
+ }
+ for (_i = 0, _len = rangeSubnets.length; _i < _len; _i++) {
+ subnet = rangeSubnets[_i];
+ if (address.match.apply(address, subnet)) {
+ return rangeName;
+ }
+ }
+ }
+ return defaultName;
+ };
+
+ ipaddr.IPv4 = (function() {
+ function IPv4(octets) {
+ var octet, _i, _len;
+ if (octets.length !== 4) {
+ throw new Error("ipaddr: ipv4 octet count should be 4");
+ }
+ for (_i = 0, _len = octets.length; _i < _len; _i++) {
+ octet = octets[_i];
+ if (!((0 <= octet && octet <= 255))) {
+ throw new Error("ipaddr: ipv4 octet is a byte");
+ }
+ }
+ this.octets = octets;
+ }
+
+ IPv4.prototype.kind = function() {
+ return 'ipv4';
+ };
+
+ IPv4.prototype.toString = function() {
+ return this.octets.join(".");
+ };
+
+ IPv4.prototype.toByteArray = function() {
+ return this.octets.slice(0);
+ };
+
+ IPv4.prototype.match = function(other, cidrRange) {
+ if (other.kind() !== 'ipv4') {
+ throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");
+ }
+ return matchCIDR(this.octets, other.octets, 8, cidrRange);
+ };
+
+ IPv4.prototype.SpecialRanges = {
+ unspecified: [[new IPv4([0, 0, 0, 0]), 8]],
+ broadcast: [[new IPv4([255, 255, 255, 255]), 32]],
+ multicast: [[new IPv4([224, 0, 0, 0]), 4]],
+ linkLocal: [[new IPv4([169, 254, 0, 0]), 16]],
+ loopback: [[new IPv4([127, 0, 0, 0]), 8]],
+ "private": [[new IPv4([10, 0, 0, 0]), 8], [new IPv4([172, 16, 0, 0]), 12], [new IPv4([192, 168, 0, 0]), 16]],
+ reserved: [[new IPv4([192, 0, 0, 0]), 24], [new IPv4([192, 0, 2, 0]), 24], [new IPv4([192, 88, 99, 0]), 24], [new IPv4([198, 51, 100, 0]), 24], [new IPv4([203, 0, 113, 0]), 24], [new IPv4([240, 0, 0, 0]), 4]]
+ };
+
+ IPv4.prototype.range = function() {
+ return ipaddr.subnetMatch(this, this.SpecialRanges);
+ };
+
+ IPv4.prototype.toIPv4MappedAddress = function() {
+ return ipaddr.IPv6.parse("::ffff:" + (this.toString()));
+ };
+
+ return IPv4;
+
+ })();
+
+ ipv4Part = "(0?\\d+|0x[a-f0-9]+)";
+
+ ipv4Regexes = {
+ fourOctet: new RegExp("^" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$", 'i'),
+ longValue: new RegExp("^" + ipv4Part + "$", 'i')
+ };
+
+ ipaddr.IPv4.parser = function(string) {
+ var match, parseIntAuto, part, shift, value;
+ parseIntAuto = function(string) {
+ if (string[0] === "0" && string[1] !== "x") {
+ return parseInt(string, 8);
+ } else {
+ return parseInt(string);
+ }
+ };
+ if (match = string.match(ipv4Regexes.fourOctet)) {
+ return (function() {
+ var _i, _len, _ref, _results;
+ _ref = match.slice(1, 6);
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ part = _ref[_i];
+ _results.push(parseIntAuto(part));
+ }
+ return _results;
+ })();
+ } else if (match = string.match(ipv4Regexes.longValue)) {
+ value = parseIntAuto(match[1]);
+ if (value > 0xffffffff || value < 0) {
+ throw new Error("ipaddr: address outside defined range");
+ }
+ return ((function() {
+ var _i, _results;
+ _results = [];
+ for (shift = _i = 0; _i <= 24; shift = _i += 8) {
+ _results.push((value >> shift) & 0xff);
+ }
+ return _results;
+ })()).reverse();
+ } else {
+ return null;
+ }
+ };
+
+ ipaddr.IPv6 = (function() {
+ function IPv6(parts) {
+ var part, _i, _len;
+ if (parts.length !== 8) {
+ throw new Error("ipaddr: ipv6 part count should be 8");
+ }
+ for (_i = 0, _len = parts.length; _i < _len; _i++) {
+ part = parts[_i];
+ if (!((0 <= part && part <= 0xffff))) {
+ throw new Error("ipaddr: ipv6 part should fit to two octets");
+ }
+ }
+ this.parts = parts;
+ }
+
+ IPv6.prototype.kind = function() {
+ return 'ipv6';
+ };
+
+ IPv6.prototype.toString = function() {
+ var compactStringParts, part, pushPart, state, stringParts, _i, _len;
+ stringParts = (function() {
+ var _i, _len, _ref, _results;
+ _ref = this.parts;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ part = _ref[_i];
+ _results.push(part.toString(16));
+ }
+ return _results;
+ }).call(this);
+ compactStringParts = [];
+ pushPart = function(part) {
+ return compactStringParts.push(part);
+ };
+ state = 0;
+ for (_i = 0, _len = stringParts.length; _i < _len; _i++) {
+ part = stringParts[_i];
+ switch (state) {
+ case 0:
+ if (part === '0') {
+ pushPart('');
+ } else {
+ pushPart(part);
+ }
+ state = 1;
+ break;
+ case 1:
+ if (part === '0') {
+ state = 2;
+ } else {
+ pushPart(part);
+ }
+ break;
+ case 2:
+ if (part !== '0') {
+ pushPart('');
+ pushPart(part);
+ state = 3;
+ }
+ break;
+ case 3:
+ pushPart(part);
+ }
+ }
+ if (state === 2) {
+ pushPart('');
+ pushPart('');
+ }
+ return compactStringParts.join(":");
+ };
+
+ IPv6.prototype.toByteArray = function() {
+ var bytes, part, _i, _len, _ref;
+ bytes = [];
+ _ref = this.parts;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ part = _ref[_i];
+ bytes.push(part >> 8);
+ bytes.push(part & 0xff);
+ }
+ return bytes;
+ };
+
+ IPv6.prototype.toNormalizedString = function() {
+ var part;
+ return ((function() {
+ var _i, _len, _ref, _results;
+ _ref = this.parts;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ part = _ref[_i];
+ _results.push(part.toString(16));
+ }
+ return _results;
+ }).call(this)).join(":");
+ };
+
+ IPv6.prototype.match = function(other, cidrRange) {
+ if (other.kind() !== 'ipv6') {
+ throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");
+ }
+ return matchCIDR(this.parts, other.parts, 16, cidrRange);
+ };
+
+ IPv6.prototype.SpecialRanges = {
+ unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128],
+ linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10],
+ multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8],
+ loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128],
+ uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7],
+ ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96],
+ rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96],
+ rfc6052: [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96],
+ '6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16],
+ teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32],
+ reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]]
+ };
+
+ IPv6.prototype.range = function() {
+ return ipaddr.subnetMatch(this, this.SpecialRanges);
+ };
+
+ IPv6.prototype.isIPv4MappedAddress = function() {
+ return this.range() === 'ipv4Mapped';
+ };
+
+ IPv6.prototype.toIPv4Address = function() {
+ var high, low, _ref;
+ if (!this.isIPv4MappedAddress()) {
+ throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");
+ }
+ _ref = this.parts.slice(-2), high = _ref[0], low = _ref[1];
+ return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]);
+ };
+
+ return IPv6;
+
+ })();
+
+ ipv6Part = "(?:[0-9a-f]+::?)+";
+
+ ipv6Regexes = {
+ "native": new RegExp("^(::)?(" + ipv6Part + ")?([0-9a-f]+)?(::)?$", 'i'),
+ transitional: new RegExp(("^((?:" + ipv6Part + ")|(?:::)(?:" + ipv6Part + ")?)") + ("" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$"), 'i')
+ };
+
+ expandIPv6 = function(string, parts) {
+ var colonCount, lastColon, part, replacement, replacementCount;
+ if (string.indexOf('::') !== string.lastIndexOf('::')) {
+ return null;
+ }
+ colonCount = 0;
+ lastColon = -1;
+ while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) {
+ colonCount++;
+ }
+ if (string[0] === ':') {
+ colonCount--;
+ }
+ if (string[string.length - 1] === ':') {
+ colonCount--;
+ }
+ replacementCount = parts - colonCount;
+ replacement = ':';
+ while (replacementCount--) {
+ replacement += '0:';
+ }
+ string = string.replace('::', replacement);
+ if (string[0] === ':') {
+ string = string.slice(1);
+ }
+ if (string[string.length - 1] === ':') {
+ string = string.slice(0, -1);
+ }
+ return (function() {
+ var _i, _len, _ref, _results;
+ _ref = string.split(":");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ part = _ref[_i];
+ _results.push(parseInt(part, 16));
+ }
+ return _results;
+ })();
+ };
+
+ ipaddr.IPv6.parser = function(string) {
+ var match, parts;
+ if (string.match(ipv6Regexes['native'])) {
+ return expandIPv6(string, 8);
+ } else if (match = string.match(ipv6Regexes['transitional'])) {
+ parts = expandIPv6(match[1].slice(0, -1), 6);
+ if (parts) {
+ parts.push(parseInt(match[2]) << 8 | parseInt(match[3]));
+ parts.push(parseInt(match[4]) << 8 | parseInt(match[5]));
+ return parts;
+ }
+ }
+ return null;
+ };
+
+ ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = function(string) {
+ return this.parser(string) !== null;
+ };
+
+ ipaddr.IPv4.isValid = ipaddr.IPv6.isValid = function(string) {
+ var e;
+ try {
+ new this(this.parser(string));
+ return true;
+ } catch (_error) {
+ e = _error;
+ return false;
+ }
+ };
+
+ ipaddr.IPv4.parse = ipaddr.IPv6.parse = function(string) {
+ var parts;
+ parts = this.parser(string);
+ if (parts === null) {
+ throw new Error("ipaddr: string is not formatted like ip address");
+ }
+ return new this(parts);
+ };
+
+ ipaddr.isValid = function(string) {
+ return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string);
+ };
+
+ ipaddr.parse = function(string) {
+ if (ipaddr.IPv6.isValid(string)) {
+ return ipaddr.IPv6.parse(string);
+ } else if (ipaddr.IPv4.isValid(string)) {
+ return ipaddr.IPv4.parse(string);
+ } else {
+ throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format");
+ }
+ };
+
+ ipaddr.process = function(string) {
+ var addr;
+ addr = this.parse(string);
+ if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) {
+ return addr.toIPv4Address();
+ } else {
+ return addr;
+ }
+ };
+
+}).call(this);
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json
new file mode 100644
index 0000000..929d45a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json
@@ -0,0 +1,60 @@
+{
+ "name": "ipaddr.js",
+ "description": "A library for manipulating IPv4 and IPv6 addresses in JavaScript.",
+ "version": "0.1.8",
+ "author": {
+ "name": "Peter Zotov",
+ "email": "whitequark@whitequark.org"
+ },
+ "directories": {
+ "lib": "./lib"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "coffee-script": "~1.6",
+ "nodeunit": "~0.5.3",
+ "uglify-js": "latest"
+ },
+ "scripts": {
+ "test": "cake build test"
+ },
+ "keywords": [
+ "ip",
+ "ipv4",
+ "ipv6"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/whitequark/ipaddr.js"
+ },
+ "main": "./lib/ipaddr",
+ "engines": {
+ "node": ">= 0.2.5"
+ },
+ "license": "MIT",
+ "gitHead": "3099dba20984caa73a83864ee582548413a425d8",
+ "bugs": {
+ "url": "https://github.com/whitequark/ipaddr.js/issues"
+ },
+ "_id": "ipaddr.js@0.1.8",
+ "_shasum": "27442eda77b626c44724b4aa8a1867e8410579ee",
+ "_from": "ipaddr.js@0.1.8",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "whitequark",
+ "email": "whitequark@whitequark.org"
+ },
+ "maintainers": [
+ {
+ "name": "whitequark",
+ "email": "whitequark@whitequark.org"
+ }
+ ],
+ "dist": {
+ "shasum": "27442eda77b626c44724b4aa8a1867e8410579ee",
+ "tarball": "http://registry.npmjs.org/ipaddr.js/-/ipaddr.js-0.1.8.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-0.1.8.tgz",
+ "readme": "ERROR: No README data found!",
+ "homepage": "https://github.com/whitequark/ipaddr.js"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee
new file mode 100644
index 0000000..0172bfd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee
@@ -0,0 +1,349 @@
+# Define the main object
+ipaddr = {}
+
+root = this
+
+# Export for both the CommonJS and browser-like environment
+if module? && module.exports
+ module.exports = ipaddr
+else
+ root['ipaddr'] = ipaddr
+
+# A generic CIDR (Classless Inter-Domain Routing) RFC1518 range matcher.
+matchCIDR = (first, second, partSize, cidrBits) ->
+ if first.length != second.length
+ throw new Error "ipaddr: cannot match CIDR for objects with different lengths"
+
+ part = 0
+ while cidrBits > 0
+ shift = partSize - cidrBits
+ shift = 0 if shift < 0
+
+ if first[part] >> shift != second[part] >> shift
+ return false
+
+ cidrBits -= partSize
+ part += 1
+
+ return true
+
+# An utility function to ease named range matching. See examples below.
+ipaddr.subnetMatch = (address, rangeList, defaultName='unicast') ->
+ for rangeName, rangeSubnets of rangeList
+ # ECMA5 Array.isArray isn't available everywhere
+ if toString.call(rangeSubnets[0]) != '[object Array]'
+ rangeSubnets = [ rangeSubnets ]
+
+ for subnet in rangeSubnets
+ return rangeName if address.match.apply(address, subnet)
+
+ return defaultName
+
+# An IPv4 address (RFC791).
+class ipaddr.IPv4
+ # Constructs a new IPv4 address from an array of four octets.
+ # Verifies the input.
+ constructor: (octets) ->
+ if octets.length != 4
+ throw new Error "ipaddr: ipv4 octet count should be 4"
+
+ for octet in octets
+ if !(0 <= octet <= 255)
+ throw new Error "ipaddr: ipv4 octet is a byte"
+
+ @octets = octets
+
+ # The 'kind' method exists on both IPv4 and IPv6 classes.
+ kind: ->
+ return 'ipv4'
+
+ # Returns the address in convenient, decimal-dotted format.
+ toString: ->
+ return @octets.join "."
+
+ # Returns an array of byte-sized values in network order
+ toByteArray: ->
+ return @octets.slice(0) # octets.clone
+
+ # Checks if this address matches other one within given CIDR range.
+ match: (other, cidrRange) ->
+ if other.kind() != 'ipv4'
+ throw new Error "ipaddr: cannot match ipv4 address with non-ipv4 one"
+
+ return matchCIDR(this.octets, other.octets, 8, cidrRange)
+
+ # Special IPv4 address ranges.
+ SpecialRanges:
+ unspecified: [
+ [ new IPv4([0, 0, 0, 0]), 8 ]
+ ]
+ broadcast: [
+ [ new IPv4([255, 255, 255, 255]), 32 ]
+ ]
+ multicast: [ # RFC3171
+ [ new IPv4([224, 0, 0, 0]), 4 ]
+ ]
+ linkLocal: [ # RFC3927
+ [ new IPv4([169, 254, 0, 0]), 16 ]
+ ]
+ loopback: [ # RFC5735
+ [ new IPv4([127, 0, 0, 0]), 8 ]
+ ]
+ private: [ # RFC1918
+ [ new IPv4([10, 0, 0, 0]), 8 ]
+ [ new IPv4([172, 16, 0, 0]), 12 ]
+ [ new IPv4([192, 168, 0, 0]), 16 ]
+ ]
+ reserved: [ # Reserved and testing-only ranges; RFCs 5735, 5737, 2544, 1700
+ [ new IPv4([192, 0, 0, 0]), 24 ]
+ [ new IPv4([192, 0, 2, 0]), 24 ]
+ [ new IPv4([192, 88, 99, 0]), 24 ]
+ [ new IPv4([198, 51, 100, 0]), 24 ]
+ [ new IPv4([203, 0, 113, 0]), 24 ]
+ [ new IPv4([240, 0, 0, 0]), 4 ]
+ ]
+
+ # Checks if the address corresponds to one of the special ranges.
+ range: ->
+ return ipaddr.subnetMatch(this, @SpecialRanges)
+
+ # Convrets this IPv4 address to an IPv4-mapped IPv6 address.
+ toIPv4MappedAddress: ->
+ return ipaddr.IPv6.parse "::ffff:#{@toString()}"
+
+# A list of regular expressions that match arbitrary IPv4 addresses,
+# for which a number of weird notations exist.
+# Note that an address like 0010.0xa5.1.1 is considered legal.
+ipv4Part = "(0?\\d+|0x[a-f0-9]+)"
+ipv4Regexes =
+ fourOctet: new RegExp "^#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}$", 'i'
+ longValue: new RegExp "^#{ipv4Part}$", 'i'
+
+# Classful variants (like a.b, where a is an octet, and b is a 24-bit
+# value representing last three octets; this corresponds to a class C
+# address) are omitted due to classless nature of modern Internet.
+ipaddr.IPv4.parser = (string) ->
+ parseIntAuto = (string) ->
+ if string[0] == "0" && string[1] != "x"
+ parseInt(string, 8)
+ else
+ parseInt(string)
+
+ # parseInt recognizes all that octal & hexadecimal weirdness for us
+ if match = string.match(ipv4Regexes.fourOctet)
+ return (parseIntAuto(part) for part in match[1..5])
+ else if match = string.match(ipv4Regexes.longValue)
+ value = parseIntAuto(match[1])
+ if value > 0xffffffff || value < 0
+ throw new Error "ipaddr: address outside defined range"
+ return ((value >> shift) & 0xff for shift in [0..24] by 8).reverse()
+ else
+ return null
+
+# An IPv6 address (RFC2460)
+class ipaddr.IPv6
+ # Constructs an IPv6 address from an array of eight 16-bit parts.
+ # Throws an error if the input is invalid.
+ constructor: (parts) ->
+ if parts.length != 8
+ throw new Error "ipaddr: ipv6 part count should be 8"
+
+ for part in parts
+ if !(0 <= part <= 0xffff)
+ throw new Error "ipaddr: ipv6 part should fit to two octets"
+
+ @parts = parts
+
+ # The 'kind' method exists on both IPv4 and IPv6 classes.
+ kind: ->
+ return 'ipv6'
+
+ # Returns the address in compact, human-readable format like
+ # 2001:db8:8:66::1
+ toString: ->
+ stringParts = (part.toString(16) for part in @parts)
+
+ compactStringParts = []
+ pushPart = (part) -> compactStringParts.push part
+
+ state = 0
+ for part in stringParts
+ switch state
+ when 0
+ if part == '0'
+ pushPart('')
+ else
+ pushPart(part)
+
+ state = 1
+ when 1
+ if part == '0'
+ state = 2
+ else
+ pushPart(part)
+ when 2
+ unless part == '0'
+ pushPart('')
+ pushPart(part)
+ state = 3
+ when 3
+ pushPart(part)
+
+ if state == 2
+ pushPart('')
+ pushPart('')
+
+ return compactStringParts.join ":"
+
+ # Returns an array of byte-sized values in network order
+ toByteArray: ->
+ bytes = []
+ for part in @parts
+ bytes.push(part >> 8)
+ bytes.push(part & 0xff)
+
+ return bytes
+
+ # Returns the address in expanded format with all zeroes included, like
+ # 2001:db8:8:66:0:0:0:1
+ toNormalizedString: ->
+ return (part.toString(16) for part in @parts).join ":"
+
+ # Checks if this address matches other one within given CIDR range.
+ match: (other, cidrRange) ->
+ if other.kind() != 'ipv6'
+ throw new Error "ipaddr: cannot match ipv6 address with non-ipv6 one"
+
+ return matchCIDR(this.parts, other.parts, 16, cidrRange)
+
+ # Special IPv6 ranges
+ SpecialRanges:
+ unspecified: [ new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128 ] # RFC4291, here and after
+ linkLocal: [ new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10 ]
+ multicast: [ new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8 ]
+ loopback: [ new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128 ]
+ uniqueLocal: [ new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7 ]
+ ipv4Mapped: [ new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96 ]
+ rfc6145: [ new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96 ] # RFC6145
+ rfc6052: [ new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96 ] # RFC6052
+ '6to4': [ new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16 ] # RFC3056
+ teredo: [ new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32 ] # RFC6052, RFC6146
+ reserved: [
+ [ new IPv6([ 0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32 ] # RFC4291
+ ]
+
+ # Checks if the address corresponds to one of the special ranges.
+ range: ->
+ return ipaddr.subnetMatch(this, @SpecialRanges)
+
+ # Checks if this address is an IPv4-mapped IPv6 address.
+ isIPv4MappedAddress: ->
+ return @range() == 'ipv4Mapped'
+
+ # Converts this address to IPv4 address if it is an IPv4-mapped IPv6 address.
+ # Throws an error otherwise.
+ toIPv4Address: ->
+ unless @isIPv4MappedAddress()
+ throw new Error "ipaddr: trying to convert a generic ipv6 address to ipv4"
+
+ [high, low] = @parts[-2..-1]
+
+ return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff])
+
+# IPv6-matching regular expressions.
+# For IPv6, the task is simpler: it is enough to match the colon-delimited
+# hexadecimal IPv6 and a transitional variant with dotted-decimal IPv4 at
+# the end.
+ipv6Part = "(?:[0-9a-f]+::?)+"
+ipv6Regexes =
+ native: new RegExp "^(::)?(#{ipv6Part})?([0-9a-f]+)?(::)?$", 'i'
+ transitional: new RegExp "^((?:#{ipv6Part})|(?:::)(?:#{ipv6Part})?)" +
+ "#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}$", 'i'
+
+# Expand :: in an IPv6 address or address part consisting of `parts` groups.
+expandIPv6 = (string, parts) ->
+ # More than one '::' means invalid adddress
+ if string.indexOf('::') != string.lastIndexOf('::')
+ return null
+
+ # How many parts do we already have?
+ colonCount = 0
+ lastColon = -1
+ while (lastColon = string.indexOf(':', lastColon + 1)) >= 0
+ colonCount++
+
+ # 0::0 is two parts more than ::
+ colonCount-- if string[0] == ':'
+ colonCount-- if string[string.length-1] == ':'
+
+ # replacement = ':' + '0:' * (parts - colonCount)
+ replacementCount = parts - colonCount
+ replacement = ':'
+ while replacementCount--
+ replacement += '0:'
+
+ # Insert the missing zeroes
+ string = string.replace('::', replacement)
+
+ # Trim any garbage which may be hanging around if :: was at the edge in
+ # the source string
+ string = string[1..-1] if string[0] == ':'
+ string = string[0..-2] if string[string.length-1] == ':'
+
+ return (parseInt(part, 16) for part in string.split(":"))
+
+# Parse an IPv6 address.
+ipaddr.IPv6.parser = (string) ->
+ if string.match(ipv6Regexes['native'])
+ return expandIPv6(string, 8)
+
+ else if match = string.match(ipv6Regexes['transitional'])
+ parts = expandIPv6(match[1][0..-2], 6)
+ if parts
+ parts.push(parseInt(match[2]) << 8 | parseInt(match[3]))
+ parts.push(parseInt(match[4]) << 8 | parseInt(match[5]))
+ return parts
+
+ return null
+
+# Checks if a given string is formatted like IPv4/IPv6 address.
+ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = (string) ->
+ return @parser(string) != null
+
+# Checks if a given string is a valid IPv4/IPv6 address.
+ipaddr.IPv4.isValid = ipaddr.IPv6.isValid = (string) ->
+ try
+ new this(@parser(string))
+ return true
+ catch e
+ return false
+
+# Tries to parse and validate a string with IPv4/IPv6 address.
+# Throws an error if it fails.
+ipaddr.IPv4.parse = ipaddr.IPv6.parse = (string) ->
+ parts = @parser(string)
+ if parts == null
+ throw new Error "ipaddr: string is not formatted like ip address"
+
+ return new this(parts)
+
+# Checks if the address is valid IP address
+ipaddr.isValid = (string) ->
+ return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string)
+
+# Try to parse an address and throw an error if it is impossible
+ipaddr.parse = (string) ->
+ if ipaddr.IPv6.isValid(string)
+ return ipaddr.IPv6.parse(string)
+ else if ipaddr.IPv4.isValid(string)
+ return ipaddr.IPv4.parse(string)
+ else
+ throw new Error "ipaddr: the address has neither IPv6 nor IPv4 format"
+
+# Parse an address and return plain IPv4 address if it is an IPv4-mapped address
+ipaddr.process = (string) ->
+ addr = @parse(string)
+ if addr.kind() == 'ipv6' && addr.isIPv4MappedAddress()
+ return addr.toIPv4Address()
+ else
+ return addr
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee
new file mode 100644
index 0000000..c6ba1a9
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee
@@ -0,0 +1,222 @@
+ipaddr = require '../lib/ipaddr'
+
+module.exports =
+ 'should define main classes': (test) ->
+ test.ok(ipaddr.IPv4?, 'defines IPv4 class')
+ test.ok(ipaddr.IPv6?, 'defines IPv6 class')
+ test.done()
+
+ 'can construct IPv4 from octets': (test) ->
+ test.doesNotThrow ->
+ new ipaddr.IPv4([192, 168, 1, 2])
+ test.done()
+
+ 'refuses to construct invalid IPv4': (test) ->
+ test.throws ->
+ new ipaddr.IPv4([300, 1, 2, 3])
+ test.throws ->
+ new ipaddr.IPv4([8, 8, 8])
+ test.done()
+
+ 'converts IPv4 to string correctly': (test) ->
+ addr = new ipaddr.IPv4([192, 168, 1, 1])
+ test.equal(addr.toString(), '192.168.1.1')
+ test.done()
+
+ 'returns correct kind for IPv4': (test) ->
+ addr = new ipaddr.IPv4([1, 2, 3, 4])
+ test.equal(addr.kind(), 'ipv4')
+ test.done()
+
+ 'allows to access IPv4 octets': (test) ->
+ addr = new ipaddr.IPv4([42, 0, 0, 0])
+ test.equal(addr.octets[0], 42)
+ test.done()
+
+ 'checks IPv4 address format': (test) ->
+ test.equal(ipaddr.IPv4.isIPv4('192.168.007.0xa'), true)
+ test.equal(ipaddr.IPv4.isIPv4('1024.0.0.1'), true)
+ test.equal(ipaddr.IPv4.isIPv4('8.0xa.wtf.6'), false)
+ test.done()
+
+ 'validates IPv4 addresses': (test) ->
+ test.equal(ipaddr.IPv4.isValid('192.168.007.0xa'), true)
+ test.equal(ipaddr.IPv4.isValid('1024.0.0.1'), false)
+ test.equal(ipaddr.IPv4.isValid('8.0xa.wtf.6'), false)
+ test.done()
+
+ 'parses IPv4 in several weird formats': (test) ->
+ test.deepEqual(ipaddr.IPv4.parse('192.168.1.1').octets, [192, 168, 1, 1])
+ test.deepEqual(ipaddr.IPv4.parse('0xc0.168.1.1').octets, [192, 168, 1, 1])
+ test.deepEqual(ipaddr.IPv4.parse('192.0250.1.1').octets, [192, 168, 1, 1])
+ test.deepEqual(ipaddr.IPv4.parse('0xc0a80101').octets, [192, 168, 1, 1])
+ test.deepEqual(ipaddr.IPv4.parse('030052000401').octets, [192, 168, 1, 1])
+ test.deepEqual(ipaddr.IPv4.parse('3232235777').octets, [192, 168, 1, 1])
+ test.done()
+
+ 'barfs at invalid IPv4': (test) ->
+ test.throws ->
+ ipaddr.IPv4.parse('10.0.0.wtf')
+ test.done()
+
+ 'matches IPv4 CIDR correctly': (test) ->
+ addr = new ipaddr.IPv4([10, 5, 0, 1])
+ test.equal(addr.match(ipaddr.IPv4.parse('0.0.0.0'), 0), true)
+ test.equal(addr.match(ipaddr.IPv4.parse('11.0.0.0'), 8), false)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.0'), 8), true)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.1'), 8), true)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.10'), 8), true)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.5.5.0'), 16), true)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.4.5.0'), 16), false)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.4.5.0'), 15), true)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.5.0.2'), 32), false)
+ test.equal(addr.match(addr, 32), true)
+ test.done()
+
+ 'detects reserved IPv4 networks': (test) ->
+ test.equal(ipaddr.IPv4.parse('0.0.0.0').range(), 'unspecified')
+ test.equal(ipaddr.IPv4.parse('0.1.0.0').range(), 'unspecified')
+ test.equal(ipaddr.IPv4.parse('10.1.0.1').range(), 'private')
+ test.equal(ipaddr.IPv4.parse('192.168.2.1').range(), 'private')
+ test.equal(ipaddr.IPv4.parse('224.100.0.1').range(), 'multicast')
+ test.equal(ipaddr.IPv4.parse('169.254.15.0').range(), 'linkLocal')
+ test.equal(ipaddr.IPv4.parse('127.1.1.1').range(), 'loopback')
+ test.equal(ipaddr.IPv4.parse('255.255.255.255').range(), 'broadcast')
+ test.equal(ipaddr.IPv4.parse('240.1.2.3').range(), 'reserved')
+ test.equal(ipaddr.IPv4.parse('8.8.8.8').range(), 'unicast')
+ test.done()
+
+ 'can construct IPv6 from parts': (test) ->
+ test.doesNotThrow ->
+ new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1])
+ test.done()
+
+ 'refuses to construct invalid IPv6': (test) ->
+ test.throws ->
+ new ipaddr.IPv6([0xfffff, 0, 0, 0, 0, 0, 0, 1])
+ test.throws ->
+ new ipaddr.IPv6([0xfffff, 0, 0, 0, 0, 0, 1])
+ test.done()
+
+ 'converts IPv6 to string correctly': (test) ->
+ addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1])
+ test.equal(addr.toNormalizedString(), '2001:db8:f53a:0:0:0:0:1')
+ test.equal(addr.toString(), '2001:db8:f53a::1')
+ test.equal(new ipaddr.IPv6([0, 0, 0, 0, 0, 0, 0, 1]).toString(), '::1')
+ test.equal(new ipaddr.IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]).toString(), '2001:db8::')
+ test.done()
+
+ 'returns correct kind for IPv6': (test) ->
+ addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1])
+ test.equal(addr.kind(), 'ipv6')
+ test.done()
+
+ 'allows to access IPv6 address parts': (test) ->
+ addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 42, 0, 1])
+ test.equal(addr.parts[5], 42)
+ test.done()
+
+ 'checks IPv6 address format': (test) ->
+ test.equal(ipaddr.IPv6.isIPv6('2001:db8:F53A::1'), true)
+ test.equal(ipaddr.IPv6.isIPv6('200001::1'), true)
+ test.equal(ipaddr.IPv6.isIPv6('::ffff:192.168.1.1'), true)
+ test.equal(ipaddr.IPv6.isIPv6('::ffff:300.168.1.1'), true)
+ test.equal(ipaddr.IPv6.isIPv6('::ffff:300.168.1.1:0'), false)
+ test.equal(ipaddr.IPv6.isIPv6('fe80::wtf'), false)
+ test.done()
+
+ 'validates IPv6 addresses': (test) ->
+ test.equal(ipaddr.IPv6.isValid('2001:db8:F53A::1'), true)
+ test.equal(ipaddr.IPv6.isValid('200001::1'), false)
+ test.equal(ipaddr.IPv6.isValid('::ffff:192.168.1.1'), true)
+ test.equal(ipaddr.IPv6.isValid('::ffff:300.168.1.1'), false)
+ test.equal(ipaddr.IPv6.isValid('::ffff:300.168.1.1:0'), false)
+ test.equal(ipaddr.IPv6.isValid('2001:db8::F53A::1'), false)
+ test.equal(ipaddr.IPv6.isValid('fe80::wtf'), false)
+ test.done()
+
+ 'parses IPv6 in different formats': (test) ->
+ test.deepEqual(ipaddr.IPv6.parse('2001:db8:F53A:0:0:0:0:1').parts, [0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1])
+ test.deepEqual(ipaddr.IPv6.parse('fe80::10').parts, [0xfe80, 0, 0, 0, 0, 0, 0, 0x10])
+ test.deepEqual(ipaddr.IPv6.parse('2001:db8:F53A::').parts, [0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 0])
+ test.deepEqual(ipaddr.IPv6.parse('::1').parts, [0, 0, 0, 0, 0, 0, 0, 1])
+ test.deepEqual(ipaddr.IPv6.parse('::').parts, [0, 0, 0, 0, 0, 0, 0, 0])
+ test.done()
+
+ 'barfs at invalid IPv6': (test) ->
+ test.throws ->
+ ipaddr.IPv6.parse('fe80::0::1')
+ test.done()
+
+ 'matches IPv6 CIDR correctly': (test) ->
+ addr = ipaddr.IPv6.parse('2001:db8:f53a::1')
+ test.equal(addr.match(ipaddr.IPv6.parse('::'), 0), true)
+ test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f53a::1:1'), 64), true)
+ test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f53b::1:1'), 48), false)
+ test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f531::1:1'), 44), true)
+ test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f500::1'), 40), true)
+ test.equal(addr.match(ipaddr.IPv6.parse('2001:db9:f500::1'), 40), false)
+ test.equal(addr.match(addr, 128), true)
+ test.done()
+
+ 'converts between IPv4-mapped IPv6 addresses and IPv4 addresses': (test) ->
+ addr = ipaddr.IPv4.parse('77.88.21.11')
+ mapped = addr.toIPv4MappedAddress()
+ test.deepEqual(mapped.parts, [0, 0, 0, 0, 0, 0xffff, 0x4d58, 0x150b])
+ test.deepEqual(mapped.toIPv4Address().octets, addr.octets)
+ test.done()
+
+ 'refuses to convert non-IPv4-mapped IPv6 address to IPv4 address': (test) ->
+ test.throws ->
+ ipaddr.IPv6.parse('2001:db8::1').toIPv4Address()
+ test.done()
+
+ 'detects reserved IPv6 networks': (test) ->
+ test.equal(ipaddr.IPv6.parse('::').range(), 'unspecified')
+ test.equal(ipaddr.IPv6.parse('fe80::1234:5678:abcd:0123').range(), 'linkLocal')
+ test.equal(ipaddr.IPv6.parse('ff00::1234').range(), 'multicast')
+ test.equal(ipaddr.IPv6.parse('::1').range(), 'loopback')
+ test.equal(ipaddr.IPv6.parse('fc00::').range(), 'uniqueLocal')
+ test.equal(ipaddr.IPv6.parse('::ffff:192.168.1.10').range(), 'ipv4Mapped')
+ test.equal(ipaddr.IPv6.parse('::ffff:0:192.168.1.10').range(), 'rfc6145')
+ test.equal(ipaddr.IPv6.parse('64:ff9b::1234').range(), 'rfc6052')
+ test.equal(ipaddr.IPv6.parse('2002:1f63:45e8::1').range(), '6to4')
+ test.equal(ipaddr.IPv6.parse('2001::4242').range(), 'teredo')
+ test.equal(ipaddr.IPv6.parse('2001:db8::3210').range(), 'reserved')
+ test.equal(ipaddr.IPv6.parse('2001:470:8:66::1').range(), 'unicast')
+ test.done()
+
+ 'is able to determine IP address type': (test) ->
+ test.equal(ipaddr.parse('8.8.8.8').kind(), 'ipv4')
+ test.equal(ipaddr.parse('2001:db8:3312::1').kind(), 'ipv6')
+ test.done()
+
+ 'throws an error if tried to parse an invalid address': (test) ->
+ test.throws ->
+ ipaddr.parse('::some.nonsense')
+ test.done()
+
+ 'correctly processes IPv4-mapped addresses': (test) ->
+ test.equal(ipaddr.process('8.8.8.8').kind(), 'ipv4')
+ test.equal(ipaddr.process('2001:db8:3312::1').kind(), 'ipv6')
+ test.equal(ipaddr.process('::ffff:192.168.1.1').kind(), 'ipv4')
+ test.done()
+
+ 'correctly converts IPv6 and IPv4 addresses to byte arrays': (test) ->
+ test.deepEqual(ipaddr.parse('1.2.3.4').toByteArray(),
+ [0x1, 0x2, 0x3, 0x4]);
+ # Fuck yeah. The first byte of Google's IPv6 address is 42. 42!
+ test.deepEqual(ipaddr.parse('2a00:1450:8007::68').toByteArray(),
+ [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68 ])
+ test.done()
+
+ 'correctly parses 1 as an IPv4 address': (test) ->
+ test.equal(ipaddr.IPv6.isValid('1'), false)
+ test.equal(ipaddr.IPv4.isValid('1'), true)
+ test.deepEqual(new ipaddr.IPv4([0, 0, 0, 1]), ipaddr.parse('1'))
+ test.done()
+
+ 'does not consider a very large or very small number a valid IP address': (test) ->
+ test.equal(ipaddr.isValid('4999999999'), false)
+ test.equal(ipaddr.isValid('-1'), false)
+ test.done()
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/package.json
new file mode 100644
index 0000000..5b83e45
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/proxy-addr/package.json
@@ -0,0 +1,90 @@
+{
+ "name": "proxy-addr",
+ "description": "Determine address of proxied request",
+ "version": "1.0.6",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "ip",
+ "proxy",
+ "x-forwarded-for"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/proxy-addr"
+ },
+ "dependencies": {
+ "forwarded": "~0.1.0",
+ "ipaddr.js": "0.1.8"
+ },
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "550cade433f7a7d7cbcdebbd0f9e1cb94aed5e26",
+ "bugs": {
+ "url": "https://github.com/jshttp/proxy-addr/issues"
+ },
+ "homepage": "https://github.com/jshttp/proxy-addr",
+ "_id": "proxy-addr@1.0.6",
+ "_shasum": "fce3a4c486bf2e188ad1e76e18399a79d02c0e72",
+ "_from": "proxy-addr@~1.0.6",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "fce3a4c486bf2e188ad1e76e18399a79d02c0e72",
+ "tarball": "http://registry.npmjs.org/proxy-addr/-/proxy-addr-1.0.6.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.0.6.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/.jshintignore b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/.jshintignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/.jshintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/.jshintrc b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/.jshintrc
new file mode 100644
index 0000000..997b3f7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/.jshintrc
@@ -0,0 +1,10 @@
+{
+ "node": true,
+
+ "curly": true,
+ "latedef": true,
+ "quotmark": true,
+ "undef": true,
+ "unused": true,
+ "trailing": true
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/.npmignore b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/.npmignore
new file mode 100644
index 0000000..7e1574d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/.npmignore
@@ -0,0 +1,18 @@
+.idea
+*.iml
+npm-debug.log
+dump.rdb
+node_modules
+results.tap
+results.xml
+npm-shrinkwrap.json
+config.json
+.DS_Store
+*/.DS_Store
+*/*/.DS_Store
+._*
+*/._*
+*/*/._*
+coverage.*
+lib-cov
+complexity.md
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/.travis.yml b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/.travis.yml
new file mode 100644
index 0000000..c891dd0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+
+node_js:
+ - 0.10
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/CHANGELOG.md b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/CHANGELOG.md
new file mode 100644
index 0000000..f5ee8b4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/CHANGELOG.md
@@ -0,0 +1,68 @@
+
+## [**2.3.3**](https://github.com/hapijs/qs/issues?milestone=18&state=open)
+- [**#59**](https://github.com/hapijs/qs/issues/59) make sure array indexes are >= 0, closes #57
+- [**#58**](https://github.com/hapijs/qs/issues/58) make qs usable for browser loader
+
+## [**2.3.2**](https://github.com/hapijs/qs/issues?milestone=17&state=closed)
+- [**#55**](https://github.com/hapijs/qs/issues/55) allow merging a string into an object
+
+## [**2.3.1**](https://github.com/hapijs/qs/issues?milestone=16&state=closed)
+- [**#52**](https://github.com/hapijs/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError".
+
+## [**2.3.0**](https://github.com/hapijs/qs/issues?milestone=15&state=closed)
+- [**#50**](https://github.com/hapijs/qs/issues/50) add option to omit array indices, closes #46
+
+## [**2.2.5**](https://github.com/hapijs/qs/issues?milestone=14&state=closed)
+- [**#39**](https://github.com/hapijs/qs/issues/39) Is there an alternative to Buffer.isBuffer?
+- [**#49**](https://github.com/hapijs/qs/issues/49) refactor utils.merge, fixes #45
+- [**#41**](https://github.com/hapijs/qs/issues/41) avoid browserifying Buffer, for #39
+
+## [**2.2.4**](https://github.com/hapijs/qs/issues?milestone=13&state=closed)
+- [**#38**](https://github.com/hapijs/qs/issues/38) how to handle object keys beginning with a number
+
+## [**2.2.3**](https://github.com/hapijs/qs/issues?milestone=12&state=closed)
+- [**#37**](https://github.com/hapijs/qs/issues/37) parser discards first empty value in array
+- [**#36**](https://github.com/hapijs/qs/issues/36) Update to lab 4.x
+
+## [**2.2.2**](https://github.com/hapijs/qs/issues?milestone=11&state=closed)
+- [**#33**](https://github.com/hapijs/qs/issues/33) Error when plain object in a value
+- [**#34**](https://github.com/hapijs/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty
+- [**#24**](https://github.com/hapijs/qs/issues/24) Changelog? Semver?
+
+## [**2.2.1**](https://github.com/hapijs/qs/issues?milestone=10&state=closed)
+- [**#32**](https://github.com/hapijs/qs/issues/32) account for circular references properly, closes #31
+- [**#31**](https://github.com/hapijs/qs/issues/31) qs.parse stackoverflow on circular objects
+
+## [**2.2.0**](https://github.com/hapijs/qs/issues?milestone=9&state=closed)
+- [**#26**](https://github.com/hapijs/qs/issues/26) Don't use Buffer global if it's not present
+- [**#30**](https://github.com/hapijs/qs/issues/30) Bug when merging non-object values into arrays
+- [**#29**](https://github.com/hapijs/qs/issues/29) Don't call Utils.clone at the top of Utils.merge
+- [**#23**](https://github.com/hapijs/qs/issues/23) Ability to not limit parameters?
+
+## [**2.1.0**](https://github.com/hapijs/qs/issues?milestone=8&state=closed)
+- [**#22**](https://github.com/hapijs/qs/issues/22) Enable using a RegExp as delimiter
+
+## [**2.0.0**](https://github.com/hapijs/qs/issues?milestone=7&state=closed)
+- [**#18**](https://github.com/hapijs/qs/issues/18) Why is there arrayLimit?
+- [**#20**](https://github.com/hapijs/qs/issues/20) Configurable parametersLimit
+- [**#21**](https://github.com/hapijs/qs/issues/21) make all limits optional, for #18, for #20
+
+## [**1.2.2**](https://github.com/hapijs/qs/issues?milestone=6&state=closed)
+- [**#19**](https://github.com/hapijs/qs/issues/19) Don't overwrite null values
+
+## [**1.2.1**](https://github.com/hapijs/qs/issues?milestone=5&state=closed)
+- [**#16**](https://github.com/hapijs/qs/issues/16) ignore non-string delimiters
+- [**#15**](https://github.com/hapijs/qs/issues/15) Close code block
+
+## [**1.2.0**](https://github.com/hapijs/qs/issues?milestone=4&state=closed)
+- [**#12**](https://github.com/hapijs/qs/issues/12) Add optional delim argument
+- [**#13**](https://github.com/hapijs/qs/issues/13) fix #11: flattened keys in array are now correctly parsed
+
+## [**1.1.0**](https://github.com/hapijs/qs/issues?milestone=3&state=closed)
+- [**#7**](https://github.com/hapijs/qs/issues/7) Empty values of a POST array disappear after being submitted
+- [**#9**](https://github.com/hapijs/qs/issues/9) Should not omit equals signs (=) when value is null
+- [**#6**](https://github.com/hapijs/qs/issues/6) Minor grammar fix in README
+
+## [**1.0.2**](https://github.com/hapijs/qs/issues?milestone=2&state=closed)
+- [**#5**](https://github.com/hapijs/qs/issues/5) array holes incorrectly copied into object on large index
+
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/CONTRIBUTING.md b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/CONTRIBUTING.md
new file mode 100644
index 0000000..8928361
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/CONTRIBUTING.md
@@ -0,0 +1 @@
+Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md).
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/LICENSE
new file mode 100755
index 0000000..d456948
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/LICENSE
@@ -0,0 +1,28 @@
+Copyright (c) 2014 Nathan LaFreniere and other contributors.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * The names of any contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ * * *
+
+The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/Makefile b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/Makefile
new file mode 100644
index 0000000..31cc899
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/Makefile
@@ -0,0 +1,8 @@
+test:
+ @node node_modules/lab/bin/lab -a code -L
+test-cov:
+ @node node_modules/lab/bin/lab -a code -t 100 -L
+test-cov-html:
+ @node node_modules/lab/bin/lab -a code -L -r html -o coverage.html
+
+.PHONY: test test-cov test-cov-html
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/README.md
new file mode 100755
index 0000000..21bf3fa
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/README.md
@@ -0,0 +1,222 @@
+# qs
+
+A querystring parsing and stringifying library with some added security.
+
+[![Build Status](https://secure.travis-ci.org/hapijs/qs.svg)](http://travis-ci.org/hapijs/qs)
+
+Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf)
+
+The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring).
+
+## Usage
+
+```javascript
+var Qs = require('qs');
+
+var obj = Qs.parse('a=c'); // { a: 'c' }
+var str = Qs.stringify(obj); // 'a=c'
+```
+
+### Parsing Objects
+
+```javascript
+Qs.parse(string, [options]);
+```
+
+**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`.
+For example, the string `'foo[bar]=baz'` converts to:
+
+```javascript
+{
+ foo: {
+ bar: 'baz'
+ }
+}
+```
+
+URI encoded strings work too:
+
+```javascript
+Qs.parse('a%5Bb%5D=c');
+// { a: { b: 'c' } }
+```
+
+You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`:
+
+```javascript
+{
+ foo: {
+ bar: {
+ baz: 'foobarbaz'
+ }
+ }
+}
+```
+
+By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like
+`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be:
+
+```javascript
+{
+ a: {
+ b: {
+ c: {
+ d: {
+ e: {
+ f: {
+ '[g][h][i]': 'j'
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+This depth can be overridden by passing a `depth` option to `Qs.parse(string, [options])`:
+
+```javascript
+Qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 });
+// { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }
+```
+
+The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number.
+
+For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option:
+
+```javascript
+Qs.parse('a=b&c=d', { parameterLimit: 1 });
+// { a: 'b' }
+```
+
+An optional delimiter can also be passed:
+
+```javascript
+Qs.parse('a=b;c=d', { delimiter: ';' });
+// { a: 'b', c: 'd' }
+```
+
+Delimiters can be a regular expression too:
+
+```javascript
+Qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ });
+// { a: 'b', c: 'd', e: 'f' }
+```
+
+### Parsing Arrays
+
+**qs** can also parse arrays using a similar `[]` notation:
+
+```javascript
+Qs.parse('a[]=b&a[]=c');
+// { a: ['b', 'c'] }
+```
+
+You may specify an index as well:
+
+```javascript
+Qs.parse('a[1]=c&a[0]=b');
+// { a: ['b', 'c'] }
+```
+
+Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number
+to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving
+their order:
+
+```javascript
+Qs.parse('a[1]=b&a[15]=c');
+// { a: ['b', 'c'] }
+```
+
+Note that an empty string is also a value, and will be preserved:
+
+```javascript
+Qs.parse('a[]=&a[]=b');
+// { a: ['', 'b'] }
+Qs.parse('a[0]=b&a[1]=&a[2]=c');
+// { a: ['b', '', 'c'] }
+```
+
+**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will
+instead be converted to an object with the index as the key:
+
+```javascript
+Qs.parse('a[100]=b');
+// { a: { '100': 'b' } }
+```
+
+This limit can be overridden by passing an `arrayLimit` option:
+
+```javascript
+Qs.parse('a[1]=b', { arrayLimit: 0 });
+// { a: { '1': 'b' } }
+```
+
+To disable array parsing entirely, set `arrayLimit` to `-1`.
+
+If you mix notations, **qs** will merge the two items into an object:
+
+```javascript
+Qs.parse('a[0]=b&a[b]=c');
+// { a: { '0': 'b', b: 'c' } }
+```
+
+You can also create arrays of objects:
+
+```javascript
+Qs.parse('a[][b]=c');
+// { a: [{ b: 'c' }] }
+```
+
+### Stringifying
+
+```javascript
+Qs.stringify(object, [options]);
+```
+
+When stringifying, **qs** always URI encodes output. Objects are stringified as you would expect:
+
+```javascript
+Qs.stringify({ a: 'b' });
+// 'a=b'
+Qs.stringify({ a: { b: 'c' } });
+// 'a%5Bb%5D=c'
+```
+
+Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.
+
+When arrays are stringified, by default they are given explicit indices:
+
+```javascript
+Qs.stringify({ a: ['b', 'c', 'd'] });
+// 'a[0]=b&a[1]=c&a[2]=d'
+```
+
+You may override this by setting the `indices` option to `false`:
+
+```javascript
+Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false });
+// 'a=b&a=c&a=d'
+```
+
+Empty strings and null values will omit the value, but the equals sign (=) remains in place:
+
+```javascript
+Qs.stringify({ a: '' });
+// 'a='
+```
+
+Properties that are set to `undefined` will be omitted entirely:
+
+```javascript
+Qs.stringify({ a: null, b: undefined });
+// 'a='
+```
+
+The delimiter may be overridden with stringify as well:
+
+```javascript
+Qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' });
+// 'a=b;c=d'
+```
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/index.js
new file mode 100644
index 0000000..2291cd8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/index.js
@@ -0,0 +1 @@
+module.exports = require('./lib/');
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/lib/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/lib/index.js
new file mode 100755
index 0000000..0e09493
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/lib/index.js
@@ -0,0 +1,15 @@
+// Load modules
+
+var Stringify = require('./stringify');
+var Parse = require('./parse');
+
+
+// Declare internals
+
+var internals = {};
+
+
+module.exports = {
+ stringify: Stringify,
+ parse: Parse
+};
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/lib/parse.js b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/lib/parse.js
new file mode 100755
index 0000000..4e7d02a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/lib/parse.js
@@ -0,0 +1,157 @@
+// Load modules
+
+var Utils = require('./utils');
+
+
+// Declare internals
+
+var internals = {
+ delimiter: '&',
+ depth: 5,
+ arrayLimit: 20,
+ parameterLimit: 1000
+};
+
+
+internals.parseValues = function (str, options) {
+
+ var obj = {};
+ var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
+
+ for (var i = 0, il = parts.length; i < il; ++i) {
+ var part = parts[i];
+ var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
+
+ if (pos === -1) {
+ obj[Utils.decode(part)] = '';
+ }
+ else {
+ var key = Utils.decode(part.slice(0, pos));
+ var val = Utils.decode(part.slice(pos + 1));
+
+ if (!obj.hasOwnProperty(key)) {
+ obj[key] = val;
+ }
+ else {
+ obj[key] = [].concat(obj[key]).concat(val);
+ }
+ }
+ }
+
+ return obj;
+};
+
+
+internals.parseObject = function (chain, val, options) {
+
+ if (!chain.length) {
+ return val;
+ }
+
+ var root = chain.shift();
+
+ var obj = {};
+ if (root === '[]') {
+ obj = [];
+ obj = obj.concat(internals.parseObject(chain, val, options));
+ }
+ else {
+ var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;
+ var index = parseInt(cleanRoot, 10);
+ var indexString = '' + index;
+ if (!isNaN(index) &&
+ root !== cleanRoot &&
+ indexString === cleanRoot &&
+ index >= 0 &&
+ index <= options.arrayLimit) {
+
+ obj = [];
+ obj[index] = internals.parseObject(chain, val, options);
+ }
+ else {
+ obj[cleanRoot] = internals.parseObject(chain, val, options);
+ }
+ }
+
+ return obj;
+};
+
+
+internals.parseKeys = function (key, val, options) {
+
+ if (!key) {
+ return;
+ }
+
+ // The regex chunks
+
+ var parent = /^([^\[\]]*)/;
+ var child = /(\[[^\[\]]*\])/g;
+
+ // Get the parent
+
+ var segment = parent.exec(key);
+
+ // Don't allow them to overwrite object prototype properties
+
+ if (Object.prototype.hasOwnProperty(segment[1])) {
+ return;
+ }
+
+ // Stash the parent if it exists
+
+ var keys = [];
+ if (segment[1]) {
+ keys.push(segment[1]);
+ }
+
+ // Loop through children appending to the array until we hit depth
+
+ var i = 0;
+ while ((segment = child.exec(key)) !== null && i < options.depth) {
+
+ ++i;
+ if (!Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) {
+ keys.push(segment[1]);
+ }
+ }
+
+ // If there's a remainder, just add whatever is left
+
+ if (segment) {
+ keys.push('[' + key.slice(segment.index) + ']');
+ }
+
+ return internals.parseObject(keys, val, options);
+};
+
+
+module.exports = function (str, options) {
+
+ if (str === '' ||
+ str === null ||
+ typeof str === 'undefined') {
+
+ return {};
+ }
+
+ options = options || {};
+ options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;
+ options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;
+ options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;
+ options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;
+
+ var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;
+ var obj = {};
+
+ // Iterate over the keys and setup the new object
+
+ var keys = Object.keys(tempObj);
+ for (var i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
+ var newObj = internals.parseKeys(key, tempObj[key], options);
+ obj = Utils.merge(obj, newObj);
+ }
+
+ return Utils.compact(obj);
+};
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/lib/stringify.js b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/lib/stringify.js
new file mode 100755
index 0000000..b441104
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/lib/stringify.js
@@ -0,0 +1,77 @@
+// Load modules
+
+var Utils = require('./utils');
+
+
+// Declare internals
+
+var internals = {
+ delimiter: '&',
+ indices: true
+};
+
+
+internals.stringify = function (obj, prefix, options) {
+
+ if (Utils.isBuffer(obj)) {
+ obj = obj.toString();
+ }
+ else if (obj instanceof Date) {
+ obj = obj.toISOString();
+ }
+ else if (obj === null) {
+ obj = '';
+ }
+
+ if (typeof obj === 'string' ||
+ typeof obj === 'number' ||
+ typeof obj === 'boolean') {
+
+ return [encodeURIComponent(prefix) + '=' + encodeURIComponent(obj)];
+ }
+
+ var values = [];
+
+ if (typeof obj === 'undefined') {
+ return values;
+ }
+
+ var objKeys = Object.keys(obj);
+ for (var i = 0, il = objKeys.length; i < il; ++i) {
+ var key = objKeys[i];
+ if (!options.indices &&
+ Array.isArray(obj)) {
+
+ values = values.concat(internals.stringify(obj[key], prefix, options));
+ }
+ else {
+ values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', options));
+ }
+ }
+
+ return values;
+};
+
+
+module.exports = function (obj, options) {
+
+ options = options || {};
+ var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;
+ options.indices = typeof options.indices === 'boolean' ? options.indices : internals.indices;
+
+ var keys = [];
+
+ if (typeof obj !== 'object' ||
+ obj === null) {
+
+ return '';
+ }
+
+ var objKeys = Object.keys(obj);
+ for (var i = 0, il = objKeys.length; i < il; ++i) {
+ var key = objKeys[i];
+ keys = keys.concat(internals.stringify(obj[key], key, options));
+ }
+
+ return keys.join(delimiter);
+};
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/lib/utils.js b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/lib/utils.js
new file mode 100755
index 0000000..5240bd5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/lib/utils.js
@@ -0,0 +1,132 @@
+// Load modules
+
+
+// Declare internals
+
+var internals = {};
+
+
+exports.arrayToObject = function (source) {
+
+ var obj = {};
+ for (var i = 0, il = source.length; i < il; ++i) {
+ if (typeof source[i] !== 'undefined') {
+
+ obj[i] = source[i];
+ }
+ }
+
+ return obj;
+};
+
+
+exports.merge = function (target, source) {
+
+ if (!source) {
+ return target;
+ }
+
+ if (typeof source !== 'object') {
+ if (Array.isArray(target)) {
+ target.push(source);
+ }
+ else {
+ target[source] = true;
+ }
+
+ return target;
+ }
+
+ if (typeof target !== 'object') {
+ target = [target].concat(source);
+ return target;
+ }
+
+ if (Array.isArray(target) &&
+ !Array.isArray(source)) {
+
+ target = exports.arrayToObject(target);
+ }
+
+ var keys = Object.keys(source);
+ for (var k = 0, kl = keys.length; k < kl; ++k) {
+ var key = keys[k];
+ var value = source[key];
+
+ if (!target[key]) {
+ target[key] = value;
+ }
+ else {
+ target[key] = exports.merge(target[key], value);
+ }
+ }
+
+ return target;
+};
+
+
+exports.decode = function (str) {
+
+ try {
+ return decodeURIComponent(str.replace(/\+/g, ' '));
+ } catch (e) {
+ return str;
+ }
+};
+
+
+exports.compact = function (obj, refs) {
+
+ if (typeof obj !== 'object' ||
+ obj === null) {
+
+ return obj;
+ }
+
+ refs = refs || [];
+ var lookup = refs.indexOf(obj);
+ if (lookup !== -1) {
+ return refs[lookup];
+ }
+
+ refs.push(obj);
+
+ if (Array.isArray(obj)) {
+ var compacted = [];
+
+ for (var i = 0, il = obj.length; i < il; ++i) {
+ if (typeof obj[i] !== 'undefined') {
+ compacted.push(obj[i]);
+ }
+ }
+
+ return compacted;
+ }
+
+ var keys = Object.keys(obj);
+ for (i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
+ obj[key] = exports.compact(obj[key], refs);
+ }
+
+ return obj;
+};
+
+
+exports.isRegExp = function (obj) {
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
+};
+
+
+exports.isBuffer = function (obj) {
+
+ if (obj === null ||
+ typeof obj === 'undefined') {
+
+ return false;
+ }
+
+ return !!(obj.constructor &&
+ obj.constructor.isBuffer &&
+ obj.constructor.isBuffer(obj));
+};
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/package.json
new file mode 100644
index 0000000..466f9fb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "qs",
+ "version": "2.3.3",
+ "description": "A querystring parser that supports nesting and arrays, with a depth limit",
+ "homepage": "https://github.com/hapijs/qs",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {
+ "code": "1.x.x",
+ "lab": "5.x.x"
+ },
+ "scripts": {
+ "test": "make test-cov"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/hapijs/qs.git"
+ },
+ "keywords": [
+ "querystring",
+ "qs"
+ ],
+ "licenses": [
+ {
+ "type": "BSD",
+ "url": "http://github.com/hapijs/qs/raw/master/LICENSE"
+ }
+ ],
+ "gitHead": "9250c4cda5102fcf72441445816e6d311fc6813d",
+ "bugs": {
+ "url": "https://github.com/hapijs/qs/issues"
+ },
+ "_id": "qs@2.3.3",
+ "_shasum": "e9e85adbe75da0bbe4c8e0476a086290f863b404",
+ "_from": "qs@2.3.3",
+ "_npmVersion": "2.1.6",
+ "_nodeVersion": "0.10.32",
+ "_npmUser": {
+ "name": "nlf",
+ "email": "quitlahok@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "nlf",
+ "email": "quitlahok@gmail.com"
+ },
+ {
+ "name": "hueniverse",
+ "email": "eran@hueniverse.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e9e85adbe75da0bbe4c8e0476a086290f863b404",
+ "tarball": "http://registry.npmjs.org/qs/-/qs-2.3.3.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/test/parse.js b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/test/parse.js
new file mode 100755
index 0000000..6c20cc1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/test/parse.js
@@ -0,0 +1,413 @@
+/* eslint no-extend-native:0 */
+// Load modules
+
+var Code = require('code');
+var Lab = require('lab');
+var Qs = require('../');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var expect = Code.expect;
+var describe = lab.experiment;
+var it = lab.test;
+
+
+describe('parse()', function () {
+
+ it('parses a simple string', function (done) {
+
+ expect(Qs.parse('0=foo')).to.deep.equal({ '0': 'foo' });
+ expect(Qs.parse('foo=c++')).to.deep.equal({ foo: 'c ' });
+ expect(Qs.parse('a[>=]=23')).to.deep.equal({ a: { '>=': '23' } });
+ expect(Qs.parse('a[<=>]==23')).to.deep.equal({ a: { '<=>': '=23' } });
+ expect(Qs.parse('a[==]=23')).to.deep.equal({ a: { '==': '23' } });
+ expect(Qs.parse('foo')).to.deep.equal({ foo: '' });
+ expect(Qs.parse('foo=bar')).to.deep.equal({ foo: 'bar' });
+ expect(Qs.parse(' foo = bar = baz ')).to.deep.equal({ ' foo ': ' bar = baz ' });
+ expect(Qs.parse('foo=bar=baz')).to.deep.equal({ foo: 'bar=baz' });
+ expect(Qs.parse('foo=bar&bar=baz')).to.deep.equal({ foo: 'bar', bar: 'baz' });
+ expect(Qs.parse('foo=bar&baz')).to.deep.equal({ foo: 'bar', baz: '' });
+ expect(Qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World')).to.deep.equal({
+ cht: 'p3',
+ chd: 't:60,40',
+ chs: '250x100',
+ chl: 'Hello|World'
+ });
+ done();
+ });
+
+ it('parses a single nested string', function (done) {
+
+ expect(Qs.parse('a[b]=c')).to.deep.equal({ a: { b: 'c' } });
+ done();
+ });
+
+ it('parses a double nested string', function (done) {
+
+ expect(Qs.parse('a[b][c]=d')).to.deep.equal({ a: { b: { c: 'd' } } });
+ done();
+ });
+
+ it('defaults to a depth of 5', function (done) {
+
+ expect(Qs.parse('a[b][c][d][e][f][g][h]=i')).to.deep.equal({ a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } });
+ done();
+ });
+
+ it('only parses one level when depth = 1', function (done) {
+
+ expect(Qs.parse('a[b][c]=d', { depth: 1 })).to.deep.equal({ a: { b: { '[c]': 'd' } } });
+ expect(Qs.parse('a[b][c][d]=e', { depth: 1 })).to.deep.equal({ a: { b: { '[c][d]': 'e' } } });
+ done();
+ });
+
+ it('parses a simple array', function (done) {
+
+ expect(Qs.parse('a=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+ done();
+ });
+
+ it('parses an explicit array', function (done) {
+
+ expect(Qs.parse('a[]=b')).to.deep.equal({ a: ['b'] });
+ expect(Qs.parse('a[]=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[]=b&a[]=c&a[]=d')).to.deep.equal({ a: ['b', 'c', 'd'] });
+ done();
+ });
+
+ it('parses a mix of simple and explicit arrays', function (done) {
+
+ expect(Qs.parse('a=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[0]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a=b&a[0]=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[1]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a=b&a[1]=c')).to.deep.equal({ a: ['b', 'c'] });
+ done();
+ });
+
+ it('parses a nested array', function (done) {
+
+ expect(Qs.parse('a[b][]=c&a[b][]=d')).to.deep.equal({ a: { b: ['c', 'd'] } });
+ expect(Qs.parse('a[>=]=25')).to.deep.equal({ a: { '>=': '25' } });
+ done();
+ });
+
+ it('allows to specify array indices', function (done) {
+
+ expect(Qs.parse('a[1]=c&a[0]=b&a[2]=d')).to.deep.equal({ a: ['b', 'c', 'd'] });
+ expect(Qs.parse('a[1]=c&a[0]=b')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[1]=c')).to.deep.equal({ a: ['c'] });
+ done();
+ });
+
+ it('limits specific array indices to 20', function (done) {
+
+ expect(Qs.parse('a[20]=a')).to.deep.equal({ a: ['a'] });
+ expect(Qs.parse('a[21]=a')).to.deep.equal({ a: { '21': 'a' } });
+ done();
+ });
+
+ it('supports keys that begin with a number', function (done) {
+
+ expect(Qs.parse('a[12b]=c')).to.deep.equal({ a: { '12b': 'c' } });
+ done();
+ });
+
+ it('supports encoded = signs', function (done) {
+
+ expect(Qs.parse('he%3Dllo=th%3Dere')).to.deep.equal({ 'he=llo': 'th=ere' });
+ done();
+ });
+
+ it('is ok with url encoded strings', function (done) {
+
+ expect(Qs.parse('a[b%20c]=d')).to.deep.equal({ a: { 'b c': 'd' } });
+ expect(Qs.parse('a[b]=c%20d')).to.deep.equal({ a: { b: 'c d' } });
+ done();
+ });
+
+ it('allows brackets in the value', function (done) {
+
+ expect(Qs.parse('pets=["tobi"]')).to.deep.equal({ pets: '["tobi"]' });
+ expect(Qs.parse('operators=[">=", "<="]')).to.deep.equal({ operators: '[">=", "<="]' });
+ done();
+ });
+
+ it('allows empty values', function (done) {
+
+ expect(Qs.parse('')).to.deep.equal({});
+ expect(Qs.parse(null)).to.deep.equal({});
+ expect(Qs.parse(undefined)).to.deep.equal({});
+ done();
+ });
+
+ it('transforms arrays to objects', function (done) {
+
+ expect(Qs.parse('foo[0]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } });
+ expect(Qs.parse('foo[bad]=baz&foo[0]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } });
+ expect(Qs.parse('foo[bad]=baz&foo[]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } });
+ expect(Qs.parse('foo[]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } });
+ expect(Qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar', '1': 'foo' } });
+ expect(Qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb')).to.deep.equal({foo: [ {a: 'a', b: 'b'}, {a: 'aa', b: 'bb'} ]});
+ done();
+ });
+
+ it('can add keys to objects', function (done) {
+
+ expect(Qs.parse('a[b]=c&a=d')).to.deep.equal({ a: { b: 'c', d: true } });
+ done();
+ });
+
+ it('correctly prunes undefined values when converting an array to an object', function (done) {
+
+ expect(Qs.parse('a[2]=b&a[99999999]=c')).to.deep.equal({ a: { '2': 'b', '99999999': 'c' } });
+ done();
+ });
+
+ it('supports malformed uri characters', function (done) {
+
+ expect(Qs.parse('{%:%}')).to.deep.equal({ '{%:%}': '' });
+ expect(Qs.parse('foo=%:%}')).to.deep.equal({ foo: '%:%}' });
+ done();
+ });
+
+ it('doesn\'t produce empty keys', function (done) {
+
+ expect(Qs.parse('_r=1&')).to.deep.equal({ '_r': '1' });
+ done();
+ });
+
+ it('cannot override prototypes', function (done) {
+
+ var obj = Qs.parse('toString=bad&bad[toString]=bad&constructor=bad');
+ expect(typeof obj.toString).to.equal('function');
+ expect(typeof obj.bad.toString).to.equal('function');
+ expect(typeof obj.constructor).to.equal('function');
+ done();
+ });
+
+ it('cannot access Object prototype', function (done) {
+
+ Qs.parse('constructor[prototype][bad]=bad');
+ Qs.parse('bad[constructor][prototype][bad]=bad');
+ expect(typeof Object.prototype.bad).to.equal('undefined');
+ done();
+ });
+
+ it('parses arrays of objects', function (done) {
+
+ expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
+ expect(Qs.parse('a[0][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
+ done();
+ });
+
+ it('allows for empty strings in arrays', function (done) {
+
+ expect(Qs.parse('a[]=b&a[]=&a[]=c')).to.deep.equal({ a: ['b', '', 'c'] });
+ expect(Qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]=')).to.deep.equal({ a: ['b', '', 'c', ''] });
+ expect(Qs.parse('a[]=&a[]=b&a[]=c')).to.deep.equal({ a: ['', 'b', 'c'] });
+ done();
+ });
+
+ it('compacts sparse arrays', function (done) {
+
+ expect(Qs.parse('a[10]=1&a[2]=2')).to.deep.equal({ a: ['2', '1'] });
+ done();
+ });
+
+ it('parses semi-parsed strings', function (done) {
+
+ expect(Qs.parse({ 'a[b]': 'c' })).to.deep.equal({ a: { b: 'c' } });
+ expect(Qs.parse({ 'a[b]': 'c', 'a[d]': 'e' })).to.deep.equal({ a: { b: 'c', d: 'e' } });
+ done();
+ });
+
+ it('parses buffers correctly', function (done) {
+
+ var b = new Buffer('test');
+ expect(Qs.parse({ a: b })).to.deep.equal({ a: b });
+ done();
+ });
+
+ it('continues parsing when no parent is found', function (done) {
+
+ expect(Qs.parse('[]&a=b')).to.deep.equal({ '0': '', a: 'b' });
+ expect(Qs.parse('[foo]=bar')).to.deep.equal({ foo: 'bar' });
+ done();
+ });
+
+ it('does not error when parsing a very long array', function (done) {
+
+ var str = 'a[]=a';
+ while (Buffer.byteLength(str) < 128 * 1024) {
+ str += '&' + str;
+ }
+
+ expect(function () {
+
+ Qs.parse(str);
+ }).to.not.throw();
+
+ done();
+ });
+
+ it('should not throw when a native prototype has an enumerable property', { parallel: false }, function (done) {
+
+ Object.prototype.crash = '';
+ Array.prototype.crash = '';
+ expect(Qs.parse.bind(null, 'a=b')).to.not.throw();
+ expect(Qs.parse('a=b')).to.deep.equal({ a: 'b' });
+ expect(Qs.parse.bind(null, 'a[][b]=c')).to.not.throw();
+ expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
+ delete Object.prototype.crash;
+ delete Array.prototype.crash;
+ done();
+ });
+
+ it('parses a string with an alternative string delimiter', function (done) {
+
+ expect(Qs.parse('a=b;c=d', { delimiter: ';' })).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('parses a string with an alternative RegExp delimiter', function (done) {
+
+ expect(Qs.parse('a=b; c=d', { delimiter: /[;,] */ })).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('does not use non-splittable objects as delimiters', function (done) {
+
+ expect(Qs.parse('a=b&c=d', { delimiter: true })).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('allows overriding parameter limit', function (done) {
+
+ expect(Qs.parse('a=b&c=d', { parameterLimit: 1 })).to.deep.equal({ a: 'b' });
+ done();
+ });
+
+ it('allows setting the parameter limit to Infinity', function (done) {
+
+ expect(Qs.parse('a=b&c=d', { parameterLimit: Infinity })).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('allows overriding array limit', function (done) {
+
+ expect(Qs.parse('a[0]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '0': 'b' } });
+ expect(Qs.parse('a[-1]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '-1': 'b' } });
+ expect(Qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 })).to.deep.equal({ a: { '0': 'b', '1': 'c' } });
+ done();
+ });
+
+ it('parses an object', function (done) {
+
+ var input = {
+ 'user[name]': {'pop[bob]': 3},
+ 'user[email]': null
+ };
+
+ var expected = {
+ 'user': {
+ 'name': {'pop[bob]': 3},
+ 'email': null
+ }
+ };
+
+ var result = Qs.parse(input);
+
+ expect(result).to.deep.equal(expected);
+ done();
+ });
+
+ it('parses an object and not child values', function (done) {
+
+ var input = {
+ 'user[name]': {'pop[bob]': { 'test': 3 }},
+ 'user[email]': null
+ };
+
+ var expected = {
+ 'user': {
+ 'name': {'pop[bob]': { 'test': 3 }},
+ 'email': null
+ }
+ };
+
+ var result = Qs.parse(input);
+
+ expect(result).to.deep.equal(expected);
+ done();
+ });
+
+ it('does not blow up when Buffer global is missing', function (done) {
+
+ var tempBuffer = global.Buffer;
+ delete global.Buffer;
+ var result = Qs.parse('a=b&c=d');
+ global.Buffer = tempBuffer;
+ expect(result).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('does not crash when using invalid dot notation', function (done) {
+
+ expect(Qs.parse('roomInfoList[0].childrenAges[0]=15&roomInfoList[0].numberOfAdults=2')).to.deep.equal({ roomInfoList: [['15', '2']] });
+ done();
+ });
+
+ it('does not crash when parsing circular references', function (done) {
+
+ var a = {};
+ a.b = a;
+
+ var parsed;
+
+ expect(function () {
+
+ parsed = Qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a });
+ }).to.not.throw();
+
+ expect(parsed).to.contain('foo');
+ expect(parsed.foo).to.contain('bar', 'baz');
+ expect(parsed.foo.bar).to.equal('baz');
+ expect(parsed.foo.baz).to.deep.equal(a);
+ done();
+ });
+
+ it('parses plain objects correctly', function (done) {
+
+ var a = Object.create(null);
+ a.b = 'c';
+
+ expect(Qs.parse(a)).to.deep.equal({ b: 'c' });
+ var result = Qs.parse({ a: a });
+ expect(result).to.contain('a');
+ expect(result.a).to.deep.equal(a);
+ done();
+ });
+
+ it('parses dates correctly', function (done) {
+
+ var now = new Date();
+ expect(Qs.parse({ a: now })).to.deep.equal({ a: now });
+ done();
+ });
+
+ it('parses regular expressions correctly', function (done) {
+
+ var re = /^test$/;
+ expect(Qs.parse({ a: re })).to.deep.equal({ a: re });
+ done();
+ });
+});
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/qs/test/stringify.js b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/test/stringify.js
new file mode 100755
index 0000000..75e397a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/qs/test/stringify.js
@@ -0,0 +1,179 @@
+/* eslint no-extend-native:0 */
+// Load modules
+
+var Code = require('code');
+var Lab = require('lab');
+var Qs = require('../');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var expect = Code.expect;
+var describe = lab.experiment;
+var it = lab.test;
+
+
+describe('stringify()', function () {
+
+ it('stringifies a querystring object', function (done) {
+
+ expect(Qs.stringify({ a: 'b' })).to.equal('a=b');
+ expect(Qs.stringify({ a: 1 })).to.equal('a=1');
+ expect(Qs.stringify({ a: 1, b: 2 })).to.equal('a=1&b=2');
+ done();
+ });
+
+ it('stringifies a nested object', function (done) {
+
+ expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c');
+ expect(Qs.stringify({ a: { b: { c: { d: 'e' } } } })).to.equal('a%5Bb%5D%5Bc%5D%5Bd%5D=e');
+ done();
+ });
+
+ it('stringifies an array value', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c', 'd'] })).to.equal('a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d');
+ done();
+ });
+
+ it('omits array indices when asked', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false })).to.equal('a=b&a=c&a=d');
+ done();
+ });
+
+ it('stringifies a nested array value', function (done) {
+
+ expect(Qs.stringify({ a: { b: ['c', 'd'] } })).to.equal('a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
+ done();
+ });
+
+ it('stringifies an object inside an array', function (done) {
+
+ expect(Qs.stringify({ a: [{ b: 'c' }] })).to.equal('a%5B0%5D%5Bb%5D=c');
+ expect(Qs.stringify({ a: [{ b: { c: [1] } }] })).to.equal('a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1');
+ done();
+ });
+
+ it('does not omit object keys when indices = false', function (done) {
+
+ expect(Qs.stringify({ a: [{ b: 'c' }] }, { indices: false })).to.equal('a%5Bb%5D=c');
+ done();
+ });
+
+ it('stringifies a complicated object', function (done) {
+
+ expect(Qs.stringify({ a: { b: 'c', d: 'e' } })).to.equal('a%5Bb%5D=c&a%5Bd%5D=e');
+ done();
+ });
+
+ it('stringifies an empty value', function (done) {
+
+ expect(Qs.stringify({ a: '' })).to.equal('a=');
+ expect(Qs.stringify({ a: '', b: '' })).to.equal('a=&b=');
+ expect(Qs.stringify({ a: null })).to.equal('a=');
+ expect(Qs.stringify({ a: { b: null } })).to.equal('a%5Bb%5D=');
+ done();
+ });
+
+ it('stringifies an empty object', function (done) {
+
+ var obj = Object.create(null);
+ obj.a = 'b';
+ expect(Qs.stringify(obj)).to.equal('a=b');
+ done();
+ });
+
+ it('returns an empty string for invalid input', function (done) {
+
+ expect(Qs.stringify(undefined)).to.equal('');
+ expect(Qs.stringify(false)).to.equal('');
+ expect(Qs.stringify(null)).to.equal('');
+ expect(Qs.stringify('')).to.equal('');
+ done();
+ });
+
+ it('stringifies an object with an empty object as a child', function (done) {
+
+ var obj = {
+ a: Object.create(null)
+ };
+
+ obj.a.b = 'c';
+ expect(Qs.stringify(obj)).to.equal('a%5Bb%5D=c');
+ done();
+ });
+
+ it('drops keys with a value of undefined', function (done) {
+
+ expect(Qs.stringify({ a: undefined })).to.equal('');
+ expect(Qs.stringify({ a: { b: undefined, c: null } })).to.equal('a%5Bc%5D=');
+ done();
+ });
+
+ it('url encodes values', function (done) {
+
+ expect(Qs.stringify({ a: 'b c' })).to.equal('a=b%20c');
+ done();
+ });
+
+ it('stringifies a date', function (done) {
+
+ var now = new Date();
+ var str = 'a=' + encodeURIComponent(now.toISOString());
+ expect(Qs.stringify({ a: now })).to.equal(str);
+ done();
+ });
+
+ it('stringifies the weird object from qs', function (done) {
+
+ expect(Qs.stringify({ 'my weird field': 'q1!2"\'w$5&7/z8)?' })).to.equal('my%20weird%20field=q1!2%22\'w%245%267%2Fz8)%3F');
+ done();
+ });
+
+ it('skips properties that are part of the object prototype', function (done) {
+
+ Object.prototype.crash = 'test';
+ expect(Qs.stringify({ a: 'b'})).to.equal('a=b');
+ expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c');
+ delete Object.prototype.crash;
+ done();
+ });
+
+ it('stringifies boolean values', function (done) {
+
+ expect(Qs.stringify({ a: true })).to.equal('a=true');
+ expect(Qs.stringify({ a: { b: true } })).to.equal('a%5Bb%5D=true');
+ expect(Qs.stringify({ b: false })).to.equal('b=false');
+ expect(Qs.stringify({ b: { c: false } })).to.equal('b%5Bc%5D=false');
+ done();
+ });
+
+ it('stringifies buffer values', function (done) {
+
+ expect(Qs.stringify({ a: new Buffer('test') })).to.equal('a=test');
+ expect(Qs.stringify({ a: { b: new Buffer('test') } })).to.equal('a%5Bb%5D=test');
+ done();
+ });
+
+ it('stringifies an object using an alternative delimiter', function (done) {
+
+ expect(Qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' })).to.equal('a=b;c=d');
+ done();
+ });
+
+ it('doesn\'t blow up when Buffer global is missing', function (done) {
+
+ var tempBuffer = global.Buffer;
+ delete global.Buffer;
+ expect(Qs.stringify({ a: 'b', c: 'd' })).to.equal('a=b&c=d');
+ global.Buffer = tempBuffer;
+ done();
+ });
+});
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/HISTORY.md
new file mode 100644
index 0000000..1bb53bd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/HISTORY.md
@@ -0,0 +1,35 @@
+1.0.2 / 2014-09-08
+==================
+
+ * Support Node.js 0.6
+
+1.0.1 / 2014-09-07
+==================
+
+ * Move repository to jshttp
+
+1.0.0 / 2013-12-11
+==================
+
+ * Add repository to package.json
+ * Add MIT license
+
+0.0.4 / 2012-06-17
+==================
+
+ * Change ret -1 for unsatisfiable and -2 when invalid
+
+0.0.3 / 2012-06-17
+==================
+
+ * Fix last-byte-pos default to len - 1
+
+0.0.2 / 2012-06-14
+==================
+
+ * Add `.type`
+
+0.0.1 / 2012-06-11
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/LICENSE
new file mode 100644
index 0000000..a491841
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012-2014 TJ Holowaychuk <vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/README.md
new file mode 100644
index 0000000..6a2682f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/README.md
@@ -0,0 +1,48 @@
+# range-parser
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Range header field parser.
+
+## Installation
+
+```
+$ npm install range-parser
+```
+
+## Examples
+
+```js
+assert(-1 == parse(200, 'bytes=500-20'));
+assert(-2 == parse(200, 'bytes=malformed'));
+parse(200, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 199 }]));
+parse(1000, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 499 }]));
+parse(1000, 'bytes=40-80').should.eql(arr('bytes', [{ start: 40, end: 80 }]));
+parse(1000, 'bytes=-500').should.eql(arr('bytes', [{ start: 500, end: 999 }]));
+parse(1000, 'bytes=-400').should.eql(arr('bytes', [{ start: 600, end: 999 }]));
+parse(1000, 'bytes=500-').should.eql(arr('bytes', [{ start: 500, end: 999 }]));
+parse(1000, 'bytes=400-').should.eql(arr('bytes', [{ start: 400, end: 999 }]));
+parse(1000, 'bytes=0-0').should.eql(arr('bytes', [{ start: 0, end: 0 }]));
+parse(1000, 'bytes=-1').should.eql(arr('bytes', [{ start: 999, end: 999 }]));
+parse(1000, 'items=0-5').should.eql(arr('items', [{ start: 0, end: 5 }]));
+parse(1000, 'bytes=40-80,-1').should.eql(arr('bytes', [{ start: 40, end: 80 }, { start: 999, end: 999 }]));
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/range-parser.svg?style=flat
+[npm-url]: https://npmjs.org/package/range-parser
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/range-parser.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/range-parser
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/range-parser.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/range-parser
+[downloads-image]: https://img.shields.io/npm/dm/range-parser.svg?style=flat
+[downloads-url]: https://npmjs.org/package/range-parser
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/index.js
new file mode 100644
index 0000000..09a6c40
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/index.js
@@ -0,0 +1,49 @@
+
+/**
+ * Parse "Range" header `str` relative to the given file `size`.
+ *
+ * @param {Number} size
+ * @param {String} str
+ * @return {Array}
+ * @api public
+ */
+
+module.exports = function(size, str){
+ var valid = true;
+ var i = str.indexOf('=');
+
+ if (-1 == i) return -2;
+
+ var arr = str.slice(i + 1).split(',').map(function(range){
+ var range = range.split('-')
+ , start = parseInt(range[0], 10)
+ , end = parseInt(range[1], 10);
+
+ // -nnn
+ if (isNaN(start)) {
+ start = size - end;
+ end = size - 1;
+ // nnn-
+ } else if (isNaN(end)) {
+ end = size - 1;
+ }
+
+ // limit last-byte-pos to current length
+ if (end > size - 1) end = size - 1;
+
+ // invalid
+ if (isNaN(start)
+ || isNaN(end)
+ || start > end
+ || start < 0) valid = false;
+
+ return {
+ start: start,
+ end: end
+ };
+ });
+
+ arr.type = str.slice(0, i);
+
+ return valid ? arr : -1;
+};
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/package.json
new file mode 100644
index 0000000..9fc243b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/range-parser/package.json
@@ -0,0 +1,76 @@
+{
+ "name": "range-parser",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ },
+ "description": "Range header field string parser",
+ "version": "1.0.2",
+ "license": "MIT",
+ "keywords": [
+ "range",
+ "parser",
+ "http"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/range-parser"
+ },
+ "devDependencies": {
+ "istanbul": "0",
+ "mocha": "1",
+ "should": "2"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --require should",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --require should"
+ },
+ "gitHead": "ae23b02ce705b56e7f7c48e832d41fa710227ecc",
+ "bugs": {
+ "url": "https://github.com/jshttp/range-parser/issues"
+ },
+ "homepage": "https://github.com/jshttp/range-parser",
+ "_id": "range-parser@1.0.2",
+ "_shasum": "06a12a42e5131ba8e457cd892044867f2344e549",
+ "_from": "range-parser@~1.0.2",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "06a12a42e5131ba8e457cd892044867f2344e549",
+ "tarball": "http://registry.npmjs.org/range-parser/-/range-parser-1.0.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.2.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/History.md b/dgbuilder/dgeflows/node_modules/express/node_modules/send/History.md
new file mode 100644
index 0000000..697a028
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/History.md
@@ -0,0 +1,241 @@
+0.11.1 / 2015-01-20
+===================
+
+ * Fix `root` path disclosure
+
+0.11.0 / 2015-01-05
+===================
+
+ * deps: debug@~2.1.1
+ * deps: etag@~1.5.1
+ - deps: crc@3.2.1
+ * deps: ms@0.7.0
+ - Add `milliseconds`
+ - Add `msecs`
+ - Add `secs`
+ - Add `mins`
+ - Add `hrs`
+ - Add `yrs`
+ * deps: on-finished@~2.2.0
+
+0.10.1 / 2014-10-22
+===================
+
+ * deps: on-finished@~2.1.1
+ - Fix handling of pipelined requests
+
+0.10.0 / 2014-10-15
+===================
+
+ * deps: debug@~2.1.0
+ - Implement `DEBUG_FD` env variable support
+ * deps: depd@~1.0.0
+ * deps: etag@~1.5.0
+ - Improve string performance
+ - Slightly improve speed for weak ETags over 1KB
+
+0.9.3 / 2014-09-24
+==================
+
+ * deps: etag@~1.4.0
+ - Support "fake" stats objects
+
+0.9.2 / 2014-09-15
+==================
+
+ * deps: depd@0.4.5
+ * deps: etag@~1.3.1
+ * deps: range-parser@~1.0.2
+
+0.9.1 / 2014-09-07
+==================
+
+ * deps: fresh@0.2.4
+
+0.9.0 / 2014-09-07
+==================
+
+ * Add `lastModified` option
+ * Use `etag` to generate `ETag` header
+ * deps: debug@~2.0.0
+
+0.8.5 / 2014-09-04
+==================
+
+ * Fix malicious path detection for empty string path
+
+0.8.4 / 2014-09-04
+==================
+
+ * Fix a path traversal issue when using `root`
+
+0.8.3 / 2014-08-16
+==================
+
+ * deps: destroy@1.0.3
+ - renamed from dethroy
+ * deps: on-finished@2.1.0
+
+0.8.2 / 2014-08-14
+==================
+
+ * Work around `fd` leak in Node.js 0.10 for `fs.ReadStream`
+ * deps: dethroy@1.0.2
+
+0.8.1 / 2014-08-05
+==================
+
+ * Fix `extensions` behavior when file already has extension
+
+0.8.0 / 2014-08-05
+==================
+
+ * Add `extensions` option
+
+0.7.4 / 2014-08-04
+==================
+
+ * Fix serving index files without root dir
+
+0.7.3 / 2014-07-29
+==================
+
+ * Fix incorrect 403 on Windows and Node.js 0.11
+
+0.7.2 / 2014-07-27
+==================
+
+ * deps: depd@0.4.4
+ - Work-around v8 generating empty stack traces
+
+0.7.1 / 2014-07-26
+==================
+
+ * deps: depd@0.4.3
+ - Fix exception when global `Error.stackTraceLimit` is too low
+
+0.7.0 / 2014-07-20
+==================
+
+ * Deprecate `hidden` option; use `dotfiles` option
+ * Add `dotfiles` option
+ * deps: debug@1.0.4
+ * deps: depd@0.4.2
+ - Add `TRACE_DEPRECATION` environment variable
+ - Remove non-standard grey color from color output
+ - Support `--no-deprecation` argument
+ - Support `--trace-deprecation` argument
+
+0.6.0 / 2014-07-11
+==================
+
+ * Deprecate `from` option; use `root` option
+ * Deprecate `send.etag()` -- use `etag` in `options`
+ * Deprecate `send.hidden()` -- use `hidden` in `options`
+ * Deprecate `send.index()` -- use `index` in `options`
+ * Deprecate `send.maxage()` -- use `maxAge` in `options`
+ * Deprecate `send.root()` -- use `root` in `options`
+ * Cap `maxAge` value to 1 year
+ * deps: debug@1.0.3
+ - Add support for multiple wildcards in namespaces
+
+0.5.0 / 2014-06-28
+==================
+
+ * Accept string for `maxAge` (converted by `ms`)
+ * Add `headers` event
+ * Include link in default redirect response
+ * Use `EventEmitter.listenerCount` to count listeners
+
+0.4.3 / 2014-06-11
+==================
+
+ * Do not throw un-catchable error on file open race condition
+ * Use `escape-html` for HTML escaping
+ * deps: debug@1.0.2
+ - fix some debugging output colors on node.js 0.8
+ * deps: finished@1.2.2
+ * deps: fresh@0.2.2
+
+0.4.2 / 2014-06-09
+==================
+
+ * fix "event emitter leak" warnings
+ * deps: debug@1.0.1
+ * deps: finished@1.2.1
+
+0.4.1 / 2014-06-02
+==================
+
+ * Send `max-age` in `Cache-Control` in correct format
+
+0.4.0 / 2014-05-27
+==================
+
+ * Calculate ETag with md5 for reduced collisions
+ * Fix wrong behavior when index file matches directory
+ * Ignore stream errors after request ends
+ - Goodbye `EBADF, read`
+ * Skip directories in index file search
+ * deps: debug@0.8.1
+
+0.3.0 / 2014-04-24
+==================
+
+ * Fix sending files with dots without root set
+ * Coerce option types
+ * Accept API options in options object
+ * Set etags to "weak"
+ * Include file path in etag
+ * Make "Can't set headers after they are sent." catchable
+ * Send full entity-body for multi range requests
+ * Default directory access to 403 when index disabled
+ * Support multiple index paths
+ * Support "If-Range" header
+ * Control whether to generate etags
+ * deps: mime@1.2.11
+
+0.2.0 / 2014-01-29
+==================
+
+ * update range-parser and fresh
+
+0.1.4 / 2013-08-11
+==================
+
+ * update fresh
+
+0.1.3 / 2013-07-08
+==================
+
+ * Revert "Fix fd leak"
+
+0.1.2 / 2013-07-03
+==================
+
+ * Fix fd leak
+
+0.1.0 / 2012-08-25
+==================
+
+ * add options parameter to send() that is passed to fs.createReadStream() [kanongil]
+
+0.0.4 / 2012-08-16
+==================
+
+ * allow custom "Accept-Ranges" definition
+
+0.0.3 / 2012-07-16
+==================
+
+ * fix normalization of the root directory. Closes #3
+
+0.0.2 / 2012-07-09
+==================
+
+ * add passing of req explicitly for now (YUCK)
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/send/LICENSE
new file mode 100644
index 0000000..3b87e2d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2012 TJ Holowaychuk
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/Readme.md b/dgbuilder/dgeflows/node_modules/express/node_modules/send/Readme.md
new file mode 100644
index 0000000..5c03b96
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/Readme.md
@@ -0,0 +1,192 @@
+# send
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Send is a library for streaming files from the file system as a http response
+supporting partial responses (Ranges), conditional-GET negotiation, high test
+coverage, and granular events which may be leveraged to take appropriate actions
+in your application or framework.
+
+Looking to serve up entire folders mapped to URLs? Try [serve-static](https://www.npmjs.org/package/serve-static).
+
+## Installation
+
+```bash
+$ npm install send
+```
+
+## API
+
+```js
+var send = require('send')
+```
+
+### send(req, path, [options])
+
+Create a new `SendStream` for the given path to send to a `res`. The `req` is
+the Node.js HTTP request and the `path` is a urlencoded path to send (urlencoded,
+not the actual file-system path).
+
+#### Options
+
+##### dotfiles
+
+Set how "dotfiles" are treated when encountered. A dotfile is a file
+or directory that begins with a dot ("."). Note this check is done on
+the path itself without checking if the path actually exists on the
+disk. If `root` is specified, only the dotfiles above the root are
+checked (i.e. the root itself can be within a dotfile when when set
+to "deny").
+
+ - `'allow'` No special treatment for dotfiles.
+ - `'deny'` Send a 403 for any request for a dotfile.
+ - `'ignore'` Pretend like the dotfile does not exist and 404.
+
+The default value is _similar_ to `'ignore'`, with the exception that
+this default will not ignore the files within a directory that begins
+with a dot, for backward-compatibility.
+
+##### etag
+
+Enable or disable etag generation, defaults to true.
+
+##### extensions
+
+If a given file doesn't exist, try appending one of the given extensions,
+in the given order. By default, this is disabled (set to `false`). An
+example value that will serve extension-less HTML files: `['html', 'htm']`.
+This is skipped if the requested file already has an extension.
+
+##### index
+
+By default send supports "index.html" files, to disable this
+set `false` or to supply a new index pass a string or an array
+in preferred order.
+
+##### lastModified
+
+Enable or disable `Last-Modified` header, defaults to true. Uses the file
+system's last modified value.
+
+##### maxAge
+
+Provide a max-age in milliseconds for http caching, defaults to 0.
+This can also be a string accepted by the
+[ms](https://www.npmjs.org/package/ms#readme) module.
+
+##### root
+
+Serve files relative to `path`.
+
+### Events
+
+The `SendStream` is an event emitter and will emit the following events:
+
+ - `error` an error occurred `(err)`
+ - `directory` a directory was requested
+ - `file` a file was requested `(path, stat)`
+ - `headers` the headers are about to be set on a file `(res, path, stat)`
+ - `stream` file streaming has started `(stream)`
+ - `end` streaming has completed
+
+### .pipe
+
+The `pipe` method is used to pipe the response into the Node.js HTTP response
+object, typically `send(req, path, options).pipe(res)`.
+
+## Error-handling
+
+By default when no `error` listeners are present an automatic response will be
+made, otherwise you have full control over the response, aka you may show a 5xx
+page etc.
+
+## Caching
+
+It does _not_ perform internal caching, you should use a reverse proxy cache
+such as Varnish for this, or those fancy things called CDNs. If your
+application is small enough that it would benefit from single-node memory
+caching, it's small enough that it does not need caching at all ;).
+
+## Debugging
+
+To enable `debug()` instrumentation output export __DEBUG__:
+
+```
+$ DEBUG=send node app
+```
+
+## Running tests
+
+```
+$ npm install
+$ npm test
+```
+
+## Examples
+
+### Small example
+
+```js
+var http = require('http');
+var send = require('send');
+
+var app = http.createServer(function(req, res){
+ send(req, req.url).pipe(res);
+}).listen(3000);
+```
+
+Serving from a root directory with custom error-handling:
+
+```js
+var http = require('http');
+var send = require('send');
+var url = require('url');
+
+var app = http.createServer(function(req, res){
+ // your custom error-handling logic:
+ function error(err) {
+ res.statusCode = err.status || 500;
+ res.end(err.message);
+ }
+
+ // your custom headers
+ function headers(res, path, stat) {
+ // serve all files for download
+ res.setHeader('Content-Disposition', 'attachment');
+ }
+
+ // your custom directory handling logic:
+ function redirect() {
+ res.statusCode = 301;
+ res.setHeader('Location', req.url + '/');
+ res.end('Redirecting to ' + req.url + '/');
+ }
+
+ // transfer arbitrary files from within
+ // /www/example.com/public/*
+ send(req, url.parse(req.url).pathname, {root: '/www/example.com/public'})
+ .on('error', error)
+ .on('directory', redirect)
+ .on('headers', headers)
+ .pipe(res);
+}).listen(3000);
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/send.svg?style=flat
+[npm-url]: https://npmjs.org/package/send
+[travis-image]: https://img.shields.io/travis/tj/send.svg?style=flat
+[travis-url]: https://travis-ci.org/tj/send
+[coveralls-image]: https://img.shields.io/coveralls/tj/send.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/tj/send?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/send.svg?style=flat
+[downloads-url]: https://npmjs.org/package/send
+[gittip-image]: https://img.shields.io/gittip/dougwilson.svg?style=flat
+[gittip-url]: https://www.gittip.com/dougwilson/
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/send/index.js
new file mode 100644
index 0000000..f63081d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/index.js
@@ -0,0 +1,773 @@
+
+/**
+ * Module dependencies.
+ */
+
+var debug = require('debug')('send')
+var deprecate = require('depd')('send')
+var destroy = require('destroy')
+var escapeHtml = require('escape-html')
+ , parseRange = require('range-parser')
+ , Stream = require('stream')
+ , mime = require('mime')
+ , fresh = require('fresh')
+ , path = require('path')
+ , http = require('http')
+ , fs = require('fs')
+ , normalize = path.normalize
+ , join = path.join
+var etag = require('etag')
+var EventEmitter = require('events').EventEmitter;
+var ms = require('ms');
+var onFinished = require('on-finished')
+
+/**
+ * Variables.
+ */
+var extname = path.extname
+var maxMaxAge = 60 * 60 * 24 * 365 * 1000; // 1 year
+var resolve = path.resolve
+var sep = path.sep
+var toString = Object.prototype.toString
+var upPathRegexp = /(?:^|[\\\/])\.\.(?:[\\\/]|$)/
+
+/**
+ * Expose `send`.
+ */
+
+exports = module.exports = send;
+
+/**
+ * Expose mime module.
+ */
+
+exports.mime = mime;
+
+/**
+ * Shim EventEmitter.listenerCount for node.js < 0.10
+ */
+
+/* istanbul ignore next */
+var listenerCount = EventEmitter.listenerCount
+ || function(emitter, type){ return emitter.listeners(type).length; };
+
+/**
+ * Return a `SendStream` for `req` and `path`.
+ *
+ * @param {Request} req
+ * @param {String} path
+ * @param {Object} options
+ * @return {SendStream}
+ * @api public
+ */
+
+function send(req, path, options) {
+ return new SendStream(req, path, options);
+}
+
+/**
+ * Initialize a `SendStream` with the given `path`.
+ *
+ * @param {Request} req
+ * @param {String} path
+ * @param {Object} options
+ * @api private
+ */
+
+function SendStream(req, path, options) {
+ var self = this;
+ options = options || {};
+ this.req = req;
+ this.path = path;
+ this.options = options;
+
+ this._etag = options.etag !== undefined
+ ? Boolean(options.etag)
+ : true
+
+ this._dotfiles = options.dotfiles !== undefined
+ ? options.dotfiles
+ : 'ignore'
+
+ if (['allow', 'deny', 'ignore'].indexOf(this._dotfiles) === -1) {
+ throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"')
+ }
+
+ this._hidden = Boolean(options.hidden)
+
+ if ('hidden' in options) {
+ deprecate('hidden: use dotfiles: \'' + (this._hidden ? 'allow' : 'ignore') + '\' instead')
+ }
+
+ // legacy support
+ if (!('dotfiles' in options)) {
+ this._dotfiles = undefined
+ }
+
+ this._extensions = options.extensions !== undefined
+ ? normalizeList(options.extensions)
+ : []
+
+ this._index = options.index !== undefined
+ ? normalizeList(options.index)
+ : ['index.html']
+
+ this._lastModified = options.lastModified !== undefined
+ ? Boolean(options.lastModified)
+ : true
+
+ this._maxage = options.maxAge || options.maxage
+ this._maxage = typeof this._maxage === 'string'
+ ? ms(this._maxage)
+ : Number(this._maxage)
+ this._maxage = !isNaN(this._maxage)
+ ? Math.min(Math.max(0, this._maxage), maxMaxAge)
+ : 0
+
+ this._root = options.root
+ ? resolve(options.root)
+ : null
+
+ if (!this._root && options.from) {
+ this.from(options.from);
+ }
+}
+
+/**
+ * Inherits from `Stream.prototype`.
+ */
+
+SendStream.prototype.__proto__ = Stream.prototype;
+
+/**
+ * Enable or disable etag generation.
+ *
+ * @param {Boolean} val
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.etag = deprecate.function(function etag(val) {
+ val = Boolean(val);
+ debug('etag %s', val);
+ this._etag = val;
+ return this;
+}, 'send.etag: pass etag as option');
+
+/**
+ * Enable or disable "hidden" (dot) files.
+ *
+ * @param {Boolean} path
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.hidden = deprecate.function(function hidden(val) {
+ val = Boolean(val);
+ debug('hidden %s', val);
+ this._hidden = val;
+ this._dotfiles = undefined
+ return this;
+}, 'send.hidden: use dotfiles option');
+
+/**
+ * Set index `paths`, set to a falsy
+ * value to disable index support.
+ *
+ * @param {String|Boolean|Array} paths
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.index = deprecate.function(function index(paths) {
+ var index = !paths ? [] : normalizeList(paths);
+ debug('index %o', paths);
+ this._index = index;
+ return this;
+}, 'send.index: pass index as option');
+
+/**
+ * Set root `path`.
+ *
+ * @param {String} path
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.root = function(path){
+ path = String(path);
+ this._root = resolve(path)
+ return this;
+};
+
+SendStream.prototype.from = deprecate.function(SendStream.prototype.root,
+ 'send.from: pass root as option');
+
+SendStream.prototype.root = deprecate.function(SendStream.prototype.root,
+ 'send.root: pass root as option');
+
+/**
+ * Set max-age to `maxAge`.
+ *
+ * @param {Number} maxAge
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.maxage = deprecate.function(function maxage(maxAge) {
+ maxAge = typeof maxAge === 'string'
+ ? ms(maxAge)
+ : Number(maxAge);
+ if (isNaN(maxAge)) maxAge = 0;
+ if (Infinity == maxAge) maxAge = 60 * 60 * 24 * 365 * 1000;
+ debug('max-age %d', maxAge);
+ this._maxage = maxAge;
+ return this;
+}, 'send.maxage: pass maxAge as option');
+
+/**
+ * Emit error with `status`.
+ *
+ * @param {Number} status
+ * @api private
+ */
+
+SendStream.prototype.error = function(status, err){
+ var res = this.res;
+ var msg = http.STATUS_CODES[status];
+
+ err = err || new Error(msg);
+ err.status = status;
+
+ // emit if listeners instead of responding
+ if (listenerCount(this, 'error') !== 0) {
+ return this.emit('error', err);
+ }
+
+ // wipe all existing headers
+ res._headers = undefined;
+
+ res.statusCode = err.status;
+ res.end(msg);
+};
+
+/**
+ * Check if the pathname ends with "/".
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.hasTrailingSlash = function(){
+ return '/' == this.path[this.path.length - 1];
+};
+
+/**
+ * Check if this is a conditional GET request.
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isConditionalGET = function(){
+ return this.req.headers['if-none-match']
+ || this.req.headers['if-modified-since'];
+};
+
+/**
+ * Strip content-* header fields.
+ *
+ * @api private
+ */
+
+SendStream.prototype.removeContentHeaderFields = function(){
+ var res = this.res;
+ Object.keys(res._headers).forEach(function(field){
+ if (0 == field.indexOf('content')) {
+ res.removeHeader(field);
+ }
+ });
+};
+
+/**
+ * Respond with 304 not modified.
+ *
+ * @api private
+ */
+
+SendStream.prototype.notModified = function(){
+ var res = this.res;
+ debug('not modified');
+ this.removeContentHeaderFields();
+ res.statusCode = 304;
+ res.end();
+};
+
+/**
+ * Raise error that headers already sent.
+ *
+ * @api private
+ */
+
+SendStream.prototype.headersAlreadySent = function headersAlreadySent(){
+ var err = new Error('Can\'t set headers after they are sent.');
+ debug('headers already sent');
+ this.error(500, err);
+};
+
+/**
+ * Check if the request is cacheable, aka
+ * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}).
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isCachable = function(){
+ var res = this.res;
+ return (res.statusCode >= 200 && res.statusCode < 300) || 304 == res.statusCode;
+};
+
+/**
+ * Handle stat() error.
+ *
+ * @param {Error} err
+ * @api private
+ */
+
+SendStream.prototype.onStatError = function(err){
+ var notfound = ['ENOENT', 'ENAMETOOLONG', 'ENOTDIR'];
+ if (~notfound.indexOf(err.code)) return this.error(404, err);
+ this.error(500, err);
+};
+
+/**
+ * Check if the cache is fresh.
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isFresh = function(){
+ return fresh(this.req.headers, this.res._headers);
+};
+
+/**
+ * Check if the range is fresh.
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isRangeFresh = function isRangeFresh(){
+ var ifRange = this.req.headers['if-range'];
+
+ if (!ifRange) return true;
+
+ return ~ifRange.indexOf('"')
+ ? ~ifRange.indexOf(this.res._headers['etag'])
+ : Date.parse(this.res._headers['last-modified']) <= Date.parse(ifRange);
+};
+
+/**
+ * Redirect to `path`.
+ *
+ * @param {String} path
+ * @api private
+ */
+
+SendStream.prototype.redirect = function(path){
+ if (listenerCount(this, 'directory') !== 0) {
+ return this.emit('directory');
+ }
+
+ if (this.hasTrailingSlash()) return this.error(403);
+ var res = this.res;
+ path += '/';
+ res.statusCode = 301;
+ res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ res.setHeader('Location', path);
+ res.end('Redirecting to <a href="' + escapeHtml(path) + '">' + escapeHtml(path) + '</a>\n');
+};
+
+/**
+ * Pipe to `res.
+ *
+ * @param {Stream} res
+ * @return {Stream} res
+ * @api public
+ */
+
+SendStream.prototype.pipe = function(res){
+ var self = this
+ , args = arguments
+ , root = this._root;
+
+ // references
+ this.res = res;
+
+ // decode the path
+ var path = decode(this.path)
+ if (path === -1) return this.error(400)
+
+ // null byte(s)
+ if (~path.indexOf('\0')) return this.error(400);
+
+ var parts
+ if (root !== null) {
+ // malicious path
+ if (upPathRegexp.test(normalize('.' + sep + path))) {
+ debug('malicious path "%s"', path)
+ return this.error(403)
+ }
+
+ // join / normalize from optional root dir
+ path = normalize(join(root, path))
+ root = normalize(root + sep)
+
+ // explode path parts
+ parts = path.substr(root.length).split(sep)
+ } else {
+ // ".." is malicious without "root"
+ if (upPathRegexp.test(path)) {
+ debug('malicious path "%s"', path)
+ return this.error(403)
+ }
+
+ // explode path parts
+ parts = normalize(path).split(sep)
+
+ // resolve the path
+ path = resolve(path)
+ }
+
+ // dotfile handling
+ if (containsDotFile(parts)) {
+ var access = this._dotfiles
+
+ // legacy support
+ if (access === undefined) {
+ access = parts[parts.length - 1][0] === '.'
+ ? (this._hidden ? 'allow' : 'ignore')
+ : 'allow'
+ }
+
+ debug('%s dotfile "%s"', access, path)
+ switch (access) {
+ case 'allow':
+ break
+ case 'deny':
+ return this.error(403)
+ case 'ignore':
+ default:
+ return this.error(404)
+ }
+ }
+
+ // index file support
+ if (this._index.length && this.path[this.path.length - 1] === '/') {
+ this.sendIndex(path);
+ return res;
+ }
+
+ this.sendFile(path);
+ return res;
+};
+
+/**
+ * Transfer `path`.
+ *
+ * @param {String} path
+ * @api public
+ */
+
+SendStream.prototype.send = function(path, stat){
+ var options = this.options;
+ var len = stat.size;
+ var res = this.res;
+ var req = this.req;
+ var ranges = req.headers.range;
+ var offset = options.start || 0;
+
+ if (res._header) {
+ // impossible to send now
+ return this.headersAlreadySent();
+ }
+
+ debug('pipe "%s"', path)
+
+ // set header fields
+ this.setHeader(path, stat);
+
+ // set content-type
+ this.type(path);
+
+ // conditional GET support
+ if (this.isConditionalGET()
+ && this.isCachable()
+ && this.isFresh()) {
+ return this.notModified();
+ }
+
+ // adjust len to start/end options
+ len = Math.max(0, len - offset);
+ if (options.end !== undefined) {
+ var bytes = options.end - offset + 1;
+ if (len > bytes) len = bytes;
+ }
+
+ // Range support
+ if (ranges) {
+ ranges = parseRange(len, ranges);
+
+ // If-Range support
+ if (!this.isRangeFresh()) {
+ debug('range stale');
+ ranges = -2;
+ }
+
+ // unsatisfiable
+ if (-1 == ranges) {
+ debug('range unsatisfiable');
+ res.setHeader('Content-Range', 'bytes */' + stat.size);
+ return this.error(416);
+ }
+
+ // valid (syntactically invalid/multiple ranges are treated as a regular response)
+ if (-2 != ranges && ranges.length === 1) {
+ debug('range %j', ranges);
+
+ options.start = offset + ranges[0].start;
+ options.end = offset + ranges[0].end;
+
+ // Content-Range
+ res.statusCode = 206;
+ res.setHeader('Content-Range', 'bytes '
+ + ranges[0].start
+ + '-'
+ + ranges[0].end
+ + '/'
+ + len);
+ len = options.end - options.start + 1;
+ }
+ }
+
+ // content-length
+ res.setHeader('Content-Length', len);
+
+ // HEAD support
+ if ('HEAD' == req.method) return res.end();
+
+ this.stream(path, options);
+};
+
+/**
+ * Transfer file for `path`.
+ *
+ * @param {String} path
+ * @api private
+ */
+SendStream.prototype.sendFile = function sendFile(path) {
+ var i = 0
+ var self = this
+
+ debug('stat "%s"', path);
+ fs.stat(path, function onstat(err, stat) {
+ if (err && err.code === 'ENOENT'
+ && !extname(path)
+ && path[path.length - 1] !== sep) {
+ // not found, check extensions
+ return next(err)
+ }
+ if (err) return self.onStatError(err)
+ if (stat.isDirectory()) return self.redirect(self.path)
+ self.emit('file', path, stat)
+ self.send(path, stat)
+ })
+
+ function next(err) {
+ if (self._extensions.length <= i) {
+ return err
+ ? self.onStatError(err)
+ : self.error(404)
+ }
+
+ var p = path + '.' + self._extensions[i++]
+
+ debug('stat "%s"', p)
+ fs.stat(p, function (err, stat) {
+ if (err) return next(err)
+ if (stat.isDirectory()) return next()
+ self.emit('file', p, stat)
+ self.send(p, stat)
+ })
+ }
+}
+
+/**
+ * Transfer index for `path`.
+ *
+ * @param {String} path
+ * @api private
+ */
+SendStream.prototype.sendIndex = function sendIndex(path){
+ var i = -1;
+ var self = this;
+
+ function next(err){
+ if (++i >= self._index.length) {
+ if (err) return self.onStatError(err);
+ return self.error(404);
+ }
+
+ var p = join(path, self._index[i]);
+
+ debug('stat "%s"', p);
+ fs.stat(p, function(err, stat){
+ if (err) return next(err);
+ if (stat.isDirectory()) return next();
+ self.emit('file', p, stat);
+ self.send(p, stat);
+ });
+ }
+
+ next();
+};
+
+/**
+ * Stream `path` to the response.
+ *
+ * @param {String} path
+ * @param {Object} options
+ * @api private
+ */
+
+SendStream.prototype.stream = function(path, options){
+ // TODO: this is all lame, refactor meeee
+ var finished = false;
+ var self = this;
+ var res = this.res;
+ var req = this.req;
+
+ // pipe
+ var stream = fs.createReadStream(path, options);
+ this.emit('stream', stream);
+ stream.pipe(res);
+
+ // response finished, done with the fd
+ onFinished(res, function onfinished(){
+ finished = true;
+ destroy(stream);
+ });
+
+ // error handling code-smell
+ stream.on('error', function onerror(err){
+ // request already finished
+ if (finished) return;
+
+ // clean up stream
+ finished = true;
+ destroy(stream);
+
+ // error
+ self.onStatError(err);
+ });
+
+ // end
+ stream.on('end', function onend(){
+ self.emit('end');
+ });
+};
+
+/**
+ * Set content-type based on `path`
+ * if it hasn't been explicitly set.
+ *
+ * @param {String} path
+ * @api private
+ */
+
+SendStream.prototype.type = function(path){
+ var res = this.res;
+ if (res.getHeader('Content-Type')) return;
+ var type = mime.lookup(path);
+ var charset = mime.charsets.lookup(type);
+ debug('content-type %s', type);
+ res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : ''));
+};
+
+/**
+ * Set response header fields, most
+ * fields may be pre-defined.
+ *
+ * @param {String} path
+ * @param {Object} stat
+ * @api private
+ */
+
+SendStream.prototype.setHeader = function setHeader(path, stat){
+ var res = this.res;
+
+ this.emit('headers', res, path, stat);
+
+ if (!res.getHeader('Accept-Ranges')) res.setHeader('Accept-Ranges', 'bytes');
+ if (!res.getHeader('Date')) res.setHeader('Date', new Date().toUTCString());
+ if (!res.getHeader('Cache-Control')) res.setHeader('Cache-Control', 'public, max-age=' + Math.floor(this._maxage / 1000));
+
+ if (this._lastModified && !res.getHeader('Last-Modified')) {
+ var modified = stat.mtime.toUTCString()
+ debug('modified %s', modified)
+ res.setHeader('Last-Modified', modified)
+ }
+
+ if (this._etag && !res.getHeader('ETag')) {
+ var val = etag(stat)
+ debug('etag %s', val)
+ res.setHeader('ETag', val)
+ }
+};
+
+/**
+ * Determine if path parts contain a dotfile.
+ *
+ * @api private
+ */
+
+function containsDotFile(parts) {
+ for (var i = 0; i < parts.length; i++) {
+ if (parts[i][0] === '.') {
+ return true
+ }
+ }
+
+ return false
+}
+
+/**
+ * decodeURIComponent.
+ *
+ * Allows V8 to only deoptimize this fn instead of all
+ * of send().
+ *
+ * @param {String} path
+ * @api private
+ */
+
+function decode(path) {
+ try {
+ return decodeURIComponent(path)
+ } catch (err) {
+ return -1
+ }
+}
+
+/**
+ * Normalize the index option into an array.
+ *
+ * @param {boolean|string|array} val
+ * @api private
+ */
+
+function normalizeList(val){
+ return [].concat(val || [])
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/destroy/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/destroy/README.md
new file mode 100644
index 0000000..665acb7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/destroy/README.md
@@ -0,0 +1,38 @@
+# Destroy
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![Dependency Status][david-image]][david-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Destroy a stream.
+
+## API
+
+```js
+var destroy = require('destroy')
+
+var fs = require('fs')
+var stream = fs.createReadStream('package.json')
+destroy(stream)
+```
+
+[npm-image]: https://img.shields.io/npm/v/destroy.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/destroy
+[github-tag]: http://img.shields.io/github/tag/stream-utils/destroy.svg?style=flat-square
+[github-url]: https://github.com/stream-utils/destroy/tags
+[travis-image]: https://img.shields.io/travis/stream-utils/destroy.svg?style=flat-square
+[travis-url]: https://travis-ci.org/stream-utils/destroy
+[coveralls-image]: https://img.shields.io/coveralls/stream-utils/destroy.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/stream-utils/destroy?branch=master
+[david-image]: http://img.shields.io/david/stream-utils/destroy.svg?style=flat-square
+[david-url]: https://david-dm.org/stream-utils/destroy
+[license-image]: http://img.shields.io/npm/l/destroy.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/destroy.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/destroy
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/destroy/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/destroy/index.js
new file mode 100644
index 0000000..b455217
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/destroy/index.js
@@ -0,0 +1,36 @@
+var ReadStream = require('fs').ReadStream
+var Stream = require('stream')
+
+module.exports = function destroy(stream) {
+ if (stream instanceof ReadStream) {
+ return destroyReadStream(stream)
+ }
+
+ if (!(stream instanceof Stream)) {
+ return stream
+ }
+
+ if (typeof stream.destroy === 'function') {
+ stream.destroy()
+ }
+
+ return stream
+}
+
+function destroyReadStream(stream) {
+ stream.destroy()
+
+ if (typeof stream.close === 'function') {
+ // node.js core bug work-around
+ stream.on('open', onopenClose)
+ }
+
+ return stream
+}
+
+function onopenClose() {
+ if (typeof this.fd === 'number') {
+ // actually close down the fd
+ this.close()
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/destroy/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/destroy/package.json
new file mode 100644
index 0000000..7f27387
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/destroy/package.json
@@ -0,0 +1,65 @@
+{
+ "name": "destroy",
+ "description": "destroy a stream if possible",
+ "version": "1.0.3",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/stream-utils/destroy"
+ },
+ "devDependencies": {
+ "istanbul": "0",
+ "mocha": "1"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "stream",
+ "streams",
+ "destroy",
+ "cleanup",
+ "leak",
+ "fd"
+ ],
+ "gitHead": "50af95ece4a70202f9301bc3edc8f9fdbbad0f26",
+ "bugs": {
+ "url": "https://github.com/stream-utils/destroy/issues"
+ },
+ "homepage": "https://github.com/stream-utils/destroy",
+ "_id": "destroy@1.0.3",
+ "_shasum": "b433b4724e71fd8551d9885174851c5fc377e2c9",
+ "_from": "destroy@1.0.3",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b433b4724e71fd8551d9885174851c5fc377e2c9",
+ "tarball": "http://registry.npmjs.org/destroy/-/destroy-1.0.3.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.3.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/LICENSE
new file mode 100644
index 0000000..451fc45
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2010 Benjamin Thomas, Robert Kieffer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/README.md
new file mode 100644
index 0000000..6ca19bd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/README.md
@@ -0,0 +1,66 @@
+# mime
+
+Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.
+
+## Install
+
+Install with [npm](http://github.com/isaacs/npm):
+
+ npm install mime
+
+## API - Queries
+
+### mime.lookup(path)
+Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.
+
+ var mime = require('mime');
+
+ mime.lookup('/path/to/file.txt'); // => 'text/plain'
+ mime.lookup('file.txt'); // => 'text/plain'
+ mime.lookup('.TXT'); // => 'text/plain'
+ mime.lookup('htm'); // => 'text/html'
+
+### mime.default_type
+Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)
+
+### mime.extension(type)
+Get the default extension for `type`
+
+ mime.extension('text/html'); // => 'html'
+ mime.extension('application/octet-stream'); // => 'bin'
+
+### mime.charsets.lookup()
+
+Map mime-type to charset
+
+ mime.charsets.lookup('text/plain'); // => 'UTF-8'
+
+(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)
+
+## API - Defining Custom Types
+
+The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types).
+
+### mime.define()
+
+Add custom mime/extension mappings
+
+ mime.define({
+ 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],
+ 'application/x-my-type': ['x-mt', 'x-mtt'],
+ // etc ...
+ });
+
+ mime.lookup('x-sft'); // => 'text/x-some-format'
+
+The first entry in the extensions array is returned by `mime.extension()`. E.g.
+
+ mime.extension('text/x-some-format'); // => 'x-sf'
+
+### mime.load(filepath)
+
+Load mappings from an Apache ".types" format file
+
+ mime.load('./my_project.types');
+
+The .types file format is simple - See the `types` dir for examples.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/mime.js b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/mime.js
new file mode 100644
index 0000000..48be0c5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/mime.js
@@ -0,0 +1,114 @@
+var path = require('path');
+var fs = require('fs');
+
+function Mime() {
+ // Map of extension -> mime type
+ this.types = Object.create(null);
+
+ // Map of mime type -> extension
+ this.extensions = Object.create(null);
+}
+
+/**
+ * Define mimetype -> extension mappings. Each key is a mime-type that maps
+ * to an array of extensions associated with the type. The first extension is
+ * used as the default extension for the type.
+ *
+ * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});
+ *
+ * @param map (Object) type definitions
+ */
+Mime.prototype.define = function (map) {
+ for (var type in map) {
+ var exts = map[type];
+
+ for (var i = 0; i < exts.length; i++) {
+ if (process.env.DEBUG_MIME && this.types[exts]) {
+ console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' +
+ this.types[exts] + ' to ' + type);
+ }
+
+ this.types[exts[i]] = type;
+ }
+
+ // Default extension is the first one we encounter
+ if (!this.extensions[type]) {
+ this.extensions[type] = exts[0];
+ }
+ }
+};
+
+/**
+ * Load an Apache2-style ".types" file
+ *
+ * This may be called multiple times (it's expected). Where files declare
+ * overlapping types/extensions, the last file wins.
+ *
+ * @param file (String) path of file to load.
+ */
+Mime.prototype.load = function(file) {
+
+ this._loading = file;
+ // Read file and split into lines
+ var map = {},
+ content = fs.readFileSync(file, 'ascii'),
+ lines = content.split(/[\r\n]+/);
+
+ lines.forEach(function(line) {
+ // Clean up whitespace/comments, and split into fields
+ var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/);
+ map[fields.shift()] = fields;
+ });
+
+ this.define(map);
+
+ this._loading = null;
+};
+
+/**
+ * Lookup a mime type based on extension
+ */
+Mime.prototype.lookup = function(path, fallback) {
+ var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase();
+
+ return this.types[ext] || fallback || this.default_type;
+};
+
+/**
+ * Return file extension associated with a mime type
+ */
+Mime.prototype.extension = function(mimeType) {
+ var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase();
+ return this.extensions[type];
+};
+
+// Default instance
+var mime = new Mime();
+
+// Load local copy of
+// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
+mime.load(path.join(__dirname, 'types/mime.types'));
+
+// Load additional types from node.js community
+mime.load(path.join(__dirname, 'types/node.types'));
+
+// Default type
+mime.default_type = mime.lookup('bin');
+
+//
+// Additional API specific to the default instance
+//
+
+mime.Mime = Mime;
+
+/**
+ * Lookup a charset based on mime type.
+ */
+mime.charsets = {
+ lookup: function(mimeType, fallback) {
+ // Assume text types are utf8
+ return (/^text\//).test(mimeType) ? 'UTF-8' : fallback;
+ }
+};
+
+module.exports = mime;
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/package.json
new file mode 100644
index 0000000..269b77a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/package.json
@@ -0,0 +1,57 @@
+{
+ "author": {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ },
+ "contributors": [
+ {
+ "name": "Benjamin Thomas",
+ "email": "benjamin@benjaminthomas.org",
+ "url": "http://github.com/bentomas"
+ }
+ ],
+ "dependencies": {},
+ "description": "A comprehensive library for mime-type mapping",
+ "devDependencies": {},
+ "keywords": [
+ "util",
+ "mime"
+ ],
+ "main": "mime.js",
+ "name": "mime",
+ "repository": {
+ "url": "https://github.com/broofa/node-mime",
+ "type": "git"
+ },
+ "version": "1.2.11",
+ "bugs": {
+ "url": "https://github.com/broofa/node-mime/issues"
+ },
+ "_id": "mime@1.2.11",
+ "dist": {
+ "shasum": "58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10",
+ "tarball": "http://registry.npmjs.org/mime/-/mime-1.2.11.tgz"
+ },
+ "_from": "mime@1.2.11",
+ "_npmVersion": "1.3.6",
+ "_npmUser": {
+ "name": "broofa",
+ "email": "robert@broofa.com"
+ },
+ "maintainers": [
+ {
+ "name": "broofa",
+ "email": "robert@broofa.com"
+ },
+ {
+ "name": "bentomas",
+ "email": "benjamin@benjaminthomas.org"
+ }
+ ],
+ "directories": {},
+ "_shasum": "58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10",
+ "_resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz",
+ "readme": "ERROR: No README data found!",
+ "homepage": "https://github.com/broofa/node-mime"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/test.js b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/test.js
new file mode 100644
index 0000000..2cda1c7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/test.js
@@ -0,0 +1,84 @@
+/**
+ * Usage: node test.js
+ */
+
+var mime = require('./mime');
+var assert = require('assert');
+var path = require('path');
+
+function eq(a, b) {
+ console.log('Test: ' + a + ' === ' + b);
+ assert.strictEqual.apply(null, arguments);
+}
+
+console.log(Object.keys(mime.extensions).length + ' types');
+console.log(Object.keys(mime.types).length + ' extensions\n');
+
+//
+// Test mime lookups
+//
+
+eq('text/plain', mime.lookup('text.txt')); // normal file
+eq('text/plain', mime.lookup('TEXT.TXT')); // uppercase
+eq('text/plain', mime.lookup('dir/text.txt')); // dir + file
+eq('text/plain', mime.lookup('.text.txt')); // hidden file
+eq('text/plain', mime.lookup('.txt')); // nameless
+eq('text/plain', mime.lookup('txt')); // extension-only
+eq('text/plain', mime.lookup('/txt')); // extension-less ()
+eq('text/plain', mime.lookup('\\txt')); // Windows, extension-less
+eq('application/octet-stream', mime.lookup('text.nope')); // unrecognized
+eq('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default
+
+//
+// Test extensions
+//
+
+eq('txt', mime.extension(mime.types.text));
+eq('html', mime.extension(mime.types.htm));
+eq('bin', mime.extension('application/octet-stream'));
+eq('bin', mime.extension('application/octet-stream '));
+eq('html', mime.extension(' text/html; charset=UTF-8'));
+eq('html', mime.extension('text/html; charset=UTF-8 '));
+eq('html', mime.extension('text/html; charset=UTF-8'));
+eq('html', mime.extension('text/html ; charset=UTF-8'));
+eq('html', mime.extension('text/html;charset=UTF-8'));
+eq('html', mime.extension('text/Html;charset=UTF-8'));
+eq(undefined, mime.extension('unrecognized'));
+
+//
+// Test node.types lookups
+//
+
+eq('application/font-woff', mime.lookup('file.woff'));
+eq('application/octet-stream', mime.lookup('file.buffer'));
+eq('audio/mp4', mime.lookup('file.m4a'));
+eq('font/opentype', mime.lookup('file.otf'));
+
+//
+// Test charsets
+//
+
+eq('UTF-8', mime.charsets.lookup('text/plain'));
+eq(undefined, mime.charsets.lookup(mime.types.js));
+eq('fallback', mime.charsets.lookup('application/octet-stream', 'fallback'));
+
+//
+// Test for overlaps between mime.types and node.types
+//
+
+var apacheTypes = new mime.Mime(), nodeTypes = new mime.Mime();
+apacheTypes.load(path.join(__dirname, 'types/mime.types'));
+nodeTypes.load(path.join(__dirname, 'types/node.types'));
+
+var keys = [].concat(Object.keys(apacheTypes.types))
+ .concat(Object.keys(nodeTypes.types));
+keys.sort();
+for (var i = 1; i < keys.length; i++) {
+ if (keys[i] == keys[i-1]) {
+ console.warn('Warning: ' +
+ 'node.types defines ' + keys[i] + '->' + nodeTypes.types[keys[i]] +
+ ', mime.types defines ' + keys[i] + '->' + apacheTypes.types[keys[i]]);
+ }
+}
+
+console.log('\nOK');
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/types/mime.types b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/types/mime.types
new file mode 100644
index 0000000..da8cd69
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/types/mime.types
@@ -0,0 +1,1588 @@
+# This file maps Internet media types to unique file extension(s).
+# Although created for httpd, this file is used by many software systems
+# and has been placed in the public domain for unlimited redisribution.
+#
+# The table below contains both registered and (common) unregistered types.
+# A type that has no unique extension can be ignored -- they are listed
+# here to guide configurations toward known types and to make it easier to
+# identify "new" types. File extensions are also commonly used to indicate
+# content languages and encodings, so choose them carefully.
+#
+# Internet media types should be registered as described in RFC 4288.
+# The registry is at <http://www.iana.org/assignments/media-types/>.
+#
+# MIME type (lowercased) Extensions
+# ============================================ ==========
+# application/1d-interleaved-parityfec
+# application/3gpp-ims+xml
+# application/activemessage
+application/andrew-inset ez
+# application/applefile
+application/applixware aw
+application/atom+xml atom
+application/atomcat+xml atomcat
+# application/atomicmail
+application/atomsvc+xml atomsvc
+# application/auth-policy+xml
+# application/batch-smtp
+# application/beep+xml
+# application/calendar+xml
+# application/cals-1840
+# application/ccmp+xml
+application/ccxml+xml ccxml
+application/cdmi-capability cdmia
+application/cdmi-container cdmic
+application/cdmi-domain cdmid
+application/cdmi-object cdmio
+application/cdmi-queue cdmiq
+# application/cea-2018+xml
+# application/cellml+xml
+# application/cfw
+# application/cnrp+xml
+# application/commonground
+# application/conference-info+xml
+# application/cpl+xml
+# application/csta+xml
+# application/cstadata+xml
+application/cu-seeme cu
+# application/cybercash
+application/davmount+xml davmount
+# application/dca-rft
+# application/dec-dx
+# application/dialog-info+xml
+# application/dicom
+# application/dns
+application/docbook+xml dbk
+# application/dskpp+xml
+application/dssc+der dssc
+application/dssc+xml xdssc
+# application/dvcs
+application/ecmascript ecma
+# application/edi-consent
+# application/edi-x12
+# application/edifact
+application/emma+xml emma
+# application/epp+xml
+application/epub+zip epub
+# application/eshop
+# application/example
+application/exi exi
+# application/fastinfoset
+# application/fastsoap
+# application/fits
+application/font-tdpfr pfr
+# application/framework-attributes+xml
+application/gml+xml gml
+application/gpx+xml gpx
+application/gxf gxf
+# application/h224
+# application/held+xml
+# application/http
+application/hyperstudio stk
+# application/ibe-key-request+xml
+# application/ibe-pkg-reply+xml
+# application/ibe-pp-data
+# application/iges
+# application/im-iscomposing+xml
+# application/index
+# application/index.cmd
+# application/index.obj
+# application/index.response
+# application/index.vnd
+application/inkml+xml ink inkml
+# application/iotp
+application/ipfix ipfix
+# application/ipp
+# application/isup
+application/java-archive jar
+application/java-serialized-object ser
+application/java-vm class
+application/javascript js
+application/json json
+application/jsonml+json jsonml
+# application/kpml-request+xml
+# application/kpml-response+xml
+application/lost+xml lostxml
+application/mac-binhex40 hqx
+application/mac-compactpro cpt
+# application/macwriteii
+application/mads+xml mads
+application/marc mrc
+application/marcxml+xml mrcx
+application/mathematica ma nb mb
+# application/mathml-content+xml
+# application/mathml-presentation+xml
+application/mathml+xml mathml
+# application/mbms-associated-procedure-description+xml
+# application/mbms-deregister+xml
+# application/mbms-envelope+xml
+# application/mbms-msk+xml
+# application/mbms-msk-response+xml
+# application/mbms-protection-description+xml
+# application/mbms-reception-report+xml
+# application/mbms-register+xml
+# application/mbms-register-response+xml
+# application/mbms-user-service-description+xml
+application/mbox mbox
+# application/media_control+xml
+application/mediaservercontrol+xml mscml
+application/metalink+xml metalink
+application/metalink4+xml meta4
+application/mets+xml mets
+# application/mikey
+application/mods+xml mods
+# application/moss-keys
+# application/moss-signature
+# application/mosskey-data
+# application/mosskey-request
+application/mp21 m21 mp21
+application/mp4 mp4s
+# application/mpeg4-generic
+# application/mpeg4-iod
+# application/mpeg4-iod-xmt
+# application/msc-ivr+xml
+# application/msc-mixer+xml
+application/msword doc dot
+application/mxf mxf
+# application/nasdata
+# application/news-checkgroups
+# application/news-groupinfo
+# application/news-transmission
+# application/nss
+# application/ocsp-request
+# application/ocsp-response
+application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy
+application/oda oda
+application/oebps-package+xml opf
+application/ogg ogx
+application/omdoc+xml omdoc
+application/onenote onetoc onetoc2 onetmp onepkg
+application/oxps oxps
+# application/parityfec
+application/patch-ops-error+xml xer
+application/pdf pdf
+application/pgp-encrypted pgp
+# application/pgp-keys
+application/pgp-signature asc sig
+application/pics-rules prf
+# application/pidf+xml
+# application/pidf-diff+xml
+application/pkcs10 p10
+application/pkcs7-mime p7m p7c
+application/pkcs7-signature p7s
+application/pkcs8 p8
+application/pkix-attr-cert ac
+application/pkix-cert cer
+application/pkix-crl crl
+application/pkix-pkipath pkipath
+application/pkixcmp pki
+application/pls+xml pls
+# application/poc-settings+xml
+application/postscript ai eps ps
+# application/prs.alvestrand.titrax-sheet
+application/prs.cww cww
+# application/prs.nprend
+# application/prs.plucker
+# application/prs.rdf-xml-crypt
+# application/prs.xsf+xml
+application/pskc+xml pskcxml
+# application/qsig
+application/rdf+xml rdf
+application/reginfo+xml rif
+application/relax-ng-compact-syntax rnc
+# application/remote-printing
+application/resource-lists+xml rl
+application/resource-lists-diff+xml rld
+# application/riscos
+# application/rlmi+xml
+application/rls-services+xml rs
+application/rpki-ghostbusters gbr
+application/rpki-manifest mft
+application/rpki-roa roa
+# application/rpki-updown
+application/rsd+xml rsd
+application/rss+xml rss
+application/rtf rtf
+# application/rtx
+# application/samlassertion+xml
+# application/samlmetadata+xml
+application/sbml+xml sbml
+application/scvp-cv-request scq
+application/scvp-cv-response scs
+application/scvp-vp-request spq
+application/scvp-vp-response spp
+application/sdp sdp
+# application/set-payment
+application/set-payment-initiation setpay
+# application/set-registration
+application/set-registration-initiation setreg
+# application/sgml
+# application/sgml-open-catalog
+application/shf+xml shf
+# application/sieve
+# application/simple-filter+xml
+# application/simple-message-summary
+# application/simplesymbolcontainer
+# application/slate
+# application/smil
+application/smil+xml smi smil
+# application/soap+fastinfoset
+# application/soap+xml
+application/sparql-query rq
+application/sparql-results+xml srx
+# application/spirits-event+xml
+application/srgs gram
+application/srgs+xml grxml
+application/sru+xml sru
+application/ssdl+xml ssdl
+application/ssml+xml ssml
+# application/tamp-apex-update
+# application/tamp-apex-update-confirm
+# application/tamp-community-update
+# application/tamp-community-update-confirm
+# application/tamp-error
+# application/tamp-sequence-adjust
+# application/tamp-sequence-adjust-confirm
+# application/tamp-status-query
+# application/tamp-status-response
+# application/tamp-update
+# application/tamp-update-confirm
+application/tei+xml tei teicorpus
+application/thraud+xml tfi
+# application/timestamp-query
+# application/timestamp-reply
+application/timestamped-data tsd
+# application/tve-trigger
+# application/ulpfec
+# application/vcard+xml
+# application/vemmi
+# application/vividence.scriptfile
+# application/vnd.3gpp.bsf+xml
+application/vnd.3gpp.pic-bw-large plb
+application/vnd.3gpp.pic-bw-small psb
+application/vnd.3gpp.pic-bw-var pvb
+# application/vnd.3gpp.sms
+# application/vnd.3gpp2.bcmcsinfo+xml
+# application/vnd.3gpp2.sms
+application/vnd.3gpp2.tcap tcap
+application/vnd.3m.post-it-notes pwn
+application/vnd.accpac.simply.aso aso
+application/vnd.accpac.simply.imp imp
+application/vnd.acucobol acu
+application/vnd.acucorp atc acutc
+application/vnd.adobe.air-application-installer-package+zip air
+application/vnd.adobe.formscentral.fcdt fcdt
+application/vnd.adobe.fxp fxp fxpl
+# application/vnd.adobe.partial-upload
+application/vnd.adobe.xdp+xml xdp
+application/vnd.adobe.xfdf xfdf
+# application/vnd.aether.imp
+# application/vnd.ah-barcode
+application/vnd.ahead.space ahead
+application/vnd.airzip.filesecure.azf azf
+application/vnd.airzip.filesecure.azs azs
+application/vnd.amazon.ebook azw
+application/vnd.americandynamics.acc acc
+application/vnd.amiga.ami ami
+# application/vnd.amundsen.maze+xml
+application/vnd.android.package-archive apk
+application/vnd.anser-web-certificate-issue-initiation cii
+application/vnd.anser-web-funds-transfer-initiation fti
+application/vnd.antix.game-component atx
+application/vnd.apple.installer+xml mpkg
+application/vnd.apple.mpegurl m3u8
+# application/vnd.arastra.swi
+application/vnd.aristanetworks.swi swi
+application/vnd.astraea-software.iota iota
+application/vnd.audiograph aep
+# application/vnd.autopackage
+# application/vnd.avistar+xml
+application/vnd.blueice.multipass mpm
+# application/vnd.bluetooth.ep.oob
+application/vnd.bmi bmi
+application/vnd.businessobjects rep
+# application/vnd.cab-jscript
+# application/vnd.canon-cpdl
+# application/vnd.canon-lips
+# application/vnd.cendio.thinlinc.clientconf
+application/vnd.chemdraw+xml cdxml
+application/vnd.chipnuts.karaoke-mmd mmd
+application/vnd.cinderella cdy
+# application/vnd.cirpack.isdn-ext
+application/vnd.claymore cla
+application/vnd.cloanto.rp9 rp9
+application/vnd.clonk.c4group c4g c4d c4f c4p c4u
+application/vnd.cluetrust.cartomobile-config c11amc
+application/vnd.cluetrust.cartomobile-config-pkg c11amz
+# application/vnd.collection+json
+# application/vnd.commerce-battelle
+application/vnd.commonspace csp
+application/vnd.contact.cmsg cdbcmsg
+application/vnd.cosmocaller cmc
+application/vnd.crick.clicker clkx
+application/vnd.crick.clicker.keyboard clkk
+application/vnd.crick.clicker.palette clkp
+application/vnd.crick.clicker.template clkt
+application/vnd.crick.clicker.wordbank clkw
+application/vnd.criticaltools.wbs+xml wbs
+application/vnd.ctc-posml pml
+# application/vnd.ctct.ws+xml
+# application/vnd.cups-pdf
+# application/vnd.cups-postscript
+application/vnd.cups-ppd ppd
+# application/vnd.cups-raster
+# application/vnd.cups-raw
+# application/vnd.curl
+application/vnd.curl.car car
+application/vnd.curl.pcurl pcurl
+# application/vnd.cybank
+application/vnd.dart dart
+application/vnd.data-vision.rdz rdz
+application/vnd.dece.data uvf uvvf uvd uvvd
+application/vnd.dece.ttml+xml uvt uvvt
+application/vnd.dece.unspecified uvx uvvx
+application/vnd.dece.zip uvz uvvz
+application/vnd.denovo.fcselayout-link fe_launch
+# application/vnd.dir-bi.plate-dl-nosuffix
+application/vnd.dna dna
+application/vnd.dolby.mlp mlp
+# application/vnd.dolby.mobile.1
+# application/vnd.dolby.mobile.2
+application/vnd.dpgraph dpg
+application/vnd.dreamfactory dfac
+application/vnd.ds-keypoint kpxx
+application/vnd.dvb.ait ait
+# application/vnd.dvb.dvbj
+# application/vnd.dvb.esgcontainer
+# application/vnd.dvb.ipdcdftnotifaccess
+# application/vnd.dvb.ipdcesgaccess
+# application/vnd.dvb.ipdcesgaccess2
+# application/vnd.dvb.ipdcesgpdd
+# application/vnd.dvb.ipdcroaming
+# application/vnd.dvb.iptv.alfec-base
+# application/vnd.dvb.iptv.alfec-enhancement
+# application/vnd.dvb.notif-aggregate-root+xml
+# application/vnd.dvb.notif-container+xml
+# application/vnd.dvb.notif-generic+xml
+# application/vnd.dvb.notif-ia-msglist+xml
+# application/vnd.dvb.notif-ia-registration-request+xml
+# application/vnd.dvb.notif-ia-registration-response+xml
+# application/vnd.dvb.notif-init+xml
+# application/vnd.dvb.pfr
+application/vnd.dvb.service svc
+# application/vnd.dxr
+application/vnd.dynageo geo
+# application/vnd.easykaraoke.cdgdownload
+# application/vnd.ecdis-update
+application/vnd.ecowin.chart mag
+# application/vnd.ecowin.filerequest
+# application/vnd.ecowin.fileupdate
+# application/vnd.ecowin.series
+# application/vnd.ecowin.seriesrequest
+# application/vnd.ecowin.seriesupdate
+# application/vnd.emclient.accessrequest+xml
+application/vnd.enliven nml
+# application/vnd.eprints.data+xml
+application/vnd.epson.esf esf
+application/vnd.epson.msf msf
+application/vnd.epson.quickanime qam
+application/vnd.epson.salt slt
+application/vnd.epson.ssf ssf
+# application/vnd.ericsson.quickcall
+application/vnd.eszigno3+xml es3 et3
+# application/vnd.etsi.aoc+xml
+# application/vnd.etsi.cug+xml
+# application/vnd.etsi.iptvcommand+xml
+# application/vnd.etsi.iptvdiscovery+xml
+# application/vnd.etsi.iptvprofile+xml
+# application/vnd.etsi.iptvsad-bc+xml
+# application/vnd.etsi.iptvsad-cod+xml
+# application/vnd.etsi.iptvsad-npvr+xml
+# application/vnd.etsi.iptvservice+xml
+# application/vnd.etsi.iptvsync+xml
+# application/vnd.etsi.iptvueprofile+xml
+# application/vnd.etsi.mcid+xml
+# application/vnd.etsi.overload-control-policy-dataset+xml
+# application/vnd.etsi.sci+xml
+# application/vnd.etsi.simservs+xml
+# application/vnd.etsi.tsl+xml
+# application/vnd.etsi.tsl.der
+# application/vnd.eudora.data
+application/vnd.ezpix-album ez2
+application/vnd.ezpix-package ez3
+# application/vnd.f-secure.mobile
+application/vnd.fdf fdf
+application/vnd.fdsn.mseed mseed
+application/vnd.fdsn.seed seed dataless
+# application/vnd.ffsns
+# application/vnd.fints
+application/vnd.flographit gph
+application/vnd.fluxtime.clip ftc
+# application/vnd.font-fontforge-sfd
+application/vnd.framemaker fm frame maker book
+application/vnd.frogans.fnc fnc
+application/vnd.frogans.ltf ltf
+application/vnd.fsc.weblaunch fsc
+application/vnd.fujitsu.oasys oas
+application/vnd.fujitsu.oasys2 oa2
+application/vnd.fujitsu.oasys3 oa3
+application/vnd.fujitsu.oasysgp fg5
+application/vnd.fujitsu.oasysprs bh2
+# application/vnd.fujixerox.art-ex
+# application/vnd.fujixerox.art4
+# application/vnd.fujixerox.hbpl
+application/vnd.fujixerox.ddd ddd
+application/vnd.fujixerox.docuworks xdw
+application/vnd.fujixerox.docuworks.binder xbd
+# application/vnd.fut-misnet
+application/vnd.fuzzysheet fzs
+application/vnd.genomatix.tuxedo txd
+# application/vnd.geocube+xml
+application/vnd.geogebra.file ggb
+application/vnd.geogebra.tool ggt
+application/vnd.geometry-explorer gex gre
+application/vnd.geonext gxt
+application/vnd.geoplan g2w
+application/vnd.geospace g3w
+# application/vnd.globalplatform.card-content-mgt
+# application/vnd.globalplatform.card-content-mgt-response
+application/vnd.gmx gmx
+application/vnd.google-earth.kml+xml kml
+application/vnd.google-earth.kmz kmz
+application/vnd.grafeq gqf gqs
+# application/vnd.gridmp
+application/vnd.groove-account gac
+application/vnd.groove-help ghf
+application/vnd.groove-identity-message gim
+application/vnd.groove-injector grv
+application/vnd.groove-tool-message gtm
+application/vnd.groove-tool-template tpl
+application/vnd.groove-vcard vcg
+# application/vnd.hal+json
+application/vnd.hal+xml hal
+application/vnd.handheld-entertainment+xml zmm
+application/vnd.hbci hbci
+# application/vnd.hcl-bireports
+application/vnd.hhe.lesson-player les
+application/vnd.hp-hpgl hpgl
+application/vnd.hp-hpid hpid
+application/vnd.hp-hps hps
+application/vnd.hp-jlyt jlt
+application/vnd.hp-pcl pcl
+application/vnd.hp-pclxl pclxl
+# application/vnd.httphone
+application/vnd.hydrostatix.sof-data sfd-hdstx
+# application/vnd.hzn-3d-crossword
+# application/vnd.ibm.afplinedata
+# application/vnd.ibm.electronic-media
+application/vnd.ibm.minipay mpy
+application/vnd.ibm.modcap afp listafp list3820
+application/vnd.ibm.rights-management irm
+application/vnd.ibm.secure-container sc
+application/vnd.iccprofile icc icm
+application/vnd.igloader igl
+application/vnd.immervision-ivp ivp
+application/vnd.immervision-ivu ivu
+# application/vnd.informedcontrol.rms+xml
+# application/vnd.informix-visionary
+# application/vnd.infotech.project
+# application/vnd.infotech.project+xml
+# application/vnd.innopath.wamp.notification
+application/vnd.insors.igm igm
+application/vnd.intercon.formnet xpw xpx
+application/vnd.intergeo i2g
+# application/vnd.intertrust.digibox
+# application/vnd.intertrust.nncp
+application/vnd.intu.qbo qbo
+application/vnd.intu.qfx qfx
+# application/vnd.iptc.g2.conceptitem+xml
+# application/vnd.iptc.g2.knowledgeitem+xml
+# application/vnd.iptc.g2.newsitem+xml
+# application/vnd.iptc.g2.newsmessage+xml
+# application/vnd.iptc.g2.packageitem+xml
+# application/vnd.iptc.g2.planningitem+xml
+application/vnd.ipunplugged.rcprofile rcprofile
+application/vnd.irepository.package+xml irp
+application/vnd.is-xpr xpr
+application/vnd.isac.fcs fcs
+application/vnd.jam jam
+# application/vnd.japannet-directory-service
+# application/vnd.japannet-jpnstore-wakeup
+# application/vnd.japannet-payment-wakeup
+# application/vnd.japannet-registration
+# application/vnd.japannet-registration-wakeup
+# application/vnd.japannet-setstore-wakeup
+# application/vnd.japannet-verification
+# application/vnd.japannet-verification-wakeup
+application/vnd.jcp.javame.midlet-rms rms
+application/vnd.jisp jisp
+application/vnd.joost.joda-archive joda
+application/vnd.kahootz ktz ktr
+application/vnd.kde.karbon karbon
+application/vnd.kde.kchart chrt
+application/vnd.kde.kformula kfo
+application/vnd.kde.kivio flw
+application/vnd.kde.kontour kon
+application/vnd.kde.kpresenter kpr kpt
+application/vnd.kde.kspread ksp
+application/vnd.kde.kword kwd kwt
+application/vnd.kenameaapp htke
+application/vnd.kidspiration kia
+application/vnd.kinar kne knp
+application/vnd.koan skp skd skt skm
+application/vnd.kodak-descriptor sse
+application/vnd.las.las+xml lasxml
+# application/vnd.liberty-request+xml
+application/vnd.llamagraphics.life-balance.desktop lbd
+application/vnd.llamagraphics.life-balance.exchange+xml lbe
+application/vnd.lotus-1-2-3 123
+application/vnd.lotus-approach apr
+application/vnd.lotus-freelance pre
+application/vnd.lotus-notes nsf
+application/vnd.lotus-organizer org
+application/vnd.lotus-screencam scm
+application/vnd.lotus-wordpro lwp
+application/vnd.macports.portpkg portpkg
+# application/vnd.marlin.drm.actiontoken+xml
+# application/vnd.marlin.drm.conftoken+xml
+# application/vnd.marlin.drm.license+xml
+# application/vnd.marlin.drm.mdcf
+application/vnd.mcd mcd
+application/vnd.medcalcdata mc1
+application/vnd.mediastation.cdkey cdkey
+# application/vnd.meridian-slingshot
+application/vnd.mfer mwf
+application/vnd.mfmp mfm
+application/vnd.micrografx.flo flo
+application/vnd.micrografx.igx igx
+application/vnd.mif mif
+# application/vnd.minisoft-hp3000-save
+# application/vnd.mitsubishi.misty-guard.trustweb
+application/vnd.mobius.daf daf
+application/vnd.mobius.dis dis
+application/vnd.mobius.mbk mbk
+application/vnd.mobius.mqy mqy
+application/vnd.mobius.msl msl
+application/vnd.mobius.plc plc
+application/vnd.mobius.txf txf
+application/vnd.mophun.application mpn
+application/vnd.mophun.certificate mpc
+# application/vnd.motorola.flexsuite
+# application/vnd.motorola.flexsuite.adsi
+# application/vnd.motorola.flexsuite.fis
+# application/vnd.motorola.flexsuite.gotap
+# application/vnd.motorola.flexsuite.kmr
+# application/vnd.motorola.flexsuite.ttc
+# application/vnd.motorola.flexsuite.wem
+# application/vnd.motorola.iprm
+application/vnd.mozilla.xul+xml xul
+application/vnd.ms-artgalry cil
+# application/vnd.ms-asf
+application/vnd.ms-cab-compressed cab
+# application/vnd.ms-color.iccprofile
+application/vnd.ms-excel xls xlm xla xlc xlt xlw
+application/vnd.ms-excel.addin.macroenabled.12 xlam
+application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb
+application/vnd.ms-excel.sheet.macroenabled.12 xlsm
+application/vnd.ms-excel.template.macroenabled.12 xltm
+application/vnd.ms-fontobject eot
+application/vnd.ms-htmlhelp chm
+application/vnd.ms-ims ims
+application/vnd.ms-lrm lrm
+# application/vnd.ms-office.activex+xml
+application/vnd.ms-officetheme thmx
+# application/vnd.ms-opentype
+# application/vnd.ms-package.obfuscated-opentype
+application/vnd.ms-pki.seccat cat
+application/vnd.ms-pki.stl stl
+# application/vnd.ms-playready.initiator+xml
+application/vnd.ms-powerpoint ppt pps pot
+application/vnd.ms-powerpoint.addin.macroenabled.12 ppam
+application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm
+application/vnd.ms-powerpoint.slide.macroenabled.12 sldm
+application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm
+application/vnd.ms-powerpoint.template.macroenabled.12 potm
+# application/vnd.ms-printing.printticket+xml
+application/vnd.ms-project mpp mpt
+# application/vnd.ms-tnef
+# application/vnd.ms-wmdrm.lic-chlg-req
+# application/vnd.ms-wmdrm.lic-resp
+# application/vnd.ms-wmdrm.meter-chlg-req
+# application/vnd.ms-wmdrm.meter-resp
+application/vnd.ms-word.document.macroenabled.12 docm
+application/vnd.ms-word.template.macroenabled.12 dotm
+application/vnd.ms-works wps wks wcm wdb
+application/vnd.ms-wpl wpl
+application/vnd.ms-xpsdocument xps
+application/vnd.mseq mseq
+# application/vnd.msign
+# application/vnd.multiad.creator
+# application/vnd.multiad.creator.cif
+# application/vnd.music-niff
+application/vnd.musician mus
+application/vnd.muvee.style msty
+application/vnd.mynfc taglet
+# application/vnd.ncd.control
+# application/vnd.ncd.reference
+# application/vnd.nervana
+# application/vnd.netfpx
+application/vnd.neurolanguage.nlu nlu
+application/vnd.nitf ntf nitf
+application/vnd.noblenet-directory nnd
+application/vnd.noblenet-sealer nns
+application/vnd.noblenet-web nnw
+# application/vnd.nokia.catalogs
+# application/vnd.nokia.conml+wbxml
+# application/vnd.nokia.conml+xml
+# application/vnd.nokia.isds-radio-presets
+# application/vnd.nokia.iptv.config+xml
+# application/vnd.nokia.landmark+wbxml
+# application/vnd.nokia.landmark+xml
+# application/vnd.nokia.landmarkcollection+xml
+# application/vnd.nokia.n-gage.ac+xml
+application/vnd.nokia.n-gage.data ngdat
+application/vnd.nokia.n-gage.symbian.install n-gage
+# application/vnd.nokia.ncd
+# application/vnd.nokia.pcd+wbxml
+# application/vnd.nokia.pcd+xml
+application/vnd.nokia.radio-preset rpst
+application/vnd.nokia.radio-presets rpss
+application/vnd.novadigm.edm edm
+application/vnd.novadigm.edx edx
+application/vnd.novadigm.ext ext
+# application/vnd.ntt-local.file-transfer
+# application/vnd.ntt-local.sip-ta_remote
+# application/vnd.ntt-local.sip-ta_tcp_stream
+application/vnd.oasis.opendocument.chart odc
+application/vnd.oasis.opendocument.chart-template otc
+application/vnd.oasis.opendocument.database odb
+application/vnd.oasis.opendocument.formula odf
+application/vnd.oasis.opendocument.formula-template odft
+application/vnd.oasis.opendocument.graphics odg
+application/vnd.oasis.opendocument.graphics-template otg
+application/vnd.oasis.opendocument.image odi
+application/vnd.oasis.opendocument.image-template oti
+application/vnd.oasis.opendocument.presentation odp
+application/vnd.oasis.opendocument.presentation-template otp
+application/vnd.oasis.opendocument.spreadsheet ods
+application/vnd.oasis.opendocument.spreadsheet-template ots
+application/vnd.oasis.opendocument.text odt
+application/vnd.oasis.opendocument.text-master odm
+application/vnd.oasis.opendocument.text-template ott
+application/vnd.oasis.opendocument.text-web oth
+# application/vnd.obn
+# application/vnd.oftn.l10n+json
+# application/vnd.oipf.contentaccessdownload+xml
+# application/vnd.oipf.contentaccessstreaming+xml
+# application/vnd.oipf.cspg-hexbinary
+# application/vnd.oipf.dae.svg+xml
+# application/vnd.oipf.dae.xhtml+xml
+# application/vnd.oipf.mippvcontrolmessage+xml
+# application/vnd.oipf.pae.gem
+# application/vnd.oipf.spdiscovery+xml
+# application/vnd.oipf.spdlist+xml
+# application/vnd.oipf.ueprofile+xml
+# application/vnd.oipf.userprofile+xml
+application/vnd.olpc-sugar xo
+# application/vnd.oma-scws-config
+# application/vnd.oma-scws-http-request
+# application/vnd.oma-scws-http-response
+# application/vnd.oma.bcast.associated-procedure-parameter+xml
+# application/vnd.oma.bcast.drm-trigger+xml
+# application/vnd.oma.bcast.imd+xml
+# application/vnd.oma.bcast.ltkm
+# application/vnd.oma.bcast.notification+xml
+# application/vnd.oma.bcast.provisioningtrigger
+# application/vnd.oma.bcast.sgboot
+# application/vnd.oma.bcast.sgdd+xml
+# application/vnd.oma.bcast.sgdu
+# application/vnd.oma.bcast.simple-symbol-container
+# application/vnd.oma.bcast.smartcard-trigger+xml
+# application/vnd.oma.bcast.sprov+xml
+# application/vnd.oma.bcast.stkm
+# application/vnd.oma.cab-address-book+xml
+# application/vnd.oma.cab-feature-handler+xml
+# application/vnd.oma.cab-pcc+xml
+# application/vnd.oma.cab-user-prefs+xml
+# application/vnd.oma.dcd
+# application/vnd.oma.dcdc
+application/vnd.oma.dd2+xml dd2
+# application/vnd.oma.drm.risd+xml
+# application/vnd.oma.group-usage-list+xml
+# application/vnd.oma.pal+xml
+# application/vnd.oma.poc.detailed-progress-report+xml
+# application/vnd.oma.poc.final-report+xml
+# application/vnd.oma.poc.groups+xml
+# application/vnd.oma.poc.invocation-descriptor+xml
+# application/vnd.oma.poc.optimized-progress-report+xml
+# application/vnd.oma.push
+# application/vnd.oma.scidm.messages+xml
+# application/vnd.oma.xcap-directory+xml
+# application/vnd.omads-email+xml
+# application/vnd.omads-file+xml
+# application/vnd.omads-folder+xml
+# application/vnd.omaloc-supl-init
+application/vnd.openofficeorg.extension oxt
+# application/vnd.openxmlformats-officedocument.custom-properties+xml
+# application/vnd.openxmlformats-officedocument.customxmlproperties+xml
+# application/vnd.openxmlformats-officedocument.drawing+xml
+# application/vnd.openxmlformats-officedocument.drawingml.chart+xml
+# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml
+# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml
+# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml
+# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml
+# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml
+# application/vnd.openxmlformats-officedocument.extended-properties+xml
+# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml
+# application/vnd.openxmlformats-officedocument.presentationml.comments+xml
+# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml
+# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml
+# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml
+application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
+# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml
+# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml
+application/vnd.openxmlformats-officedocument.presentationml.slide sldx
+# application/vnd.openxmlformats-officedocument.presentationml.slide+xml
+# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml
+# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml
+application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
+# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml
+# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml
+# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml
+# application/vnd.openxmlformats-officedocument.presentationml.tags+xml
+application/vnd.openxmlformats-officedocument.presentationml.template potx
+# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml
+# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml
+application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
+# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml
+application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
+# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml
+# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml
+# application/vnd.openxmlformats-officedocument.theme+xml
+# application/vnd.openxmlformats-officedocument.themeoverride+xml
+# application/vnd.openxmlformats-officedocument.vmldrawing
+# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml
+application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
+# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml
+# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml
+# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml
+# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml
+# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml
+# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml
+# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml
+# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml
+# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml
+application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
+# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml
+# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml
+# application/vnd.openxmlformats-package.core-properties+xml
+# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml
+# application/vnd.openxmlformats-package.relationships+xml
+# application/vnd.quobject-quoxdocument
+# application/vnd.osa.netdeploy
+application/vnd.osgeo.mapguide.package mgp
+# application/vnd.osgi.bundle
+application/vnd.osgi.dp dp
+application/vnd.osgi.subsystem esa
+# application/vnd.otps.ct-kip+xml
+application/vnd.palm pdb pqa oprc
+# application/vnd.paos.xml
+application/vnd.pawaafile paw
+application/vnd.pg.format str
+application/vnd.pg.osasli ei6
+# application/vnd.piaccess.application-licence
+application/vnd.picsel efif
+application/vnd.pmi.widget wg
+# application/vnd.poc.group-advertisement+xml
+application/vnd.pocketlearn plf
+application/vnd.powerbuilder6 pbd
+# application/vnd.powerbuilder6-s
+# application/vnd.powerbuilder7
+# application/vnd.powerbuilder7-s
+# application/vnd.powerbuilder75
+# application/vnd.powerbuilder75-s
+# application/vnd.preminet
+application/vnd.previewsystems.box box
+application/vnd.proteus.magazine mgz
+application/vnd.publishare-delta-tree qps
+application/vnd.pvi.ptid1 ptid
+# application/vnd.pwg-multiplexed
+# application/vnd.pwg-xhtml-print+xml
+# application/vnd.qualcomm.brew-app-res
+application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb
+# application/vnd.radisys.moml+xml
+# application/vnd.radisys.msml+xml
+# application/vnd.radisys.msml-audit+xml
+# application/vnd.radisys.msml-audit-conf+xml
+# application/vnd.radisys.msml-audit-conn+xml
+# application/vnd.radisys.msml-audit-dialog+xml
+# application/vnd.radisys.msml-audit-stream+xml
+# application/vnd.radisys.msml-conf+xml
+# application/vnd.radisys.msml-dialog+xml
+# application/vnd.radisys.msml-dialog-base+xml
+# application/vnd.radisys.msml-dialog-fax-detect+xml
+# application/vnd.radisys.msml-dialog-fax-sendrecv+xml
+# application/vnd.radisys.msml-dialog-group+xml
+# application/vnd.radisys.msml-dialog-speech+xml
+# application/vnd.radisys.msml-dialog-transform+xml
+# application/vnd.rainstor.data
+# application/vnd.rapid
+application/vnd.realvnc.bed bed
+application/vnd.recordare.musicxml mxl
+application/vnd.recordare.musicxml+xml musicxml
+# application/vnd.renlearn.rlprint
+application/vnd.rig.cryptonote cryptonote
+application/vnd.rim.cod cod
+application/vnd.rn-realmedia rm
+application/vnd.rn-realmedia-vbr rmvb
+application/vnd.route66.link66+xml link66
+# application/vnd.rs-274x
+# application/vnd.ruckus.download
+# application/vnd.s3sms
+application/vnd.sailingtracker.track st
+# application/vnd.sbm.cid
+# application/vnd.sbm.mid2
+# application/vnd.scribus
+# application/vnd.sealed.3df
+# application/vnd.sealed.csf
+# application/vnd.sealed.doc
+# application/vnd.sealed.eml
+# application/vnd.sealed.mht
+# application/vnd.sealed.net
+# application/vnd.sealed.ppt
+# application/vnd.sealed.tiff
+# application/vnd.sealed.xls
+# application/vnd.sealedmedia.softseal.html
+# application/vnd.sealedmedia.softseal.pdf
+application/vnd.seemail see
+application/vnd.sema sema
+application/vnd.semd semd
+application/vnd.semf semf
+application/vnd.shana.informed.formdata ifm
+application/vnd.shana.informed.formtemplate itp
+application/vnd.shana.informed.interchange iif
+application/vnd.shana.informed.package ipk
+application/vnd.simtech-mindmapper twd twds
+application/vnd.smaf mmf
+# application/vnd.smart.notebook
+application/vnd.smart.teacher teacher
+# application/vnd.software602.filler.form+xml
+# application/vnd.software602.filler.form-xml-zip
+application/vnd.solent.sdkm+xml sdkm sdkd
+application/vnd.spotfire.dxp dxp
+application/vnd.spotfire.sfs sfs
+# application/vnd.sss-cod
+# application/vnd.sss-dtf
+# application/vnd.sss-ntf
+application/vnd.stardivision.calc sdc
+application/vnd.stardivision.draw sda
+application/vnd.stardivision.impress sdd
+application/vnd.stardivision.math smf
+application/vnd.stardivision.writer sdw vor
+application/vnd.stardivision.writer-global sgl
+application/vnd.stepmania.package smzip
+application/vnd.stepmania.stepchart sm
+# application/vnd.street-stream
+application/vnd.sun.xml.calc sxc
+application/vnd.sun.xml.calc.template stc
+application/vnd.sun.xml.draw sxd
+application/vnd.sun.xml.draw.template std
+application/vnd.sun.xml.impress sxi
+application/vnd.sun.xml.impress.template sti
+application/vnd.sun.xml.math sxm
+application/vnd.sun.xml.writer sxw
+application/vnd.sun.xml.writer.global sxg
+application/vnd.sun.xml.writer.template stw
+# application/vnd.sun.wadl+xml
+application/vnd.sus-calendar sus susp
+application/vnd.svd svd
+# application/vnd.swiftview-ics
+application/vnd.symbian.install sis sisx
+application/vnd.syncml+xml xsm
+application/vnd.syncml.dm+wbxml bdm
+application/vnd.syncml.dm+xml xdm
+# application/vnd.syncml.dm.notification
+# application/vnd.syncml.ds.notification
+application/vnd.tao.intent-module-archive tao
+application/vnd.tcpdump.pcap pcap cap dmp
+application/vnd.tmobile-livetv tmo
+application/vnd.trid.tpt tpt
+application/vnd.triscape.mxs mxs
+application/vnd.trueapp tra
+# application/vnd.truedoc
+# application/vnd.ubisoft.webplayer
+application/vnd.ufdl ufd ufdl
+application/vnd.uiq.theme utz
+application/vnd.umajin umj
+application/vnd.unity unityweb
+application/vnd.uoml+xml uoml
+# application/vnd.uplanet.alert
+# application/vnd.uplanet.alert-wbxml
+# application/vnd.uplanet.bearer-choice
+# application/vnd.uplanet.bearer-choice-wbxml
+# application/vnd.uplanet.cacheop
+# application/vnd.uplanet.cacheop-wbxml
+# application/vnd.uplanet.channel
+# application/vnd.uplanet.channel-wbxml
+# application/vnd.uplanet.list
+# application/vnd.uplanet.list-wbxml
+# application/vnd.uplanet.listcmd
+# application/vnd.uplanet.listcmd-wbxml
+# application/vnd.uplanet.signal
+application/vnd.vcx vcx
+# application/vnd.vd-study
+# application/vnd.vectorworks
+# application/vnd.verimatrix.vcas
+# application/vnd.vidsoft.vidconference
+application/vnd.visio vsd vst vss vsw
+application/vnd.visionary vis
+# application/vnd.vividence.scriptfile
+application/vnd.vsf vsf
+# application/vnd.wap.sic
+# application/vnd.wap.slc
+application/vnd.wap.wbxml wbxml
+application/vnd.wap.wmlc wmlc
+application/vnd.wap.wmlscriptc wmlsc
+application/vnd.webturbo wtb
+# application/vnd.wfa.wsc
+# application/vnd.wmc
+# application/vnd.wmf.bootstrap
+# application/vnd.wolfram.mathematica
+# application/vnd.wolfram.mathematica.package
+application/vnd.wolfram.player nbp
+application/vnd.wordperfect wpd
+application/vnd.wqd wqd
+# application/vnd.wrq-hp3000-labelled
+application/vnd.wt.stf stf
+# application/vnd.wv.csp+wbxml
+# application/vnd.wv.csp+xml
+# application/vnd.wv.ssp+xml
+application/vnd.xara xar
+application/vnd.xfdl xfdl
+# application/vnd.xfdl.webform
+# application/vnd.xmi+xml
+# application/vnd.xmpie.cpkg
+# application/vnd.xmpie.dpkg
+# application/vnd.xmpie.plan
+# application/vnd.xmpie.ppkg
+# application/vnd.xmpie.xlim
+application/vnd.yamaha.hv-dic hvd
+application/vnd.yamaha.hv-script hvs
+application/vnd.yamaha.hv-voice hvp
+application/vnd.yamaha.openscoreformat osf
+application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg
+# application/vnd.yamaha.remote-setup
+application/vnd.yamaha.smaf-audio saf
+application/vnd.yamaha.smaf-phrase spf
+# application/vnd.yamaha.through-ngn
+# application/vnd.yamaha.tunnel-udpencap
+application/vnd.yellowriver-custom-menu cmp
+application/vnd.zul zir zirz
+application/vnd.zzazz.deck+xml zaz
+application/voicexml+xml vxml
+# application/vq-rtcpxr
+# application/watcherinfo+xml
+# application/whoispp-query
+# application/whoispp-response
+application/widget wgt
+application/winhlp hlp
+# application/wita
+# application/wordperfect5.1
+application/wsdl+xml wsdl
+application/wspolicy+xml wspolicy
+application/x-7z-compressed 7z
+application/x-abiword abw
+application/x-ace-compressed ace
+# application/x-amf
+application/x-apple-diskimage dmg
+application/x-authorware-bin aab x32 u32 vox
+application/x-authorware-map aam
+application/x-authorware-seg aas
+application/x-bcpio bcpio
+application/x-bittorrent torrent
+application/x-blorb blb blorb
+application/x-bzip bz
+application/x-bzip2 bz2 boz
+application/x-cbr cbr cba cbt cbz cb7
+application/x-cdlink vcd
+application/x-cfs-compressed cfs
+application/x-chat chat
+application/x-chess-pgn pgn
+application/x-conference nsc
+# application/x-compress
+application/x-cpio cpio
+application/x-csh csh
+application/x-debian-package deb udeb
+application/x-dgc-compressed dgc
+application/x-director dir dcr dxr cst cct cxt w3d fgd swa
+application/x-doom wad
+application/x-dtbncx+xml ncx
+application/x-dtbook+xml dtb
+application/x-dtbresource+xml res
+application/x-dvi dvi
+application/x-envoy evy
+application/x-eva eva
+application/x-font-bdf bdf
+# application/x-font-dos
+# application/x-font-framemaker
+application/x-font-ghostscript gsf
+# application/x-font-libgrx
+application/x-font-linux-psf psf
+application/x-font-otf otf
+application/x-font-pcf pcf
+application/x-font-snf snf
+# application/x-font-speedo
+# application/x-font-sunos-news
+application/x-font-ttf ttf ttc
+application/x-font-type1 pfa pfb pfm afm
+application/font-woff woff
+# application/x-font-vfont
+application/x-freearc arc
+application/x-futuresplash spl
+application/x-gca-compressed gca
+application/x-glulx ulx
+application/x-gnumeric gnumeric
+application/x-gramps-xml gramps
+application/x-gtar gtar
+# application/x-gzip
+application/x-hdf hdf
+application/x-install-instructions install
+application/x-iso9660-image iso
+application/x-java-jnlp-file jnlp
+application/x-latex latex
+application/x-lzh-compressed lzh lha
+application/x-mie mie
+application/x-mobipocket-ebook prc mobi
+application/x-ms-application application
+application/x-ms-shortcut lnk
+application/x-ms-wmd wmd
+application/x-ms-wmz wmz
+application/x-ms-xbap xbap
+application/x-msaccess mdb
+application/x-msbinder obd
+application/x-mscardfile crd
+application/x-msclip clp
+application/x-msdownload exe dll com bat msi
+application/x-msmediaview mvb m13 m14
+application/x-msmetafile wmf wmz emf emz
+application/x-msmoney mny
+application/x-mspublisher pub
+application/x-msschedule scd
+application/x-msterminal trm
+application/x-mswrite wri
+application/x-netcdf nc cdf
+application/x-nzb nzb
+application/x-pkcs12 p12 pfx
+application/x-pkcs7-certificates p7b spc
+application/x-pkcs7-certreqresp p7r
+application/x-rar-compressed rar
+application/x-research-info-systems ris
+application/x-sh sh
+application/x-shar shar
+application/x-shockwave-flash swf
+application/x-silverlight-app xap
+application/x-sql sql
+application/x-stuffit sit
+application/x-stuffitx sitx
+application/x-subrip srt
+application/x-sv4cpio sv4cpio
+application/x-sv4crc sv4crc
+application/x-t3vm-image t3
+application/x-tads gam
+application/x-tar tar
+application/x-tcl tcl
+application/x-tex tex
+application/x-tex-tfm tfm
+application/x-texinfo texinfo texi
+application/x-tgif obj
+application/x-ustar ustar
+application/x-wais-source src
+application/x-x509-ca-cert der crt
+application/x-xfig fig
+application/x-xliff+xml xlf
+application/x-xpinstall xpi
+application/x-xz xz
+application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8
+# application/x400-bp
+application/xaml+xml xaml
+# application/xcap-att+xml
+# application/xcap-caps+xml
+application/xcap-diff+xml xdf
+# application/xcap-el+xml
+# application/xcap-error+xml
+# application/xcap-ns+xml
+# application/xcon-conference-info-diff+xml
+# application/xcon-conference-info+xml
+application/xenc+xml xenc
+application/xhtml+xml xhtml xht
+# application/xhtml-voice+xml
+application/xml xml xsl
+application/xml-dtd dtd
+# application/xml-external-parsed-entity
+# application/xmpp+xml
+application/xop+xml xop
+application/xproc+xml xpl
+application/xslt+xml xslt
+application/xspf+xml xspf
+application/xv+xml mxml xhvml xvml xvm
+application/yang yang
+application/yin+xml yin
+application/zip zip
+# audio/1d-interleaved-parityfec
+# audio/32kadpcm
+# audio/3gpp
+# audio/3gpp2
+# audio/ac3
+audio/adpcm adp
+# audio/amr
+# audio/amr-wb
+# audio/amr-wb+
+# audio/asc
+# audio/atrac-advanced-lossless
+# audio/atrac-x
+# audio/atrac3
+audio/basic au snd
+# audio/bv16
+# audio/bv32
+# audio/clearmode
+# audio/cn
+# audio/dat12
+# audio/dls
+# audio/dsr-es201108
+# audio/dsr-es202050
+# audio/dsr-es202211
+# audio/dsr-es202212
+# audio/dv
+# audio/dvi4
+# audio/eac3
+# audio/evrc
+# audio/evrc-qcp
+# audio/evrc0
+# audio/evrc1
+# audio/evrcb
+# audio/evrcb0
+# audio/evrcb1
+# audio/evrcwb
+# audio/evrcwb0
+# audio/evrcwb1
+# audio/example
+# audio/fwdred
+# audio/g719
+# audio/g722
+# audio/g7221
+# audio/g723
+# audio/g726-16
+# audio/g726-24
+# audio/g726-32
+# audio/g726-40
+# audio/g728
+# audio/g729
+# audio/g7291
+# audio/g729d
+# audio/g729e
+# audio/gsm
+# audio/gsm-efr
+# audio/gsm-hr-08
+# audio/ilbc
+# audio/ip-mr_v2.5
+# audio/isac
+# audio/l16
+# audio/l20
+# audio/l24
+# audio/l8
+# audio/lpc
+audio/midi mid midi kar rmi
+# audio/mobile-xmf
+audio/mp4 mp4a
+# audio/mp4a-latm
+# audio/mpa
+# audio/mpa-robust
+audio/mpeg mpga mp2 mp2a mp3 m2a m3a
+# audio/mpeg4-generic
+# audio/musepack
+audio/ogg oga ogg spx
+# audio/opus
+# audio/parityfec
+# audio/pcma
+# audio/pcma-wb
+# audio/pcmu-wb
+# audio/pcmu
+# audio/prs.sid
+# audio/qcelp
+# audio/red
+# audio/rtp-enc-aescm128
+# audio/rtp-midi
+# audio/rtx
+audio/s3m s3m
+audio/silk sil
+# audio/smv
+# audio/smv0
+# audio/smv-qcp
+# audio/sp-midi
+# audio/speex
+# audio/t140c
+# audio/t38
+# audio/telephone-event
+# audio/tone
+# audio/uemclip
+# audio/ulpfec
+# audio/vdvi
+# audio/vmr-wb
+# audio/vnd.3gpp.iufp
+# audio/vnd.4sb
+# audio/vnd.audiokoz
+# audio/vnd.celp
+# audio/vnd.cisco.nse
+# audio/vnd.cmles.radio-events
+# audio/vnd.cns.anp1
+# audio/vnd.cns.inf1
+audio/vnd.dece.audio uva uvva
+audio/vnd.digital-winds eol
+# audio/vnd.dlna.adts
+# audio/vnd.dolby.heaac.1
+# audio/vnd.dolby.heaac.2
+# audio/vnd.dolby.mlp
+# audio/vnd.dolby.mps
+# audio/vnd.dolby.pl2
+# audio/vnd.dolby.pl2x
+# audio/vnd.dolby.pl2z
+# audio/vnd.dolby.pulse.1
+audio/vnd.dra dra
+audio/vnd.dts dts
+audio/vnd.dts.hd dtshd
+# audio/vnd.dvb.file
+# audio/vnd.everad.plj
+# audio/vnd.hns.audio
+audio/vnd.lucent.voice lvp
+audio/vnd.ms-playready.media.pya pya
+# audio/vnd.nokia.mobile-xmf
+# audio/vnd.nortel.vbk
+audio/vnd.nuera.ecelp4800 ecelp4800
+audio/vnd.nuera.ecelp7470 ecelp7470
+audio/vnd.nuera.ecelp9600 ecelp9600
+# audio/vnd.octel.sbc
+# audio/vnd.qcelp
+# audio/vnd.rhetorex.32kadpcm
+audio/vnd.rip rip
+# audio/vnd.sealedmedia.softseal.mpeg
+# audio/vnd.vmx.cvsd
+# audio/vorbis
+# audio/vorbis-config
+audio/webm weba
+audio/x-aac aac
+audio/x-aiff aif aiff aifc
+audio/x-caf caf
+audio/x-flac flac
+audio/x-matroska mka
+audio/x-mpegurl m3u
+audio/x-ms-wax wax
+audio/x-ms-wma wma
+audio/x-pn-realaudio ram ra
+audio/x-pn-realaudio-plugin rmp
+# audio/x-tta
+audio/x-wav wav
+audio/xm xm
+chemical/x-cdx cdx
+chemical/x-cif cif
+chemical/x-cmdf cmdf
+chemical/x-cml cml
+chemical/x-csml csml
+# chemical/x-pdb
+chemical/x-xyz xyz
+image/bmp bmp
+image/cgm cgm
+# image/example
+# image/fits
+image/g3fax g3
+image/gif gif
+image/ief ief
+# image/jp2
+image/jpeg jpeg jpg jpe
+# image/jpm
+# image/jpx
+image/ktx ktx
+# image/naplps
+image/png png
+image/prs.btif btif
+# image/prs.pti
+image/sgi sgi
+image/svg+xml svg svgz
+# image/t38
+image/tiff tiff tif
+# image/tiff-fx
+image/vnd.adobe.photoshop psd
+# image/vnd.cns.inf2
+image/vnd.dece.graphic uvi uvvi uvg uvvg
+image/vnd.dvb.subtitle sub
+image/vnd.djvu djvu djv
+image/vnd.dwg dwg
+image/vnd.dxf dxf
+image/vnd.fastbidsheet fbs
+image/vnd.fpx fpx
+image/vnd.fst fst
+image/vnd.fujixerox.edmics-mmr mmr
+image/vnd.fujixerox.edmics-rlc rlc
+# image/vnd.globalgraphics.pgb
+# image/vnd.microsoft.icon
+# image/vnd.mix
+image/vnd.ms-modi mdi
+image/vnd.ms-photo wdp
+image/vnd.net-fpx npx
+# image/vnd.radiance
+# image/vnd.sealed.png
+# image/vnd.sealedmedia.softseal.gif
+# image/vnd.sealedmedia.softseal.jpg
+# image/vnd.svf
+image/vnd.wap.wbmp wbmp
+image/vnd.xiff xif
+image/webp webp
+image/x-3ds 3ds
+image/x-cmu-raster ras
+image/x-cmx cmx
+image/x-freehand fh fhc fh4 fh5 fh7
+image/x-icon ico
+image/x-mrsid-image sid
+image/x-pcx pcx
+image/x-pict pic pct
+image/x-portable-anymap pnm
+image/x-portable-bitmap pbm
+image/x-portable-graymap pgm
+image/x-portable-pixmap ppm
+image/x-rgb rgb
+image/x-tga tga
+image/x-xbitmap xbm
+image/x-xpixmap xpm
+image/x-xwindowdump xwd
+# message/cpim
+# message/delivery-status
+# message/disposition-notification
+# message/example
+# message/external-body
+# message/feedback-report
+# message/global
+# message/global-delivery-status
+# message/global-disposition-notification
+# message/global-headers
+# message/http
+# message/imdn+xml
+# message/news
+# message/partial
+message/rfc822 eml mime
+# message/s-http
+# message/sip
+# message/sipfrag
+# message/tracking-status
+# message/vnd.si.simp
+# model/example
+model/iges igs iges
+model/mesh msh mesh silo
+model/vnd.collada+xml dae
+model/vnd.dwf dwf
+# model/vnd.flatland.3dml
+model/vnd.gdl gdl
+# model/vnd.gs-gdl
+# model/vnd.gs.gdl
+model/vnd.gtw gtw
+# model/vnd.moml+xml
+model/vnd.mts mts
+# model/vnd.parasolid.transmit.binary
+# model/vnd.parasolid.transmit.text
+model/vnd.vtu vtu
+model/vrml wrl vrml
+model/x3d+binary x3db x3dbz
+model/x3d+vrml x3dv x3dvz
+model/x3d+xml x3d x3dz
+# multipart/alternative
+# multipart/appledouble
+# multipart/byteranges
+# multipart/digest
+# multipart/encrypted
+# multipart/example
+# multipart/form-data
+# multipart/header-set
+# multipart/mixed
+# multipart/parallel
+# multipart/related
+# multipart/report
+# multipart/signed
+# multipart/voice-message
+# text/1d-interleaved-parityfec
+text/cache-manifest appcache
+text/calendar ics ifb
+text/css css
+text/csv csv
+# text/directory
+# text/dns
+# text/ecmascript
+# text/enriched
+# text/example
+# text/fwdred
+text/html html htm
+# text/javascript
+text/n3 n3
+# text/parityfec
+text/plain txt text conf def list log in
+# text/prs.fallenstein.rst
+text/prs.lines.tag dsc
+# text/vnd.radisys.msml-basic-layout
+# text/red
+# text/rfc822-headers
+text/richtext rtx
+# text/rtf
+# text/rtp-enc-aescm128
+# text/rtx
+text/sgml sgml sgm
+# text/t140
+text/tab-separated-values tsv
+text/troff t tr roff man me ms
+text/turtle ttl
+# text/ulpfec
+text/uri-list uri uris urls
+text/vcard vcard
+# text/vnd.abc
+text/vnd.curl curl
+text/vnd.curl.dcurl dcurl
+text/vnd.curl.scurl scurl
+text/vnd.curl.mcurl mcurl
+# text/vnd.dmclientscript
+text/vnd.dvb.subtitle sub
+# text/vnd.esmertec.theme-descriptor
+text/vnd.fly fly
+text/vnd.fmi.flexstor flx
+text/vnd.graphviz gv
+text/vnd.in3d.3dml 3dml
+text/vnd.in3d.spot spot
+# text/vnd.iptc.newsml
+# text/vnd.iptc.nitf
+# text/vnd.latex-z
+# text/vnd.motorola.reflex
+# text/vnd.ms-mediapackage
+# text/vnd.net2phone.commcenter.command
+# text/vnd.si.uricatalogue
+text/vnd.sun.j2me.app-descriptor jad
+# text/vnd.trolltech.linguist
+# text/vnd.wap.si
+# text/vnd.wap.sl
+text/vnd.wap.wml wml
+text/vnd.wap.wmlscript wmls
+text/x-asm s asm
+text/x-c c cc cxx cpp h hh dic
+text/x-fortran f for f77 f90
+text/x-java-source java
+text/x-opml opml
+text/x-pascal p pas
+text/x-nfo nfo
+text/x-setext etx
+text/x-sfv sfv
+text/x-uuencode uu
+text/x-vcalendar vcs
+text/x-vcard vcf
+# text/xml
+# text/xml-external-parsed-entity
+# video/1d-interleaved-parityfec
+video/3gpp 3gp
+# video/3gpp-tt
+video/3gpp2 3g2
+# video/bmpeg
+# video/bt656
+# video/celb
+# video/dv
+# video/example
+video/h261 h261
+video/h263 h263
+# video/h263-1998
+# video/h263-2000
+video/h264 h264
+# video/h264-rcdo
+# video/h264-svc
+video/jpeg jpgv
+# video/jpeg2000
+video/jpm jpm jpgm
+video/mj2 mj2 mjp2
+# video/mp1s
+# video/mp2p
+# video/mp2t
+video/mp4 mp4 mp4v mpg4
+# video/mp4v-es
+video/mpeg mpeg mpg mpe m1v m2v
+# video/mpeg4-generic
+# video/mpv
+# video/nv
+video/ogg ogv
+# video/parityfec
+# video/pointer
+video/quicktime qt mov
+# video/raw
+# video/rtp-enc-aescm128
+# video/rtx
+# video/smpte292m
+# video/ulpfec
+# video/vc1
+# video/vnd.cctv
+video/vnd.dece.hd uvh uvvh
+video/vnd.dece.mobile uvm uvvm
+# video/vnd.dece.mp4
+video/vnd.dece.pd uvp uvvp
+video/vnd.dece.sd uvs uvvs
+video/vnd.dece.video uvv uvvv
+# video/vnd.directv.mpeg
+# video/vnd.directv.mpeg-tts
+# video/vnd.dlna.mpeg-tts
+video/vnd.dvb.file dvb
+video/vnd.fvt fvt
+# video/vnd.hns.video
+# video/vnd.iptvforum.1dparityfec-1010
+# video/vnd.iptvforum.1dparityfec-2005
+# video/vnd.iptvforum.2dparityfec-1010
+# video/vnd.iptvforum.2dparityfec-2005
+# video/vnd.iptvforum.ttsavc
+# video/vnd.iptvforum.ttsmpeg2
+# video/vnd.motorola.video
+# video/vnd.motorola.videop
+video/vnd.mpegurl mxu m4u
+video/vnd.ms-playready.media.pyv pyv
+# video/vnd.nokia.interleaved-multimedia
+# video/vnd.nokia.videovoip
+# video/vnd.objectvideo
+# video/vnd.sealed.mpeg1
+# video/vnd.sealed.mpeg4
+# video/vnd.sealed.swf
+# video/vnd.sealedmedia.softseal.mov
+video/vnd.uvvu.mp4 uvu uvvu
+video/vnd.vivo viv
+video/webm webm
+video/x-f4v f4v
+video/x-fli fli
+video/x-flv flv
+video/x-m4v m4v
+video/x-matroska mkv mk3d mks
+video/x-mng mng
+video/x-ms-asf asf asx
+video/x-ms-vob vob
+video/x-ms-wm wm
+video/x-ms-wmv wmv
+video/x-ms-wmx wmx
+video/x-ms-wvx wvx
+video/x-msvideo avi
+video/x-sgi-movie movie
+video/x-smv smv
+x-conference/x-cooltalk ice
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/types/node.types b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/types/node.types
new file mode 100644
index 0000000..55b2cf7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/mime/types/node.types
@@ -0,0 +1,77 @@
+# What: WebVTT
+# Why: To allow formats intended for marking up external text track resources.
+# http://dev.w3.org/html5/webvtt/
+# Added by: niftylettuce
+text/vtt vtt
+
+# What: Google Chrome Extension
+# Why: To allow apps to (work) be served with the right content type header.
+# http://codereview.chromium.org/2830017
+# Added by: niftylettuce
+application/x-chrome-extension crx
+
+# What: HTC support
+# Why: To properly render .htc files such as CSS3PIE
+# Added by: niftylettuce
+text/x-component htc
+
+# What: HTML5 application cache manifes ('.manifest' extension)
+# Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps
+# per https://developer.mozilla.org/en/offline_resources_in_firefox
+# Added by: louisremi
+text/cache-manifest manifest
+
+# What: node binary buffer format
+# Why: semi-standard extension w/in the node community
+# Added by: tootallnate
+application/octet-stream buffer
+
+# What: The "protected" MP-4 formats used by iTunes.
+# Why: Required for streaming music to browsers (?)
+# Added by: broofa
+application/mp4 m4p
+audio/mp4 m4a
+
+# What: Video format, Part of RFC1890
+# Why: See https://github.com/bentomas/node-mime/pull/6
+# Added by: mjrusso
+video/MP2T ts
+
+# What: EventSource mime type
+# Why: mime type of Server-Sent Events stream
+# http://www.w3.org/TR/eventsource/#text-event-stream
+# Added by: francois2metz
+text/event-stream event-stream
+
+# What: Mozilla App manifest mime type
+# Why: https://developer.mozilla.org/en/Apps/Manifest#Serving_manifests
+# Added by: ednapiranha
+application/x-web-app-manifest+json webapp
+
+# What: Lua file types
+# Why: Googling around shows de-facto consensus on these
+# Added by: creationix (Issue #45)
+text/x-lua lua
+application/x-lua-bytecode luac
+
+# What: Markdown files, as per http://daringfireball.net/projects/markdown/syntax
+# Why: http://stackoverflow.com/questions/10701983/what-is-the-mime-type-for-markdown
+# Added by: avoidwork
+text/x-markdown markdown md mkd
+
+# What: ini files
+# Why: because they're just text files
+# Added by: Matthew Kastor
+text/plain ini
+
+# What: DASH Adaptive Streaming manifest
+# Why: https://developer.mozilla.org/en-US/docs/DASH_Adaptive_Streaming_for_HTML_5_Video
+# Added by: eelcocramer
+application/dash+xml mdp
+
+# What: OpenType font files - http://www.microsoft.com/typography/otspec/
+# Why: Browsers usually ignore the font MIME types and sniff the content,
+# but Chrome, shows a warning if OpenType fonts aren't served with
+# the `font/opentype` MIME type: http://i.imgur.com/8c5RN8M.png.
+# Added by: alrra
+font/opentype otf
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/.npmignore b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/.npmignore
new file mode 100644
index 0000000..d1aa0ce
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/.npmignore
@@ -0,0 +1,5 @@
+node_modules
+test
+History.md
+Makefile
+component.json
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/LICENSE
new file mode 100644
index 0000000..6c07561
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014 Guillermo Rauch <rauchg@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/README.md
new file mode 100644
index 0000000..0fd54fd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/README.md
@@ -0,0 +1,35 @@
+# ms.js: miliseconds conversion utility
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('100') // 100
+```
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](nodejs.org/download).
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as
+a number (e.g: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of
+equivalent ms is returned.
+
+## License
+
+MIT
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/index.js
new file mode 100644
index 0000000..e79bfa1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/index.js
@@ -0,0 +1,123 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} options
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options){
+ options = options || {};
+ if ('string' == typeof val) return parse(val);
+ return options.long
+ ? long(val)
+ : short(val);
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
+ if (!match) return;
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function short(ms) {
+ if (ms >= d) return Math.round(ms / d) + 'd';
+ if (ms >= h) return Math.round(ms / h) + 'h';
+ if (ms >= m) return Math.round(ms / m) + 'm';
+ if (ms >= s) return Math.round(ms / s) + 's';
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function long(ms) {
+ return plural(ms, d, 'day')
+ || plural(ms, h, 'hour')
+ || plural(ms, m, 'minute')
+ || plural(ms, s, 'second')
+ || ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) return;
+ if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/package.json
new file mode 100644
index 0000000..ec3ea9b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/node_modules/ms/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "ms",
+ "version": "0.7.0",
+ "description": "Tiny ms conversion utility",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/guille/ms.js.git"
+ },
+ "main": "./index",
+ "devDependencies": {
+ "mocha": "*",
+ "expect.js": "*",
+ "serve": "*"
+ },
+ "component": {
+ "scripts": {
+ "ms/index.js": "index.js"
+ }
+ },
+ "gitHead": "1e9cd9b05ef0dc26f765434d2bfee42394376e52",
+ "bugs": {
+ "url": "https://github.com/guille/ms.js/issues"
+ },
+ "homepage": "https://github.com/guille/ms.js",
+ "_id": "ms@0.7.0",
+ "scripts": {},
+ "_shasum": "865be94c2e7397ad8a57da6a633a6e2f30798b83",
+ "_from": "ms@0.7.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "865be94c2e7397ad8a57da6a633a6e2f30798b83",
+ "tarball": "http://registry.npmjs.org/ms/-/ms-0.7.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/send/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/send/package.json
new file mode 100644
index 0000000..16ee78f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/send/package.json
@@ -0,0 +1,86 @@
+{
+ "name": "send",
+ "description": "Better streaming static file server with Range and conditional-GET support",
+ "version": "0.11.1",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/tj/send"
+ },
+ "keywords": [
+ "static",
+ "file",
+ "server"
+ ],
+ "dependencies": {
+ "debug": "~2.1.1",
+ "depd": "~1.0.0",
+ "destroy": "1.0.3",
+ "escape-html": "1.0.1",
+ "etag": "~1.5.1",
+ "fresh": "0.2.4",
+ "mime": "1.2.11",
+ "ms": "0.7.0",
+ "on-finished": "~2.2.0",
+ "range-parser": "~1.0.2"
+ },
+ "devDependencies": {
+ "after": "0.8.1",
+ "istanbul": "0.3.5",
+ "mocha": "~2.1.0",
+ "supertest": "~0.15.0"
+ },
+ "files": [
+ "History.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "test": "mocha --check-leaks --reporter spec --bail",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec"
+ },
+ "gitHead": "1e18c059e94879ededcea3d58f52eec6791560ee",
+ "bugs": {
+ "url": "https://github.com/tj/send/issues"
+ },
+ "homepage": "https://github.com/tj/send",
+ "_id": "send@0.11.1",
+ "_shasum": "1beabfd42f9e2709f99028af3078ac12b47092d5",
+ "_from": "send@0.11.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "1beabfd42f9e2709f99028af3078ac12b47092d5",
+ "tarball": "http://registry.npmjs.org/send/-/send-0.11.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/send/-/send-0.11.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/HISTORY.md
new file mode 100644
index 0000000..d3165dc
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/HISTORY.md
@@ -0,0 +1,222 @@
+1.8.1 / 2015-01-20
+==================
+
+ * Fix redirect loop in Node.js 0.11.14
+ * deps: send@0.11.1
+ - Fix root path disclosure
+
+1.8.0 / 2015-01-05
+==================
+
+ * deps: send@0.11.0
+ - deps: debug@~2.1.1
+ - deps: etag@~1.5.1
+ - deps: ms@0.7.0
+ - deps: on-finished@~2.2.0
+
+1.7.2 / 2015-01-02
+==================
+
+ * Fix potential open redirect when mounted at root
+
+1.7.1 / 2014-10-22
+==================
+
+ * deps: send@0.10.1
+ - deps: on-finished@~2.1.1
+
+1.7.0 / 2014-10-15
+==================
+
+ * deps: send@0.10.0
+ - deps: debug@~2.1.0
+ - deps: depd@~1.0.0
+ - deps: etag@~1.5.0
+
+1.6.4 / 2014-10-08
+==================
+
+ * Fix redirect loop when index file serving disabled
+
+1.6.3 / 2014-09-24
+==================
+
+ * deps: send@0.9.3
+ - deps: etag@~1.4.0
+
+1.6.2 / 2014-09-15
+==================
+
+ * deps: send@0.9.2
+ - deps: depd@0.4.5
+ - deps: etag@~1.3.1
+ - deps: range-parser@~1.0.2
+
+1.6.1 / 2014-09-07
+==================
+
+ * deps: send@0.9.1
+ - deps: fresh@0.2.4
+
+1.6.0 / 2014-09-07
+==================
+
+ * deps: send@0.9.0
+ - Add `lastModified` option
+ - Use `etag` to generate `ETag` header
+ - deps: debug@~2.0.0
+
+1.5.4 / 2014-09-04
+==================
+
+ * deps: send@0.8.5
+ - Fix a path traversal issue when using `root`
+ - Fix malicious path detection for empty string path
+
+1.5.3 / 2014-08-17
+==================
+
+ * deps: send@0.8.3
+
+1.5.2 / 2014-08-14
+==================
+
+ * deps: send@0.8.2
+ - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream`
+
+1.5.1 / 2014-08-09
+==================
+
+ * Fix parsing of weird `req.originalUrl` values
+ * deps: parseurl@~1.3.0
+ * deps: utils-merge@1.0.0
+
+1.5.0 / 2014-08-05
+==================
+
+ * deps: send@0.8.1
+ - Add `extensions` option
+
+1.4.4 / 2014-08-04
+==================
+
+ * deps: send@0.7.4
+ - Fix serving index files without root dir
+
+1.4.3 / 2014-07-29
+==================
+
+ * deps: send@0.7.3
+ - Fix incorrect 403 on Windows and Node.js 0.11
+
+1.4.2 / 2014-07-27
+==================
+
+ * deps: send@0.7.2
+ - deps: depd@0.4.4
+
+1.4.1 / 2014-07-26
+==================
+
+ * deps: send@0.7.1
+ - deps: depd@0.4.3
+
+1.4.0 / 2014-07-21
+==================
+
+ * deps: parseurl@~1.2.0
+ - Cache URLs based on original value
+ - Remove no-longer-needed URL mis-parse work-around
+ - Simplify the "fast-path" `RegExp`
+ * deps: send@0.7.0
+ - Add `dotfiles` option
+ - deps: debug@1.0.4
+ - deps: depd@0.4.2
+
+1.3.2 / 2014-07-11
+==================
+
+ * deps: send@0.6.0
+ - Cap `maxAge` value to 1 year
+ - deps: debug@1.0.3
+
+1.3.1 / 2014-07-09
+==================
+
+ * deps: parseurl@~1.1.3
+ - faster parsing of href-only URLs
+
+1.3.0 / 2014-06-28
+==================
+
+ * Add `setHeaders` option
+ * Include HTML link in redirect response
+ * deps: send@0.5.0
+ - Accept string for `maxAge` (converted by `ms`)
+
+1.2.3 / 2014-06-11
+==================
+
+ * deps: send@0.4.3
+ - Do not throw un-catchable error on file open race condition
+ - Use `escape-html` for HTML escaping
+ - deps: debug@1.0.2
+ - deps: finished@1.2.2
+ - deps: fresh@0.2.2
+
+1.2.2 / 2014-06-09
+==================
+
+ * deps: send@0.4.2
+ - fix "event emitter leak" warnings
+ - deps: debug@1.0.1
+ - deps: finished@1.2.1
+
+1.2.1 / 2014-06-02
+==================
+
+ * use `escape-html` for escaping
+ * deps: send@0.4.1
+ - Send `max-age` in `Cache-Control` in correct format
+
+1.2.0 / 2014-05-29
+==================
+
+ * deps: send@0.4.0
+ - Calculate ETag with md5 for reduced collisions
+ - Fix wrong behavior when index file matches directory
+ - Ignore stream errors after request ends
+ - Skip directories in index file search
+ - deps: debug@0.8.1
+
+1.1.0 / 2014-04-24
+==================
+
+ * Accept options directly to `send` module
+ * deps: send@0.3.0
+
+1.0.4 / 2014-04-07
+==================
+
+ * Resolve relative paths at middleware setup
+ * Use parseurl to parse the URL from request
+
+1.0.3 / 2014-03-20
+==================
+
+ * Do not rely on connect-like environments
+
+1.0.2 / 2014-03-06
+==================
+
+ * deps: send@0.2.0
+
+1.0.1 / 2014-03-05
+==================
+
+ * Add mime export for back-compat
+
+1.0.0 / 2014-03-05
+==================
+
+ * Genesis from `connect`
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/LICENSE
new file mode 100644
index 0000000..b7bc085
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/LICENSE
@@ -0,0 +1,25 @@
+(The MIT License)
+
+Copyright (c) 2010 Sencha Inc.
+Copyright (c) 2011 LearnBoost
+Copyright (c) 2011 TJ Holowaychuk
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/README.md
new file mode 100644
index 0000000..8287eb6
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/README.md
@@ -0,0 +1,168 @@
+# serve-static
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Linux Build][travis-image]][travis-url]
+[![Windows Build][appveyor-image]][appveyor-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+## Install
+
+```sh
+$ npm install serve-static
+```
+
+## API
+
+```js
+var serveStatic = require('serve-static')
+```
+
+### serveStatic(root, options)
+
+Create a new middleware function to serve files from within a given root
+directory. The file to serve will be determined by combining `req.url`
+with the provided root directory. When a file is not found, instead of
+sending a 404 response, this module will instead call `next()` to move on
+to the next middleware, allowing for stacking and fall-backs.
+
+#### Options
+
+##### dotfiles
+
+ Set how "dotfiles" are treated when encountered. A dotfile is a file
+or directory that begins with a dot ("."). Note this check is done on
+the path itself without checking if the path actually exists on the
+disk. If `root` is specified, only the dotfiles above the root are
+checked (i.e. the root itself can be within a dotfile when set
+to "deny").
+
+The default value is `'ignore'`.
+
+ - `'allow'` No special treatment for dotfiles.
+ - `'deny'` Send a 403 for any request for a dotfile.
+ - `'ignore'` Pretend like the dotfile does not exist and call `next()`.
+
+##### etag
+
+Enable or disable etag generation, defaults to true.
+
+##### extensions
+
+Set file extension fallbacks. When set, if a file is not found, the given
+extensions will be added to the file name and search for. The first that
+exists will be served. Example: `['html', 'htm']`.
+
+The default value is `false`.
+
+##### index
+
+By default this module will send "index.html" files in response to a request
+on a directory. To disable this set `false` or to supply a new index pass a
+string or an array in preferred order.
+
+##### lastModified
+
+Enable or disable `Last-Modified` header, defaults to true. Uses the file
+system's last modified value.
+
+##### maxAge
+
+Provide a max-age in milliseconds for http caching, defaults to 0. This
+can also be a string accepted by the [ms](https://www.npmjs.org/package/ms#readme)
+module.
+
+##### redirect
+
+Redirect to trailing "/" when the pathname is a dir. Defaults to `true`.
+
+##### setHeaders
+
+Function to set custom headers on response. Alterations to the headers need to
+occur synchronously. The function is called as `fn(res, path, stat)`, where
+the arguments are:
+
+ - `res` the response object
+ - `path` the file path that is being sent
+ - `stat` the stat object of the file that is being sent
+
+## Examples
+
+### Serve files with vanilla node.js http server
+
+```js
+var finalhandler = require('finalhandler')
+var http = require('http')
+var serveStatic = require('serve-static')
+
+// Serve up public/ftp folder
+var serve = serveStatic('public/ftp', {'index': ['index.html', 'index.htm']})
+
+// Create server
+var server = http.createServer(function(req, res){
+ var done = finalhandler(req, res)
+ serve(req, res, done)
+})
+
+// Listen
+server.listen(3000)
+```
+
+### Serve all files as downloads
+
+```js
+var contentDisposition = require('content-disposition')
+var finalhandler = require('finalhandler')
+var http = require('http')
+var serveStatic = require('serve-static')
+
+// Serve up public/ftp folder
+var serve = serveStatic('public/ftp', {
+ 'index': false,
+ 'setHeaders': setHeaders
+})
+
+// Set header to force download
+function setHeaders(res, path) {
+ res.setHeader('Content-Disposition', contentDisposition(path))
+}
+
+// Create server
+var server = http.createServer(function(req, res){
+ var done = finalhandler(req, res)
+ serve(req, res, done)
+})
+
+// Listen
+server.listen(3000)
+```
+
+### Serving using express
+
+```js
+var connect = require('connect')
+var serveStatic = require('serve-static')
+
+var app = connect()
+
+app.use(serveStatic('public/ftp', {'index': ['default.html', 'default.htm']}))
+app.listen(3000)
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/serve-static.svg?style=flat
+[npm-url]: https://npmjs.org/package/serve-static
+[travis-image]: https://img.shields.io/travis/expressjs/serve-static/master.svg?label=linux&style=flat
+[travis-url]: https://travis-ci.org/expressjs/serve-static
+[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/serve-static/master.svg?label=windows&style=flat
+[appveyor-url]: https://ci.appveyor.com/project/dougwilson/serve-static
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/serve-static/master.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/expressjs/serve-static
+[downloads-image]: https://img.shields.io/npm/dm/serve-static.svg?style=flat
+[downloads-url]: https://npmjs.org/package/serve-static
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat
+[gratipay-url]: https://gratipay.com/dougwilson/
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/index.js
new file mode 100644
index 0000000..0d1d9fb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/index.js
@@ -0,0 +1,138 @@
+/*!
+ * serve-static
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var escapeHtml = require('escape-html');
+var merge = require('utils-merge');
+var parseurl = require('parseurl');
+var resolve = require('path').resolve;
+var send = require('send');
+var url = require('url');
+
+/**
+ * @param {String} root
+ * @param {Object} options
+ * @return {Function}
+ * @api public
+ */
+
+exports = module.exports = function serveStatic(root, options) {
+ if (!root) {
+ throw new TypeError('root path required')
+ }
+
+ if (typeof root !== 'string') {
+ throw new TypeError('root path must be a string')
+ }
+
+ // copy options object
+ options = merge({}, options)
+
+ // resolve root to absolute
+ root = resolve(root)
+
+ // default redirect
+ var redirect = options.redirect !== false
+
+ // headers listener
+ var setHeaders = options.setHeaders
+ delete options.setHeaders
+
+ if (setHeaders && typeof setHeaders !== 'function') {
+ throw new TypeError('option setHeaders must be function')
+ }
+
+ // setup options for send
+ options.maxage = options.maxage || options.maxAge || 0
+ options.root = root
+
+ return function serveStatic(req, res, next) {
+ if (req.method !== 'GET' && req.method !== 'HEAD') {
+ return next()
+ }
+
+ var opts = merge({}, options)
+ var originalUrl = parseurl.original(req)
+ var path = parseurl(req).pathname
+ var hasTrailingSlash = originalUrl.pathname[originalUrl.pathname.length - 1] === '/'
+
+ if (path === '/' && !hasTrailingSlash) {
+ // make sure redirect occurs at mount
+ path = ''
+ }
+
+ // create send stream
+ var stream = send(req, path, opts)
+
+ if (redirect) {
+ // redirect relative to originalUrl
+ stream.on('directory', function redirect() {
+ if (hasTrailingSlash) {
+ return next()
+ }
+
+ // append trailing slash
+ originalUrl.path = null
+ originalUrl.pathname = collapseLeadingSlashes(originalUrl.pathname + '/')
+
+ // reformat the URL
+ var target = url.format(originalUrl)
+
+ // send redirect response
+ res.statusCode = 303
+ res.setHeader('Content-Type', 'text/html; charset=utf-8')
+ res.setHeader('Location', target)
+ res.end('Redirecting to <a href="' + escapeHtml(target) + '">' + escapeHtml(target) + '</a>\n')
+ })
+ } else {
+ // forward to next middleware on directory
+ stream.on('directory', next)
+ }
+
+ // add headers listener
+ if (setHeaders) {
+ stream.on('headers', setHeaders)
+ }
+
+ // forward non-404 errors
+ stream.on('error', function error(err) {
+ next(err.status === 404 ? null : err)
+ })
+
+ // pipe
+ stream.pipe(res)
+ }
+}
+
+/**
+ * Expose mime module.
+ *
+ * If you wish to extend the mime table use this
+ * reference to the "mime" module in the npm registry.
+ */
+
+exports.mime = send.mime
+
+/**
+ * Collapse all leading slashes into a single slash
+ * @private
+ */
+function collapseLeadingSlashes(str) {
+ for (var i = 0; i < str.length; i++) {
+ if (str[i] !== '/') {
+ break
+ }
+ }
+
+ return i > 1
+ ? '/' + str.substr(i)
+ : str
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/package.json
new file mode 100644
index 0000000..3aa3494
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/serve-static/package.json
@@ -0,0 +1,84 @@
+{
+ "name": "serve-static",
+ "description": "Serve static files",
+ "version": "1.8.1",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/expressjs/serve-static"
+ },
+ "dependencies": {
+ "escape-html": "1.0.1",
+ "parseurl": "~1.3.0",
+ "send": "0.11.1",
+ "utils-merge": "1.0.0"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~2.1.0",
+ "supertest": "~0.15.0"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
+ },
+ "gitHead": "5a47eff4e550f30a7a1e5fb87c8656a1b8dbb249",
+ "bugs": {
+ "url": "https://github.com/expressjs/serve-static/issues"
+ },
+ "homepage": "https://github.com/expressjs/serve-static",
+ "_id": "serve-static@1.8.1",
+ "_shasum": "08fabd39999f050fc311443f46d5888a77ecfc7c",
+ "_from": "serve-static@~1.8.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "08fabd39999f050fc311443f46d5888a77ecfc7c",
+ "tarball": "http://registry.npmjs.org/serve-static/-/serve-static-1.8.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.8.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/HISTORY.md
new file mode 100644
index 0000000..e3cab75
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/HISTORY.md
@@ -0,0 +1,115 @@
+1.5.7 / 2015-02-09
+==================
+
+ * fix argument reassignment
+ * deps: mime-types@~2.0.9
+ - Add new mime types
+
+1.5.6 / 2015-01-29
+==================
+
+ * deps: mime-types@~2.0.8
+ - Add new mime types
+
+1.5.5 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.7
+ - Add new mime types
+ - Fix missing extensions
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+ - deps: mime-db@~1.5.0
+
+1.5.4 / 2014-12-10
+==================
+
+ * deps: mime-types@~2.0.4
+ - Add new mime types
+ - deps: mime-db@~1.3.0
+
+1.5.3 / 2014-11-09
+==================
+
+ * deps: mime-types@~2.0.3
+ - Add new mime types
+ - deps: mime-db@~1.2.0
+
+1.5.2 / 2014-09-28
+==================
+
+ * deps: mime-types@~2.0.2
+ - Add new mime types
+ - deps: mime-db@~1.1.0
+
+1.5.1 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+ * deps: media-typer@0.3.0
+ * deps: mime-types@~2.0.1
+ - Support Node.js 0.6
+
+1.5.0 / 2014-09-05
+==================
+
+ * fix `hasbody` to be true for `content-length: 0`
+
+1.4.0 / 2014-09-02
+==================
+
+ * update mime-types
+
+1.3.2 / 2014-06-24
+==================
+
+ * use `~` range on mime-types
+
+1.3.1 / 2014-06-19
+==================
+
+ * fix global variable leak
+
+1.3.0 / 2014-06-19
+==================
+
+ * improve type parsing
+
+ - invalid media type never matches
+ - media type not case-sensitive
+ - extra LWS does not affect results
+
+1.2.2 / 2014-06-19
+==================
+
+ * fix behavior on unknown type argument
+
+1.2.1 / 2014-06-03
+==================
+
+ * switch dependency from `mime` to `mime-types@1.0.0`
+
+1.2.0 / 2014-05-11
+==================
+
+ * support suffix matching:
+
+ - `+json` matches `application/vnd+json`
+ - `*/vnd+json` matches `application/vnd+json`
+ - `application/*+json` matches `application/vnd+json`
+
+1.1.0 / 2014-04-12
+==================
+
+ * add non-array values support
+ * expose internal utilities:
+
+ - `.is()`
+ - `.hasBody()`
+ - `.normalize()`
+ - `.match()`
+
+1.0.1 / 2014-03-30
+==================
+
+ * add `multipart` as a shorthand
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/LICENSE
new file mode 100644
index 0000000..4164d08
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/README.md
new file mode 100644
index 0000000..0beeed8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/README.md
@@ -0,0 +1,117 @@
+# type-is
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Infer the content-type of a request.
+
+### Install
+
+```sh
+$ npm install type-is
+```
+
+## API
+
+```js
+var http = require('http')
+var is = require('type-is')
+
+http.createServer(function (req, res) {
+ var istext = is(req, ['text/*'])
+ res.end('you ' + (istext ? 'sent' : 'did not send') + ' me text')
+})
+```
+
+### type = is(request, types)
+
+`request` is the node HTTP request. `types` is an array of types.
+
+```js
+// req.headers.content-type = 'application/json'
+
+is(req, ['json']) // 'json'
+is(req, ['html', 'json']) // 'json'
+is(req, ['application/*']) // 'application/json'
+is(req, ['application/json']) // 'application/json'
+
+is(req, ['html']) // false
+```
+
+### type = is.is(mediaType, types)
+
+`mediaType` is the [media type](https://tools.ietf.org/html/rfc6838) string. `types` is an array of types.
+
+```js
+var mediaType = 'application/json'
+
+is.is(mediaType, ['json']) // 'json'
+is.is(mediaType, ['html', 'json']) // 'json'
+is.is(mediaType, ['application/*']) // 'application/json'
+is.is(mediaType, ['application/json']) // 'application/json'
+
+is.is(mediaType, ['html']) // false
+```
+
+### Each type can be:
+
+- An extension name such as `json`. This name will be returned if matched.
+- A mime type such as `application/json`.
+- A mime type with a wildcard such as `*/json` or `application/*`. The full mime type will be returned if matched
+- A suffix such as `+json`. This can be combined with a wildcard such as `*/vnd+json` or `application/*+json`. The full mime type will be returned if matched.
+
+`false` will be returned if no type matches.
+
+`null` will be returned if the request does not have a body.
+
+## Examples
+
+#### Example body parser
+
+```js
+var is = require('type-is');
+
+function bodyParser(req, res, next) {
+ if (!is.hasBody(req)) {
+ return next()
+ }
+
+ switch (is(req, ['urlencoded', 'json', 'multipart'])) {
+ case 'urlencoded':
+ // parse urlencoded body
+ throw new Error('implement urlencoded body parsing')
+ break
+ case 'json':
+ // parse json body
+ throw new Error('implement json body parsing')
+ break
+ case 'multipart':
+ // parse multipart body
+ throw new Error('implement multipart body parsing')
+ break
+ default:
+ // 415 error code
+ res.statusCode = 415
+ res.end()
+ return
+ }
+}
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/type-is.svg?style=flat
+[npm-url]: https://npmjs.org/package/type-is
+[node-version-image]: https://img.shields.io/node/v/type-is.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/type-is.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/type-is
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/type-is.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/type-is?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/type-is.svg?style=flat
+[downloads-url]: https://npmjs.org/package/type-is
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/index.js
new file mode 100644
index 0000000..73e885a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/index.js
@@ -0,0 +1,228 @@
+
+var typer = require('media-typer')
+var mime = require('mime-types')
+
+module.exports = typeofrequest;
+typeofrequest.is = typeis;
+typeofrequest.hasBody = hasbody;
+typeofrequest.normalize = normalize;
+typeofrequest.match = mimeMatch;
+
+/**
+ * Compare a `value` content-type with `types`.
+ * Each `type` can be an extension like `html`,
+ * a special shortcut like `multipart` or `urlencoded`,
+ * or a mime type.
+ *
+ * If no types match, `false` is returned.
+ * Otherwise, the first `type` that matches is returned.
+ *
+ * @param {String} value
+ * @param {Array} types
+ * @return String
+ */
+
+function typeis(value, types_) {
+ var i
+ var types = types_
+
+ // remove parameters and normalize
+ var val = typenormalize(value)
+
+ // no type or invalid
+ if (!val) {
+ return false
+ }
+
+ // support flattened arguments
+ if (types && !Array.isArray(types)) {
+ types = new Array(arguments.length - 1)
+ for (i = 0; i < types.length; i++) {
+ types[i] = arguments[i + 1]
+ }
+ }
+
+ // no types, return the content type
+ if (!types || !types.length) {
+ return val
+ }
+
+ var type
+ for (i = 0; i < types.length; i++) {
+ if (mimeMatch(normalize(type = types[i]), val)) {
+ return type[0] === '+' || ~type.indexOf('*')
+ ? val
+ : type
+ }
+ }
+
+ // no matches
+ return false;
+}
+
+/**
+ * Check if a request has a request body.
+ * A request with a body __must__ either have `transfer-encoding`
+ * or `content-length` headers set.
+ * http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3
+ *
+ * @param {Object} request
+ * @return {Boolean}
+ * @api public
+ */
+
+function hasbody(req) {
+ var headers = req.headers;
+ if ('transfer-encoding' in headers) return true;
+ return !isNaN(headers['content-length']);
+}
+
+/**
+ * Check if the incoming request contains the "Content-Type"
+ * header field, and it contains any of the give mime `type`s.
+ * If there is no request body, `null` is returned.
+ * If there is no content type, `false` is returned.
+ * Otherwise, it returns the first `type` that matches.
+ *
+ * Examples:
+ *
+ * // With Content-Type: text/html; charset=utf-8
+ * this.is('html'); // => 'html'
+ * this.is('text/html'); // => 'text/html'
+ * this.is('text/*', 'application/json'); // => 'text/html'
+ *
+ * // When Content-Type is application/json
+ * this.is('json', 'urlencoded'); // => 'json'
+ * this.is('application/json'); // => 'application/json'
+ * this.is('html', 'application/*'); // => 'application/json'
+ *
+ * this.is('html'); // => false
+ *
+ * @param {String|Array} types...
+ * @return {String|false|null}
+ * @api public
+ */
+
+function typeofrequest(req, types_) {
+ var types = types_
+
+ // no body
+ if (!hasbody(req)) {
+ return null
+ }
+
+ // support flattened arguments
+ if (arguments.length > 2) {
+ types = new Array(arguments.length - 1)
+ for (var i = 0; i < types.length; i++) {
+ types[i] = arguments[i + 1]
+ }
+ }
+
+ // request content type
+ var value = req.headers['content-type']
+
+ return typeis(value, types);
+}
+
+/**
+ * Normalize a mime type.
+ * If it's a shorthand, expand it to a valid mime type.
+ *
+ * In general, you probably want:
+ *
+ * var type = is(req, ['urlencoded', 'json', 'multipart']);
+ *
+ * Then use the appropriate body parsers.
+ * These three are the most common request body types
+ * and are thus ensured to work.
+ *
+ * @param {String} type
+ * @api private
+ */
+
+function normalize(type) {
+ switch (type) {
+ case 'urlencoded': return 'application/x-www-form-urlencoded';
+ case 'multipart':
+ type = 'multipart/*';
+ break;
+ }
+
+ return type[0] === '+' || ~type.indexOf('/')
+ ? type
+ : mime.lookup(type)
+}
+
+/**
+ * Check if `exected` mime type
+ * matches `actual` mime type with
+ * wildcard and +suffix support.
+ *
+ * @param {String} expected
+ * @param {String} actual
+ * @return {Boolean}
+ * @api private
+ */
+
+function mimeMatch(expected, actual) {
+ // invalid type
+ if (expected === false) {
+ return false
+ }
+
+ // exact match
+ if (expected === actual) {
+ return true
+ }
+
+ actual = actual.split('/');
+
+ if (expected[0] === '+') {
+ // support +suffix
+ return Boolean(actual[1])
+ && expected.length <= actual[1].length
+ && expected === actual[1].substr(0 - expected.length)
+ }
+
+ if (!~expected.indexOf('*')) return false;
+
+ expected = expected.split('/');
+
+ if (expected[0] === '*') {
+ // support */yyy
+ return expected[1] === actual[1]
+ }
+
+ if (expected[1] === '*') {
+ // support xxx/*
+ return expected[0] === actual[0]
+ }
+
+ if (expected[1][0] === '*' && expected[1][1] === '+') {
+ // support xxx/*+zzz
+ return expected[0] === actual[0]
+ && expected[1].length <= actual[1].length + 1
+ && expected[1].substr(1) === actual[1].substr(1 - expected[1].length)
+ }
+
+ return false
+}
+
+/**
+ * Normalize a type and remove parameters.
+ *
+ * @param {string} value
+ * @return {string}
+ * @api private
+ */
+
+function typenormalize(value) {
+ try {
+ var type = typer.parse(value)
+ delete type.parameters
+ return typer.format(type)
+ } catch (err) {
+ return null
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md
new file mode 100644
index 0000000..da8b3f8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md
@@ -0,0 +1,85 @@
+2.0.9 / 2015-02-09
+==================
+
+ * deps: mime-db@~1.7.0
+ - Add new mime types
+ - Community extensions ownership transferred from `node-mime`
+
+2.0.8 / 2015-01-29
+==================
+
+ * deps: mime-db@~1.6.0
+ - Add new mime types
+
+2.0.7 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.5.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+
+2.0.6 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.4.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+
+2.0.5 / 2014-12-29
+==================
+
+ * deps: mime-db@~1.3.1
+ - Fix missing extensions
+
+2.0.4 / 2014-12-10
+==================
+
+ * deps: mime-db@~1.3.0
+ - Add new mime types
+
+2.0.3 / 2014-11-09
+==================
+
+ * deps: mime-db@~1.2.0
+ - Add new mime types
+
+2.0.2 / 2014-09-28
+==================
+
+ * deps: mime-db@~1.1.0
+ - Add new mime types
+ - Add additional compressible
+ - Update charsets
+
+2.0.1 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+
+2.0.0 / 2014-09-02
+==================
+
+ * Use `mime-db`
+ * Remove `.define()`
+
+1.0.2 / 2014-08-04
+==================
+
+ * Set charset=utf-8 for `text/javascript`
+
+1.0.1 / 2014-06-24
+==================
+
+ * Add `text/jsx` type
+
+1.0.0 / 2014-05-12
+==================
+
+ * Return `false` for unknown types
+ * Set charset=utf-8 for `application/json`
+
+0.1.0 / 2014-05-02
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md
new file mode 100644
index 0000000..99d658b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md
@@ -0,0 +1,99 @@
+# mime-types
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+The ultimate javascript content-type utility.
+
+Similar to [node-mime](https://github.com/broofa/node-mime), except:
+
+- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`,
+ so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
+- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
+- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db)
+- No `.define()` functionality
+
+Otherwise, the API is compatible.
+
+## Install
+
+```sh
+$ npm install mime-types
+```
+
+## Adding Types
+
+All mime types are based on [mime-db](https://github.com/jshttp/mime-db),
+so open a PR there if you'd like to add mime types.
+
+## API
+
+```js
+var mime = require('mime-types')
+```
+
+All functions return `false` if input is invalid or not found.
+
+### mime.lookup(path)
+
+Lookup the content-type associated with a file.
+
+```js
+mime.lookup('json') // 'application/json'
+mime.lookup('.md') // 'text/x-markdown'
+mime.lookup('file.html') // 'text/html'
+mime.lookup('folder/file.js') // 'application/javascript'
+
+mime.lookup('cats') // false
+```
+
+### mime.contentType(type)
+
+Create a full content-type header given a content-type or extension.
+
+```js
+mime.contentType('markdown') // 'text/x-markdown; charset=utf-8'
+mime.contentType('file.json') // 'application/json; charset=utf-8'
+```
+
+### mime.extension(type)
+
+Get the default extension for a content-type.
+
+```js
+mime.extension('application/octet-stream') // 'bin'
+```
+
+### mime.charset(type)
+
+Lookup the implied default charset of a content-type.
+
+```js
+mime.charset('text/x-markdown') // 'UTF-8'
+```
+
+### var type = mime.types[extension]
+
+A map of content-types by extension.
+
+### [extensions...] = mime.extensions[type]
+
+A map of extensions by content-type.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/mime-types.svg?style=flat
+[npm-url]: https://npmjs.org/package/mime-types
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/mime-types.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/mime-types
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-types
+[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg?style=flat
+[downloads-url]: https://npmjs.org/package/mime-types
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js
new file mode 100644
index 0000000..b46a202
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js
@@ -0,0 +1,63 @@
+
+var db = require('mime-db')
+
+// types[extension] = type
+exports.types = Object.create(null)
+// extensions[type] = [extensions]
+exports.extensions = Object.create(null)
+
+Object.keys(db).forEach(function (name) {
+ var mime = db[name]
+ var exts = mime.extensions
+ if (!exts || !exts.length) return
+ exports.extensions[name] = exts
+ exts.forEach(function (ext) {
+ exports.types[ext] = name
+ })
+})
+
+exports.lookup = function (string) {
+ if (!string || typeof string !== "string") return false
+ // remove any leading paths, though we should just use path.basename
+ string = string.replace(/.*[\.\/\\]/, '').toLowerCase()
+ if (!string) return false
+ return exports.types[string] || false
+}
+
+exports.extension = function (type) {
+ if (!type || typeof type !== "string") return false
+ // to do: use media-typer
+ type = type.match(/^\s*([^;\s]*)(?:;|\s|$)/)
+ if (!type) return false
+ var exts = exports.extensions[type[1].toLowerCase()]
+ if (!exts || !exts.length) return false
+ return exts[0]
+}
+
+// type has to be an exact mime type
+exports.charset = function (type) {
+ var mime = db[type]
+ if (mime && mime.charset) return mime.charset
+
+ // default text/* to utf-8
+ if (/^text\//.test(type)) return 'UTF-8'
+
+ return false
+}
+
+// backwards compatibility
+exports.charsets = {
+ lookup: exports.charset
+}
+
+// to do: maybe use set-type module or something
+exports.contentType = function (type) {
+ if (!type || typeof type !== "string") return false
+ if (!~type.indexOf('/')) type = exports.lookup(type)
+ if (!type) return false
+ if (!~type.indexOf('charset')) {
+ var charset = exports.charset(type)
+ if (charset) type += '; charset=' + charset.toLowerCase()
+ }
+ return type
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md
new file mode 100644
index 0000000..e5ffba4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md
@@ -0,0 +1,166 @@
+1.7.0 / 2015-02-08
+==================
+
+ * Add `application/vnd.gerber`
+ * Add `application/vnd.msa-disk-image`
+
+1.6.1 / 2015-02-05
+==================
+
+ * Community extensions ownership transferred from `node-mime`
+
+1.6.0 / 2015-01-29
+==================
+
+ * Add `application/jose`
+ * Add `application/jose+json`
+ * Add `application/json-seq`
+ * Add `application/jwk+json`
+ * Add `application/jwk-set+json`
+ * Add `application/jwt`
+ * Add `application/rdap+json`
+ * Add `application/vnd.gov.sk.e-form+xml`
+ * Add `application/vnd.ims.imsccv1p3`
+
+1.5.0 / 2014-12-30
+==================
+
+ * Add `application/vnd.oracle.resource+json`
+ * Fix various invalid MIME type entries
+ - `application/mbox+xml`
+ - `application/oscp-response`
+ - `application/vwg-multiplexed`
+ - `audio/g721`
+
+1.4.0 / 2014-12-21
+==================
+
+ * Add `application/vnd.ims.imsccv1p2`
+ * Fix various invalid MIME type entries
+ - `application/vnd-acucobol`
+ - `application/vnd-curl`
+ - `application/vnd-dart`
+ - `application/vnd-dxr`
+ - `application/vnd-fdf`
+ - `application/vnd-mif`
+ - `application/vnd-sema`
+ - `application/vnd-wap-wmlc`
+ - `application/vnd.adobe.flash-movie`
+ - `application/vnd.dece-zip`
+ - `application/vnd.dvb_service`
+ - `application/vnd.micrografx-igx`
+ - `application/vnd.sealed-doc`
+ - `application/vnd.sealed-eml`
+ - `application/vnd.sealed-mht`
+ - `application/vnd.sealed-ppt`
+ - `application/vnd.sealed-tiff`
+ - `application/vnd.sealed-xls`
+ - `application/vnd.sealedmedia.softseal-html`
+ - `application/vnd.sealedmedia.softseal-pdf`
+ - `application/vnd.wap-slc`
+ - `application/vnd.wap-wbxml`
+ - `audio/vnd.sealedmedia.softseal-mpeg`
+ - `image/vnd-djvu`
+ - `image/vnd-svf`
+ - `image/vnd-wap-wbmp`
+ - `image/vnd.sealed-png`
+ - `image/vnd.sealedmedia.softseal-gif`
+ - `image/vnd.sealedmedia.softseal-jpg`
+ - `model/vnd-dwf`
+ - `model/vnd.parasolid.transmit-binary`
+ - `model/vnd.parasolid.transmit-text`
+ - `text/vnd-a`
+ - `text/vnd-curl`
+ - `text/vnd.wap-wml`
+ * Remove example template MIME types
+ - `application/example`
+ - `audio/example`
+ - `image/example`
+ - `message/example`
+ - `model/example`
+ - `multipart/example`
+ - `text/example`
+ - `video/example`
+
+1.3.1 / 2014-12-16
+==================
+
+ * Fix missing extensions
+ - `application/json5`
+ - `text/hjson`
+
+1.3.0 / 2014-12-07
+==================
+
+ * Add `application/a2l`
+ * Add `application/aml`
+ * Add `application/atfx`
+ * Add `application/atxml`
+ * Add `application/cdfx+xml`
+ * Add `application/dii`
+ * Add `application/json5`
+ * Add `application/lxf`
+ * Add `application/mf4`
+ * Add `application/vnd.apache.thrift.compact`
+ * Add `application/vnd.apache.thrift.json`
+ * Add `application/vnd.coffeescript`
+ * Add `application/vnd.enphase.envoy`
+ * Add `application/vnd.ims.imsccv1p1`
+ * Add `text/csv-schema`
+ * Add `text/hjson`
+ * Add `text/markdown`
+ * Add `text/yaml`
+
+1.2.0 / 2014-11-09
+==================
+
+ * Add `application/cea`
+ * Add `application/dit`
+ * Add `application/vnd.gov.sk.e-form+zip`
+ * Add `application/vnd.tmd.mediaflex.api+xml`
+ * Type `application/epub+zip` is now IANA-registered
+
+1.1.2 / 2014-10-23
+==================
+
+ * Rebuild database for `application/x-www-form-urlencoded` change
+
+1.1.1 / 2014-10-20
+==================
+
+ * Mark `application/x-www-form-urlencoded` as compressible.
+
+1.1.0 / 2014-09-28
+==================
+
+ * Add `application/font-woff2`
+
+1.0.3 / 2014-09-25
+==================
+
+ * Fix engine requirement in package
+
+1.0.2 / 2014-09-25
+==================
+
+ * Add `application/coap-group+json`
+ * Add `application/dcd`
+ * Add `application/vnd.apache.thrift.binary`
+ * Add `image/vnd.tencent.tap`
+ * Mark all JSON-derived types as compressible
+ * Update `text/vtt` data
+
+1.0.1 / 2014-08-30
+==================
+
+ * Fix extension ordering
+
+1.0.0 / 2014-08-30
+==================
+
+ * Add `application/atf`
+ * Add `application/merge-patch+json`
+ * Add `multipart/x-mixed-replace`
+ * Add `source: 'apache'` metadata
+ * Add `source: 'iana'` metadata
+ * Remove badly-assumed charset data
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md
new file mode 100644
index 0000000..1dde234
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md
@@ -0,0 +1,76 @@
+# mime-db
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+
+This is a database of all mime types.
+It consists of a single, public JSON file and does not include any logic,
+allowing it to remain as un-opinionated as possible with an API.
+It aggregates data from the following sources:
+
+- http://www.iana.org/assignments/media-types/media-types.xhtml
+- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
+
+## Installation
+
+```bash
+npm install mime-db
+```
+
+If you're crazy enough to use this in the browser,
+you can just grab the JSON file:
+
+```
+https://cdn.rawgit.com/jshttp/mime-db/master/db.json
+```
+
+## Usage
+
+```js
+var db = require('mime-db');
+
+// grab data on .js files
+var data = db['application/javascript'];
+```
+
+## Data Structure
+
+The JSON file is a map lookup for lowercased mime types.
+Each mime type has the following properties:
+
+- `.source` - where the mime type is defined.
+ If not set, it's probably a custom media type.
+ - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
+ - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
+- `.extensions[]` - known extensions associated with this mime type.
+- `.compressible` - whether a file of this type is can be gzipped.
+- `.charset` - the default charset associated with this type, if any.
+
+If unknown, every property could be `undefined`.
+
+## Contributing
+
+To edit the database, only make PRs against `src/custom.json` or
+`src/custom-suffix.json`.
+
+To update the build, run `npm run update`.
+
+## Adding Custom Media Types
+
+The best way to get new media types included in this library is to register
+them with the IANA. The community registration procedure is outlined in
+[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
+registered with the IANA are automatically pulled into this library.
+
+[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg?style=flat
+[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg?style=flat
+[npm-url]: https://npmjs.org/package/mime-db
+[travis-image]: https://img.shields.io/travis/jshttp/mime-db.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/mime-db
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master
+[node-image]: https://img.shields.io/node/v/mime-db.svg?style=flat
+[node-url]: http://nodejs.org/download/
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json
new file mode 100644
index 0000000..283c1de
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json
@@ -0,0 +1,6299 @@
+{
+ "application/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "application/3gpdash-qoe-report+xml": {
+ "source": "iana"
+ },
+ "application/3gpp-ims+xml": {
+ "source": "iana"
+ },
+ "application/a2l": {
+ "source": "iana"
+ },
+ "application/activemessage": {
+ "source": "iana"
+ },
+ "application/alto-costmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-costmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-directory+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcost+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcostparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointprop+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointpropparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-error+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/aml": {
+ "source": "iana"
+ },
+ "application/andrew-inset": {
+ "source": "iana",
+ "extensions": ["ez"]
+ },
+ "application/applefile": {
+ "source": "iana"
+ },
+ "application/applixware": {
+ "source": "apache",
+ "extensions": ["aw"]
+ },
+ "application/atf": {
+ "source": "iana"
+ },
+ "application/atfx": {
+ "source": "iana"
+ },
+ "application/atom+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["atom"]
+ },
+ "application/atomcat+xml": {
+ "source": "iana",
+ "extensions": ["atomcat"]
+ },
+ "application/atomdeleted+xml": {
+ "source": "iana"
+ },
+ "application/atomicmail": {
+ "source": "iana"
+ },
+ "application/atomsvc+xml": {
+ "source": "iana",
+ "extensions": ["atomsvc"]
+ },
+ "application/atxml": {
+ "source": "iana"
+ },
+ "application/auth-policy+xml": {
+ "source": "iana"
+ },
+ "application/bacnet-xdd+zip": {
+ "source": "iana"
+ },
+ "application/batch-smtp": {
+ "source": "iana"
+ },
+ "application/beep+xml": {
+ "source": "iana"
+ },
+ "application/calendar+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/calendar+xml": {
+ "source": "iana"
+ },
+ "application/call-completion": {
+ "source": "iana"
+ },
+ "application/cals-1840": {
+ "source": "iana"
+ },
+ "application/cbor": {
+ "source": "iana"
+ },
+ "application/ccmp+xml": {
+ "source": "iana"
+ },
+ "application/ccxml+xml": {
+ "source": "iana",
+ "extensions": ["ccxml"]
+ },
+ "application/cdfx+xml": {
+ "source": "iana"
+ },
+ "application/cdmi-capability": {
+ "source": "iana",
+ "extensions": ["cdmia"]
+ },
+ "application/cdmi-container": {
+ "source": "iana",
+ "extensions": ["cdmic"]
+ },
+ "application/cdmi-domain": {
+ "source": "iana",
+ "extensions": ["cdmid"]
+ },
+ "application/cdmi-object": {
+ "source": "iana",
+ "extensions": ["cdmio"]
+ },
+ "application/cdmi-queue": {
+ "source": "iana",
+ "extensions": ["cdmiq"]
+ },
+ "application/cea": {
+ "source": "iana"
+ },
+ "application/cea-2018+xml": {
+ "source": "iana"
+ },
+ "application/cellml+xml": {
+ "source": "iana"
+ },
+ "application/cfw": {
+ "source": "iana"
+ },
+ "application/cms": {
+ "source": "iana"
+ },
+ "application/cnrp+xml": {
+ "source": "iana"
+ },
+ "application/coap-group+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/commonground": {
+ "source": "iana"
+ },
+ "application/conference-info+xml": {
+ "source": "iana"
+ },
+ "application/cpl+xml": {
+ "source": "iana"
+ },
+ "application/csrattrs": {
+ "source": "iana"
+ },
+ "application/csta+xml": {
+ "source": "iana"
+ },
+ "application/cstadata+xml": {
+ "source": "iana"
+ },
+ "application/cu-seeme": {
+ "source": "apache",
+ "extensions": ["cu"]
+ },
+ "application/cybercash": {
+ "source": "iana"
+ },
+ "application/dart": {
+ "compressible": true
+ },
+ "application/dash+xml": {
+ "source": "iana",
+ "extensions": ["mdp"]
+ },
+ "application/dashdelta": {
+ "source": "iana"
+ },
+ "application/davmount+xml": {
+ "source": "iana",
+ "extensions": ["davmount"]
+ },
+ "application/dca-rft": {
+ "source": "iana"
+ },
+ "application/dcd": {
+ "source": "iana"
+ },
+ "application/dec-dx": {
+ "source": "iana"
+ },
+ "application/dialog-info+xml": {
+ "source": "iana"
+ },
+ "application/dicom": {
+ "source": "iana"
+ },
+ "application/dii": {
+ "source": "iana"
+ },
+ "application/dit": {
+ "source": "iana"
+ },
+ "application/dns": {
+ "source": "iana"
+ },
+ "application/docbook+xml": {
+ "source": "apache",
+ "extensions": ["dbk"]
+ },
+ "application/dskpp+xml": {
+ "source": "iana"
+ },
+ "application/dssc+der": {
+ "source": "iana",
+ "extensions": ["dssc"]
+ },
+ "application/dssc+xml": {
+ "source": "iana",
+ "extensions": ["xdssc"]
+ },
+ "application/dvcs": {
+ "source": "iana"
+ },
+ "application/ecmascript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ecma"]
+ },
+ "application/edi-consent": {
+ "source": "iana"
+ },
+ "application/edi-x12": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/edifact": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/emma+xml": {
+ "source": "iana",
+ "extensions": ["emma"]
+ },
+ "application/emotionml+xml": {
+ "source": "iana"
+ },
+ "application/encaprtp": {
+ "source": "iana"
+ },
+ "application/epp+xml": {
+ "source": "iana"
+ },
+ "application/epub+zip": {
+ "source": "iana",
+ "extensions": ["epub"]
+ },
+ "application/eshop": {
+ "source": "iana"
+ },
+ "application/exi": {
+ "source": "iana",
+ "extensions": ["exi"]
+ },
+ "application/fastinfoset": {
+ "source": "iana"
+ },
+ "application/fastsoap": {
+ "source": "iana"
+ },
+ "application/fdt+xml": {
+ "source": "iana"
+ },
+ "application/fits": {
+ "source": "iana"
+ },
+ "application/font-sfnt": {
+ "source": "iana"
+ },
+ "application/font-tdpfr": {
+ "source": "iana",
+ "extensions": ["pfr"]
+ },
+ "application/font-woff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["woff"]
+ },
+ "application/font-woff2": {
+ "compressible": false,
+ "extensions": ["woff2"]
+ },
+ "application/framework-attributes+xml": {
+ "source": "iana"
+ },
+ "application/gml+xml": {
+ "source": "apache",
+ "extensions": ["gml"]
+ },
+ "application/gpx+xml": {
+ "source": "apache",
+ "extensions": ["gpx"]
+ },
+ "application/gxf": {
+ "source": "apache",
+ "extensions": ["gxf"]
+ },
+ "application/gzip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/h224": {
+ "source": "iana"
+ },
+ "application/held+xml": {
+ "source": "iana"
+ },
+ "application/http": {
+ "source": "iana"
+ },
+ "application/hyperstudio": {
+ "source": "iana",
+ "extensions": ["stk"]
+ },
+ "application/ibe-key-request+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pkg-reply+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pp-data": {
+ "source": "iana"
+ },
+ "application/iges": {
+ "source": "iana"
+ },
+ "application/im-iscomposing+xml": {
+ "source": "iana"
+ },
+ "application/index": {
+ "source": "iana"
+ },
+ "application/index.cmd": {
+ "source": "iana"
+ },
+ "application/index.obj": {
+ "source": "iana"
+ },
+ "application/index.response": {
+ "source": "iana"
+ },
+ "application/index.vnd": {
+ "source": "iana"
+ },
+ "application/inkml+xml": {
+ "source": "iana",
+ "extensions": ["ink","inkml"]
+ },
+ "application/iotp": {
+ "source": "iana"
+ },
+ "application/ipfix": {
+ "source": "iana",
+ "extensions": ["ipfix"]
+ },
+ "application/ipp": {
+ "source": "iana"
+ },
+ "application/isup": {
+ "source": "iana"
+ },
+ "application/its+xml": {
+ "source": "iana"
+ },
+ "application/java-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jar"]
+ },
+ "application/java-serialized-object": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ser"]
+ },
+ "application/java-vm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["class"]
+ },
+ "application/javascript": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["js"]
+ },
+ "application/jose": {
+ "source": "iana"
+ },
+ "application/jose+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jrd+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["json","map"]
+ },
+ "application/json-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json-seq": {
+ "source": "iana"
+ },
+ "application/json5": {
+ "extensions": ["json5"]
+ },
+ "application/jsonml+json": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["jsonml"]
+ },
+ "application/jwk+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwk-set+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwt": {
+ "source": "iana"
+ },
+ "application/kpml-request+xml": {
+ "source": "iana"
+ },
+ "application/kpml-response+xml": {
+ "source": "iana"
+ },
+ "application/ld+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/link-format": {
+ "source": "iana"
+ },
+ "application/load-control+xml": {
+ "source": "iana"
+ },
+ "application/lost+xml": {
+ "source": "iana",
+ "extensions": ["lostxml"]
+ },
+ "application/lostsync+xml": {
+ "source": "iana"
+ },
+ "application/lxf": {
+ "source": "iana"
+ },
+ "application/mac-binhex40": {
+ "source": "iana",
+ "extensions": ["hqx"]
+ },
+ "application/mac-compactpro": {
+ "source": "apache",
+ "extensions": ["cpt"]
+ },
+ "application/macwriteii": {
+ "source": "iana"
+ },
+ "application/mads+xml": {
+ "source": "iana",
+ "extensions": ["mads"]
+ },
+ "application/marc": {
+ "source": "iana",
+ "extensions": ["mrc"]
+ },
+ "application/marcxml+xml": {
+ "source": "iana",
+ "extensions": ["mrcx"]
+ },
+ "application/mathematica": {
+ "source": "iana",
+ "extensions": ["ma","nb","mb"]
+ },
+ "application/mathml+xml": {
+ "source": "iana",
+ "extensions": ["mathml"]
+ },
+ "application/mathml-content+xml": {
+ "source": "iana"
+ },
+ "application/mathml-presentation+xml": {
+ "source": "iana"
+ },
+ "application/mbms-associated-procedure-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-deregister+xml": {
+ "source": "iana"
+ },
+ "application/mbms-envelope+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-protection-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-reception-report+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-schedule+xml": {
+ "source": "iana"
+ },
+ "application/mbms-user-service-description+xml": {
+ "source": "iana"
+ },
+ "application/mbox": {
+ "source": "iana",
+ "extensions": ["mbox"]
+ },
+ "application/media-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/media_control+xml": {
+ "source": "iana"
+ },
+ "application/mediaservercontrol+xml": {
+ "source": "iana",
+ "extensions": ["mscml"]
+ },
+ "application/merge-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/metalink+xml": {
+ "source": "apache",
+ "extensions": ["metalink"]
+ },
+ "application/metalink4+xml": {
+ "source": "iana",
+ "extensions": ["meta4"]
+ },
+ "application/mets+xml": {
+ "source": "iana",
+ "extensions": ["mets"]
+ },
+ "application/mf4": {
+ "source": "iana"
+ },
+ "application/mikey": {
+ "source": "iana"
+ },
+ "application/mods+xml": {
+ "source": "iana",
+ "extensions": ["mods"]
+ },
+ "application/moss-keys": {
+ "source": "iana"
+ },
+ "application/moss-signature": {
+ "source": "iana"
+ },
+ "application/mosskey-data": {
+ "source": "iana"
+ },
+ "application/mosskey-request": {
+ "source": "iana"
+ },
+ "application/mp21": {
+ "source": "iana",
+ "extensions": ["m21","mp21"]
+ },
+ "application/mp4": {
+ "source": "iana",
+ "extensions": ["mp4s","m4p"]
+ },
+ "application/mpeg4-generic": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod-xmt": {
+ "source": "iana"
+ },
+ "application/mrb-consumer+xml": {
+ "source": "iana"
+ },
+ "application/mrb-publish+xml": {
+ "source": "iana"
+ },
+ "application/msc-ivr+xml": {
+ "source": "iana"
+ },
+ "application/msc-mixer+xml": {
+ "source": "iana"
+ },
+ "application/msword": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["doc","dot"]
+ },
+ "application/mxf": {
+ "source": "iana",
+ "extensions": ["mxf"]
+ },
+ "application/nasdata": {
+ "source": "iana"
+ },
+ "application/news-checkgroups": {
+ "source": "iana"
+ },
+ "application/news-groupinfo": {
+ "source": "iana"
+ },
+ "application/news-transmission": {
+ "source": "iana"
+ },
+ "application/nlsml+xml": {
+ "source": "iana"
+ },
+ "application/nss": {
+ "source": "iana"
+ },
+ "application/ocsp-request": {
+ "source": "iana"
+ },
+ "application/ocsp-response": {
+ "source": "iana"
+ },
+ "application/octet-stream": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","buffer"]
+ },
+ "application/oda": {
+ "source": "iana",
+ "extensions": ["oda"]
+ },
+ "application/odx": {
+ "source": "iana"
+ },
+ "application/oebps-package+xml": {
+ "source": "iana",
+ "extensions": ["opf"]
+ },
+ "application/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ogx"]
+ },
+ "application/omdoc+xml": {
+ "source": "apache",
+ "extensions": ["omdoc"]
+ },
+ "application/onenote": {
+ "source": "apache",
+ "extensions": ["onetoc","onetoc2","onetmp","onepkg"]
+ },
+ "application/oxps": {
+ "source": "iana",
+ "extensions": ["oxps"]
+ },
+ "application/p2p-overlay+xml": {
+ "source": "iana"
+ },
+ "application/parityfec": {
+ "source": "iana"
+ },
+ "application/patch-ops-error+xml": {
+ "source": "iana",
+ "extensions": ["xer"]
+ },
+ "application/pdf": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pdf"]
+ },
+ "application/pdx": {
+ "source": "iana"
+ },
+ "application/pgp-encrypted": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pgp"]
+ },
+ "application/pgp-keys": {
+ "source": "iana"
+ },
+ "application/pgp-signature": {
+ "source": "iana",
+ "extensions": ["asc","sig"]
+ },
+ "application/pics-rules": {
+ "source": "apache",
+ "extensions": ["prf"]
+ },
+ "application/pidf+xml": {
+ "source": "iana"
+ },
+ "application/pidf-diff+xml": {
+ "source": "iana"
+ },
+ "application/pkcs10": {
+ "source": "iana",
+ "extensions": ["p10"]
+ },
+ "application/pkcs7-mime": {
+ "source": "iana",
+ "extensions": ["p7m","p7c"]
+ },
+ "application/pkcs7-signature": {
+ "source": "iana",
+ "extensions": ["p7s"]
+ },
+ "application/pkcs8": {
+ "source": "iana",
+ "extensions": ["p8"]
+ },
+ "application/pkix-attr-cert": {
+ "source": "iana",
+ "extensions": ["ac"]
+ },
+ "application/pkix-cert": {
+ "source": "iana",
+ "extensions": ["cer"]
+ },
+ "application/pkix-crl": {
+ "source": "iana",
+ "extensions": ["crl"]
+ },
+ "application/pkix-pkipath": {
+ "source": "iana",
+ "extensions": ["pkipath"]
+ },
+ "application/pkixcmp": {
+ "source": "iana",
+ "extensions": ["pki"]
+ },
+ "application/pls+xml": {
+ "source": "iana",
+ "extensions": ["pls"]
+ },
+ "application/poc-settings+xml": {
+ "source": "iana"
+ },
+ "application/postscript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ai","eps","ps"]
+ },
+ "application/provenance+xml": {
+ "source": "iana"
+ },
+ "application/prs.alvestrand.titrax-sheet": {
+ "source": "iana"
+ },
+ "application/prs.cww": {
+ "source": "iana",
+ "extensions": ["cww"]
+ },
+ "application/prs.hpub+zip": {
+ "source": "iana"
+ },
+ "application/prs.nprend": {
+ "source": "iana"
+ },
+ "application/prs.plucker": {
+ "source": "iana"
+ },
+ "application/prs.rdf-xml-crypt": {
+ "source": "iana"
+ },
+ "application/prs.xsf+xml": {
+ "source": "iana"
+ },
+ "application/pskc+xml": {
+ "source": "iana",
+ "extensions": ["pskcxml"]
+ },
+ "application/qsig": {
+ "source": "iana"
+ },
+ "application/raptorfec": {
+ "source": "iana"
+ },
+ "application/rdap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/rdf+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rdf"]
+ },
+ "application/reginfo+xml": {
+ "source": "iana",
+ "extensions": ["rif"]
+ },
+ "application/relax-ng-compact-syntax": {
+ "source": "iana",
+ "extensions": ["rnc"]
+ },
+ "application/remote-printing": {
+ "source": "iana"
+ },
+ "application/reputon+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/resource-lists+xml": {
+ "source": "iana",
+ "extensions": ["rl"]
+ },
+ "application/resource-lists-diff+xml": {
+ "source": "iana",
+ "extensions": ["rld"]
+ },
+ "application/riscos": {
+ "source": "iana"
+ },
+ "application/rlmi+xml": {
+ "source": "iana"
+ },
+ "application/rls-services+xml": {
+ "source": "iana",
+ "extensions": ["rs"]
+ },
+ "application/rpki-ghostbusters": {
+ "source": "iana",
+ "extensions": ["gbr"]
+ },
+ "application/rpki-manifest": {
+ "source": "iana",
+ "extensions": ["mft"]
+ },
+ "application/rpki-roa": {
+ "source": "iana",
+ "extensions": ["roa"]
+ },
+ "application/rpki-updown": {
+ "source": "iana"
+ },
+ "application/rsd+xml": {
+ "source": "apache",
+ "extensions": ["rsd"]
+ },
+ "application/rss+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["rss"]
+ },
+ "application/rtf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtf"]
+ },
+ "application/rtploopback": {
+ "source": "iana"
+ },
+ "application/rtx": {
+ "source": "iana"
+ },
+ "application/samlassertion+xml": {
+ "source": "iana"
+ },
+ "application/samlmetadata+xml": {
+ "source": "iana"
+ },
+ "application/sbml+xml": {
+ "source": "iana",
+ "extensions": ["sbml"]
+ },
+ "application/scaip+xml": {
+ "source": "iana"
+ },
+ "application/scvp-cv-request": {
+ "source": "iana",
+ "extensions": ["scq"]
+ },
+ "application/scvp-cv-response": {
+ "source": "iana",
+ "extensions": ["scs"]
+ },
+ "application/scvp-vp-request": {
+ "source": "iana",
+ "extensions": ["spq"]
+ },
+ "application/scvp-vp-response": {
+ "source": "iana",
+ "extensions": ["spp"]
+ },
+ "application/sdp": {
+ "source": "iana",
+ "extensions": ["sdp"]
+ },
+ "application/sep+xml": {
+ "source": "iana"
+ },
+ "application/sep-exi": {
+ "source": "iana"
+ },
+ "application/session-info": {
+ "source": "iana"
+ },
+ "application/set-payment": {
+ "source": "iana"
+ },
+ "application/set-payment-initiation": {
+ "source": "iana",
+ "extensions": ["setpay"]
+ },
+ "application/set-registration": {
+ "source": "iana"
+ },
+ "application/set-registration-initiation": {
+ "source": "iana",
+ "extensions": ["setreg"]
+ },
+ "application/sgml": {
+ "source": "iana"
+ },
+ "application/sgml-open-catalog": {
+ "source": "iana"
+ },
+ "application/shf+xml": {
+ "source": "iana",
+ "extensions": ["shf"]
+ },
+ "application/sieve": {
+ "source": "iana"
+ },
+ "application/simple-filter+xml": {
+ "source": "iana"
+ },
+ "application/simple-message-summary": {
+ "source": "iana"
+ },
+ "application/simplesymbolcontainer": {
+ "source": "iana"
+ },
+ "application/slate": {
+ "source": "iana"
+ },
+ "application/smil": {
+ "source": "iana"
+ },
+ "application/smil+xml": {
+ "source": "iana",
+ "extensions": ["smi","smil"]
+ },
+ "application/smpte336m": {
+ "source": "iana"
+ },
+ "application/soap+fastinfoset": {
+ "source": "iana"
+ },
+ "application/soap+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/sparql-query": {
+ "source": "iana",
+ "extensions": ["rq"]
+ },
+ "application/sparql-results+xml": {
+ "source": "iana",
+ "extensions": ["srx"]
+ },
+ "application/spirits-event+xml": {
+ "source": "iana"
+ },
+ "application/sql": {
+ "source": "iana"
+ },
+ "application/srgs": {
+ "source": "iana",
+ "extensions": ["gram"]
+ },
+ "application/srgs+xml": {
+ "source": "iana",
+ "extensions": ["grxml"]
+ },
+ "application/sru+xml": {
+ "source": "iana",
+ "extensions": ["sru"]
+ },
+ "application/ssdl+xml": {
+ "source": "apache",
+ "extensions": ["ssdl"]
+ },
+ "application/ssml+xml": {
+ "source": "iana",
+ "extensions": ["ssml"]
+ },
+ "application/tamp-apex-update": {
+ "source": "iana"
+ },
+ "application/tamp-apex-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-community-update": {
+ "source": "iana"
+ },
+ "application/tamp-community-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-error": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-status-query": {
+ "source": "iana"
+ },
+ "application/tamp-status-response": {
+ "source": "iana"
+ },
+ "application/tamp-update": {
+ "source": "iana"
+ },
+ "application/tamp-update-confirm": {
+ "source": "iana"
+ },
+ "application/tar": {
+ "compressible": true
+ },
+ "application/tei+xml": {
+ "source": "iana",
+ "extensions": ["tei","teicorpus"]
+ },
+ "application/thraud+xml": {
+ "source": "iana",
+ "extensions": ["tfi"]
+ },
+ "application/timestamp-query": {
+ "source": "iana"
+ },
+ "application/timestamp-reply": {
+ "source": "iana"
+ },
+ "application/timestamped-data": {
+ "source": "iana",
+ "extensions": ["tsd"]
+ },
+ "application/ttml+xml": {
+ "source": "iana"
+ },
+ "application/tve-trigger": {
+ "source": "iana"
+ },
+ "application/ulpfec": {
+ "source": "iana"
+ },
+ "application/urc-grpsheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-ressheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-targetdesc+xml": {
+ "source": "iana"
+ },
+ "application/urc-uisocketdesc+xml": {
+ "source": "iana"
+ },
+ "application/vcard+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vcard+xml": {
+ "source": "iana"
+ },
+ "application/vemmi": {
+ "source": "iana"
+ },
+ "application/vividence.scriptfile": {
+ "source": "apache"
+ },
+ "application/vnd.3gpp.bsf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.pic-bw-large": {
+ "source": "iana",
+ "extensions": ["plb"]
+ },
+ "application/vnd.3gpp.pic-bw-small": {
+ "source": "iana",
+ "extensions": ["psb"]
+ },
+ "application/vnd.3gpp.pic-bw-var": {
+ "source": "iana",
+ "extensions": ["pvb"]
+ },
+ "application/vnd.3gpp.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.bcmcsinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.tcap": {
+ "source": "iana",
+ "extensions": ["tcap"]
+ },
+ "application/vnd.3m.post-it-notes": {
+ "source": "iana",
+ "extensions": ["pwn"]
+ },
+ "application/vnd.accpac.simply.aso": {
+ "source": "iana",
+ "extensions": ["aso"]
+ },
+ "application/vnd.accpac.simply.imp": {
+ "source": "iana",
+ "extensions": ["imp"]
+ },
+ "application/vnd.acucobol": {
+ "source": "iana",
+ "extensions": ["acu"]
+ },
+ "application/vnd.acucorp": {
+ "source": "iana",
+ "extensions": ["atc","acutc"]
+ },
+ "application/vnd.adobe.air-application-installer-package+zip": {
+ "source": "apache",
+ "extensions": ["air"]
+ },
+ "application/vnd.adobe.flash.movie": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.formscentral.fcdt": {
+ "source": "iana",
+ "extensions": ["fcdt"]
+ },
+ "application/vnd.adobe.fxp": {
+ "source": "iana",
+ "extensions": ["fxp","fxpl"]
+ },
+ "application/vnd.adobe.partial-upload": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.xdp+xml": {
+ "source": "iana",
+ "extensions": ["xdp"]
+ },
+ "application/vnd.adobe.xfdf": {
+ "source": "iana",
+ "extensions": ["xfdf"]
+ },
+ "application/vnd.aether.imp": {
+ "source": "iana"
+ },
+ "application/vnd.ah-barcode": {
+ "source": "iana"
+ },
+ "application/vnd.ahead.space": {
+ "source": "iana",
+ "extensions": ["ahead"]
+ },
+ "application/vnd.airzip.filesecure.azf": {
+ "source": "iana",
+ "extensions": ["azf"]
+ },
+ "application/vnd.airzip.filesecure.azs": {
+ "source": "iana",
+ "extensions": ["azs"]
+ },
+ "application/vnd.amazon.ebook": {
+ "source": "apache",
+ "extensions": ["azw"]
+ },
+ "application/vnd.americandynamics.acc": {
+ "source": "iana",
+ "extensions": ["acc"]
+ },
+ "application/vnd.amiga.ami": {
+ "source": "iana",
+ "extensions": ["ami"]
+ },
+ "application/vnd.amundsen.maze+xml": {
+ "source": "iana"
+ },
+ "application/vnd.android.package-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["apk"]
+ },
+ "application/vnd.anser-web-certificate-issue-initiation": {
+ "source": "iana",
+ "extensions": ["cii"]
+ },
+ "application/vnd.anser-web-funds-transfer-initiation": {
+ "source": "apache",
+ "extensions": ["fti"]
+ },
+ "application/vnd.antix.game-component": {
+ "source": "iana",
+ "extensions": ["atx"]
+ },
+ "application/vnd.apache.thrift.binary": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.compact": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.json": {
+ "source": "iana"
+ },
+ "application/vnd.api+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.apple.installer+xml": {
+ "source": "iana",
+ "extensions": ["mpkg"]
+ },
+ "application/vnd.apple.mpegurl": {
+ "source": "iana",
+ "extensions": ["m3u8"]
+ },
+ "application/vnd.arastra.swi": {
+ "source": "iana"
+ },
+ "application/vnd.aristanetworks.swi": {
+ "source": "iana",
+ "extensions": ["swi"]
+ },
+ "application/vnd.artsquare": {
+ "source": "iana"
+ },
+ "application/vnd.astraea-software.iota": {
+ "source": "iana",
+ "extensions": ["iota"]
+ },
+ "application/vnd.audiograph": {
+ "source": "iana",
+ "extensions": ["aep"]
+ },
+ "application/vnd.autopackage": {
+ "source": "iana"
+ },
+ "application/vnd.avistar+xml": {
+ "source": "iana"
+ },
+ "application/vnd.balsamiq.bmml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.bekitzur-stech+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.blueice.multipass": {
+ "source": "iana",
+ "extensions": ["mpm"]
+ },
+ "application/vnd.bluetooth.ep.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bluetooth.le.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bmi": {
+ "source": "iana",
+ "extensions": ["bmi"]
+ },
+ "application/vnd.businessobjects": {
+ "source": "iana",
+ "extensions": ["rep"]
+ },
+ "application/vnd.cab-jscript": {
+ "source": "iana"
+ },
+ "application/vnd.canon-cpdl": {
+ "source": "iana"
+ },
+ "application/vnd.canon-lips": {
+ "source": "iana"
+ },
+ "application/vnd.cendio.thinlinc.clientconf": {
+ "source": "iana"
+ },
+ "application/vnd.century-systems.tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.chemdraw+xml": {
+ "source": "iana",
+ "extensions": ["cdxml"]
+ },
+ "application/vnd.chipnuts.karaoke-mmd": {
+ "source": "iana",
+ "extensions": ["mmd"]
+ },
+ "application/vnd.cinderella": {
+ "source": "iana",
+ "extensions": ["cdy"]
+ },
+ "application/vnd.cirpack.isdn-ext": {
+ "source": "iana"
+ },
+ "application/vnd.claymore": {
+ "source": "iana",
+ "extensions": ["cla"]
+ },
+ "application/vnd.cloanto.rp9": {
+ "source": "iana",
+ "extensions": ["rp9"]
+ },
+ "application/vnd.clonk.c4group": {
+ "source": "iana",
+ "extensions": ["c4g","c4d","c4f","c4p","c4u"]
+ },
+ "application/vnd.cluetrust.cartomobile-config": {
+ "source": "iana",
+ "extensions": ["c11amc"]
+ },
+ "application/vnd.cluetrust.cartomobile-config-pkg": {
+ "source": "iana",
+ "extensions": ["c11amz"]
+ },
+ "application/vnd.coffeescript": {
+ "source": "iana"
+ },
+ "application/vnd.collection+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.doc+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.next+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.commerce-battelle": {
+ "source": "iana"
+ },
+ "application/vnd.commonspace": {
+ "source": "iana",
+ "extensions": ["csp"]
+ },
+ "application/vnd.contact.cmsg": {
+ "source": "iana",
+ "extensions": ["cdbcmsg"]
+ },
+ "application/vnd.cosmocaller": {
+ "source": "iana",
+ "extensions": ["cmc"]
+ },
+ "application/vnd.crick.clicker": {
+ "source": "iana",
+ "extensions": ["clkx"]
+ },
+ "application/vnd.crick.clicker.keyboard": {
+ "source": "iana",
+ "extensions": ["clkk"]
+ },
+ "application/vnd.crick.clicker.palette": {
+ "source": "iana",
+ "extensions": ["clkp"]
+ },
+ "application/vnd.crick.clicker.template": {
+ "source": "iana",
+ "extensions": ["clkt"]
+ },
+ "application/vnd.crick.clicker.wordbank": {
+ "source": "iana",
+ "extensions": ["clkw"]
+ },
+ "application/vnd.criticaltools.wbs+xml": {
+ "source": "iana",
+ "extensions": ["wbs"]
+ },
+ "application/vnd.ctc-posml": {
+ "source": "iana",
+ "extensions": ["pml"]
+ },
+ "application/vnd.ctct.ws+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cups-pdf": {
+ "source": "iana"
+ },
+ "application/vnd.cups-postscript": {
+ "source": "iana"
+ },
+ "application/vnd.cups-ppd": {
+ "source": "iana",
+ "extensions": ["ppd"]
+ },
+ "application/vnd.cups-raster": {
+ "source": "iana"
+ },
+ "application/vnd.cups-raw": {
+ "source": "iana"
+ },
+ "application/vnd.curl": {
+ "source": "iana"
+ },
+ "application/vnd.curl.car": {
+ "source": "apache",
+ "extensions": ["car"]
+ },
+ "application/vnd.curl.pcurl": {
+ "source": "apache",
+ "extensions": ["pcurl"]
+ },
+ "application/vnd.cyan.dean.root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cybank": {
+ "source": "iana"
+ },
+ "application/vnd.dart": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dart"]
+ },
+ "application/vnd.data-vision.rdz": {
+ "source": "iana",
+ "extensions": ["rdz"]
+ },
+ "application/vnd.debian.binary-package": {
+ "source": "iana"
+ },
+ "application/vnd.dece.data": {
+ "source": "iana",
+ "extensions": ["uvf","uvvf","uvd","uvvd"]
+ },
+ "application/vnd.dece.ttml+xml": {
+ "source": "iana",
+ "extensions": ["uvt","uvvt"]
+ },
+ "application/vnd.dece.unspecified": {
+ "source": "iana",
+ "extensions": ["uvx","uvvx"]
+ },
+ "application/vnd.dece.zip": {
+ "source": "iana",
+ "extensions": ["uvz","uvvz"]
+ },
+ "application/vnd.denovo.fcselayout-link": {
+ "source": "iana",
+ "extensions": ["fe_launch"]
+ },
+ "application/vnd.desmume-movie": {
+ "source": "iana"
+ },
+ "application/vnd.dir-bi.plate-dl-nosuffix": {
+ "source": "iana"
+ },
+ "application/vnd.dm.delegation+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dna": {
+ "source": "iana",
+ "extensions": ["dna"]
+ },
+ "application/vnd.document+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dolby.mlp": {
+ "source": "apache",
+ "extensions": ["mlp"]
+ },
+ "application/vnd.dolby.mobile.1": {
+ "source": "iana"
+ },
+ "application/vnd.dolby.mobile.2": {
+ "source": "iana"
+ },
+ "application/vnd.doremir.scorecloud-binary-document": {
+ "source": "iana"
+ },
+ "application/vnd.dpgraph": {
+ "source": "iana",
+ "extensions": ["dpg"]
+ },
+ "application/vnd.dreamfactory": {
+ "source": "iana",
+ "extensions": ["dfac"]
+ },
+ "application/vnd.ds-keypoint": {
+ "source": "apache",
+ "extensions": ["kpxx"]
+ },
+ "application/vnd.dtg.local": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.flash": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.html": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ait": {
+ "source": "iana",
+ "extensions": ["ait"]
+ },
+ "application/vnd.dvb.dvbj": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.esgcontainer": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcdftnotifaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess2": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgpdd": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcroaming": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-base": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-enhancement": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-aggregate-root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-container+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-generic+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-msglist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-response+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-init+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.pfr": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.service": {
+ "source": "iana",
+ "extensions": ["svc"]
+ },
+ "application/vnd.dxr": {
+ "source": "iana"
+ },
+ "application/vnd.dynageo": {
+ "source": "iana",
+ "extensions": ["geo"]
+ },
+ "application/vnd.dzr": {
+ "source": "iana"
+ },
+ "application/vnd.easykaraoke.cdgdownload": {
+ "source": "iana"
+ },
+ "application/vnd.ecdis-update": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.chart": {
+ "source": "iana",
+ "extensions": ["mag"]
+ },
+ "application/vnd.ecowin.filerequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.fileupdate": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.series": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesrequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesupdate": {
+ "source": "iana"
+ },
+ "application/vnd.emclient.accessrequest+xml": {
+ "source": "iana"
+ },
+ "application/vnd.enliven": {
+ "source": "iana",
+ "extensions": ["nml"]
+ },
+ "application/vnd.enphase.envoy": {
+ "source": "iana"
+ },
+ "application/vnd.eprints.data+xml": {
+ "source": "iana"
+ },
+ "application/vnd.epson.esf": {
+ "source": "iana",
+ "extensions": ["esf"]
+ },
+ "application/vnd.epson.msf": {
+ "source": "iana",
+ "extensions": ["msf"]
+ },
+ "application/vnd.epson.quickanime": {
+ "source": "iana",
+ "extensions": ["qam"]
+ },
+ "application/vnd.epson.salt": {
+ "source": "iana",
+ "extensions": ["slt"]
+ },
+ "application/vnd.epson.ssf": {
+ "source": "iana",
+ "extensions": ["ssf"]
+ },
+ "application/vnd.ericsson.quickcall": {
+ "source": "iana"
+ },
+ "application/vnd.eszigno3+xml": {
+ "source": "iana",
+ "extensions": ["es3","et3"]
+ },
+ "application/vnd.etsi.aoc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-e+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-s+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.cug+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvcommand+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-bc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-cod+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-npvr+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvservice+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsync+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mcid+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mheg5": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.overload-control-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.pstn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.sci+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.simservs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.timestamp-token": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl.der": {
+ "source": "iana"
+ },
+ "application/vnd.eudora.data": {
+ "source": "iana"
+ },
+ "application/vnd.ezpix-album": {
+ "source": "iana",
+ "extensions": ["ez2"]
+ },
+ "application/vnd.ezpix-package": {
+ "source": "iana",
+ "extensions": ["ez3"]
+ },
+ "application/vnd.f-secure.mobile": {
+ "source": "iana"
+ },
+ "application/vnd.fdf": {
+ "source": "iana",
+ "extensions": ["fdf"]
+ },
+ "application/vnd.fdsn.mseed": {
+ "source": "iana",
+ "extensions": ["mseed"]
+ },
+ "application/vnd.fdsn.seed": {
+ "source": "iana",
+ "extensions": ["seed","dataless"]
+ },
+ "application/vnd.ffsns": {
+ "source": "iana"
+ },
+ "application/vnd.fints": {
+ "source": "iana"
+ },
+ "application/vnd.flographit": {
+ "source": "iana",
+ "extensions": ["gph"]
+ },
+ "application/vnd.fluxtime.clip": {
+ "source": "iana",
+ "extensions": ["ftc"]
+ },
+ "application/vnd.font-fontforge-sfd": {
+ "source": "iana"
+ },
+ "application/vnd.framemaker": {
+ "source": "iana",
+ "extensions": ["fm","frame","maker","book"]
+ },
+ "application/vnd.frogans.fnc": {
+ "source": "iana",
+ "extensions": ["fnc"]
+ },
+ "application/vnd.frogans.ltf": {
+ "source": "iana",
+ "extensions": ["ltf"]
+ },
+ "application/vnd.fsc.weblaunch": {
+ "source": "iana",
+ "extensions": ["fsc"]
+ },
+ "application/vnd.fujitsu.oasys": {
+ "source": "iana",
+ "extensions": ["oas"]
+ },
+ "application/vnd.fujitsu.oasys2": {
+ "source": "iana",
+ "extensions": ["oa2"]
+ },
+ "application/vnd.fujitsu.oasys3": {
+ "source": "iana",
+ "extensions": ["oa3"]
+ },
+ "application/vnd.fujitsu.oasysgp": {
+ "source": "iana",
+ "extensions": ["fg5"]
+ },
+ "application/vnd.fujitsu.oasysprs": {
+ "source": "iana",
+ "extensions": ["bh2"]
+ },
+ "application/vnd.fujixerox.art-ex": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.art4": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.ddd": {
+ "source": "iana",
+ "extensions": ["ddd"]
+ },
+ "application/vnd.fujixerox.docuworks": {
+ "source": "iana",
+ "extensions": ["xdw"]
+ },
+ "application/vnd.fujixerox.docuworks.binder": {
+ "source": "iana",
+ "extensions": ["xbd"]
+ },
+ "application/vnd.fujixerox.docuworks.container": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.hbpl": {
+ "source": "iana"
+ },
+ "application/vnd.fut-misnet": {
+ "source": "iana"
+ },
+ "application/vnd.fuzzysheet": {
+ "source": "iana",
+ "extensions": ["fzs"]
+ },
+ "application/vnd.genomatix.tuxedo": {
+ "source": "iana",
+ "extensions": ["txd"]
+ },
+ "application/vnd.geo+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.geocube+xml": {
+ "source": "iana"
+ },
+ "application/vnd.geogebra.file": {
+ "source": "iana",
+ "extensions": ["ggb"]
+ },
+ "application/vnd.geogebra.tool": {
+ "source": "iana",
+ "extensions": ["ggt"]
+ },
+ "application/vnd.geometry-explorer": {
+ "source": "iana",
+ "extensions": ["gex","gre"]
+ },
+ "application/vnd.geonext": {
+ "source": "iana",
+ "extensions": ["gxt"]
+ },
+ "application/vnd.geoplan": {
+ "source": "iana",
+ "extensions": ["g2w"]
+ },
+ "application/vnd.geospace": {
+ "source": "iana",
+ "extensions": ["g3w"]
+ },
+ "application/vnd.gerber": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt-response": {
+ "source": "iana"
+ },
+ "application/vnd.gmx": {
+ "source": "iana",
+ "extensions": ["gmx"]
+ },
+ "application/vnd.google-earth.kml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["kml"]
+ },
+ "application/vnd.google-earth.kmz": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["kmz"]
+ },
+ "application/vnd.gov.sk.e-form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.gov.sk.e-form+zip": {
+ "source": "iana"
+ },
+ "application/vnd.grafeq": {
+ "source": "iana",
+ "extensions": ["gqf","gqs"]
+ },
+ "application/vnd.gridmp": {
+ "source": "iana"
+ },
+ "application/vnd.groove-account": {
+ "source": "iana",
+ "extensions": ["gac"]
+ },
+ "application/vnd.groove-help": {
+ "source": "iana",
+ "extensions": ["ghf"]
+ },
+ "application/vnd.groove-identity-message": {
+ "source": "iana",
+ "extensions": ["gim"]
+ },
+ "application/vnd.groove-injector": {
+ "source": "iana",
+ "extensions": ["grv"]
+ },
+ "application/vnd.groove-tool-message": {
+ "source": "iana",
+ "extensions": ["gtm"]
+ },
+ "application/vnd.groove-tool-template": {
+ "source": "iana",
+ "extensions": ["tpl"]
+ },
+ "application/vnd.groove-vcard": {
+ "source": "iana",
+ "extensions": ["vcg"]
+ },
+ "application/vnd.hal+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hal+xml": {
+ "source": "iana",
+ "extensions": ["hal"]
+ },
+ "application/vnd.handheld-entertainment+xml": {
+ "source": "iana",
+ "extensions": ["zmm"]
+ },
+ "application/vnd.hbci": {
+ "source": "iana",
+ "extensions": ["hbci"]
+ },
+ "application/vnd.hcl-bireports": {
+ "source": "iana"
+ },
+ "application/vnd.heroku+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hhe.lesson-player": {
+ "source": "iana",
+ "extensions": ["les"]
+ },
+ "application/vnd.hp-hpgl": {
+ "source": "iana",
+ "extensions": ["hpgl"]
+ },
+ "application/vnd.hp-hpid": {
+ "source": "iana",
+ "extensions": ["hpid"]
+ },
+ "application/vnd.hp-hps": {
+ "source": "iana",
+ "extensions": ["hps"]
+ },
+ "application/vnd.hp-jlyt": {
+ "source": "iana",
+ "extensions": ["jlt"]
+ },
+ "application/vnd.hp-pcl": {
+ "source": "iana",
+ "extensions": ["pcl"]
+ },
+ "application/vnd.hp-pclxl": {
+ "source": "iana",
+ "extensions": ["pclxl"]
+ },
+ "application/vnd.httphone": {
+ "source": "iana"
+ },
+ "application/vnd.hydrostatix.sof-data": {
+ "source": "iana"
+ },
+ "application/vnd.hzn-3d-crossword": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.afplinedata": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.electronic-media": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.minipay": {
+ "source": "iana",
+ "extensions": ["mpy"]
+ },
+ "application/vnd.ibm.modcap": {
+ "source": "iana",
+ "extensions": ["afp","listafp","list3820"]
+ },
+ "application/vnd.ibm.rights-management": {
+ "source": "iana",
+ "extensions": ["irm"]
+ },
+ "application/vnd.ibm.secure-container": {
+ "source": "iana",
+ "extensions": ["sc"]
+ },
+ "application/vnd.iccprofile": {
+ "source": "iana",
+ "extensions": ["icc","icm"]
+ },
+ "application/vnd.ieee.1905": {
+ "source": "iana"
+ },
+ "application/vnd.igloader": {
+ "source": "iana",
+ "extensions": ["igl"]
+ },
+ "application/vnd.immervision-ivp": {
+ "source": "iana",
+ "extensions": ["ivp"]
+ },
+ "application/vnd.immervision-ivu": {
+ "source": "iana",
+ "extensions": ["ivu"]
+ },
+ "application/vnd.ims.imsccv1p1": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p2": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p3": {
+ "source": "iana"
+ },
+ "application/vnd.ims.lis.v2.result+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolconsumerprofile+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy.id+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings.simple+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.informedcontrol.rms+xml": {
+ "source": "iana"
+ },
+ "application/vnd.informix-visionary": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project+xml": {
+ "source": "iana"
+ },
+ "application/vnd.innopath.wamp.notification": {
+ "source": "iana"
+ },
+ "application/vnd.insors.igm": {
+ "source": "iana",
+ "extensions": ["igm"]
+ },
+ "application/vnd.intercon.formnet": {
+ "source": "iana",
+ "extensions": ["xpw","xpx"]
+ },
+ "application/vnd.intergeo": {
+ "source": "iana",
+ "extensions": ["i2g"]
+ },
+ "application/vnd.intertrust.digibox": {
+ "source": "iana"
+ },
+ "application/vnd.intertrust.nncp": {
+ "source": "iana"
+ },
+ "application/vnd.intu.qbo": {
+ "source": "iana",
+ "extensions": ["qbo"]
+ },
+ "application/vnd.intu.qfx": {
+ "source": "iana",
+ "extensions": ["qfx"]
+ },
+ "application/vnd.iptc.g2.catalogitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.conceptitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.knowledgeitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.packageitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.planningitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ipunplugged.rcprofile": {
+ "source": "iana",
+ "extensions": ["rcprofile"]
+ },
+ "application/vnd.irepository.package+xml": {
+ "source": "iana",
+ "extensions": ["irp"]
+ },
+ "application/vnd.is-xpr": {
+ "source": "iana",
+ "extensions": ["xpr"]
+ },
+ "application/vnd.isac.fcs": {
+ "source": "iana",
+ "extensions": ["fcs"]
+ },
+ "application/vnd.jam": {
+ "source": "iana",
+ "extensions": ["jam"]
+ },
+ "application/vnd.japannet-directory-service": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-jpnstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-payment-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-setstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.jcp.javame.midlet-rms": {
+ "source": "iana",
+ "extensions": ["rms"]
+ },
+ "application/vnd.jisp": {
+ "source": "iana",
+ "extensions": ["jisp"]
+ },
+ "application/vnd.joost.joda-archive": {
+ "source": "iana",
+ "extensions": ["joda"]
+ },
+ "application/vnd.jsk.isdn-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.kahootz": {
+ "source": "iana",
+ "extensions": ["ktz","ktr"]
+ },
+ "application/vnd.kde.karbon": {
+ "source": "iana",
+ "extensions": ["karbon"]
+ },
+ "application/vnd.kde.kchart": {
+ "source": "iana",
+ "extensions": ["chrt"]
+ },
+ "application/vnd.kde.kformula": {
+ "source": "iana",
+ "extensions": ["kfo"]
+ },
+ "application/vnd.kde.kivio": {
+ "source": "iana",
+ "extensions": ["flw"]
+ },
+ "application/vnd.kde.kontour": {
+ "source": "iana",
+ "extensions": ["kon"]
+ },
+ "application/vnd.kde.kpresenter": {
+ "source": "iana",
+ "extensions": ["kpr","kpt"]
+ },
+ "application/vnd.kde.kspread": {
+ "source": "iana",
+ "extensions": ["ksp"]
+ },
+ "application/vnd.kde.kword": {
+ "source": "iana",
+ "extensions": ["kwd","kwt"]
+ },
+ "application/vnd.kenameaapp": {
+ "source": "iana",
+ "extensions": ["htke"]
+ },
+ "application/vnd.kidspiration": {
+ "source": "iana",
+ "extensions": ["kia"]
+ },
+ "application/vnd.kinar": {
+ "source": "iana",
+ "extensions": ["kne","knp"]
+ },
+ "application/vnd.koan": {
+ "source": "iana",
+ "extensions": ["skp","skd","skt","skm"]
+ },
+ "application/vnd.kodak-descriptor": {
+ "source": "iana",
+ "extensions": ["sse"]
+ },
+ "application/vnd.las.las+xml": {
+ "source": "iana",
+ "extensions": ["lasxml"]
+ },
+ "application/vnd.liberty-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.llamagraphics.life-balance.desktop": {
+ "source": "iana",
+ "extensions": ["lbd"]
+ },
+ "application/vnd.llamagraphics.life-balance.exchange+xml": {
+ "source": "iana",
+ "extensions": ["lbe"]
+ },
+ "application/vnd.lotus-1-2-3": {
+ "source": "iana",
+ "extensions": ["123"]
+ },
+ "application/vnd.lotus-approach": {
+ "source": "iana",
+ "extensions": ["apr"]
+ },
+ "application/vnd.lotus-freelance": {
+ "source": "iana",
+ "extensions": ["pre"]
+ },
+ "application/vnd.lotus-notes": {
+ "source": "iana",
+ "extensions": ["nsf"]
+ },
+ "application/vnd.lotus-organizer": {
+ "source": "iana",
+ "extensions": ["org"]
+ },
+ "application/vnd.lotus-screencam": {
+ "source": "iana",
+ "extensions": ["scm"]
+ },
+ "application/vnd.lotus-wordpro": {
+ "source": "iana",
+ "extensions": ["lwp"]
+ },
+ "application/vnd.macports.portpkg": {
+ "source": "iana",
+ "extensions": ["portpkg"]
+ },
+ "application/vnd.marlin.drm.actiontoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.conftoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.license+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.mdcf": {
+ "source": "iana"
+ },
+ "application/vnd.mason+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.maxmind.maxmind-db": {
+ "source": "iana"
+ },
+ "application/vnd.mcd": {
+ "source": "iana",
+ "extensions": ["mcd"]
+ },
+ "application/vnd.medcalcdata": {
+ "source": "iana",
+ "extensions": ["mc1"]
+ },
+ "application/vnd.mediastation.cdkey": {
+ "source": "iana",
+ "extensions": ["cdkey"]
+ },
+ "application/vnd.meridian-slingshot": {
+ "source": "iana"
+ },
+ "application/vnd.mfer": {
+ "source": "iana",
+ "extensions": ["mwf"]
+ },
+ "application/vnd.mfmp": {
+ "source": "iana",
+ "extensions": ["mfm"]
+ },
+ "application/vnd.micrografx.flo": {
+ "source": "iana",
+ "extensions": ["flo"]
+ },
+ "application/vnd.micrografx.igx": {
+ "source": "iana",
+ "extensions": ["igx"]
+ },
+ "application/vnd.miele+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.mif": {
+ "source": "iana",
+ "extensions": ["mif"]
+ },
+ "application/vnd.minisoft-hp3000-save": {
+ "source": "iana"
+ },
+ "application/vnd.mitsubishi.misty-guard.trustweb": {
+ "source": "iana"
+ },
+ "application/vnd.mobius.daf": {
+ "source": "iana",
+ "extensions": ["daf"]
+ },
+ "application/vnd.mobius.dis": {
+ "source": "iana",
+ "extensions": ["dis"]
+ },
+ "application/vnd.mobius.mbk": {
+ "source": "iana",
+ "extensions": ["mbk"]
+ },
+ "application/vnd.mobius.mqy": {
+ "source": "iana",
+ "extensions": ["mqy"]
+ },
+ "application/vnd.mobius.msl": {
+ "source": "iana",
+ "extensions": ["msl"]
+ },
+ "application/vnd.mobius.plc": {
+ "source": "iana",
+ "extensions": ["plc"]
+ },
+ "application/vnd.mobius.txf": {
+ "source": "iana",
+ "extensions": ["txf"]
+ },
+ "application/vnd.mophun.application": {
+ "source": "iana",
+ "extensions": ["mpn"]
+ },
+ "application/vnd.mophun.certificate": {
+ "source": "iana",
+ "extensions": ["mpc"]
+ },
+ "application/vnd.motorola.flexsuite": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.adsi": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.fis": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.gotap": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.kmr": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.ttc": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.wem": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.iprm": {
+ "source": "iana"
+ },
+ "application/vnd.mozilla.xul+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xul"]
+ },
+ "application/vnd.ms-3mfdocument": {
+ "source": "iana"
+ },
+ "application/vnd.ms-artgalry": {
+ "source": "iana",
+ "extensions": ["cil"]
+ },
+ "application/vnd.ms-asf": {
+ "source": "iana"
+ },
+ "application/vnd.ms-cab-compressed": {
+ "source": "iana",
+ "extensions": ["cab"]
+ },
+ "application/vnd.ms-color.iccprofile": {
+ "source": "apache"
+ },
+ "application/vnd.ms-excel": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xls","xlm","xla","xlc","xlt","xlw"]
+ },
+ "application/vnd.ms-excel.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlam"]
+ },
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsb"]
+ },
+ "application/vnd.ms-excel.sheet.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsm"]
+ },
+ "application/vnd.ms-excel.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xltm"]
+ },
+ "application/vnd.ms-fontobject": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eot"]
+ },
+ "application/vnd.ms-htmlhelp": {
+ "source": "iana",
+ "extensions": ["chm"]
+ },
+ "application/vnd.ms-ims": {
+ "source": "iana",
+ "extensions": ["ims"]
+ },
+ "application/vnd.ms-lrm": {
+ "source": "iana",
+ "extensions": ["lrm"]
+ },
+ "application/vnd.ms-office.activex+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-officetheme": {
+ "source": "iana",
+ "extensions": ["thmx"]
+ },
+ "application/vnd.ms-opentype": {
+ "source": "apache",
+ "compressible": true
+ },
+ "application/vnd.ms-package.obfuscated-opentype": {
+ "source": "apache"
+ },
+ "application/vnd.ms-pki.seccat": {
+ "source": "apache",
+ "extensions": ["cat"]
+ },
+ "application/vnd.ms-pki.stl": {
+ "source": "apache",
+ "extensions": ["stl"]
+ },
+ "application/vnd.ms-playready.initiator+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-powerpoint": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ppt","pps","pot"]
+ },
+ "application/vnd.ms-powerpoint.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppam"]
+ },
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["pptm"]
+ },
+ "application/vnd.ms-powerpoint.slide.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["sldm"]
+ },
+ "application/vnd.ms-powerpoint.slideshow.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppsm"]
+ },
+ "application/vnd.ms-powerpoint.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["potm"]
+ },
+ "application/vnd.ms-printing.printticket+xml": {
+ "source": "apache"
+ },
+ "application/vnd.ms-project": {
+ "source": "iana",
+ "extensions": ["mpp","mpt"]
+ },
+ "application/vnd.ms-tnef": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.printerpairing": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-word.document.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["docm"]
+ },
+ "application/vnd.ms-word.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["dotm"]
+ },
+ "application/vnd.ms-works": {
+ "source": "iana",
+ "extensions": ["wps","wks","wcm","wdb"]
+ },
+ "application/vnd.ms-wpl": {
+ "source": "iana",
+ "extensions": ["wpl"]
+ },
+ "application/vnd.ms-xpsdocument": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xps"]
+ },
+ "application/vnd.msa-disk-image": {
+ "source": "iana"
+ },
+ "application/vnd.mseq": {
+ "source": "iana",
+ "extensions": ["mseq"]
+ },
+ "application/vnd.msign": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator.cif": {
+ "source": "iana"
+ },
+ "application/vnd.music-niff": {
+ "source": "iana"
+ },
+ "application/vnd.musician": {
+ "source": "iana",
+ "extensions": ["mus"]
+ },
+ "application/vnd.muvee.style": {
+ "source": "iana",
+ "extensions": ["msty"]
+ },
+ "application/vnd.mynfc": {
+ "source": "iana",
+ "extensions": ["taglet"]
+ },
+ "application/vnd.ncd.control": {
+ "source": "iana"
+ },
+ "application/vnd.ncd.reference": {
+ "source": "iana"
+ },
+ "application/vnd.nervana": {
+ "source": "iana"
+ },
+ "application/vnd.netfpx": {
+ "source": "iana"
+ },
+ "application/vnd.neurolanguage.nlu": {
+ "source": "iana",
+ "extensions": ["nlu"]
+ },
+ "application/vnd.nintendo.nitro.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nintendo.snes.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nitf": {
+ "source": "iana",
+ "extensions": ["ntf","nitf"]
+ },
+ "application/vnd.noblenet-directory": {
+ "source": "iana",
+ "extensions": ["nnd"]
+ },
+ "application/vnd.noblenet-sealer": {
+ "source": "iana",
+ "extensions": ["nns"]
+ },
+ "application/vnd.noblenet-web": {
+ "source": "iana",
+ "extensions": ["nnw"]
+ },
+ "application/vnd.nokia.catalogs": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.iptv.config+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.isds-radio-presets": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmarkcollection+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.ac+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.data": {
+ "source": "iana",
+ "extensions": ["ngdat"]
+ },
+ "application/vnd.nokia.n-gage.symbian.install": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.ncd": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.radio-preset": {
+ "source": "iana",
+ "extensions": ["rpst"]
+ },
+ "application/vnd.nokia.radio-presets": {
+ "source": "iana",
+ "extensions": ["rpss"]
+ },
+ "application/vnd.novadigm.edm": {
+ "source": "iana",
+ "extensions": ["edm"]
+ },
+ "application/vnd.novadigm.edx": {
+ "source": "iana",
+ "extensions": ["edx"]
+ },
+ "application/vnd.novadigm.ext": {
+ "source": "iana",
+ "extensions": ["ext"]
+ },
+ "application/vnd.ntt-local.content-share": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.file-transfer": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.ogw_remote-access": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_remote": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.oasis.opendocument.chart": {
+ "source": "iana",
+ "extensions": ["odc"]
+ },
+ "application/vnd.oasis.opendocument.chart-template": {
+ "source": "iana",
+ "extensions": ["otc"]
+ },
+ "application/vnd.oasis.opendocument.database": {
+ "source": "iana",
+ "extensions": ["odb"]
+ },
+ "application/vnd.oasis.opendocument.formula": {
+ "source": "iana",
+ "extensions": ["odf"]
+ },
+ "application/vnd.oasis.opendocument.formula-template": {
+ "source": "iana",
+ "extensions": ["odft"]
+ },
+ "application/vnd.oasis.opendocument.graphics": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odg"]
+ },
+ "application/vnd.oasis.opendocument.graphics-template": {
+ "source": "iana",
+ "extensions": ["otg"]
+ },
+ "application/vnd.oasis.opendocument.image": {
+ "source": "iana",
+ "extensions": ["odi"]
+ },
+ "application/vnd.oasis.opendocument.image-template": {
+ "source": "iana",
+ "extensions": ["oti"]
+ },
+ "application/vnd.oasis.opendocument.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odp"]
+ },
+ "application/vnd.oasis.opendocument.presentation-template": {
+ "source": "iana",
+ "extensions": ["otp"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ods"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet-template": {
+ "source": "iana",
+ "extensions": ["ots"]
+ },
+ "application/vnd.oasis.opendocument.text": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odt"]
+ },
+ "application/vnd.oasis.opendocument.text-master": {
+ "source": "iana",
+ "extensions": ["odm"]
+ },
+ "application/vnd.oasis.opendocument.text-template": {
+ "source": "iana",
+ "extensions": ["ott"]
+ },
+ "application/vnd.oasis.opendocument.text-web": {
+ "source": "iana",
+ "extensions": ["oth"]
+ },
+ "application/vnd.obn": {
+ "source": "iana"
+ },
+ "application/vnd.oftn.l10n+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.contentaccessdownload+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.contentaccessstreaming+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.cspg-hexbinary": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.svg+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.xhtml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.mippvcontrolmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.pae.gem": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdlist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.ueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.userprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.olpc-sugar": {
+ "source": "iana",
+ "extensions": ["xo"]
+ },
+ "application/vnd.oma-scws-config": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-request": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-response": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.associated-procedure-parameter+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.drm-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.imd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.ltkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.notification+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.provisioningtrigger": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgboot": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdu": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.simple-symbol-container": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.smartcard-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sprov+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.stkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-address-book+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-feature-handler+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-pcc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-subs-invite+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-user-prefs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcd": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcdc": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dd2+xml": {
+ "source": "iana",
+ "extensions": ["dd2"]
+ },
+ "application/vnd.oma.drm.risd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.group-usage-list+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.pal+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.detailed-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.final-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.groups+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.invocation-descriptor+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.optimized-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.push": {
+ "source": "iana"
+ },
+ "application/vnd.oma.scidm.messages+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.xcap-directory+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-email+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-file+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-folder+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omaloc-supl-init": {
+ "source": "iana"
+ },
+ "application/vnd.openeye.oeb": {
+ "source": "iana"
+ },
+ "application/vnd.openofficeorg.extension": {
+ "source": "apache",
+ "extensions": ["oxt"]
+ },
+ "application/vnd.openxmlformats-officedocument.custom-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawing+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.extended-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pptx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide": {
+ "source": "iana",
+ "extensions": ["sldx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": {
+ "source": "iana",
+ "extensions": ["ppsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template": {
+ "source": "apache",
+ "extensions": ["potx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xlsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template": {
+ "source": "apache",
+ "extensions": ["xltx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.theme+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.themeoverride+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.vmldrawing": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["docx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template": {
+ "source": "apache",
+ "extensions": ["dotx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.core-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.relationships+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oracle.resource+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.orange.indata": {
+ "source": "iana"
+ },
+ "application/vnd.osa.netdeploy": {
+ "source": "iana"
+ },
+ "application/vnd.osgeo.mapguide.package": {
+ "source": "iana",
+ "extensions": ["mgp"]
+ },
+ "application/vnd.osgi.bundle": {
+ "source": "iana"
+ },
+ "application/vnd.osgi.dp": {
+ "source": "iana",
+ "extensions": ["dp"]
+ },
+ "application/vnd.osgi.subsystem": {
+ "source": "iana",
+ "extensions": ["esa"]
+ },
+ "application/vnd.otps.ct-kip+xml": {
+ "source": "iana"
+ },
+ "application/vnd.palm": {
+ "source": "iana",
+ "extensions": ["pdb","pqa","oprc"]
+ },
+ "application/vnd.panoply": {
+ "source": "iana"
+ },
+ "application/vnd.paos+xml": {
+ "source": "iana"
+ },
+ "application/vnd.paos.xml": {
+ "source": "apache"
+ },
+ "application/vnd.pawaafile": {
+ "source": "iana",
+ "extensions": ["paw"]
+ },
+ "application/vnd.pcos": {
+ "source": "iana"
+ },
+ "application/vnd.pg.format": {
+ "source": "iana",
+ "extensions": ["str"]
+ },
+ "application/vnd.pg.osasli": {
+ "source": "iana",
+ "extensions": ["ei6"]
+ },
+ "application/vnd.piaccess.application-licence": {
+ "source": "iana"
+ },
+ "application/vnd.picsel": {
+ "source": "iana",
+ "extensions": ["efif"]
+ },
+ "application/vnd.pmi.widget": {
+ "source": "iana",
+ "extensions": ["wg"]
+ },
+ "application/vnd.poc.group-advertisement+xml": {
+ "source": "iana"
+ },
+ "application/vnd.pocketlearn": {
+ "source": "iana",
+ "extensions": ["plf"]
+ },
+ "application/vnd.powerbuilder6": {
+ "source": "iana",
+ "extensions": ["pbd"]
+ },
+ "application/vnd.powerbuilder6-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75-s": {
+ "source": "iana"
+ },
+ "application/vnd.preminet": {
+ "source": "iana"
+ },
+ "application/vnd.previewsystems.box": {
+ "source": "iana",
+ "extensions": ["box"]
+ },
+ "application/vnd.proteus.magazine": {
+ "source": "iana",
+ "extensions": ["mgz"]
+ },
+ "application/vnd.publishare-delta-tree": {
+ "source": "iana",
+ "extensions": ["qps"]
+ },
+ "application/vnd.pvi.ptid1": {
+ "source": "iana",
+ "extensions": ["ptid"]
+ },
+ "application/vnd.pwg-multiplexed": {
+ "source": "iana"
+ },
+ "application/vnd.pwg-xhtml-print+xml": {
+ "source": "iana"
+ },
+ "application/vnd.qualcomm.brew-app-res": {
+ "source": "iana"
+ },
+ "application/vnd.quark.quarkxpress": {
+ "source": "iana",
+ "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"]
+ },
+ "application/vnd.quobject-quoxdocument": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.moml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-stream+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-base+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-detect+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-group+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-speech+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-transform+xml": {
+ "source": "iana"
+ },
+ "application/vnd.rainstor.data": {
+ "source": "iana"
+ },
+ "application/vnd.rapid": {
+ "source": "iana"
+ },
+ "application/vnd.realvnc.bed": {
+ "source": "iana",
+ "extensions": ["bed"]
+ },
+ "application/vnd.recordare.musicxml": {
+ "source": "iana",
+ "extensions": ["mxl"]
+ },
+ "application/vnd.recordare.musicxml+xml": {
+ "source": "iana",
+ "extensions": ["musicxml"]
+ },
+ "application/vnd.renlearn.rlprint": {
+ "source": "iana"
+ },
+ "application/vnd.rig.cryptonote": {
+ "source": "iana",
+ "extensions": ["cryptonote"]
+ },
+ "application/vnd.rim.cod": {
+ "source": "apache",
+ "extensions": ["cod"]
+ },
+ "application/vnd.rn-realmedia": {
+ "source": "apache",
+ "extensions": ["rm"]
+ },
+ "application/vnd.rn-realmedia-vbr": {
+ "source": "apache",
+ "extensions": ["rmvb"]
+ },
+ "application/vnd.route66.link66+xml": {
+ "source": "iana",
+ "extensions": ["link66"]
+ },
+ "application/vnd.rs-274x": {
+ "source": "iana"
+ },
+ "application/vnd.ruckus.download": {
+ "source": "iana"
+ },
+ "application/vnd.s3sms": {
+ "source": "iana"
+ },
+ "application/vnd.sailingtracker.track": {
+ "source": "iana",
+ "extensions": ["st"]
+ },
+ "application/vnd.sbm.cid": {
+ "source": "iana"
+ },
+ "application/vnd.sbm.mid2": {
+ "source": "iana"
+ },
+ "application/vnd.scribus": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.3df": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.csf": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.doc": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.eml": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.mht": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.net": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.ppt": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.tiff": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.xls": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.html": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.pdf": {
+ "source": "iana"
+ },
+ "application/vnd.seemail": {
+ "source": "iana",
+ "extensions": ["see"]
+ },
+ "application/vnd.sema": {
+ "source": "iana",
+ "extensions": ["sema"]
+ },
+ "application/vnd.semd": {
+ "source": "iana",
+ "extensions": ["semd"]
+ },
+ "application/vnd.semf": {
+ "source": "iana",
+ "extensions": ["semf"]
+ },
+ "application/vnd.shana.informed.formdata": {
+ "source": "iana",
+ "extensions": ["ifm"]
+ },
+ "application/vnd.shana.informed.formtemplate": {
+ "source": "iana",
+ "extensions": ["itp"]
+ },
+ "application/vnd.shana.informed.interchange": {
+ "source": "iana",
+ "extensions": ["iif"]
+ },
+ "application/vnd.shana.informed.package": {
+ "source": "iana",
+ "extensions": ["ipk"]
+ },
+ "application/vnd.simtech-mindmapper": {
+ "source": "iana",
+ "extensions": ["twd","twds"]
+ },
+ "application/vnd.siren+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.smaf": {
+ "source": "iana",
+ "extensions": ["mmf"]
+ },
+ "application/vnd.smart.notebook": {
+ "source": "iana"
+ },
+ "application/vnd.smart.teacher": {
+ "source": "iana",
+ "extensions": ["teacher"]
+ },
+ "application/vnd.software602.filler.form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.software602.filler.form-xml-zip": {
+ "source": "iana"
+ },
+ "application/vnd.solent.sdkm+xml": {
+ "source": "iana",
+ "extensions": ["sdkm","sdkd"]
+ },
+ "application/vnd.spotfire.dxp": {
+ "source": "iana",
+ "extensions": ["dxp"]
+ },
+ "application/vnd.spotfire.sfs": {
+ "source": "iana",
+ "extensions": ["sfs"]
+ },
+ "application/vnd.sss-cod": {
+ "source": "iana"
+ },
+ "application/vnd.sss-dtf": {
+ "source": "iana"
+ },
+ "application/vnd.sss-ntf": {
+ "source": "iana"
+ },
+ "application/vnd.stardivision.calc": {
+ "source": "apache",
+ "extensions": ["sdc"]
+ },
+ "application/vnd.stardivision.draw": {
+ "source": "apache",
+ "extensions": ["sda"]
+ },
+ "application/vnd.stardivision.impress": {
+ "source": "apache",
+ "extensions": ["sdd"]
+ },
+ "application/vnd.stardivision.math": {
+ "source": "apache",
+ "extensions": ["smf"]
+ },
+ "application/vnd.stardivision.writer": {
+ "source": "apache",
+ "extensions": ["sdw","vor"]
+ },
+ "application/vnd.stardivision.writer-global": {
+ "source": "apache",
+ "extensions": ["sgl"]
+ },
+ "application/vnd.stepmania.package": {
+ "source": "iana",
+ "extensions": ["smzip"]
+ },
+ "application/vnd.stepmania.stepchart": {
+ "source": "iana",
+ "extensions": ["sm"]
+ },
+ "application/vnd.street-stream": {
+ "source": "iana"
+ },
+ "application/vnd.sun.wadl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.sun.xml.calc": {
+ "source": "apache",
+ "extensions": ["sxc"]
+ },
+ "application/vnd.sun.xml.calc.template": {
+ "source": "apache",
+ "extensions": ["stc"]
+ },
+ "application/vnd.sun.xml.draw": {
+ "source": "apache",
+ "extensions": ["sxd"]
+ },
+ "application/vnd.sun.xml.draw.template": {
+ "source": "apache",
+ "extensions": ["std"]
+ },
+ "application/vnd.sun.xml.impress": {
+ "source": "apache",
+ "extensions": ["sxi"]
+ },
+ "application/vnd.sun.xml.impress.template": {
+ "source": "apache",
+ "extensions": ["sti"]
+ },
+ "application/vnd.sun.xml.math": {
+ "source": "apache",
+ "extensions": ["sxm"]
+ },
+ "application/vnd.sun.xml.writer": {
+ "source": "apache",
+ "extensions": ["sxw"]
+ },
+ "application/vnd.sun.xml.writer.global": {
+ "source": "apache",
+ "extensions": ["sxg"]
+ },
+ "application/vnd.sun.xml.writer.template": {
+ "source": "apache",
+ "extensions": ["stw"]
+ },
+ "application/vnd.sus-calendar": {
+ "source": "iana",
+ "extensions": ["sus","susp"]
+ },
+ "application/vnd.svd": {
+ "source": "iana",
+ "extensions": ["svd"]
+ },
+ "application/vnd.swiftview-ics": {
+ "source": "iana"
+ },
+ "application/vnd.symbian.install": {
+ "source": "apache",
+ "extensions": ["sis","sisx"]
+ },
+ "application/vnd.syncml+xml": {
+ "source": "iana",
+ "extensions": ["xsm"]
+ },
+ "application/vnd.syncml.dm+wbxml": {
+ "source": "iana",
+ "extensions": ["bdm"]
+ },
+ "application/vnd.syncml.dm+xml": {
+ "source": "iana",
+ "extensions": ["xdm"]
+ },
+ "application/vnd.syncml.dm.notification": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.ds.notification": {
+ "source": "iana"
+ },
+ "application/vnd.tao.intent-module-archive": {
+ "source": "iana",
+ "extensions": ["tao"]
+ },
+ "application/vnd.tcpdump.pcap": {
+ "source": "iana",
+ "extensions": ["pcap","cap","dmp"]
+ },
+ "application/vnd.tmd.mediaflex.api+xml": {
+ "source": "iana"
+ },
+ "application/vnd.tmobile-livetv": {
+ "source": "iana",
+ "extensions": ["tmo"]
+ },
+ "application/vnd.trid.tpt": {
+ "source": "iana",
+ "extensions": ["tpt"]
+ },
+ "application/vnd.triscape.mxs": {
+ "source": "iana",
+ "extensions": ["mxs"]
+ },
+ "application/vnd.trueapp": {
+ "source": "iana",
+ "extensions": ["tra"]
+ },
+ "application/vnd.truedoc": {
+ "source": "iana"
+ },
+ "application/vnd.ubisoft.webplayer": {
+ "source": "iana"
+ },
+ "application/vnd.ufdl": {
+ "source": "iana",
+ "extensions": ["ufd","ufdl"]
+ },
+ "application/vnd.uiq.theme": {
+ "source": "iana",
+ "extensions": ["utz"]
+ },
+ "application/vnd.umajin": {
+ "source": "iana",
+ "extensions": ["umj"]
+ },
+ "application/vnd.unity": {
+ "source": "iana",
+ "extensions": ["unityweb"]
+ },
+ "application/vnd.uoml+xml": {
+ "source": "iana",
+ "extensions": ["uoml"]
+ },
+ "application/vnd.uplanet.alert": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.alert-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.signal": {
+ "source": "iana"
+ },
+ "application/vnd.valve.source.material": {
+ "source": "iana"
+ },
+ "application/vnd.vcx": {
+ "source": "iana",
+ "extensions": ["vcx"]
+ },
+ "application/vnd.vd-study": {
+ "source": "iana"
+ },
+ "application/vnd.vectorworks": {
+ "source": "iana"
+ },
+ "application/vnd.verimatrix.vcas": {
+ "source": "iana"
+ },
+ "application/vnd.vidsoft.vidconference": {
+ "source": "iana"
+ },
+ "application/vnd.visio": {
+ "source": "iana",
+ "extensions": ["vsd","vst","vss","vsw"]
+ },
+ "application/vnd.visionary": {
+ "source": "iana",
+ "extensions": ["vis"]
+ },
+ "application/vnd.vividence.scriptfile": {
+ "source": "iana"
+ },
+ "application/vnd.vsf": {
+ "source": "iana",
+ "extensions": ["vsf"]
+ },
+ "application/vnd.wap.sic": {
+ "source": "iana"
+ },
+ "application/vnd.wap.slc": {
+ "source": "iana"
+ },
+ "application/vnd.wap.wbxml": {
+ "source": "iana",
+ "extensions": ["wbxml"]
+ },
+ "application/vnd.wap.wmlc": {
+ "source": "iana",
+ "extensions": ["wmlc"]
+ },
+ "application/vnd.wap.wmlscriptc": {
+ "source": "iana",
+ "extensions": ["wmlsc"]
+ },
+ "application/vnd.webturbo": {
+ "source": "iana",
+ "extensions": ["wtb"]
+ },
+ "application/vnd.wfa.p2p": {
+ "source": "iana"
+ },
+ "application/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "application/vnd.windows.devicepairing": {
+ "source": "iana"
+ },
+ "application/vnd.wmc": {
+ "source": "iana"
+ },
+ "application/vnd.wmf.bootstrap": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica.package": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.player": {
+ "source": "iana",
+ "extensions": ["nbp"]
+ },
+ "application/vnd.wordperfect": {
+ "source": "iana",
+ "extensions": ["wpd"]
+ },
+ "application/vnd.wqd": {
+ "source": "iana",
+ "extensions": ["wqd"]
+ },
+ "application/vnd.wrq-hp3000-labelled": {
+ "source": "iana"
+ },
+ "application/vnd.wt.stf": {
+ "source": "iana",
+ "extensions": ["stf"]
+ },
+ "application/vnd.wv.csp+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.csp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.ssp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xacml+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.xara": {
+ "source": "iana",
+ "extensions": ["xar"]
+ },
+ "application/vnd.xfdl": {
+ "source": "iana",
+ "extensions": ["xfdl"]
+ },
+ "application/vnd.xfdl.webform": {
+ "source": "iana"
+ },
+ "application/vnd.xmi+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.cpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.dpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.plan": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.ppkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.xlim": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.hv-dic": {
+ "source": "iana",
+ "extensions": ["hvd"]
+ },
+ "application/vnd.yamaha.hv-script": {
+ "source": "iana",
+ "extensions": ["hvs"]
+ },
+ "application/vnd.yamaha.hv-voice": {
+ "source": "iana",
+ "extensions": ["hvp"]
+ },
+ "application/vnd.yamaha.openscoreformat": {
+ "source": "iana",
+ "extensions": ["osf"]
+ },
+ "application/vnd.yamaha.openscoreformat.osfpvg+xml": {
+ "source": "iana",
+ "extensions": ["osfpvg"]
+ },
+ "application/vnd.yamaha.remote-setup": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.smaf-audio": {
+ "source": "iana",
+ "extensions": ["saf"]
+ },
+ "application/vnd.yamaha.smaf-phrase": {
+ "source": "iana",
+ "extensions": ["spf"]
+ },
+ "application/vnd.yamaha.through-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.tunnel-udpencap": {
+ "source": "iana"
+ },
+ "application/vnd.yaoweme": {
+ "source": "iana"
+ },
+ "application/vnd.yellowriver-custom-menu": {
+ "source": "iana",
+ "extensions": ["cmp"]
+ },
+ "application/vnd.zul": {
+ "source": "iana",
+ "extensions": ["zir","zirz"]
+ },
+ "application/vnd.zzazz.deck+xml": {
+ "source": "iana",
+ "extensions": ["zaz"]
+ },
+ "application/voicexml+xml": {
+ "source": "iana",
+ "extensions": ["vxml"]
+ },
+ "application/vq-rtcpxr": {
+ "source": "iana"
+ },
+ "application/watcherinfo+xml": {
+ "source": "iana"
+ },
+ "application/whoispp-query": {
+ "source": "iana"
+ },
+ "application/whoispp-response": {
+ "source": "iana"
+ },
+ "application/widget": {
+ "source": "iana",
+ "extensions": ["wgt"]
+ },
+ "application/winhlp": {
+ "source": "apache",
+ "extensions": ["hlp"]
+ },
+ "application/wita": {
+ "source": "iana"
+ },
+ "application/wordperfect5.1": {
+ "source": "iana"
+ },
+ "application/wsdl+xml": {
+ "source": "iana",
+ "extensions": ["wsdl"]
+ },
+ "application/wspolicy+xml": {
+ "source": "iana",
+ "extensions": ["wspolicy"]
+ },
+ "application/x-7z-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["7z"]
+ },
+ "application/x-abiword": {
+ "source": "apache",
+ "extensions": ["abw"]
+ },
+ "application/x-ace-compressed": {
+ "source": "apache",
+ "extensions": ["ace"]
+ },
+ "application/x-amf": {
+ "source": "apache"
+ },
+ "application/x-apple-diskimage": {
+ "source": "apache",
+ "extensions": ["dmg"]
+ },
+ "application/x-authorware-bin": {
+ "source": "apache",
+ "extensions": ["aab","x32","u32","vox"]
+ },
+ "application/x-authorware-map": {
+ "source": "apache",
+ "extensions": ["aam"]
+ },
+ "application/x-authorware-seg": {
+ "source": "apache",
+ "extensions": ["aas"]
+ },
+ "application/x-bcpio": {
+ "source": "apache",
+ "extensions": ["bcpio"]
+ },
+ "application/x-bittorrent": {
+ "source": "apache",
+ "extensions": ["torrent"]
+ },
+ "application/x-blorb": {
+ "source": "apache",
+ "extensions": ["blb","blorb"]
+ },
+ "application/x-bzip": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz"]
+ },
+ "application/x-bzip2": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz2","boz"]
+ },
+ "application/x-cbr": {
+ "source": "apache",
+ "extensions": ["cbr","cba","cbt","cbz","cb7"]
+ },
+ "application/x-cdlink": {
+ "source": "apache",
+ "extensions": ["vcd"]
+ },
+ "application/x-cfs-compressed": {
+ "source": "apache",
+ "extensions": ["cfs"]
+ },
+ "application/x-chat": {
+ "source": "apache",
+ "extensions": ["chat"]
+ },
+ "application/x-chess-pgn": {
+ "source": "apache",
+ "extensions": ["pgn"]
+ },
+ "application/x-chrome-extension": {
+ "extensions": ["crx"]
+ },
+ "application/x-compress": {
+ "source": "apache"
+ },
+ "application/x-conference": {
+ "source": "apache",
+ "extensions": ["nsc"]
+ },
+ "application/x-cpio": {
+ "source": "apache",
+ "extensions": ["cpio"]
+ },
+ "application/x-csh": {
+ "source": "apache",
+ "extensions": ["csh"]
+ },
+ "application/x-deb": {
+ "compressible": false
+ },
+ "application/x-debian-package": {
+ "source": "apache",
+ "extensions": ["deb","udeb"]
+ },
+ "application/x-dgc-compressed": {
+ "source": "apache",
+ "extensions": ["dgc"]
+ },
+ "application/x-director": {
+ "source": "apache",
+ "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]
+ },
+ "application/x-doom": {
+ "source": "apache",
+ "extensions": ["wad"]
+ },
+ "application/x-dtbncx+xml": {
+ "source": "apache",
+ "extensions": ["ncx"]
+ },
+ "application/x-dtbook+xml": {
+ "source": "apache",
+ "extensions": ["dtb"]
+ },
+ "application/x-dtbresource+xml": {
+ "source": "apache",
+ "extensions": ["res"]
+ },
+ "application/x-dvi": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["dvi"]
+ },
+ "application/x-envoy": {
+ "source": "apache",
+ "extensions": ["evy"]
+ },
+ "application/x-eva": {
+ "source": "apache",
+ "extensions": ["eva"]
+ },
+ "application/x-font-bdf": {
+ "source": "apache",
+ "extensions": ["bdf"]
+ },
+ "application/x-font-dos": {
+ "source": "apache"
+ },
+ "application/x-font-framemaker": {
+ "source": "apache"
+ },
+ "application/x-font-ghostscript": {
+ "source": "apache",
+ "extensions": ["gsf"]
+ },
+ "application/x-font-libgrx": {
+ "source": "apache"
+ },
+ "application/x-font-linux-psf": {
+ "source": "apache",
+ "extensions": ["psf"]
+ },
+ "application/x-font-otf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "application/x-font-pcf": {
+ "source": "apache",
+ "extensions": ["pcf"]
+ },
+ "application/x-font-snf": {
+ "source": "apache",
+ "extensions": ["snf"]
+ },
+ "application/x-font-speedo": {
+ "source": "apache"
+ },
+ "application/x-font-sunos-news": {
+ "source": "apache"
+ },
+ "application/x-font-ttf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ttf","ttc"]
+ },
+ "application/x-font-type1": {
+ "source": "apache",
+ "extensions": ["pfa","pfb","pfm","afm"]
+ },
+ "application/x-font-vfont": {
+ "source": "apache"
+ },
+ "application/x-freearc": {
+ "source": "apache",
+ "extensions": ["arc"]
+ },
+ "application/x-futuresplash": {
+ "source": "apache",
+ "extensions": ["spl"]
+ },
+ "application/x-gca-compressed": {
+ "source": "apache",
+ "extensions": ["gca"]
+ },
+ "application/x-glulx": {
+ "source": "apache",
+ "extensions": ["ulx"]
+ },
+ "application/x-gnumeric": {
+ "source": "apache",
+ "extensions": ["gnumeric"]
+ },
+ "application/x-gramps-xml": {
+ "source": "apache",
+ "extensions": ["gramps"]
+ },
+ "application/x-gtar": {
+ "source": "apache",
+ "extensions": ["gtar"]
+ },
+ "application/x-gzip": {
+ "source": "apache"
+ },
+ "application/x-hdf": {
+ "source": "apache",
+ "extensions": ["hdf"]
+ },
+ "application/x-install-instructions": {
+ "source": "apache",
+ "extensions": ["install"]
+ },
+ "application/x-iso9660-image": {
+ "source": "apache",
+ "extensions": ["iso"]
+ },
+ "application/x-java-jnlp-file": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jnlp"]
+ },
+ "application/x-javascript": {
+ "compressible": true
+ },
+ "application/x-latex": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["latex"]
+ },
+ "application/x-lua-bytecode": {
+ "extensions": ["luac"]
+ },
+ "application/x-lzh-compressed": {
+ "source": "apache",
+ "extensions": ["lzh","lha"]
+ },
+ "application/x-mie": {
+ "source": "apache",
+ "extensions": ["mie"]
+ },
+ "application/x-mobipocket-ebook": {
+ "source": "apache",
+ "extensions": ["prc","mobi"]
+ },
+ "application/x-mpegurl": {
+ "compressible": false
+ },
+ "application/x-ms-application": {
+ "source": "apache",
+ "extensions": ["application"]
+ },
+ "application/x-ms-shortcut": {
+ "source": "apache",
+ "extensions": ["lnk"]
+ },
+ "application/x-ms-wmd": {
+ "source": "apache",
+ "extensions": ["wmd"]
+ },
+ "application/x-ms-wmz": {
+ "source": "apache",
+ "extensions": ["wmz"]
+ },
+ "application/x-ms-xbap": {
+ "source": "apache",
+ "extensions": ["xbap"]
+ },
+ "application/x-msaccess": {
+ "source": "apache",
+ "extensions": ["mdb"]
+ },
+ "application/x-msbinder": {
+ "source": "apache",
+ "extensions": ["obd"]
+ },
+ "application/x-mscardfile": {
+ "source": "apache",
+ "extensions": ["crd"]
+ },
+ "application/x-msclip": {
+ "source": "apache",
+ "extensions": ["clp"]
+ },
+ "application/x-msdownload": {
+ "source": "apache",
+ "extensions": ["exe","dll","com","bat","msi"]
+ },
+ "application/x-msmediaview": {
+ "source": "apache",
+ "extensions": ["mvb","m13","m14"]
+ },
+ "application/x-msmetafile": {
+ "source": "apache",
+ "extensions": ["wmf","wmz","emf","emz"]
+ },
+ "application/x-msmoney": {
+ "source": "apache",
+ "extensions": ["mny"]
+ },
+ "application/x-mspublisher": {
+ "source": "apache",
+ "extensions": ["pub"]
+ },
+ "application/x-msschedule": {
+ "source": "apache",
+ "extensions": ["scd"]
+ },
+ "application/x-msterminal": {
+ "source": "apache",
+ "extensions": ["trm"]
+ },
+ "application/x-mswrite": {
+ "source": "apache",
+ "extensions": ["wri"]
+ },
+ "application/x-netcdf": {
+ "source": "apache",
+ "extensions": ["nc","cdf"]
+ },
+ "application/x-nzb": {
+ "source": "apache",
+ "extensions": ["nzb"]
+ },
+ "application/x-pkcs12": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["p12","pfx"]
+ },
+ "application/x-pkcs7-certificates": {
+ "source": "apache",
+ "extensions": ["p7b","spc"]
+ },
+ "application/x-pkcs7-certreqresp": {
+ "source": "apache",
+ "extensions": ["p7r"]
+ },
+ "application/x-rar-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["rar"]
+ },
+ "application/x-research-info-systems": {
+ "source": "apache",
+ "extensions": ["ris"]
+ },
+ "application/x-sh": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["sh"]
+ },
+ "application/x-shar": {
+ "source": "apache",
+ "extensions": ["shar"]
+ },
+ "application/x-shockwave-flash": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["swf"]
+ },
+ "application/x-silverlight-app": {
+ "source": "apache",
+ "extensions": ["xap"]
+ },
+ "application/x-sql": {
+ "source": "apache",
+ "extensions": ["sql"]
+ },
+ "application/x-stuffit": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["sit"]
+ },
+ "application/x-stuffitx": {
+ "source": "apache",
+ "extensions": ["sitx"]
+ },
+ "application/x-subrip": {
+ "source": "apache",
+ "extensions": ["srt"]
+ },
+ "application/x-sv4cpio": {
+ "source": "apache",
+ "extensions": ["sv4cpio"]
+ },
+ "application/x-sv4crc": {
+ "source": "apache",
+ "extensions": ["sv4crc"]
+ },
+ "application/x-t3vm-image": {
+ "source": "apache",
+ "extensions": ["t3"]
+ },
+ "application/x-tads": {
+ "source": "apache",
+ "extensions": ["gam"]
+ },
+ "application/x-tar": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["tar"]
+ },
+ "application/x-tcl": {
+ "source": "apache",
+ "extensions": ["tcl"]
+ },
+ "application/x-tex": {
+ "source": "apache",
+ "extensions": ["tex"]
+ },
+ "application/x-tex-tfm": {
+ "source": "apache",
+ "extensions": ["tfm"]
+ },
+ "application/x-texinfo": {
+ "source": "apache",
+ "extensions": ["texinfo","texi"]
+ },
+ "application/x-tgif": {
+ "source": "apache",
+ "extensions": ["obj"]
+ },
+ "application/x-ustar": {
+ "source": "apache",
+ "extensions": ["ustar"]
+ },
+ "application/x-wais-source": {
+ "source": "apache",
+ "extensions": ["src"]
+ },
+ "application/x-web-app-manifest+json": {
+ "compressible": true,
+ "extensions": ["webapp"]
+ },
+ "application/x-www-form-urlencoded": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/x-x509-ca-cert": {
+ "source": "apache",
+ "extensions": ["der","crt"]
+ },
+ "application/x-xfig": {
+ "source": "apache",
+ "extensions": ["fig"]
+ },
+ "application/x-xliff+xml": {
+ "source": "apache",
+ "extensions": ["xlf"]
+ },
+ "application/x-xpinstall": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["xpi"]
+ },
+ "application/x-xz": {
+ "source": "apache",
+ "extensions": ["xz"]
+ },
+ "application/x-zmachine": {
+ "source": "apache",
+ "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"]
+ },
+ "application/x400-bp": {
+ "source": "iana"
+ },
+ "application/xacml+xml": {
+ "source": "iana"
+ },
+ "application/xaml+xml": {
+ "source": "apache",
+ "extensions": ["xaml"]
+ },
+ "application/xcap-att+xml": {
+ "source": "iana"
+ },
+ "application/xcap-caps+xml": {
+ "source": "iana"
+ },
+ "application/xcap-diff+xml": {
+ "source": "iana",
+ "extensions": ["xdf"]
+ },
+ "application/xcap-el+xml": {
+ "source": "iana"
+ },
+ "application/xcap-error+xml": {
+ "source": "iana"
+ },
+ "application/xcap-ns+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info-diff+xml": {
+ "source": "iana"
+ },
+ "application/xenc+xml": {
+ "source": "iana",
+ "extensions": ["xenc"]
+ },
+ "application/xhtml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xhtml","xht"]
+ },
+ "application/xhtml-voice+xml": {
+ "source": "iana"
+ },
+ "application/xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xml","xsl","xsd"]
+ },
+ "application/xml-dtd": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dtd"]
+ },
+ "application/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "application/xml-patch+xml": {
+ "source": "iana"
+ },
+ "application/xmpp+xml": {
+ "source": "iana"
+ },
+ "application/xop+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xop"]
+ },
+ "application/xproc+xml": {
+ "source": "apache",
+ "extensions": ["xpl"]
+ },
+ "application/xslt+xml": {
+ "source": "iana",
+ "extensions": ["xslt"]
+ },
+ "application/xspf+xml": {
+ "source": "apache",
+ "extensions": ["xspf"]
+ },
+ "application/xv+xml": {
+ "source": "iana",
+ "extensions": ["mxml","xhvml","xvml","xvm"]
+ },
+ "application/yang": {
+ "source": "iana",
+ "extensions": ["yang"]
+ },
+ "application/yin+xml": {
+ "source": "iana",
+ "extensions": ["yin"]
+ },
+ "application/zip": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["zip"]
+ },
+ "application/zlib": {
+ "source": "iana"
+ },
+ "audio/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "audio/32kadpcm": {
+ "source": "iana"
+ },
+ "audio/3gpp": {
+ "source": "iana"
+ },
+ "audio/3gpp2": {
+ "source": "iana"
+ },
+ "audio/ac3": {
+ "source": "iana"
+ },
+ "audio/adpcm": {
+ "source": "apache",
+ "extensions": ["adp"]
+ },
+ "audio/amr": {
+ "source": "iana"
+ },
+ "audio/amr-wb": {
+ "source": "iana"
+ },
+ "audio/amr-wb+": {
+ "source": "iana"
+ },
+ "audio/aptx": {
+ "source": "iana"
+ },
+ "audio/asc": {
+ "source": "iana"
+ },
+ "audio/atrac-advanced-lossless": {
+ "source": "iana"
+ },
+ "audio/atrac-x": {
+ "source": "iana"
+ },
+ "audio/atrac3": {
+ "source": "iana"
+ },
+ "audio/basic": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["au","snd"]
+ },
+ "audio/bv16": {
+ "source": "iana"
+ },
+ "audio/bv32": {
+ "source": "iana"
+ },
+ "audio/clearmode": {
+ "source": "iana"
+ },
+ "audio/cn": {
+ "source": "iana"
+ },
+ "audio/dat12": {
+ "source": "iana"
+ },
+ "audio/dls": {
+ "source": "iana"
+ },
+ "audio/dsr-es201108": {
+ "source": "iana"
+ },
+ "audio/dsr-es202050": {
+ "source": "iana"
+ },
+ "audio/dsr-es202211": {
+ "source": "iana"
+ },
+ "audio/dsr-es202212": {
+ "source": "iana"
+ },
+ "audio/dv": {
+ "source": "iana"
+ },
+ "audio/dvi4": {
+ "source": "iana"
+ },
+ "audio/eac3": {
+ "source": "iana"
+ },
+ "audio/encaprtp": {
+ "source": "iana"
+ },
+ "audio/evrc": {
+ "source": "iana"
+ },
+ "audio/evrc-qcp": {
+ "source": "iana"
+ },
+ "audio/evrc0": {
+ "source": "iana"
+ },
+ "audio/evrc1": {
+ "source": "iana"
+ },
+ "audio/evrcb": {
+ "source": "iana"
+ },
+ "audio/evrcb0": {
+ "source": "iana"
+ },
+ "audio/evrcb1": {
+ "source": "iana"
+ },
+ "audio/evrcnw": {
+ "source": "iana"
+ },
+ "audio/evrcnw0": {
+ "source": "iana"
+ },
+ "audio/evrcnw1": {
+ "source": "iana"
+ },
+ "audio/evrcwb": {
+ "source": "iana"
+ },
+ "audio/evrcwb0": {
+ "source": "iana"
+ },
+ "audio/evrcwb1": {
+ "source": "iana"
+ },
+ "audio/fwdred": {
+ "source": "iana"
+ },
+ "audio/g719": {
+ "source": "iana"
+ },
+ "audio/g722": {
+ "source": "iana"
+ },
+ "audio/g7221": {
+ "source": "iana"
+ },
+ "audio/g723": {
+ "source": "iana"
+ },
+ "audio/g726-16": {
+ "source": "iana"
+ },
+ "audio/g726-24": {
+ "source": "iana"
+ },
+ "audio/g726-32": {
+ "source": "iana"
+ },
+ "audio/g726-40": {
+ "source": "iana"
+ },
+ "audio/g728": {
+ "source": "iana"
+ },
+ "audio/g729": {
+ "source": "iana"
+ },
+ "audio/g7291": {
+ "source": "iana"
+ },
+ "audio/g729d": {
+ "source": "iana"
+ },
+ "audio/g729e": {
+ "source": "iana"
+ },
+ "audio/gsm": {
+ "source": "iana"
+ },
+ "audio/gsm-efr": {
+ "source": "iana"
+ },
+ "audio/gsm-hr-08": {
+ "source": "iana"
+ },
+ "audio/ilbc": {
+ "source": "iana"
+ },
+ "audio/ip-mr_v2.5": {
+ "source": "iana"
+ },
+ "audio/isac": {
+ "source": "apache"
+ },
+ "audio/l16": {
+ "source": "iana"
+ },
+ "audio/l20": {
+ "source": "iana"
+ },
+ "audio/l24": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/l8": {
+ "source": "iana"
+ },
+ "audio/lpc": {
+ "source": "iana"
+ },
+ "audio/midi": {
+ "source": "apache",
+ "extensions": ["mid","midi","kar","rmi"]
+ },
+ "audio/mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/mp4": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mp4a","m4a"]
+ },
+ "audio/mp4a-latm": {
+ "source": "iana"
+ },
+ "audio/mpa": {
+ "source": "iana"
+ },
+ "audio/mpa-robust": {
+ "source": "iana"
+ },
+ "audio/mpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"]
+ },
+ "audio/mpeg4-generic": {
+ "source": "iana"
+ },
+ "audio/musepack": {
+ "source": "apache"
+ },
+ "audio/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["oga","ogg","spx"]
+ },
+ "audio/opus": {
+ "source": "apache"
+ },
+ "audio/parityfec": {
+ "source": "iana"
+ },
+ "audio/pcma": {
+ "source": "iana"
+ },
+ "audio/pcma-wb": {
+ "source": "iana"
+ },
+ "audio/pcmu": {
+ "source": "iana"
+ },
+ "audio/pcmu-wb": {
+ "source": "iana"
+ },
+ "audio/prs.sid": {
+ "source": "iana"
+ },
+ "audio/qcelp": {
+ "source": "iana"
+ },
+ "audio/raptorfec": {
+ "source": "iana"
+ },
+ "audio/red": {
+ "source": "iana"
+ },
+ "audio/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "audio/rtp-midi": {
+ "source": "iana"
+ },
+ "audio/rtploopback": {
+ "source": "iana"
+ },
+ "audio/rtx": {
+ "source": "iana"
+ },
+ "audio/s3m": {
+ "source": "apache",
+ "extensions": ["s3m"]
+ },
+ "audio/silk": {
+ "source": "apache",
+ "extensions": ["sil"]
+ },
+ "audio/smv": {
+ "source": "iana"
+ },
+ "audio/smv-qcp": {
+ "source": "iana"
+ },
+ "audio/smv0": {
+ "source": "iana"
+ },
+ "audio/sp-midi": {
+ "source": "iana"
+ },
+ "audio/speex": {
+ "source": "iana"
+ },
+ "audio/t140c": {
+ "source": "iana"
+ },
+ "audio/t38": {
+ "source": "iana"
+ },
+ "audio/telephone-event": {
+ "source": "iana"
+ },
+ "audio/tone": {
+ "source": "iana"
+ },
+ "audio/uemclip": {
+ "source": "iana"
+ },
+ "audio/ulpfec": {
+ "source": "iana"
+ },
+ "audio/vdvi": {
+ "source": "iana"
+ },
+ "audio/vmr-wb": {
+ "source": "iana"
+ },
+ "audio/vnd.3gpp.iufp": {
+ "source": "iana"
+ },
+ "audio/vnd.4sb": {
+ "source": "iana"
+ },
+ "audio/vnd.audiokoz": {
+ "source": "iana"
+ },
+ "audio/vnd.celp": {
+ "source": "iana"
+ },
+ "audio/vnd.cisco.nse": {
+ "source": "iana"
+ },
+ "audio/vnd.cmles.radio-events": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.anp1": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.inf1": {
+ "source": "iana"
+ },
+ "audio/vnd.dece.audio": {
+ "source": "iana",
+ "extensions": ["uva","uvva"]
+ },
+ "audio/vnd.digital-winds": {
+ "source": "iana",
+ "extensions": ["eol"]
+ },
+ "audio/vnd.dlna.adts": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mlp": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mps": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2x": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2z": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pulse.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dra": {
+ "source": "iana",
+ "extensions": ["dra"]
+ },
+ "audio/vnd.dts": {
+ "source": "iana",
+ "extensions": ["dts"]
+ },
+ "audio/vnd.dts.hd": {
+ "source": "iana",
+ "extensions": ["dtshd"]
+ },
+ "audio/vnd.dvb.file": {
+ "source": "iana"
+ },
+ "audio/vnd.everad.plj": {
+ "source": "iana"
+ },
+ "audio/vnd.hns.audio": {
+ "source": "iana"
+ },
+ "audio/vnd.lucent.voice": {
+ "source": "iana",
+ "extensions": ["lvp"]
+ },
+ "audio/vnd.ms-playready.media.pya": {
+ "source": "iana",
+ "extensions": ["pya"]
+ },
+ "audio/vnd.nokia.mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/vnd.nortel.vbk": {
+ "source": "iana"
+ },
+ "audio/vnd.nuera.ecelp4800": {
+ "source": "iana",
+ "extensions": ["ecelp4800"]
+ },
+ "audio/vnd.nuera.ecelp7470": {
+ "source": "iana",
+ "extensions": ["ecelp7470"]
+ },
+ "audio/vnd.nuera.ecelp9600": {
+ "source": "iana",
+ "extensions": ["ecelp9600"]
+ },
+ "audio/vnd.octel.sbc": {
+ "source": "iana"
+ },
+ "audio/vnd.qcelp": {
+ "source": "iana"
+ },
+ "audio/vnd.rhetorex.32kadpcm": {
+ "source": "iana"
+ },
+ "audio/vnd.rip": {
+ "source": "iana",
+ "extensions": ["rip"]
+ },
+ "audio/vnd.rn-realaudio": {
+ "compressible": false
+ },
+ "audio/vnd.sealedmedia.softseal.mpeg": {
+ "source": "iana"
+ },
+ "audio/vnd.vmx.cvsd": {
+ "source": "iana"
+ },
+ "audio/vnd.wave": {
+ "compressible": false
+ },
+ "audio/vorbis": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/vorbis-config": {
+ "source": "iana"
+ },
+ "audio/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["weba"]
+ },
+ "audio/x-aac": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["aac"]
+ },
+ "audio/x-aiff": {
+ "source": "apache",
+ "extensions": ["aif","aiff","aifc"]
+ },
+ "audio/x-caf": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["caf"]
+ },
+ "audio/x-flac": {
+ "source": "apache",
+ "extensions": ["flac"]
+ },
+ "audio/x-matroska": {
+ "source": "apache",
+ "extensions": ["mka"]
+ },
+ "audio/x-mpegurl": {
+ "source": "apache",
+ "extensions": ["m3u"]
+ },
+ "audio/x-ms-wax": {
+ "source": "apache",
+ "extensions": ["wax"]
+ },
+ "audio/x-ms-wma": {
+ "source": "apache",
+ "extensions": ["wma"]
+ },
+ "audio/x-pn-realaudio": {
+ "source": "apache",
+ "extensions": ["ram","ra"]
+ },
+ "audio/x-pn-realaudio-plugin": {
+ "source": "apache",
+ "extensions": ["rmp"]
+ },
+ "audio/x-tta": {
+ "source": "apache"
+ },
+ "audio/x-wav": {
+ "source": "apache",
+ "extensions": ["wav"]
+ },
+ "audio/xm": {
+ "source": "apache",
+ "extensions": ["xm"]
+ },
+ "chemical/x-cdx": {
+ "source": "apache",
+ "extensions": ["cdx"]
+ },
+ "chemical/x-cif": {
+ "source": "apache",
+ "extensions": ["cif"]
+ },
+ "chemical/x-cmdf": {
+ "source": "apache",
+ "extensions": ["cmdf"]
+ },
+ "chemical/x-cml": {
+ "source": "apache",
+ "extensions": ["cml"]
+ },
+ "chemical/x-csml": {
+ "source": "apache",
+ "extensions": ["csml"]
+ },
+ "chemical/x-pdb": {
+ "source": "apache"
+ },
+ "chemical/x-xyz": {
+ "source": "apache",
+ "extensions": ["xyz"]
+ },
+ "font/opentype": {
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "image/bmp": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["bmp"]
+ },
+ "image/cgm": {
+ "source": "iana",
+ "extensions": ["cgm"]
+ },
+ "image/fits": {
+ "source": "iana"
+ },
+ "image/g3fax": {
+ "source": "iana",
+ "extensions": ["g3"]
+ },
+ "image/gif": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["gif"]
+ },
+ "image/ief": {
+ "source": "iana",
+ "extensions": ["ief"]
+ },
+ "image/jp2": {
+ "source": "iana"
+ },
+ "image/jpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["jpeg","jpg","jpe"]
+ },
+ "image/jpm": {
+ "source": "iana"
+ },
+ "image/jpx": {
+ "source": "iana"
+ },
+ "image/ktx": {
+ "source": "iana",
+ "extensions": ["ktx"]
+ },
+ "image/naplps": {
+ "source": "iana"
+ },
+ "image/pjpeg": {
+ "compressible": false
+ },
+ "image/png": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["png"]
+ },
+ "image/prs.btif": {
+ "source": "iana",
+ "extensions": ["btif"]
+ },
+ "image/prs.pti": {
+ "source": "iana"
+ },
+ "image/pwg-raster": {
+ "source": "iana"
+ },
+ "image/sgi": {
+ "source": "apache",
+ "extensions": ["sgi"]
+ },
+ "image/svg+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["svg","svgz"]
+ },
+ "image/t38": {
+ "source": "iana"
+ },
+ "image/tiff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["tiff","tif"]
+ },
+ "image/tiff-fx": {
+ "source": "iana"
+ },
+ "image/vnd.adobe.photoshop": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["psd"]
+ },
+ "image/vnd.airzip.accelerator.azv": {
+ "source": "iana"
+ },
+ "image/vnd.cns.inf2": {
+ "source": "iana"
+ },
+ "image/vnd.dece.graphic": {
+ "source": "iana",
+ "extensions": ["uvi","uvvi","uvg","uvvg"]
+ },
+ "image/vnd.djvu": {
+ "source": "iana",
+ "extensions": ["djvu","djv"]
+ },
+ "image/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "image/vnd.dwg": {
+ "source": "iana",
+ "extensions": ["dwg"]
+ },
+ "image/vnd.dxf": {
+ "source": "iana",
+ "extensions": ["dxf"]
+ },
+ "image/vnd.fastbidsheet": {
+ "source": "iana",
+ "extensions": ["fbs"]
+ },
+ "image/vnd.fpx": {
+ "source": "iana",
+ "extensions": ["fpx"]
+ },
+ "image/vnd.fst": {
+ "source": "iana",
+ "extensions": ["fst"]
+ },
+ "image/vnd.fujixerox.edmics-mmr": {
+ "source": "iana",
+ "extensions": ["mmr"]
+ },
+ "image/vnd.fujixerox.edmics-rlc": {
+ "source": "iana",
+ "extensions": ["rlc"]
+ },
+ "image/vnd.globalgraphics.pgb": {
+ "source": "iana"
+ },
+ "image/vnd.microsoft.icon": {
+ "source": "iana"
+ },
+ "image/vnd.mix": {
+ "source": "iana"
+ },
+ "image/vnd.ms-modi": {
+ "source": "iana",
+ "extensions": ["mdi"]
+ },
+ "image/vnd.ms-photo": {
+ "source": "apache",
+ "extensions": ["wdp"]
+ },
+ "image/vnd.net-fpx": {
+ "source": "iana",
+ "extensions": ["npx"]
+ },
+ "image/vnd.radiance": {
+ "source": "iana"
+ },
+ "image/vnd.sealed.png": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.gif": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.jpg": {
+ "source": "iana"
+ },
+ "image/vnd.svf": {
+ "source": "iana"
+ },
+ "image/vnd.tencent.tap": {
+ "source": "iana"
+ },
+ "image/vnd.valve.source.texture": {
+ "source": "iana"
+ },
+ "image/vnd.wap.wbmp": {
+ "source": "iana",
+ "extensions": ["wbmp"]
+ },
+ "image/vnd.xiff": {
+ "source": "iana",
+ "extensions": ["xif"]
+ },
+ "image/webp": {
+ "source": "apache",
+ "extensions": ["webp"]
+ },
+ "image/x-3ds": {
+ "source": "apache",
+ "extensions": ["3ds"]
+ },
+ "image/x-cmu-raster": {
+ "source": "apache",
+ "extensions": ["ras"]
+ },
+ "image/x-cmx": {
+ "source": "apache",
+ "extensions": ["cmx"]
+ },
+ "image/x-freehand": {
+ "source": "apache",
+ "extensions": ["fh","fhc","fh4","fh5","fh7"]
+ },
+ "image/x-icon": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ico"]
+ },
+ "image/x-mrsid-image": {
+ "source": "apache",
+ "extensions": ["sid"]
+ },
+ "image/x-pcx": {
+ "source": "apache",
+ "extensions": ["pcx"]
+ },
+ "image/x-pict": {
+ "source": "apache",
+ "extensions": ["pic","pct"]
+ },
+ "image/x-portable-anymap": {
+ "source": "apache",
+ "extensions": ["pnm"]
+ },
+ "image/x-portable-bitmap": {
+ "source": "apache",
+ "extensions": ["pbm"]
+ },
+ "image/x-portable-graymap": {
+ "source": "apache",
+ "extensions": ["pgm"]
+ },
+ "image/x-portable-pixmap": {
+ "source": "apache",
+ "extensions": ["ppm"]
+ },
+ "image/x-rgb": {
+ "source": "apache",
+ "extensions": ["rgb"]
+ },
+ "image/x-tga": {
+ "source": "apache",
+ "extensions": ["tga"]
+ },
+ "image/x-xbitmap": {
+ "source": "apache",
+ "extensions": ["xbm"]
+ },
+ "image/x-xcf": {
+ "compressible": false
+ },
+ "image/x-xpixmap": {
+ "source": "apache",
+ "extensions": ["xpm"]
+ },
+ "image/x-xwindowdump": {
+ "source": "apache",
+ "extensions": ["xwd"]
+ },
+ "message/cpim": {
+ "source": "iana"
+ },
+ "message/delivery-status": {
+ "source": "iana"
+ },
+ "message/disposition-notification": {
+ "source": "iana"
+ },
+ "message/external-body": {
+ "source": "iana"
+ },
+ "message/feedback-report": {
+ "source": "iana"
+ },
+ "message/global": {
+ "source": "iana"
+ },
+ "message/global-delivery-status": {
+ "source": "iana"
+ },
+ "message/global-disposition-notification": {
+ "source": "iana"
+ },
+ "message/global-headers": {
+ "source": "iana"
+ },
+ "message/http": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/imdn+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "message/news": {
+ "source": "iana"
+ },
+ "message/partial": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/rfc822": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eml","mime"]
+ },
+ "message/s-http": {
+ "source": "iana"
+ },
+ "message/sip": {
+ "source": "iana"
+ },
+ "message/sipfrag": {
+ "source": "iana"
+ },
+ "message/tracking-status": {
+ "source": "iana"
+ },
+ "message/vnd.si.simp": {
+ "source": "iana"
+ },
+ "message/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "model/iges": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["igs","iges"]
+ },
+ "model/mesh": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["msh","mesh","silo"]
+ },
+ "model/vnd.collada+xml": {
+ "source": "iana",
+ "extensions": ["dae"]
+ },
+ "model/vnd.dwf": {
+ "source": "iana",
+ "extensions": ["dwf"]
+ },
+ "model/vnd.flatland.3dml": {
+ "source": "iana"
+ },
+ "model/vnd.gdl": {
+ "source": "iana",
+ "extensions": ["gdl"]
+ },
+ "model/vnd.gs-gdl": {
+ "source": "apache"
+ },
+ "model/vnd.gs.gdl": {
+ "source": "iana"
+ },
+ "model/vnd.gtw": {
+ "source": "iana",
+ "extensions": ["gtw"]
+ },
+ "model/vnd.moml+xml": {
+ "source": "iana"
+ },
+ "model/vnd.mts": {
+ "source": "iana",
+ "extensions": ["mts"]
+ },
+ "model/vnd.opengex": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.binary": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.text": {
+ "source": "iana"
+ },
+ "model/vnd.valve.source.compiled-map": {
+ "source": "iana"
+ },
+ "model/vnd.vtu": {
+ "source": "iana",
+ "extensions": ["vtu"]
+ },
+ "model/vrml": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["wrl","vrml"]
+ },
+ "model/x3d+binary": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3db","x3dbz"]
+ },
+ "model/x3d+fastinfoset": {
+ "source": "iana"
+ },
+ "model/x3d+vrml": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3dv","x3dvz"]
+ },
+ "model/x3d+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["x3d","x3dz"]
+ },
+ "model/x3d-vrml": {
+ "source": "iana"
+ },
+ "multipart/alternative": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/appledouble": {
+ "source": "iana"
+ },
+ "multipart/byteranges": {
+ "source": "iana"
+ },
+ "multipart/digest": {
+ "source": "iana"
+ },
+ "multipart/encrypted": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/form-data": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/header-set": {
+ "source": "iana"
+ },
+ "multipart/mixed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/parallel": {
+ "source": "iana"
+ },
+ "multipart/related": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/report": {
+ "source": "iana"
+ },
+ "multipart/signed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/voice-message": {
+ "source": "iana"
+ },
+ "multipart/x-mixed-replace": {
+ "source": "iana"
+ },
+ "text/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "text/cache-manifest": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["appcache","manifest"]
+ },
+ "text/calendar": {
+ "source": "iana",
+ "extensions": ["ics","ifb"]
+ },
+ "text/calender": {
+ "compressible": true
+ },
+ "text/cmd": {
+ "compressible": true
+ },
+ "text/coffeescript": {
+ "extensions": ["coffee"]
+ },
+ "text/css": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["css"]
+ },
+ "text/csv": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["csv"]
+ },
+ "text/csv-schema": {
+ "source": "iana"
+ },
+ "text/directory": {
+ "source": "iana"
+ },
+ "text/dns": {
+ "source": "iana"
+ },
+ "text/ecmascript": {
+ "source": "iana"
+ },
+ "text/encaprtp": {
+ "source": "iana"
+ },
+ "text/enriched": {
+ "source": "iana"
+ },
+ "text/fwdred": {
+ "source": "iana"
+ },
+ "text/grammar-ref-list": {
+ "source": "iana"
+ },
+ "text/hjson": {
+ "extensions": ["hjson"]
+ },
+ "text/html": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["html","htm"]
+ },
+ "text/jade": {
+ "extensions": ["jade"]
+ },
+ "text/javascript": {
+ "source": "iana",
+ "compressible": true
+ },
+ "text/jcr-cnd": {
+ "source": "iana"
+ },
+ "text/jsx": {
+ "compressible": true,
+ "extensions": ["jsx"]
+ },
+ "text/less": {
+ "extensions": ["less"]
+ },
+ "text/markdown": {
+ "source": "iana"
+ },
+ "text/mizar": {
+ "source": "iana"
+ },
+ "text/n3": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["n3"]
+ },
+ "text/parameters": {
+ "source": "iana"
+ },
+ "text/parityfec": {
+ "source": "iana"
+ },
+ "text/plain": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["txt","text","conf","def","list","log","in","ini"]
+ },
+ "text/provenance-notation": {
+ "source": "iana"
+ },
+ "text/prs.fallenstein.rst": {
+ "source": "iana"
+ },
+ "text/prs.lines.tag": {
+ "source": "iana",
+ "extensions": ["dsc"]
+ },
+ "text/raptorfec": {
+ "source": "iana"
+ },
+ "text/red": {
+ "source": "iana"
+ },
+ "text/rfc822-headers": {
+ "source": "iana"
+ },
+ "text/richtext": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtx"]
+ },
+ "text/rtf": {
+ "source": "iana"
+ },
+ "text/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "text/rtploopback": {
+ "source": "iana"
+ },
+ "text/rtx": {
+ "source": "iana"
+ },
+ "text/sgml": {
+ "source": "iana",
+ "extensions": ["sgml","sgm"]
+ },
+ "text/stylus": {
+ "extensions": ["stylus","styl"]
+ },
+ "text/t140": {
+ "source": "iana"
+ },
+ "text/tab-separated-values": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["tsv"]
+ },
+ "text/troff": {
+ "source": "iana",
+ "extensions": ["t","tr","roff","man","me","ms"]
+ },
+ "text/turtle": {
+ "source": "iana",
+ "extensions": ["ttl"]
+ },
+ "text/ulpfec": {
+ "source": "iana"
+ },
+ "text/uri-list": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["uri","uris","urls"]
+ },
+ "text/vcard": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["vcard"]
+ },
+ "text/vnd.a": {
+ "source": "iana"
+ },
+ "text/vnd.abc": {
+ "source": "iana"
+ },
+ "text/vnd.curl": {
+ "source": "iana",
+ "extensions": ["curl"]
+ },
+ "text/vnd.curl.dcurl": {
+ "source": "apache",
+ "extensions": ["dcurl"]
+ },
+ "text/vnd.curl.mcurl": {
+ "source": "apache",
+ "extensions": ["mcurl"]
+ },
+ "text/vnd.curl.scurl": {
+ "source": "apache",
+ "extensions": ["scurl"]
+ },
+ "text/vnd.debian.copyright": {
+ "source": "iana"
+ },
+ "text/vnd.dmclientscript": {
+ "source": "iana"
+ },
+ "text/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "text/vnd.esmertec.theme-descriptor": {
+ "source": "iana"
+ },
+ "text/vnd.fly": {
+ "source": "iana",
+ "extensions": ["fly"]
+ },
+ "text/vnd.fmi.flexstor": {
+ "source": "iana",
+ "extensions": ["flx"]
+ },
+ "text/vnd.graphviz": {
+ "source": "iana",
+ "extensions": ["gv"]
+ },
+ "text/vnd.in3d.3dml": {
+ "source": "iana",
+ "extensions": ["3dml"]
+ },
+ "text/vnd.in3d.spot": {
+ "source": "iana",
+ "extensions": ["spot"]
+ },
+ "text/vnd.iptc.newsml": {
+ "source": "iana"
+ },
+ "text/vnd.iptc.nitf": {
+ "source": "iana"
+ },
+ "text/vnd.latex-z": {
+ "source": "iana"
+ },
+ "text/vnd.motorola.reflex": {
+ "source": "iana"
+ },
+ "text/vnd.ms-mediapackage": {
+ "source": "iana"
+ },
+ "text/vnd.net2phone.commcenter.command": {
+ "source": "iana"
+ },
+ "text/vnd.radisys.msml-basic-layout": {
+ "source": "iana"
+ },
+ "text/vnd.si.uricatalogue": {
+ "source": "iana"
+ },
+ "text/vnd.sun.j2me.app-descriptor": {
+ "source": "iana",
+ "extensions": ["jad"]
+ },
+ "text/vnd.trolltech.linguist": {
+ "source": "iana"
+ },
+ "text/vnd.wap.si": {
+ "source": "iana"
+ },
+ "text/vnd.wap.sl": {
+ "source": "iana"
+ },
+ "text/vnd.wap.wml": {
+ "source": "iana",
+ "extensions": ["wml"]
+ },
+ "text/vnd.wap.wmlscript": {
+ "source": "iana",
+ "extensions": ["wmls"]
+ },
+ "text/vtt": {
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["vtt"]
+ },
+ "text/x-asm": {
+ "source": "apache",
+ "extensions": ["s","asm"]
+ },
+ "text/x-c": {
+ "source": "apache",
+ "extensions": ["c","cc","cxx","cpp","h","hh","dic"]
+ },
+ "text/x-component": {
+ "extensions": ["htc"]
+ },
+ "text/x-fortran": {
+ "source": "apache",
+ "extensions": ["f","for","f77","f90"]
+ },
+ "text/x-gwt-rpc": {
+ "compressible": true
+ },
+ "text/x-handlebars-template": {
+ "extensions": ["hbs"]
+ },
+ "text/x-java-source": {
+ "source": "apache",
+ "extensions": ["java"]
+ },
+ "text/x-jquery-tmpl": {
+ "compressible": true
+ },
+ "text/x-lua": {
+ "extensions": ["lua"]
+ },
+ "text/x-markdown": {
+ "compressible": true,
+ "extensions": ["markdown","md","mkd"]
+ },
+ "text/x-nfo": {
+ "source": "apache",
+ "extensions": ["nfo"]
+ },
+ "text/x-opml": {
+ "source": "apache",
+ "extensions": ["opml"]
+ },
+ "text/x-pascal": {
+ "source": "apache",
+ "extensions": ["p","pas"]
+ },
+ "text/x-sass": {
+ "extensions": ["sass"]
+ },
+ "text/x-scss": {
+ "extensions": ["scss"]
+ },
+ "text/x-setext": {
+ "source": "apache",
+ "extensions": ["etx"]
+ },
+ "text/x-sfv": {
+ "source": "apache",
+ "extensions": ["sfv"]
+ },
+ "text/x-uuencode": {
+ "source": "apache",
+ "extensions": ["uu"]
+ },
+ "text/x-vcalendar": {
+ "source": "apache",
+ "extensions": ["vcs"]
+ },
+ "text/x-vcard": {
+ "source": "apache",
+ "extensions": ["vcf"]
+ },
+ "text/xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "text/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "text/yaml": {
+ "extensions": ["yaml","yml"]
+ },
+ "video/1d-interleaved-parityfec": {
+ "source": "apache"
+ },
+ "video/3gpp": {
+ "source": "apache",
+ "extensions": ["3gp"]
+ },
+ "video/3gpp-tt": {
+ "source": "apache"
+ },
+ "video/3gpp2": {
+ "source": "apache",
+ "extensions": ["3g2"]
+ },
+ "video/bmpeg": {
+ "source": "apache"
+ },
+ "video/bt656": {
+ "source": "apache"
+ },
+ "video/celb": {
+ "source": "apache"
+ },
+ "video/dv": {
+ "source": "apache"
+ },
+ "video/h261": {
+ "source": "apache",
+ "extensions": ["h261"]
+ },
+ "video/h263": {
+ "source": "apache",
+ "extensions": ["h263"]
+ },
+ "video/h263-1998": {
+ "source": "apache"
+ },
+ "video/h263-2000": {
+ "source": "apache"
+ },
+ "video/h264": {
+ "source": "apache",
+ "extensions": ["h264"]
+ },
+ "video/h264-rcdo": {
+ "source": "apache"
+ },
+ "video/h264-svc": {
+ "source": "apache"
+ },
+ "video/jpeg": {
+ "source": "apache",
+ "extensions": ["jpgv"]
+ },
+ "video/jpeg2000": {
+ "source": "apache"
+ },
+ "video/jpm": {
+ "source": "apache",
+ "extensions": ["jpm","jpgm"]
+ },
+ "video/mj2": {
+ "source": "apache",
+ "extensions": ["mj2","mjp2"]
+ },
+ "video/mp1s": {
+ "source": "apache"
+ },
+ "video/mp2p": {
+ "source": "apache"
+ },
+ "video/mp2t": {
+ "source": "apache",
+ "extensions": ["ts"]
+ },
+ "video/mp4": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mp4","mp4v","mpg4"]
+ },
+ "video/mp4v-es": {
+ "source": "apache"
+ },
+ "video/mpeg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mpeg","mpg","mpe","m1v","m2v"]
+ },
+ "video/mpeg4-generic": {
+ "source": "apache"
+ },
+ "video/mpv": {
+ "source": "apache"
+ },
+ "video/nv": {
+ "source": "apache"
+ },
+ "video/ogg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ogv"]
+ },
+ "video/parityfec": {
+ "source": "apache"
+ },
+ "video/pointer": {
+ "source": "apache"
+ },
+ "video/quicktime": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["qt","mov"]
+ },
+ "video/raw": {
+ "source": "apache"
+ },
+ "video/rtp-enc-aescm128": {
+ "source": "apache"
+ },
+ "video/rtx": {
+ "source": "apache"
+ },
+ "video/smpte292m": {
+ "source": "apache"
+ },
+ "video/ulpfec": {
+ "source": "apache"
+ },
+ "video/vc1": {
+ "source": "apache"
+ },
+ "video/vnd.cctv": {
+ "source": "apache"
+ },
+ "video/vnd.dece.hd": {
+ "source": "apache",
+ "extensions": ["uvh","uvvh"]
+ },
+ "video/vnd.dece.mobile": {
+ "source": "apache",
+ "extensions": ["uvm","uvvm"]
+ },
+ "video/vnd.dece.mp4": {
+ "source": "apache"
+ },
+ "video/vnd.dece.pd": {
+ "source": "apache",
+ "extensions": ["uvp","uvvp"]
+ },
+ "video/vnd.dece.sd": {
+ "source": "apache",
+ "extensions": ["uvs","uvvs"]
+ },
+ "video/vnd.dece.video": {
+ "source": "apache",
+ "extensions": ["uvv","uvvv"]
+ },
+ "video/vnd.directv.mpeg": {
+ "source": "apache"
+ },
+ "video/vnd.directv.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dlna.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dvb.file": {
+ "source": "apache",
+ "extensions": ["dvb"]
+ },
+ "video/vnd.fvt": {
+ "source": "apache",
+ "extensions": ["fvt"]
+ },
+ "video/vnd.hns.video": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsavc": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsmpeg2": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.video": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.videop": {
+ "source": "apache"
+ },
+ "video/vnd.mpegurl": {
+ "source": "apache",
+ "extensions": ["mxu","m4u"]
+ },
+ "video/vnd.ms-playready.media.pyv": {
+ "source": "apache",
+ "extensions": ["pyv"]
+ },
+ "video/vnd.nokia.interleaved-multimedia": {
+ "source": "apache"
+ },
+ "video/vnd.nokia.videovoip": {
+ "source": "apache"
+ },
+ "video/vnd.objectvideo": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg1": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg4": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.swf": {
+ "source": "apache"
+ },
+ "video/vnd.sealedmedia.softseal.mov": {
+ "source": "apache"
+ },
+ "video/vnd.uvvu.mp4": {
+ "source": "apache",
+ "extensions": ["uvu","uvvu"]
+ },
+ "video/vnd.vivo": {
+ "source": "apache",
+ "extensions": ["viv"]
+ },
+ "video/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["webm"]
+ },
+ "video/x-f4v": {
+ "source": "apache",
+ "extensions": ["f4v"]
+ },
+ "video/x-fli": {
+ "source": "apache",
+ "extensions": ["fli"]
+ },
+ "video/x-flv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["flv"]
+ },
+ "video/x-m4v": {
+ "source": "apache",
+ "extensions": ["m4v"]
+ },
+ "video/x-matroska": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mkv","mk3d","mks"]
+ },
+ "video/x-mng": {
+ "source": "apache",
+ "extensions": ["mng"]
+ },
+ "video/x-ms-asf": {
+ "source": "apache",
+ "extensions": ["asf","asx"]
+ },
+ "video/x-ms-vob": {
+ "source": "apache",
+ "extensions": ["vob"]
+ },
+ "video/x-ms-wm": {
+ "source": "apache",
+ "extensions": ["wm"]
+ },
+ "video/x-ms-wmv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["wmv"]
+ },
+ "video/x-ms-wmx": {
+ "source": "apache",
+ "extensions": ["wmx"]
+ },
+ "video/x-ms-wvx": {
+ "source": "apache",
+ "extensions": ["wvx"]
+ },
+ "video/x-msvideo": {
+ "source": "apache",
+ "extensions": ["avi"]
+ },
+ "video/x-sgi-movie": {
+ "source": "apache",
+ "extensions": ["movie"]
+ },
+ "video/x-smv": {
+ "source": "apache",
+ "extensions": ["smv"]
+ },
+ "x-conference/x-cooltalk": {
+ "source": "apache",
+ "extensions": ["ice"]
+ },
+ "x-shader/x-fragment": {
+ "compressible": true
+ },
+ "x-shader/x-vertex": {
+ "compressible": true
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js
new file mode 100644
index 0000000..551031f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js
@@ -0,0 +1,11 @@
+/*!
+ * mime-db
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = require('./db.json')
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json
new file mode 100644
index 0000000..135ef18
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json
@@ -0,0 +1,93 @@
+{
+ "name": "mime-db",
+ "description": "Media Type Database",
+ "version": "1.7.0",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "db",
+ "type",
+ "types",
+ "database",
+ "charset",
+ "charsets"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/mime-db"
+ },
+ "devDependencies": {
+ "co": "4",
+ "cogent": "1",
+ "csv-parse": "0",
+ "gnode": "0.1.0",
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.4",
+ "raw-body": "~1.3.2",
+ "stream-to-array": "2"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "db.json",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "build": "node scripts/build",
+ "fetch": "gnode scripts/extensions && gnode scripts/types",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "update": "npm run fetch && npm run build"
+ },
+ "gitHead": "972cc3ed48530ab7aca7a155bf2dbd1b13aa8f86",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-db/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-db",
+ "_id": "mime-db@1.7.0",
+ "_shasum": "36cf66a6c52ea71827bde287f77c254f5ef1b8d3",
+ "_from": "mime-db@~1.7.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "36cf66a6c52ea71827bde287f77c254f5ef1b8d3",
+ "tarball": "http://registry.npmjs.org/mime-db/-/mime-db-1.7.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.7.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json
new file mode 100644
index 0000000..9b5b766
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json
@@ -0,0 +1,84 @@
+{
+ "name": "mime-types",
+ "description": "The ultimate javascript content-type utility.",
+ "version": "2.0.9",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jeremiah Senkpiel",
+ "email": "fishrock123@rocketmail.com",
+ "url": "https://searchbeam.jit.su"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "types"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/mime-types"
+ },
+ "dependencies": {
+ "mime-db": "~1.7.0"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec test/test.js",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
+ },
+ "gitHead": "1c6d55da440b6a9d2c0e9c2faac98e6b1be47fc7",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-types/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-types",
+ "_id": "mime-types@2.0.9",
+ "_shasum": "e8449aff27b1245ddc6641b524439ae80c4b78a6",
+ "_from": "mime-types@~2.0.9",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e8449aff27b1245ddc6641b524439ae80c4b78a6",
+ "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-2.0.9.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.9.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/package.json
new file mode 100644
index 0000000..30dbc5e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/type-is/package.json
@@ -0,0 +1,93 @@
+{
+ "name": "type-is",
+ "description": "Infer the content-type of a request.",
+ "version": "1.5.7",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/type-is"
+ },
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.0.9"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.5"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "keywords": [
+ "content",
+ "type",
+ "checking"
+ ],
+ "gitHead": "f4335cc563a98ee80366f04f67c50cef089ae803",
+ "bugs": {
+ "url": "https://github.com/jshttp/type-is/issues"
+ },
+ "homepage": "https://github.com/jshttp/type-is",
+ "_id": "type-is@1.5.7",
+ "_shasum": "b9368a593cc6ef7d0645e78b2f4c64cbecd05e90",
+ "_from": "type-is@~1.5.6",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b9368a593cc6ef7d0645e78b2f4c64cbecd05e90",
+ "tarball": "http://registry.npmjs.org/type-is/-/type-is-1.5.7.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/type-is/-/type-is-1.5.7.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/.travis.yml b/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/.travis.yml
new file mode 100644
index 0000000..af92b02
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/.travis.yml
@@ -0,0 +1,6 @@
+language: "node_js"
+node_js:
+ - "0.4"
+ - "0.6"
+ - "0.8"
+ - "0.10"
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/LICENSE
new file mode 100644
index 0000000..e33bd10
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2013 Jared Hanson
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/README.md
new file mode 100644
index 0000000..2f94e9b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/README.md
@@ -0,0 +1,34 @@
+# utils-merge
+
+Merges the properties from a source object into a destination object.
+
+## Install
+
+ $ npm install utils-merge
+
+## Usage
+
+```javascript
+var a = { foo: 'bar' }
+ , b = { bar: 'baz' };
+
+merge(a, b);
+// => { foo: 'bar', bar: 'baz' }
+```
+
+## Tests
+
+ $ npm install
+ $ npm test
+
+[![Build Status](https://secure.travis-ci.org/jaredhanson/utils-merge.png)](http://travis-ci.org/jaredhanson/utils-merge)
+
+## Credits
+
+ - [Jared Hanson](http://github.com/jaredhanson)
+
+## License
+
+[The MIT License](http://opensource.org/licenses/MIT)
+
+Copyright (c) 2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/index.js
new file mode 100644
index 0000000..4265c69
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/index.js
@@ -0,0 +1,23 @@
+/**
+ * Merge object b with object a.
+ *
+ * var a = { foo: 'bar' }
+ * , b = { bar: 'baz' };
+ *
+ * merge(a, b);
+ * // => { foo: 'bar', bar: 'baz' }
+ *
+ * @param {Object} a
+ * @param {Object} b
+ * @return {Object}
+ * @api public
+ */
+
+exports = module.exports = function(a, b){
+ if (a && b) {
+ for (var key in b) {
+ a[key] = b[key];
+ }
+ }
+ return a;
+};
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/package.json
new file mode 100644
index 0000000..dea84ba
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/utils-merge/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "utils-merge",
+ "version": "1.0.0",
+ "description": "merge() utility function",
+ "keywords": [
+ "util"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/jaredhanson/utils-merge.git"
+ },
+ "bugs": {
+ "url": "http://github.com/jaredhanson/utils-merge/issues"
+ },
+ "author": {
+ "name": "Jared Hanson",
+ "email": "jaredhanson@gmail.com",
+ "url": "http://www.jaredhanson.net/"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://www.opensource.org/licenses/MIT"
+ }
+ ],
+ "main": "./index",
+ "dependencies": {},
+ "devDependencies": {
+ "mocha": "1.x.x",
+ "chai": "1.x.x"
+ },
+ "scripts": {
+ "test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ },
+ "_id": "utils-merge@1.0.0",
+ "dist": {
+ "shasum": "0294fb922bb9375153541c4f7096231f287c8af8",
+ "tarball": "http://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
+ },
+ "_from": "utils-merge@1.0.0",
+ "_npmVersion": "1.2.25",
+ "_npmUser": {
+ "name": "jaredhanson",
+ "email": "jaredhanson@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jaredhanson",
+ "email": "jaredhanson@gmail.com"
+ }
+ ],
+ "_shasum": "0294fb922bb9375153541c4f7096231f287c8af8",
+ "_resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/vary/.npmignore b/dgbuilder/dgeflows/node_modules/express/node_modules/vary/.npmignore
new file mode 100644
index 0000000..cd39b77
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/vary/.npmignore
@@ -0,0 +1,3 @@
+coverage/
+test/
+.travis.yml
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/vary/History.md b/dgbuilder/dgeflows/node_modules/express/node_modules/vary/History.md
new file mode 100644
index 0000000..e5d8e69
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/vary/History.md
@@ -0,0 +1,16 @@
+1.0.0 / 2014-08-10
+==================
+
+ * Accept valid `Vary` header string as `field`
+ * Add `vary.append` for low-level string manipulation
+ * Move to `jshttp` orgainzation
+
+0.1.0 / 2014-06-05
+==================
+
+ * Support array of fields to set
+
+0.0.0 / 2014-06-04
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/vary/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/vary/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/vary/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/vary/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/vary/README.md
new file mode 100644
index 0000000..82392d0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/vary/README.md
@@ -0,0 +1,59 @@
+# vary
+
+[![NPM Version](http://img.shields.io/npm/v/vary.svg?style=flat)](https://www.npmjs.org/package/vary)
+[![Node.js Version](http://img.shields.io/badge/node.js->=_0.8-blue.svg?style=flat)](http://nodejs.org/download/)
+[![Build Status](http://img.shields.io/travis/jshttp/vary.svg?style=flat)](https://travis-ci.org/jshttp/vary)
+[![Coverage Status](https://img.shields.io/coveralls/jshttp/vary.svg?style=flat)](https://coveralls.io/r/jshttp/vary)
+[![Gittip](http://img.shields.io/gittip/dougwilson.svg?style=flat)](https://www.gittip.com/dougwilson/)
+
+Manipulate the HTTP Vary header
+
+## Install
+
+```sh
+$ npm install vary
+```
+
+## API
+
+```js
+var vary = require('vary')
+```
+
+### vary(res, field)
+
+Adds the given header `field` to the `Vary` response header of `res`.
+This can be a string of a single field, a string of a valid `Vary`
+header, or an array of multiple fields.
+
+This will append the header if not already listed, otherwise leaves
+it listed in the current location.
+
+```js
+// Append "Origin" to the Vary header of the response
+vary(res, 'Origin')
+```
+
+### vary.append(header, field)
+
+Adds the given header `field` to the `Vary` response header string `header`.
+This can be a string of a single field, a string of a valid `Vary` header,
+or an array of multiple fields.
+
+This will append the header if not already listed, otherwise leaves
+it listed in the current location. The new header string is returned.
+
+```js
+// Get header string appending "Origin" to "Accept, User-Agent"
+vary.append('Accept, User-Agent', 'Origin')
+```
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## License
+
+[MIT](LICENSE)
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/vary/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/vary/index.js
new file mode 100644
index 0000000..1e544e8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/vary/index.js
@@ -0,0 +1,112 @@
+/*!
+ * vary
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = vary;
+module.exports.append = append;
+
+/**
+ * Variables.
+ */
+
+var separators = /[\(\)<>@,;:\\"\/\[\]\?=\{\}\u0020\u0009]/;
+
+/**
+ * Append a field to a vary header.
+ *
+ * @param {String} header
+ * @param {String|Array} field
+ * @return {String}
+ * @api public
+ */
+
+function append(header, field) {
+ if (typeof header !== 'string') {
+ throw new TypeError('header argument is required');
+ }
+
+ if (!field) {
+ throw new TypeError('field argument is required');
+ }
+
+ // get fields array
+ var fields = !Array.isArray(field)
+ ? parse(String(field))
+ : field;
+
+ // assert on invalid fields
+ for (var i = 0; i < fields.length; i++) {
+ if (separators.test(fields[i])) {
+ throw new TypeError('field argument contains an invalid header');
+ }
+ }
+
+ // existing, unspecified vary
+ if (header === '*') {
+ return header;
+ }
+
+ // enumerate current values
+ var vals = parse(header.toLowerCase());
+
+ // unspecified vary
+ if (fields.indexOf('*') !== -1 || vals.indexOf('*') !== -1) {
+ return '*';
+ }
+
+ for (var i = 0; i < fields.length; i++) {
+ field = fields[i].toLowerCase();
+
+ // append value (case-preserving)
+ if (vals.indexOf(field) === -1) {
+ vals.push(field);
+ header = header
+ ? header + ', ' + fields[i]
+ : fields[i];
+ }
+ }
+
+ return header;
+}
+
+/**
+ * Parse a vary header into an array.
+ *
+ * @param {String} header
+ * @return {Array}
+ * @api private
+ */
+
+function parse(header) {
+ return header.trim().split(/ *, */);
+}
+
+/**
+ * Mark that a request is varied on a header field.
+ *
+ * @param {Object} res
+ * @param {String|Array} field
+ * @api public
+ */
+
+function vary(res, field) {
+ if (!res || !res.getHeader || !res.setHeader) {
+ // quack quack
+ throw new TypeError('res argument is required');
+ }
+
+ // get existing header
+ var val = res.getHeader('Vary') || ''
+ var header = Array.isArray(val)
+ ? val.join(', ')
+ : String(val);
+
+ // set new header
+ res.setHeader('Vary', append(header, field));
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/vary/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/vary/package.json
new file mode 100644
index 0000000..4c4bd62
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/node_modules/vary/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "vary",
+ "description": "Manipulate the HTTP Vary header",
+ "version": "1.0.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "http",
+ "res",
+ "vary"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/vary"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.0",
+ "mocha": "~1.21.4",
+ "should": "~4.0.4",
+ "supertest": "~0.13.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "56acecd9fa20888132563b00576625ea02a69a35",
+ "bugs": {
+ "url": "https://github.com/jshttp/vary/issues"
+ },
+ "homepage": "https://github.com/jshttp/vary",
+ "_id": "vary@1.0.0",
+ "_shasum": "c5e76cec20d3820d8f2a96e7bee38731c34da1e7",
+ "_from": "vary@~1.0.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "c5e76cec20d3820d8f2a96e7bee38731c34da1e7",
+ "tarball": "http://registry.npmjs.org/vary/-/vary-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/vary/-/vary-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/express/package.json b/dgbuilder/dgeflows/node_modules/express/package.json
new file mode 100644
index 0000000..d3adb53
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/express/package.json
@@ -0,0 +1,165 @@
+{
+ "name": "express",
+ "description": "Fast, unopinionated, minimalist web framework",
+ "version": "4.11.2",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "contributors": [
+ {
+ "name": "Aaron Heckmann",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ {
+ "name": "Ciaran Jessup",
+ "email": "ciaranj@gmail.com"
+ },
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Guillermo Rauch",
+ "email": "rauchg@gmail.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com"
+ },
+ {
+ "name": "Roman Shtylman",
+ "email": "shtylman+expressjs@gmail.com"
+ },
+ {
+ "name": "Young Jae Sim",
+ "email": "hanul@hanul.me"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/strongloop/express"
+ },
+ "homepage": "http://expressjs.com/",
+ "keywords": [
+ "express",
+ "framework",
+ "sinatra",
+ "web",
+ "rest",
+ "restful",
+ "router",
+ "app",
+ "api"
+ ],
+ "dependencies": {
+ "accepts": "~1.2.3",
+ "content-disposition": "0.5.0",
+ "cookie-signature": "1.0.5",
+ "debug": "~2.1.1",
+ "depd": "~1.0.0",
+ "escape-html": "1.0.1",
+ "etag": "~1.5.1",
+ "finalhandler": "0.3.3",
+ "fresh": "0.2.4",
+ "media-typer": "0.3.0",
+ "methods": "~1.1.1",
+ "on-finished": "~2.2.0",
+ "parseurl": "~1.3.0",
+ "path-to-regexp": "0.1.3",
+ "proxy-addr": "~1.0.6",
+ "qs": "2.3.3",
+ "range-parser": "~1.0.2",
+ "send": "0.11.1",
+ "serve-static": "~1.8.1",
+ "type-is": "~1.5.6",
+ "vary": "~1.0.0",
+ "cookie": "0.1.2",
+ "merge-descriptors": "0.0.2",
+ "utils-merge": "1.0.0"
+ },
+ "devDependencies": {
+ "after": "0.8.1",
+ "ejs": "2.1.4",
+ "istanbul": "0.3.5",
+ "marked": "0.3.3",
+ "mocha": "~2.1.0",
+ "should": "~4.6.2",
+ "supertest": "~0.15.0",
+ "hjs": "~0.0.6",
+ "body-parser": "~1.11.0",
+ "connect-redis": "~2.2.0",
+ "cookie-parser": "~1.3.3",
+ "express-session": "~1.10.2",
+ "jade": "~1.9.1",
+ "method-override": "~2.3.1",
+ "morgan": "~1.5.1",
+ "multiparty": "~4.1.1",
+ "vhost": "~3.0.0"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ },
+ "files": [
+ "LICENSE",
+ "History.md",
+ "Readme.md",
+ "index.js",
+ "lib/"
+ ],
+ "scripts": {
+ "test": "mocha --require test/support/env --reporter spec --bail --check-leaks test/ test/acceptance/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/ test/acceptance/",
+ "test-tap": "mocha --require test/support/env --reporter tap --check-leaks test/ test/acceptance/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/ test/acceptance/"
+ },
+ "gitHead": "63ab25579bda70b4927a179b580a9c580b6c7ada",
+ "bugs": {
+ "url": "https://github.com/strongloop/express/issues"
+ },
+ "_id": "express@4.11.2",
+ "_shasum": "8df3d5a9ac848585f00a0777601823faecd3b148",
+ "_from": "express@~4.11.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "aredridel",
+ "email": "aredridel@nbtsc.org"
+ },
+ {
+ "name": "strongloop",
+ "email": "callback@strongloop.com"
+ },
+ {
+ "name": "rfeng",
+ "email": "enjoyjava@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "8df3d5a9ac848585f00a0777601823faecd3b148",
+ "tarball": "http://registry.npmjs.org/express/-/express-4.11.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/express/-/express-4.11.2.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/morgan/HISTORY.md b/dgbuilder/dgeflows/node_modules/morgan/HISTORY.md
new file mode 100644
index 0000000..7249def
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/HISTORY.md
@@ -0,0 +1,101 @@
+1.5.1 / 2014-12-31
+==================
+
+ * deps: debug@~2.1.1
+ * deps: on-finished@~2.2.0
+
+1.5.0 / 2014-11-06
+==================
+
+ * Add multiple date formats
+ - `clf` for the common log format
+ - `iso` for the common ISO 8601 date time format
+ - `web` for the common RFC 1123 date time format
+ * Deprecate `buffer` option
+ * Fix date format in `common` and `combined` formats
+ * Fix token arguments to accept values with `"`
+
+1.4.1 / 2014-10-22
+==================
+
+ * deps: on-finished@~2.1.1
+ - Fix handling of pipelined requests
+
+1.4.0 / 2014-10-16
+==================
+
+ * Add `debug` messages
+ * deps: depd@~1.0.0
+
+1.3.2 / 2014-09-27
+==================
+
+ * Fix `req.ip` integration when `immediate: false`
+
+1.3.1 / 2014-09-14
+==================
+
+ * Remove un-used `bytes` dependency
+ * deps: depd@0.4.5
+
+1.3.0 / 2014-09-01
+==================
+
+ * Assert if `format` is not a function or string
+
+1.2.3 / 2014-08-16
+==================
+
+ * deps: on-finished@2.1.0
+
+1.2.2 / 2014-07-27
+==================
+
+ * deps: depd@0.4.4
+ - Work-around v8 generating empty stack traces
+
+1.2.1 / 2014-07-26
+==================
+
+ * deps: depd@0.4.3
+ - Fix exception when global `Error.stackTraceLimit` is too low
+
+1.2.0 / 2014-07-19
+==================
+
+ * Add `:remote-user` token
+ * Add `combined` log format
+ * Add `common` log format
+ * Add `morgan(format, options)` function signature
+ * Deprecate `default` format -- use `combined` format instead
+ * Deprecate not providing a format
+ * Remove non-standard grey color from `dev` format
+
+1.1.1 / 2014-05-20
+==================
+
+ * simplify method to get remote address
+
+1.1.0 / 2014-05-18
+==================
+
+ * "dev" format will use same tokens as other formats
+ * `:response-time` token is now empty when immediate used
+ * `:response-time` token is now monotonic
+ * `:response-time` token has precision to 1 μs
+ * fix `:status` + immediate output in node.js 0.8
+ * improve `buffer` option to prevent indefinite event loop holding
+ * deps: bytes@1.0.0
+ - add negative support
+
+1.0.1 / 2014-05-04
+==================
+
+ * Make buffer unique per morgan instance
+ * deps: bytes@0.3.0
+ * added terabyte support
+
+1.0.0 / 2014-02-08
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/morgan/LICENSE b/dgbuilder/dgeflows/node_modules/morgan/LICENSE
new file mode 100644
index 0000000..53e49a3
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/morgan/README.md b/dgbuilder/dgeflows/node_modules/morgan/README.md
new file mode 100644
index 0000000..a429b06
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/README.md
@@ -0,0 +1,268 @@
+# morgan
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+HTTP request logger middleware for node.js
+
+> Named after [Dexter](http://en.wikipedia.org/wiki/Dexter_Morgan), a show you should not watch until completion.
+
+## API
+
+```js
+var morgan = require('morgan')
+```
+
+### morgan(format, options)
+
+Create a new morgan logger middleware function using the given `format` and `options`.
+The `format` argument may be a string of a predefined name (see below for the names),
+a string of a format string, or a function that will produce a log entry.
+
+#### Options
+
+Morgan accepts these properties in the options object.
+
+#### immediate
+
+Write log line on request instead of response. This means that a requests will
+be logged even if the server crashes, _but data from the response (like the
+response code, content length, etc.) cannot be logged_.
+
+##### skip
+
+Function to determine if logging is skipped, defaults to `false`. This function
+will be called as `skip(req, res)`.
+
+```js
+// EXAMPLE: only log error responses
+morgan('combined', {
+ skip: function (req, res) { return res.statusCode < 400 }
+})
+```
+
+##### stream
+
+Output stream for writing log lines, defaults to `process.stdout`.
+
+#### Predefined Formats
+
+There are various pre-defined formats provided:
+
+##### combined
+
+Standard Apache combined log output.
+
+```
+:remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"
+```
+
+##### common
+
+Standard Apache common log output.
+
+```
+:remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length]
+```
+
+##### dev
+
+Concise output colored by response status for development use. The `:status`
+token will be colored red for server error codes, yellow for client error
+codes, cyan for redirection codes, and uncolored for all other codes.
+
+```
+:method :url :status :response-time ms - :res[content-length]
+```
+
+##### short
+
+Shorter than default, also including response time.
+
+```
+:remote-addr :remote-user :method :url HTTP/:http-version :status :res[content-length] - :response-time ms
+```
+
+##### tiny
+
+The minimal output.
+
+```
+:method :url :status :res[content-length] - :response-time ms
+```
+
+#### Tokens
+
+##### Creating new tokens
+
+To define a token, simply invoke `morgan.token()` with the name and a callback function. This callback function is expected to return a string value. The value returned is then available as ":type" in this case:
+```js
+morgan.token('type', function(req, res){ return req.headers['content-type']; })
+```
+
+Calling `morgan.token()` using the same name as an existing token will overwrite that token definition.
+
+##### :date[format]
+
+The current date and time in UTC. The available formats are:
+
+ - `clf` for the common log format (`"10/Oct/2000:13:55:36 +0000"`)
+ - `iso` for the common ISO 8601 date time format (`2000-10-10T13:55:36.000Z`)
+ - `web` for the common RFC 1123 date time format (`Tue, 10 Oct 2000 13:55:36 GMT`)
+
+If no format is given, then the default is `web`.
+
+##### :http-version
+
+The HTTP version of the request.
+
+##### :method
+
+The HTTP version of the request.
+
+##### :referrer
+
+The Referrer header of the request. This will use the standard mis-spelled Referer header if exists, otherwise Referrer.
+
+##### :remote-addr
+
+The remote address of the request. This will use `req.ip`, otherwise the standard `req.connection.remoteAddress` value (socket address).
+
+##### :remote-user
+
+The user authenticated as part of Basic auth for the request.
+
+##### :req[header]
+
+The given `header` of the request.
+
+##### :res[header]
+
+The given `header` of the response.
+
+##### :response-time
+
+The time between the request coming into `morgan` and when the response headers are written, in milliseconds.
+
+##### :status
+
+The status code of the response.
+
+##### :url
+
+The URL of the request. This will use `req.originalUrl` if exists, otherwise `req.url`.
+
+##### :user-agent
+
+The contents of the User-Agent header of the request.
+
+## Examples
+
+### express/connect
+
+Simple app that will log all request in the Apache combined format to STDOUT
+
+```js
+var express = require('express')
+var morgan = require('morgan')
+
+var app = express()
+
+app.use(morgan('combined'))
+
+app.get('/', function (req, res) {
+ res.send('hello, world!')
+})
+```
+
+### vanilla http server
+
+Simple app that will log all request in the Apache combined format to STDOUT
+
+```js
+var finalhandler = require('finalhandler')
+var http = require('http')
+var morgan = require('morgan')
+
+// create "middleware"
+var logger = morgan('combined')
+
+http.createServer(function (req, res) {
+ var done = finalhandler(req, res)
+ logger(req, res, function (err) {
+ if (err) return done(err)
+
+ // respond to request
+ res.setHeader('content-type', 'text/plain')
+ res.end('hello, world!')
+ })
+})
+```
+
+### write logs to a file
+
+Simple app that will log all request in the Apache combined format to the file "access.log"
+
+```js
+var express = require('express')
+var fs = require('fs')
+var morgan = require('morgan')
+
+var app = express()
+
+// create a write stream (in append mode)
+var accessLogStream = fs.createWriteStream(__dirname + '/access.log', {flags: 'a'})
+
+// setup the logger
+app.use(morgan('combined', {stream: accessLogStream}))
+
+app.get('/', function (req, res) {
+ res.send('hello, world!')
+})
+```
+
+### use custom token formats
+
+Sample app that will use custom token formats. This adds an ID to all requests and displays it using the `:id` token.
+
+```js
+var express = require('express')
+var morgan = require('morgan')
+var uuid = require('node-uuid')
+
+morgan.token('id', function getId(req) {
+ return req.id
+})
+
+var app = express()
+
+app.use(assignId)
+app.use(morgan(':id :method :url :response-time'))
+
+app.get('/', function (req, res) {
+ res.send('hello, world!')
+})
+
+function assignId(req, res, next) {
+ req.id = uuid.v4()
+ next()
+}
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/morgan.svg?style=flat
+[npm-url]: https://npmjs.org/package/morgan
+[travis-image]: https://img.shields.io/travis/expressjs/morgan.svg?style=flat
+[travis-url]: https://travis-ci.org/expressjs/morgan
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/morgan.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/expressjs/morgan?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/morgan.svg?style=flat
+[downloads-url]: https://npmjs.org/package/morgan
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat
+[gratipay-url]: https://www.gratipay.com/dougwilson/
diff --git a/dgbuilder/dgeflows/node_modules/morgan/index.js b/dgbuilder/dgeflows/node_modules/morgan/index.js
new file mode 100644
index 0000000..3b20f97
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/index.js
@@ -0,0 +1,403 @@
+/*!
+ * morgan
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var auth = require('basic-auth')
+var debug = require('debug')('morgan')
+var deprecate = require('depd')('morgan')
+var onFinished = require('on-finished')
+
+/**
+ * Array of CLF month names.
+ * @private
+ */
+
+var clfmonth = [
+ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
+]
+
+/**
+ * Default log buffer duration.
+ * @private
+ */
+
+var defaultBufferDuration = 1000;
+
+/**
+ * Create a logger middleware.
+ *
+ * @public
+ * @param {String|Function} format
+ * @param {Object} [options]
+ * @return {Function} middleware
+ */
+
+exports = module.exports = function morgan(format, options) {
+ if (typeof format === 'object') {
+ options = format
+ format = options.format || 'default'
+
+ // smart deprecation message
+ deprecate('morgan(options): use morgan(' + (typeof format === 'string' ? JSON.stringify(format) : 'format') + ', options) instead')
+ }
+
+ if (format === undefined) {
+ deprecate('undefined format: specify a format')
+ }
+
+ options = options || {}
+
+ // output on request instead of response
+ var immediate = options.immediate;
+
+ // check if log entry should be skipped
+ var skip = options.skip || function () { return false; };
+
+ // format function
+ var fmt = compile(exports[format] || format || exports.default)
+
+ // steam
+ var buffer = options.buffer
+ var stream = options.stream || process.stdout
+
+ // buffering support
+ if (buffer) {
+ deprecate('buffer option')
+
+ var realStream = stream
+ var buf = []
+ var timer = null
+ var interval = 'number' == typeof buffer
+ ? buffer
+ : defaultBufferDuration
+
+ // flush function
+ var flush = function(){
+ timer = null
+
+ if (buf.length) {
+ realStream.write(buf.join(''));
+ buf.length = 0;
+ }
+ }
+
+ // swap the stream
+ stream = {
+ write: function(str){
+ if (timer === null) {
+ timer = setTimeout(flush, interval)
+ }
+
+ buf.push(str);
+ }
+ };
+ }
+
+ return function logger(req, res, next) {
+ req._startAt = process.hrtime();
+ req._startTime = new Date;
+ req._remoteAddress = getip(req);
+
+ function logRequest(){
+ if (skip(req, res)) {
+ debug('skip request')
+ return
+ }
+
+ var line = fmt(exports, req, res)
+
+ if (null == line) {
+ debug('skip line')
+ return
+ }
+
+ debug('log request')
+ stream.write(line + '\n')
+ };
+
+ // immediate
+ if (immediate) {
+ logRequest();
+ } else {
+ onFinished(res, logRequest)
+ }
+
+ next();
+ };
+};
+
+/**
+ * Compile `format` into a function.
+ *
+ * @private
+ * @param {Function|String} format
+ * @return {Function}
+ */
+
+function compile(format) {
+ if (typeof format === 'function') {
+ // already compiled
+ return format
+ }
+
+ if (typeof format !== 'string') {
+ throw new TypeError('argument format must be a function or string')
+ }
+
+ var fmt = format.replace(/"/g, '\\"')
+ var js = ' return "' + fmt.replace(/:([-\w]{2,})(?:\[([^\]]+)\])?/g, function(_, name, arg){
+ return '"\n + (tokens["' + name + '"](req, res, ' + String(JSON.stringify(arg)) + ') || "-") + "';
+ }) + '";'
+
+ return new Function('tokens, req, res', js);
+};
+
+/**
+ * Define a token function with the given `name`,
+ * and callback `fn(req, res)`.
+ *
+ * @public
+ * @param {String} name
+ * @param {Function} fn
+ * @return {Object} exports for chaining
+ */
+
+exports.token = function(name, fn) {
+ exports[name] = fn;
+ return this;
+};
+
+/**
+ * Define a `fmt` with the given `name`.
+ *
+ * @public
+ * @param {String} name
+ * @param {String|Function} fmt
+ * @return {Object} exports for chaining
+ */
+
+exports.format = function(name, fmt){
+ exports[name] = fmt;
+ return this;
+};
+
+/**
+ * Apache combined log format.
+ */
+
+exports.format('combined', ':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"')
+
+/**
+ * Apache common log format.
+ */
+
+exports.format('common', ':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length]')
+
+/**
+ * Default format.
+ */
+
+exports.format('default', ':remote-addr - :remote-user [:date] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"');
+deprecate.property(exports, 'default', 'default format: use combined format')
+
+/**
+ * Short format.
+ */
+
+exports.format('short', ':remote-addr :remote-user :method :url HTTP/:http-version :status :res[content-length] - :response-time ms');
+
+/**
+ * Tiny format.
+ */
+
+exports.format('tiny', ':method :url :status :res[content-length] - :response-time ms');
+
+/**
+ * dev (colored)
+ */
+
+exports.format('dev', function(tokens, req, res){
+ var color = 32; // green
+ var status = res.statusCode;
+
+ if (status >= 500) color = 31; // red
+ else if (status >= 400) color = 33; // yellow
+ else if (status >= 300) color = 36; // cyan
+
+ var fn = compile('\x1b[0m:method :url \x1b[' + color + 'm:status \x1b[0m:response-time ms - :res[content-length]\x1b[0m');
+
+ return fn(tokens, req, res);
+});
+
+/**
+ * request url
+ */
+
+exports.token('url', function(req){
+ return req.originalUrl || req.url;
+});
+
+/**
+ * request method
+ */
+
+exports.token('method', function(req){
+ return req.method;
+});
+
+/**
+ * response time in milliseconds
+ */
+
+exports.token('response-time', function(req, res){
+ if (!res._header || !req._startAt) return '';
+ var diff = process.hrtime(req._startAt);
+ var ms = diff[0] * 1e3 + diff[1] * 1e-6;
+ return ms.toFixed(3);
+});
+
+/**
+ * current date
+ */
+
+exports.token('date', function(req, res, format){
+ format = format || 'web'
+
+ var date = new Date()
+
+ switch (format) {
+ case 'clf':
+ return clfdate(date)
+ case 'iso':
+ return date.toISOString()
+ case 'web':
+ return date.toUTCString()
+ }
+});
+
+/**
+ * response status code
+ */
+
+exports.token('status', function(req, res){
+ return res._header ? res.statusCode : null;
+});
+
+/**
+ * normalized referrer
+ */
+
+exports.token('referrer', function(req){
+ return req.headers['referer'] || req.headers['referrer'];
+});
+
+/**
+ * remote address
+ */
+
+exports.token('remote-addr', getip);
+
+/**
+ * remote user
+ */
+
+exports.token('remote-user', function (req) {
+ var creds = auth(req)
+ var user = (creds && creds.name) || '-'
+ return user;
+})
+
+/**
+ * HTTP version
+ */
+
+exports.token('http-version', function(req){
+ return req.httpVersionMajor + '.' + req.httpVersionMinor;
+});
+
+/**
+ * UA string
+ */
+
+exports.token('user-agent', function(req){
+ return req.headers['user-agent'];
+});
+
+/**
+ * request header
+ */
+
+exports.token('req', function(req, res, field){
+ return req.headers[field.toLowerCase()];
+});
+
+/**
+ * response header
+ */
+
+exports.token('res', function(req, res, field){
+ return (res._headers || {})[field.toLowerCase()];
+});
+
+/**
+ * Format a Date in the common log format.
+ *
+ * @private
+ * @param {Date} dateTime
+ * @return {string}
+ */
+
+function clfdate(dateTime) {
+ var date = dateTime.getUTCDate()
+ var hour = dateTime.getUTCHours()
+ var mins = dateTime.getUTCMinutes()
+ var secs = dateTime.getUTCSeconds()
+ var year = dateTime.getUTCFullYear()
+
+ var month = clfmonth[dateTime.getUTCMonth()]
+
+ return pad2(date) + '/' + month + '/' + year
+ + ':' + pad2(hour) + ':' + pad2(mins) + ':' + pad2(secs)
+ + ' +0000'
+}
+
+/**
+ * Get request IP address.
+ *
+ * @private
+ * @param {IncomingMessage} req
+ * @return {string}
+ */
+
+function getip(req) {
+ return req.ip
+ || req._remoteAddress
+ || (req.connection && req.connection.remoteAddress)
+ || undefined;
+}
+
+/**
+ * Pad number to two digits.
+ *
+ * @private
+ * @param {number} num
+ * @return {string}
+ */
+
+function pad2(num) {
+ var str = String(num)
+
+ return (str.length === 1 ? '0' : '')
+ + str
+}
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/basic-auth/Readme.md b/dgbuilder/dgeflows/node_modules/morgan/node_modules/basic-auth/Readme.md
new file mode 100644
index 0000000..5859757
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/basic-auth/Readme.md
@@ -0,0 +1,26 @@
+# basic-auth
+
+ Generic basic auth Authorization header field parser for whatever.
+
+## Installation
+
+```
+$ npm install basic-auth
+```
+
+## Example
+
+ Pass a node request or koa Context object to the module exported. If
+ parsing fails `undefined` is returned, otherwise an object with
+ `.name` and `.pass`.
+
+```js
+var auth = require('basic-auth');
+var user = auth(req);
+// => { name: 'something', pass: 'whatever' }
+
+```
+
+# License
+
+ MIT
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/basic-auth/index.js b/dgbuilder/dgeflows/node_modules/morgan/node_modules/basic-auth/index.js
new file mode 100644
index 0000000..3ef1ff1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/basic-auth/index.js
@@ -0,0 +1,28 @@
+
+/**
+ * Parse the Authorization header field of `req`.
+ *
+ * @param {Request} req
+ * @return {Object} with .name and .pass
+ * @api public
+ */
+
+module.exports = function(req){
+ req = req.req || req;
+
+ var auth = req.headers.authorization;
+ if (!auth) return;
+
+ // malformed
+ var parts = auth.split(' ');
+ if ('basic' != parts[0].toLowerCase()) return;
+ if (!parts[1]) return;
+ auth = parts[1];
+
+ // credentials
+ auth = new Buffer(auth, 'base64').toString();
+ auth = auth.match(/^([^:]*):(.*)$/);
+ if (!auth) return;
+
+ return { name: auth[1], pass: auth[2] };
+};
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/basic-auth/package.json b/dgbuilder/dgeflows/node_modules/morgan/node_modules/basic-auth/package.json
new file mode 100644
index 0000000..30bd7cb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/basic-auth/package.json
@@ -0,0 +1,55 @@
+{
+ "name": "basic-auth",
+ "version": "1.0.0",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/visionmedia/node-basic-auth"
+ },
+ "description": "generic basic auth parser",
+ "keywords": [
+ "basic",
+ "auth",
+ "authorization",
+ "basicauth"
+ ],
+ "devDependencies": {
+ "mocha": "*",
+ "should": "*"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "files": [
+ "index.js"
+ ],
+ "license": "MIT",
+ "gitHead": "099e8c703ea3994d72240492aba9b115517cf45e",
+ "bugs": {
+ "url": "https://github.com/visionmedia/node-basic-auth/issues"
+ },
+ "homepage": "https://github.com/visionmedia/node-basic-auth",
+ "_id": "basic-auth@1.0.0",
+ "_shasum": "111b2d9ff8e4e6d136b8c84ea5e096cb87351637",
+ "_from": "basic-auth@1.0.0",
+ "_npmVersion": "1.4.16",
+ "_npmUser": {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "111b2d9ff8e4e6d136b8c84ea5e096cb87351637",
+ "tarball": "http://registry.npmjs.org/basic-auth/-/basic-auth-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.0.0.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/History.md b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/History.md
new file mode 100644
index 0000000..bdbcf58
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/History.md
@@ -0,0 +1,67 @@
+1.0.0 / 2014-09-17
+==================
+
+ * No changes
+
+0.4.5 / 2014-09-09
+==================
+
+ * Improve call speed to functions using the function wrapper
+ * Support Node.js 0.6
+
+0.4.4 / 2014-07-27
+==================
+
+ * Work-around v8 generating empty stack traces
+
+0.4.3 / 2014-07-26
+==================
+
+ * Fix exception when global `Error.stackTraceLimit` is too low
+
+0.4.2 / 2014-07-19
+==================
+
+ * Correct call site for wrapped functions and properties
+
+0.4.1 / 2014-07-19
+==================
+
+ * Improve automatic message generation for function properties
+
+0.4.0 / 2014-07-19
+==================
+
+ * Add `TRACE_DEPRECATION` environment variable
+ * Remove non-standard grey color from color output
+ * Support `--no-deprecation` argument
+ * Support `--trace-deprecation` argument
+ * Support `deprecate.property(fn, prop, message)`
+
+0.3.0 / 2014-06-16
+==================
+
+ * Add `NO_DEPRECATION` environment variable
+
+0.2.0 / 2014-06-15
+==================
+
+ * Add `deprecate.property(obj, prop, message)`
+ * Remove `supports-color` dependency for node.js 0.8
+
+0.1.0 / 2014-06-15
+==================
+
+ * Add `deprecate.function(fn, message)`
+ * Add `process.on('deprecation', fn)` emitter
+ * Automatically generate message when omitted from `deprecate()`
+
+0.0.1 / 2014-06-15
+==================
+
+ * Fix warning for dynamic calls at singe call site
+
+0.0.0 / 2014-06-15
+==================
+
+ * Initial implementation
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/LICENSE b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/Readme.md b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/Readme.md
new file mode 100644
index 0000000..9fb2737
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/Readme.md
@@ -0,0 +1,271 @@
+# depd
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+Deprecate all the things
+
+> With great modules comes great responsibility; mark things deprecated!
+
+## Install
+
+```sh
+$ npm install depd
+```
+
+## API
+
+```js
+var deprecate = require('depd')('my-module')
+```
+
+This library allows you to display deprecation messages to your users.
+This library goes above and beyond with deprecation warnings by
+introspection of the call stack (but only the bits that it is interested
+in).
+
+Instead of just warning on the first invocation of a deprecated
+function and never again, this module will warn on the first invocation
+of a deprecated function per unique call site, making it ideal to alert
+users of all deprecated uses across the code base, rather than just
+whatever happens to execute first.
+
+The deprecation warnings from this module also include the file and line
+information for the call into the module that the deprecated function was
+in.
+
+**NOTE** this library has a similar interface to the `debug` module, and
+this module uses the calling file to get the boundary for the call stacks,
+so you should always create a new `deprecate` object in each file and not
+within some central file.
+
+### depd(namespace)
+
+Create a new deprecate function that uses the given namespace name in the
+messages and will display the call site prior to the stack entering the
+file this function was called from. It is highly suggested you use the
+name of your module as the namespace.
+
+### deprecate(message)
+
+Call this function from deprecated code to display a deprecation message.
+This message will appear once per unique caller site. Caller site is the
+first call site in the stack in a different file from the caller of this
+function.
+
+If the message is omitted, a message is generated for you based on the site
+of the `deprecate()` call and will display the name of the function called,
+similar to the name displayed in a stack trace.
+
+### deprecate.function(fn, message)
+
+Call this function to wrap a given function in a deprecation message on any
+call to the function. An optional message can be supplied to provide a custom
+message.
+
+### deprecate.property(obj, prop, message)
+
+Call this function to wrap a given property on object in a deprecation message
+on any accessing or setting of the property. An optional message can be supplied
+to provide a custom message.
+
+The method must be called on the object where the property belongs (not
+inherited from the prototype).
+
+If the property is a data descriptor, it will be converted to an accessor
+descriptor in order to display the deprecation message.
+
+### process.on('deprecation', fn)
+
+This module will allow easy capturing of deprecation errors by emitting the
+errors as the type "deprecation" on the global `process`. If there are no
+listeners for this type, the errors are written to STDERR as normal, but if
+there are any listeners, nothing will be written to STDERR and instead only
+emitted. From there, you can write the errors in a different format or to a
+logging source.
+
+The error represents the deprecation and is emitted only once with the same
+rules as writing to STDERR. The error has the following properties:
+
+ - `message` - This is the message given by the library
+ - `name` - This is always `'DeprecationError'`
+ - `namespace` - This is the namespace the deprecation came from
+ - `stack` - This is the stack of the call to the deprecated thing
+
+Example `error.stack` output:
+
+```
+DeprecationError: my-cool-module deprecated oldfunction
+ at Object.<anonymous> ([eval]-wrapper:6:22)
+ at Module._compile (module.js:456:26)
+ at evalScript (node.js:532:25)
+ at startup (node.js:80:7)
+ at node.js:902:3
+```
+
+### process.env.NO_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `NO_DEPRECATION`
+is provided as a quick solution to silencing deprecation warnings from being
+output. The format of this is similar to that of `DEBUG`:
+
+```sh
+$ NO_DEPRECATION=my-module,othermod node app.js
+```
+
+This will suppress deprecations from being output for "my-module" and "othermod".
+The value is a list of comma-separated namespaces. To suppress every warning
+across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--no-deprecation` to the `node` executable will suppress
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not suppress the deperecations given to any "deprecation"
+event listeners, just the output to STDERR.
+
+### process.env.TRACE_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION`
+is provided as a solution to getting more detailed location information in deprecation
+warnings by including the entire stack trace. The format of this is the same as
+`NO_DEPRECATION`:
+
+```sh
+$ TRACE_DEPRECATION=my-module,othermod node app.js
+```
+
+This will include stack traces for deprecations being output for "my-module" and
+"othermod". The value is a list of comma-separated namespaces. To trace every
+warning across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--trace-deprecation` to the `node` executable will trace
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`.
+
+## Display
+
+![message](files/message.png)
+
+When a user calls a function in your library that you mark deprecated, they
+will see the following written to STDERR (in the given colors, similar colors
+and layout to the `debug` module):
+
+```
+bright cyan bright yellow
+| | reset cyan
+| | | |
+▼ ▼ ▼ ▼
+my-cool-module deprecated oldfunction [eval]-wrapper:6:22
+▲ ▲ ▲ ▲
+| | | |
+namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+If the user redirects their STDERR to a file or somewhere that does not support
+colors, they see (similar layout to the `debug` module):
+
+```
+Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22
+▲ ▲ ▲ ▲ ▲
+| | | | |
+timestamp of message namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+## Examples
+
+### Deprecating all calls to a function
+
+This will display a deprecated message about "oldfunction" being deprecated
+from "my-module" on STDERR.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+// message automatically derived from function name
+// Object.oldfunction
+exports.oldfunction = deprecate.function(function oldfunction() {
+ // all calls to function are deprecated
+})
+
+// specific message
+exports.oldfunction = deprecate.function(function () {
+ // all calls to function are deprecated
+}, 'oldfunction')
+```
+
+### Conditionally deprecating a function call
+
+This will display a deprecated message about "weirdfunction" being deprecated
+from "my-module" on STDERR when called with less than 2 arguments.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ }
+}
+```
+
+When calling `deprecate` as a function, the warning is counted per call site
+within your own module, so you can display different deprecations depending
+on different situations and the users will still get all the warnings:
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ } else if (typeof arguments[0] !== 'string') {
+ // calls with non-string first argument are deprecated
+ deprecate('weirdfunction non-string first arg')
+ }
+}
+```
+
+### Deprecating property access
+
+This will display a deprecated message about "oldprop" being deprecated
+from "my-module" on STDERR when accessed. A deprecation will be displayed
+when setting the value and when getting the value.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.oldprop = 'something'
+
+// message automatically derives from property name
+deprecate.property(exports, 'oldprop')
+
+// explicit message
+deprecate.property(exports, 'oldprop', 'oldprop >= 0.10')
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-version-image]: https://img.shields.io/npm/v/depd.svg?style=flat
+[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg?style=flat
+[npm-url]: https://npmjs.org/package/depd
+[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd.svg?style=flat
+[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd
+[coveralls-image]: https://img.shields.io/coveralls/dougwilson/nodejs-depd.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master
+[node-image]: https://img.shields.io/node/v/depd.svg?style=flat
+[node-url]: http://nodejs.org/download/
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat
+[gratipay-url]: https://www.gratipay.com/dougwilson/
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/index.js b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/index.js
new file mode 100644
index 0000000..4fee4d9
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/index.js
@@ -0,0 +1,522 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var callSiteToString = require('./lib/compat').callSiteToString
+var EventEmitter = require('events').EventEmitter
+var relative = require('path').relative
+
+/**
+ * Module exports.
+ */
+
+module.exports = depd
+
+/**
+ * Get the path to base files on.
+ */
+
+var basePath = process.cwd()
+
+/**
+ * Get listener count on event emitter.
+ */
+
+/*istanbul ignore next*/
+var eventListenerCount = EventEmitter.listenerCount
+ || function (emitter, type) { return emitter.listeners(type).length }
+
+/**
+ * Determine if namespace is contained in the string.
+ */
+
+function containsNamespace(str, namespace) {
+ var val = str.split(/[ ,]+/)
+
+ namespace = String(namespace).toLowerCase()
+
+ for (var i = 0 ; i < val.length; i++) {
+ if (!(str = val[i])) continue;
+
+ // namespace contained
+ if (str === '*' || str.toLowerCase() === namespace) {
+ return true
+ }
+ }
+
+ return false
+}
+
+/**
+ * Convert a data descriptor to accessor descriptor.
+ */
+
+function convertDataDescriptorToAccessor(obj, prop, message) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+ var value = descriptor.value
+
+ descriptor.get = function getter() { return value }
+
+ if (descriptor.writable) {
+ descriptor.set = function setter(val) { return value = val }
+ }
+
+ delete descriptor.value
+ delete descriptor.writable
+
+ Object.defineProperty(obj, prop, descriptor)
+
+ return descriptor
+}
+
+/**
+ * Create arguments string to keep arity.
+ */
+
+function createArgumentsString(arity) {
+ var str = ''
+
+ for (var i = 0; i < arity; i++) {
+ str += ', arg' + i
+ }
+
+ return str.substr(2)
+}
+
+/**
+ * Create stack string from stack.
+ */
+
+function createStackString(stack) {
+ var str = this.name + ': ' + this.namespace
+
+ if (this.message) {
+ str += ' deprecated ' + this.message
+ }
+
+ for (var i = 0; i < stack.length; i++) {
+ str += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return str
+}
+
+/**
+ * Create deprecate for namespace in caller.
+ */
+
+function depd(namespace) {
+ if (!namespace) {
+ throw new TypeError('argument namespace is required')
+ }
+
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+ var file = site[0]
+
+ function deprecate(message) {
+ // call to self as log
+ log.call(deprecate, message)
+ }
+
+ deprecate._file = file
+ deprecate._ignored = isignored(namespace)
+ deprecate._namespace = namespace
+ deprecate._traced = istraced(namespace)
+ deprecate._warned = Object.create(null)
+
+ deprecate.function = wrapfunction
+ deprecate.property = wrapproperty
+
+ return deprecate
+}
+
+/**
+ * Determine if namespace is ignored.
+ */
+
+function isignored(namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.noDeprecation) {
+ // --no-deprecation support
+ return true
+ }
+
+ var str = process.env.NO_DEPRECATION || ''
+
+ // namespace ignored
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Determine if namespace is traced.
+ */
+
+function istraced(namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.traceDeprecation) {
+ // --trace-deprecation support
+ return true
+ }
+
+ var str = process.env.TRACE_DEPRECATION || ''
+
+ // namespace traced
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Display deprecation message.
+ */
+
+function log(message, site) {
+ var haslisteners = eventListenerCount(process, 'deprecation') !== 0
+
+ // abort early if no destination
+ if (!haslisteners && this._ignored) {
+ return
+ }
+
+ var caller
+ var callFile
+ var callSite
+ var i = 0
+ var seen = false
+ var stack = getStack()
+ var file = this._file
+
+ if (site) {
+ // provided site
+ callSite = callSiteLocation(stack[1])
+ callSite.name = site.name
+ file = callSite[0]
+ } else {
+ // get call site
+ i = 2
+ site = callSiteLocation(stack[i])
+ callSite = site
+ }
+
+ // get caller of deprecated thing in relation to file
+ for (; i < stack.length; i++) {
+ caller = callSiteLocation(stack[i])
+ callFile = caller[0]
+
+ if (callFile === file) {
+ seen = true
+ } else if (callFile === this._file) {
+ file = this._file
+ } else if (seen) {
+ break
+ }
+ }
+
+ var key = caller
+ ? site.join(':') + '__' + caller.join(':')
+ : undefined
+
+ if (key !== undefined && key in this._warned) {
+ // already warned
+ return
+ }
+
+ this._warned[key] = true
+
+ // generate automatic message from call site
+ if (!message) {
+ message = callSite === site || !callSite.name
+ ? defaultMessage(site)
+ : defaultMessage(callSite)
+ }
+
+ // emit deprecation if listeners exist
+ if (haslisteners) {
+ var err = DeprecationError(this._namespace, message, stack.slice(i))
+ process.emit('deprecation', err)
+ return
+ }
+
+ // format and write message
+ var format = process.stderr.isTTY
+ ? formatColor
+ : formatPlain
+ var msg = format.call(this, message, caller, stack.slice(i))
+ process.stderr.write(msg + '\n', 'utf8')
+
+ return
+}
+
+/**
+ * Get call site location as array.
+ */
+
+function callSiteLocation(callSite) {
+ var file = callSite.getFileName() || '<anonymous>'
+ var line = callSite.getLineNumber()
+ var colm = callSite.getColumnNumber()
+
+ if (callSite.isEval()) {
+ file = callSite.getEvalOrigin() + ', ' + file
+ }
+
+ var site = [file, line, colm]
+
+ site.callSite = callSite
+ site.name = callSite.getFunctionName()
+
+ return site
+}
+
+/**
+ * Generate a default message from the site.
+ */
+
+function defaultMessage(site) {
+ var callSite = site.callSite
+ var funcName = site.name
+ var typeName = callSite.getTypeName()
+
+ // make useful anonymous name
+ if (!funcName) {
+ funcName = '<anonymous@' + formatLocation(site) + '>'
+ }
+
+ // make useful type name
+ if (typeName === 'Function') {
+ typeName = callSite.getThis().name || typeName
+ }
+
+ return callSite.getMethodName()
+ ? typeName + '.' + funcName
+ : funcName
+}
+
+/**
+ * Format deprecation message without color.
+ */
+
+function formatPlain(msg, caller, stack) {
+ var timestamp = new Date().toUTCString()
+
+ var formatted = timestamp
+ + ' ' + this._namespace
+ + ' deprecated ' + msg
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' at ' + formatLocation(caller)
+ }
+
+ return formatted
+}
+
+/**
+ * Format deprecation message with color.
+ */
+
+function formatColor(msg, caller, stack) {
+ var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' // bold cyan
+ + ' \x1b[33;1mdeprecated\x1b[22;39m' // bold yellow
+ + ' \x1b[0m' + msg + '\x1b[39m' // reset
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+}
+
+/**
+ * Format call site location.
+ */
+
+function formatLocation(callSite) {
+ return relative(basePath, callSite[0])
+ + ':' + callSite[1]
+ + ':' + callSite[2]
+}
+
+/**
+ * Get the stack as array of call sites.
+ */
+
+function getStack() {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = Math.max(10, limit)
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice this function off the top
+ var stack = obj.stack.slice(1)
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack
+}
+
+/**
+ * Capture call site stack from v8.
+ */
+
+function prepareObjectStackTrace(obj, stack) {
+ return stack
+}
+
+/**
+ * Return a wrapped function in a deprecation message.
+ */
+
+function wrapfunction(fn, message) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('argument fn must be a function')
+ }
+
+ var args = createArgumentsString(fn.length)
+ var deprecate = this
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ site.name = fn.name
+
+ var deprecatedfn = eval('(function (' + args + ') {\n'
+ + '"use strict"\n'
+ + 'log.call(deprecate, message, site)\n'
+ + 'return fn.apply(this, arguments)\n'
+ + '})')
+
+ return deprecatedfn
+}
+
+/**
+ * Wrap property in a deprecation message.
+ */
+
+function wrapproperty(obj, prop, message) {
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
+ throw new TypeError('argument obj must be object')
+ }
+
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+
+ if (!descriptor) {
+ throw new TypeError('must call property on owner object')
+ }
+
+ if (!descriptor.configurable) {
+ throw new TypeError('property must be configurable')
+ }
+
+ var deprecate = this
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ // set site name
+ site.name = prop
+
+ // convert data descriptor
+ if ('value' in descriptor) {
+ descriptor = convertDataDescriptorToAccessor(obj, prop, message)
+ }
+
+ var get = descriptor.get
+ var set = descriptor.set
+
+ // wrap getter
+ if (typeof get === 'function') {
+ descriptor.get = function getter() {
+ log.call(deprecate, message, site)
+ return get.apply(this, arguments)
+ }
+ }
+
+ // wrap setter
+ if (typeof set === 'function') {
+ descriptor.set = function setter() {
+ log.call(deprecate, message, site)
+ return set.apply(this, arguments)
+ }
+ }
+
+ Object.defineProperty(obj, prop, descriptor)
+}
+
+/**
+ * Create DeprecationError for deprecation
+ */
+
+function DeprecationError(namespace, message, stack) {
+ var error = new Error()
+ var stackString
+
+ Object.defineProperty(error, 'constructor', {
+ value: DeprecationError
+ })
+
+ Object.defineProperty(error, 'message', {
+ configurable: true,
+ enumerable: false,
+ value: message,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'name', {
+ enumerable: false,
+ configurable: true,
+ value: 'DeprecationError',
+ writable: true
+ })
+
+ Object.defineProperty(error, 'namespace', {
+ configurable: true,
+ enumerable: false,
+ value: namespace,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'stack', {
+ configurable: true,
+ enumerable: false,
+ get: function () {
+ if (stackString !== undefined) {
+ return stackString
+ }
+
+ // prepare stack trace
+ return stackString = createStackString.call(this, stack)
+ },
+ set: function setter(val) {
+ stackString = val
+ }
+ })
+
+ return error
+}
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/lib/compat/buffer-concat.js b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/lib/compat/buffer-concat.js
new file mode 100644
index 0000000..09d9721
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/lib/compat/buffer-concat.js
@@ -0,0 +1,33 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = bufferConcat
+
+/**
+ * Concatenate an array of Buffers.
+ */
+
+function bufferConcat(bufs) {
+ var length = 0
+
+ for (var i = 0, len = bufs.length; i < len; i++) {
+ length += bufs[i].length
+ }
+
+ var buf = new Buffer(length)
+ var pos = 0
+
+ for (var i = 0, len = bufs.length; i < len; i++) {
+ bufs[i].copy(buf, pos)
+ pos += bufs[i].length
+ }
+
+ return buf
+}
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/lib/compat/callsite-tostring.js b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/lib/compat/callsite-tostring.js
new file mode 100644
index 0000000..17cf7ed
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/lib/compat/callsite-tostring.js
@@ -0,0 +1,101 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = callSiteToString
+
+/**
+ * Format a CallSite file location to a string.
+ */
+
+function callSiteFileLocation(callSite) {
+ var fileName
+ var fileLocation = ''
+
+ if (callSite.isNative()) {
+ fileLocation = 'native'
+ } else if (callSite.isEval()) {
+ fileName = callSite.getScriptNameOrSourceURL()
+ if (!fileName) {
+ fileLocation = callSite.getEvalOrigin()
+ }
+ } else {
+ fileName = callSite.getFileName()
+ }
+
+ if (fileName) {
+ fileLocation += fileName
+
+ var lineNumber = callSite.getLineNumber()
+ if (lineNumber != null) {
+ fileLocation += ':' + lineNumber
+
+ var columnNumber = callSite.getColumnNumber()
+ if (columnNumber) {
+ fileLocation += ':' + columnNumber
+ }
+ }
+ }
+
+ return fileLocation || 'unknown source'
+}
+
+/**
+ * Format a CallSite to a string.
+ */
+
+function callSiteToString(callSite) {
+ var addSuffix = true
+ var fileLocation = callSiteFileLocation(callSite)
+ var functionName = callSite.getFunctionName()
+ var isConstructor = callSite.isConstructor()
+ var isMethodCall = !(callSite.isToplevel() || isConstructor)
+ var line = ''
+
+ if (isMethodCall) {
+ var methodName = callSite.getMethodName()
+ var typeName = getConstructorName(callSite)
+
+ if (functionName) {
+ if (typeName && functionName.indexOf(typeName) !== 0) {
+ line += typeName + '.'
+ }
+
+ line += functionName
+
+ if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) {
+ line += ' [as ' + methodName + ']'
+ }
+ } else {
+ line += typeName + '.' + (methodName || '<anonymous>')
+ }
+ } else if (isConstructor) {
+ line += 'new ' + (functionName || '<anonymous>')
+ } else if (functionName) {
+ line += functionName
+ } else {
+ addSuffix = false
+ line += fileLocation
+ }
+
+ if (addSuffix) {
+ line += ' (' + fileLocation + ')'
+ }
+
+ return line
+}
+
+/**
+ * Get constructor name of reviver.
+ */
+
+function getConstructorName(obj) {
+ var receiver = obj.receiver
+ return (receiver.constructor && receiver.constructor.name) || null
+}
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/lib/compat/index.js b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/lib/compat/index.js
new file mode 100644
index 0000000..7fee026
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/lib/compat/index.js
@@ -0,0 +1,69 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+lazyProperty(module.exports, 'bufferConcat', function bufferConcat() {
+ return Buffer.concat || require('./buffer-concat')
+})
+
+lazyProperty(module.exports, 'callSiteToString', function callSiteToString() {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ function prepareObjectStackTrace(obj, stack) {
+ return stack
+ }
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = 2
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice the stack
+ var stack = obj.stack.slice()
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack[0].toString ? toString : require('./callsite-tostring')
+})
+
+/**
+ * Define a lazy property.
+ */
+
+function lazyProperty(obj, prop, getter) {
+ function get() {
+ var val = getter()
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ value: val
+ })
+
+ return val
+ }
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ get: get
+ })
+}
+
+/**
+ * Call toString() on the obj
+ */
+
+function toString(obj) {
+ return obj.toString()
+}
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/package.json b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/package.json
new file mode 100644
index 0000000..b72bf60
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/depd/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "depd",
+ "description": "Deprecate all the things",
+ "version": "1.0.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "deprecate",
+ "deprecated"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dougwilson/nodejs-depd"
+ },
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4",
+ "should": "~4.0.4"
+ },
+ "files": [
+ "lib/",
+ "History.md",
+ "LICENSE",
+ "index.js",
+ "Readme.md"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --reporter spec --bail --require should test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --require should test/"
+ },
+ "gitHead": "08b5a2182c8c1fdf7420e4ff8532bfd7e266a7b2",
+ "bugs": {
+ "url": "https://github.com/dougwilson/nodejs-depd/issues"
+ },
+ "homepage": "https://github.com/dougwilson/nodejs-depd",
+ "_id": "depd@1.0.0",
+ "_shasum": "2fda0d00e98aae2845d4991ab1bf1f2a199073d5",
+ "_from": "depd@~1.0.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "2fda0d00e98aae2845d4991ab1bf1f2a199073d5",
+ "tarball": "http://registry.npmjs.org/depd/-/depd-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/depd/-/depd-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/HISTORY.md b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/HISTORY.md
new file mode 100644
index 0000000..5d1e1c9
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/HISTORY.md
@@ -0,0 +1,76 @@
+2.2.0 / 2014-12-22
+==================
+
+ * Add message object to callback arguments
+
+2.1.1 / 2014-10-22
+==================
+
+ * Fix handling of pipelined requests
+
+2.1.0 / 2014-08-16
+==================
+
+ * Check if `socket` is detached
+ * Return `undefined` for `isFinished` if state unknown
+
+2.0.0 / 2014-08-16
+==================
+
+ * Add `isFinished` function
+ * Move to `jshttp` organization
+ * Remove support for plain socket argument
+ * Rename to `on-finished`
+ * Support both `req` and `res` as arguments
+ * deps: ee-first@1.0.5
+
+1.2.2 / 2014-06-10
+==================
+
+ * Reduce listeners added to emitters
+ - avoids "event emitter leak" warnings when used multiple times on same request
+
+1.2.1 / 2014-06-08
+==================
+
+ * Fix returned value when already finished
+
+1.2.0 / 2014-06-05
+==================
+
+ * Call callback when called on already-finished socket
+
+1.1.4 / 2014-05-27
+==================
+
+ * Support node.js 0.8
+
+1.1.3 / 2014-04-30
+==================
+
+ * Make sure errors passed as instanceof `Error`
+
+1.1.2 / 2014-04-18
+==================
+
+ * Default the `socket` to passed-in object
+
+1.1.1 / 2014-01-16
+==================
+
+ * Rename module to `finished`
+
+1.1.0 / 2013-12-25
+==================
+
+ * Call callback when called on already-errored socket
+
+1.0.1 / 2013-12-20
+==================
+
+ * Actually pass the error to the callback
+
+1.0.0 / 2013-12-20
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/LICENSE b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/LICENSE
new file mode 100644
index 0000000..5931fd2
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/README.md b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/README.md
new file mode 100644
index 0000000..29d6991
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/README.md
@@ -0,0 +1,109 @@
+# on-finished
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Execute a callback when a request closes, finishes, or errors.
+
+## Install
+
+```sh
+$ npm install on-finished
+```
+
+## API
+
+```js
+var onFinished = require('on-finished')
+```
+
+### onFinished(res, listener)
+
+Attach a listener to listen for the response to finish. The listener will
+be invoked only once when the response finished. If the response finished
+to to an error, the first argument will contain the error. If the response
+has already finished, the listener will be invoked.
+
+Listening to the end of a response would be used to close things associated
+with the response, like open files.
+
+Listener is invoked as `listener(err, res)`.
+
+```js
+onFinished(res, function (err, res) {
+ // clean up open fds, etc.
+ // err contains the error is request error'd
+})
+```
+
+### onFinished(req, listener)
+
+Attach a listener to listen for the request to finish. The listener will
+be invoked only once when the request finished. If the request finished
+to to an error, the first argument will contain the error. If the request
+has already finished, the listener will be invoked.
+
+Listening to the end of a request would be used to know when to continue
+after reading the data.
+
+Listener is invoked as `listener(err, req)`.
+
+```js
+var data = ''
+
+req.setEncoding('utf8')
+res.on('data', function (str) {
+ data += str
+})
+
+onFinished(req, function (err, req) {
+ // data is read unless there is err
+})
+```
+
+### onFinished.isFinished(res)
+
+Determine if `res` is already finished. This would be useful to check and
+not even start certain operations if the response has already finished.
+
+### onFinished.isFinished(req)
+
+Determine if `req` is already finished. This would be useful to check and
+not even start certain operations if the request has already finished.
+
+### Example
+
+The following code ensures that file descriptors are always closed
+once the response finishes.
+
+```js
+var destroy = require('destroy')
+var http = require('http')
+var onFinished = require('on-finished')
+
+http.createServer(function onRequest(req, res) {
+ var stream = fs.createReadStream('package.json')
+ stream.pipe(res)
+ onFinished(res, function (err) {
+ destroy(stream)
+ })
+})
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/on-finished.svg?style=flat
+[npm-url]: https://npmjs.org/package/on-finished
+[node-version-image]: https://img.shields.io/node/v/on-finished.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/on-finished.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/on-finished
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/on-finished.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/on-finished?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/on-finished.svg?style=flat
+[downloads-url]: https://npmjs.org/package/on-finished
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/index.js b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/index.js
new file mode 100644
index 0000000..f68161c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/index.js
@@ -0,0 +1,191 @@
+/*!
+ * on-finished
+ * Copyright(c) 2013 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = onFinished;
+module.exports.isFinished = isFinished;
+
+/**
+* Module dependencies.
+*/
+
+var first = require('ee-first')
+
+/**
+* Variables.
+*/
+
+/* istanbul ignore next */
+var defer = typeof setImmediate === 'function'
+ ? setImmediate
+ : function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) }
+
+/**
+ * Invoke callback when the response has finished, useful for
+ * cleaning up resources afterwards.
+ *
+ * @param {object} msg
+ * @param {function} listener
+ * @return {object}
+ * @api public
+ */
+
+function onFinished(msg, listener) {
+ if (isFinished(msg) !== false) {
+ defer(listener, null, msg)
+ return msg
+ }
+
+ // attach the listener to the message
+ attachListener(msg, listener)
+
+ return msg
+}
+
+/**
+ * Determine if message is already finished.
+ *
+ * @param {object} msg
+ * @return {boolean}
+ * @api public
+ */
+
+function isFinished(msg) {
+ var socket = msg.socket
+
+ if (typeof msg.finished === 'boolean') {
+ // OutgoingMessage
+ return Boolean(msg.finished || (socket && !socket.writable))
+ }
+
+ if (typeof msg.complete === 'boolean') {
+ // IncomingMessage
+ return Boolean(!socket || msg.complete || !socket.readable)
+ }
+
+ // don't know
+ return undefined
+}
+
+/**
+ * Attach a finished listener to the message.
+ *
+ * @param {object} msg
+ * @param {function} callback
+ * @private
+ */
+
+function attachFinishedListener(msg, callback) {
+ var eeMsg
+ var eeSocket
+ var finished = false
+
+ function onFinish(error) {
+ eeMsg.cancel()
+ eeSocket.cancel()
+
+ finished = true
+ callback(error)
+ }
+
+ // finished on first message event
+ eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish)
+
+ function onSocket(socket) {
+ // remove listener
+ msg.removeListener('socket', onSocket)
+
+ if (finished) return
+ if (eeMsg !== eeSocket) return
+
+ // finished on first socket event
+ eeSocket = first([[socket, 'error', 'close']], onFinish)
+ }
+
+ if (msg.socket) {
+ // socket already assigned
+ onSocket(msg.socket)
+ return
+ }
+
+ // wait for socket to be assigned
+ msg.on('socket', onSocket)
+
+ if (msg.socket === undefined) {
+ // node.js 0.8 patch
+ patchAssignSocket(msg, onSocket)
+ }
+}
+
+/**
+ * Attach the listener to the message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @api private
+ */
+
+function attachListener(msg, listener) {
+ var attached = msg.__onFinished
+
+ // create a private single listener with queue
+ if (!attached || !attached.queue) {
+ attached = msg.__onFinished = createListener(msg)
+ attachFinishedListener(msg, attached)
+ }
+
+ attached.queue.push(listener)
+}
+
+/**
+ * Create listener on message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @api private
+ */
+
+function createListener(msg) {
+ function listener(err) {
+ if (msg.__onFinished === listener) msg.__onFinished = null
+ if (!listener.queue) return
+
+ var queue = listener.queue
+ listener.queue = null
+
+ for (var i = 0; i < queue.length; i++) {
+ queue[i](err, msg)
+ }
+ }
+
+ listener.queue = []
+
+ return listener
+}
+
+/**
+ * Patch ServerResponse.prototype.assignSocket for node.js 0.8.
+ *
+ * @param {ServerResponse} res
+ * @param {function} callback
+ * @private
+ */
+
+function patchAssignSocket(res, callback) {
+ var assignSocket = res.assignSocket
+
+ if (typeof assignSocket !== 'function') return
+
+ // res.on('socket', callback) is broken in 0.8
+ res.assignSocket = function _assignSocket(socket) {
+ assignSocket.call(this, socket)
+ callback(socket)
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/node_modules/ee-first/LICENSE b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/node_modules/ee-first/LICENSE
new file mode 100644
index 0000000..c1b15a1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/node_modules/ee-first/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/node_modules/ee-first/README.md b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/node_modules/ee-first/README.md
new file mode 100644
index 0000000..bb16aab
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/node_modules/ee-first/README.md
@@ -0,0 +1,80 @@
+# EE First
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Get the first event in a set of event emitters and event pairs,
+then clean up after itself.
+
+## Install
+
+```sh
+$ npm install ee-first
+```
+
+## API
+
+```js
+var first = require('ee-first')
+```
+
+### first(arr, listener)
+
+Invoke `listener` on the first event from the list specified in `arr`. `arr` is
+an array of arrays, with each array in the format `[ee, ...event]`. `listener`
+will be called only once, the first time any of the given events are emitted. If
+`error` is one of the listened events, then if that fires first, the `listener`
+will be given the `err` argument.
+
+The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the
+first argument emitted from an `error` event, if applicable; `ee` is the event
+emitter that fired; `event` is the string event name that fired; and `args` is an
+array of the arguments that were emitted on the event.
+
+```js
+var ee1 = new EventEmitter()
+var ee2 = new EventEmitter()
+
+first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+```
+
+#### .cancel()
+
+The group of listeners can be cancelled before being invoked and have all the event
+listeners removed from the underlying event emitters.
+
+```js
+var thunk = first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+
+// cancel and clean up
+thunk.cancel()
+```
+
+[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/ee-first
+[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square
+[github-url]: https://github.com/jonathanong/ee-first/tags
+[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square
+[travis-url]: https://travis-ci.org/jonathanong/ee-first
+[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master
+[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/ee-first
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/node_modules/ee-first/index.js b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/node_modules/ee-first/index.js
new file mode 100644
index 0000000..1d66203
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/node_modules/ee-first/index.js
@@ -0,0 +1,68 @@
+
+module.exports = function first(stuff, done) {
+ if (!Array.isArray(stuff))
+ throw new TypeError('arg must be an array of [ee, events...] arrays')
+
+ var cleanups = []
+
+ for (var i = 0; i < stuff.length; i++) {
+ var arr = stuff[i]
+
+ if (!Array.isArray(arr) || arr.length < 2)
+ throw new TypeError('each array member must be [ee, events...]')
+
+ var ee = arr[0]
+
+ for (var j = 1; j < arr.length; j++) {
+ var event = arr[j]
+ var fn = listener(event, callback)
+
+ // listen to the event
+ ee.on(event, fn)
+ // push this listener to the list of cleanups
+ cleanups.push({
+ ee: ee,
+ event: event,
+ fn: fn,
+ })
+ }
+ }
+
+ function callback() {
+ cleanup()
+ done.apply(null, arguments)
+ }
+
+ function cleanup() {
+ var x
+ for (var i = 0; i < cleanups.length; i++) {
+ x = cleanups[i]
+ x.ee.removeListener(x.event, x.fn)
+ }
+ }
+
+ function thunk(fn) {
+ done = fn
+ }
+
+ thunk.cancel = cleanup
+
+ return thunk
+}
+
+function listener(event, done) {
+ return function onevent(arg1) {
+ var args = new Array(arguments.length)
+ var ee = this
+ var err = event === 'error'
+ ? arg1
+ : null
+
+ // copy args to prevent arguments escaping scope
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
+ }
+
+ done(err, ee, event, args)
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/node_modules/ee-first/package.json b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/node_modules/ee-first/package.json
new file mode 100644
index 0000000..5b39931
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/node_modules/ee-first/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "ee-first",
+ "description": "return the first event in a set of ee/event pairs",
+ "version": "1.1.0",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jonathanong/ee-first"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.2",
+ "mocha": "1"
+ },
+ "files": [
+ "index.js",
+ "LICENSE"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "a6412004da4745941af2fc98ec30c8da570da7ea",
+ "bugs": {
+ "url": "https://github.com/jonathanong/ee-first/issues"
+ },
+ "homepage": "https://github.com/jonathanong/ee-first",
+ "_id": "ee-first@1.1.0",
+ "_shasum": "6a0d7c6221e490feefd92ec3f441c9ce8cd097f4",
+ "_from": "ee-first@1.1.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "6a0d7c6221e490feefd92ec3f441c9ce8cd097f4",
+ "tarball": "http://registry.npmjs.org/ee-first/-/ee-first-1.1.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/package.json b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/package.json
new file mode 100644
index 0000000..426e3ff
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/node_modules/on-finished/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "on-finished",
+ "description": "Execute a callback when a request closes, finishes, or errors",
+ "version": "2.2.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/on-finished"
+ },
+ "dependencies": {
+ "ee-first": "1.1.0"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "fcd56f5674721cac92a16eff93547929716f5192",
+ "bugs": {
+ "url": "https://github.com/jshttp/on-finished/issues"
+ },
+ "homepage": "https://github.com/jshttp/on-finished",
+ "_id": "on-finished@2.2.0",
+ "_shasum": "e6ba6a09a3482d6b7969bc3da92c86f0a967605e",
+ "_from": "on-finished@~2.2.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e6ba6a09a3482d6b7969bc3da92c86f0a967605e",
+ "tarball": "http://registry.npmjs.org/on-finished/-/on-finished-2.2.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.2.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/morgan/package.json b/dgbuilder/dgeflows/node_modules/morgan/package.json
new file mode 100644
index 0000000..2547696
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/morgan/package.json
@@ -0,0 +1,92 @@
+{
+ "name": "morgan",
+ "description": "HTTP request logger middleware for node.js",
+ "version": "1.5.1",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/expressjs/morgan"
+ },
+ "dependencies": {
+ "basic-auth": "1.0.0",
+ "debug": "~2.1.1",
+ "depd": "~1.0.0",
+ "on-finished": "~2.2.0"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~2.1.0",
+ "supertest": "~0.15.0"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "test": "mocha --check-leaks --reporter spec --bail",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec"
+ },
+ "gitHead": "ae84a264fb9cdd7b4d7e2bf19d93b0b51da99996",
+ "bugs": {
+ "url": "https://github.com/expressjs/morgan/issues"
+ },
+ "homepage": "https://github.com/expressjs/morgan",
+ "_id": "morgan@1.5.1",
+ "_shasum": "a9688eed9187ab648d816fc09c696fae882e16f6",
+ "_from": "morgan@~1.5.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "a9688eed9187ab648d816fc09c696fae882e16f6",
+ "tarball": "http://registry.npmjs.org/morgan/-/morgan-1.5.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/morgan/-/morgan-1.5.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-favicon/HISTORY.md
new file mode 100644
index 0000000..a96a344
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/HISTORY.md
@@ -0,0 +1,89 @@
+2.2.0 / 2014-12-18
+==================
+
+ * Support query string in the URL
+ * deps: etag@~1.5.1
+ - deps: crc@3.2.1
+ * deps: ms@0.7.0
+ - Add `milliseconds`
+ - Add `msecs`
+ - Add `secs`
+ - Add `mins`
+ - Add `hrs`
+ - Add `yrs`
+
+2.1.7 / 2014-11-19
+==================
+
+ * Avoid errors from enumerables on `Object.prototype`
+
+2.1.6 / 2014-10-16
+==================
+
+ * deps: etag@~1.5.0
+
+2.1.5 / 2014-09-24
+==================
+
+ * deps: etag@~1.4.0
+
+2.1.4 / 2014-09-15
+==================
+
+ * Fix content headers being sent in 304 response
+ * deps: etag@~1.3.1
+ - Improve ETag generation speed
+
+2.1.3 / 2014-09-07
+==================
+
+ * deps: fresh@0.2.4
+
+2.1.2 / 2014-09-05
+==================
+
+ * deps: etag@~1.3.0
+ - Improve ETag generation speed
+
+2.1.1 / 2014-08-25
+==================
+
+ * Fix `ms` to be listed as a dependency
+
+2.1.0 / 2014-08-24
+==================
+
+ * Accept string for `maxAge` (converted by `ms`)
+ * Use `etag` to generate `ETag` header
+
+2.0.1 / 2014-06-05
+==================
+
+ * Reduce byte size of `ETag` header
+
+2.0.0 / 2014-05-02
+==================
+
+ * `path` argument is required; there is no default icon.
+ * Accept `Buffer` of icon as first argument.
+ * Non-GET and HEAD requests are denied.
+ * Send valid max-age value
+ * Support conditional requests
+ * Support max-age=0
+ * Support OPTIONS method
+ * Throw if `path` argument is directory.
+
+1.0.2 / 2014-03-16
+==================
+
+ * Fixed content of default icon.
+
+1.0.1 / 2014-03-11
+==================
+
+ * Fixed path to default icon.
+
+1.0.0 / 2014-02-15
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/LICENSE b/dgbuilder/dgeflows/node_modules/serve-favicon/LICENSE
new file mode 100644
index 0000000..813ed6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/LICENSE
@@ -0,0 +1,25 @@
+(The MIT License)
+
+Copyright (c) 2010 Sencha Inc.
+Copyright (c) 2011 LearnBoost
+Copyright (c) 2011 TJ Holowaychuk
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/README.md b/dgbuilder/dgeflows/node_modules/serve-favicon/README.md
new file mode 100644
index 0000000..cb70b02
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/README.md
@@ -0,0 +1,120 @@
+# serve-favicon
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Node.js middleware for serving a favicon.
+
+Why use this module?
+
+ - User agents request `favicon.ico` frequently and indiscriminately, so you
+ may wish to exclude these requests from your logs by using this middleware
+ before your logger middleware.
+ - This module caches the icon in memory to improve performance by skipping
+ disk access.
+ - This module provides an `ETag` based on the contents of the icon, rather
+ than file system properties.
+ - This module will serve with the most compatible `Content-Type`.
+
+## Install
+
+```bash
+npm install serve-favicon
+```
+
+## API
+
+### favicon(path, options)
+
+Create new middleware to serve a favicon from the given `path` to a favicon file.
+`path` may also be a `Buffer` of the icon to serve.
+
+#### Options
+
+Serve favicon accepts these properties in the options object.
+
+##### maxAge
+
+The `cache-control` `max-age` directive in `ms`, defaulting to 1 day. This can
+also be a string accepted by the [ms](https://www.npmjs.org/package/ms#readme)
+module.
+
+## Examples
+
+Typically this middleware will come very early in your stack (maybe even first)
+to avoid processing any other middleware if we already know the request is for
+`/favicon.ico`.
+
+### express
+
+```javascript
+var express = require('express');
+var favicon = require('serve-favicon');
+
+var app = express();
+app.use(favicon(__dirname + '/public/favicon.ico'));
+
+// Add your routes here, etc.
+
+app.listen(3000);
+```
+
+### connect
+
+```javascript
+var connect = require('connect');
+var favicon = require('serve-favicon');
+
+var app = connect();
+app.use(favicon(__dirname + '/public/favicon.ico'));
+
+// Add your middleware here, etc.
+
+app.listen(3000);
+```
+
+### vanilla http server
+
+This middleware can be used anywhere, even outside express/connect. It takes
+`req`, `res`, and `callback`.
+
+```javascript
+var http = require('http');
+var favicon = require('serve-favicon');
+var finalhandler = require('finalhandler');
+
+var _favicon = favicon(__dirname + '/public/favicon.ico');
+
+var server = http.createServer(function onRequest(req, res) {
+ var done = finalhandler(req, res);
+
+ _favicon(req, res, function onNext(err) {
+ if (err) return done(err);
+
+ // continue to process the request here, etc.
+
+ res.statusCode = 404;
+ res.end('oops');
+ });
+});
+
+server.listen(3000);
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/serve-favicon.svg?style=flat
+[npm-url]: https://npmjs.org/package/serve-favicon
+[travis-image]: https://img.shields.io/travis/expressjs/serve-favicon.svg?style=flat
+[travis-url]: https://travis-ci.org/expressjs/serve-favicon
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/serve-favicon.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/expressjs/serve-favicon?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/serve-favicon.svg?style=flat
+[downloads-url]: https://npmjs.org/package/serve-favicon
+[gittip-image]: https://img.shields.io/gittip/dougwilson.svg?style=flat
+[gittip-url]: https://www.gittip.com/dougwilson/
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/index.js b/dgbuilder/dgeflows/node_modules/serve-favicon/index.js
new file mode 100644
index 0000000..b83e85f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/index.js
@@ -0,0 +1,167 @@
+/*!
+ * serve-favicon
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var etag = require('etag');
+var fresh = require('fresh');
+var fs = require('fs');
+var ms = require('ms');
+var parseUrl = require('parseurl');
+var path = require('path');
+var resolve = path.resolve;
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var maxMaxAge = 60 * 60 * 24 * 365 * 1000; // 1 year
+
+/**
+ * Serves the favicon located by the given `path`.
+ *
+ * @public
+ * @param {String|Buffer} path
+ * @param {Object} options
+ * @return {Function} middleware
+ */
+
+module.exports = function favicon(path, options){
+ options = options || {};
+
+ var buf;
+ var icon; // favicon cache
+ var maxAge = calcMaxAge(options.maxAge);
+ var stat;
+
+ if (!path) throw new TypeError('path to favicon.ico is required');
+
+ if (Buffer.isBuffer(path)) {
+ buf = new Buffer(path.length);
+ path.copy(buf);
+
+ icon = createIcon(buf, maxAge);
+ } else if (typeof path === 'string') {
+ path = resolve(path);
+ stat = fs.statSync(path);
+ if (stat.isDirectory()) throw createIsDirError(path);
+ } else {
+ throw new TypeError('path to favicon.ico must be string or buffer');
+ }
+
+ return function favicon(req, res, next){
+ if (parseUrl(req).pathname !== '/favicon.ico') {
+ next();
+ return;
+ }
+
+ if ('GET' !== req.method && 'HEAD' !== req.method) {
+ var status = 'OPTIONS' === req.method ? 200 : 405;
+ res.writeHead(status, {'Allow': 'GET, HEAD, OPTIONS'});
+ res.end();
+ return;
+ }
+
+ if (icon) return send(req, res, icon);
+
+ fs.readFile(path, function(err, buf){
+ if (err) return next(err);
+ icon = createIcon(buf, maxAge);
+ send(req, res, icon);
+ });
+ };
+};
+
+/**
+ * Calculate the max-age from a configured value.
+ *
+ * @private
+ * @param {string|number} val
+ * @return {number}
+ */
+
+function calcMaxAge(val) {
+ var num = typeof val === 'string'
+ ? ms(val)
+ : val;
+
+ return num != null
+ ? Math.min(Math.max(0, num), maxMaxAge)
+ : maxMaxAge
+}
+
+/**
+ * Create icon data from Buffer and max-age.
+ *
+ * @private
+ * @param {Buffer} buf
+ * @param {number} maxAge
+ * @return {object}
+ */
+
+function createIcon(buf, maxAge) {
+ return {
+ body: buf,
+ headers: {
+ 'Cache-Control': 'public, max-age=' + ~~(maxAge / 1000),
+ 'ETag': etag(buf)
+ }
+ };
+}
+
+/**
+ * Create EISDIR error.
+ *
+ * @private
+ * @param {string} path
+ * @return {Error}
+ */
+
+function createIsDirError(path) {
+ var error = new Error('EISDIR, illegal operation on directory \'' + path + '\'');
+ error.code = 'EISDIR';
+ error.errno = 28;
+ error.path = path;
+ error.syscall = 'open';
+ return error;
+}
+
+/**
+ * Send icon data in response to a request.
+ *
+ * @private
+ * @param {IncomingMessage} req
+ * @param {OutgoingMessage} res
+ * @param {object} icon
+ */
+
+function send(req, res, icon) {
+ var headers = icon.headers;
+
+ // Set headers
+ var keys = Object.keys(headers);
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ res.setHeader(key, headers[key]);
+ }
+
+ if (fresh(req.headers, res._headers)) {
+ res.statusCode = 304;
+ res.end();
+ return;
+ }
+
+ res.statusCode = 200;
+ res.setHeader('Content-Length', icon.body.length);
+ res.setHeader('Content-Type', 'image/x-icon');
+ res.end(icon.body);
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/HISTORY.md
new file mode 100644
index 0000000..10cf504
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/HISTORY.md
@@ -0,0 +1,55 @@
+1.5.1 / 2014-11-19
+==================
+
+ * deps: crc@3.2.1
+ - Minor fixes
+
+1.5.0 / 2014-10-14
+==================
+
+ * Improve string performance
+ * Slightly improve speed for weak ETags over 1KB
+
+1.4.0 / 2014-09-21
+==================
+
+ * Support "fake" stats objects
+ * Support Node.js 0.6
+
+1.3.1 / 2014-09-14
+==================
+
+ * Use the (new and improved) `crc` for crc32
+
+1.3.0 / 2014-08-29
+==================
+
+ * Default strings to strong ETags
+ * Improve speed for weak ETags over 1KB
+
+1.2.1 / 2014-08-29
+==================
+
+ * Use the (much faster) `buffer-crc32` for crc32
+
+1.2.0 / 2014-08-24
+==================
+
+ * Add support for file stat objects
+
+1.1.0 / 2014-08-24
+==================
+
+ * Add fast-path for empty entity
+ * Add weak ETag generation
+ * Shrink size of generated ETags
+
+1.0.1 / 2014-08-24
+==================
+
+ * Fix behavior of string containing Unicode
+
+1.0.0 / 2014-05-18
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/LICENSE b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/README.md b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/README.md
new file mode 100644
index 0000000..68c16d5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/README.md
@@ -0,0 +1,141 @@
+# etag
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create simple ETags
+
+## Installation
+
+```sh
+$ npm install etag
+```
+
+## API
+
+```js
+var etag = require('etag')
+```
+
+### etag(entity, [options])
+
+Generate a strong ETag for the given entity. This should be the complete
+body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By
+default, a strong ETag is generated except for `fs.Stats`, which will
+generate a weak ETag (this can be overwritten by `options.weak`).
+
+```js
+res.setHeader('ETag', etag(body))
+```
+
+#### Options
+
+`etag` accepts these properties in the options object.
+
+##### weak
+
+Specifies if a "strong" or a "weak" ETag will be generated. The ETag can only
+really be a strong as the given input.
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## Benchmark
+
+```bash
+$ npm run-script bench
+
+> etag@1.5.1 bench nodejs-etag
+> node benchmark/index.js
+
+> node benchmark/body0-100b.js
+
+ 100B body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 425,007 ops/sec ±1.47% (184 runs sampled)
+* buffer - weak x 1,009,859 ops/sec ±0.18% (197 runs sampled)
+ string - strong x 442,096 ops/sec ±1.20% (181 runs sampled)
+ string - weak x 325,063 ops/sec ±0.31% (192 runs sampled)
+
+> node benchmark/body1-1kb.js
+
+ 1KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 263,069 ops/sec ±1.60% (190 runs sampled)
+* buffer - weak x 295,732 ops/sec ±0.43% (199 runs sampled)
+ string - strong x 274,822 ops/sec ±1.15% (191 runs sampled)
+ string - weak x 169,473 ops/sec ±1.59% (194 runs sampled)
+
+> node benchmark/body2-5kb.js
+
+ 5KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 104,299 ops/sec ±0.60% (193 runs sampled)
+* buffer - weak x 108,126 ops/sec ±0.65% (196 runs sampled)
+ string - strong x 101,736 ops/sec ±0.78% (194 runs sampled)
+ string - weak x 101,266 ops/sec ±0.85% (192 runs sampled)
+
+> node benchmark/body3-10kb.js
+
+ 10KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 59,007 ops/sec ±0.29% (198 runs sampled)
+* buffer - weak x 60,968 ops/sec ±0.48% (197 runs sampled)
+ string - strong x 51,873 ops/sec ±1.78% (178 runs sampled)
+ string - weak x 52,307 ops/sec ±2.63% (193 runs sampled)
+
+> node benchmark/body4-100kb.js
+
+ 100KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 6,712 ops/sec ±0.11% (198 runs sampled)
+* buffer - weak x 6,716 ops/sec ±0.50% (196 runs sampled)
+ string - strong x 6,397 ops/sec ±0.36% (196 runs sampled)
+ string - weak x 6,635 ops/sec ±0.15% (198 runs sampled)
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/etag.svg?style=flat
+[npm-url]: https://npmjs.org/package/etag
+[node-version-image]: https://img.shields.io/node/v/etag.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/etag.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/etag
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/etag.svg?style=flat
+[downloads-url]: https://npmjs.org/package/etag
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/index.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/index.js
new file mode 100644
index 0000000..bb05eb7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/index.js
@@ -0,0 +1,171 @@
+/*!
+ * etag
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = etag
+
+/**
+ * Module dependencies.
+ */
+
+var crc = require('crc').crc32
+var crypto = require('crypto')
+var Stats = require('fs').Stats
+
+/**
+ * Module variables.
+ */
+
+var crc32threshold = 1000 // 1KB
+var NULL = new Buffer([0])
+var toString = Object.prototype.toString
+
+/**
+ * Create a simple ETag.
+ *
+ * @param {string|Buffer|Stats} entity
+ * @param {object} [options]
+ * @param {boolean} [options.weak]
+ * @return {String}
+ * @api public
+ */
+
+function etag(entity, options) {
+ if (entity == null) {
+ throw new TypeError('argument entity is required')
+ }
+
+ var isStats = isstats(entity)
+ var weak = options && typeof options.weak === 'boolean'
+ ? options.weak
+ : isStats
+
+ // support fs.Stats object
+ if (isStats) {
+ return stattag(entity, weak)
+ }
+
+ if (typeof entity !== 'string' && !Buffer.isBuffer(entity)) {
+ throw new TypeError('argument entity must be string, Buffer, or fs.Stats')
+ }
+
+ var hash = weak
+ ? weakhash(entity)
+ : stronghash(entity)
+
+ return weak
+ ? 'W/"' + hash + '"'
+ : '"' + hash + '"'
+}
+
+/**
+ * Determine if object is a Stats object.
+ *
+ * @param {object} obj
+ * @return {boolean}
+ * @api private
+ */
+
+function isstats(obj) {
+ // not even an object
+ if (obj === null || typeof obj !== 'object') {
+ return false
+ }
+
+ // genuine fs.Stats
+ if (obj instanceof Stats) {
+ return true
+ }
+
+ // quack quack
+ return 'atime' in obj && toString.call(obj.atime) === '[object Date]'
+ && 'ctime' in obj && toString.call(obj.ctime) === '[object Date]'
+ && 'mtime' in obj && toString.call(obj.mtime) === '[object Date]'
+ && 'ino' in obj && typeof obj.ino === 'number'
+ && 'size' in obj && typeof obj.size === 'number'
+}
+
+/**
+ * Generate a tag for a stat.
+ *
+ * @param {Buffer} entity
+ * @return {String}
+ * @api private
+ */
+
+function stattag(stat, weak) {
+ var mtime = stat.mtime.toISOString()
+ var size = stat.size.toString(16)
+
+ if (weak) {
+ return 'W/"' + size + '-' + crc(mtime) + '"'
+ }
+
+ var hash = crypto
+ .createHash('md5')
+ .update('file', 'utf8')
+ .update(NULL)
+ .update(size, 'utf8')
+ .update(NULL)
+ .update(mtime, 'utf8')
+ .digest('base64')
+
+ return '"' + hash + '"'
+}
+
+/**
+ * Generate a strong hash.
+ *
+ * @param {Buffer} entity
+ * @return {String}
+ * @api private
+ */
+
+function stronghash(entity) {
+ if (entity.length === 0) {
+ // fast-path empty
+ return '1B2M2Y8AsgTpgAmY7PhCfg=='
+ }
+
+ return crypto
+ .createHash('md5')
+ .update(entity, 'utf8')
+ .digest('base64')
+}
+
+/**
+ * Generate a weak hash.
+ *
+ * @param {Buffer} entity
+ * @return {String}
+ * @api private
+ */
+
+function weakhash(entity) {
+ if (entity.length === 0) {
+ // fast-path empty
+ return '0-0'
+ }
+
+ var len = typeof entity === 'string'
+ ? Buffer.byteLength(entity, 'utf8')
+ : entity.length
+
+ if (len <= crc32threshold) {
+ // crc32 plus length when it's fast
+ // crc(str) only accepts utf-8 encoding
+ return len.toString(16) + '-' + crc(entity).toString(16)
+ }
+
+ // use md4 for long strings
+ return crypto
+ .createHash('md4')
+ .update(entity, 'utf8')
+ .digest('base64')
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/.npmignore b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/.npmignore
new file mode 100644
index 0000000..57d4cb8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/.npmignore
@@ -0,0 +1,5 @@
+benchmark
+src
+test
+.travis.yml
+bitcoin.png
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/LICENSE b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/LICENSE
new file mode 100644
index 0000000..c49097c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright 2014 Alex Gorbatchev
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/README.md b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/README.md
new file mode 100644
index 0000000..6473cbd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/README.md
@@ -0,0 +1,98 @@
+# crc
+
+[![GitTip](http://img.shields.io/gittip/alexgorbatchev.svg?style=flat)](https://www.gittip.com/alexgorbatchev/)
+[![Dependency status](http://img.shields.io/david/alexgorbatchev/node-crc.svg?style=flat)](https://david-dm.org/alexgorbatchev/node-crc)
+[![devDependency Status](http://img.shields.io/david/dev/alexgorbatchev/node-crc.svg?style=flat)](https://david-dm.org/alexgorbatchev/node-crc#info=devDependencies)
+[![Build Status](http://img.shields.io/travis/alexgorbatchev/node-crc.svg?style=flat&branch=master)](https://travis-ci.org/alexgorbatchev/node-crc)
+
+[![NPM](https://nodei.co/npm/crc.svg?style=flat)](https://npmjs.org/package/node-crc)
+
+Module for calculating Cyclic Redundancy Check (CRC).
+
+## Features
+
+* Full test suite comparing values against reference `pycrc` implementation.
+* Version 3.x is 3x to 4x faster than version 2.x.
+* Pure JavaScript implementation, no dependencies.
+* Provides CRC Tables for optimized calculations.
+* Provides support for the following CRC algorithms:
+ * CRC1 `crc.crc1(…)`
+ * CRC8 `crc.crc8(…)`
+ * CRC8 1-Wire `crc.crc81wire(…)`
+ * CRC16 `crc.crc16(…)`
+ * CRC16 CCITT `crc.crc16ccitt(…)`
+ * CRC16 Modbus `crc.crc16modbus(…)`
+ * CRC24 `crc.crc24(…)`
+ * CRC32 `crc.crc32(…)`
+
+## IMPORTANT
+
+If you've used `crc` module prior to version 2.x, you might have some inconsistentcies with the current implementation because it relied on very old code and wasn't checked against reference implementation. If you upgrading from 1.x, please take special care.
+
+## Support
+
+<a href="https://blockchain.info/address/1CZyBREeHTmy8C5zVGHZHPwqBuWFmEuUCQ"><img src="bitcoin.png" width="150" align="right"/></a> Please support me on [GitTip](https://www.gittip.com/alexgorbatchev/). I've spend days developing and grooming this module and hope to spend more time. If you have bitcoin, please use the QR code or this wallet address [`1CZyBREeHTmy8C5zVGHZHPwqBuWFmEuUCQ`](https://blockchain.info/address/1CZyBREeHTmy8C5zVGHZHPwqBuWFmEuUCQ):
+
+## Installation
+
+ npm install crc
+
+## Running tests
+
+ $ npm install
+ $ npm test
+
+## Usage Example
+
+Calculate a CRC32:
+
+ var crc = require('crc');
+
+ crc.crc32('hello').toString(16);
+ # => "3610a686"
+
+Calculate a CRC32 of a file:
+
+ crc.crc32(fs.readFileSync('README.md', 'utf8')).toString(16);
+ # => "127ad531"
+
+Or using a `Buffer`:
+
+ crc.crc32(fs.readFileSync('README.md')).toString(16);
+ # => "127ad531"
+
+Incrementally calculate a CRC32:
+
+ value = crc32('one');
+ value = crc32('two', value);
+ value = crc32('three', value);
+ value.toString(16);
+ # => "09e1c092"
+
+## Thanks!
+
+[pycrc](http://www.tty1.net/pycrc/) library is which the source of all of the CRC tables.
+
+# License
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Alex Gorbatchev
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc.js
new file mode 100644
index 0000000..1c342b7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc.js
@@ -0,0 +1,71 @@
+// Generated by CoffeeScript 1.7.1
+var CRC, hex;
+
+hex = require('./hex');
+
+module.exports = CRC = (function() {
+ CRC.prototype.INIT_CRC = 0x00;
+
+ CRC.prototype.XOR_MASK = 0x00;
+
+ CRC.prototype.WIDTH = 0;
+
+ CRC.prototype.pack = function(crc) {
+ return '';
+ };
+
+ CRC.prototype.each_byte = function(buf, cb) {
+ var i, _i, _ref, _results;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ _results = [];
+ for (i = _i = 0, _ref = buf.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
+ _results.push(cb(buf[i]));
+ }
+ return _results;
+ };
+
+ function CRC() {
+ this.crc = this.INIT_CRC;
+ }
+
+ CRC.prototype.digest_length = function() {
+ return Math.ceil(this.WIDTH / 8.0);
+ };
+
+ CRC.prototype.update = function(data) {};
+
+ CRC.prototype.reset = function() {
+ return this.crc = this.INIT_CRC;
+ };
+
+ CRC.prototype.checksum = function(signed) {
+ var sum;
+ if (signed == null) {
+ signed = true;
+ }
+ sum = this.crc ^ this.XOR_MASK;
+ if (signed) {
+ sum = sum >>> 0;
+ }
+ return sum;
+ };
+
+ CRC.prototype.finish = function() {
+ return this.pack(this.checksum());
+ };
+
+ CRC.prototype.hexdigest = function(value) {
+ var result;
+ if (value != null) {
+ this.update(value);
+ }
+ result = this.finish();
+ this.reset();
+ return result;
+ };
+
+ return CRC;
+
+})();
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc1.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc1.js
new file mode 100644
index 0000000..f094567
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc1.js
@@ -0,0 +1,21 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+module.exports = create('crc1', function(buf, previous) {
+ var accum, byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = ~~previous;
+ accum = 0;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ accum += byte;
+ }
+ crc += accum % 256;
+ return crc % 256;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc16.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc16.js
new file mode 100644
index 0000000..a09cd1e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc16.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241, 0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440, 0xcc01, 0x0cc0, 0x0d80, 0xcd41, 0x0f00, 0xcfc1, 0xce81, 0x0e40, 0x0a00, 0xcac1, 0xcb81, 0x0b40, 0xc901, 0x09c0, 0x0880, 0xc841, 0xd801, 0x18c0, 0x1980, 0xd941, 0x1b00, 0xdbc1, 0xda81, 0x1a40, 0x1e00, 0xdec1, 0xdf81, 0x1f40, 0xdd01, 0x1dc0, 0x1c80, 0xdc41, 0x1400, 0xd4c1, 0xd581, 0x1540, 0xd701, 0x17c0, 0x1680, 0xd641, 0xd201, 0x12c0, 0x1380, 0xd341, 0x1100, 0xd1c1, 0xd081, 0x1040, 0xf001, 0x30c0, 0x3180, 0xf141, 0x3300, 0xf3c1, 0xf281, 0x3240, 0x3600, 0xf6c1, 0xf781, 0x3740, 0xf501, 0x35c0, 0x3480, 0xf441, 0x3c00, 0xfcc1, 0xfd81, 0x3d40, 0xff01, 0x3fc0, 0x3e80, 0xfe41, 0xfa01, 0x3ac0, 0x3b80, 0xfb41, 0x3900, 0xf9c1, 0xf881, 0x3840, 0x2800, 0xe8c1, 0xe981, 0x2940, 0xeb01, 0x2bc0, 0x2a80, 0xea41, 0xee01, 0x2ec0, 0x2f80, 0xef41, 0x2d00, 0xedc1, 0xec81, 0x2c40, 0xe401, 0x24c0, 0x2580, 0xe541, 0x2700, 0xe7c1, 0xe681, 0x2640, 0x2200, 0xe2c1, 0xe381, 0x2340, 0xe101, 0x21c0, 0x2080, 0xe041, 0xa001, 0x60c0, 0x6180, 0xa141, 0x6300, 0xa3c1, 0xa281, 0x6240, 0x6600, 0xa6c1, 0xa781, 0x6740, 0xa501, 0x65c0, 0x6480, 0xa441, 0x6c00, 0xacc1, 0xad81, 0x6d40, 0xaf01, 0x6fc0, 0x6e80, 0xae41, 0xaa01, 0x6ac0, 0x6b80, 0xab41, 0x6900, 0xa9c1, 0xa881, 0x6840, 0x7800, 0xb8c1, 0xb981, 0x7940, 0xbb01, 0x7bc0, 0x7a80, 0xba41, 0xbe01, 0x7ec0, 0x7f80, 0xbf41, 0x7d00, 0xbdc1, 0xbc81, 0x7c40, 0xb401, 0x74c0, 0x7580, 0xb541, 0x7700, 0xb7c1, 0xb681, 0x7640, 0x7200, 0xb2c1, 0xb381, 0x7340, 0xb101, 0x71c0, 0x7080, 0xb041, 0x5000, 0x90c1, 0x9181, 0x5140, 0x9301, 0x53c0, 0x5280, 0x9241, 0x9601, 0x56c0, 0x5780, 0x9741, 0x5500, 0x95c1, 0x9481, 0x5440, 0x9c01, 0x5cc0, 0x5d80, 0x9d41, 0x5f00, 0x9fc1, 0x9e81, 0x5e40, 0x5a00, 0x9ac1, 0x9b81, 0x5b40, 0x9901, 0x59c0, 0x5880, 0x9841, 0x8801, 0x48c0, 0x4980, 0x8941, 0x4b00, 0x8bc1, 0x8a81, 0x4a40, 0x4e00, 0x8ec1, 0x8f81, 0x4f40, 0x8d01, 0x4dc0, 0x4c80, 0x8c41, 0x4400, 0x84c1, 0x8581, 0x4540, 0x8701, 0x47c0, 0x4680, 0x8641, 0x8201, 0x42c0, 0x4380, 0x8341, 0x4100, 0x81c1, 0x8081, 0x4040];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-16', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = ~~previous;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = (TABLE[(crc ^ byte) & 0xff] ^ (crc >> 8)) & 0xffff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc16_ccitt.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc16_ccitt.js
new file mode 100644
index 0000000..0bdb0bf
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc16_ccitt.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('ccitt', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = previous != null ? ~~previous : 0xffff;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = (TABLE[((crc >> 8) ^ byte) & 0xff] ^ (crc << 8)) & 0xffff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc16_modbus.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc16_modbus.js
new file mode 100644
index 0000000..52a536a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc16_modbus.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241, 0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440, 0xcc01, 0x0cc0, 0x0d80, 0xcd41, 0x0f00, 0xcfc1, 0xce81, 0x0e40, 0x0a00, 0xcac1, 0xcb81, 0x0b40, 0xc901, 0x09c0, 0x0880, 0xc841, 0xd801, 0x18c0, 0x1980, 0xd941, 0x1b00, 0xdbc1, 0xda81, 0x1a40, 0x1e00, 0xdec1, 0xdf81, 0x1f40, 0xdd01, 0x1dc0, 0x1c80, 0xdc41, 0x1400, 0xd4c1, 0xd581, 0x1540, 0xd701, 0x17c0, 0x1680, 0xd641, 0xd201, 0x12c0, 0x1380, 0xd341, 0x1100, 0xd1c1, 0xd081, 0x1040, 0xf001, 0x30c0, 0x3180, 0xf141, 0x3300, 0xf3c1, 0xf281, 0x3240, 0x3600, 0xf6c1, 0xf781, 0x3740, 0xf501, 0x35c0, 0x3480, 0xf441, 0x3c00, 0xfcc1, 0xfd81, 0x3d40, 0xff01, 0x3fc0, 0x3e80, 0xfe41, 0xfa01, 0x3ac0, 0x3b80, 0xfb41, 0x3900, 0xf9c1, 0xf881, 0x3840, 0x2800, 0xe8c1, 0xe981, 0x2940, 0xeb01, 0x2bc0, 0x2a80, 0xea41, 0xee01, 0x2ec0, 0x2f80, 0xef41, 0x2d00, 0xedc1, 0xec81, 0x2c40, 0xe401, 0x24c0, 0x2580, 0xe541, 0x2700, 0xe7c1, 0xe681, 0x2640, 0x2200, 0xe2c1, 0xe381, 0x2340, 0xe101, 0x21c0, 0x2080, 0xe041, 0xa001, 0x60c0, 0x6180, 0xa141, 0x6300, 0xa3c1, 0xa281, 0x6240, 0x6600, 0xa6c1, 0xa781, 0x6740, 0xa501, 0x65c0, 0x6480, 0xa441, 0x6c00, 0xacc1, 0xad81, 0x6d40, 0xaf01, 0x6fc0, 0x6e80, 0xae41, 0xaa01, 0x6ac0, 0x6b80, 0xab41, 0x6900, 0xa9c1, 0xa881, 0x6840, 0x7800, 0xb8c1, 0xb981, 0x7940, 0xbb01, 0x7bc0, 0x7a80, 0xba41, 0xbe01, 0x7ec0, 0x7f80, 0xbf41, 0x7d00, 0xbdc1, 0xbc81, 0x7c40, 0xb401, 0x74c0, 0x7580, 0xb541, 0x7700, 0xb7c1, 0xb681, 0x7640, 0x7200, 0xb2c1, 0xb381, 0x7340, 0xb101, 0x71c0, 0x7080, 0xb041, 0x5000, 0x90c1, 0x9181, 0x5140, 0x9301, 0x53c0, 0x5280, 0x9241, 0x9601, 0x56c0, 0x5780, 0x9741, 0x5500, 0x95c1, 0x9481, 0x5440, 0x9c01, 0x5cc0, 0x5d80, 0x9d41, 0x5f00, 0x9fc1, 0x9e81, 0x5e40, 0x5a00, 0x9ac1, 0x9b81, 0x5b40, 0x9901, 0x59c0, 0x5880, 0x9841, 0x8801, 0x48c0, 0x4980, 0x8941, 0x4b00, 0x8bc1, 0x8a81, 0x4a40, 0x4e00, 0x8ec1, 0x8f81, 0x4f40, 0x8d01, 0x4dc0, 0x4c80, 0x8c41, 0x4400, 0x84c1, 0x8581, 0x4540, 0x8701, 0x47c0, 0x4680, 0x8641, 0x8201, 0x42c0, 0x4380, 0x8341, 0x4100, 0x81c1, 0x8081, 0x4040];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-16-modbus', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = previous != null ? ~~previous : 0xffff;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = (TABLE[(crc ^ byte) & 0xff] ^ (crc >> 8)) & 0xffff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc24.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc24.js
new file mode 100644
index 0000000..ff67bc1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc24.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x000000, 0x864cfb, 0x8ad50d, 0x0c99f6, 0x93e6e1, 0x15aa1a, 0x1933ec, 0x9f7f17, 0xa18139, 0x27cdc2, 0x2b5434, 0xad18cf, 0x3267d8, 0xb42b23, 0xb8b2d5, 0x3efe2e, 0xc54e89, 0x430272, 0x4f9b84, 0xc9d77f, 0x56a868, 0xd0e493, 0xdc7d65, 0x5a319e, 0x64cfb0, 0xe2834b, 0xee1abd, 0x685646, 0xf72951, 0x7165aa, 0x7dfc5c, 0xfbb0a7, 0x0cd1e9, 0x8a9d12, 0x8604e4, 0x00481f, 0x9f3708, 0x197bf3, 0x15e205, 0x93aefe, 0xad50d0, 0x2b1c2b, 0x2785dd, 0xa1c926, 0x3eb631, 0xb8faca, 0xb4633c, 0x322fc7, 0xc99f60, 0x4fd39b, 0x434a6d, 0xc50696, 0x5a7981, 0xdc357a, 0xd0ac8c, 0x56e077, 0x681e59, 0xee52a2, 0xe2cb54, 0x6487af, 0xfbf8b8, 0x7db443, 0x712db5, 0xf7614e, 0x19a3d2, 0x9fef29, 0x9376df, 0x153a24, 0x8a4533, 0x0c09c8, 0x00903e, 0x86dcc5, 0xb822eb, 0x3e6e10, 0x32f7e6, 0xb4bb1d, 0x2bc40a, 0xad88f1, 0xa11107, 0x275dfc, 0xdced5b, 0x5aa1a0, 0x563856, 0xd074ad, 0x4f0bba, 0xc94741, 0xc5deb7, 0x43924c, 0x7d6c62, 0xfb2099, 0xf7b96f, 0x71f594, 0xee8a83, 0x68c678, 0x645f8e, 0xe21375, 0x15723b, 0x933ec0, 0x9fa736, 0x19ebcd, 0x8694da, 0x00d821, 0x0c41d7, 0x8a0d2c, 0xb4f302, 0x32bff9, 0x3e260f, 0xb86af4, 0x2715e3, 0xa15918, 0xadc0ee, 0x2b8c15, 0xd03cb2, 0x567049, 0x5ae9bf, 0xdca544, 0x43da53, 0xc596a8, 0xc90f5e, 0x4f43a5, 0x71bd8b, 0xf7f170, 0xfb6886, 0x7d247d, 0xe25b6a, 0x641791, 0x688e67, 0xeec29c, 0x3347a4, 0xb50b5f, 0xb992a9, 0x3fde52, 0xa0a145, 0x26edbe, 0x2a7448, 0xac38b3, 0x92c69d, 0x148a66, 0x181390, 0x9e5f6b, 0x01207c, 0x876c87, 0x8bf571, 0x0db98a, 0xf6092d, 0x7045d6, 0x7cdc20, 0xfa90db, 0x65efcc, 0xe3a337, 0xef3ac1, 0x69763a, 0x578814, 0xd1c4ef, 0xdd5d19, 0x5b11e2, 0xc46ef5, 0x42220e, 0x4ebbf8, 0xc8f703, 0x3f964d, 0xb9dab6, 0xb54340, 0x330fbb, 0xac70ac, 0x2a3c57, 0x26a5a1, 0xa0e95a, 0x9e1774, 0x185b8f, 0x14c279, 0x928e82, 0x0df195, 0x8bbd6e, 0x872498, 0x016863, 0xfad8c4, 0x7c943f, 0x700dc9, 0xf64132, 0x693e25, 0xef72de, 0xe3eb28, 0x65a7d3, 0x5b59fd, 0xdd1506, 0xd18cf0, 0x57c00b, 0xc8bf1c, 0x4ef3e7, 0x426a11, 0xc426ea, 0x2ae476, 0xaca88d, 0xa0317b, 0x267d80, 0xb90297, 0x3f4e6c, 0x33d79a, 0xb59b61, 0x8b654f, 0x0d29b4, 0x01b042, 0x87fcb9, 0x1883ae, 0x9ecf55, 0x9256a3, 0x141a58, 0xefaaff, 0x69e604, 0x657ff2, 0xe33309, 0x7c4c1e, 0xfa00e5, 0xf69913, 0x70d5e8, 0x4e2bc6, 0xc8673d, 0xc4fecb, 0x42b230, 0xddcd27, 0x5b81dc, 0x57182a, 0xd154d1, 0x26359f, 0xa07964, 0xace092, 0x2aac69, 0xb5d37e, 0x339f85, 0x3f0673, 0xb94a88, 0x87b4a6, 0x01f85d, 0x0d61ab, 0x8b2d50, 0x145247, 0x921ebc, 0x9e874a, 0x18cbb1, 0xe37b16, 0x6537ed, 0x69ae1b, 0xefe2e0, 0x709df7, 0xf6d10c, 0xfa48fa, 0x7c0401, 0x42fa2f, 0xc4b6d4, 0xc82f22, 0x4e63d9, 0xd11cce, 0x575035, 0x5bc9c3, 0xdd8538];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-24', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = previous != null ? ~~previous : 0xb704ce;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = (TABLE[((crc >> 16) ^ byte) & 0xff] ^ (crc << 8)) & 0xffffff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc32.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc32.js
new file mode 100644
index 0000000..20bc024
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc32.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-32', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = previous === 0 ? 0 : ~~previous ^ -1;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = TABLE[(crc ^ byte) & 0xff] ^ (crc >>> 8);
+ }
+ return crc ^ -1;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc8.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc8.js
new file mode 100644
index 0000000..6ebe77c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc8.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15, 0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d, 0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65, 0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d, 0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb, 0xf2, 0xf5, 0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd, 0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85, 0xa8, 0xaf, 0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd, 0xc7, 0xc0, 0xc9, 0xce, 0xdb, 0xdc, 0xd5, 0xd2, 0xff, 0xf8, 0xf1, 0xf6, 0xe3, 0xe4, 0xed, 0xea, 0xb7, 0xb0, 0xb9, 0xbe, 0xab, 0xac, 0xa5, 0xa2, 0x8f, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9d, 0x9a, 0x27, 0x20, 0x29, 0x2e, 0x3b, 0x3c, 0x35, 0x32, 0x1f, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0d, 0x0a, 0x57, 0x50, 0x59, 0x5e, 0x4b, 0x4c, 0x45, 0x42, 0x6f, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7d, 0x7a, 0x89, 0x8e, 0x87, 0x80, 0x95, 0x92, 0x9b, 0x9c, 0xb1, 0xb6, 0xbf, 0xb8, 0xad, 0xaa, 0xa3, 0xa4, 0xf9, 0xfe, 0xf7, 0xf0, 0xe5, 0xe2, 0xeb, 0xec, 0xc1, 0xc6, 0xcf, 0xc8, 0xdd, 0xda, 0xd3, 0xd4, 0x69, 0x6e, 0x67, 0x60, 0x75, 0x72, 0x7b, 0x7c, 0x51, 0x56, 0x5f, 0x58, 0x4d, 0x4a, 0x43, 0x44, 0x19, 0x1e, 0x17, 0x10, 0x05, 0x02, 0x0b, 0x0c, 0x21, 0x26, 0x2f, 0x28, 0x3d, 0x3a, 0x33, 0x34, 0x4e, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5c, 0x5b, 0x76, 0x71, 0x78, 0x7f, 0x6a, 0x6d, 0x64, 0x63, 0x3e, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2c, 0x2b, 0x06, 0x01, 0x08, 0x0f, 0x1a, 0x1d, 0x14, 0x13, 0xae, 0xa9, 0xa0, 0xa7, 0xb2, 0xb5, 0xbc, 0xbb, 0x96, 0x91, 0x98, 0x9f, 0x8a, 0x8d, 0x84, 0x83, 0xde, 0xd9, 0xd0, 0xd7, 0xc2, 0xc5, 0xcc, 0xcb, 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-8', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = ~~previous;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = TABLE[(crc ^ byte) & 0xff] & 0xff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc8_1wire.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc8_1wire.js
new file mode 100644
index 0000000..b561246
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/crc8_1wire.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x00, 0x5e, 0xbc, 0xe2, 0x61, 0x3f, 0xdd, 0x83, 0xc2, 0x9c, 0x7e, 0x20, 0xa3, 0xfd, 0x1f, 0x41, 0x9d, 0xc3, 0x21, 0x7f, 0xfc, 0xa2, 0x40, 0x1e, 0x5f, 0x01, 0xe3, 0xbd, 0x3e, 0x60, 0x82, 0xdc, 0x23, 0x7d, 0x9f, 0xc1, 0x42, 0x1c, 0xfe, 0xa0, 0xe1, 0xbf, 0x5d, 0x03, 0x80, 0xde, 0x3c, 0x62, 0xbe, 0xe0, 0x02, 0x5c, 0xdf, 0x81, 0x63, 0x3d, 0x7c, 0x22, 0xc0, 0x9e, 0x1d, 0x43, 0xa1, 0xff, 0x46, 0x18, 0xfa, 0xa4, 0x27, 0x79, 0x9b, 0xc5, 0x84, 0xda, 0x38, 0x66, 0xe5, 0xbb, 0x59, 0x07, 0xdb, 0x85, 0x67, 0x39, 0xba, 0xe4, 0x06, 0x58, 0x19, 0x47, 0xa5, 0xfb, 0x78, 0x26, 0xc4, 0x9a, 0x65, 0x3b, 0xd9, 0x87, 0x04, 0x5a, 0xb8, 0xe6, 0xa7, 0xf9, 0x1b, 0x45, 0xc6, 0x98, 0x7a, 0x24, 0xf8, 0xa6, 0x44, 0x1a, 0x99, 0xc7, 0x25, 0x7b, 0x3a, 0x64, 0x86, 0xd8, 0x5b, 0x05, 0xe7, 0xb9, 0x8c, 0xd2, 0x30, 0x6e, 0xed, 0xb3, 0x51, 0x0f, 0x4e, 0x10, 0xf2, 0xac, 0x2f, 0x71, 0x93, 0xcd, 0x11, 0x4f, 0xad, 0xf3, 0x70, 0x2e, 0xcc, 0x92, 0xd3, 0x8d, 0x6f, 0x31, 0xb2, 0xec, 0x0e, 0x50, 0xaf, 0xf1, 0x13, 0x4d, 0xce, 0x90, 0x72, 0x2c, 0x6d, 0x33, 0xd1, 0x8f, 0x0c, 0x52, 0xb0, 0xee, 0x32, 0x6c, 0x8e, 0xd0, 0x53, 0x0d, 0xef, 0xb1, 0xf0, 0xae, 0x4c, 0x12, 0x91, 0xcf, 0x2d, 0x73, 0xca, 0x94, 0x76, 0x28, 0xab, 0xf5, 0x17, 0x49, 0x08, 0x56, 0xb4, 0xea, 0x69, 0x37, 0xd5, 0x8b, 0x57, 0x09, 0xeb, 0xb5, 0x36, 0x68, 0x8a, 0xd4, 0x95, 0xcb, 0x29, 0x77, 0xf4, 0xaa, 0x48, 0x16, 0xe9, 0xb7, 0x55, 0x0b, 0x88, 0xd6, 0x34, 0x6a, 0x2b, 0x75, 0x97, 0xc9, 0x4a, 0x14, 0xf6, 0xa8, 0x74, 0x2a, 0xc8, 0x96, 0x15, 0x4b, 0xa9, 0xf7, 0xb6, 0xe8, 0x0a, 0x54, 0xd7, 0x89, 0x6b, 0x35];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('dallas-1-wire', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = ~~previous;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = TABLE[(crc ^ byte) & 0xff] & 0xff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/create.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/create.js
new file mode 100644
index 0000000..2d856bd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/create.js
@@ -0,0 +1,11 @@
+// Generated by CoffeeScript 1.7.1
+module.exports = function(model, calc) {
+ var fn;
+ fn = function(buf, previous) {
+ return calc(buf, previous) >>> 0;
+ };
+ fn.signed = calc;
+ fn.unsigned = fn;
+ fn.model = model;
+ return fn;
+};
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/hex.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/hex.js
new file mode 100644
index 0000000..0a6aa4c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/hex.js
@@ -0,0 +1,9 @@
+// Generated by CoffeeScript 1.7.1
+module.exports = function(number) {
+ var result;
+ result = number.toString(16);
+ while (result.length % 2) {
+ result = "0" + result;
+ }
+ return result;
+};
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/index.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/index.js
new file mode 100644
index 0000000..15ac34c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/lib/index.js
@@ -0,0 +1,11 @@
+// Generated by CoffeeScript 1.7.1
+module.exports = {
+ crc1: require('./crc1'),
+ crc8: require('./crc8'),
+ crc81wire: require('./crc8_1wire'),
+ crc16: require('./crc16'),
+ crc16ccitt: require('./crc16_ccitt'),
+ crc16modbus: require('./crc16_modbus'),
+ crc24: require('./crc24'),
+ crc32: require('./crc32')
+};
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/package.json b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/package.json
new file mode 100644
index 0000000..7b2853d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/node_modules/crc/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "crc",
+ "version": "3.2.1",
+ "description": "Various CRC JavaScript implementations",
+ "keywords": [
+ "crc"
+ ],
+ "main": "./lib/index.js",
+ "scripts": {
+ "test": "mocha test/*.spec.coffee",
+ "pretest": "coffee --bare --output ./lib --compile ./src/*.coffee"
+ },
+ "author": {
+ "name": "Alex Gorbatchev",
+ "url": "https://github.com/alexgorbatchev"
+ },
+ "devDependencies": {
+ "beautify-benchmark": "^0.2.4",
+ "benchmark": "^1.0.0",
+ "buffer-crc32": "^0.2.3",
+ "chai": "~1.9.1",
+ "coffee-errors": "~0.8.6",
+ "coffee-script": "~1.7.1",
+ "mocha": "*",
+ "seedrandom": "^2.3.6"
+ },
+ "homepage": "https://github.com/alexgorbatchev/node-crc",
+ "bugs": {
+ "url": "https://github.com/alexgorbatchev/node-crc/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/alexgorbatchev/node-crc.git"
+ },
+ "license": "MIT",
+ "gitHead": "71caf362b061992bfe4ca8706ee264e764d2e88e",
+ "_id": "crc@3.2.1",
+ "_shasum": "5d9c8fb77a245cd5eca291e5d2d005334bab0082",
+ "_from": "crc@3.2.1",
+ "_npmVersion": "1.4.13",
+ "_npmUser": {
+ "name": "alexgorbatchev",
+ "email": "alex.gorbatchev@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "alexgorbatchev",
+ "email": "alex.gorbatchev@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "5d9c8fb77a245cd5eca291e5d2d005334bab0082",
+ "tarball": "http://registry.npmjs.org/crc/-/crc-3.2.1.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/crc/-/crc-3.2.1.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/package.json b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/package.json
new file mode 100644
index 0000000..57e6f57
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/etag/package.json
@@ -0,0 +1,75 @@
+{
+ "name": "etag",
+ "description": "Create simple ETags",
+ "version": "1.5.1",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "David Björklund",
+ "email": "david.bjorklund@gmail.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "etag",
+ "http",
+ "res"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/etag"
+ },
+ "dependencies": {
+ "crc": "3.2.1"
+ },
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4",
+ "seedrandom": "~2.3.6"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "27335e2265388109e50a9f037452081dc8a8260f",
+ "bugs": {
+ "url": "https://github.com/jshttp/etag/issues"
+ },
+ "homepage": "https://github.com/jshttp/etag",
+ "_id": "etag@1.5.1",
+ "_shasum": "54c50de04ee42695562925ac566588291be7e9ea",
+ "_from": "etag@~1.5.1",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "54c50de04ee42695562925ac566588291be7e9ea",
+ "tarball": "http://registry.npmjs.org/etag/-/etag-1.5.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/etag/-/etag-1.5.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/HISTORY.md
new file mode 100644
index 0000000..56361df
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/HISTORY.md
@@ -0,0 +1,24 @@
+0.2.4 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+
+0.2.3 / 2014-09-07
+==================
+
+ * Move repository to jshttp
+
+0.2.2 / 2014-02-19
+==================
+
+ * Revert "Fix for blank page on Safari reload"
+
+0.2.1 / 2014-01-29
+==================
+
+ * fix: support max-age=0 for end-to-end revalidation
+
+0.2.0 / 2013-08-11
+==================
+
+ * fix: return false for no-cache
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/LICENSE b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/LICENSE
new file mode 100644
index 0000000..f527394
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/README.md b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/README.md
new file mode 100644
index 0000000..54a885f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/README.md
@@ -0,0 +1,58 @@
+# fresh
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+HTTP response freshness testing
+
+## Installation
+
+```
+$ npm install fresh
+```
+
+## API
+
+```js
+var fresh = require('fresh')
+```
+
+### fresh(req, res)
+
+ Check freshness of `req` and `res` headers.
+
+ When the cache is "fresh" __true__ is returned,
+ otherwise __false__ is returned to indicate that
+ the cache is now stale.
+
+## Example
+
+```js
+var req = { 'if-none-match': 'tobi' };
+var res = { 'etag': 'luna' };
+fresh(req, res);
+// => false
+
+var req = { 'if-none-match': 'tobi' };
+var res = { 'etag': 'tobi' };
+fresh(req, res);
+// => true
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/fresh.svg?style=flat
+[npm-url]: https://npmjs.org/package/fresh
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/fresh.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/fresh
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/fresh.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/fresh?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/fresh.svg?style=flat
+[downloads-url]: https://npmjs.org/package/fresh
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/index.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/index.js
new file mode 100644
index 0000000..9c3f47d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/index.js
@@ -0,0 +1,53 @@
+
+/**
+ * Expose `fresh()`.
+ */
+
+module.exports = fresh;
+
+/**
+ * Check freshness of `req` and `res` headers.
+ *
+ * When the cache is "fresh" __true__ is returned,
+ * otherwise __false__ is returned to indicate that
+ * the cache is now stale.
+ *
+ * @param {Object} req
+ * @param {Object} res
+ * @return {Boolean}
+ * @api public
+ */
+
+function fresh(req, res) {
+ // defaults
+ var etagMatches = true;
+ var notModified = true;
+
+ // fields
+ var modifiedSince = req['if-modified-since'];
+ var noneMatch = req['if-none-match'];
+ var lastModified = res['last-modified'];
+ var etag = res['etag'];
+ var cc = req['cache-control'];
+
+ // unconditional request
+ if (!modifiedSince && !noneMatch) return false;
+
+ // check for no-cache cache request directive
+ if (cc && cc.indexOf('no-cache') !== -1) return false;
+
+ // parse if-none-match
+ if (noneMatch) noneMatch = noneMatch.split(/ *, */);
+
+ // if-none-match
+ if (noneMatch) etagMatches = ~noneMatch.indexOf(etag) || '*' == noneMatch[0];
+
+ // if-modified-since
+ if (modifiedSince) {
+ modifiedSince = new Date(modifiedSince);
+ lastModified = new Date(lastModified);
+ notModified = lastModified <= modifiedSince;
+ }
+
+ return !! (etagMatches && notModified);
+}
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/package.json b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/package.json
new file mode 100644
index 0000000..e25b3a7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/fresh/package.json
@@ -0,0 +1,76 @@
+{
+ "name": "fresh",
+ "description": "HTTP response freshness testing",
+ "version": "0.2.4",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "fresh",
+ "http",
+ "conditional",
+ "cache"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/fresh"
+ },
+ "devDependencies": {
+ "istanbul": "0",
+ "mocha": "1",
+ "should": "3"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --require should",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --require should"
+ },
+ "gitHead": "8440a4ca75fb091dec06e88654b3b1c31d7e7164",
+ "bugs": {
+ "url": "https://github.com/jshttp/fresh/issues"
+ },
+ "homepage": "https://github.com/jshttp/fresh",
+ "_id": "fresh@0.2.4",
+ "_shasum": "3582499206c9723714190edd74b4604feb4a614c",
+ "_from": "fresh@0.2.4",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "3582499206c9723714190edd74b4604feb4a614c",
+ "tarball": "http://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/.npmignore b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/.npmignore
new file mode 100644
index 0000000..d1aa0ce
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/.npmignore
@@ -0,0 +1,5 @@
+node_modules
+test
+History.md
+Makefile
+component.json
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/LICENSE b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/LICENSE
new file mode 100644
index 0000000..6c07561
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014 Guillermo Rauch <rauchg@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/README.md b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/README.md
new file mode 100644
index 0000000..0fd54fd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/README.md
@@ -0,0 +1,35 @@
+# ms.js: miliseconds conversion utility
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('100') // 100
+```
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](nodejs.org/download).
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as
+a number (e.g: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of
+equivalent ms is returned.
+
+## License
+
+MIT
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/index.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/index.js
new file mode 100644
index 0000000..e79bfa1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/index.js
@@ -0,0 +1,123 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} options
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options){
+ options = options || {};
+ if ('string' == typeof val) return parse(val);
+ return options.long
+ ? long(val)
+ : short(val);
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
+ if (!match) return;
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function short(ms) {
+ if (ms >= d) return Math.round(ms / d) + 'd';
+ if (ms >= h) return Math.round(ms / h) + 'h';
+ if (ms >= m) return Math.round(ms / m) + 'm';
+ if (ms >= s) return Math.round(ms / s) + 's';
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function long(ms) {
+ return plural(ms, d, 'day')
+ || plural(ms, h, 'hour')
+ || plural(ms, m, 'minute')
+ || plural(ms, s, 'second')
+ || ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) return;
+ if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/package.json b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/package.json
new file mode 100644
index 0000000..ec3ea9b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/ms/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "ms",
+ "version": "0.7.0",
+ "description": "Tiny ms conversion utility",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/guille/ms.js.git"
+ },
+ "main": "./index",
+ "devDependencies": {
+ "mocha": "*",
+ "expect.js": "*",
+ "serve": "*"
+ },
+ "component": {
+ "scripts": {
+ "ms/index.js": "index.js"
+ }
+ },
+ "gitHead": "1e9cd9b05ef0dc26f765434d2bfee42394376e52",
+ "bugs": {
+ "url": "https://github.com/guille/ms.js/issues"
+ },
+ "homepage": "https://github.com/guille/ms.js",
+ "_id": "ms@0.7.0",
+ "scripts": {},
+ "_shasum": "865be94c2e7397ad8a57da6a633a6e2f30798b83",
+ "_from": "ms@0.7.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "865be94c2e7397ad8a57da6a633a6e2f30798b83",
+ "tarball": "http://registry.npmjs.org/ms/-/ms-0.7.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/.npmignore b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/.npmignore
new file mode 100644
index 0000000..85c82a5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/.npmignore
@@ -0,0 +1,4 @@
+benchmark/
+coverage/
+test/
+.travis.yml
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/HISTORY.md
new file mode 100644
index 0000000..65a0860
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/HISTORY.md
@@ -0,0 +1,42 @@
+1.3.0 / 2014-08-09
+==================
+
+ * Add `parseurl.original` for parsing `req.originalUrl` with fallback
+ * Return `undefined` if `req.url` is `undefined`
+
+1.2.0 / 2014-07-21
+==================
+
+ * Cache URLs based on original value
+ * Remove no-longer-needed URL mis-parse work-around
+ * Simplify the "fast-path" `RegExp`
+
+1.1.3 / 2014-07-08
+==================
+
+ * Fix typo
+
+1.1.2 / 2014-07-08
+==================
+
+ * Seriously fix Node.js 0.8 compatibility
+
+1.1.1 / 2014-07-08
+==================
+
+ * Fix Node.js 0.8 compatibility
+
+1.1.0 / 2014-07-08
+==================
+
+ * Incorporate URL href-only parse fast-path
+
+1.0.1 / 2014-03-08
+==================
+
+ * Add missing `require`
+
+1.0.0 / 2014-03-08
+==================
+
+ * Genesis from `connect`
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/LICENSE b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/LICENSE
new file mode 100644
index 0000000..ec7dfe7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/LICENSE
@@ -0,0 +1,24 @@
+
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/README.md b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/README.md
new file mode 100644
index 0000000..0db1d02
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/README.md
@@ -0,0 +1,107 @@
+# parseurl
+
+[![NPM version](https://badge.fury.io/js/parseurl.svg)](http://badge.fury.io/js/parseurl)
+[![Build Status](https://travis-ci.org/expressjs/parseurl.svg?branch=master)](https://travis-ci.org/expressjs/parseurl)
+[![Coverage Status](https://img.shields.io/coveralls/expressjs/parseurl.svg?branch=master)](https://coveralls.io/r/expressjs/parseurl)
+
+Parse a URL with memoization.
+
+## Install
+
+```bash
+$ npm install parseurl
+```
+
+## API
+
+```js
+var parseurl = require('parseurl')
+```
+
+### parseurl(req)
+
+Parse the URL of the given request object (looks at the `req.url` property)
+and return the result. The result is the same as `url.parse` in Node.js core.
+Calling this function multiple times on the same `req` where `req.url` does
+not change will return a cached parsed object, rather than parsing again.
+
+### parseurl.original(req)
+
+Parse the original URL of the given request object and return the result.
+This works by trying to parse `req.originalUrl` if it is a string, otherwise
+parses `req.url`. The result is the same as `url.parse` in Node.js core.
+Calling this function multiple times on the same `req` where `req.originalUrl`
+does not change will return a cached parsed object, rather than parsing again.
+
+## Benchmark
+
+```bash
+$ npm run-script bench
+
+> parseurl@1.3.0 bench nodejs-parseurl
+> node benchmark/index.js
+
+> node benchmark/fullurl.js
+
+ Parsing URL "http://localhost:8888/foo/bar?user=tj&pet=fluffy"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 1,290,780 ops/sec ±0.46% (195 runs sampled)
+ nativeurl x 56,401 ops/sec ±0.22% (196 runs sampled)
+ parseurl x 55,231 ops/sec ±0.22% (194 runs sampled)
+
+> node benchmark/pathquery.js
+
+ Parsing URL "/foo/bar?user=tj&pet=fluffy"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 1,986,668 ops/sec ±0.27% (190 runs sampled)
+ nativeurl x 98,740 ops/sec ±0.21% (195 runs sampled)
+ parseurl x 2,628,171 ops/sec ±0.36% (195 runs sampled)
+
+> node benchmark/samerequest.js
+
+ Parsing URL "/foo/bar?user=tj&pet=fluffy" on same request object
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 2,184,468 ops/sec ±0.40% (194 runs sampled)
+ nativeurl x 99,437 ops/sec ±0.71% (194 runs sampled)
+ parseurl x 10,498,005 ops/sec ±0.61% (186 runs sampled)
+
+> node benchmark/simplepath.js
+
+ Parsing URL "/foo/bar"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 4,535,825 ops/sec ±0.27% (191 runs sampled)
+ nativeurl x 98,769 ops/sec ±0.54% (191 runs sampled)
+ parseurl x 4,164,865 ops/sec ±0.34% (192 runs sampled)
+
+> node benchmark/slash.js
+
+ Parsing URL "/"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 4,908,405 ops/sec ±0.42% (191 runs sampled)
+ nativeurl x 100,945 ops/sec ±0.59% (188 runs sampled)
+ parseurl x 4,333,208 ops/sec ±0.27% (194 runs sampled)
+```
+
+## License
+
+ [MIT](LICENSE)
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/index.js b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/index.js
new file mode 100644
index 0000000..8632347
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/index.js
@@ -0,0 +1,136 @@
+/*!
+ * parseurl
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var url = require('url')
+var parse = url.parse
+var Url = url.Url
+
+/**
+ * Pattern for a simple path case.
+ * See: https://github.com/joyent/node/pull/7878
+ */
+
+var simplePathRegExp = /^(\/\/?(?!\/)[^\?#\s]*)(\?[^#\s]*)?$/
+
+/**
+ * Exports.
+ */
+
+module.exports = parseurl
+module.exports.original = originalurl
+
+/**
+ * Parse the `req` url with memoization.
+ *
+ * @param {ServerRequest} req
+ * @return {Object}
+ * @api public
+ */
+
+function parseurl(req) {
+ var url = req.url
+
+ if (url === undefined) {
+ // URL is undefined
+ return undefined
+ }
+
+ var parsed = req._parsedUrl
+
+ if (fresh(url, parsed)) {
+ // Return cached URL parse
+ return parsed
+ }
+
+ // Parse the URL
+ parsed = fastparse(url)
+ parsed._raw = url
+
+ return req._parsedUrl = parsed
+};
+
+/**
+ * Parse the `req` original url with fallback and memoization.
+ *
+ * @param {ServerRequest} req
+ * @return {Object}
+ * @api public
+ */
+
+function originalurl(req) {
+ var url = req.originalUrl
+
+ if (typeof url !== 'string') {
+ // Fallback
+ return parseurl(req)
+ }
+
+ var parsed = req._parsedOriginalUrl
+
+ if (fresh(url, parsed)) {
+ // Return cached URL parse
+ return parsed
+ }
+
+ // Parse the URL
+ parsed = fastparse(url)
+ parsed._raw = url
+
+ return req._parsedOriginalUrl = parsed
+};
+
+/**
+ * Parse the `str` url with fast-path short-cut.
+ *
+ * @param {string} str
+ * @return {Object}
+ * @api private
+ */
+
+function fastparse(str) {
+ // Try fast path regexp
+ // See: https://github.com/joyent/node/pull/7878
+ var simplePath = typeof str === 'string' && simplePathRegExp.exec(str)
+
+ // Construct simple URL
+ if (simplePath) {
+ var pathname = simplePath[1]
+ var search = simplePath[2] || null
+ var url = Url !== undefined
+ ? new Url()
+ : {}
+ url.path = str
+ url.href = str
+ url.pathname = pathname
+ url.search = search
+ url.query = search && search.substr(1)
+
+ return url
+ }
+
+ return parse(str)
+}
+
+/**
+ * Determine if parsed is still fresh for url.
+ *
+ * @param {string} url
+ * @param {object} parsedUrl
+ * @return {boolean}
+ * @api private
+ */
+
+function fresh(url, parsedUrl) {
+ return typeof parsedUrl === 'object'
+ && parsedUrl !== null
+ && (Url === undefined || parsedUrl instanceof Url)
+ && parsedUrl._raw === url
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/package.json b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/package.json
new file mode 100644
index 0000000..6fbd23e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/node_modules/parseurl/package.json
@@ -0,0 +1,80 @@
+{
+ "name": "parseurl",
+ "description": "parse a url with memoization",
+ "version": "1.3.0",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/expressjs/parseurl"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "fast-url-parser": "~1.0.0",
+ "istanbul": "0.3.0",
+ "mocha": "~1.21.4"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --check-leaks --bail --reporter spec test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/"
+ },
+ "gitHead": "03b7ccca240e2bef5df6c25797e99175d28fb2cb",
+ "bugs": {
+ "url": "https://github.com/expressjs/parseurl/issues"
+ },
+ "homepage": "https://github.com/expressjs/parseurl",
+ "_id": "parseurl@1.3.0",
+ "_shasum": "b58046db4223e145afa76009e61bac87cc2281b3",
+ "_from": "parseurl@~1.3.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b58046db4223e145afa76009e61bac87cc2281b3",
+ "tarball": "http://registry.npmjs.org/parseurl/-/parseurl-1.3.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-favicon/package.json b/dgbuilder/dgeflows/node_modules/serve-favicon/package.json
new file mode 100644
index 0000000..32a01cd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-favicon/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "serve-favicon",
+ "description": "favicon serving middleware with caching",
+ "version": "2.2.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "express",
+ "favicon",
+ "middleware"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/expressjs/serve-favicon"
+ },
+ "dependencies": {
+ "etag": "~1.5.1",
+ "fresh": "0.2.4",
+ "ms": "0.7.0",
+ "parseurl": "~1.3.0"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~2.0.1",
+ "proxyquire": "~1.2.0",
+ "supertest": "~0.15.0"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "f34bf3992fb999894ce0c16353250e9eaafa7b56",
+ "bugs": {
+ "url": "https://github.com/expressjs/serve-favicon/issues"
+ },
+ "homepage": "https://github.com/expressjs/serve-favicon",
+ "_id": "serve-favicon@2.2.0",
+ "_shasum": "a0c25ee8a652e1a638a67db46269cd52a8705858",
+ "_from": "serve-favicon@~2.2.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "a0c25ee8a652e1a638a67db46269cd52a8705858",
+ "tarball": "http://registry.npmjs.org/serve-favicon/-/serve-favicon-2.2.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.2.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-index/HISTORY.md
new file mode 100644
index 0000000..76d5978
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/HISTORY.md
@@ -0,0 +1,175 @@
+1.6.2 / 2015-02-16
+==================
+
+ * deps: accepts@~1.2.4
+ - deps: mime-types@~2.0.9
+ - deps: negotiator@0.5.1
+ * deps: http-errors@~1.3.1
+ - Construct errors using defined constructors from `createError`
+ - Fix error names that are not identifiers
+ - Set a meaningful `name` property on constructed errors
+ * deps: mime-types@~2.0.9
+ - Add new mime types
+ - deps: mime-db@~1.7.0
+
+1.6.1 / 2015-01-31
+==================
+
+ * deps: accepts@~1.2.3
+ - deps: mime-types@~2.0.8
+ * deps: mime-types@~2.0.8
+ - Add new mime types
+ - deps: mime-db@~1.6.0
+
+1.6.0 / 2015-01-01
+==================
+
+ * Add link to root directory
+ * deps: accepts@~1.2.2
+ - deps: mime-types@~2.0.7
+ - deps: negotiator@0.5.0
+ * deps: batch@0.5.2
+ * deps: debug@~2.1.1
+ * deps: mime-types@~2.0.7
+ - Add new mime types
+ - Fix missing extensions
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+ - deps: mime-db@~1.5.0
+
+1.5.3 / 2014-12-10
+==================
+
+ * deps: accepts@~1.1.4
+ - deps: mime-types@~2.0.4
+ * deps: http-errors@~1.2.8
+ - Fix stack trace from exported function
+ * deps: mime-types@~2.0.4
+ - Add new mime types
+ - deps: mime-db@~1.3.0
+
+1.5.2 / 2014-12-03
+==================
+
+ * Fix icon name background alignment on mobile view
+
+1.5.1 / 2014-11-22
+==================
+
+ * deps: accepts@~1.1.3
+ - deps: mime-types@~2.0.3
+ * deps: mime-types@~2.0.3
+ - Add new mime types
+ - deps: mime-db@~1.2.0
+
+1.5.0 / 2014-10-16
+==================
+
+ * Create errors with `http-errors`
+ * deps: debug@~2.1.0
+ - Implement `DEBUG_FD` env variable support
+ * deps: mime-types@~2.0.2
+ - deps: mime-db@~1.1.0
+
+1.4.1 / 2014-10-15
+==================
+
+ * deps: accepts@~1.1.2
+ - Fix error when media type has invalid parameter
+ - deps: negotiator@0.4.9
+
+1.4.0 / 2014-10-03
+==================
+
+ * Add `dir` argument to `filter` function
+ * Support using tokens multiple times
+
+1.3.1 / 2014-10-01
+==================
+
+ * Fix incorrect 403 on Windows and Node.js 0.11
+ * deps: accepts@~1.1.1
+ - deps: mime-types@~2.0.2
+ - deps: negotiator@0.4.8
+
+1.3.0 / 2014-09-20
+==================
+
+ * Add icon for mkv files
+ * Lookup icon by mime type for greater icon support
+
+1.2.1 / 2014-09-05
+==================
+
+ * deps: accepts@~1.1.0
+ * deps: debug@~2.0.0
+
+1.2.0 / 2014-08-25
+==================
+
+ * Add `debug` messages
+ * Resolve relative paths at middleware setup
+
+1.1.6 / 2014-08-10
+==================
+
+ * Fix URL parsing
+ * deps: parseurl@~1.3.0
+
+1.1.5 / 2014-07-27
+==================
+
+ * Fix Content-Length calculation for multi-byte file names
+ * deps: accepts@~1.0.7
+ - deps: negotiator@0.4.7
+
+1.1.4 / 2014-06-20
+==================
+
+ * deps: accepts@~1.0.5
+
+1.1.3 / 2014-06-20
+==================
+
+ * deps: accepts@~1.0.4
+ - use `mime-types`
+
+1.1.2 / 2014-06-19
+==================
+
+ * deps: batch@0.5.1
+
+1.1.1 / 2014-06-11
+==================
+
+ * deps: accepts@1.0.3
+
+1.1.0 / 2014-05-29
+==================
+
+ * Fix content negotiation when no `Accept` header
+ * Properly support all HTTP methods
+ * Support vanilla node.js http servers
+ * Treat `ENAMETOOLONG` as code 414
+ * Use accepts for negotiation
+
+1.0.3 / 2014-05-20
+==================
+
+ * Fix error from non-statable files in HTML view
+
+1.0.2 / 2014-04-28
+==================
+
+ * Add `stylesheet` option
+ * deps: negotiator@0.4.3
+
+1.0.1 / 2014-03-05
+==================
+
+ * deps: negotiator@0.4.2
+
+1.0.0 / 2014-03-05
+==================
+
+ * Genesis from connect
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/LICENSE b/dgbuilder/dgeflows/node_modules/serve-index/LICENSE
new file mode 100644
index 0000000..b7bc085
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/LICENSE
@@ -0,0 +1,25 @@
+(The MIT License)
+
+Copyright (c) 2010 Sencha Inc.
+Copyright (c) 2011 LearnBoost
+Copyright (c) 2011 TJ Holowaychuk
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/README.md b/dgbuilder/dgeflows/node_modules/serve-index/README.md
new file mode 100644
index 0000000..80dfb0d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/README.md
@@ -0,0 +1,130 @@
+# serve-index
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Linux Build][travis-image]][travis-url]
+[![Windows Build][appveyor-image]][appveyor-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+ Serves pages that contain directory listings for a given path.
+
+## Install
+
+```sh
+$ npm install serve-index
+```
+
+## API
+
+```js
+var serveIndex = require('serve-index')
+```
+
+### serveIndex(path, options)
+
+Returns middlware that serves an index of the directory in the given `path`.
+
+The `path` is based off the `req.url` value, so a `req.url` of `'/some/dir`
+with a `path` of `'public'` will look at `'public/some/dir'`. If you are using
+something like `express`, you can change the URL "base" with `app.use` (see
+the express example).
+
+#### Options
+
+Serve index accepts these properties in the options object.
+
+##### filter
+
+Apply this filter function to files. Defaults to `false`. The `filter` function
+is called for each file, with the signature `filter(filename, index, files, dir)`
+where `filename` is the name of the file, `index` is the array index, `files` is
+the array of files and `dir` is the absolute path the file is located (and thus,
+the directory the listing is for).
+
+##### hidden
+
+Display hidden (dot) files. Defaults to `false`.
+
+##### icons
+
+Display icons. Defaults to `false`.
+
+##### stylesheet
+
+Optional path to a CSS stylesheet. Defaults to a built-in stylesheet.
+
+##### template
+
+Optional path to an HTML template. Defaults to a built-in template.
+
+The following tokens are replaced in templates:
+
+ * `{directory}` with the name of the directory.
+ * `{files}` with the HTML of an unordered list of file links.
+ * `{linked-path}` with the HTML of a link to the directory.
+ * `{style}` with the specified stylesheet and embedded images.
+
+##### view
+
+Display mode. `tiles` and `details` are available. Defaults to `tiles`.
+
+## Examples
+
+### Serve directory indexes with vanilla node.js http server
+
+```js
+var finalhandler = require('finalhandler')
+var http = require('http')
+var serveIndex = require('serve-index')
+var serveStatic = require('serve-static')
+
+// Serve directory indexes for public/ftp folder (with icons)
+var index = serveIndex('public/ftp', {'icons': true})
+
+// Serve up public/ftp folder files
+var serve = serveStatic('public/ftp')
+
+// Create server
+var server = http.createServer(function onRequest(req, res){
+ var done = finalhandler(req, res)
+ serve(req, res, function onNext(err) {
+ if (err) return done(err)
+ index(req, res, done)
+ })
+})
+
+// Listen
+server.listen(3000)
+```
+
+### Serve directory indexes with express
+
+```js
+var express = require('express')
+var serveIndex = require('serve-index')
+
+var app = express()
+
+// Serve URLs like /ftp/thing as public/ftp/thing
+app.use('/ftp', serveIndex('public/ftp', {'icons': true}))
+app.listen()
+```
+
+## License
+
+[MIT](LICENSE). The [Silk](http://www.famfamfam.com/lab/icons/silk/) icons
+are created by/copyright of [FAMFAMFAM](http://www.famfamfam.com/).
+
+[npm-image]: https://img.shields.io/npm/v/serve-index.svg
+[npm-url]: https://npmjs.org/package/serve-index
+[travis-image]: https://img.shields.io/travis/expressjs/serve-index/master.svg?label=linux
+[travis-url]: https://travis-ci.org/expressjs/serve-index
+[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/serve-index/master.svg?label=windows
+[appveyor-url]: https://ci.appveyor.com/project/dougwilson/serve-index
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/serve-index/master.svg
+[coveralls-url]: https://coveralls.io/r/expressjs/serve-index?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/serve-index.svg
+[downloads-url]: https://npmjs.org/package/serve-index
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
+[gratipay-url]: https://www.gratipay.com/dougwilson/
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/index.js b/dgbuilder/dgeflows/node_modules/serve-index/index.js
new file mode 100644
index 0000000..1fec6fd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/index.js
@@ -0,0 +1,575 @@
+/*!
+ * serve-index
+ * Copyright(c) 2011 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+// TODO: arrow key navigation
+// TODO: make icons extensible
+
+/**
+ * Module dependencies.
+ */
+
+var accepts = require('accepts');
+var createError = require('http-errors');
+var debug = require('debug')('serve-index');
+var fs = require('fs')
+ , path = require('path')
+ , normalize = path.normalize
+ , sep = path.sep
+ , extname = path.extname
+ , join = path.join;
+var Batch = require('batch');
+var mime = require('mime-types');
+var parseUrl = require('parseurl');
+var resolve = require('path').resolve;
+
+/*!
+ * Icon cache.
+ */
+
+var cache = {};
+
+/*!
+ * Default template.
+ */
+
+var defaultTemplate = join(__dirname, 'public', 'directory.html');
+
+/*!
+ * Stylesheet.
+ */
+
+var defaultStylesheet = join(__dirname, 'public', 'style.css');
+
+/**
+ * Media types and the map for content negotiation.
+ */
+
+var mediaTypes = [
+ 'text/html',
+ 'text/plain',
+ 'application/json'
+];
+
+var mediaType = {
+ 'text/html': 'html',
+ 'text/plain': 'plain',
+ 'application/json': 'json'
+};
+
+/**
+ * Serve directory listings with the given `root` path.
+ *
+ * See Readme.md for documentation of options.
+ *
+ * @param {String} path
+ * @param {Object} options
+ * @return {Function} middleware
+ * @api public
+ */
+
+exports = module.exports = function serveIndex(root, options){
+ options = options || {};
+
+ // root required
+ if (!root) throw new TypeError('serveIndex() root path required');
+
+ // resolve root to absolute and normalize
+ root = resolve(root);
+ root = normalize(root + sep);
+
+ var hidden = options.hidden
+ , icons = options.icons
+ , view = options.view || 'tiles'
+ , filter = options.filter
+ , template = options.template || defaultTemplate
+ , stylesheet = options.stylesheet || defaultStylesheet;
+
+ return function serveIndex(req, res, next) {
+ if (req.method !== 'GET' && req.method !== 'HEAD') {
+ res.statusCode = 'OPTIONS' === req.method
+ ? 200
+ : 405;
+ res.setHeader('Allow', 'GET, HEAD, OPTIONS');
+ res.end();
+ return;
+ }
+
+ // parse URLs
+ var url = parseUrl(req);
+ var originalUrl = parseUrl.original(req);
+ var dir = decodeURIComponent(url.pathname);
+ var originalDir = decodeURIComponent(originalUrl.pathname);
+
+ // join / normalize from root dir
+ var path = normalize(join(root, dir));
+
+ // null byte(s), bad request
+ if (~path.indexOf('\0')) return next(createError(400));
+
+ // malicious path
+ if ((path + sep).substr(0, root.length) !== root) {
+ debug('malicious path "%s"', path);
+ return next(createError(403));
+ }
+
+ // determine ".." display
+ var showUp = normalize(resolve(path) + sep) !== root;
+
+ // check if we have a directory
+ debug('stat "%s"', path);
+ fs.stat(path, function(err, stat){
+ if (err && err.code === 'ENOENT') {
+ return next();
+ }
+
+ if (err) {
+ err.status = err.code === 'ENAMETOOLONG'
+ ? 414
+ : 500;
+ return next(err);
+ }
+
+ if (!stat.isDirectory()) return next();
+
+ // fetch files
+ debug('readdir "%s"', path);
+ fs.readdir(path, function(err, files){
+ if (err) return next(err);
+ if (!hidden) files = removeHidden(files);
+ if (filter) files = files.filter(function(filename, index, list) {
+ return filter(filename, index, list, path);
+ });
+ files.sort();
+
+ // content-negotiation
+ var accept = accepts(req);
+ var type = accept.type(mediaTypes);
+
+ // not acceptable
+ if (!type) return next(createError(406));
+ exports[mediaType[type]](req, res, files, next, originalDir, showUp, icons, path, view, template, stylesheet);
+ });
+ });
+ };
+};
+
+/**
+ * Respond with text/html.
+ */
+
+exports.html = function(req, res, files, next, dir, showUp, icons, path, view, template, stylesheet){
+ fs.readFile(template, 'utf8', function(err, str){
+ if (err) return next(err);
+ fs.readFile(stylesheet, 'utf8', function(err, style){
+ if (err) return next(err);
+ stat(path, files, function(err, stats){
+ if (err) return next(err);
+ files = files.map(function(file, i){ return { name: file, stat: stats[i] }; });
+ files.sort(fileSort);
+ if (showUp) files.unshift({ name: '..' });
+ str = str
+ .replace(/\{style\}/g, style.concat(iconStyle(files, icons)))
+ .replace(/\{files\}/g, html(files, dir, icons, view))
+ .replace(/\{directory\}/g, dir)
+ .replace(/\{linked-path\}/g, htmlPath(dir));
+
+ var buf = new Buffer(str, 'utf8');
+ res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ res.setHeader('Content-Length', buf.length);
+ res.end(buf);
+ });
+ });
+ });
+};
+
+/**
+ * Respond with application/json.
+ */
+
+exports.json = function(req, res, files){
+ var body = JSON.stringify(files);
+ var buf = new Buffer(body, 'utf8');
+
+ res.setHeader('Content-Type', 'application/json; charset=utf-8');
+ res.setHeader('Content-Length', buf.length);
+ res.end(buf);
+};
+
+/**
+ * Respond with text/plain.
+ */
+
+exports.plain = function(req, res, files){
+ var body = files.join('\n') + '\n';
+ var buf = new Buffer(body, 'utf8');
+
+ res.setHeader('Content-Type', 'text/plain; charset=utf-8');
+ res.setHeader('Content-Length', buf.length);
+ res.end(buf);
+};
+
+/**
+ * Sort function for with directories first.
+ */
+
+function fileSort(a, b) {
+ return Number(b.stat && b.stat.isDirectory()) - Number(a.stat && a.stat.isDirectory()) ||
+ String(a.name).toLocaleLowerCase().localeCompare(String(b.name).toLocaleLowerCase());
+}
+
+/**
+ * Map html `dir`, returning a linked path.
+ */
+
+function htmlPath(dir) {
+ var curr = [];
+ return dir.split('/').map(function(part){
+ curr.push(encodeURIComponent(part));
+ return part ? '<a href="' + curr.join('/') + '">' + part + '</a>' : '';
+ }).join(' / ');
+}
+
+/**
+ * Get the icon data for the file name.
+ */
+
+function iconLookup(filename) {
+ var ext = extname(filename);
+
+ // try by extension
+ if (icons[ext]) {
+ return {
+ className: 'icon-' + ext.substring(1),
+ fileName: icons[ext]
+ };
+ }
+
+ var mimetype = mime.lookup(ext);
+
+ // default if no mime type
+ if (mimetype === false) {
+ return {
+ className: 'icon-default',
+ fileName: icons.default
+ };
+ }
+
+ // try by mime type
+ if (icons[mimetype]) {
+ return {
+ className: 'icon-' + mimetype.replace('/', '-'),
+ fileName: icons[mimetype]
+ };
+ }
+
+ var suffix = mimetype.split('+')[1];
+
+ if (suffix && icons['+' + suffix]) {
+ return {
+ className: 'icon-' + suffix,
+ fileName: icons['+' + suffix]
+ };
+ }
+
+ var type = mimetype.split('/')[0];
+
+ // try by type only
+ if (icons[type]) {
+ return {
+ className: 'icon-' + type,
+ fileName: icons[type]
+ };
+ }
+
+ return {
+ className: 'icon-default',
+ fileName: icons.default
+ };
+}
+
+/**
+ * Load icon images, return css string.
+ */
+
+function iconStyle (files, useIcons) {
+ if (!useIcons) return '';
+ var className;
+ var i;
+ var iconName;
+ var list = [];
+ var rules = {};
+ var selector;
+ var selectors = {};
+ var style = '';
+
+ for (i = 0; i < files.length; i++) {
+ var file = files[i];
+
+ var isDir = '..' == file.name || (file.stat && file.stat.isDirectory());
+ var icon = isDir
+ ? { className: 'icon-directory', fileName: icons.folder }
+ : iconLookup(file.name);
+ var iconName = icon.fileName;
+
+ selector = '#files .' + icon.className + ' .name';
+
+ if (!rules[iconName]) {
+ rules[iconName] = 'background-image: url(data:image/png;base64,' + load(iconName) + ');'
+ selectors[iconName] = [];
+ list.push(iconName);
+ }
+
+ if (selectors[iconName].indexOf(selector) === -1) {
+ selectors[iconName].push(selector);
+ }
+ }
+
+ for (i = 0; i < list.length; i++) {
+ iconName = list[i];
+ style += selectors[iconName].join(',\n') + ' {\n ' + rules[iconName] + '\n}\n';
+ }
+
+ return style;
+}
+
+/**
+ * Map html `files`, returning an html unordered list.
+ */
+
+function html(files, dir, useIcons, view) {
+ return '<ul id="files" class="view-' + view + '">'
+ + (view == 'details' ? (
+ '<li class="header">'
+ + '<span class="name">Name</span>'
+ + '<span class="size">Size</span>'
+ + '<span class="date">Modified</span>'
+ + '</li>') : '')
+ + files.map(function(file){
+ var isDir = '..' == file.name || (file.stat && file.stat.isDirectory())
+ , classes = []
+ , path = dir.split('/').map(function (c) { return encodeURIComponent(c); });
+
+ if (useIcons) {
+ classes.push('icon');
+
+ if (isDir) {
+ classes.push('icon-directory');
+ } else {
+ var ext = extname(file.name);
+ var icon = iconLookup(file.name);
+
+ classes.push('icon');
+ classes.push('icon-' + ext.substring(1));
+
+ if (classes.indexOf(icon.className) === -1) {
+ classes.push(icon.className);
+ }
+ }
+ }
+
+ path.push(encodeURIComponent(file.name));
+
+ var date = file.stat && file.name !== '..'
+ ? file.stat.mtime.toDateString() + ' ' + file.stat.mtime.toLocaleTimeString()
+ : '';
+ var size = file.stat && !isDir
+ ? file.stat.size
+ : '';
+
+ return '<li><a href="'
+ + normalizeSlashes(normalize(path.join('/')))
+ + '" class="'
+ + classes.join(' ') + '"'
+ + ' title="' + file.name + '">'
+ + '<span class="name">'+file.name+'</span>'
+ + '<span class="size">'+size+'</span>'
+ + '<span class="date">'+date+'</span>'
+ + '</a></li>';
+
+ }).join('\n') + '</ul>';
+}
+
+/**
+ * Load and cache the given `icon`.
+ *
+ * @param {String} icon
+ * @return {String}
+ * @api private
+ */
+
+function load(icon) {
+ if (cache[icon]) return cache[icon];
+ return cache[icon] = fs.readFileSync(__dirname + '/public/icons/' + icon, 'base64');
+}
+
+/**
+ * Normalizes the path separator from system separator
+ * to URL separator, aka `/`.
+ *
+ * @param {String} path
+ * @return {String}
+ * @api private
+ */
+
+function normalizeSlashes(path) {
+ return path.split(sep).join('/');
+};
+
+/**
+ * Filter "hidden" `files`, aka files
+ * beginning with a `.`.
+ *
+ * @param {Array} files
+ * @return {Array}
+ * @api private
+ */
+
+function removeHidden(files) {
+ return files.filter(function(file){
+ return '.' != file[0];
+ });
+}
+
+/**
+ * Stat all files and return array of stat
+ * in same order.
+ */
+
+function stat(dir, files, cb) {
+ var batch = new Batch();
+
+ batch.concurrency(10);
+
+ files.forEach(function(file){
+ batch.push(function(done){
+ fs.stat(join(dir, file), function(err, stat){
+ if (err && err.code !== 'ENOENT') return done(err);
+
+ // pass ENOENT as null stat, not error
+ done(null, stat || null);
+ });
+ });
+ });
+
+ batch.end(cb);
+}
+
+/**
+ * Icon map.
+ */
+
+var icons = {
+ // base icons
+ 'default': 'page_white.png',
+ 'folder': 'folder.png',
+
+ // generic mime type icons
+ 'image': 'image.png',
+ 'text': 'page_white_text.png',
+ 'video': 'film.png',
+
+ // generic mime suffix icons
+ '+json': 'page_white_code.png',
+ '+xml': 'page_white_code.png',
+ '+zip': 'box.png',
+
+ // specific mime type icons
+ 'application/font-woff': 'font.png',
+ 'application/javascript': 'page_white_code_red.png',
+ 'application/json': 'page_white_code.png',
+ 'application/msword': 'page_white_word.png',
+ 'application/pdf': 'page_white_acrobat.png',
+ 'application/postscript': 'page_white_vector.png',
+ 'application/rtf': 'page_white_word.png',
+ 'application/vnd.ms-excel': 'page_white_excel.png',
+ 'application/vnd.ms-powerpoint': 'page_white_powerpoint.png',
+ 'application/vnd.oasis.opendocument.presentation': 'page_white_powerpoint.png',
+ 'application/vnd.oasis.opendocument.spreadsheet': 'page_white_excel.png',
+ 'application/vnd.oasis.opendocument.text': 'page_white_word.png',
+ 'application/x-7z-compressed': 'box.png',
+ 'application/x-sh': 'application_xp_terminal.png',
+ 'application/x-font-ttf': 'font.png',
+ 'application/x-msaccess': 'page_white_database.png',
+ 'application/x-shockwave-flash': 'page_white_flash.png',
+ 'application/x-sql': 'page_white_database.png',
+ 'application/x-tar': 'box.png',
+ 'application/x-xz': 'box.png',
+ 'application/xml': 'page_white_code.png',
+ 'application/zip': 'box.png',
+ 'image/svg+xml': 'page_white_vector.png',
+ 'text/css': 'page_white_code.png',
+ 'text/html': 'page_white_code.png',
+ 'text/less': 'page_white_code.png',
+
+ // other, extension-specific icons
+ '.accdb': 'page_white_database.png',
+ '.apk': 'box.png',
+ '.app': 'application_xp.png',
+ '.as': 'page_white_actionscript.png',
+ '.asp': 'page_white_code.png',
+ '.aspx': 'page_white_code.png',
+ '.bat': 'application_xp_terminal.png',
+ '.bz2': 'box.png',
+ '.c': 'page_white_c.png',
+ '.cab': 'box.png',
+ '.cfm': 'page_white_coldfusion.png',
+ '.clj': 'page_white_code.png',
+ '.cc': 'page_white_cplusplus.png',
+ '.cgi': 'application_xp_terminal.png',
+ '.cpp': 'page_white_cplusplus.png',
+ '.cs': 'page_white_csharp.png',
+ '.db': 'page_white_database.png',
+ '.dbf': 'page_white_database.png',
+ '.deb': 'box.png',
+ '.dll': 'page_white_gear.png',
+ '.dmg': 'drive.png',
+ '.docx': 'page_white_word.png',
+ '.erb': 'page_white_ruby.png',
+ '.exe': 'application_xp.png',
+ '.fnt': 'font.png',
+ '.gam': 'controller.png',
+ '.gz': 'box.png',
+ '.h': 'page_white_h.png',
+ '.ini': 'page_white_gear.png',
+ '.iso': 'cd.png',
+ '.jar': 'box.png',
+ '.java': 'page_white_cup.png',
+ '.jsp': 'page_white_cup.png',
+ '.lua': 'page_white_code.png',
+ '.lz': 'box.png',
+ '.lzma': 'box.png',
+ '.m': 'page_white_code.png',
+ '.map': 'map.png',
+ '.msi': 'box.png',
+ '.mv4': 'film.png',
+ '.otf': 'font.png',
+ '.pdb': 'page_white_database.png',
+ '.php': 'page_white_php.png',
+ '.pl': 'page_white_code.png',
+ '.pkg': 'box.png',
+ '.pptx': 'page_white_powerpoint.png',
+ '.psd': 'page_white_picture.png',
+ '.py': 'page_white_code.png',
+ '.rar': 'box.png',
+ '.rb': 'page_white_ruby.png',
+ '.rm': 'film.png',
+ '.rom': 'controller.png',
+ '.rpm': 'box.png',
+ '.sass': 'page_white_code.png',
+ '.sav': 'controller.png',
+ '.scss': 'page_white_code.png',
+ '.srt': 'page_white_text.png',
+ '.tbz2': 'box.png',
+ '.tgz': 'box.png',
+ '.tlz': 'box.png',
+ '.vb': 'page_white_code.png',
+ '.vbs': 'page_white_code.png',
+ '.xcf': 'page_white_picture.png',
+ '.xlsx': 'page_white_excel.png',
+ '.yaws': 'page_white_code.png'
+};
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/HISTORY.md
new file mode 100644
index 0000000..cf7ff1b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/HISTORY.md
@@ -0,0 +1,109 @@
+1.2.4 / 2015-02-14
+==================
+
+ * Support Node.js 0.6
+ * deps: mime-types@~2.0.9
+ - deps: mime-db@~1.7.0
+ * deps: negotiator@0.5.1
+ - Fix preference sorting to be stable for long acceptable lists
+
+1.2.3 / 2015-01-31
+==================
+
+ * deps: mime-types@~2.0.8
+ - deps: mime-db@~1.6.0
+
+1.2.2 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.7
+ - deps: mime-db@~1.5.0
+
+1.2.1 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.5
+ - deps: mime-db@~1.3.1
+
+1.2.0 / 2014-12-19
+==================
+
+ * deps: negotiator@0.5.0
+ - Fix list return order when large accepted list
+ - Fix missing identity encoding when q=0 exists
+ - Remove dynamic building of Negotiator class
+
+1.1.4 / 2014-12-10
+==================
+
+ * deps: mime-types@~2.0.4
+ - deps: mime-db@~1.3.0
+
+1.1.3 / 2014-11-09
+==================
+
+ * deps: mime-types@~2.0.3
+ - deps: mime-db@~1.2.0
+
+1.1.2 / 2014-10-14
+==================
+
+ * deps: negotiator@0.4.9
+ - Fix error when media type has invalid parameter
+
+1.1.1 / 2014-09-28
+==================
+
+ * deps: mime-types@~2.0.2
+ - deps: mime-db@~1.1.0
+ * deps: negotiator@0.4.8
+ - Fix all negotiations to be case-insensitive
+ - Stable sort preferences of same quality according to client order
+
+1.1.0 / 2014-09-02
+==================
+
+ * update `mime-types`
+
+1.0.7 / 2014-07-04
+==================
+
+ * Fix wrong type returned from `type` when match after unknown extension
+
+1.0.6 / 2014-06-24
+==================
+
+ * deps: negotiator@0.4.7
+
+1.0.5 / 2014-06-20
+==================
+
+ * fix crash when unknown extension given
+
+1.0.4 / 2014-06-19
+==================
+
+ * use `mime-types`
+
+1.0.3 / 2014-06-11
+==================
+
+ * deps: negotiator@0.4.6
+ - Order by specificity when quality is the same
+
+1.0.2 / 2014-05-29
+==================
+
+ * Fix interpretation when header not in request
+ * deps: pin negotiator@0.4.5
+
+1.0.1 / 2014-01-18
+==================
+
+ * Identity encoding isn't always acceptable
+ * deps: negotiator@~0.4.0
+
+1.0.0 / 2013-12-27
+==================
+
+ * Genesis
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/LICENSE b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/LICENSE
new file mode 100644
index 0000000..f23dca8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/README.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/README.md
new file mode 100644
index 0000000..e8361db
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/README.md
@@ -0,0 +1,135 @@
+# accepts
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
+
+In addition to negotiator, it allows:
+
+- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` as well as `('text/html', 'application/json')`.
+- Allows type shorthands such as `json`.
+- Returns `false` when no types match
+- Treats non-existent headers as `*`
+
+## Installation
+
+```sh
+npm install accepts
+```
+
+## API
+
+```js
+var accepts = require('accepts')
+```
+
+### accepts(req)
+
+Create a new `Accepts` object for the given `req`.
+
+#### .charset(charsets)
+
+Return the first accepted charset. If nothing in `charsets` is accepted,
+then `false` is returned.
+
+#### .charsets()
+
+Return the charsets that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .encoding(encodings)
+
+Return the first accepted encoding. If nothing in `encodings` is accepted,
+then `false` is returned.
+
+#### .encodings()
+
+Return the encodings that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .language(languages)
+
+Return the first accepted language. If nothing in `languages` is accepted,
+then `false` is returned.
+
+#### .languages()
+
+Return the languages that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .type(types)
+
+Return the first accepted type (and it is returned as the same text as what
+appears in the `types` array). If nothing in `types` is accepted, then `false`
+is returned.
+
+The `types` array can contain full MIME types or file extensions. Any value
+that is not a full MIME types is passed to `require('mime-types').lookup`.
+
+#### .types()
+
+Return the types that the request accepts, in the order of the client's
+preference (most preferred first).
+
+## Examples
+
+### Simple type negotiation
+
+This simple example shows how to use `accepts` to return a different typed
+respond body based on what the client wants to accept. The server lists it's
+preferences in order and will get back the best match between the client and
+server.
+
+```js
+var accepts = require('accepts')
+var http = require('http')
+
+function app(req, res) {
+ var accept = accepts(req)
+
+ // the order of this list is significant; should be server preferred order
+ switch(accept.type(['json', 'html'])) {
+ case 'json':
+ res.setHeader('Content-Type', 'application/json')
+ res.write('{"hello":"world!"}')
+ break
+ case 'html':
+ res.setHeader('Content-Type', 'text/html')
+ res.write('<b>hello, world!</b>')
+ break
+ default:
+ // the fallback is text/plain, so no need to specify it above
+ res.setHeader('Content-Type', 'text/plain')
+ res.write('hello, world!')
+ break
+ }
+
+ res.end()
+}
+
+http.createServer(app).listen(3000)
+```
+
+You can test this out with the cURL program:
+```sh
+curl -I -H'Accept: text/html' http://localhost:3000/
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/accepts.svg?style=flat
+[npm-url]: https://npmjs.org/package/accepts
+[node-version-image]: https://img.shields.io/node/v/accepts.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/accepts.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/accepts
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/accepts
+[downloads-image]: https://img.shields.io/npm/dm/accepts.svg?style=flat
+[downloads-url]: https://npmjs.org/package/accepts
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/index.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/index.js
new file mode 100644
index 0000000..805e33a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/index.js
@@ -0,0 +1,160 @@
+var Negotiator = require('negotiator')
+var mime = require('mime-types')
+
+var slice = [].slice
+
+module.exports = Accepts
+
+function Accepts(req) {
+ if (!(this instanceof Accepts))
+ return new Accepts(req)
+
+ this.headers = req.headers
+ this.negotiator = Negotiator(req)
+}
+
+/**
+ * Check if the given `type(s)` is acceptable, returning
+ * the best match when true, otherwise `undefined`, in which
+ * case you should respond with 406 "Not Acceptable".
+ *
+ * The `type` value may be a single mime type string
+ * such as "application/json", the extension name
+ * such as "json" or an array `["json", "html", "text/plain"]`. When a list
+ * or array is given the _best_ match, if any is returned.
+ *
+ * Examples:
+ *
+ * // Accept: text/html
+ * this.types('html');
+ * // => "html"
+ *
+ * // Accept: text/*, application/json
+ * this.types('html');
+ * // => "html"
+ * this.types('text/html');
+ * // => "text/html"
+ * this.types('json', 'text');
+ * // => "json"
+ * this.types('application/json');
+ * // => "application/json"
+ *
+ * // Accept: text/*, application/json
+ * this.types('image/png');
+ * this.types('png');
+ * // => undefined
+ *
+ * // Accept: text/*;q=.5, application/json
+ * this.types(['html', 'json']);
+ * this.types('html', 'json');
+ * // => "json"
+ *
+ * @param {String|Array} type(s)...
+ * @return {String|Array|Boolean}
+ * @api public
+ */
+
+Accepts.prototype.type =
+Accepts.prototype.types = function (types) {
+ if (!Array.isArray(types)) types = slice.call(arguments);
+ var n = this.negotiator;
+ if (!types.length) return n.mediaTypes();
+ if (!this.headers.accept) return types[0];
+ var mimes = types.map(extToMime);
+ var accepts = n.mediaTypes(mimes.filter(validMime));
+ var first = accepts[0];
+ if (!first) return false;
+ return types[mimes.indexOf(first)];
+}
+
+/**
+ * Return accepted encodings or best fit based on `encodings`.
+ *
+ * Given `Accept-Encoding: gzip, deflate`
+ * an array sorted by quality is returned:
+ *
+ * ['gzip', 'deflate']
+ *
+ * @param {String|Array} encoding(s)...
+ * @return {String|Array}
+ * @api public
+ */
+
+Accepts.prototype.encoding =
+Accepts.prototype.encodings = function (encodings) {
+ if (!Array.isArray(encodings)) encodings = slice.call(arguments);
+ var n = this.negotiator;
+ if (!encodings.length) return n.encodings();
+ return n.encodings(encodings)[0] || false;
+}
+
+/**
+ * Return accepted charsets or best fit based on `charsets`.
+ *
+ * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
+ * an array sorted by quality is returned:
+ *
+ * ['utf-8', 'utf-7', 'iso-8859-1']
+ *
+ * @param {String|Array} charset(s)...
+ * @return {String|Array}
+ * @api public
+ */
+
+Accepts.prototype.charset =
+Accepts.prototype.charsets = function (charsets) {
+ if (!Array.isArray(charsets)) charsets = [].slice.call(arguments);
+ var n = this.negotiator;
+ if (!charsets.length) return n.charsets();
+ if (!this.headers['accept-charset']) return charsets[0];
+ return n.charsets(charsets)[0] || false;
+}
+
+/**
+ * Return accepted languages or best fit based on `langs`.
+ *
+ * Given `Accept-Language: en;q=0.8, es, pt`
+ * an array sorted by quality is returned:
+ *
+ * ['es', 'pt', 'en']
+ *
+ * @param {String|Array} lang(s)...
+ * @return {Array|String}
+ * @api public
+ */
+
+Accepts.prototype.lang =
+Accepts.prototype.langs =
+Accepts.prototype.language =
+Accepts.prototype.languages = function (langs) {
+ if (!Array.isArray(langs)) langs = slice.call(arguments);
+ var n = this.negotiator;
+ if (!langs.length) return n.languages();
+ if (!this.headers['accept-language']) return langs[0];
+ return n.languages(langs)[0] || false;
+}
+
+/**
+ * Convert extnames to mime.
+ *
+ * @param {String} type
+ * @return {String}
+ * @api private
+ */
+
+function extToMime(type) {
+ if (~type.indexOf('/')) return type;
+ return mime.lookup(type);
+}
+
+/**
+ * Check if mime is valid.
+ *
+ * @param {String} type
+ * @return {String}
+ * @api private
+ */
+
+function validMime(type) {
+ return typeof type === 'string';
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/HISTORY.md
new file mode 100644
index 0000000..8a03025
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/HISTORY.md
@@ -0,0 +1,65 @@
+0.5.1 / 2015-02-14
+==================
+
+ * Fix preference sorting to be stable for long acceptable lists
+
+0.5.0 / 2014-12-18
+==================
+
+ * Fix list return order when large accepted list
+ * Fix missing identity encoding when q=0 exists
+ * Remove dynamic building of Negotiator class
+
+0.4.9 / 2014-10-14
+==================
+
+ * Fix error when media type has invalid parameter
+
+0.4.8 / 2014-09-28
+==================
+
+ * Fix all negotiations to be case-insensitive
+ * Stable sort preferences of same quality according to client order
+ * Support Node.js 0.6
+
+0.4.7 / 2014-06-24
+==================
+
+ * Handle invalid provided languages
+ * Handle invalid provided media types
+
+0.4.6 / 2014-06-11
+==================
+
+ * Order by specificity when quality is the same
+
+0.4.5 / 2014-05-29
+==================
+
+ * Fix regression in empty header handling
+
+0.4.4 / 2014-05-29
+==================
+
+ * Fix behaviors when headers are not present
+
+0.4.3 / 2014-04-16
+==================
+
+ * Handle slashes on media params correctly
+
+0.4.2 / 2014-02-28
+==================
+
+ * Fix media type sorting
+ * Handle media types params strictly
+
+0.4.1 / 2014-01-16
+==================
+
+ * Use most specific matches
+
+0.4.0 / 2014-01-09
+==================
+
+ * Remove preferred prefix from methods
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/LICENSE b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/LICENSE
new file mode 100644
index 0000000..692b534
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2012 Federico Romero
+Copyright (c) 2012-2014 Isaac Z. Schlueter
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/README.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/README.md
new file mode 100644
index 0000000..ef507fa
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/README.md
@@ -0,0 +1,203 @@
+# negotiator
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+An HTTP content negotiator for Node.js
+
+## Installation
+
+```sh
+$ npm install negotiator
+```
+
+## API
+
+```js
+var Negotiator = require('negotiator')
+```
+
+### Accept Negotiation
+
+```js
+availableMediaTypes = ['text/html', 'text/plain', 'application/json']
+
+// The negotiator constructor receives a request object
+negotiator = new Negotiator(request)
+
+// Let's say Accept header is 'text/html, application/*;q=0.2, image/jpeg;q=0.8'
+
+negotiator.mediaTypes()
+// -> ['text/html', 'image/jpeg', 'application/*']
+
+negotiator.mediaTypes(availableMediaTypes)
+// -> ['text/html', 'application/json']
+
+negotiator.mediaType(availableMediaTypes)
+// -> 'text/html'
+```
+
+You can check a working example at `examples/accept.js`.
+
+#### Methods
+
+##### mediaType()
+
+Returns the most preferred media type from the client.
+
+##### mediaType(availableMediaType)
+
+Returns the most preferred media type from a list of available media types.
+
+##### mediaTypes()
+
+Returns an array of preferred media types ordered by the client preference.
+
+##### mediaTypes(availableMediaTypes)
+
+Returns an array of preferred media types ordered by priority from a list of
+available media types.
+
+### Accept-Language Negotiation
+
+```js
+negotiator = new Negotiator(request)
+
+availableLanguages = 'en', 'es', 'fr'
+
+// Let's say Accept-Language header is 'en;q=0.8, es, pt'
+
+negotiator.languages()
+// -> ['es', 'pt', 'en']
+
+negotiator.languages(availableLanguages)
+// -> ['es', 'en']
+
+language = negotiator.language(availableLanguages)
+// -> 'es'
+```
+
+You can check a working example at `examples/language.js`.
+
+#### Methods
+
+##### language()
+
+Returns the most preferred language from the client.
+
+##### language(availableLanguages)
+
+Returns the most preferred language from a list of available languages.
+
+##### languages()
+
+Returns an array of preferred languages ordered by the client preference.
+
+##### languages(availableLanguages)
+
+Returns an array of preferred languages ordered by priority from a list of
+available languages.
+
+### Accept-Charset Negotiation
+
+```js
+availableCharsets = ['utf-8', 'iso-8859-1', 'iso-8859-5']
+
+negotiator = new Negotiator(request)
+
+// Let's say Accept-Charset header is 'utf-8, iso-8859-1;q=0.8, utf-7;q=0.2'
+
+negotiator.charsets()
+// -> ['utf-8', 'iso-8859-1', 'utf-7']
+
+negotiator.charsets(availableCharsets)
+// -> ['utf-8', 'iso-8859-1']
+
+negotiator.charset(availableCharsets)
+// -> 'utf-8'
+```
+
+You can check a working example at `examples/charset.js`.
+
+#### Methods
+
+##### charset()
+
+Returns the most preferred charset from the client.
+
+##### charset(availableCharsets)
+
+Returns the most preferred charset from a list of available charsets.
+
+##### charsets()
+
+Returns an array of preferred charsets ordered by the client preference.
+
+##### charsets(availableCharsets)
+
+Returns an array of preferred charsets ordered by priority from a list of
+available charsets.
+
+### Accept-Encoding Negotiation
+
+```js
+availableEncodings = ['identity', 'gzip']
+
+negotiator = new Negotiator(request)
+
+// Let's say Accept-Encoding header is 'gzip, compress;q=0.2, identity;q=0.5'
+
+negotiator.encodings()
+// -> ['gzip', 'identity', 'compress']
+
+negotiator.encodings(availableEncodings)
+// -> ['gzip', 'identity']
+
+negotiator.encoding(availableEncodings)
+// -> 'gzip'
+```
+
+You can check a working example at `examples/encoding.js`.
+
+#### Methods
+
+##### encoding()
+
+Returns the most preferred encoding from the client.
+
+##### encoding(availableEncodings)
+
+Returns the most preferred encoding from a list of available encodings.
+
+##### encodings()
+
+Returns an array of preferred encodings ordered by the client preference.
+
+##### encodings(availableEncodings)
+
+Returns an array of preferred encodings ordered by priority from a list of
+available encodings.
+
+## See Also
+
+The [accepts](https://npmjs.org/package/accepts#readme) module builds on
+this module and provides an alternative interface, mime type validation,
+and more.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/negotiator.svg
+[npm-url]: https://npmjs.org/package/negotiator
+[node-version-image]: https://img.shields.io/node/v/negotiator.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/negotiator/master.svg
+[travis-url]: https://travis-ci.org/jshttp/negotiator
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/negotiator/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/negotiator?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/negotiator.svg
+[downloads-url]: https://npmjs.org/package/negotiator
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/index.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/index.js
new file mode 100644
index 0000000..edae9cf
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/index.js
@@ -0,0 +1,62 @@
+
+var preferredCharsets = require('./lib/charset');
+var preferredEncodings = require('./lib/encoding');
+var preferredLanguages = require('./lib/language');
+var preferredMediaTypes = require('./lib/mediaType');
+
+module.exports = Negotiator;
+Negotiator.Negotiator = Negotiator;
+
+function Negotiator(request) {
+ if (!(this instanceof Negotiator)) {
+ return new Negotiator(request);
+ }
+
+ this.request = request;
+}
+
+Negotiator.prototype.charset = function charset(available) {
+ var set = this.charsets(available);
+ return set && set[0];
+};
+
+Negotiator.prototype.charsets = function charsets(available) {
+ return preferredCharsets(this.request.headers['accept-charset'], available);
+};
+
+Negotiator.prototype.encoding = function encoding(available) {
+ var set = this.encodings(available);
+ return set && set[0];
+};
+
+Negotiator.prototype.encodings = function encodings(available) {
+ return preferredEncodings(this.request.headers['accept-encoding'], available);
+};
+
+Negotiator.prototype.language = function language(available) {
+ var set = this.languages(available);
+ return set && set[0];
+};
+
+Negotiator.prototype.languages = function languages(available) {
+ return preferredLanguages(this.request.headers['accept-language'], available);
+};
+
+Negotiator.prototype.mediaType = function mediaType(available) {
+ var set = this.mediaTypes(available);
+ return set && set[0];
+};
+
+Negotiator.prototype.mediaTypes = function mediaTypes(available) {
+ return preferredMediaTypes(this.request.headers.accept, available);
+};
+
+// Backwards compatibility
+Negotiator.prototype.preferredCharset = Negotiator.prototype.charset;
+Negotiator.prototype.preferredCharsets = Negotiator.prototype.charsets;
+Negotiator.prototype.preferredEncoding = Negotiator.prototype.encoding;
+Negotiator.prototype.preferredEncodings = Negotiator.prototype.encodings;
+Negotiator.prototype.preferredLanguage = Negotiator.prototype.language;
+Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages;
+Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType;
+Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes;
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/lib/charset.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/lib/charset.js
new file mode 100644
index 0000000..7abd17c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/lib/charset.js
@@ -0,0 +1,102 @@
+module.exports = preferredCharsets;
+preferredCharsets.preferredCharsets = preferredCharsets;
+
+function parseAcceptCharset(accept) {
+ var accepts = accept.split(',');
+
+ for (var i = 0, j = 0; i < accepts.length; i++) {
+ var charset = parseCharset(accepts[i].trim(), i);
+
+ if (charset) {
+ accepts[j++] = charset;
+ }
+ }
+
+ // trim accepts
+ accepts.length = j;
+
+ return accepts;
+}
+
+function parseCharset(s, i) {
+ var match = s.match(/^\s*(\S+?)\s*(?:;(.*))?$/);
+ if (!match) return null;
+
+ var charset = match[1];
+ var q = 1;
+ if (match[2]) {
+ var params = match[2].split(';')
+ for (var i = 0; i < params.length; i ++) {
+ var p = params[i].trim().split('=');
+ if (p[0] === 'q') {
+ q = parseFloat(p[1]);
+ break;
+ }
+ }
+ }
+
+ return {
+ charset: charset,
+ q: q,
+ i: i
+ };
+}
+
+function getCharsetPriority(charset, accepted, index) {
+ var priority = {o: -1, q: 0, s: 0};
+
+ for (var i = 0; i < accepted.length; i++) {
+ var spec = specify(charset, accepted[i], index);
+
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
+ priority = spec;
+ }
+ }
+
+ return priority;
+}
+
+function specify(charset, spec, index) {
+ var s = 0;
+ if(spec.charset.toLowerCase() === charset.toLowerCase()){
+ s |= 1;
+ } else if (spec.charset !== '*' ) {
+ return null
+ }
+
+ return {
+ i: index,
+ o: spec.i,
+ q: spec.q,
+ s: s
+ }
+}
+
+function preferredCharsets(accept, provided) {
+ // RFC 2616 sec 14.2: no header = *
+ var accepts = parseAcceptCharset(accept === undefined ? '*' : accept || '');
+
+ if (!provided) {
+ // sorted list of all charsets
+ return accepts.filter(isQuality).sort(compareSpecs).map(function getCharset(spec) {
+ return spec.charset;
+ });
+ }
+
+ var priorities = provided.map(function getPriority(type, index) {
+ return getCharsetPriority(type, accepts, index);
+ });
+
+ // sorted list of accepted charsets
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) {
+ return provided[priorities.indexOf(priority)];
+ });
+}
+
+function compareSpecs(a, b) {
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
+}
+
+function isQuality(spec) {
+ return spec.q > 0;
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/lib/encoding.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/lib/encoding.js
new file mode 100644
index 0000000..7fed673
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/lib/encoding.js
@@ -0,0 +1,118 @@
+module.exports = preferredEncodings;
+preferredEncodings.preferredEncodings = preferredEncodings;
+
+function parseAcceptEncoding(accept) {
+ var accepts = accept.split(',');
+ var hasIdentity = false;
+ var minQuality = 1;
+
+ for (var i = 0, j = 0; i < accepts.length; i++) {
+ var encoding = parseEncoding(accepts[i].trim(), i);
+
+ if (encoding) {
+ accepts[j++] = encoding;
+ hasIdentity = hasIdentity || specify('identity', encoding);
+ minQuality = Math.min(minQuality, encoding.q || 1);
+ }
+ }
+
+ if (!hasIdentity) {
+ /*
+ * If identity doesn't explicitly appear in the accept-encoding header,
+ * it's added to the list of acceptable encoding with the lowest q
+ */
+ accepts[j++] = {
+ encoding: 'identity',
+ q: minQuality,
+ i: i
+ };
+ }
+
+ // trim accepts
+ accepts.length = j;
+
+ return accepts;
+}
+
+function parseEncoding(s, i) {
+ var match = s.match(/^\s*(\S+?)\s*(?:;(.*))?$/);
+
+ if (!match) return null;
+
+ var encoding = match[1];
+ var q = 1;
+ if (match[2]) {
+ var params = match[2].split(';');
+ for (var i = 0; i < params.length; i ++) {
+ var p = params[i].trim().split('=');
+ if (p[0] === 'q') {
+ q = parseFloat(p[1]);
+ break;
+ }
+ }
+ }
+
+ return {
+ encoding: encoding,
+ q: q,
+ i: i
+ };
+}
+
+function getEncodingPriority(encoding, accepted, index) {
+ var priority = {o: -1, q: 0, s: 0};
+
+ for (var i = 0; i < accepted.length; i++) {
+ var spec = specify(encoding, accepted[i], index);
+
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
+ priority = spec;
+ }
+ }
+
+ return priority;
+}
+
+function specify(encoding, spec, index) {
+ var s = 0;
+ if(spec.encoding.toLowerCase() === encoding.toLowerCase()){
+ s |= 1;
+ } else if (spec.encoding !== '*' ) {
+ return null
+ }
+
+ return {
+ i: index,
+ o: spec.i,
+ q: spec.q,
+ s: s
+ }
+};
+
+function preferredEncodings(accept, provided) {
+ var accepts = parseAcceptEncoding(accept || '');
+
+ if (!provided) {
+ // sorted list of all encodings
+ return accepts.filter(isQuality).sort(compareSpecs).map(function getEncoding(spec) {
+ return spec.encoding;
+ });
+ }
+
+ var priorities = provided.map(function getPriority(type, index) {
+ return getEncodingPriority(type, accepts, index);
+ });
+
+ // sorted list of accepted encodings
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getEncoding(priority) {
+ return provided[priorities.indexOf(priority)];
+ });
+}
+
+function compareSpecs(a, b) {
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
+}
+
+function isQuality(spec) {
+ return spec.q > 0;
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/lib/language.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/lib/language.js
new file mode 100644
index 0000000..ed9e1ec
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/lib/language.js
@@ -0,0 +1,112 @@
+module.exports = preferredLanguages;
+preferredLanguages.preferredLanguages = preferredLanguages;
+
+function parseAcceptLanguage(accept) {
+ var accepts = accept.split(',');
+
+ for (var i = 0, j = 0; i < accepts.length; i++) {
+ var langauge = parseLanguage(accepts[i].trim(), i);
+
+ if (langauge) {
+ accepts[j++] = langauge;
+ }
+ }
+
+ // trim accepts
+ accepts.length = j;
+
+ return accepts;
+}
+
+function parseLanguage(s, i) {
+ var match = s.match(/^\s*(\S+?)(?:-(\S+?))?\s*(?:;(.*))?$/);
+ if (!match) return null;
+
+ var prefix = match[1],
+ suffix = match[2],
+ full = prefix;
+
+ if (suffix) full += "-" + suffix;
+
+ var q = 1;
+ if (match[3]) {
+ var params = match[3].split(';')
+ for (var i = 0; i < params.length; i ++) {
+ var p = params[i].split('=');
+ if (p[0] === 'q') q = parseFloat(p[1]);
+ }
+ }
+
+ return {
+ prefix: prefix,
+ suffix: suffix,
+ q: q,
+ i: i,
+ full: full
+ };
+}
+
+function getLanguagePriority(language, accepted, index) {
+ var priority = {o: -1, q: 0, s: 0};
+
+ for (var i = 0; i < accepted.length; i++) {
+ var spec = specify(language, accepted[i], index);
+
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
+ priority = spec;
+ }
+ }
+
+ return priority;
+}
+
+function specify(language, spec, index) {
+ var p = parseLanguage(language)
+ if (!p) return null;
+ var s = 0;
+ if(spec.full.toLowerCase() === p.full.toLowerCase()){
+ s |= 4;
+ } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) {
+ s |= 2;
+ } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) {
+ s |= 1;
+ } else if (spec.full !== '*' ) {
+ return null
+ }
+
+ return {
+ i: index,
+ o: spec.i,
+ q: spec.q,
+ s: s
+ }
+};
+
+function preferredLanguages(accept, provided) {
+ // RFC 2616 sec 14.4: no header = *
+ var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');
+
+ if (!provided) {
+ // sorted list of all languages
+ return accepts.filter(isQuality).sort(compareSpecs).map(function getLanguage(spec) {
+ return spec.full;
+ });
+ }
+
+ var priorities = provided.map(function getPriority(type, index) {
+ return getLanguagePriority(type, accepts, index);
+ });
+
+ // sorted list of accepted languages
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {
+ return provided[priorities.indexOf(priority)];
+ });
+}
+
+function compareSpecs(a, b) {
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
+}
+
+function isQuality(spec) {
+ return spec.q > 0;
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/lib/mediaType.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/lib/mediaType.js
new file mode 100644
index 0000000..167956a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/lib/mediaType.js
@@ -0,0 +1,136 @@
+module.exports = preferredMediaTypes;
+preferredMediaTypes.preferredMediaTypes = preferredMediaTypes;
+
+function parseAccept(accept) {
+ var accepts = accept.split(',');
+
+ for (var i = 0, j = 0; i < accepts.length; i++) {
+ var mediaType = parseMediaType(accepts[i].trim(), i);
+
+ if (mediaType) {
+ accepts[j++] = mediaType;
+ }
+ }
+
+ // trim accepts
+ accepts.length = j;
+
+ return accepts;
+};
+
+function parseMediaType(s, i) {
+ var match = s.match(/\s*(\S+?)\/([^;\s]+)\s*(?:;(.*))?/);
+ if (!match) return null;
+
+ var type = match[1],
+ subtype = match[2],
+ full = "" + type + "/" + subtype,
+ params = {},
+ q = 1;
+
+ if (match[3]) {
+ params = match[3].split(';').map(function(s) {
+ return s.trim().split('=');
+ }).reduce(function (set, p) {
+ set[p[0]] = p[1];
+ return set
+ }, params);
+
+ if (params.q != null) {
+ q = parseFloat(params.q);
+ delete params.q;
+ }
+ }
+
+ return {
+ type: type,
+ subtype: subtype,
+ params: params,
+ q: q,
+ i: i,
+ full: full
+ };
+}
+
+function getMediaTypePriority(type, accepted, index) {
+ var priority = {o: -1, q: 0, s: 0};
+
+ for (var i = 0; i < accepted.length; i++) {
+ var spec = specify(type, accepted[i], index);
+
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
+ priority = spec;
+ }
+ }
+
+ return priority;
+}
+
+function specify(type, spec, index) {
+ var p = parseMediaType(type);
+ var s = 0;
+
+ if (!p) {
+ return null;
+ }
+
+ if(spec.type.toLowerCase() == p.type.toLowerCase()) {
+ s |= 4
+ } else if(spec.type != '*') {
+ return null;
+ }
+
+ if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) {
+ s |= 2
+ } else if(spec.subtype != '*') {
+ return null;
+ }
+
+ var keys = Object.keys(spec.params);
+ if (keys.length > 0) {
+ if (keys.every(function (k) {
+ return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase();
+ })) {
+ s |= 1
+ } else {
+ return null
+ }
+ }
+
+ return {
+ i: index,
+ o: spec.i,
+ q: spec.q,
+ s: s,
+ }
+
+}
+
+function preferredMediaTypes(accept, provided) {
+ // RFC 2616 sec 14.2: no header = */*
+ var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');
+
+ if (!provided) {
+ // sorted list of all types
+ return accepts.filter(isQuality).sort(compareSpecs).map(function getType(spec) {
+ return spec.full;
+ });
+ }
+
+ var priorities = provided.map(function getPriority(type, index) {
+ return getMediaTypePriority(type, accepts, index);
+ });
+
+ // sorted list of accepted types
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {
+ return provided[priorities.indexOf(priority)];
+ });
+}
+
+function compareSpecs(a, b) {
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
+}
+
+function isQuality(spec) {
+ return spec.q > 0;
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/package.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/package.json
new file mode 100644
index 0000000..d49cccf
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/node_modules/negotiator/package.json
@@ -0,0 +1,86 @@
+{
+ "name": "negotiator",
+ "description": "HTTP content negotiation",
+ "version": "0.5.1",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Federico Romero",
+ "email": "federico.romero@outboxlabs.com"
+ },
+ {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "http",
+ "content negotiation",
+ "accept",
+ "accept-language",
+ "accept-encoding",
+ "accept-charset"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/negotiator"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "nodeunit": "0.9.0",
+ "tap": "0.5.0"
+ },
+ "files": [
+ "lib/",
+ "HISTORY.md",
+ "LICENSE",
+ "index.js",
+ "README.md"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "nodeunit test",
+ "test-cov": "istanbul cover ./node_modules/nodeunit/bin/nodeunit test"
+ },
+ "gitHead": "bfee971fe0503518cc93d1956518212203b7e68c",
+ "bugs": {
+ "url": "https://github.com/jshttp/negotiator/issues"
+ },
+ "homepage": "https://github.com/jshttp/negotiator",
+ "_id": "negotiator@0.5.1",
+ "_shasum": "498f661c522470153c6086ac83019cb3eb66f61c",
+ "_from": "negotiator@0.5.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "federomero",
+ "email": "federomero@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "498f661c522470153c6086ac83019cb3eb66f61c",
+ "tarball": "http://registry.npmjs.org/negotiator/-/negotiator-0.5.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.5.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/package.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/package.json
new file mode 100644
index 0000000..48ecffc
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/accepts/package.json
@@ -0,0 +1,92 @@
+{
+ "name": "accepts",
+ "description": "Higher-level content negotiation",
+ "version": "1.2.4",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/accepts"
+ },
+ "dependencies": {
+ "mime-types": "~2.0.9",
+ "negotiator": "0.5.1"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "keywords": [
+ "content",
+ "negotiation",
+ "accept",
+ "accepts"
+ ],
+ "gitHead": "dfa143a31879bf5fb4934bbefc5741504a1cc15f",
+ "bugs": {
+ "url": "https://github.com/jshttp/accepts/issues"
+ },
+ "homepage": "https://github.com/jshttp/accepts",
+ "_id": "accepts@1.2.4",
+ "_shasum": "f4e6c66f4faf69c76bd7a63a1ffc5bd2dacfb2ac",
+ "_from": "accepts@~1.2.4",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "federomero",
+ "email": "federomero@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "f4e6c66f4faf69c76bd7a63a1ffc5bd2dacfb2ac",
+ "tarball": "http://registry.npmjs.org/accepts/-/accepts-1.2.4.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.2.4.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/.npmignore b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/.npmignore
new file mode 100644
index 0000000..f1250e5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/.npmignore
@@ -0,0 +1,4 @@
+support
+test
+examples
+*.sock
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/History.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/History.md
new file mode 100644
index 0000000..424324a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/History.md
@@ -0,0 +1,71 @@
+
+0.5.1 / 2014-06-19
+==================
+
+ * add repository field to readme (exciting)
+
+0.5.0 / 2013-07-29
+==================
+
+ * add `.throws(true)` to opt-in to responding with an array of error objects
+ * make `new` optional
+
+0.4.0 / 2013-06-05
+==================
+
+ * add catching of immediate callback errors
+
+0.3.2 / 2013-03-15
+==================
+
+ * remove Emitter call in constructor
+
+0.3.1 / 2013-03-13
+==================
+
+ * add Emitter() mixin for client. Closes #8
+
+0.3.0 / 2013-03-13
+==================
+
+ * add component.json
+ * add result example
+ * add .concurrency support
+ * add concurrency example
+ * add parallel example
+
+0.2.1 / 2012-11-08
+==================
+
+ * add .start, .end, and .duration properties
+ * change dependencies to devDependencies
+
+0.2.0 / 2012-10-04
+==================
+
+ * add progress events. Closes #5 (__BREAKING CHANGE__)
+
+0.1.1 / 2012-07-03
+==================
+
+ * change "complete" event to "progress"
+
+0.1.0 / 2012-07-03
+==================
+
+ * add Emitter inheritance and emit "complete" [burcu]
+
+0.0.3 / 2012-06-02
+==================
+
+ * Callback results should be in the order of the queued functions.
+
+0.0.2 / 2012-02-12
+==================
+
+ * any node
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/Makefile b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/Makefile
new file mode 100644
index 0000000..634e372
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/Makefile
@@ -0,0 +1,6 @@
+
+test:
+ @./node_modules/.bin/mocha \
+ --require should
+
+.PHONY: test
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/Readme.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/Readme.md
new file mode 100644
index 0000000..f2345c6
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/Readme.md
@@ -0,0 +1,74 @@
+
+# batch
+
+ Simple async batch with concurrency control and progress reporting.
+
+## Installation
+
+```
+$ npm install batch
+```
+
+## API
+
+```js
+var Batch = require('batch')
+ , batch = new Batch;
+
+batch.concurrency(4);
+
+ids.forEach(function(id){
+ batch.push(function(done){
+ User.get(id, done);
+ });
+});
+
+batch.on('progress', function(e){
+
+});
+
+batch.end(function(err, users){
+
+});
+```
+
+### Progress events
+
+ Contain the "job" index, response value, duration information, and completion data.
+
+```js
+{ index: 1,
+ value: 'bar',
+ pending: 2,
+ total: 3,
+ complete: 2,
+ percent: 66,
+ start: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT),
+ end: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT),
+ duration: 0 }
+```
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2013 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/component.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/component.json
new file mode 100644
index 0000000..9bd3e45
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/component.json
@@ -0,0 +1,14 @@
+{
+ "name": "batch",
+ "repo": "visionmedia/batch",
+ "description": "Async task batching",
+ "version": "0.5.2",
+ "keywords": ["batch", "async", "utility", "concurrency", "concurrent"],
+ "dependencies": {
+ "component/emitter": "*"
+ },
+ "development": {},
+ "scripts": [
+ "index.js"
+ ]
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/index.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/index.js
new file mode 100644
index 0000000..c2cbe46
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/index.js
@@ -0,0 +1,158 @@
+/**
+ * Module dependencies.
+ */
+
+try {
+ var EventEmitter = require('events').EventEmitter;
+} catch (err) {
+ var Emitter = require('emitter');
+}
+
+/**
+ * Noop.
+ */
+
+function noop(){}
+
+/**
+ * Expose `Batch`.
+ */
+
+module.exports = Batch;
+
+/**
+ * Create a new Batch.
+ */
+
+function Batch() {
+ if (!(this instanceof Batch)) return new Batch;
+ this.fns = [];
+ this.concurrency(Infinity);
+ this.throws(true);
+ for (var i = 0, len = arguments.length; i < len; ++i) {
+ this.push(arguments[i]);
+ }
+}
+
+/**
+ * Inherit from `EventEmitter.prototype`.
+ */
+
+if (EventEmitter) {
+ Batch.prototype.__proto__ = EventEmitter.prototype;
+} else {
+ Emitter(Batch.prototype);
+}
+
+/**
+ * Set concurrency to `n`.
+ *
+ * @param {Number} n
+ * @return {Batch}
+ * @api public
+ */
+
+Batch.prototype.concurrency = function(n){
+ this.n = n;
+ return this;
+};
+
+/**
+ * Queue a function.
+ *
+ * @param {Function} fn
+ * @return {Batch}
+ * @api public
+ */
+
+Batch.prototype.push = function(fn){
+ this.fns.push(fn);
+ return this;
+};
+
+/**
+ * Set wether Batch will or will not throw up.
+ *
+ * @param {Boolean} throws
+ * @return {Batch}
+ * @api public
+ */
+Batch.prototype.throws = function(throws) {
+ this.e = !!throws;
+ return this;
+};
+
+/**
+ * Execute all queued functions in parallel,
+ * executing `cb(err, results)`.
+ *
+ * @param {Function} cb
+ * @return {Batch}
+ * @api public
+ */
+
+Batch.prototype.end = function(cb){
+ var self = this
+ , total = this.fns.length
+ , pending = total
+ , results = []
+ , errors = []
+ , cb = cb || noop
+ , fns = this.fns
+ , max = this.n
+ , throws = this.e
+ , index = 0
+ , done;
+
+ // empty
+ if (!fns.length) return cb(null, results);
+
+ // process
+ function next() {
+ var i = index++;
+ var fn = fns[i];
+ if (!fn) return;
+ var start = new Date;
+
+ try {
+ fn(callback);
+ } catch (err) {
+ callback(err);
+ }
+
+ function callback(err, res){
+ if (done) return;
+ if (err && throws) return done = true, cb(err);
+ var complete = total - pending + 1;
+ var end = new Date;
+
+ results[i] = res;
+ errors[i] = err;
+
+ self.emit('progress', {
+ index: i,
+ value: res,
+ error: err,
+ pending: pending,
+ total: total,
+ complete: complete,
+ percent: complete / total * 100 | 0,
+ start: start,
+ end: end,
+ duration: end - start
+ });
+
+ if (--pending) next();
+ else if(!throws) cb(errors, results);
+ else cb(null, results);
+ }
+ }
+
+ // concurrency
+ for (var i = 0; i < fns.length; i++) {
+ if (i == max) break;
+ next();
+ }
+
+ return this;
+};
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/package.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/package.json
new file mode 100644
index 0000000..3d58ce4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "batch",
+ "version": "0.5.2",
+ "licenses": [
+ {
+ "type": "MIT"
+ }
+ ],
+ "description": "Simple async batch",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "devDependencies": {
+ "mocha": "*",
+ "should": "*"
+ },
+ "main": "index",
+ "browser": {
+ "emitter": "component-emitter"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/visionmedia/batch.git"
+ },
+ "gitHead": "cd69ea173754c0fbd3a7ab33e0a678e6909f3bf3",
+ "bugs": {
+ "url": "https://github.com/visionmedia/batch/issues"
+ },
+ "homepage": "https://github.com/visionmedia/batch",
+ "_id": "batch@0.5.2",
+ "scripts": {},
+ "_shasum": "546543dbe32118c83c7c7ca33a1f5c5d5ea963e9",
+ "_from": "batch@0.5.2",
+ "_npmVersion": "2.1.14",
+ "_nodeVersion": "0.11.14",
+ "_npmUser": {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ }
+ ],
+ "dist": {
+ "shasum": "546543dbe32118c83c7c7ca33a1f5c5d5ea963e9",
+ "tarball": "http://registry.npmjs.org/batch/-/batch-0.5.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/batch/-/batch-0.5.2.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/HISTORY.md
new file mode 100644
index 0000000..4c7087d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/HISTORY.md
@@ -0,0 +1,76 @@
+2015-02-02 / 1.3.1
+==================
+
+ * Fix regression where status can be overwritten in `createError` `props`
+
+2015-02-01 / 1.3.0
+==================
+
+ * Construct errors using defined constructors from `createError`
+ * Fix error names that are not identifiers
+ - `createError["I'mateapot"]` is now `createError.ImATeapot`
+ * Set a meaningful `name` property on constructed errors
+
+2014-12-09 / 1.2.8
+==================
+
+ * Fix stack trace from exported function
+ * Remove `arguments.callee` usage
+
+2014-10-14 / 1.2.7
+==================
+
+ * Remove duplicate line
+
+2014-10-02 / 1.2.6
+==================
+
+ * Fix `expose` to be `true` for `ClientError` constructor
+
+2014-09-28 / 1.2.5
+==================
+
+ * deps: statuses@1
+
+2014-09-21 / 1.2.4
+==================
+
+ * Fix dependency version to work with old `npm`s
+
+2014-09-21 / 1.2.3
+==================
+
+ * deps: statuses@~1.1.0
+
+2014-09-21 / 1.2.2
+==================
+
+ * Fix publish error
+
+2014-09-21 / 1.2.1
+==================
+
+ * Support Node.js 0.6
+ * Use `inherits` instead of `util`
+
+2014-09-09 / 1.2.0
+==================
+
+ * Fix the way inheriting functions
+ * Support `expose` being provided in properties argument
+
+2014-09-08 / 1.1.0
+==================
+
+ * Default status to 500
+ * Support provided `error` to extend
+
+2014-09-08 / 1.0.1
+==================
+
+ * Fix accepting string message
+
+2014-09-08 / 1.0.0
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/LICENSE b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/README.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/README.md
new file mode 100644
index 0000000..520271e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/README.md
@@ -0,0 +1,63 @@
+# http-errors
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create HTTP errors for Express, Koa, Connect, etc. with ease.
+
+## Example
+
+```js
+var createError = require('http-errors');
+
+app.use(function (req, res, next) {
+ if (!req.user) return next(createError(401, 'Please login to view this page.'));
+ next();
+})
+```
+
+## API
+
+This is the current API, currently extracted from Koa and subject to change.
+
+### Error Properties
+
+- `message`
+- `status` and `statusCode` - the status code of the error, defaulting to `500`
+
+### createError([status], [message], [properties])
+
+```js
+var err = createError(404, 'This video does not exist!');
+```
+
+- `status: 500` - the status code as a number
+- `message` - the message of the error, defaulting to node's text for that status code.
+- `properties` - custom properties to attach to the object
+
+### new createError\[code || name\](\[msg]\))
+
+```js
+var err = new createError.NotFound();
+```
+
+- `code` - the status code as a number
+- `name` - the name of the error as a "bumpy case", i.e. `NotFound` or `InternalServerError`.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/http-errors.svg?style=flat
+[npm-url]: https://npmjs.org/package/http-errors
+[node-version-image]: https://img.shields.io/node/v/http-errors.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/http-errors.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/http-errors
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/http-errors.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/http-errors
+[downloads-image]: https://img.shields.io/npm/dm/http-errors.svg?style=flat
+[downloads-url]: https://npmjs.org/package/http-errors
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/index.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/index.js
new file mode 100644
index 0000000..d84b114
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/index.js
@@ -0,0 +1,120 @@
+
+var statuses = require('statuses');
+var inherits = require('inherits');
+
+function toIdentifier(str) {
+ return str.split(' ').map(function (token) {
+ return token.slice(0, 1).toUpperCase() + token.slice(1)
+ }).join('').replace(/[^ _0-9a-z]/gi, '')
+}
+
+exports = module.exports = function httpError() {
+ // so much arity going on ~_~
+ var err;
+ var msg;
+ var status = 500;
+ var props = {};
+ for (var i = 0; i < arguments.length; i++) {
+ var arg = arguments[i];
+ if (arg instanceof Error) {
+ err = arg;
+ status = err.status || err.statusCode || status;
+ continue;
+ }
+ switch (typeof arg) {
+ case 'string':
+ msg = arg;
+ break;
+ case 'number':
+ status = arg;
+ break;
+ case 'object':
+ props = arg;
+ break;
+ }
+ }
+
+ if (typeof status !== 'number' || !statuses[status]) {
+ status = 500
+ }
+
+ // constructor
+ var HttpError = exports[status]
+
+ if (!err) {
+ // create error
+ err = HttpError
+ ? new HttpError(msg)
+ : new Error(msg || statuses[status])
+ Error.captureStackTrace(err, httpError)
+ }
+
+ if (!HttpError || !(err instanceof HttpError)) {
+ // add properties to generic error
+ err.expose = status < 500
+ err.status = err.statusCode = status
+ }
+
+ for (var key in props) {
+ if (key !== 'status' && key !== 'statusCode') {
+ err[key] = props[key]
+ }
+ }
+
+ return err;
+};
+
+// create generic error objects
+var codes = statuses.codes.filter(function (num) {
+ return num >= 400;
+});
+
+codes.forEach(function (code) {
+ var name = toIdentifier(statuses[code])
+ var className = name.match(/Error$/) ? name : name + 'Error'
+
+ if (code >= 500) {
+ var ServerError = function ServerError(msg) {
+ var self = new Error(msg != null ? msg : statuses[code])
+ Error.captureStackTrace(self, ServerError)
+ self.__proto__ = ServerError.prototype
+ Object.defineProperty(self, 'name', {
+ enumerable: false,
+ configurable: true,
+ value: className,
+ writable: true
+ })
+ return self
+ }
+ inherits(ServerError, Error);
+ ServerError.prototype.status =
+ ServerError.prototype.statusCode = code;
+ ServerError.prototype.expose = false;
+ exports[code] =
+ exports[name] = ServerError
+ return;
+ }
+
+ var ClientError = function ClientError(msg) {
+ var self = new Error(msg != null ? msg : statuses[code])
+ Error.captureStackTrace(self, ClientError)
+ self.__proto__ = ClientError.prototype
+ Object.defineProperty(self, 'name', {
+ enumerable: false,
+ configurable: true,
+ value: className,
+ writable: true
+ })
+ return self
+ }
+ inherits(ClientError, Error);
+ ClientError.prototype.status =
+ ClientError.prototype.statusCode = code;
+ ClientError.prototype.expose = true;
+ exports[code] =
+ exports[name] = ClientError
+ return;
+});
+
+// backwards-compatibility
+exports["I'mateapot"] = exports.ImATeapot
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/LICENSE b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/LICENSE
new file mode 100644
index 0000000..dea3013
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/LICENSE
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/README.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/README.md
new file mode 100644
index 0000000..b1c5665
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/README.md
@@ -0,0 +1,42 @@
+Browser-friendly inheritance fully compatible with standard node.js
+[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
+
+This package exports standard `inherits` from node.js `util` module in
+node environment, but also provides alternative browser-friendly
+implementation through [browser
+field](https://gist.github.com/shtylman/4339901). Alternative
+implementation is a literal copy of standard one located in standalone
+module to avoid requiring of `util`. It also has a shim for old
+browsers with no `Object.create` support.
+
+While keeping you sure you are using standard `inherits`
+implementation in node.js environment, it allows bundlers such as
+[browserify](https://github.com/substack/node-browserify) to not
+include full `util` package to your client code if all you need is
+just `inherits` function. It worth, because browser shim for `util`
+package is large and `inherits` is often the single function you need
+from it.
+
+It's recommended to use this package instead of
+`require('util').inherits` for any code that has chances to be used
+not only in node.js but in browser too.
+
+## usage
+
+```js
+var inherits = require('inherits');
+// then use exactly as the standard one
+```
+
+## note on version ~1.0
+
+Version ~1.0 had completely different motivation and is not compatible
+neither with 2.0 nor with standard node.js `inherits`.
+
+If you are using version ~1.0 and planning to switch to ~2.0, be
+careful:
+
+* new version uses `super_` instead of `super` for referencing
+ superclass
+* new version overwrites current prototype while old one preserves any
+ existing fields on it
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/inherits.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/inherits.js
new file mode 100644
index 0000000..29f5e24
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/inherits.js
@@ -0,0 +1 @@
+module.exports = require('util').inherits
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/inherits_browser.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/inherits_browser.js
new file mode 100644
index 0000000..c1e78a7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/inherits_browser.js
@@ -0,0 +1,23 @@
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/package.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/package.json
new file mode 100644
index 0000000..3d69f4f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "inherits",
+ "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
+ "version": "2.0.1",
+ "keywords": [
+ "inheritance",
+ "class",
+ "klass",
+ "oop",
+ "object-oriented",
+ "inherits",
+ "browser",
+ "browserify"
+ ],
+ "main": "./inherits.js",
+ "browser": "./inherits_browser.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/inherits"
+ },
+ "license": "ISC",
+ "scripts": {
+ "test": "node test"
+ },
+ "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/inherits/issues"
+ },
+ "_id": "inherits@2.0.1",
+ "dist": {
+ "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
+ "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
+ },
+ "_from": "inherits@~2.0.1",
+ "_npmVersion": "1.3.8",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "directories": {},
+ "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
+ "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
+ "homepage": "https://github.com/isaacs/inherits"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/test.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/test.js
new file mode 100644
index 0000000..fc53012
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/inherits/test.js
@@ -0,0 +1,25 @@
+var inherits = require('./inherits.js')
+var assert = require('assert')
+
+function test(c) {
+ assert(c.constructor === Child)
+ assert(c.constructor.super_ === Parent)
+ assert(Object.getPrototypeOf(c) === Child.prototype)
+ assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype)
+ assert(c instanceof Child)
+ assert(c instanceof Parent)
+}
+
+function Child() {
+ Parent.call(this)
+ test(this)
+}
+
+function Parent() {}
+
+inherits(Child, Parent)
+
+var c = new Child
+test(c)
+
+console.log('ok')
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/LICENSE b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/README.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/README.md
new file mode 100644
index 0000000..f6ae24c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/README.md
@@ -0,0 +1,114 @@
+# Statuses
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+HTTP status utility for node.
+
+## API
+
+```js
+var status = require('statuses');
+```
+
+### var code = status(Integer || String)
+
+If `Integer` or `String` is a valid HTTP code or status message, then the appropriate `code` will be returned. Otherwise, an error will be thrown.
+
+```js
+status(403) // => 'Forbidden'
+status('403') // => 'Forbidden'
+status('forbidden') // => 403
+status('Forbidden') // => 403
+status(306) // throws, as it's not supported by node.js
+```
+
+### status.codes
+
+Returns an array of all the status codes as `Integer`s.
+
+### var msg = status[code]
+
+Map of `code` to `status message`. `undefined` for invalid `code`s.
+
+```js
+status[404] // => 'Not Found'
+```
+
+### var code = status[msg]
+
+Map of `status message` to `code`. `msg` can either be title-cased or lower-cased. `undefined` for invalid `status message`s.
+
+```js
+status['not found'] // => 404
+status['Not Found'] // => 404
+```
+
+### status.redirect[code]
+
+Returns `true` if a status code is a valid redirect status.
+
+```js
+status.redirect[200] // => undefined
+status.redirect[301] // => true
+```
+
+### status.empty[code]
+
+Returns `true` if a status code expects an empty body.
+
+```js
+status.empty[200] // => undefined
+status.empty[204] // => true
+status.empty[304] // => true
+```
+
+### status.retry[code]
+
+Returns `true` if you should retry the rest.
+
+```js
+status.retry[501] // => undefined
+status.retry[503] // => true
+```
+
+### statuses/codes.json
+
+```js
+var codes = require('statuses/codes.json');
+```
+
+This is a JSON file of the status codes
+taken from `require('http').STATUS_CODES`.
+This is saved so that codes are consistent even in older node.js versions.
+For example, `308` will be added in v0.12.
+
+## Adding Status Codes
+
+The status codes are primarily sourced from http://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv.
+Additionally, custom codes are added from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes.
+These are added manually in the `lib/*.json` files.
+If you would like to add a status code, add it to the appropriate JSON file.
+
+To rebuild `codes.json`, run the following:
+
+```bash
+# update src/iana.json
+npm run update
+# build codes.json
+npm run build
+```
+
+[npm-image]: https://img.shields.io/npm/v/statuses.svg?style=flat
+[npm-url]: https://npmjs.org/package/statuses
+[node-version-image]: http://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/statuses.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/statuses
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/statuses.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master
+[downloads-image]: http://img.shields.io/npm/dm/statuses.svg?style=flat
+[downloads-url]: https://npmjs.org/package/statuses
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/codes.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/codes.json
new file mode 100644
index 0000000..4c45a88
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/codes.json
@@ -0,0 +1,64 @@
+{
+ "100": "Continue",
+ "101": "Switching Protocols",
+ "102": "Processing",
+ "200": "OK",
+ "201": "Created",
+ "202": "Accepted",
+ "203": "Non-Authoritative Information",
+ "204": "No Content",
+ "205": "Reset Content",
+ "206": "Partial Content",
+ "207": "Multi-Status",
+ "208": "Already Reported",
+ "226": "IM Used",
+ "300": "Multiple Choices",
+ "301": "Moved Permanently",
+ "302": "Found",
+ "303": "See Other",
+ "304": "Not Modified",
+ "305": "Use Proxy",
+ "306": "(Unused)",
+ "307": "Temporary Redirect",
+ "308": "Permanent Redirect",
+ "400": "Bad Request",
+ "401": "Unauthorized",
+ "402": "Payment Required",
+ "403": "Forbidden",
+ "404": "Not Found",
+ "405": "Method Not Allowed",
+ "406": "Not Acceptable",
+ "407": "Proxy Authentication Required",
+ "408": "Request Timeout",
+ "409": "Conflict",
+ "410": "Gone",
+ "411": "Length Required",
+ "412": "Precondition Failed",
+ "413": "Payload Too Large",
+ "414": "URI Too Long",
+ "415": "Unsupported Media Type",
+ "416": "Range Not Satisfiable",
+ "417": "Expectation Failed",
+ "418": "I'm a teapot",
+ "422": "Unprocessable Entity",
+ "423": "Locked",
+ "424": "Failed Dependency",
+ "425": "Unordered Collection",
+ "426": "Upgrade Required",
+ "428": "Precondition Required",
+ "429": "Too Many Requests",
+ "431": "Request Header Fields Too Large",
+ "451": "Unavailable For Legal Reasons",
+ "500": "Internal Server Error",
+ "501": "Not Implemented",
+ "502": "Bad Gateway",
+ "503": "Service Unavailable",
+ "504": "Gateway Timeout",
+ "505": "HTTP Version Not Supported",
+ "506": "Variant Also Negotiates",
+ "507": "Insufficient Storage",
+ "508": "Loop Detected",
+ "509": "Bandwidth Limit Exceeded",
+ "510": "Not Extended",
+ "511": "Network Authentication Required"
+}
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/index.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/index.js
new file mode 100644
index 0000000..b06182d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/index.js
@@ -0,0 +1,60 @@
+
+var codes = require('./codes.json');
+
+module.exports = status;
+
+// [Integer...]
+status.codes = Object.keys(codes).map(function (code) {
+ code = ~~code;
+ var msg = codes[code];
+ status[code] = msg;
+ status[msg] = status[msg.toLowerCase()] = code;
+ return code;
+});
+
+// status codes for redirects
+status.redirect = {
+ 300: true,
+ 301: true,
+ 302: true,
+ 303: true,
+ 305: true,
+ 307: true,
+ 308: true,
+};
+
+// status codes for empty bodies
+status.empty = {
+ 204: true,
+ 205: true,
+ 304: true,
+};
+
+// status codes for when you should retry the request
+status.retry = {
+ 502: true,
+ 503: true,
+ 504: true,
+};
+
+function status(code) {
+ if (typeof code === 'number') {
+ if (!status[code]) throw new Error('invalid status code: ' + code);
+ return code;
+ }
+
+ if (typeof code !== 'string') {
+ throw new TypeError('code must be a number or string');
+ }
+
+ // '403'
+ var n = parseInt(code, 10)
+ if (!isNaN(n)) {
+ if (!status[n]) throw new Error('invalid status code: ' + n);
+ return n;
+ }
+
+ n = status[code.toLowerCase()];
+ if (!n) throw new Error('invalid status message: "' + code + '"');
+ return n;
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/package.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/package.json
new file mode 100644
index 0000000..84b7c7e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/node_modules/statuses/package.json
@@ -0,0 +1,83 @@
+{
+ "name": "statuses",
+ "description": "HTTP status utility",
+ "version": "1.2.1",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/statuses"
+ },
+ "license": "MIT",
+ "keywords": [
+ "http",
+ "status",
+ "code"
+ ],
+ "files": [
+ "index.js",
+ "codes.json",
+ "LICENSE"
+ ],
+ "devDependencies": {
+ "csv-parse": "0.0.6",
+ "istanbul": "0",
+ "mocha": "1",
+ "stream-to-array": "2"
+ },
+ "scripts": {
+ "build": "node scripts/build.js",
+ "update": "node scripts/update.js",
+ "test": "mocha --reporter spec --bail --check-leaks",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks"
+ },
+ "gitHead": "49e6ac7ae4c63ee8186f56cb52112a7eeda28ed7",
+ "bugs": {
+ "url": "https://github.com/jshttp/statuses/issues"
+ },
+ "homepage": "https://github.com/jshttp/statuses",
+ "_id": "statuses@1.2.1",
+ "_shasum": "dded45cc18256d51ed40aec142489d5c61026d28",
+ "_from": "statuses@1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "dded45cc18256d51ed40aec142489d5c61026d28",
+ "tarball": "http://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/package.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/package.json
new file mode 100644
index 0000000..58a40c0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/http-errors/package.json
@@ -0,0 +1,84 @@
+{
+ "name": "http-errors",
+ "description": "Create HTTP error objects",
+ "version": "1.3.1",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Alan Plum",
+ "email": "me@pluma.io"
+ },
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/http-errors"
+ },
+ "dependencies": {
+ "inherits": "~2.0.1",
+ "statuses": "1"
+ },
+ "devDependencies": {
+ "istanbul": "0",
+ "mocha": "1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
+ },
+ "keywords": [
+ "http",
+ "error"
+ ],
+ "files": [
+ "index.js",
+ "HISTORY.md",
+ "LICENSE",
+ "README.md"
+ ],
+ "gitHead": "89a8502b40d5dd42da2908f265275e2eeb8d0699",
+ "bugs": {
+ "url": "https://github.com/jshttp/http-errors/issues"
+ },
+ "homepage": "https://github.com/jshttp/http-errors",
+ "_id": "http-errors@1.3.1",
+ "_shasum": "197e22cdebd4198585e8694ef6786197b91ed942",
+ "_from": "http-errors@~1.3.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "egeste",
+ "email": "npm@egeste.net"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "197e22cdebd4198585e8694ef6786197b91ed942",
+ "tarball": "http://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/HISTORY.md
new file mode 100644
index 0000000..da8b3f8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/HISTORY.md
@@ -0,0 +1,85 @@
+2.0.9 / 2015-02-09
+==================
+
+ * deps: mime-db@~1.7.0
+ - Add new mime types
+ - Community extensions ownership transferred from `node-mime`
+
+2.0.8 / 2015-01-29
+==================
+
+ * deps: mime-db@~1.6.0
+ - Add new mime types
+
+2.0.7 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.5.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+
+2.0.6 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.4.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+
+2.0.5 / 2014-12-29
+==================
+
+ * deps: mime-db@~1.3.1
+ - Fix missing extensions
+
+2.0.4 / 2014-12-10
+==================
+
+ * deps: mime-db@~1.3.0
+ - Add new mime types
+
+2.0.3 / 2014-11-09
+==================
+
+ * deps: mime-db@~1.2.0
+ - Add new mime types
+
+2.0.2 / 2014-09-28
+==================
+
+ * deps: mime-db@~1.1.0
+ - Add new mime types
+ - Add additional compressible
+ - Update charsets
+
+2.0.1 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+
+2.0.0 / 2014-09-02
+==================
+
+ * Use `mime-db`
+ * Remove `.define()`
+
+1.0.2 / 2014-08-04
+==================
+
+ * Set charset=utf-8 for `text/javascript`
+
+1.0.1 / 2014-06-24
+==================
+
+ * Add `text/jsx` type
+
+1.0.0 / 2014-05-12
+==================
+
+ * Return `false` for unknown types
+ * Set charset=utf-8 for `application/json`
+
+0.1.0 / 2014-05-02
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/LICENSE b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/README.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/README.md
new file mode 100644
index 0000000..99d658b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/README.md
@@ -0,0 +1,99 @@
+# mime-types
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+The ultimate javascript content-type utility.
+
+Similar to [node-mime](https://github.com/broofa/node-mime), except:
+
+- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`,
+ so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
+- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
+- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db)
+- No `.define()` functionality
+
+Otherwise, the API is compatible.
+
+## Install
+
+```sh
+$ npm install mime-types
+```
+
+## Adding Types
+
+All mime types are based on [mime-db](https://github.com/jshttp/mime-db),
+so open a PR there if you'd like to add mime types.
+
+## API
+
+```js
+var mime = require('mime-types')
+```
+
+All functions return `false` if input is invalid or not found.
+
+### mime.lookup(path)
+
+Lookup the content-type associated with a file.
+
+```js
+mime.lookup('json') // 'application/json'
+mime.lookup('.md') // 'text/x-markdown'
+mime.lookup('file.html') // 'text/html'
+mime.lookup('folder/file.js') // 'application/javascript'
+
+mime.lookup('cats') // false
+```
+
+### mime.contentType(type)
+
+Create a full content-type header given a content-type or extension.
+
+```js
+mime.contentType('markdown') // 'text/x-markdown; charset=utf-8'
+mime.contentType('file.json') // 'application/json; charset=utf-8'
+```
+
+### mime.extension(type)
+
+Get the default extension for a content-type.
+
+```js
+mime.extension('application/octet-stream') // 'bin'
+```
+
+### mime.charset(type)
+
+Lookup the implied default charset of a content-type.
+
+```js
+mime.charset('text/x-markdown') // 'UTF-8'
+```
+
+### var type = mime.types[extension]
+
+A map of content-types by extension.
+
+### [extensions...] = mime.extensions[type]
+
+A map of extensions by content-type.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/mime-types.svg?style=flat
+[npm-url]: https://npmjs.org/package/mime-types
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/mime-types.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/mime-types
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-types
+[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg?style=flat
+[downloads-url]: https://npmjs.org/package/mime-types
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/index.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/index.js
new file mode 100644
index 0000000..b46a202
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/index.js
@@ -0,0 +1,63 @@
+
+var db = require('mime-db')
+
+// types[extension] = type
+exports.types = Object.create(null)
+// extensions[type] = [extensions]
+exports.extensions = Object.create(null)
+
+Object.keys(db).forEach(function (name) {
+ var mime = db[name]
+ var exts = mime.extensions
+ if (!exts || !exts.length) return
+ exports.extensions[name] = exts
+ exts.forEach(function (ext) {
+ exports.types[ext] = name
+ })
+})
+
+exports.lookup = function (string) {
+ if (!string || typeof string !== "string") return false
+ // remove any leading paths, though we should just use path.basename
+ string = string.replace(/.*[\.\/\\]/, '').toLowerCase()
+ if (!string) return false
+ return exports.types[string] || false
+}
+
+exports.extension = function (type) {
+ if (!type || typeof type !== "string") return false
+ // to do: use media-typer
+ type = type.match(/^\s*([^;\s]*)(?:;|\s|$)/)
+ if (!type) return false
+ var exts = exports.extensions[type[1].toLowerCase()]
+ if (!exts || !exts.length) return false
+ return exts[0]
+}
+
+// type has to be an exact mime type
+exports.charset = function (type) {
+ var mime = db[type]
+ if (mime && mime.charset) return mime.charset
+
+ // default text/* to utf-8
+ if (/^text\//.test(type)) return 'UTF-8'
+
+ return false
+}
+
+// backwards compatibility
+exports.charsets = {
+ lookup: exports.charset
+}
+
+// to do: maybe use set-type module or something
+exports.contentType = function (type) {
+ if (!type || typeof type !== "string") return false
+ if (!~type.indexOf('/')) type = exports.lookup(type)
+ if (!type) return false
+ if (!~type.indexOf('charset')) {
+ var charset = exports.charset(type)
+ if (charset) type += '; charset=' + charset.toLowerCase()
+ }
+ return type
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/HISTORY.md
new file mode 100644
index 0000000..e5ffba4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/HISTORY.md
@@ -0,0 +1,166 @@
+1.7.0 / 2015-02-08
+==================
+
+ * Add `application/vnd.gerber`
+ * Add `application/vnd.msa-disk-image`
+
+1.6.1 / 2015-02-05
+==================
+
+ * Community extensions ownership transferred from `node-mime`
+
+1.6.0 / 2015-01-29
+==================
+
+ * Add `application/jose`
+ * Add `application/jose+json`
+ * Add `application/json-seq`
+ * Add `application/jwk+json`
+ * Add `application/jwk-set+json`
+ * Add `application/jwt`
+ * Add `application/rdap+json`
+ * Add `application/vnd.gov.sk.e-form+xml`
+ * Add `application/vnd.ims.imsccv1p3`
+
+1.5.0 / 2014-12-30
+==================
+
+ * Add `application/vnd.oracle.resource+json`
+ * Fix various invalid MIME type entries
+ - `application/mbox+xml`
+ - `application/oscp-response`
+ - `application/vwg-multiplexed`
+ - `audio/g721`
+
+1.4.0 / 2014-12-21
+==================
+
+ * Add `application/vnd.ims.imsccv1p2`
+ * Fix various invalid MIME type entries
+ - `application/vnd-acucobol`
+ - `application/vnd-curl`
+ - `application/vnd-dart`
+ - `application/vnd-dxr`
+ - `application/vnd-fdf`
+ - `application/vnd-mif`
+ - `application/vnd-sema`
+ - `application/vnd-wap-wmlc`
+ - `application/vnd.adobe.flash-movie`
+ - `application/vnd.dece-zip`
+ - `application/vnd.dvb_service`
+ - `application/vnd.micrografx-igx`
+ - `application/vnd.sealed-doc`
+ - `application/vnd.sealed-eml`
+ - `application/vnd.sealed-mht`
+ - `application/vnd.sealed-ppt`
+ - `application/vnd.sealed-tiff`
+ - `application/vnd.sealed-xls`
+ - `application/vnd.sealedmedia.softseal-html`
+ - `application/vnd.sealedmedia.softseal-pdf`
+ - `application/vnd.wap-slc`
+ - `application/vnd.wap-wbxml`
+ - `audio/vnd.sealedmedia.softseal-mpeg`
+ - `image/vnd-djvu`
+ - `image/vnd-svf`
+ - `image/vnd-wap-wbmp`
+ - `image/vnd.sealed-png`
+ - `image/vnd.sealedmedia.softseal-gif`
+ - `image/vnd.sealedmedia.softseal-jpg`
+ - `model/vnd-dwf`
+ - `model/vnd.parasolid.transmit-binary`
+ - `model/vnd.parasolid.transmit-text`
+ - `text/vnd-a`
+ - `text/vnd-curl`
+ - `text/vnd.wap-wml`
+ * Remove example template MIME types
+ - `application/example`
+ - `audio/example`
+ - `image/example`
+ - `message/example`
+ - `model/example`
+ - `multipart/example`
+ - `text/example`
+ - `video/example`
+
+1.3.1 / 2014-12-16
+==================
+
+ * Fix missing extensions
+ - `application/json5`
+ - `text/hjson`
+
+1.3.0 / 2014-12-07
+==================
+
+ * Add `application/a2l`
+ * Add `application/aml`
+ * Add `application/atfx`
+ * Add `application/atxml`
+ * Add `application/cdfx+xml`
+ * Add `application/dii`
+ * Add `application/json5`
+ * Add `application/lxf`
+ * Add `application/mf4`
+ * Add `application/vnd.apache.thrift.compact`
+ * Add `application/vnd.apache.thrift.json`
+ * Add `application/vnd.coffeescript`
+ * Add `application/vnd.enphase.envoy`
+ * Add `application/vnd.ims.imsccv1p1`
+ * Add `text/csv-schema`
+ * Add `text/hjson`
+ * Add `text/markdown`
+ * Add `text/yaml`
+
+1.2.0 / 2014-11-09
+==================
+
+ * Add `application/cea`
+ * Add `application/dit`
+ * Add `application/vnd.gov.sk.e-form+zip`
+ * Add `application/vnd.tmd.mediaflex.api+xml`
+ * Type `application/epub+zip` is now IANA-registered
+
+1.1.2 / 2014-10-23
+==================
+
+ * Rebuild database for `application/x-www-form-urlencoded` change
+
+1.1.1 / 2014-10-20
+==================
+
+ * Mark `application/x-www-form-urlencoded` as compressible.
+
+1.1.0 / 2014-09-28
+==================
+
+ * Add `application/font-woff2`
+
+1.0.3 / 2014-09-25
+==================
+
+ * Fix engine requirement in package
+
+1.0.2 / 2014-09-25
+==================
+
+ * Add `application/coap-group+json`
+ * Add `application/dcd`
+ * Add `application/vnd.apache.thrift.binary`
+ * Add `image/vnd.tencent.tap`
+ * Mark all JSON-derived types as compressible
+ * Update `text/vtt` data
+
+1.0.1 / 2014-08-30
+==================
+
+ * Fix extension ordering
+
+1.0.0 / 2014-08-30
+==================
+
+ * Add `application/atf`
+ * Add `application/merge-patch+json`
+ * Add `multipart/x-mixed-replace`
+ * Add `source: 'apache'` metadata
+ * Add `source: 'iana'` metadata
+ * Remove badly-assumed charset data
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/LICENSE b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/README.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/README.md
new file mode 100644
index 0000000..1dde234
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/README.md
@@ -0,0 +1,76 @@
+# mime-db
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+
+This is a database of all mime types.
+It consists of a single, public JSON file and does not include any logic,
+allowing it to remain as un-opinionated as possible with an API.
+It aggregates data from the following sources:
+
+- http://www.iana.org/assignments/media-types/media-types.xhtml
+- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
+
+## Installation
+
+```bash
+npm install mime-db
+```
+
+If you're crazy enough to use this in the browser,
+you can just grab the JSON file:
+
+```
+https://cdn.rawgit.com/jshttp/mime-db/master/db.json
+```
+
+## Usage
+
+```js
+var db = require('mime-db');
+
+// grab data on .js files
+var data = db['application/javascript'];
+```
+
+## Data Structure
+
+The JSON file is a map lookup for lowercased mime types.
+Each mime type has the following properties:
+
+- `.source` - where the mime type is defined.
+ If not set, it's probably a custom media type.
+ - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
+ - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
+- `.extensions[]` - known extensions associated with this mime type.
+- `.compressible` - whether a file of this type is can be gzipped.
+- `.charset` - the default charset associated with this type, if any.
+
+If unknown, every property could be `undefined`.
+
+## Contributing
+
+To edit the database, only make PRs against `src/custom.json` or
+`src/custom-suffix.json`.
+
+To update the build, run `npm run update`.
+
+## Adding Custom Media Types
+
+The best way to get new media types included in this library is to register
+them with the IANA. The community registration procedure is outlined in
+[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
+registered with the IANA are automatically pulled into this library.
+
+[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg?style=flat
+[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg?style=flat
+[npm-url]: https://npmjs.org/package/mime-db
+[travis-image]: https://img.shields.io/travis/jshttp/mime-db.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/mime-db
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master
+[node-image]: https://img.shields.io/node/v/mime-db.svg?style=flat
+[node-url]: http://nodejs.org/download/
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/db.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/db.json
new file mode 100644
index 0000000..283c1de
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/db.json
@@ -0,0 +1,6299 @@
+{
+ "application/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "application/3gpdash-qoe-report+xml": {
+ "source": "iana"
+ },
+ "application/3gpp-ims+xml": {
+ "source": "iana"
+ },
+ "application/a2l": {
+ "source": "iana"
+ },
+ "application/activemessage": {
+ "source": "iana"
+ },
+ "application/alto-costmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-costmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-directory+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcost+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcostparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointprop+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointpropparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-error+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/aml": {
+ "source": "iana"
+ },
+ "application/andrew-inset": {
+ "source": "iana",
+ "extensions": ["ez"]
+ },
+ "application/applefile": {
+ "source": "iana"
+ },
+ "application/applixware": {
+ "source": "apache",
+ "extensions": ["aw"]
+ },
+ "application/atf": {
+ "source": "iana"
+ },
+ "application/atfx": {
+ "source": "iana"
+ },
+ "application/atom+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["atom"]
+ },
+ "application/atomcat+xml": {
+ "source": "iana",
+ "extensions": ["atomcat"]
+ },
+ "application/atomdeleted+xml": {
+ "source": "iana"
+ },
+ "application/atomicmail": {
+ "source": "iana"
+ },
+ "application/atomsvc+xml": {
+ "source": "iana",
+ "extensions": ["atomsvc"]
+ },
+ "application/atxml": {
+ "source": "iana"
+ },
+ "application/auth-policy+xml": {
+ "source": "iana"
+ },
+ "application/bacnet-xdd+zip": {
+ "source": "iana"
+ },
+ "application/batch-smtp": {
+ "source": "iana"
+ },
+ "application/beep+xml": {
+ "source": "iana"
+ },
+ "application/calendar+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/calendar+xml": {
+ "source": "iana"
+ },
+ "application/call-completion": {
+ "source": "iana"
+ },
+ "application/cals-1840": {
+ "source": "iana"
+ },
+ "application/cbor": {
+ "source": "iana"
+ },
+ "application/ccmp+xml": {
+ "source": "iana"
+ },
+ "application/ccxml+xml": {
+ "source": "iana",
+ "extensions": ["ccxml"]
+ },
+ "application/cdfx+xml": {
+ "source": "iana"
+ },
+ "application/cdmi-capability": {
+ "source": "iana",
+ "extensions": ["cdmia"]
+ },
+ "application/cdmi-container": {
+ "source": "iana",
+ "extensions": ["cdmic"]
+ },
+ "application/cdmi-domain": {
+ "source": "iana",
+ "extensions": ["cdmid"]
+ },
+ "application/cdmi-object": {
+ "source": "iana",
+ "extensions": ["cdmio"]
+ },
+ "application/cdmi-queue": {
+ "source": "iana",
+ "extensions": ["cdmiq"]
+ },
+ "application/cea": {
+ "source": "iana"
+ },
+ "application/cea-2018+xml": {
+ "source": "iana"
+ },
+ "application/cellml+xml": {
+ "source": "iana"
+ },
+ "application/cfw": {
+ "source": "iana"
+ },
+ "application/cms": {
+ "source": "iana"
+ },
+ "application/cnrp+xml": {
+ "source": "iana"
+ },
+ "application/coap-group+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/commonground": {
+ "source": "iana"
+ },
+ "application/conference-info+xml": {
+ "source": "iana"
+ },
+ "application/cpl+xml": {
+ "source": "iana"
+ },
+ "application/csrattrs": {
+ "source": "iana"
+ },
+ "application/csta+xml": {
+ "source": "iana"
+ },
+ "application/cstadata+xml": {
+ "source": "iana"
+ },
+ "application/cu-seeme": {
+ "source": "apache",
+ "extensions": ["cu"]
+ },
+ "application/cybercash": {
+ "source": "iana"
+ },
+ "application/dart": {
+ "compressible": true
+ },
+ "application/dash+xml": {
+ "source": "iana",
+ "extensions": ["mdp"]
+ },
+ "application/dashdelta": {
+ "source": "iana"
+ },
+ "application/davmount+xml": {
+ "source": "iana",
+ "extensions": ["davmount"]
+ },
+ "application/dca-rft": {
+ "source": "iana"
+ },
+ "application/dcd": {
+ "source": "iana"
+ },
+ "application/dec-dx": {
+ "source": "iana"
+ },
+ "application/dialog-info+xml": {
+ "source": "iana"
+ },
+ "application/dicom": {
+ "source": "iana"
+ },
+ "application/dii": {
+ "source": "iana"
+ },
+ "application/dit": {
+ "source": "iana"
+ },
+ "application/dns": {
+ "source": "iana"
+ },
+ "application/docbook+xml": {
+ "source": "apache",
+ "extensions": ["dbk"]
+ },
+ "application/dskpp+xml": {
+ "source": "iana"
+ },
+ "application/dssc+der": {
+ "source": "iana",
+ "extensions": ["dssc"]
+ },
+ "application/dssc+xml": {
+ "source": "iana",
+ "extensions": ["xdssc"]
+ },
+ "application/dvcs": {
+ "source": "iana"
+ },
+ "application/ecmascript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ecma"]
+ },
+ "application/edi-consent": {
+ "source": "iana"
+ },
+ "application/edi-x12": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/edifact": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/emma+xml": {
+ "source": "iana",
+ "extensions": ["emma"]
+ },
+ "application/emotionml+xml": {
+ "source": "iana"
+ },
+ "application/encaprtp": {
+ "source": "iana"
+ },
+ "application/epp+xml": {
+ "source": "iana"
+ },
+ "application/epub+zip": {
+ "source": "iana",
+ "extensions": ["epub"]
+ },
+ "application/eshop": {
+ "source": "iana"
+ },
+ "application/exi": {
+ "source": "iana",
+ "extensions": ["exi"]
+ },
+ "application/fastinfoset": {
+ "source": "iana"
+ },
+ "application/fastsoap": {
+ "source": "iana"
+ },
+ "application/fdt+xml": {
+ "source": "iana"
+ },
+ "application/fits": {
+ "source": "iana"
+ },
+ "application/font-sfnt": {
+ "source": "iana"
+ },
+ "application/font-tdpfr": {
+ "source": "iana",
+ "extensions": ["pfr"]
+ },
+ "application/font-woff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["woff"]
+ },
+ "application/font-woff2": {
+ "compressible": false,
+ "extensions": ["woff2"]
+ },
+ "application/framework-attributes+xml": {
+ "source": "iana"
+ },
+ "application/gml+xml": {
+ "source": "apache",
+ "extensions": ["gml"]
+ },
+ "application/gpx+xml": {
+ "source": "apache",
+ "extensions": ["gpx"]
+ },
+ "application/gxf": {
+ "source": "apache",
+ "extensions": ["gxf"]
+ },
+ "application/gzip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/h224": {
+ "source": "iana"
+ },
+ "application/held+xml": {
+ "source": "iana"
+ },
+ "application/http": {
+ "source": "iana"
+ },
+ "application/hyperstudio": {
+ "source": "iana",
+ "extensions": ["stk"]
+ },
+ "application/ibe-key-request+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pkg-reply+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pp-data": {
+ "source": "iana"
+ },
+ "application/iges": {
+ "source": "iana"
+ },
+ "application/im-iscomposing+xml": {
+ "source": "iana"
+ },
+ "application/index": {
+ "source": "iana"
+ },
+ "application/index.cmd": {
+ "source": "iana"
+ },
+ "application/index.obj": {
+ "source": "iana"
+ },
+ "application/index.response": {
+ "source": "iana"
+ },
+ "application/index.vnd": {
+ "source": "iana"
+ },
+ "application/inkml+xml": {
+ "source": "iana",
+ "extensions": ["ink","inkml"]
+ },
+ "application/iotp": {
+ "source": "iana"
+ },
+ "application/ipfix": {
+ "source": "iana",
+ "extensions": ["ipfix"]
+ },
+ "application/ipp": {
+ "source": "iana"
+ },
+ "application/isup": {
+ "source": "iana"
+ },
+ "application/its+xml": {
+ "source": "iana"
+ },
+ "application/java-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jar"]
+ },
+ "application/java-serialized-object": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ser"]
+ },
+ "application/java-vm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["class"]
+ },
+ "application/javascript": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["js"]
+ },
+ "application/jose": {
+ "source": "iana"
+ },
+ "application/jose+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jrd+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["json","map"]
+ },
+ "application/json-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json-seq": {
+ "source": "iana"
+ },
+ "application/json5": {
+ "extensions": ["json5"]
+ },
+ "application/jsonml+json": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["jsonml"]
+ },
+ "application/jwk+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwk-set+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwt": {
+ "source": "iana"
+ },
+ "application/kpml-request+xml": {
+ "source": "iana"
+ },
+ "application/kpml-response+xml": {
+ "source": "iana"
+ },
+ "application/ld+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/link-format": {
+ "source": "iana"
+ },
+ "application/load-control+xml": {
+ "source": "iana"
+ },
+ "application/lost+xml": {
+ "source": "iana",
+ "extensions": ["lostxml"]
+ },
+ "application/lostsync+xml": {
+ "source": "iana"
+ },
+ "application/lxf": {
+ "source": "iana"
+ },
+ "application/mac-binhex40": {
+ "source": "iana",
+ "extensions": ["hqx"]
+ },
+ "application/mac-compactpro": {
+ "source": "apache",
+ "extensions": ["cpt"]
+ },
+ "application/macwriteii": {
+ "source": "iana"
+ },
+ "application/mads+xml": {
+ "source": "iana",
+ "extensions": ["mads"]
+ },
+ "application/marc": {
+ "source": "iana",
+ "extensions": ["mrc"]
+ },
+ "application/marcxml+xml": {
+ "source": "iana",
+ "extensions": ["mrcx"]
+ },
+ "application/mathematica": {
+ "source": "iana",
+ "extensions": ["ma","nb","mb"]
+ },
+ "application/mathml+xml": {
+ "source": "iana",
+ "extensions": ["mathml"]
+ },
+ "application/mathml-content+xml": {
+ "source": "iana"
+ },
+ "application/mathml-presentation+xml": {
+ "source": "iana"
+ },
+ "application/mbms-associated-procedure-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-deregister+xml": {
+ "source": "iana"
+ },
+ "application/mbms-envelope+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-protection-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-reception-report+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-schedule+xml": {
+ "source": "iana"
+ },
+ "application/mbms-user-service-description+xml": {
+ "source": "iana"
+ },
+ "application/mbox": {
+ "source": "iana",
+ "extensions": ["mbox"]
+ },
+ "application/media-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/media_control+xml": {
+ "source": "iana"
+ },
+ "application/mediaservercontrol+xml": {
+ "source": "iana",
+ "extensions": ["mscml"]
+ },
+ "application/merge-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/metalink+xml": {
+ "source": "apache",
+ "extensions": ["metalink"]
+ },
+ "application/metalink4+xml": {
+ "source": "iana",
+ "extensions": ["meta4"]
+ },
+ "application/mets+xml": {
+ "source": "iana",
+ "extensions": ["mets"]
+ },
+ "application/mf4": {
+ "source": "iana"
+ },
+ "application/mikey": {
+ "source": "iana"
+ },
+ "application/mods+xml": {
+ "source": "iana",
+ "extensions": ["mods"]
+ },
+ "application/moss-keys": {
+ "source": "iana"
+ },
+ "application/moss-signature": {
+ "source": "iana"
+ },
+ "application/mosskey-data": {
+ "source": "iana"
+ },
+ "application/mosskey-request": {
+ "source": "iana"
+ },
+ "application/mp21": {
+ "source": "iana",
+ "extensions": ["m21","mp21"]
+ },
+ "application/mp4": {
+ "source": "iana",
+ "extensions": ["mp4s","m4p"]
+ },
+ "application/mpeg4-generic": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod-xmt": {
+ "source": "iana"
+ },
+ "application/mrb-consumer+xml": {
+ "source": "iana"
+ },
+ "application/mrb-publish+xml": {
+ "source": "iana"
+ },
+ "application/msc-ivr+xml": {
+ "source": "iana"
+ },
+ "application/msc-mixer+xml": {
+ "source": "iana"
+ },
+ "application/msword": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["doc","dot"]
+ },
+ "application/mxf": {
+ "source": "iana",
+ "extensions": ["mxf"]
+ },
+ "application/nasdata": {
+ "source": "iana"
+ },
+ "application/news-checkgroups": {
+ "source": "iana"
+ },
+ "application/news-groupinfo": {
+ "source": "iana"
+ },
+ "application/news-transmission": {
+ "source": "iana"
+ },
+ "application/nlsml+xml": {
+ "source": "iana"
+ },
+ "application/nss": {
+ "source": "iana"
+ },
+ "application/ocsp-request": {
+ "source": "iana"
+ },
+ "application/ocsp-response": {
+ "source": "iana"
+ },
+ "application/octet-stream": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","buffer"]
+ },
+ "application/oda": {
+ "source": "iana",
+ "extensions": ["oda"]
+ },
+ "application/odx": {
+ "source": "iana"
+ },
+ "application/oebps-package+xml": {
+ "source": "iana",
+ "extensions": ["opf"]
+ },
+ "application/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ogx"]
+ },
+ "application/omdoc+xml": {
+ "source": "apache",
+ "extensions": ["omdoc"]
+ },
+ "application/onenote": {
+ "source": "apache",
+ "extensions": ["onetoc","onetoc2","onetmp","onepkg"]
+ },
+ "application/oxps": {
+ "source": "iana",
+ "extensions": ["oxps"]
+ },
+ "application/p2p-overlay+xml": {
+ "source": "iana"
+ },
+ "application/parityfec": {
+ "source": "iana"
+ },
+ "application/patch-ops-error+xml": {
+ "source": "iana",
+ "extensions": ["xer"]
+ },
+ "application/pdf": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pdf"]
+ },
+ "application/pdx": {
+ "source": "iana"
+ },
+ "application/pgp-encrypted": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pgp"]
+ },
+ "application/pgp-keys": {
+ "source": "iana"
+ },
+ "application/pgp-signature": {
+ "source": "iana",
+ "extensions": ["asc","sig"]
+ },
+ "application/pics-rules": {
+ "source": "apache",
+ "extensions": ["prf"]
+ },
+ "application/pidf+xml": {
+ "source": "iana"
+ },
+ "application/pidf-diff+xml": {
+ "source": "iana"
+ },
+ "application/pkcs10": {
+ "source": "iana",
+ "extensions": ["p10"]
+ },
+ "application/pkcs7-mime": {
+ "source": "iana",
+ "extensions": ["p7m","p7c"]
+ },
+ "application/pkcs7-signature": {
+ "source": "iana",
+ "extensions": ["p7s"]
+ },
+ "application/pkcs8": {
+ "source": "iana",
+ "extensions": ["p8"]
+ },
+ "application/pkix-attr-cert": {
+ "source": "iana",
+ "extensions": ["ac"]
+ },
+ "application/pkix-cert": {
+ "source": "iana",
+ "extensions": ["cer"]
+ },
+ "application/pkix-crl": {
+ "source": "iana",
+ "extensions": ["crl"]
+ },
+ "application/pkix-pkipath": {
+ "source": "iana",
+ "extensions": ["pkipath"]
+ },
+ "application/pkixcmp": {
+ "source": "iana",
+ "extensions": ["pki"]
+ },
+ "application/pls+xml": {
+ "source": "iana",
+ "extensions": ["pls"]
+ },
+ "application/poc-settings+xml": {
+ "source": "iana"
+ },
+ "application/postscript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ai","eps","ps"]
+ },
+ "application/provenance+xml": {
+ "source": "iana"
+ },
+ "application/prs.alvestrand.titrax-sheet": {
+ "source": "iana"
+ },
+ "application/prs.cww": {
+ "source": "iana",
+ "extensions": ["cww"]
+ },
+ "application/prs.hpub+zip": {
+ "source": "iana"
+ },
+ "application/prs.nprend": {
+ "source": "iana"
+ },
+ "application/prs.plucker": {
+ "source": "iana"
+ },
+ "application/prs.rdf-xml-crypt": {
+ "source": "iana"
+ },
+ "application/prs.xsf+xml": {
+ "source": "iana"
+ },
+ "application/pskc+xml": {
+ "source": "iana",
+ "extensions": ["pskcxml"]
+ },
+ "application/qsig": {
+ "source": "iana"
+ },
+ "application/raptorfec": {
+ "source": "iana"
+ },
+ "application/rdap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/rdf+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rdf"]
+ },
+ "application/reginfo+xml": {
+ "source": "iana",
+ "extensions": ["rif"]
+ },
+ "application/relax-ng-compact-syntax": {
+ "source": "iana",
+ "extensions": ["rnc"]
+ },
+ "application/remote-printing": {
+ "source": "iana"
+ },
+ "application/reputon+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/resource-lists+xml": {
+ "source": "iana",
+ "extensions": ["rl"]
+ },
+ "application/resource-lists-diff+xml": {
+ "source": "iana",
+ "extensions": ["rld"]
+ },
+ "application/riscos": {
+ "source": "iana"
+ },
+ "application/rlmi+xml": {
+ "source": "iana"
+ },
+ "application/rls-services+xml": {
+ "source": "iana",
+ "extensions": ["rs"]
+ },
+ "application/rpki-ghostbusters": {
+ "source": "iana",
+ "extensions": ["gbr"]
+ },
+ "application/rpki-manifest": {
+ "source": "iana",
+ "extensions": ["mft"]
+ },
+ "application/rpki-roa": {
+ "source": "iana",
+ "extensions": ["roa"]
+ },
+ "application/rpki-updown": {
+ "source": "iana"
+ },
+ "application/rsd+xml": {
+ "source": "apache",
+ "extensions": ["rsd"]
+ },
+ "application/rss+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["rss"]
+ },
+ "application/rtf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtf"]
+ },
+ "application/rtploopback": {
+ "source": "iana"
+ },
+ "application/rtx": {
+ "source": "iana"
+ },
+ "application/samlassertion+xml": {
+ "source": "iana"
+ },
+ "application/samlmetadata+xml": {
+ "source": "iana"
+ },
+ "application/sbml+xml": {
+ "source": "iana",
+ "extensions": ["sbml"]
+ },
+ "application/scaip+xml": {
+ "source": "iana"
+ },
+ "application/scvp-cv-request": {
+ "source": "iana",
+ "extensions": ["scq"]
+ },
+ "application/scvp-cv-response": {
+ "source": "iana",
+ "extensions": ["scs"]
+ },
+ "application/scvp-vp-request": {
+ "source": "iana",
+ "extensions": ["spq"]
+ },
+ "application/scvp-vp-response": {
+ "source": "iana",
+ "extensions": ["spp"]
+ },
+ "application/sdp": {
+ "source": "iana",
+ "extensions": ["sdp"]
+ },
+ "application/sep+xml": {
+ "source": "iana"
+ },
+ "application/sep-exi": {
+ "source": "iana"
+ },
+ "application/session-info": {
+ "source": "iana"
+ },
+ "application/set-payment": {
+ "source": "iana"
+ },
+ "application/set-payment-initiation": {
+ "source": "iana",
+ "extensions": ["setpay"]
+ },
+ "application/set-registration": {
+ "source": "iana"
+ },
+ "application/set-registration-initiation": {
+ "source": "iana",
+ "extensions": ["setreg"]
+ },
+ "application/sgml": {
+ "source": "iana"
+ },
+ "application/sgml-open-catalog": {
+ "source": "iana"
+ },
+ "application/shf+xml": {
+ "source": "iana",
+ "extensions": ["shf"]
+ },
+ "application/sieve": {
+ "source": "iana"
+ },
+ "application/simple-filter+xml": {
+ "source": "iana"
+ },
+ "application/simple-message-summary": {
+ "source": "iana"
+ },
+ "application/simplesymbolcontainer": {
+ "source": "iana"
+ },
+ "application/slate": {
+ "source": "iana"
+ },
+ "application/smil": {
+ "source": "iana"
+ },
+ "application/smil+xml": {
+ "source": "iana",
+ "extensions": ["smi","smil"]
+ },
+ "application/smpte336m": {
+ "source": "iana"
+ },
+ "application/soap+fastinfoset": {
+ "source": "iana"
+ },
+ "application/soap+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/sparql-query": {
+ "source": "iana",
+ "extensions": ["rq"]
+ },
+ "application/sparql-results+xml": {
+ "source": "iana",
+ "extensions": ["srx"]
+ },
+ "application/spirits-event+xml": {
+ "source": "iana"
+ },
+ "application/sql": {
+ "source": "iana"
+ },
+ "application/srgs": {
+ "source": "iana",
+ "extensions": ["gram"]
+ },
+ "application/srgs+xml": {
+ "source": "iana",
+ "extensions": ["grxml"]
+ },
+ "application/sru+xml": {
+ "source": "iana",
+ "extensions": ["sru"]
+ },
+ "application/ssdl+xml": {
+ "source": "apache",
+ "extensions": ["ssdl"]
+ },
+ "application/ssml+xml": {
+ "source": "iana",
+ "extensions": ["ssml"]
+ },
+ "application/tamp-apex-update": {
+ "source": "iana"
+ },
+ "application/tamp-apex-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-community-update": {
+ "source": "iana"
+ },
+ "application/tamp-community-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-error": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-status-query": {
+ "source": "iana"
+ },
+ "application/tamp-status-response": {
+ "source": "iana"
+ },
+ "application/tamp-update": {
+ "source": "iana"
+ },
+ "application/tamp-update-confirm": {
+ "source": "iana"
+ },
+ "application/tar": {
+ "compressible": true
+ },
+ "application/tei+xml": {
+ "source": "iana",
+ "extensions": ["tei","teicorpus"]
+ },
+ "application/thraud+xml": {
+ "source": "iana",
+ "extensions": ["tfi"]
+ },
+ "application/timestamp-query": {
+ "source": "iana"
+ },
+ "application/timestamp-reply": {
+ "source": "iana"
+ },
+ "application/timestamped-data": {
+ "source": "iana",
+ "extensions": ["tsd"]
+ },
+ "application/ttml+xml": {
+ "source": "iana"
+ },
+ "application/tve-trigger": {
+ "source": "iana"
+ },
+ "application/ulpfec": {
+ "source": "iana"
+ },
+ "application/urc-grpsheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-ressheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-targetdesc+xml": {
+ "source": "iana"
+ },
+ "application/urc-uisocketdesc+xml": {
+ "source": "iana"
+ },
+ "application/vcard+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vcard+xml": {
+ "source": "iana"
+ },
+ "application/vemmi": {
+ "source": "iana"
+ },
+ "application/vividence.scriptfile": {
+ "source": "apache"
+ },
+ "application/vnd.3gpp.bsf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.pic-bw-large": {
+ "source": "iana",
+ "extensions": ["plb"]
+ },
+ "application/vnd.3gpp.pic-bw-small": {
+ "source": "iana",
+ "extensions": ["psb"]
+ },
+ "application/vnd.3gpp.pic-bw-var": {
+ "source": "iana",
+ "extensions": ["pvb"]
+ },
+ "application/vnd.3gpp.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.bcmcsinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.tcap": {
+ "source": "iana",
+ "extensions": ["tcap"]
+ },
+ "application/vnd.3m.post-it-notes": {
+ "source": "iana",
+ "extensions": ["pwn"]
+ },
+ "application/vnd.accpac.simply.aso": {
+ "source": "iana",
+ "extensions": ["aso"]
+ },
+ "application/vnd.accpac.simply.imp": {
+ "source": "iana",
+ "extensions": ["imp"]
+ },
+ "application/vnd.acucobol": {
+ "source": "iana",
+ "extensions": ["acu"]
+ },
+ "application/vnd.acucorp": {
+ "source": "iana",
+ "extensions": ["atc","acutc"]
+ },
+ "application/vnd.adobe.air-application-installer-package+zip": {
+ "source": "apache",
+ "extensions": ["air"]
+ },
+ "application/vnd.adobe.flash.movie": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.formscentral.fcdt": {
+ "source": "iana",
+ "extensions": ["fcdt"]
+ },
+ "application/vnd.adobe.fxp": {
+ "source": "iana",
+ "extensions": ["fxp","fxpl"]
+ },
+ "application/vnd.adobe.partial-upload": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.xdp+xml": {
+ "source": "iana",
+ "extensions": ["xdp"]
+ },
+ "application/vnd.adobe.xfdf": {
+ "source": "iana",
+ "extensions": ["xfdf"]
+ },
+ "application/vnd.aether.imp": {
+ "source": "iana"
+ },
+ "application/vnd.ah-barcode": {
+ "source": "iana"
+ },
+ "application/vnd.ahead.space": {
+ "source": "iana",
+ "extensions": ["ahead"]
+ },
+ "application/vnd.airzip.filesecure.azf": {
+ "source": "iana",
+ "extensions": ["azf"]
+ },
+ "application/vnd.airzip.filesecure.azs": {
+ "source": "iana",
+ "extensions": ["azs"]
+ },
+ "application/vnd.amazon.ebook": {
+ "source": "apache",
+ "extensions": ["azw"]
+ },
+ "application/vnd.americandynamics.acc": {
+ "source": "iana",
+ "extensions": ["acc"]
+ },
+ "application/vnd.amiga.ami": {
+ "source": "iana",
+ "extensions": ["ami"]
+ },
+ "application/vnd.amundsen.maze+xml": {
+ "source": "iana"
+ },
+ "application/vnd.android.package-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["apk"]
+ },
+ "application/vnd.anser-web-certificate-issue-initiation": {
+ "source": "iana",
+ "extensions": ["cii"]
+ },
+ "application/vnd.anser-web-funds-transfer-initiation": {
+ "source": "apache",
+ "extensions": ["fti"]
+ },
+ "application/vnd.antix.game-component": {
+ "source": "iana",
+ "extensions": ["atx"]
+ },
+ "application/vnd.apache.thrift.binary": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.compact": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.json": {
+ "source": "iana"
+ },
+ "application/vnd.api+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.apple.installer+xml": {
+ "source": "iana",
+ "extensions": ["mpkg"]
+ },
+ "application/vnd.apple.mpegurl": {
+ "source": "iana",
+ "extensions": ["m3u8"]
+ },
+ "application/vnd.arastra.swi": {
+ "source": "iana"
+ },
+ "application/vnd.aristanetworks.swi": {
+ "source": "iana",
+ "extensions": ["swi"]
+ },
+ "application/vnd.artsquare": {
+ "source": "iana"
+ },
+ "application/vnd.astraea-software.iota": {
+ "source": "iana",
+ "extensions": ["iota"]
+ },
+ "application/vnd.audiograph": {
+ "source": "iana",
+ "extensions": ["aep"]
+ },
+ "application/vnd.autopackage": {
+ "source": "iana"
+ },
+ "application/vnd.avistar+xml": {
+ "source": "iana"
+ },
+ "application/vnd.balsamiq.bmml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.bekitzur-stech+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.blueice.multipass": {
+ "source": "iana",
+ "extensions": ["mpm"]
+ },
+ "application/vnd.bluetooth.ep.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bluetooth.le.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bmi": {
+ "source": "iana",
+ "extensions": ["bmi"]
+ },
+ "application/vnd.businessobjects": {
+ "source": "iana",
+ "extensions": ["rep"]
+ },
+ "application/vnd.cab-jscript": {
+ "source": "iana"
+ },
+ "application/vnd.canon-cpdl": {
+ "source": "iana"
+ },
+ "application/vnd.canon-lips": {
+ "source": "iana"
+ },
+ "application/vnd.cendio.thinlinc.clientconf": {
+ "source": "iana"
+ },
+ "application/vnd.century-systems.tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.chemdraw+xml": {
+ "source": "iana",
+ "extensions": ["cdxml"]
+ },
+ "application/vnd.chipnuts.karaoke-mmd": {
+ "source": "iana",
+ "extensions": ["mmd"]
+ },
+ "application/vnd.cinderella": {
+ "source": "iana",
+ "extensions": ["cdy"]
+ },
+ "application/vnd.cirpack.isdn-ext": {
+ "source": "iana"
+ },
+ "application/vnd.claymore": {
+ "source": "iana",
+ "extensions": ["cla"]
+ },
+ "application/vnd.cloanto.rp9": {
+ "source": "iana",
+ "extensions": ["rp9"]
+ },
+ "application/vnd.clonk.c4group": {
+ "source": "iana",
+ "extensions": ["c4g","c4d","c4f","c4p","c4u"]
+ },
+ "application/vnd.cluetrust.cartomobile-config": {
+ "source": "iana",
+ "extensions": ["c11amc"]
+ },
+ "application/vnd.cluetrust.cartomobile-config-pkg": {
+ "source": "iana",
+ "extensions": ["c11amz"]
+ },
+ "application/vnd.coffeescript": {
+ "source": "iana"
+ },
+ "application/vnd.collection+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.doc+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.next+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.commerce-battelle": {
+ "source": "iana"
+ },
+ "application/vnd.commonspace": {
+ "source": "iana",
+ "extensions": ["csp"]
+ },
+ "application/vnd.contact.cmsg": {
+ "source": "iana",
+ "extensions": ["cdbcmsg"]
+ },
+ "application/vnd.cosmocaller": {
+ "source": "iana",
+ "extensions": ["cmc"]
+ },
+ "application/vnd.crick.clicker": {
+ "source": "iana",
+ "extensions": ["clkx"]
+ },
+ "application/vnd.crick.clicker.keyboard": {
+ "source": "iana",
+ "extensions": ["clkk"]
+ },
+ "application/vnd.crick.clicker.palette": {
+ "source": "iana",
+ "extensions": ["clkp"]
+ },
+ "application/vnd.crick.clicker.template": {
+ "source": "iana",
+ "extensions": ["clkt"]
+ },
+ "application/vnd.crick.clicker.wordbank": {
+ "source": "iana",
+ "extensions": ["clkw"]
+ },
+ "application/vnd.criticaltools.wbs+xml": {
+ "source": "iana",
+ "extensions": ["wbs"]
+ },
+ "application/vnd.ctc-posml": {
+ "source": "iana",
+ "extensions": ["pml"]
+ },
+ "application/vnd.ctct.ws+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cups-pdf": {
+ "source": "iana"
+ },
+ "application/vnd.cups-postscript": {
+ "source": "iana"
+ },
+ "application/vnd.cups-ppd": {
+ "source": "iana",
+ "extensions": ["ppd"]
+ },
+ "application/vnd.cups-raster": {
+ "source": "iana"
+ },
+ "application/vnd.cups-raw": {
+ "source": "iana"
+ },
+ "application/vnd.curl": {
+ "source": "iana"
+ },
+ "application/vnd.curl.car": {
+ "source": "apache",
+ "extensions": ["car"]
+ },
+ "application/vnd.curl.pcurl": {
+ "source": "apache",
+ "extensions": ["pcurl"]
+ },
+ "application/vnd.cyan.dean.root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cybank": {
+ "source": "iana"
+ },
+ "application/vnd.dart": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dart"]
+ },
+ "application/vnd.data-vision.rdz": {
+ "source": "iana",
+ "extensions": ["rdz"]
+ },
+ "application/vnd.debian.binary-package": {
+ "source": "iana"
+ },
+ "application/vnd.dece.data": {
+ "source": "iana",
+ "extensions": ["uvf","uvvf","uvd","uvvd"]
+ },
+ "application/vnd.dece.ttml+xml": {
+ "source": "iana",
+ "extensions": ["uvt","uvvt"]
+ },
+ "application/vnd.dece.unspecified": {
+ "source": "iana",
+ "extensions": ["uvx","uvvx"]
+ },
+ "application/vnd.dece.zip": {
+ "source": "iana",
+ "extensions": ["uvz","uvvz"]
+ },
+ "application/vnd.denovo.fcselayout-link": {
+ "source": "iana",
+ "extensions": ["fe_launch"]
+ },
+ "application/vnd.desmume-movie": {
+ "source": "iana"
+ },
+ "application/vnd.dir-bi.plate-dl-nosuffix": {
+ "source": "iana"
+ },
+ "application/vnd.dm.delegation+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dna": {
+ "source": "iana",
+ "extensions": ["dna"]
+ },
+ "application/vnd.document+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dolby.mlp": {
+ "source": "apache",
+ "extensions": ["mlp"]
+ },
+ "application/vnd.dolby.mobile.1": {
+ "source": "iana"
+ },
+ "application/vnd.dolby.mobile.2": {
+ "source": "iana"
+ },
+ "application/vnd.doremir.scorecloud-binary-document": {
+ "source": "iana"
+ },
+ "application/vnd.dpgraph": {
+ "source": "iana",
+ "extensions": ["dpg"]
+ },
+ "application/vnd.dreamfactory": {
+ "source": "iana",
+ "extensions": ["dfac"]
+ },
+ "application/vnd.ds-keypoint": {
+ "source": "apache",
+ "extensions": ["kpxx"]
+ },
+ "application/vnd.dtg.local": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.flash": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.html": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ait": {
+ "source": "iana",
+ "extensions": ["ait"]
+ },
+ "application/vnd.dvb.dvbj": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.esgcontainer": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcdftnotifaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess2": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgpdd": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcroaming": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-base": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-enhancement": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-aggregate-root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-container+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-generic+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-msglist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-response+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-init+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.pfr": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.service": {
+ "source": "iana",
+ "extensions": ["svc"]
+ },
+ "application/vnd.dxr": {
+ "source": "iana"
+ },
+ "application/vnd.dynageo": {
+ "source": "iana",
+ "extensions": ["geo"]
+ },
+ "application/vnd.dzr": {
+ "source": "iana"
+ },
+ "application/vnd.easykaraoke.cdgdownload": {
+ "source": "iana"
+ },
+ "application/vnd.ecdis-update": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.chart": {
+ "source": "iana",
+ "extensions": ["mag"]
+ },
+ "application/vnd.ecowin.filerequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.fileupdate": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.series": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesrequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesupdate": {
+ "source": "iana"
+ },
+ "application/vnd.emclient.accessrequest+xml": {
+ "source": "iana"
+ },
+ "application/vnd.enliven": {
+ "source": "iana",
+ "extensions": ["nml"]
+ },
+ "application/vnd.enphase.envoy": {
+ "source": "iana"
+ },
+ "application/vnd.eprints.data+xml": {
+ "source": "iana"
+ },
+ "application/vnd.epson.esf": {
+ "source": "iana",
+ "extensions": ["esf"]
+ },
+ "application/vnd.epson.msf": {
+ "source": "iana",
+ "extensions": ["msf"]
+ },
+ "application/vnd.epson.quickanime": {
+ "source": "iana",
+ "extensions": ["qam"]
+ },
+ "application/vnd.epson.salt": {
+ "source": "iana",
+ "extensions": ["slt"]
+ },
+ "application/vnd.epson.ssf": {
+ "source": "iana",
+ "extensions": ["ssf"]
+ },
+ "application/vnd.ericsson.quickcall": {
+ "source": "iana"
+ },
+ "application/vnd.eszigno3+xml": {
+ "source": "iana",
+ "extensions": ["es3","et3"]
+ },
+ "application/vnd.etsi.aoc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-e+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-s+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.cug+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvcommand+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-bc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-cod+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-npvr+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvservice+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsync+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mcid+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mheg5": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.overload-control-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.pstn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.sci+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.simservs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.timestamp-token": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl.der": {
+ "source": "iana"
+ },
+ "application/vnd.eudora.data": {
+ "source": "iana"
+ },
+ "application/vnd.ezpix-album": {
+ "source": "iana",
+ "extensions": ["ez2"]
+ },
+ "application/vnd.ezpix-package": {
+ "source": "iana",
+ "extensions": ["ez3"]
+ },
+ "application/vnd.f-secure.mobile": {
+ "source": "iana"
+ },
+ "application/vnd.fdf": {
+ "source": "iana",
+ "extensions": ["fdf"]
+ },
+ "application/vnd.fdsn.mseed": {
+ "source": "iana",
+ "extensions": ["mseed"]
+ },
+ "application/vnd.fdsn.seed": {
+ "source": "iana",
+ "extensions": ["seed","dataless"]
+ },
+ "application/vnd.ffsns": {
+ "source": "iana"
+ },
+ "application/vnd.fints": {
+ "source": "iana"
+ },
+ "application/vnd.flographit": {
+ "source": "iana",
+ "extensions": ["gph"]
+ },
+ "application/vnd.fluxtime.clip": {
+ "source": "iana",
+ "extensions": ["ftc"]
+ },
+ "application/vnd.font-fontforge-sfd": {
+ "source": "iana"
+ },
+ "application/vnd.framemaker": {
+ "source": "iana",
+ "extensions": ["fm","frame","maker","book"]
+ },
+ "application/vnd.frogans.fnc": {
+ "source": "iana",
+ "extensions": ["fnc"]
+ },
+ "application/vnd.frogans.ltf": {
+ "source": "iana",
+ "extensions": ["ltf"]
+ },
+ "application/vnd.fsc.weblaunch": {
+ "source": "iana",
+ "extensions": ["fsc"]
+ },
+ "application/vnd.fujitsu.oasys": {
+ "source": "iana",
+ "extensions": ["oas"]
+ },
+ "application/vnd.fujitsu.oasys2": {
+ "source": "iana",
+ "extensions": ["oa2"]
+ },
+ "application/vnd.fujitsu.oasys3": {
+ "source": "iana",
+ "extensions": ["oa3"]
+ },
+ "application/vnd.fujitsu.oasysgp": {
+ "source": "iana",
+ "extensions": ["fg5"]
+ },
+ "application/vnd.fujitsu.oasysprs": {
+ "source": "iana",
+ "extensions": ["bh2"]
+ },
+ "application/vnd.fujixerox.art-ex": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.art4": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.ddd": {
+ "source": "iana",
+ "extensions": ["ddd"]
+ },
+ "application/vnd.fujixerox.docuworks": {
+ "source": "iana",
+ "extensions": ["xdw"]
+ },
+ "application/vnd.fujixerox.docuworks.binder": {
+ "source": "iana",
+ "extensions": ["xbd"]
+ },
+ "application/vnd.fujixerox.docuworks.container": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.hbpl": {
+ "source": "iana"
+ },
+ "application/vnd.fut-misnet": {
+ "source": "iana"
+ },
+ "application/vnd.fuzzysheet": {
+ "source": "iana",
+ "extensions": ["fzs"]
+ },
+ "application/vnd.genomatix.tuxedo": {
+ "source": "iana",
+ "extensions": ["txd"]
+ },
+ "application/vnd.geo+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.geocube+xml": {
+ "source": "iana"
+ },
+ "application/vnd.geogebra.file": {
+ "source": "iana",
+ "extensions": ["ggb"]
+ },
+ "application/vnd.geogebra.tool": {
+ "source": "iana",
+ "extensions": ["ggt"]
+ },
+ "application/vnd.geometry-explorer": {
+ "source": "iana",
+ "extensions": ["gex","gre"]
+ },
+ "application/vnd.geonext": {
+ "source": "iana",
+ "extensions": ["gxt"]
+ },
+ "application/vnd.geoplan": {
+ "source": "iana",
+ "extensions": ["g2w"]
+ },
+ "application/vnd.geospace": {
+ "source": "iana",
+ "extensions": ["g3w"]
+ },
+ "application/vnd.gerber": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt-response": {
+ "source": "iana"
+ },
+ "application/vnd.gmx": {
+ "source": "iana",
+ "extensions": ["gmx"]
+ },
+ "application/vnd.google-earth.kml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["kml"]
+ },
+ "application/vnd.google-earth.kmz": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["kmz"]
+ },
+ "application/vnd.gov.sk.e-form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.gov.sk.e-form+zip": {
+ "source": "iana"
+ },
+ "application/vnd.grafeq": {
+ "source": "iana",
+ "extensions": ["gqf","gqs"]
+ },
+ "application/vnd.gridmp": {
+ "source": "iana"
+ },
+ "application/vnd.groove-account": {
+ "source": "iana",
+ "extensions": ["gac"]
+ },
+ "application/vnd.groove-help": {
+ "source": "iana",
+ "extensions": ["ghf"]
+ },
+ "application/vnd.groove-identity-message": {
+ "source": "iana",
+ "extensions": ["gim"]
+ },
+ "application/vnd.groove-injector": {
+ "source": "iana",
+ "extensions": ["grv"]
+ },
+ "application/vnd.groove-tool-message": {
+ "source": "iana",
+ "extensions": ["gtm"]
+ },
+ "application/vnd.groove-tool-template": {
+ "source": "iana",
+ "extensions": ["tpl"]
+ },
+ "application/vnd.groove-vcard": {
+ "source": "iana",
+ "extensions": ["vcg"]
+ },
+ "application/vnd.hal+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hal+xml": {
+ "source": "iana",
+ "extensions": ["hal"]
+ },
+ "application/vnd.handheld-entertainment+xml": {
+ "source": "iana",
+ "extensions": ["zmm"]
+ },
+ "application/vnd.hbci": {
+ "source": "iana",
+ "extensions": ["hbci"]
+ },
+ "application/vnd.hcl-bireports": {
+ "source": "iana"
+ },
+ "application/vnd.heroku+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hhe.lesson-player": {
+ "source": "iana",
+ "extensions": ["les"]
+ },
+ "application/vnd.hp-hpgl": {
+ "source": "iana",
+ "extensions": ["hpgl"]
+ },
+ "application/vnd.hp-hpid": {
+ "source": "iana",
+ "extensions": ["hpid"]
+ },
+ "application/vnd.hp-hps": {
+ "source": "iana",
+ "extensions": ["hps"]
+ },
+ "application/vnd.hp-jlyt": {
+ "source": "iana",
+ "extensions": ["jlt"]
+ },
+ "application/vnd.hp-pcl": {
+ "source": "iana",
+ "extensions": ["pcl"]
+ },
+ "application/vnd.hp-pclxl": {
+ "source": "iana",
+ "extensions": ["pclxl"]
+ },
+ "application/vnd.httphone": {
+ "source": "iana"
+ },
+ "application/vnd.hydrostatix.sof-data": {
+ "source": "iana"
+ },
+ "application/vnd.hzn-3d-crossword": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.afplinedata": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.electronic-media": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.minipay": {
+ "source": "iana",
+ "extensions": ["mpy"]
+ },
+ "application/vnd.ibm.modcap": {
+ "source": "iana",
+ "extensions": ["afp","listafp","list3820"]
+ },
+ "application/vnd.ibm.rights-management": {
+ "source": "iana",
+ "extensions": ["irm"]
+ },
+ "application/vnd.ibm.secure-container": {
+ "source": "iana",
+ "extensions": ["sc"]
+ },
+ "application/vnd.iccprofile": {
+ "source": "iana",
+ "extensions": ["icc","icm"]
+ },
+ "application/vnd.ieee.1905": {
+ "source": "iana"
+ },
+ "application/vnd.igloader": {
+ "source": "iana",
+ "extensions": ["igl"]
+ },
+ "application/vnd.immervision-ivp": {
+ "source": "iana",
+ "extensions": ["ivp"]
+ },
+ "application/vnd.immervision-ivu": {
+ "source": "iana",
+ "extensions": ["ivu"]
+ },
+ "application/vnd.ims.imsccv1p1": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p2": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p3": {
+ "source": "iana"
+ },
+ "application/vnd.ims.lis.v2.result+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolconsumerprofile+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy.id+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings.simple+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.informedcontrol.rms+xml": {
+ "source": "iana"
+ },
+ "application/vnd.informix-visionary": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project+xml": {
+ "source": "iana"
+ },
+ "application/vnd.innopath.wamp.notification": {
+ "source": "iana"
+ },
+ "application/vnd.insors.igm": {
+ "source": "iana",
+ "extensions": ["igm"]
+ },
+ "application/vnd.intercon.formnet": {
+ "source": "iana",
+ "extensions": ["xpw","xpx"]
+ },
+ "application/vnd.intergeo": {
+ "source": "iana",
+ "extensions": ["i2g"]
+ },
+ "application/vnd.intertrust.digibox": {
+ "source": "iana"
+ },
+ "application/vnd.intertrust.nncp": {
+ "source": "iana"
+ },
+ "application/vnd.intu.qbo": {
+ "source": "iana",
+ "extensions": ["qbo"]
+ },
+ "application/vnd.intu.qfx": {
+ "source": "iana",
+ "extensions": ["qfx"]
+ },
+ "application/vnd.iptc.g2.catalogitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.conceptitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.knowledgeitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.packageitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.planningitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ipunplugged.rcprofile": {
+ "source": "iana",
+ "extensions": ["rcprofile"]
+ },
+ "application/vnd.irepository.package+xml": {
+ "source": "iana",
+ "extensions": ["irp"]
+ },
+ "application/vnd.is-xpr": {
+ "source": "iana",
+ "extensions": ["xpr"]
+ },
+ "application/vnd.isac.fcs": {
+ "source": "iana",
+ "extensions": ["fcs"]
+ },
+ "application/vnd.jam": {
+ "source": "iana",
+ "extensions": ["jam"]
+ },
+ "application/vnd.japannet-directory-service": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-jpnstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-payment-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-setstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.jcp.javame.midlet-rms": {
+ "source": "iana",
+ "extensions": ["rms"]
+ },
+ "application/vnd.jisp": {
+ "source": "iana",
+ "extensions": ["jisp"]
+ },
+ "application/vnd.joost.joda-archive": {
+ "source": "iana",
+ "extensions": ["joda"]
+ },
+ "application/vnd.jsk.isdn-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.kahootz": {
+ "source": "iana",
+ "extensions": ["ktz","ktr"]
+ },
+ "application/vnd.kde.karbon": {
+ "source": "iana",
+ "extensions": ["karbon"]
+ },
+ "application/vnd.kde.kchart": {
+ "source": "iana",
+ "extensions": ["chrt"]
+ },
+ "application/vnd.kde.kformula": {
+ "source": "iana",
+ "extensions": ["kfo"]
+ },
+ "application/vnd.kde.kivio": {
+ "source": "iana",
+ "extensions": ["flw"]
+ },
+ "application/vnd.kde.kontour": {
+ "source": "iana",
+ "extensions": ["kon"]
+ },
+ "application/vnd.kde.kpresenter": {
+ "source": "iana",
+ "extensions": ["kpr","kpt"]
+ },
+ "application/vnd.kde.kspread": {
+ "source": "iana",
+ "extensions": ["ksp"]
+ },
+ "application/vnd.kde.kword": {
+ "source": "iana",
+ "extensions": ["kwd","kwt"]
+ },
+ "application/vnd.kenameaapp": {
+ "source": "iana",
+ "extensions": ["htke"]
+ },
+ "application/vnd.kidspiration": {
+ "source": "iana",
+ "extensions": ["kia"]
+ },
+ "application/vnd.kinar": {
+ "source": "iana",
+ "extensions": ["kne","knp"]
+ },
+ "application/vnd.koan": {
+ "source": "iana",
+ "extensions": ["skp","skd","skt","skm"]
+ },
+ "application/vnd.kodak-descriptor": {
+ "source": "iana",
+ "extensions": ["sse"]
+ },
+ "application/vnd.las.las+xml": {
+ "source": "iana",
+ "extensions": ["lasxml"]
+ },
+ "application/vnd.liberty-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.llamagraphics.life-balance.desktop": {
+ "source": "iana",
+ "extensions": ["lbd"]
+ },
+ "application/vnd.llamagraphics.life-balance.exchange+xml": {
+ "source": "iana",
+ "extensions": ["lbe"]
+ },
+ "application/vnd.lotus-1-2-3": {
+ "source": "iana",
+ "extensions": ["123"]
+ },
+ "application/vnd.lotus-approach": {
+ "source": "iana",
+ "extensions": ["apr"]
+ },
+ "application/vnd.lotus-freelance": {
+ "source": "iana",
+ "extensions": ["pre"]
+ },
+ "application/vnd.lotus-notes": {
+ "source": "iana",
+ "extensions": ["nsf"]
+ },
+ "application/vnd.lotus-organizer": {
+ "source": "iana",
+ "extensions": ["org"]
+ },
+ "application/vnd.lotus-screencam": {
+ "source": "iana",
+ "extensions": ["scm"]
+ },
+ "application/vnd.lotus-wordpro": {
+ "source": "iana",
+ "extensions": ["lwp"]
+ },
+ "application/vnd.macports.portpkg": {
+ "source": "iana",
+ "extensions": ["portpkg"]
+ },
+ "application/vnd.marlin.drm.actiontoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.conftoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.license+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.mdcf": {
+ "source": "iana"
+ },
+ "application/vnd.mason+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.maxmind.maxmind-db": {
+ "source": "iana"
+ },
+ "application/vnd.mcd": {
+ "source": "iana",
+ "extensions": ["mcd"]
+ },
+ "application/vnd.medcalcdata": {
+ "source": "iana",
+ "extensions": ["mc1"]
+ },
+ "application/vnd.mediastation.cdkey": {
+ "source": "iana",
+ "extensions": ["cdkey"]
+ },
+ "application/vnd.meridian-slingshot": {
+ "source": "iana"
+ },
+ "application/vnd.mfer": {
+ "source": "iana",
+ "extensions": ["mwf"]
+ },
+ "application/vnd.mfmp": {
+ "source": "iana",
+ "extensions": ["mfm"]
+ },
+ "application/vnd.micrografx.flo": {
+ "source": "iana",
+ "extensions": ["flo"]
+ },
+ "application/vnd.micrografx.igx": {
+ "source": "iana",
+ "extensions": ["igx"]
+ },
+ "application/vnd.miele+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.mif": {
+ "source": "iana",
+ "extensions": ["mif"]
+ },
+ "application/vnd.minisoft-hp3000-save": {
+ "source": "iana"
+ },
+ "application/vnd.mitsubishi.misty-guard.trustweb": {
+ "source": "iana"
+ },
+ "application/vnd.mobius.daf": {
+ "source": "iana",
+ "extensions": ["daf"]
+ },
+ "application/vnd.mobius.dis": {
+ "source": "iana",
+ "extensions": ["dis"]
+ },
+ "application/vnd.mobius.mbk": {
+ "source": "iana",
+ "extensions": ["mbk"]
+ },
+ "application/vnd.mobius.mqy": {
+ "source": "iana",
+ "extensions": ["mqy"]
+ },
+ "application/vnd.mobius.msl": {
+ "source": "iana",
+ "extensions": ["msl"]
+ },
+ "application/vnd.mobius.plc": {
+ "source": "iana",
+ "extensions": ["plc"]
+ },
+ "application/vnd.mobius.txf": {
+ "source": "iana",
+ "extensions": ["txf"]
+ },
+ "application/vnd.mophun.application": {
+ "source": "iana",
+ "extensions": ["mpn"]
+ },
+ "application/vnd.mophun.certificate": {
+ "source": "iana",
+ "extensions": ["mpc"]
+ },
+ "application/vnd.motorola.flexsuite": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.adsi": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.fis": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.gotap": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.kmr": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.ttc": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.wem": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.iprm": {
+ "source": "iana"
+ },
+ "application/vnd.mozilla.xul+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xul"]
+ },
+ "application/vnd.ms-3mfdocument": {
+ "source": "iana"
+ },
+ "application/vnd.ms-artgalry": {
+ "source": "iana",
+ "extensions": ["cil"]
+ },
+ "application/vnd.ms-asf": {
+ "source": "iana"
+ },
+ "application/vnd.ms-cab-compressed": {
+ "source": "iana",
+ "extensions": ["cab"]
+ },
+ "application/vnd.ms-color.iccprofile": {
+ "source": "apache"
+ },
+ "application/vnd.ms-excel": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xls","xlm","xla","xlc","xlt","xlw"]
+ },
+ "application/vnd.ms-excel.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlam"]
+ },
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsb"]
+ },
+ "application/vnd.ms-excel.sheet.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsm"]
+ },
+ "application/vnd.ms-excel.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xltm"]
+ },
+ "application/vnd.ms-fontobject": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eot"]
+ },
+ "application/vnd.ms-htmlhelp": {
+ "source": "iana",
+ "extensions": ["chm"]
+ },
+ "application/vnd.ms-ims": {
+ "source": "iana",
+ "extensions": ["ims"]
+ },
+ "application/vnd.ms-lrm": {
+ "source": "iana",
+ "extensions": ["lrm"]
+ },
+ "application/vnd.ms-office.activex+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-officetheme": {
+ "source": "iana",
+ "extensions": ["thmx"]
+ },
+ "application/vnd.ms-opentype": {
+ "source": "apache",
+ "compressible": true
+ },
+ "application/vnd.ms-package.obfuscated-opentype": {
+ "source": "apache"
+ },
+ "application/vnd.ms-pki.seccat": {
+ "source": "apache",
+ "extensions": ["cat"]
+ },
+ "application/vnd.ms-pki.stl": {
+ "source": "apache",
+ "extensions": ["stl"]
+ },
+ "application/vnd.ms-playready.initiator+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-powerpoint": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ppt","pps","pot"]
+ },
+ "application/vnd.ms-powerpoint.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppam"]
+ },
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["pptm"]
+ },
+ "application/vnd.ms-powerpoint.slide.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["sldm"]
+ },
+ "application/vnd.ms-powerpoint.slideshow.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppsm"]
+ },
+ "application/vnd.ms-powerpoint.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["potm"]
+ },
+ "application/vnd.ms-printing.printticket+xml": {
+ "source": "apache"
+ },
+ "application/vnd.ms-project": {
+ "source": "iana",
+ "extensions": ["mpp","mpt"]
+ },
+ "application/vnd.ms-tnef": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.printerpairing": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-word.document.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["docm"]
+ },
+ "application/vnd.ms-word.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["dotm"]
+ },
+ "application/vnd.ms-works": {
+ "source": "iana",
+ "extensions": ["wps","wks","wcm","wdb"]
+ },
+ "application/vnd.ms-wpl": {
+ "source": "iana",
+ "extensions": ["wpl"]
+ },
+ "application/vnd.ms-xpsdocument": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xps"]
+ },
+ "application/vnd.msa-disk-image": {
+ "source": "iana"
+ },
+ "application/vnd.mseq": {
+ "source": "iana",
+ "extensions": ["mseq"]
+ },
+ "application/vnd.msign": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator.cif": {
+ "source": "iana"
+ },
+ "application/vnd.music-niff": {
+ "source": "iana"
+ },
+ "application/vnd.musician": {
+ "source": "iana",
+ "extensions": ["mus"]
+ },
+ "application/vnd.muvee.style": {
+ "source": "iana",
+ "extensions": ["msty"]
+ },
+ "application/vnd.mynfc": {
+ "source": "iana",
+ "extensions": ["taglet"]
+ },
+ "application/vnd.ncd.control": {
+ "source": "iana"
+ },
+ "application/vnd.ncd.reference": {
+ "source": "iana"
+ },
+ "application/vnd.nervana": {
+ "source": "iana"
+ },
+ "application/vnd.netfpx": {
+ "source": "iana"
+ },
+ "application/vnd.neurolanguage.nlu": {
+ "source": "iana",
+ "extensions": ["nlu"]
+ },
+ "application/vnd.nintendo.nitro.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nintendo.snes.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nitf": {
+ "source": "iana",
+ "extensions": ["ntf","nitf"]
+ },
+ "application/vnd.noblenet-directory": {
+ "source": "iana",
+ "extensions": ["nnd"]
+ },
+ "application/vnd.noblenet-sealer": {
+ "source": "iana",
+ "extensions": ["nns"]
+ },
+ "application/vnd.noblenet-web": {
+ "source": "iana",
+ "extensions": ["nnw"]
+ },
+ "application/vnd.nokia.catalogs": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.iptv.config+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.isds-radio-presets": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmarkcollection+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.ac+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.data": {
+ "source": "iana",
+ "extensions": ["ngdat"]
+ },
+ "application/vnd.nokia.n-gage.symbian.install": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.ncd": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.radio-preset": {
+ "source": "iana",
+ "extensions": ["rpst"]
+ },
+ "application/vnd.nokia.radio-presets": {
+ "source": "iana",
+ "extensions": ["rpss"]
+ },
+ "application/vnd.novadigm.edm": {
+ "source": "iana",
+ "extensions": ["edm"]
+ },
+ "application/vnd.novadigm.edx": {
+ "source": "iana",
+ "extensions": ["edx"]
+ },
+ "application/vnd.novadigm.ext": {
+ "source": "iana",
+ "extensions": ["ext"]
+ },
+ "application/vnd.ntt-local.content-share": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.file-transfer": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.ogw_remote-access": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_remote": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.oasis.opendocument.chart": {
+ "source": "iana",
+ "extensions": ["odc"]
+ },
+ "application/vnd.oasis.opendocument.chart-template": {
+ "source": "iana",
+ "extensions": ["otc"]
+ },
+ "application/vnd.oasis.opendocument.database": {
+ "source": "iana",
+ "extensions": ["odb"]
+ },
+ "application/vnd.oasis.opendocument.formula": {
+ "source": "iana",
+ "extensions": ["odf"]
+ },
+ "application/vnd.oasis.opendocument.formula-template": {
+ "source": "iana",
+ "extensions": ["odft"]
+ },
+ "application/vnd.oasis.opendocument.graphics": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odg"]
+ },
+ "application/vnd.oasis.opendocument.graphics-template": {
+ "source": "iana",
+ "extensions": ["otg"]
+ },
+ "application/vnd.oasis.opendocument.image": {
+ "source": "iana",
+ "extensions": ["odi"]
+ },
+ "application/vnd.oasis.opendocument.image-template": {
+ "source": "iana",
+ "extensions": ["oti"]
+ },
+ "application/vnd.oasis.opendocument.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odp"]
+ },
+ "application/vnd.oasis.opendocument.presentation-template": {
+ "source": "iana",
+ "extensions": ["otp"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ods"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet-template": {
+ "source": "iana",
+ "extensions": ["ots"]
+ },
+ "application/vnd.oasis.opendocument.text": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odt"]
+ },
+ "application/vnd.oasis.opendocument.text-master": {
+ "source": "iana",
+ "extensions": ["odm"]
+ },
+ "application/vnd.oasis.opendocument.text-template": {
+ "source": "iana",
+ "extensions": ["ott"]
+ },
+ "application/vnd.oasis.opendocument.text-web": {
+ "source": "iana",
+ "extensions": ["oth"]
+ },
+ "application/vnd.obn": {
+ "source": "iana"
+ },
+ "application/vnd.oftn.l10n+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.contentaccessdownload+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.contentaccessstreaming+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.cspg-hexbinary": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.svg+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.xhtml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.mippvcontrolmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.pae.gem": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdlist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.ueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.userprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.olpc-sugar": {
+ "source": "iana",
+ "extensions": ["xo"]
+ },
+ "application/vnd.oma-scws-config": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-request": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-response": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.associated-procedure-parameter+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.drm-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.imd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.ltkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.notification+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.provisioningtrigger": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgboot": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdu": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.simple-symbol-container": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.smartcard-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sprov+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.stkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-address-book+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-feature-handler+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-pcc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-subs-invite+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-user-prefs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcd": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcdc": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dd2+xml": {
+ "source": "iana",
+ "extensions": ["dd2"]
+ },
+ "application/vnd.oma.drm.risd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.group-usage-list+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.pal+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.detailed-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.final-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.groups+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.invocation-descriptor+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.optimized-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.push": {
+ "source": "iana"
+ },
+ "application/vnd.oma.scidm.messages+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.xcap-directory+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-email+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-file+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-folder+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omaloc-supl-init": {
+ "source": "iana"
+ },
+ "application/vnd.openeye.oeb": {
+ "source": "iana"
+ },
+ "application/vnd.openofficeorg.extension": {
+ "source": "apache",
+ "extensions": ["oxt"]
+ },
+ "application/vnd.openxmlformats-officedocument.custom-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawing+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.extended-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pptx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide": {
+ "source": "iana",
+ "extensions": ["sldx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": {
+ "source": "iana",
+ "extensions": ["ppsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template": {
+ "source": "apache",
+ "extensions": ["potx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xlsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template": {
+ "source": "apache",
+ "extensions": ["xltx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.theme+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.themeoverride+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.vmldrawing": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["docx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template": {
+ "source": "apache",
+ "extensions": ["dotx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.core-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.relationships+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oracle.resource+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.orange.indata": {
+ "source": "iana"
+ },
+ "application/vnd.osa.netdeploy": {
+ "source": "iana"
+ },
+ "application/vnd.osgeo.mapguide.package": {
+ "source": "iana",
+ "extensions": ["mgp"]
+ },
+ "application/vnd.osgi.bundle": {
+ "source": "iana"
+ },
+ "application/vnd.osgi.dp": {
+ "source": "iana",
+ "extensions": ["dp"]
+ },
+ "application/vnd.osgi.subsystem": {
+ "source": "iana",
+ "extensions": ["esa"]
+ },
+ "application/vnd.otps.ct-kip+xml": {
+ "source": "iana"
+ },
+ "application/vnd.palm": {
+ "source": "iana",
+ "extensions": ["pdb","pqa","oprc"]
+ },
+ "application/vnd.panoply": {
+ "source": "iana"
+ },
+ "application/vnd.paos+xml": {
+ "source": "iana"
+ },
+ "application/vnd.paos.xml": {
+ "source": "apache"
+ },
+ "application/vnd.pawaafile": {
+ "source": "iana",
+ "extensions": ["paw"]
+ },
+ "application/vnd.pcos": {
+ "source": "iana"
+ },
+ "application/vnd.pg.format": {
+ "source": "iana",
+ "extensions": ["str"]
+ },
+ "application/vnd.pg.osasli": {
+ "source": "iana",
+ "extensions": ["ei6"]
+ },
+ "application/vnd.piaccess.application-licence": {
+ "source": "iana"
+ },
+ "application/vnd.picsel": {
+ "source": "iana",
+ "extensions": ["efif"]
+ },
+ "application/vnd.pmi.widget": {
+ "source": "iana",
+ "extensions": ["wg"]
+ },
+ "application/vnd.poc.group-advertisement+xml": {
+ "source": "iana"
+ },
+ "application/vnd.pocketlearn": {
+ "source": "iana",
+ "extensions": ["plf"]
+ },
+ "application/vnd.powerbuilder6": {
+ "source": "iana",
+ "extensions": ["pbd"]
+ },
+ "application/vnd.powerbuilder6-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75-s": {
+ "source": "iana"
+ },
+ "application/vnd.preminet": {
+ "source": "iana"
+ },
+ "application/vnd.previewsystems.box": {
+ "source": "iana",
+ "extensions": ["box"]
+ },
+ "application/vnd.proteus.magazine": {
+ "source": "iana",
+ "extensions": ["mgz"]
+ },
+ "application/vnd.publishare-delta-tree": {
+ "source": "iana",
+ "extensions": ["qps"]
+ },
+ "application/vnd.pvi.ptid1": {
+ "source": "iana",
+ "extensions": ["ptid"]
+ },
+ "application/vnd.pwg-multiplexed": {
+ "source": "iana"
+ },
+ "application/vnd.pwg-xhtml-print+xml": {
+ "source": "iana"
+ },
+ "application/vnd.qualcomm.brew-app-res": {
+ "source": "iana"
+ },
+ "application/vnd.quark.quarkxpress": {
+ "source": "iana",
+ "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"]
+ },
+ "application/vnd.quobject-quoxdocument": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.moml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-stream+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-base+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-detect+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-group+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-speech+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-transform+xml": {
+ "source": "iana"
+ },
+ "application/vnd.rainstor.data": {
+ "source": "iana"
+ },
+ "application/vnd.rapid": {
+ "source": "iana"
+ },
+ "application/vnd.realvnc.bed": {
+ "source": "iana",
+ "extensions": ["bed"]
+ },
+ "application/vnd.recordare.musicxml": {
+ "source": "iana",
+ "extensions": ["mxl"]
+ },
+ "application/vnd.recordare.musicxml+xml": {
+ "source": "iana",
+ "extensions": ["musicxml"]
+ },
+ "application/vnd.renlearn.rlprint": {
+ "source": "iana"
+ },
+ "application/vnd.rig.cryptonote": {
+ "source": "iana",
+ "extensions": ["cryptonote"]
+ },
+ "application/vnd.rim.cod": {
+ "source": "apache",
+ "extensions": ["cod"]
+ },
+ "application/vnd.rn-realmedia": {
+ "source": "apache",
+ "extensions": ["rm"]
+ },
+ "application/vnd.rn-realmedia-vbr": {
+ "source": "apache",
+ "extensions": ["rmvb"]
+ },
+ "application/vnd.route66.link66+xml": {
+ "source": "iana",
+ "extensions": ["link66"]
+ },
+ "application/vnd.rs-274x": {
+ "source": "iana"
+ },
+ "application/vnd.ruckus.download": {
+ "source": "iana"
+ },
+ "application/vnd.s3sms": {
+ "source": "iana"
+ },
+ "application/vnd.sailingtracker.track": {
+ "source": "iana",
+ "extensions": ["st"]
+ },
+ "application/vnd.sbm.cid": {
+ "source": "iana"
+ },
+ "application/vnd.sbm.mid2": {
+ "source": "iana"
+ },
+ "application/vnd.scribus": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.3df": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.csf": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.doc": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.eml": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.mht": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.net": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.ppt": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.tiff": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.xls": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.html": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.pdf": {
+ "source": "iana"
+ },
+ "application/vnd.seemail": {
+ "source": "iana",
+ "extensions": ["see"]
+ },
+ "application/vnd.sema": {
+ "source": "iana",
+ "extensions": ["sema"]
+ },
+ "application/vnd.semd": {
+ "source": "iana",
+ "extensions": ["semd"]
+ },
+ "application/vnd.semf": {
+ "source": "iana",
+ "extensions": ["semf"]
+ },
+ "application/vnd.shana.informed.formdata": {
+ "source": "iana",
+ "extensions": ["ifm"]
+ },
+ "application/vnd.shana.informed.formtemplate": {
+ "source": "iana",
+ "extensions": ["itp"]
+ },
+ "application/vnd.shana.informed.interchange": {
+ "source": "iana",
+ "extensions": ["iif"]
+ },
+ "application/vnd.shana.informed.package": {
+ "source": "iana",
+ "extensions": ["ipk"]
+ },
+ "application/vnd.simtech-mindmapper": {
+ "source": "iana",
+ "extensions": ["twd","twds"]
+ },
+ "application/vnd.siren+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.smaf": {
+ "source": "iana",
+ "extensions": ["mmf"]
+ },
+ "application/vnd.smart.notebook": {
+ "source": "iana"
+ },
+ "application/vnd.smart.teacher": {
+ "source": "iana",
+ "extensions": ["teacher"]
+ },
+ "application/vnd.software602.filler.form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.software602.filler.form-xml-zip": {
+ "source": "iana"
+ },
+ "application/vnd.solent.sdkm+xml": {
+ "source": "iana",
+ "extensions": ["sdkm","sdkd"]
+ },
+ "application/vnd.spotfire.dxp": {
+ "source": "iana",
+ "extensions": ["dxp"]
+ },
+ "application/vnd.spotfire.sfs": {
+ "source": "iana",
+ "extensions": ["sfs"]
+ },
+ "application/vnd.sss-cod": {
+ "source": "iana"
+ },
+ "application/vnd.sss-dtf": {
+ "source": "iana"
+ },
+ "application/vnd.sss-ntf": {
+ "source": "iana"
+ },
+ "application/vnd.stardivision.calc": {
+ "source": "apache",
+ "extensions": ["sdc"]
+ },
+ "application/vnd.stardivision.draw": {
+ "source": "apache",
+ "extensions": ["sda"]
+ },
+ "application/vnd.stardivision.impress": {
+ "source": "apache",
+ "extensions": ["sdd"]
+ },
+ "application/vnd.stardivision.math": {
+ "source": "apache",
+ "extensions": ["smf"]
+ },
+ "application/vnd.stardivision.writer": {
+ "source": "apache",
+ "extensions": ["sdw","vor"]
+ },
+ "application/vnd.stardivision.writer-global": {
+ "source": "apache",
+ "extensions": ["sgl"]
+ },
+ "application/vnd.stepmania.package": {
+ "source": "iana",
+ "extensions": ["smzip"]
+ },
+ "application/vnd.stepmania.stepchart": {
+ "source": "iana",
+ "extensions": ["sm"]
+ },
+ "application/vnd.street-stream": {
+ "source": "iana"
+ },
+ "application/vnd.sun.wadl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.sun.xml.calc": {
+ "source": "apache",
+ "extensions": ["sxc"]
+ },
+ "application/vnd.sun.xml.calc.template": {
+ "source": "apache",
+ "extensions": ["stc"]
+ },
+ "application/vnd.sun.xml.draw": {
+ "source": "apache",
+ "extensions": ["sxd"]
+ },
+ "application/vnd.sun.xml.draw.template": {
+ "source": "apache",
+ "extensions": ["std"]
+ },
+ "application/vnd.sun.xml.impress": {
+ "source": "apache",
+ "extensions": ["sxi"]
+ },
+ "application/vnd.sun.xml.impress.template": {
+ "source": "apache",
+ "extensions": ["sti"]
+ },
+ "application/vnd.sun.xml.math": {
+ "source": "apache",
+ "extensions": ["sxm"]
+ },
+ "application/vnd.sun.xml.writer": {
+ "source": "apache",
+ "extensions": ["sxw"]
+ },
+ "application/vnd.sun.xml.writer.global": {
+ "source": "apache",
+ "extensions": ["sxg"]
+ },
+ "application/vnd.sun.xml.writer.template": {
+ "source": "apache",
+ "extensions": ["stw"]
+ },
+ "application/vnd.sus-calendar": {
+ "source": "iana",
+ "extensions": ["sus","susp"]
+ },
+ "application/vnd.svd": {
+ "source": "iana",
+ "extensions": ["svd"]
+ },
+ "application/vnd.swiftview-ics": {
+ "source": "iana"
+ },
+ "application/vnd.symbian.install": {
+ "source": "apache",
+ "extensions": ["sis","sisx"]
+ },
+ "application/vnd.syncml+xml": {
+ "source": "iana",
+ "extensions": ["xsm"]
+ },
+ "application/vnd.syncml.dm+wbxml": {
+ "source": "iana",
+ "extensions": ["bdm"]
+ },
+ "application/vnd.syncml.dm+xml": {
+ "source": "iana",
+ "extensions": ["xdm"]
+ },
+ "application/vnd.syncml.dm.notification": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.ds.notification": {
+ "source": "iana"
+ },
+ "application/vnd.tao.intent-module-archive": {
+ "source": "iana",
+ "extensions": ["tao"]
+ },
+ "application/vnd.tcpdump.pcap": {
+ "source": "iana",
+ "extensions": ["pcap","cap","dmp"]
+ },
+ "application/vnd.tmd.mediaflex.api+xml": {
+ "source": "iana"
+ },
+ "application/vnd.tmobile-livetv": {
+ "source": "iana",
+ "extensions": ["tmo"]
+ },
+ "application/vnd.trid.tpt": {
+ "source": "iana",
+ "extensions": ["tpt"]
+ },
+ "application/vnd.triscape.mxs": {
+ "source": "iana",
+ "extensions": ["mxs"]
+ },
+ "application/vnd.trueapp": {
+ "source": "iana",
+ "extensions": ["tra"]
+ },
+ "application/vnd.truedoc": {
+ "source": "iana"
+ },
+ "application/vnd.ubisoft.webplayer": {
+ "source": "iana"
+ },
+ "application/vnd.ufdl": {
+ "source": "iana",
+ "extensions": ["ufd","ufdl"]
+ },
+ "application/vnd.uiq.theme": {
+ "source": "iana",
+ "extensions": ["utz"]
+ },
+ "application/vnd.umajin": {
+ "source": "iana",
+ "extensions": ["umj"]
+ },
+ "application/vnd.unity": {
+ "source": "iana",
+ "extensions": ["unityweb"]
+ },
+ "application/vnd.uoml+xml": {
+ "source": "iana",
+ "extensions": ["uoml"]
+ },
+ "application/vnd.uplanet.alert": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.alert-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.signal": {
+ "source": "iana"
+ },
+ "application/vnd.valve.source.material": {
+ "source": "iana"
+ },
+ "application/vnd.vcx": {
+ "source": "iana",
+ "extensions": ["vcx"]
+ },
+ "application/vnd.vd-study": {
+ "source": "iana"
+ },
+ "application/vnd.vectorworks": {
+ "source": "iana"
+ },
+ "application/vnd.verimatrix.vcas": {
+ "source": "iana"
+ },
+ "application/vnd.vidsoft.vidconference": {
+ "source": "iana"
+ },
+ "application/vnd.visio": {
+ "source": "iana",
+ "extensions": ["vsd","vst","vss","vsw"]
+ },
+ "application/vnd.visionary": {
+ "source": "iana",
+ "extensions": ["vis"]
+ },
+ "application/vnd.vividence.scriptfile": {
+ "source": "iana"
+ },
+ "application/vnd.vsf": {
+ "source": "iana",
+ "extensions": ["vsf"]
+ },
+ "application/vnd.wap.sic": {
+ "source": "iana"
+ },
+ "application/vnd.wap.slc": {
+ "source": "iana"
+ },
+ "application/vnd.wap.wbxml": {
+ "source": "iana",
+ "extensions": ["wbxml"]
+ },
+ "application/vnd.wap.wmlc": {
+ "source": "iana",
+ "extensions": ["wmlc"]
+ },
+ "application/vnd.wap.wmlscriptc": {
+ "source": "iana",
+ "extensions": ["wmlsc"]
+ },
+ "application/vnd.webturbo": {
+ "source": "iana",
+ "extensions": ["wtb"]
+ },
+ "application/vnd.wfa.p2p": {
+ "source": "iana"
+ },
+ "application/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "application/vnd.windows.devicepairing": {
+ "source": "iana"
+ },
+ "application/vnd.wmc": {
+ "source": "iana"
+ },
+ "application/vnd.wmf.bootstrap": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica.package": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.player": {
+ "source": "iana",
+ "extensions": ["nbp"]
+ },
+ "application/vnd.wordperfect": {
+ "source": "iana",
+ "extensions": ["wpd"]
+ },
+ "application/vnd.wqd": {
+ "source": "iana",
+ "extensions": ["wqd"]
+ },
+ "application/vnd.wrq-hp3000-labelled": {
+ "source": "iana"
+ },
+ "application/vnd.wt.stf": {
+ "source": "iana",
+ "extensions": ["stf"]
+ },
+ "application/vnd.wv.csp+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.csp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.ssp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xacml+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.xara": {
+ "source": "iana",
+ "extensions": ["xar"]
+ },
+ "application/vnd.xfdl": {
+ "source": "iana",
+ "extensions": ["xfdl"]
+ },
+ "application/vnd.xfdl.webform": {
+ "source": "iana"
+ },
+ "application/vnd.xmi+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.cpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.dpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.plan": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.ppkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.xlim": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.hv-dic": {
+ "source": "iana",
+ "extensions": ["hvd"]
+ },
+ "application/vnd.yamaha.hv-script": {
+ "source": "iana",
+ "extensions": ["hvs"]
+ },
+ "application/vnd.yamaha.hv-voice": {
+ "source": "iana",
+ "extensions": ["hvp"]
+ },
+ "application/vnd.yamaha.openscoreformat": {
+ "source": "iana",
+ "extensions": ["osf"]
+ },
+ "application/vnd.yamaha.openscoreformat.osfpvg+xml": {
+ "source": "iana",
+ "extensions": ["osfpvg"]
+ },
+ "application/vnd.yamaha.remote-setup": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.smaf-audio": {
+ "source": "iana",
+ "extensions": ["saf"]
+ },
+ "application/vnd.yamaha.smaf-phrase": {
+ "source": "iana",
+ "extensions": ["spf"]
+ },
+ "application/vnd.yamaha.through-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.tunnel-udpencap": {
+ "source": "iana"
+ },
+ "application/vnd.yaoweme": {
+ "source": "iana"
+ },
+ "application/vnd.yellowriver-custom-menu": {
+ "source": "iana",
+ "extensions": ["cmp"]
+ },
+ "application/vnd.zul": {
+ "source": "iana",
+ "extensions": ["zir","zirz"]
+ },
+ "application/vnd.zzazz.deck+xml": {
+ "source": "iana",
+ "extensions": ["zaz"]
+ },
+ "application/voicexml+xml": {
+ "source": "iana",
+ "extensions": ["vxml"]
+ },
+ "application/vq-rtcpxr": {
+ "source": "iana"
+ },
+ "application/watcherinfo+xml": {
+ "source": "iana"
+ },
+ "application/whoispp-query": {
+ "source": "iana"
+ },
+ "application/whoispp-response": {
+ "source": "iana"
+ },
+ "application/widget": {
+ "source": "iana",
+ "extensions": ["wgt"]
+ },
+ "application/winhlp": {
+ "source": "apache",
+ "extensions": ["hlp"]
+ },
+ "application/wita": {
+ "source": "iana"
+ },
+ "application/wordperfect5.1": {
+ "source": "iana"
+ },
+ "application/wsdl+xml": {
+ "source": "iana",
+ "extensions": ["wsdl"]
+ },
+ "application/wspolicy+xml": {
+ "source": "iana",
+ "extensions": ["wspolicy"]
+ },
+ "application/x-7z-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["7z"]
+ },
+ "application/x-abiword": {
+ "source": "apache",
+ "extensions": ["abw"]
+ },
+ "application/x-ace-compressed": {
+ "source": "apache",
+ "extensions": ["ace"]
+ },
+ "application/x-amf": {
+ "source": "apache"
+ },
+ "application/x-apple-diskimage": {
+ "source": "apache",
+ "extensions": ["dmg"]
+ },
+ "application/x-authorware-bin": {
+ "source": "apache",
+ "extensions": ["aab","x32","u32","vox"]
+ },
+ "application/x-authorware-map": {
+ "source": "apache",
+ "extensions": ["aam"]
+ },
+ "application/x-authorware-seg": {
+ "source": "apache",
+ "extensions": ["aas"]
+ },
+ "application/x-bcpio": {
+ "source": "apache",
+ "extensions": ["bcpio"]
+ },
+ "application/x-bittorrent": {
+ "source": "apache",
+ "extensions": ["torrent"]
+ },
+ "application/x-blorb": {
+ "source": "apache",
+ "extensions": ["blb","blorb"]
+ },
+ "application/x-bzip": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz"]
+ },
+ "application/x-bzip2": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz2","boz"]
+ },
+ "application/x-cbr": {
+ "source": "apache",
+ "extensions": ["cbr","cba","cbt","cbz","cb7"]
+ },
+ "application/x-cdlink": {
+ "source": "apache",
+ "extensions": ["vcd"]
+ },
+ "application/x-cfs-compressed": {
+ "source": "apache",
+ "extensions": ["cfs"]
+ },
+ "application/x-chat": {
+ "source": "apache",
+ "extensions": ["chat"]
+ },
+ "application/x-chess-pgn": {
+ "source": "apache",
+ "extensions": ["pgn"]
+ },
+ "application/x-chrome-extension": {
+ "extensions": ["crx"]
+ },
+ "application/x-compress": {
+ "source": "apache"
+ },
+ "application/x-conference": {
+ "source": "apache",
+ "extensions": ["nsc"]
+ },
+ "application/x-cpio": {
+ "source": "apache",
+ "extensions": ["cpio"]
+ },
+ "application/x-csh": {
+ "source": "apache",
+ "extensions": ["csh"]
+ },
+ "application/x-deb": {
+ "compressible": false
+ },
+ "application/x-debian-package": {
+ "source": "apache",
+ "extensions": ["deb","udeb"]
+ },
+ "application/x-dgc-compressed": {
+ "source": "apache",
+ "extensions": ["dgc"]
+ },
+ "application/x-director": {
+ "source": "apache",
+ "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]
+ },
+ "application/x-doom": {
+ "source": "apache",
+ "extensions": ["wad"]
+ },
+ "application/x-dtbncx+xml": {
+ "source": "apache",
+ "extensions": ["ncx"]
+ },
+ "application/x-dtbook+xml": {
+ "source": "apache",
+ "extensions": ["dtb"]
+ },
+ "application/x-dtbresource+xml": {
+ "source": "apache",
+ "extensions": ["res"]
+ },
+ "application/x-dvi": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["dvi"]
+ },
+ "application/x-envoy": {
+ "source": "apache",
+ "extensions": ["evy"]
+ },
+ "application/x-eva": {
+ "source": "apache",
+ "extensions": ["eva"]
+ },
+ "application/x-font-bdf": {
+ "source": "apache",
+ "extensions": ["bdf"]
+ },
+ "application/x-font-dos": {
+ "source": "apache"
+ },
+ "application/x-font-framemaker": {
+ "source": "apache"
+ },
+ "application/x-font-ghostscript": {
+ "source": "apache",
+ "extensions": ["gsf"]
+ },
+ "application/x-font-libgrx": {
+ "source": "apache"
+ },
+ "application/x-font-linux-psf": {
+ "source": "apache",
+ "extensions": ["psf"]
+ },
+ "application/x-font-otf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "application/x-font-pcf": {
+ "source": "apache",
+ "extensions": ["pcf"]
+ },
+ "application/x-font-snf": {
+ "source": "apache",
+ "extensions": ["snf"]
+ },
+ "application/x-font-speedo": {
+ "source": "apache"
+ },
+ "application/x-font-sunos-news": {
+ "source": "apache"
+ },
+ "application/x-font-ttf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ttf","ttc"]
+ },
+ "application/x-font-type1": {
+ "source": "apache",
+ "extensions": ["pfa","pfb","pfm","afm"]
+ },
+ "application/x-font-vfont": {
+ "source": "apache"
+ },
+ "application/x-freearc": {
+ "source": "apache",
+ "extensions": ["arc"]
+ },
+ "application/x-futuresplash": {
+ "source": "apache",
+ "extensions": ["spl"]
+ },
+ "application/x-gca-compressed": {
+ "source": "apache",
+ "extensions": ["gca"]
+ },
+ "application/x-glulx": {
+ "source": "apache",
+ "extensions": ["ulx"]
+ },
+ "application/x-gnumeric": {
+ "source": "apache",
+ "extensions": ["gnumeric"]
+ },
+ "application/x-gramps-xml": {
+ "source": "apache",
+ "extensions": ["gramps"]
+ },
+ "application/x-gtar": {
+ "source": "apache",
+ "extensions": ["gtar"]
+ },
+ "application/x-gzip": {
+ "source": "apache"
+ },
+ "application/x-hdf": {
+ "source": "apache",
+ "extensions": ["hdf"]
+ },
+ "application/x-install-instructions": {
+ "source": "apache",
+ "extensions": ["install"]
+ },
+ "application/x-iso9660-image": {
+ "source": "apache",
+ "extensions": ["iso"]
+ },
+ "application/x-java-jnlp-file": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jnlp"]
+ },
+ "application/x-javascript": {
+ "compressible": true
+ },
+ "application/x-latex": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["latex"]
+ },
+ "application/x-lua-bytecode": {
+ "extensions": ["luac"]
+ },
+ "application/x-lzh-compressed": {
+ "source": "apache",
+ "extensions": ["lzh","lha"]
+ },
+ "application/x-mie": {
+ "source": "apache",
+ "extensions": ["mie"]
+ },
+ "application/x-mobipocket-ebook": {
+ "source": "apache",
+ "extensions": ["prc","mobi"]
+ },
+ "application/x-mpegurl": {
+ "compressible": false
+ },
+ "application/x-ms-application": {
+ "source": "apache",
+ "extensions": ["application"]
+ },
+ "application/x-ms-shortcut": {
+ "source": "apache",
+ "extensions": ["lnk"]
+ },
+ "application/x-ms-wmd": {
+ "source": "apache",
+ "extensions": ["wmd"]
+ },
+ "application/x-ms-wmz": {
+ "source": "apache",
+ "extensions": ["wmz"]
+ },
+ "application/x-ms-xbap": {
+ "source": "apache",
+ "extensions": ["xbap"]
+ },
+ "application/x-msaccess": {
+ "source": "apache",
+ "extensions": ["mdb"]
+ },
+ "application/x-msbinder": {
+ "source": "apache",
+ "extensions": ["obd"]
+ },
+ "application/x-mscardfile": {
+ "source": "apache",
+ "extensions": ["crd"]
+ },
+ "application/x-msclip": {
+ "source": "apache",
+ "extensions": ["clp"]
+ },
+ "application/x-msdownload": {
+ "source": "apache",
+ "extensions": ["exe","dll","com","bat","msi"]
+ },
+ "application/x-msmediaview": {
+ "source": "apache",
+ "extensions": ["mvb","m13","m14"]
+ },
+ "application/x-msmetafile": {
+ "source": "apache",
+ "extensions": ["wmf","wmz","emf","emz"]
+ },
+ "application/x-msmoney": {
+ "source": "apache",
+ "extensions": ["mny"]
+ },
+ "application/x-mspublisher": {
+ "source": "apache",
+ "extensions": ["pub"]
+ },
+ "application/x-msschedule": {
+ "source": "apache",
+ "extensions": ["scd"]
+ },
+ "application/x-msterminal": {
+ "source": "apache",
+ "extensions": ["trm"]
+ },
+ "application/x-mswrite": {
+ "source": "apache",
+ "extensions": ["wri"]
+ },
+ "application/x-netcdf": {
+ "source": "apache",
+ "extensions": ["nc","cdf"]
+ },
+ "application/x-nzb": {
+ "source": "apache",
+ "extensions": ["nzb"]
+ },
+ "application/x-pkcs12": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["p12","pfx"]
+ },
+ "application/x-pkcs7-certificates": {
+ "source": "apache",
+ "extensions": ["p7b","spc"]
+ },
+ "application/x-pkcs7-certreqresp": {
+ "source": "apache",
+ "extensions": ["p7r"]
+ },
+ "application/x-rar-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["rar"]
+ },
+ "application/x-research-info-systems": {
+ "source": "apache",
+ "extensions": ["ris"]
+ },
+ "application/x-sh": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["sh"]
+ },
+ "application/x-shar": {
+ "source": "apache",
+ "extensions": ["shar"]
+ },
+ "application/x-shockwave-flash": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["swf"]
+ },
+ "application/x-silverlight-app": {
+ "source": "apache",
+ "extensions": ["xap"]
+ },
+ "application/x-sql": {
+ "source": "apache",
+ "extensions": ["sql"]
+ },
+ "application/x-stuffit": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["sit"]
+ },
+ "application/x-stuffitx": {
+ "source": "apache",
+ "extensions": ["sitx"]
+ },
+ "application/x-subrip": {
+ "source": "apache",
+ "extensions": ["srt"]
+ },
+ "application/x-sv4cpio": {
+ "source": "apache",
+ "extensions": ["sv4cpio"]
+ },
+ "application/x-sv4crc": {
+ "source": "apache",
+ "extensions": ["sv4crc"]
+ },
+ "application/x-t3vm-image": {
+ "source": "apache",
+ "extensions": ["t3"]
+ },
+ "application/x-tads": {
+ "source": "apache",
+ "extensions": ["gam"]
+ },
+ "application/x-tar": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["tar"]
+ },
+ "application/x-tcl": {
+ "source": "apache",
+ "extensions": ["tcl"]
+ },
+ "application/x-tex": {
+ "source": "apache",
+ "extensions": ["tex"]
+ },
+ "application/x-tex-tfm": {
+ "source": "apache",
+ "extensions": ["tfm"]
+ },
+ "application/x-texinfo": {
+ "source": "apache",
+ "extensions": ["texinfo","texi"]
+ },
+ "application/x-tgif": {
+ "source": "apache",
+ "extensions": ["obj"]
+ },
+ "application/x-ustar": {
+ "source": "apache",
+ "extensions": ["ustar"]
+ },
+ "application/x-wais-source": {
+ "source": "apache",
+ "extensions": ["src"]
+ },
+ "application/x-web-app-manifest+json": {
+ "compressible": true,
+ "extensions": ["webapp"]
+ },
+ "application/x-www-form-urlencoded": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/x-x509-ca-cert": {
+ "source": "apache",
+ "extensions": ["der","crt"]
+ },
+ "application/x-xfig": {
+ "source": "apache",
+ "extensions": ["fig"]
+ },
+ "application/x-xliff+xml": {
+ "source": "apache",
+ "extensions": ["xlf"]
+ },
+ "application/x-xpinstall": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["xpi"]
+ },
+ "application/x-xz": {
+ "source": "apache",
+ "extensions": ["xz"]
+ },
+ "application/x-zmachine": {
+ "source": "apache",
+ "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"]
+ },
+ "application/x400-bp": {
+ "source": "iana"
+ },
+ "application/xacml+xml": {
+ "source": "iana"
+ },
+ "application/xaml+xml": {
+ "source": "apache",
+ "extensions": ["xaml"]
+ },
+ "application/xcap-att+xml": {
+ "source": "iana"
+ },
+ "application/xcap-caps+xml": {
+ "source": "iana"
+ },
+ "application/xcap-diff+xml": {
+ "source": "iana",
+ "extensions": ["xdf"]
+ },
+ "application/xcap-el+xml": {
+ "source": "iana"
+ },
+ "application/xcap-error+xml": {
+ "source": "iana"
+ },
+ "application/xcap-ns+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info-diff+xml": {
+ "source": "iana"
+ },
+ "application/xenc+xml": {
+ "source": "iana",
+ "extensions": ["xenc"]
+ },
+ "application/xhtml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xhtml","xht"]
+ },
+ "application/xhtml-voice+xml": {
+ "source": "iana"
+ },
+ "application/xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xml","xsl","xsd"]
+ },
+ "application/xml-dtd": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dtd"]
+ },
+ "application/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "application/xml-patch+xml": {
+ "source": "iana"
+ },
+ "application/xmpp+xml": {
+ "source": "iana"
+ },
+ "application/xop+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xop"]
+ },
+ "application/xproc+xml": {
+ "source": "apache",
+ "extensions": ["xpl"]
+ },
+ "application/xslt+xml": {
+ "source": "iana",
+ "extensions": ["xslt"]
+ },
+ "application/xspf+xml": {
+ "source": "apache",
+ "extensions": ["xspf"]
+ },
+ "application/xv+xml": {
+ "source": "iana",
+ "extensions": ["mxml","xhvml","xvml","xvm"]
+ },
+ "application/yang": {
+ "source": "iana",
+ "extensions": ["yang"]
+ },
+ "application/yin+xml": {
+ "source": "iana",
+ "extensions": ["yin"]
+ },
+ "application/zip": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["zip"]
+ },
+ "application/zlib": {
+ "source": "iana"
+ },
+ "audio/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "audio/32kadpcm": {
+ "source": "iana"
+ },
+ "audio/3gpp": {
+ "source": "iana"
+ },
+ "audio/3gpp2": {
+ "source": "iana"
+ },
+ "audio/ac3": {
+ "source": "iana"
+ },
+ "audio/adpcm": {
+ "source": "apache",
+ "extensions": ["adp"]
+ },
+ "audio/amr": {
+ "source": "iana"
+ },
+ "audio/amr-wb": {
+ "source": "iana"
+ },
+ "audio/amr-wb+": {
+ "source": "iana"
+ },
+ "audio/aptx": {
+ "source": "iana"
+ },
+ "audio/asc": {
+ "source": "iana"
+ },
+ "audio/atrac-advanced-lossless": {
+ "source": "iana"
+ },
+ "audio/atrac-x": {
+ "source": "iana"
+ },
+ "audio/atrac3": {
+ "source": "iana"
+ },
+ "audio/basic": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["au","snd"]
+ },
+ "audio/bv16": {
+ "source": "iana"
+ },
+ "audio/bv32": {
+ "source": "iana"
+ },
+ "audio/clearmode": {
+ "source": "iana"
+ },
+ "audio/cn": {
+ "source": "iana"
+ },
+ "audio/dat12": {
+ "source": "iana"
+ },
+ "audio/dls": {
+ "source": "iana"
+ },
+ "audio/dsr-es201108": {
+ "source": "iana"
+ },
+ "audio/dsr-es202050": {
+ "source": "iana"
+ },
+ "audio/dsr-es202211": {
+ "source": "iana"
+ },
+ "audio/dsr-es202212": {
+ "source": "iana"
+ },
+ "audio/dv": {
+ "source": "iana"
+ },
+ "audio/dvi4": {
+ "source": "iana"
+ },
+ "audio/eac3": {
+ "source": "iana"
+ },
+ "audio/encaprtp": {
+ "source": "iana"
+ },
+ "audio/evrc": {
+ "source": "iana"
+ },
+ "audio/evrc-qcp": {
+ "source": "iana"
+ },
+ "audio/evrc0": {
+ "source": "iana"
+ },
+ "audio/evrc1": {
+ "source": "iana"
+ },
+ "audio/evrcb": {
+ "source": "iana"
+ },
+ "audio/evrcb0": {
+ "source": "iana"
+ },
+ "audio/evrcb1": {
+ "source": "iana"
+ },
+ "audio/evrcnw": {
+ "source": "iana"
+ },
+ "audio/evrcnw0": {
+ "source": "iana"
+ },
+ "audio/evrcnw1": {
+ "source": "iana"
+ },
+ "audio/evrcwb": {
+ "source": "iana"
+ },
+ "audio/evrcwb0": {
+ "source": "iana"
+ },
+ "audio/evrcwb1": {
+ "source": "iana"
+ },
+ "audio/fwdred": {
+ "source": "iana"
+ },
+ "audio/g719": {
+ "source": "iana"
+ },
+ "audio/g722": {
+ "source": "iana"
+ },
+ "audio/g7221": {
+ "source": "iana"
+ },
+ "audio/g723": {
+ "source": "iana"
+ },
+ "audio/g726-16": {
+ "source": "iana"
+ },
+ "audio/g726-24": {
+ "source": "iana"
+ },
+ "audio/g726-32": {
+ "source": "iana"
+ },
+ "audio/g726-40": {
+ "source": "iana"
+ },
+ "audio/g728": {
+ "source": "iana"
+ },
+ "audio/g729": {
+ "source": "iana"
+ },
+ "audio/g7291": {
+ "source": "iana"
+ },
+ "audio/g729d": {
+ "source": "iana"
+ },
+ "audio/g729e": {
+ "source": "iana"
+ },
+ "audio/gsm": {
+ "source": "iana"
+ },
+ "audio/gsm-efr": {
+ "source": "iana"
+ },
+ "audio/gsm-hr-08": {
+ "source": "iana"
+ },
+ "audio/ilbc": {
+ "source": "iana"
+ },
+ "audio/ip-mr_v2.5": {
+ "source": "iana"
+ },
+ "audio/isac": {
+ "source": "apache"
+ },
+ "audio/l16": {
+ "source": "iana"
+ },
+ "audio/l20": {
+ "source": "iana"
+ },
+ "audio/l24": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/l8": {
+ "source": "iana"
+ },
+ "audio/lpc": {
+ "source": "iana"
+ },
+ "audio/midi": {
+ "source": "apache",
+ "extensions": ["mid","midi","kar","rmi"]
+ },
+ "audio/mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/mp4": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mp4a","m4a"]
+ },
+ "audio/mp4a-latm": {
+ "source": "iana"
+ },
+ "audio/mpa": {
+ "source": "iana"
+ },
+ "audio/mpa-robust": {
+ "source": "iana"
+ },
+ "audio/mpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"]
+ },
+ "audio/mpeg4-generic": {
+ "source": "iana"
+ },
+ "audio/musepack": {
+ "source": "apache"
+ },
+ "audio/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["oga","ogg","spx"]
+ },
+ "audio/opus": {
+ "source": "apache"
+ },
+ "audio/parityfec": {
+ "source": "iana"
+ },
+ "audio/pcma": {
+ "source": "iana"
+ },
+ "audio/pcma-wb": {
+ "source": "iana"
+ },
+ "audio/pcmu": {
+ "source": "iana"
+ },
+ "audio/pcmu-wb": {
+ "source": "iana"
+ },
+ "audio/prs.sid": {
+ "source": "iana"
+ },
+ "audio/qcelp": {
+ "source": "iana"
+ },
+ "audio/raptorfec": {
+ "source": "iana"
+ },
+ "audio/red": {
+ "source": "iana"
+ },
+ "audio/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "audio/rtp-midi": {
+ "source": "iana"
+ },
+ "audio/rtploopback": {
+ "source": "iana"
+ },
+ "audio/rtx": {
+ "source": "iana"
+ },
+ "audio/s3m": {
+ "source": "apache",
+ "extensions": ["s3m"]
+ },
+ "audio/silk": {
+ "source": "apache",
+ "extensions": ["sil"]
+ },
+ "audio/smv": {
+ "source": "iana"
+ },
+ "audio/smv-qcp": {
+ "source": "iana"
+ },
+ "audio/smv0": {
+ "source": "iana"
+ },
+ "audio/sp-midi": {
+ "source": "iana"
+ },
+ "audio/speex": {
+ "source": "iana"
+ },
+ "audio/t140c": {
+ "source": "iana"
+ },
+ "audio/t38": {
+ "source": "iana"
+ },
+ "audio/telephone-event": {
+ "source": "iana"
+ },
+ "audio/tone": {
+ "source": "iana"
+ },
+ "audio/uemclip": {
+ "source": "iana"
+ },
+ "audio/ulpfec": {
+ "source": "iana"
+ },
+ "audio/vdvi": {
+ "source": "iana"
+ },
+ "audio/vmr-wb": {
+ "source": "iana"
+ },
+ "audio/vnd.3gpp.iufp": {
+ "source": "iana"
+ },
+ "audio/vnd.4sb": {
+ "source": "iana"
+ },
+ "audio/vnd.audiokoz": {
+ "source": "iana"
+ },
+ "audio/vnd.celp": {
+ "source": "iana"
+ },
+ "audio/vnd.cisco.nse": {
+ "source": "iana"
+ },
+ "audio/vnd.cmles.radio-events": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.anp1": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.inf1": {
+ "source": "iana"
+ },
+ "audio/vnd.dece.audio": {
+ "source": "iana",
+ "extensions": ["uva","uvva"]
+ },
+ "audio/vnd.digital-winds": {
+ "source": "iana",
+ "extensions": ["eol"]
+ },
+ "audio/vnd.dlna.adts": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mlp": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mps": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2x": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2z": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pulse.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dra": {
+ "source": "iana",
+ "extensions": ["dra"]
+ },
+ "audio/vnd.dts": {
+ "source": "iana",
+ "extensions": ["dts"]
+ },
+ "audio/vnd.dts.hd": {
+ "source": "iana",
+ "extensions": ["dtshd"]
+ },
+ "audio/vnd.dvb.file": {
+ "source": "iana"
+ },
+ "audio/vnd.everad.plj": {
+ "source": "iana"
+ },
+ "audio/vnd.hns.audio": {
+ "source": "iana"
+ },
+ "audio/vnd.lucent.voice": {
+ "source": "iana",
+ "extensions": ["lvp"]
+ },
+ "audio/vnd.ms-playready.media.pya": {
+ "source": "iana",
+ "extensions": ["pya"]
+ },
+ "audio/vnd.nokia.mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/vnd.nortel.vbk": {
+ "source": "iana"
+ },
+ "audio/vnd.nuera.ecelp4800": {
+ "source": "iana",
+ "extensions": ["ecelp4800"]
+ },
+ "audio/vnd.nuera.ecelp7470": {
+ "source": "iana",
+ "extensions": ["ecelp7470"]
+ },
+ "audio/vnd.nuera.ecelp9600": {
+ "source": "iana",
+ "extensions": ["ecelp9600"]
+ },
+ "audio/vnd.octel.sbc": {
+ "source": "iana"
+ },
+ "audio/vnd.qcelp": {
+ "source": "iana"
+ },
+ "audio/vnd.rhetorex.32kadpcm": {
+ "source": "iana"
+ },
+ "audio/vnd.rip": {
+ "source": "iana",
+ "extensions": ["rip"]
+ },
+ "audio/vnd.rn-realaudio": {
+ "compressible": false
+ },
+ "audio/vnd.sealedmedia.softseal.mpeg": {
+ "source": "iana"
+ },
+ "audio/vnd.vmx.cvsd": {
+ "source": "iana"
+ },
+ "audio/vnd.wave": {
+ "compressible": false
+ },
+ "audio/vorbis": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/vorbis-config": {
+ "source": "iana"
+ },
+ "audio/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["weba"]
+ },
+ "audio/x-aac": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["aac"]
+ },
+ "audio/x-aiff": {
+ "source": "apache",
+ "extensions": ["aif","aiff","aifc"]
+ },
+ "audio/x-caf": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["caf"]
+ },
+ "audio/x-flac": {
+ "source": "apache",
+ "extensions": ["flac"]
+ },
+ "audio/x-matroska": {
+ "source": "apache",
+ "extensions": ["mka"]
+ },
+ "audio/x-mpegurl": {
+ "source": "apache",
+ "extensions": ["m3u"]
+ },
+ "audio/x-ms-wax": {
+ "source": "apache",
+ "extensions": ["wax"]
+ },
+ "audio/x-ms-wma": {
+ "source": "apache",
+ "extensions": ["wma"]
+ },
+ "audio/x-pn-realaudio": {
+ "source": "apache",
+ "extensions": ["ram","ra"]
+ },
+ "audio/x-pn-realaudio-plugin": {
+ "source": "apache",
+ "extensions": ["rmp"]
+ },
+ "audio/x-tta": {
+ "source": "apache"
+ },
+ "audio/x-wav": {
+ "source": "apache",
+ "extensions": ["wav"]
+ },
+ "audio/xm": {
+ "source": "apache",
+ "extensions": ["xm"]
+ },
+ "chemical/x-cdx": {
+ "source": "apache",
+ "extensions": ["cdx"]
+ },
+ "chemical/x-cif": {
+ "source": "apache",
+ "extensions": ["cif"]
+ },
+ "chemical/x-cmdf": {
+ "source": "apache",
+ "extensions": ["cmdf"]
+ },
+ "chemical/x-cml": {
+ "source": "apache",
+ "extensions": ["cml"]
+ },
+ "chemical/x-csml": {
+ "source": "apache",
+ "extensions": ["csml"]
+ },
+ "chemical/x-pdb": {
+ "source": "apache"
+ },
+ "chemical/x-xyz": {
+ "source": "apache",
+ "extensions": ["xyz"]
+ },
+ "font/opentype": {
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "image/bmp": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["bmp"]
+ },
+ "image/cgm": {
+ "source": "iana",
+ "extensions": ["cgm"]
+ },
+ "image/fits": {
+ "source": "iana"
+ },
+ "image/g3fax": {
+ "source": "iana",
+ "extensions": ["g3"]
+ },
+ "image/gif": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["gif"]
+ },
+ "image/ief": {
+ "source": "iana",
+ "extensions": ["ief"]
+ },
+ "image/jp2": {
+ "source": "iana"
+ },
+ "image/jpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["jpeg","jpg","jpe"]
+ },
+ "image/jpm": {
+ "source": "iana"
+ },
+ "image/jpx": {
+ "source": "iana"
+ },
+ "image/ktx": {
+ "source": "iana",
+ "extensions": ["ktx"]
+ },
+ "image/naplps": {
+ "source": "iana"
+ },
+ "image/pjpeg": {
+ "compressible": false
+ },
+ "image/png": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["png"]
+ },
+ "image/prs.btif": {
+ "source": "iana",
+ "extensions": ["btif"]
+ },
+ "image/prs.pti": {
+ "source": "iana"
+ },
+ "image/pwg-raster": {
+ "source": "iana"
+ },
+ "image/sgi": {
+ "source": "apache",
+ "extensions": ["sgi"]
+ },
+ "image/svg+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["svg","svgz"]
+ },
+ "image/t38": {
+ "source": "iana"
+ },
+ "image/tiff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["tiff","tif"]
+ },
+ "image/tiff-fx": {
+ "source": "iana"
+ },
+ "image/vnd.adobe.photoshop": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["psd"]
+ },
+ "image/vnd.airzip.accelerator.azv": {
+ "source": "iana"
+ },
+ "image/vnd.cns.inf2": {
+ "source": "iana"
+ },
+ "image/vnd.dece.graphic": {
+ "source": "iana",
+ "extensions": ["uvi","uvvi","uvg","uvvg"]
+ },
+ "image/vnd.djvu": {
+ "source": "iana",
+ "extensions": ["djvu","djv"]
+ },
+ "image/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "image/vnd.dwg": {
+ "source": "iana",
+ "extensions": ["dwg"]
+ },
+ "image/vnd.dxf": {
+ "source": "iana",
+ "extensions": ["dxf"]
+ },
+ "image/vnd.fastbidsheet": {
+ "source": "iana",
+ "extensions": ["fbs"]
+ },
+ "image/vnd.fpx": {
+ "source": "iana",
+ "extensions": ["fpx"]
+ },
+ "image/vnd.fst": {
+ "source": "iana",
+ "extensions": ["fst"]
+ },
+ "image/vnd.fujixerox.edmics-mmr": {
+ "source": "iana",
+ "extensions": ["mmr"]
+ },
+ "image/vnd.fujixerox.edmics-rlc": {
+ "source": "iana",
+ "extensions": ["rlc"]
+ },
+ "image/vnd.globalgraphics.pgb": {
+ "source": "iana"
+ },
+ "image/vnd.microsoft.icon": {
+ "source": "iana"
+ },
+ "image/vnd.mix": {
+ "source": "iana"
+ },
+ "image/vnd.ms-modi": {
+ "source": "iana",
+ "extensions": ["mdi"]
+ },
+ "image/vnd.ms-photo": {
+ "source": "apache",
+ "extensions": ["wdp"]
+ },
+ "image/vnd.net-fpx": {
+ "source": "iana",
+ "extensions": ["npx"]
+ },
+ "image/vnd.radiance": {
+ "source": "iana"
+ },
+ "image/vnd.sealed.png": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.gif": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.jpg": {
+ "source": "iana"
+ },
+ "image/vnd.svf": {
+ "source": "iana"
+ },
+ "image/vnd.tencent.tap": {
+ "source": "iana"
+ },
+ "image/vnd.valve.source.texture": {
+ "source": "iana"
+ },
+ "image/vnd.wap.wbmp": {
+ "source": "iana",
+ "extensions": ["wbmp"]
+ },
+ "image/vnd.xiff": {
+ "source": "iana",
+ "extensions": ["xif"]
+ },
+ "image/webp": {
+ "source": "apache",
+ "extensions": ["webp"]
+ },
+ "image/x-3ds": {
+ "source": "apache",
+ "extensions": ["3ds"]
+ },
+ "image/x-cmu-raster": {
+ "source": "apache",
+ "extensions": ["ras"]
+ },
+ "image/x-cmx": {
+ "source": "apache",
+ "extensions": ["cmx"]
+ },
+ "image/x-freehand": {
+ "source": "apache",
+ "extensions": ["fh","fhc","fh4","fh5","fh7"]
+ },
+ "image/x-icon": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ico"]
+ },
+ "image/x-mrsid-image": {
+ "source": "apache",
+ "extensions": ["sid"]
+ },
+ "image/x-pcx": {
+ "source": "apache",
+ "extensions": ["pcx"]
+ },
+ "image/x-pict": {
+ "source": "apache",
+ "extensions": ["pic","pct"]
+ },
+ "image/x-portable-anymap": {
+ "source": "apache",
+ "extensions": ["pnm"]
+ },
+ "image/x-portable-bitmap": {
+ "source": "apache",
+ "extensions": ["pbm"]
+ },
+ "image/x-portable-graymap": {
+ "source": "apache",
+ "extensions": ["pgm"]
+ },
+ "image/x-portable-pixmap": {
+ "source": "apache",
+ "extensions": ["ppm"]
+ },
+ "image/x-rgb": {
+ "source": "apache",
+ "extensions": ["rgb"]
+ },
+ "image/x-tga": {
+ "source": "apache",
+ "extensions": ["tga"]
+ },
+ "image/x-xbitmap": {
+ "source": "apache",
+ "extensions": ["xbm"]
+ },
+ "image/x-xcf": {
+ "compressible": false
+ },
+ "image/x-xpixmap": {
+ "source": "apache",
+ "extensions": ["xpm"]
+ },
+ "image/x-xwindowdump": {
+ "source": "apache",
+ "extensions": ["xwd"]
+ },
+ "message/cpim": {
+ "source": "iana"
+ },
+ "message/delivery-status": {
+ "source": "iana"
+ },
+ "message/disposition-notification": {
+ "source": "iana"
+ },
+ "message/external-body": {
+ "source": "iana"
+ },
+ "message/feedback-report": {
+ "source": "iana"
+ },
+ "message/global": {
+ "source": "iana"
+ },
+ "message/global-delivery-status": {
+ "source": "iana"
+ },
+ "message/global-disposition-notification": {
+ "source": "iana"
+ },
+ "message/global-headers": {
+ "source": "iana"
+ },
+ "message/http": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/imdn+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "message/news": {
+ "source": "iana"
+ },
+ "message/partial": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/rfc822": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eml","mime"]
+ },
+ "message/s-http": {
+ "source": "iana"
+ },
+ "message/sip": {
+ "source": "iana"
+ },
+ "message/sipfrag": {
+ "source": "iana"
+ },
+ "message/tracking-status": {
+ "source": "iana"
+ },
+ "message/vnd.si.simp": {
+ "source": "iana"
+ },
+ "message/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "model/iges": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["igs","iges"]
+ },
+ "model/mesh": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["msh","mesh","silo"]
+ },
+ "model/vnd.collada+xml": {
+ "source": "iana",
+ "extensions": ["dae"]
+ },
+ "model/vnd.dwf": {
+ "source": "iana",
+ "extensions": ["dwf"]
+ },
+ "model/vnd.flatland.3dml": {
+ "source": "iana"
+ },
+ "model/vnd.gdl": {
+ "source": "iana",
+ "extensions": ["gdl"]
+ },
+ "model/vnd.gs-gdl": {
+ "source": "apache"
+ },
+ "model/vnd.gs.gdl": {
+ "source": "iana"
+ },
+ "model/vnd.gtw": {
+ "source": "iana",
+ "extensions": ["gtw"]
+ },
+ "model/vnd.moml+xml": {
+ "source": "iana"
+ },
+ "model/vnd.mts": {
+ "source": "iana",
+ "extensions": ["mts"]
+ },
+ "model/vnd.opengex": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.binary": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.text": {
+ "source": "iana"
+ },
+ "model/vnd.valve.source.compiled-map": {
+ "source": "iana"
+ },
+ "model/vnd.vtu": {
+ "source": "iana",
+ "extensions": ["vtu"]
+ },
+ "model/vrml": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["wrl","vrml"]
+ },
+ "model/x3d+binary": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3db","x3dbz"]
+ },
+ "model/x3d+fastinfoset": {
+ "source": "iana"
+ },
+ "model/x3d+vrml": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3dv","x3dvz"]
+ },
+ "model/x3d+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["x3d","x3dz"]
+ },
+ "model/x3d-vrml": {
+ "source": "iana"
+ },
+ "multipart/alternative": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/appledouble": {
+ "source": "iana"
+ },
+ "multipart/byteranges": {
+ "source": "iana"
+ },
+ "multipart/digest": {
+ "source": "iana"
+ },
+ "multipart/encrypted": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/form-data": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/header-set": {
+ "source": "iana"
+ },
+ "multipart/mixed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/parallel": {
+ "source": "iana"
+ },
+ "multipart/related": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/report": {
+ "source": "iana"
+ },
+ "multipart/signed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/voice-message": {
+ "source": "iana"
+ },
+ "multipart/x-mixed-replace": {
+ "source": "iana"
+ },
+ "text/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "text/cache-manifest": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["appcache","manifest"]
+ },
+ "text/calendar": {
+ "source": "iana",
+ "extensions": ["ics","ifb"]
+ },
+ "text/calender": {
+ "compressible": true
+ },
+ "text/cmd": {
+ "compressible": true
+ },
+ "text/coffeescript": {
+ "extensions": ["coffee"]
+ },
+ "text/css": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["css"]
+ },
+ "text/csv": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["csv"]
+ },
+ "text/csv-schema": {
+ "source": "iana"
+ },
+ "text/directory": {
+ "source": "iana"
+ },
+ "text/dns": {
+ "source": "iana"
+ },
+ "text/ecmascript": {
+ "source": "iana"
+ },
+ "text/encaprtp": {
+ "source": "iana"
+ },
+ "text/enriched": {
+ "source": "iana"
+ },
+ "text/fwdred": {
+ "source": "iana"
+ },
+ "text/grammar-ref-list": {
+ "source": "iana"
+ },
+ "text/hjson": {
+ "extensions": ["hjson"]
+ },
+ "text/html": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["html","htm"]
+ },
+ "text/jade": {
+ "extensions": ["jade"]
+ },
+ "text/javascript": {
+ "source": "iana",
+ "compressible": true
+ },
+ "text/jcr-cnd": {
+ "source": "iana"
+ },
+ "text/jsx": {
+ "compressible": true,
+ "extensions": ["jsx"]
+ },
+ "text/less": {
+ "extensions": ["less"]
+ },
+ "text/markdown": {
+ "source": "iana"
+ },
+ "text/mizar": {
+ "source": "iana"
+ },
+ "text/n3": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["n3"]
+ },
+ "text/parameters": {
+ "source": "iana"
+ },
+ "text/parityfec": {
+ "source": "iana"
+ },
+ "text/plain": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["txt","text","conf","def","list","log","in","ini"]
+ },
+ "text/provenance-notation": {
+ "source": "iana"
+ },
+ "text/prs.fallenstein.rst": {
+ "source": "iana"
+ },
+ "text/prs.lines.tag": {
+ "source": "iana",
+ "extensions": ["dsc"]
+ },
+ "text/raptorfec": {
+ "source": "iana"
+ },
+ "text/red": {
+ "source": "iana"
+ },
+ "text/rfc822-headers": {
+ "source": "iana"
+ },
+ "text/richtext": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtx"]
+ },
+ "text/rtf": {
+ "source": "iana"
+ },
+ "text/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "text/rtploopback": {
+ "source": "iana"
+ },
+ "text/rtx": {
+ "source": "iana"
+ },
+ "text/sgml": {
+ "source": "iana",
+ "extensions": ["sgml","sgm"]
+ },
+ "text/stylus": {
+ "extensions": ["stylus","styl"]
+ },
+ "text/t140": {
+ "source": "iana"
+ },
+ "text/tab-separated-values": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["tsv"]
+ },
+ "text/troff": {
+ "source": "iana",
+ "extensions": ["t","tr","roff","man","me","ms"]
+ },
+ "text/turtle": {
+ "source": "iana",
+ "extensions": ["ttl"]
+ },
+ "text/ulpfec": {
+ "source": "iana"
+ },
+ "text/uri-list": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["uri","uris","urls"]
+ },
+ "text/vcard": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["vcard"]
+ },
+ "text/vnd.a": {
+ "source": "iana"
+ },
+ "text/vnd.abc": {
+ "source": "iana"
+ },
+ "text/vnd.curl": {
+ "source": "iana",
+ "extensions": ["curl"]
+ },
+ "text/vnd.curl.dcurl": {
+ "source": "apache",
+ "extensions": ["dcurl"]
+ },
+ "text/vnd.curl.mcurl": {
+ "source": "apache",
+ "extensions": ["mcurl"]
+ },
+ "text/vnd.curl.scurl": {
+ "source": "apache",
+ "extensions": ["scurl"]
+ },
+ "text/vnd.debian.copyright": {
+ "source": "iana"
+ },
+ "text/vnd.dmclientscript": {
+ "source": "iana"
+ },
+ "text/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "text/vnd.esmertec.theme-descriptor": {
+ "source": "iana"
+ },
+ "text/vnd.fly": {
+ "source": "iana",
+ "extensions": ["fly"]
+ },
+ "text/vnd.fmi.flexstor": {
+ "source": "iana",
+ "extensions": ["flx"]
+ },
+ "text/vnd.graphviz": {
+ "source": "iana",
+ "extensions": ["gv"]
+ },
+ "text/vnd.in3d.3dml": {
+ "source": "iana",
+ "extensions": ["3dml"]
+ },
+ "text/vnd.in3d.spot": {
+ "source": "iana",
+ "extensions": ["spot"]
+ },
+ "text/vnd.iptc.newsml": {
+ "source": "iana"
+ },
+ "text/vnd.iptc.nitf": {
+ "source": "iana"
+ },
+ "text/vnd.latex-z": {
+ "source": "iana"
+ },
+ "text/vnd.motorola.reflex": {
+ "source": "iana"
+ },
+ "text/vnd.ms-mediapackage": {
+ "source": "iana"
+ },
+ "text/vnd.net2phone.commcenter.command": {
+ "source": "iana"
+ },
+ "text/vnd.radisys.msml-basic-layout": {
+ "source": "iana"
+ },
+ "text/vnd.si.uricatalogue": {
+ "source": "iana"
+ },
+ "text/vnd.sun.j2me.app-descriptor": {
+ "source": "iana",
+ "extensions": ["jad"]
+ },
+ "text/vnd.trolltech.linguist": {
+ "source": "iana"
+ },
+ "text/vnd.wap.si": {
+ "source": "iana"
+ },
+ "text/vnd.wap.sl": {
+ "source": "iana"
+ },
+ "text/vnd.wap.wml": {
+ "source": "iana",
+ "extensions": ["wml"]
+ },
+ "text/vnd.wap.wmlscript": {
+ "source": "iana",
+ "extensions": ["wmls"]
+ },
+ "text/vtt": {
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["vtt"]
+ },
+ "text/x-asm": {
+ "source": "apache",
+ "extensions": ["s","asm"]
+ },
+ "text/x-c": {
+ "source": "apache",
+ "extensions": ["c","cc","cxx","cpp","h","hh","dic"]
+ },
+ "text/x-component": {
+ "extensions": ["htc"]
+ },
+ "text/x-fortran": {
+ "source": "apache",
+ "extensions": ["f","for","f77","f90"]
+ },
+ "text/x-gwt-rpc": {
+ "compressible": true
+ },
+ "text/x-handlebars-template": {
+ "extensions": ["hbs"]
+ },
+ "text/x-java-source": {
+ "source": "apache",
+ "extensions": ["java"]
+ },
+ "text/x-jquery-tmpl": {
+ "compressible": true
+ },
+ "text/x-lua": {
+ "extensions": ["lua"]
+ },
+ "text/x-markdown": {
+ "compressible": true,
+ "extensions": ["markdown","md","mkd"]
+ },
+ "text/x-nfo": {
+ "source": "apache",
+ "extensions": ["nfo"]
+ },
+ "text/x-opml": {
+ "source": "apache",
+ "extensions": ["opml"]
+ },
+ "text/x-pascal": {
+ "source": "apache",
+ "extensions": ["p","pas"]
+ },
+ "text/x-sass": {
+ "extensions": ["sass"]
+ },
+ "text/x-scss": {
+ "extensions": ["scss"]
+ },
+ "text/x-setext": {
+ "source": "apache",
+ "extensions": ["etx"]
+ },
+ "text/x-sfv": {
+ "source": "apache",
+ "extensions": ["sfv"]
+ },
+ "text/x-uuencode": {
+ "source": "apache",
+ "extensions": ["uu"]
+ },
+ "text/x-vcalendar": {
+ "source": "apache",
+ "extensions": ["vcs"]
+ },
+ "text/x-vcard": {
+ "source": "apache",
+ "extensions": ["vcf"]
+ },
+ "text/xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "text/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "text/yaml": {
+ "extensions": ["yaml","yml"]
+ },
+ "video/1d-interleaved-parityfec": {
+ "source": "apache"
+ },
+ "video/3gpp": {
+ "source": "apache",
+ "extensions": ["3gp"]
+ },
+ "video/3gpp-tt": {
+ "source": "apache"
+ },
+ "video/3gpp2": {
+ "source": "apache",
+ "extensions": ["3g2"]
+ },
+ "video/bmpeg": {
+ "source": "apache"
+ },
+ "video/bt656": {
+ "source": "apache"
+ },
+ "video/celb": {
+ "source": "apache"
+ },
+ "video/dv": {
+ "source": "apache"
+ },
+ "video/h261": {
+ "source": "apache",
+ "extensions": ["h261"]
+ },
+ "video/h263": {
+ "source": "apache",
+ "extensions": ["h263"]
+ },
+ "video/h263-1998": {
+ "source": "apache"
+ },
+ "video/h263-2000": {
+ "source": "apache"
+ },
+ "video/h264": {
+ "source": "apache",
+ "extensions": ["h264"]
+ },
+ "video/h264-rcdo": {
+ "source": "apache"
+ },
+ "video/h264-svc": {
+ "source": "apache"
+ },
+ "video/jpeg": {
+ "source": "apache",
+ "extensions": ["jpgv"]
+ },
+ "video/jpeg2000": {
+ "source": "apache"
+ },
+ "video/jpm": {
+ "source": "apache",
+ "extensions": ["jpm","jpgm"]
+ },
+ "video/mj2": {
+ "source": "apache",
+ "extensions": ["mj2","mjp2"]
+ },
+ "video/mp1s": {
+ "source": "apache"
+ },
+ "video/mp2p": {
+ "source": "apache"
+ },
+ "video/mp2t": {
+ "source": "apache",
+ "extensions": ["ts"]
+ },
+ "video/mp4": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mp4","mp4v","mpg4"]
+ },
+ "video/mp4v-es": {
+ "source": "apache"
+ },
+ "video/mpeg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mpeg","mpg","mpe","m1v","m2v"]
+ },
+ "video/mpeg4-generic": {
+ "source": "apache"
+ },
+ "video/mpv": {
+ "source": "apache"
+ },
+ "video/nv": {
+ "source": "apache"
+ },
+ "video/ogg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ogv"]
+ },
+ "video/parityfec": {
+ "source": "apache"
+ },
+ "video/pointer": {
+ "source": "apache"
+ },
+ "video/quicktime": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["qt","mov"]
+ },
+ "video/raw": {
+ "source": "apache"
+ },
+ "video/rtp-enc-aescm128": {
+ "source": "apache"
+ },
+ "video/rtx": {
+ "source": "apache"
+ },
+ "video/smpte292m": {
+ "source": "apache"
+ },
+ "video/ulpfec": {
+ "source": "apache"
+ },
+ "video/vc1": {
+ "source": "apache"
+ },
+ "video/vnd.cctv": {
+ "source": "apache"
+ },
+ "video/vnd.dece.hd": {
+ "source": "apache",
+ "extensions": ["uvh","uvvh"]
+ },
+ "video/vnd.dece.mobile": {
+ "source": "apache",
+ "extensions": ["uvm","uvvm"]
+ },
+ "video/vnd.dece.mp4": {
+ "source": "apache"
+ },
+ "video/vnd.dece.pd": {
+ "source": "apache",
+ "extensions": ["uvp","uvvp"]
+ },
+ "video/vnd.dece.sd": {
+ "source": "apache",
+ "extensions": ["uvs","uvvs"]
+ },
+ "video/vnd.dece.video": {
+ "source": "apache",
+ "extensions": ["uvv","uvvv"]
+ },
+ "video/vnd.directv.mpeg": {
+ "source": "apache"
+ },
+ "video/vnd.directv.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dlna.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dvb.file": {
+ "source": "apache",
+ "extensions": ["dvb"]
+ },
+ "video/vnd.fvt": {
+ "source": "apache",
+ "extensions": ["fvt"]
+ },
+ "video/vnd.hns.video": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsavc": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsmpeg2": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.video": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.videop": {
+ "source": "apache"
+ },
+ "video/vnd.mpegurl": {
+ "source": "apache",
+ "extensions": ["mxu","m4u"]
+ },
+ "video/vnd.ms-playready.media.pyv": {
+ "source": "apache",
+ "extensions": ["pyv"]
+ },
+ "video/vnd.nokia.interleaved-multimedia": {
+ "source": "apache"
+ },
+ "video/vnd.nokia.videovoip": {
+ "source": "apache"
+ },
+ "video/vnd.objectvideo": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg1": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg4": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.swf": {
+ "source": "apache"
+ },
+ "video/vnd.sealedmedia.softseal.mov": {
+ "source": "apache"
+ },
+ "video/vnd.uvvu.mp4": {
+ "source": "apache",
+ "extensions": ["uvu","uvvu"]
+ },
+ "video/vnd.vivo": {
+ "source": "apache",
+ "extensions": ["viv"]
+ },
+ "video/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["webm"]
+ },
+ "video/x-f4v": {
+ "source": "apache",
+ "extensions": ["f4v"]
+ },
+ "video/x-fli": {
+ "source": "apache",
+ "extensions": ["fli"]
+ },
+ "video/x-flv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["flv"]
+ },
+ "video/x-m4v": {
+ "source": "apache",
+ "extensions": ["m4v"]
+ },
+ "video/x-matroska": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mkv","mk3d","mks"]
+ },
+ "video/x-mng": {
+ "source": "apache",
+ "extensions": ["mng"]
+ },
+ "video/x-ms-asf": {
+ "source": "apache",
+ "extensions": ["asf","asx"]
+ },
+ "video/x-ms-vob": {
+ "source": "apache",
+ "extensions": ["vob"]
+ },
+ "video/x-ms-wm": {
+ "source": "apache",
+ "extensions": ["wm"]
+ },
+ "video/x-ms-wmv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["wmv"]
+ },
+ "video/x-ms-wmx": {
+ "source": "apache",
+ "extensions": ["wmx"]
+ },
+ "video/x-ms-wvx": {
+ "source": "apache",
+ "extensions": ["wvx"]
+ },
+ "video/x-msvideo": {
+ "source": "apache",
+ "extensions": ["avi"]
+ },
+ "video/x-sgi-movie": {
+ "source": "apache",
+ "extensions": ["movie"]
+ },
+ "video/x-smv": {
+ "source": "apache",
+ "extensions": ["smv"]
+ },
+ "x-conference/x-cooltalk": {
+ "source": "apache",
+ "extensions": ["ice"]
+ },
+ "x-shader/x-fragment": {
+ "compressible": true
+ },
+ "x-shader/x-vertex": {
+ "compressible": true
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/index.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/index.js
new file mode 100644
index 0000000..551031f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/index.js
@@ -0,0 +1,11 @@
+/*!
+ * mime-db
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = require('./db.json')
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/package.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/package.json
new file mode 100644
index 0000000..135ef18
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/node_modules/mime-db/package.json
@@ -0,0 +1,93 @@
+{
+ "name": "mime-db",
+ "description": "Media Type Database",
+ "version": "1.7.0",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "db",
+ "type",
+ "types",
+ "database",
+ "charset",
+ "charsets"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/mime-db"
+ },
+ "devDependencies": {
+ "co": "4",
+ "cogent": "1",
+ "csv-parse": "0",
+ "gnode": "0.1.0",
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.4",
+ "raw-body": "~1.3.2",
+ "stream-to-array": "2"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "db.json",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "build": "node scripts/build",
+ "fetch": "gnode scripts/extensions && gnode scripts/types",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "update": "npm run fetch && npm run build"
+ },
+ "gitHead": "972cc3ed48530ab7aca7a155bf2dbd1b13aa8f86",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-db/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-db",
+ "_id": "mime-db@1.7.0",
+ "_shasum": "36cf66a6c52ea71827bde287f77c254f5ef1b8d3",
+ "_from": "mime-db@~1.7.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "36cf66a6c52ea71827bde287f77c254f5ef1b8d3",
+ "tarball": "http://registry.npmjs.org/mime-db/-/mime-db-1.7.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.7.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/package.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/package.json
new file mode 100644
index 0000000..9b5b766
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/mime-types/package.json
@@ -0,0 +1,84 @@
+{
+ "name": "mime-types",
+ "description": "The ultimate javascript content-type utility.",
+ "version": "2.0.9",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jeremiah Senkpiel",
+ "email": "fishrock123@rocketmail.com",
+ "url": "https://searchbeam.jit.su"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "types"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/mime-types"
+ },
+ "dependencies": {
+ "mime-db": "~1.7.0"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec test/test.js",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
+ },
+ "gitHead": "1c6d55da440b6a9d2c0e9c2faac98e6b1be47fc7",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-types/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-types",
+ "_id": "mime-types@2.0.9",
+ "_shasum": "e8449aff27b1245ddc6641b524439ae80c4b78a6",
+ "_from": "mime-types@~2.0.9",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e8449aff27b1245ddc6641b524439ae80c4b78a6",
+ "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-2.0.9.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.9.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/.npmignore b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/.npmignore
new file mode 100644
index 0000000..85c82a5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/.npmignore
@@ -0,0 +1,4 @@
+benchmark/
+coverage/
+test/
+.travis.yml
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/HISTORY.md
new file mode 100644
index 0000000..65a0860
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/HISTORY.md
@@ -0,0 +1,42 @@
+1.3.0 / 2014-08-09
+==================
+
+ * Add `parseurl.original` for parsing `req.originalUrl` with fallback
+ * Return `undefined` if `req.url` is `undefined`
+
+1.2.0 / 2014-07-21
+==================
+
+ * Cache URLs based on original value
+ * Remove no-longer-needed URL mis-parse work-around
+ * Simplify the "fast-path" `RegExp`
+
+1.1.3 / 2014-07-08
+==================
+
+ * Fix typo
+
+1.1.2 / 2014-07-08
+==================
+
+ * Seriously fix Node.js 0.8 compatibility
+
+1.1.1 / 2014-07-08
+==================
+
+ * Fix Node.js 0.8 compatibility
+
+1.1.0 / 2014-07-08
+==================
+
+ * Incorporate URL href-only parse fast-path
+
+1.0.1 / 2014-03-08
+==================
+
+ * Add missing `require`
+
+1.0.0 / 2014-03-08
+==================
+
+ * Genesis from `connect`
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/LICENSE b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/LICENSE
new file mode 100644
index 0000000..ec7dfe7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/LICENSE
@@ -0,0 +1,24 @@
+
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/README.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/README.md
new file mode 100644
index 0000000..0db1d02
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/README.md
@@ -0,0 +1,107 @@
+# parseurl
+
+[![NPM version](https://badge.fury.io/js/parseurl.svg)](http://badge.fury.io/js/parseurl)
+[![Build Status](https://travis-ci.org/expressjs/parseurl.svg?branch=master)](https://travis-ci.org/expressjs/parseurl)
+[![Coverage Status](https://img.shields.io/coveralls/expressjs/parseurl.svg?branch=master)](https://coveralls.io/r/expressjs/parseurl)
+
+Parse a URL with memoization.
+
+## Install
+
+```bash
+$ npm install parseurl
+```
+
+## API
+
+```js
+var parseurl = require('parseurl')
+```
+
+### parseurl(req)
+
+Parse the URL of the given request object (looks at the `req.url` property)
+and return the result. The result is the same as `url.parse` in Node.js core.
+Calling this function multiple times on the same `req` where `req.url` does
+not change will return a cached parsed object, rather than parsing again.
+
+### parseurl.original(req)
+
+Parse the original URL of the given request object and return the result.
+This works by trying to parse `req.originalUrl` if it is a string, otherwise
+parses `req.url`. The result is the same as `url.parse` in Node.js core.
+Calling this function multiple times on the same `req` where `req.originalUrl`
+does not change will return a cached parsed object, rather than parsing again.
+
+## Benchmark
+
+```bash
+$ npm run-script bench
+
+> parseurl@1.3.0 bench nodejs-parseurl
+> node benchmark/index.js
+
+> node benchmark/fullurl.js
+
+ Parsing URL "http://localhost:8888/foo/bar?user=tj&pet=fluffy"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 1,290,780 ops/sec ±0.46% (195 runs sampled)
+ nativeurl x 56,401 ops/sec ±0.22% (196 runs sampled)
+ parseurl x 55,231 ops/sec ±0.22% (194 runs sampled)
+
+> node benchmark/pathquery.js
+
+ Parsing URL "/foo/bar?user=tj&pet=fluffy"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 1,986,668 ops/sec ±0.27% (190 runs sampled)
+ nativeurl x 98,740 ops/sec ±0.21% (195 runs sampled)
+ parseurl x 2,628,171 ops/sec ±0.36% (195 runs sampled)
+
+> node benchmark/samerequest.js
+
+ Parsing URL "/foo/bar?user=tj&pet=fluffy" on same request object
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 2,184,468 ops/sec ±0.40% (194 runs sampled)
+ nativeurl x 99,437 ops/sec ±0.71% (194 runs sampled)
+ parseurl x 10,498,005 ops/sec ±0.61% (186 runs sampled)
+
+> node benchmark/simplepath.js
+
+ Parsing URL "/foo/bar"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 4,535,825 ops/sec ±0.27% (191 runs sampled)
+ nativeurl x 98,769 ops/sec ±0.54% (191 runs sampled)
+ parseurl x 4,164,865 ops/sec ±0.34% (192 runs sampled)
+
+> node benchmark/slash.js
+
+ Parsing URL "/"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 4,908,405 ops/sec ±0.42% (191 runs sampled)
+ nativeurl x 100,945 ops/sec ±0.59% (188 runs sampled)
+ parseurl x 4,333,208 ops/sec ±0.27% (194 runs sampled)
+```
+
+## License
+
+ [MIT](LICENSE)
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/index.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/index.js
new file mode 100644
index 0000000..8632347
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/index.js
@@ -0,0 +1,136 @@
+/*!
+ * parseurl
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var url = require('url')
+var parse = url.parse
+var Url = url.Url
+
+/**
+ * Pattern for a simple path case.
+ * See: https://github.com/joyent/node/pull/7878
+ */
+
+var simplePathRegExp = /^(\/\/?(?!\/)[^\?#\s]*)(\?[^#\s]*)?$/
+
+/**
+ * Exports.
+ */
+
+module.exports = parseurl
+module.exports.original = originalurl
+
+/**
+ * Parse the `req` url with memoization.
+ *
+ * @param {ServerRequest} req
+ * @return {Object}
+ * @api public
+ */
+
+function parseurl(req) {
+ var url = req.url
+
+ if (url === undefined) {
+ // URL is undefined
+ return undefined
+ }
+
+ var parsed = req._parsedUrl
+
+ if (fresh(url, parsed)) {
+ // Return cached URL parse
+ return parsed
+ }
+
+ // Parse the URL
+ parsed = fastparse(url)
+ parsed._raw = url
+
+ return req._parsedUrl = parsed
+};
+
+/**
+ * Parse the `req` original url with fallback and memoization.
+ *
+ * @param {ServerRequest} req
+ * @return {Object}
+ * @api public
+ */
+
+function originalurl(req) {
+ var url = req.originalUrl
+
+ if (typeof url !== 'string') {
+ // Fallback
+ return parseurl(req)
+ }
+
+ var parsed = req._parsedOriginalUrl
+
+ if (fresh(url, parsed)) {
+ // Return cached URL parse
+ return parsed
+ }
+
+ // Parse the URL
+ parsed = fastparse(url)
+ parsed._raw = url
+
+ return req._parsedOriginalUrl = parsed
+};
+
+/**
+ * Parse the `str` url with fast-path short-cut.
+ *
+ * @param {string} str
+ * @return {Object}
+ * @api private
+ */
+
+function fastparse(str) {
+ // Try fast path regexp
+ // See: https://github.com/joyent/node/pull/7878
+ var simplePath = typeof str === 'string' && simplePathRegExp.exec(str)
+
+ // Construct simple URL
+ if (simplePath) {
+ var pathname = simplePath[1]
+ var search = simplePath[2] || null
+ var url = Url !== undefined
+ ? new Url()
+ : {}
+ url.path = str
+ url.href = str
+ url.pathname = pathname
+ url.search = search
+ url.query = search && search.substr(1)
+
+ return url
+ }
+
+ return parse(str)
+}
+
+/**
+ * Determine if parsed is still fresh for url.
+ *
+ * @param {string} url
+ * @param {object} parsedUrl
+ * @return {boolean}
+ * @api private
+ */
+
+function fresh(url, parsedUrl) {
+ return typeof parsedUrl === 'object'
+ && parsedUrl !== null
+ && (Url === undefined || parsedUrl instanceof Url)
+ && parsedUrl._raw === url
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/package.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/package.json
new file mode 100644
index 0000000..6fbd23e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/parseurl/package.json
@@ -0,0 +1,80 @@
+{
+ "name": "parseurl",
+ "description": "parse a url with memoization",
+ "version": "1.3.0",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/expressjs/parseurl"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "fast-url-parser": "~1.0.0",
+ "istanbul": "0.3.0",
+ "mocha": "~1.21.4"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --check-leaks --bail --reporter spec test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/"
+ },
+ "gitHead": "03b7ccca240e2bef5df6c25797e99175d28fb2cb",
+ "bugs": {
+ "url": "https://github.com/expressjs/parseurl/issues"
+ },
+ "homepage": "https://github.com/expressjs/parseurl",
+ "_id": "parseurl@1.3.0",
+ "_shasum": "b58046db4223e145afa76009e61bac87cc2281b3",
+ "_from": "parseurl@~1.3.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b58046db4223e145afa76009e61bac87cc2281b3",
+ "tarball": "http://registry.npmjs.org/parseurl/-/parseurl-1.3.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/package.json b/dgbuilder/dgeflows/node_modules/serve-index/package.json
new file mode 100644
index 0000000..76304ff
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/package.json
@@ -0,0 +1,87 @@
+{
+ "name": "serve-index",
+ "description": "Serve directory listings",
+ "version": "1.6.2",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/expressjs/serve-index"
+ },
+ "dependencies": {
+ "accepts": "~1.2.4",
+ "batch": "0.5.2",
+ "debug": "~2.1.1",
+ "http-errors": "~1.3.1",
+ "mime-types": "~2.0.9",
+ "parseurl": "~1.3.0"
+ },
+ "devDependencies": {
+ "after": "0.8.1",
+ "istanbul": "0.3.5",
+ "mocha": "~2.1.0",
+ "supertest": "~0.15.0"
+ },
+ "files": [
+ "public/",
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
+ },
+ "gitHead": "5ec9698c085cf11308e9ca2ed28d72835f191e97",
+ "bugs": {
+ "url": "https://github.com/expressjs/serve-index/issues"
+ },
+ "homepage": "https://github.com/expressjs/serve-index",
+ "_id": "serve-index@1.6.2",
+ "_shasum": "f144a140b4500faf2e861c02bb7f160bd7dc3af1",
+ "_from": "serve-index@^1.6.2",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "f144a140b4500faf2e861c02bb7f160bd7dc3af1",
+ "tarball": "http://registry.npmjs.org/serve-index/-/serve-index-1.6.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.6.2.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/directory.html b/dgbuilder/dgeflows/node_modules/serve-index/public/directory.html
new file mode 100644
index 0000000..cda1601
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/directory.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset='utf-8'>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
+ <title>listing directory {directory}</title>
+ <style>{style}</style>
+ <script>
+ function $(id){
+ var el = 'string' == typeof id
+ ? document.getElementById(id)
+ : id;
+
+ el.on = function(event, fn){
+ if ('content loaded' == event) {
+ event = window.attachEvent ? "load" : "DOMContentLoaded";
+ }
+ el.addEventListener
+ ? el.addEventListener(event, fn, false)
+ : el.attachEvent("on" + event, fn);
+ };
+
+ el.all = function(selector){
+ return $(el.querySelectorAll(selector));
+ };
+
+ el.each = function(fn){
+ for (var i = 0, len = el.length; i < len; ++i) {
+ fn($(el[i]), i);
+ }
+ };
+
+ el.getClasses = function(){
+ return this.getAttribute('class').split(/\s+/);
+ };
+
+ el.addClass = function(name){
+ var classes = this.getAttribute('class');
+ el.setAttribute('class', classes
+ ? classes + ' ' + name
+ : name);
+ };
+
+ el.removeClass = function(name){
+ var classes = this.getClasses().filter(function(curr){
+ return curr != name;
+ });
+ this.setAttribute('class', classes.join(' '));
+ };
+
+ return el;
+ }
+
+ function search() {
+ var str = $('search').value
+ , links = $('files').all('a');
+
+ links.each(function(link){
+ var text = link.textContent;
+
+ if ('..' == text) return;
+ if (str.length && ~text.indexOf(str)) {
+ link.addClass('highlight');
+ } else {
+ link.removeClass('highlight');
+ }
+ });
+ }
+
+ $(window).on('content loaded', function(){
+ $('search').on('keyup', search);
+ });
+ </script>
+ </head>
+ <body class="directory">
+ <input id="search" type="text" placeholder="Search" autocomplete="off" />
+ <div id="wrapper">
+ <h1><a href="/">~</a>{linked-path}</h1>
+ {files}
+ </div>
+ </body>
+</html>
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/application_xp.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/application_xp.png
new file mode 100644
index 0000000..d22860a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/application_xp.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/application_xp_terminal.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/application_xp_terminal.png
new file mode 100644
index 0000000..c28dd63
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/application_xp_terminal.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/box.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/box.png
new file mode 100644
index 0000000..8443c23
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/box.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/cd.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/cd.png
new file mode 100644
index 0000000..ef43223
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/cd.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/controller.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/controller.png
new file mode 100644
index 0000000..5cf76ed
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/controller.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/drive.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/drive.png
new file mode 100644
index 0000000..37b7c9b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/drive.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/film.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/film.png
new file mode 100644
index 0000000..b0ce7bb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/film.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/folder.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/folder.png
new file mode 100644
index 0000000..698f3d3
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/folder.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/font.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/font.png
new file mode 100644
index 0000000..b7960db
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/font.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/image.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/image.png
new file mode 100644
index 0000000..fc3c393
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/image.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/map.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/map.png
new file mode 100644
index 0000000..f90ef25
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/map.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page.png
new file mode 100644
index 0000000..03ddd79
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_add.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_add.png
new file mode 100644
index 0000000..d5bfa07
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_add.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_attach.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_attach.png
new file mode 100644
index 0000000..89ee2da
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_attach.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_code.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_code.png
new file mode 100644
index 0000000..f7ea904
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_code.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_copy.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_copy.png
new file mode 100644
index 0000000..195dc6d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_copy.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_delete.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_delete.png
new file mode 100644
index 0000000..3141467
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_delete.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_edit.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_edit.png
new file mode 100644
index 0000000..046811e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_edit.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_error.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_error.png
new file mode 100644
index 0000000..f07f449
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_error.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_excel.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_excel.png
new file mode 100644
index 0000000..eb6158e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_excel.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_find.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_find.png
new file mode 100644
index 0000000..2f19388
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_find.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_gear.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_gear.png
new file mode 100644
index 0000000..8e83281
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_gear.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_go.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_go.png
new file mode 100644
index 0000000..80fe1ed
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_go.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_green.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_green.png
new file mode 100644
index 0000000..de8e003
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_green.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_key.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_key.png
new file mode 100644
index 0000000..d6626cb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_key.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_lightning.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_lightning.png
new file mode 100644
index 0000000..7e56870
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_lightning.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_link.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_link.png
new file mode 100644
index 0000000..312eab0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_link.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_paintbrush.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_paintbrush.png
new file mode 100644
index 0000000..246a2f0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_paintbrush.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_paste.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_paste.png
new file mode 100644
index 0000000..968f073
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_paste.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_red.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_red.png
new file mode 100644
index 0000000..0b18247
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_red.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_refresh.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_refresh.png
new file mode 100644
index 0000000..cf347c7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_refresh.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_save.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_save.png
new file mode 100644
index 0000000..caea546
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_save.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white.png
new file mode 100644
index 0000000..8b8b1ca
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_acrobat.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_acrobat.png
new file mode 100644
index 0000000..8f8095e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_acrobat.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_actionscript.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_actionscript.png
new file mode 100644
index 0000000..159b240
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_actionscript.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_add.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_add.png
new file mode 100644
index 0000000..aa23dde
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_add.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_c.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_c.png
new file mode 100644
index 0000000..34a05cc
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_c.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_camera.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_camera.png
new file mode 100644
index 0000000..f501a59
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_camera.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_cd.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_cd.png
new file mode 100644
index 0000000..848bdaf
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_cd.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_code.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_code.png
new file mode 100644
index 0000000..0c76bd1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_code.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_code_red.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_code_red.png
new file mode 100644
index 0000000..87a6914
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_code_red.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_coldfusion.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_coldfusion.png
new file mode 100644
index 0000000..c66011f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_coldfusion.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_compressed.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_compressed.png
new file mode 100644
index 0000000..2b6b100
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_compressed.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_copy.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_copy.png
new file mode 100644
index 0000000..a9f31a2
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_copy.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_cplusplus.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_cplusplus.png
new file mode 100644
index 0000000..a87cf84
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_cplusplus.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_csharp.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_csharp.png
new file mode 100644
index 0000000..ffb8fc9
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_csharp.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_cup.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_cup.png
new file mode 100644
index 0000000..0a7d6f4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_cup.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_database.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_database.png
new file mode 100644
index 0000000..bddba1f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_database.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_delete.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_delete.png
new file mode 100644
index 0000000..af1ecaf
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_delete.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_dvd.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_dvd.png
new file mode 100644
index 0000000..4cc537a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_dvd.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_edit.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_edit.png
new file mode 100644
index 0000000..b93e776
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_edit.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_error.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_error.png
new file mode 100644
index 0000000..9fc5a0a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_error.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_excel.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_excel.png
new file mode 100644
index 0000000..b977d7e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_excel.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_find.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_find.png
new file mode 100644
index 0000000..5818436
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_find.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_flash.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_flash.png
new file mode 100644
index 0000000..5769120
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_flash.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_freehand.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_freehand.png
new file mode 100644
index 0000000..8d719df
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_freehand.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_gear.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_gear.png
new file mode 100644
index 0000000..106f5aa
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_gear.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_get.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_get.png
new file mode 100644
index 0000000..e4a1ecb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_get.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_go.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_go.png
new file mode 100644
index 0000000..7e62a92
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_go.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_h.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_h.png
new file mode 100644
index 0000000..e902abb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_h.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_horizontal.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_horizontal.png
new file mode 100644
index 0000000..1d2d0a4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_horizontal.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_key.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_key.png
new file mode 100644
index 0000000..d616484
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_key.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_lightning.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_lightning.png
new file mode 100644
index 0000000..7215d1e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_lightning.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_link.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_link.png
new file mode 100644
index 0000000..bf7bd1c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_link.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_magnify.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_magnify.png
new file mode 100644
index 0000000..f6b74cc
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_magnify.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_medal.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_medal.png
new file mode 100644
index 0000000..d3fffb6
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_medal.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_office.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_office.png
new file mode 100644
index 0000000..a65bcb3
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_office.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_paint.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_paint.png
new file mode 100644
index 0000000..23a37b8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_paint.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_paintbrush.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_paintbrush.png
new file mode 100644
index 0000000..f907e44
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_paintbrush.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_paste.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_paste.png
new file mode 100644
index 0000000..5b2cbb3
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_paste.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_php.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_php.png
new file mode 100644
index 0000000..7868a25
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_php.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_picture.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_picture.png
new file mode 100644
index 0000000..134b669
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_picture.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_powerpoint.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_powerpoint.png
new file mode 100644
index 0000000..c4eff03
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_powerpoint.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_put.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_put.png
new file mode 100644
index 0000000..884ffd6
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_put.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_ruby.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_ruby.png
new file mode 100644
index 0000000..f59b7c4
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_ruby.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_stack.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_stack.png
new file mode 100644
index 0000000..44084ad
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_stack.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_star.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_star.png
new file mode 100644
index 0000000..3a1441c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_star.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_swoosh.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_swoosh.png
new file mode 100644
index 0000000..e770829
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_swoosh.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_text.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_text.png
new file mode 100644
index 0000000..813f712
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_text.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_text_width.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_text_width.png
new file mode 100644
index 0000000..d9cf132
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_text_width.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_tux.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_tux.png
new file mode 100644
index 0000000..52699bf
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_tux.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_vector.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_vector.png
new file mode 100644
index 0000000..4a05955
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_vector.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_visualstudio.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_visualstudio.png
new file mode 100644
index 0000000..a0a433d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_visualstudio.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_width.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_width.png
new file mode 100644
index 0000000..1eb8809
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_width.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_word.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_word.png
new file mode 100644
index 0000000..ae8ecbf
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_word.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_world.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_world.png
new file mode 100644
index 0000000..6ed2490
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_world.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_wrench.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_wrench.png
new file mode 100644
index 0000000..fecadd0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_wrench.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_zip.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_zip.png
new file mode 100644
index 0000000..fd4bbcc
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_white_zip.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_word.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_word.png
new file mode 100644
index 0000000..834cdfa
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_word.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_world.png b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_world.png
new file mode 100644
index 0000000..b8895dd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/icons/page_world.png
Binary files differ
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/public/style.css b/dgbuilder/dgeflows/node_modules/serve-index/public/style.css
new file mode 100644
index 0000000..eb99dc9
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-index/public/style.css
@@ -0,0 +1,257 @@
+* {
+ margin: 0;
+ padding: 0;
+ outline: 0;
+}
+
+body {
+ padding: 80px 100px;
+ font: 13px "Helvetica Neue", "Lucida Grande", "Arial";
+ background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9));
+ background: #ECE9E9 -moz-linear-gradient(top, #fff, #ECE9E9);
+ background-repeat: no-repeat;
+ color: #555;
+ -webkit-font-smoothing: antialiased;
+}
+h1, h2, h3 {
+ font-size: 22px;
+ color: #343434;
+}
+h1 em, h2 em {
+ padding: 0 5px;
+ font-weight: normal;
+}
+h1 {
+ font-size: 60px;
+}
+h2 {
+ margin-top: 10px;
+}
+h3 {
+ margin: 5px 0 10px 0;
+ padding-bottom: 5px;
+ border-bottom: 1px solid #eee;
+ font-size: 18px;
+}
+ul li {
+ list-style: none;
+}
+ul li:hover {
+ cursor: pointer;
+ color: #2e2e2e;
+}
+ul li .path {
+ padding-left: 5px;
+ font-weight: bold;
+}
+ul li .line {
+ padding-right: 5px;
+ font-style: italic;
+}
+ul li:first-child .path {
+ padding-left: 0;
+}
+p {
+ line-height: 1.5;
+}
+a {
+ color: #555;
+ text-decoration: none;
+}
+a:hover {
+ color: #303030;
+}
+#stacktrace {
+ margin-top: 15px;
+}
+.directory h1 {
+ margin-bottom: 15px;
+ font-size: 18px;
+}
+ul#files {
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+}
+ul#files li {
+ float: left;
+ width: 30%;
+ line-height: 25px;
+ margin: 1px;
+}
+ul#files li a {
+ display: block;
+ height: 25px;
+ border: 1px solid transparent;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ overflow: hidden;
+ white-space: nowrap;
+}
+ul#files li a:focus,
+ul#files li a:hover {
+ background: rgba(255,255,255,0.65);
+ border: 1px solid #ececec;
+}
+ul#files li a.highlight {
+ -webkit-transition: background .4s ease-in-out;
+ background: #ffff4f;
+ border-color: #E9DC51;
+}
+#search {
+ display: block;
+ position: fixed;
+ top: 20px;
+ right: 20px;
+ width: 90px;
+ -webkit-transition: width ease 0.2s, opacity ease 0.4s;
+ -moz-transition: width ease 0.2s, opacity ease 0.4s;
+ -webkit-border-radius: 32px;
+ -moz-border-radius: 32px;
+ -webkit-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03);
+ -moz-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03);
+ -webkit-font-smoothing: antialiased;
+ text-align: left;
+ font: 13px "Helvetica Neue", Arial, sans-serif;
+ padding: 4px 10px;
+ border: none;
+ background: transparent;
+ margin-bottom: 0;
+ outline: none;
+ opacity: 0.7;
+ color: #888;
+}
+#search:focus {
+ width: 120px;
+ opacity: 1.0;
+}
+
+/*views*/
+#files span {
+ display: inline-block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ text-indent: 10px;
+}
+#files .name {
+ background-repeat: no-repeat;
+}
+#files .icon .name {
+ text-indent: 28px;
+}
+
+/*tiles*/
+.view-tiles .name {
+ width: 100%;
+ background-position: 8px 5px;
+}
+.view-tiles .size,
+.view-tiles .date {
+ display: none;
+}
+
+/*details*/
+ul#files.view-details li {
+ float: none;
+ display: block;
+ width: 90%;
+}
+ul#files.view-details li.header {
+ height: 25px;
+ background: #000;
+ color: #fff;
+ font-weight: bold;
+}
+.view-details .header {
+ border-radius: 5px;
+}
+.view-details .name {
+ width: 60%;
+ background-position: 8px 5px;
+}
+.view-details .size {
+ width: 10%;
+}
+.view-details .date {
+ width: 30%;
+}
+.view-details .size,
+.view-details .date {
+ text-align: right;
+ direction: rtl;
+}
+
+/*mobile*/
+@media (max-width: 768px) {
+ body {
+ font-size: 13px;
+ line-height: 16px;
+ padding: 0;
+ }
+ #search {
+ position: static;
+ width: 100%;
+ font-size: 2em;
+ line-height: 1.8em;
+ text-indent: 10px;
+ border: 0;
+ border-radius: 0;
+ padding: 10px 0;
+ margin: 0;
+ }
+ #search:focus {
+ width: 100%;
+ border: 0;
+ opacity: 1;
+ }
+ .directory h1 {
+ font-size: 2em;
+ line-height: 1.5em;
+ color: #fff;
+ background: #000;
+ padding: 15px 10px;
+ margin: 0;
+ }
+ ul#files {
+ border-top: 1px solid #cacaca;
+ }
+ ul#files li {
+ float: none;
+ width: auto !important;
+ display: block;
+ border-bottom: 1px solid #cacaca;
+ font-size: 2em;
+ line-height: 1.2em;
+ text-indent: 0;
+ margin: 0;
+ }
+ ul#files li:nth-child(odd) {
+ background: #e0e0e0;
+ }
+ ul#files li a {
+ height: auto;
+ border: 0;
+ border-radius: 0;
+ padding: 15px 10px;
+ }
+ ul#files li a:focus,
+ ul#files li a:hover {
+ border: 0;
+ }
+ #files .header,
+ #files .size,
+ #files .date {
+ display: none !important;
+ }
+ #files .name {
+ float: none;
+ display: inline-block;
+ width: 100%;
+ text-indent: 0;
+ background-position: 0 50%;
+ }
+ #files .icon .name {
+ text-indent: 41px;
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-static/HISTORY.md
new file mode 100644
index 0000000..dc2d2fe
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/HISTORY.md
@@ -0,0 +1,242 @@
+1.9.1 / 2015-02-17
+==================
+
+ * deps: send@0.12.1
+ - Fix regression sending zero-length files
+
+1.9.0 / 2015-02-16
+==================
+
+ * deps: send@0.12.0
+ - Always read the stat size from the file
+ - Fix mutating passed-in `options`
+ - deps: mime@1.3.4
+
+1.8.1 / 2015-01-20
+==================
+
+ * Fix redirect loop in Node.js 0.11.14
+ * deps: send@0.11.1
+ - Fix root path disclosure
+
+1.8.0 / 2015-01-05
+==================
+
+ * deps: send@0.11.0
+ - deps: debug@~2.1.1
+ - deps: etag@~1.5.1
+ - deps: ms@0.7.0
+ - deps: on-finished@~2.2.0
+
+1.7.2 / 2015-01-02
+==================
+
+ * Fix potential open redirect when mounted at root
+
+1.7.1 / 2014-10-22
+==================
+
+ * deps: send@0.10.1
+ - deps: on-finished@~2.1.1
+
+1.7.0 / 2014-10-15
+==================
+
+ * deps: send@0.10.0
+ - deps: debug@~2.1.0
+ - deps: depd@~1.0.0
+ - deps: etag@~1.5.0
+
+1.6.5 / 2015-02-04
+==================
+
+ * Fix potential open redirect when mounted at root
+ - Back-ported from v1.7.2
+
+1.6.4 / 2014-10-08
+==================
+
+ * Fix redirect loop when index file serving disabled
+
+1.6.3 / 2014-09-24
+==================
+
+ * deps: send@0.9.3
+ - deps: etag@~1.4.0
+
+1.6.2 / 2014-09-15
+==================
+
+ * deps: send@0.9.2
+ - deps: depd@0.4.5
+ - deps: etag@~1.3.1
+ - deps: range-parser@~1.0.2
+
+1.6.1 / 2014-09-07
+==================
+
+ * deps: send@0.9.1
+ - deps: fresh@0.2.4
+
+1.6.0 / 2014-09-07
+==================
+
+ * deps: send@0.9.0
+ - Add `lastModified` option
+ - Use `etag` to generate `ETag` header
+ - deps: debug@~2.0.0
+
+1.5.4 / 2014-09-04
+==================
+
+ * deps: send@0.8.5
+ - Fix a path traversal issue when using `root`
+ - Fix malicious path detection for empty string path
+
+1.5.3 / 2014-08-17
+==================
+
+ * deps: send@0.8.3
+
+1.5.2 / 2014-08-14
+==================
+
+ * deps: send@0.8.2
+ - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream`
+
+1.5.1 / 2014-08-09
+==================
+
+ * Fix parsing of weird `req.originalUrl` values
+ * deps: parseurl@~1.3.0
+ * deps: utils-merge@1.0.0
+
+1.5.0 / 2014-08-05
+==================
+
+ * deps: send@0.8.1
+ - Add `extensions` option
+
+1.4.4 / 2014-08-04
+==================
+
+ * deps: send@0.7.4
+ - Fix serving index files without root dir
+
+1.4.3 / 2014-07-29
+==================
+
+ * deps: send@0.7.3
+ - Fix incorrect 403 on Windows and Node.js 0.11
+
+1.4.2 / 2014-07-27
+==================
+
+ * deps: send@0.7.2
+ - deps: depd@0.4.4
+
+1.4.1 / 2014-07-26
+==================
+
+ * deps: send@0.7.1
+ - deps: depd@0.4.3
+
+1.4.0 / 2014-07-21
+==================
+
+ * deps: parseurl@~1.2.0
+ - Cache URLs based on original value
+ - Remove no-longer-needed URL mis-parse work-around
+ - Simplify the "fast-path" `RegExp`
+ * deps: send@0.7.0
+ - Add `dotfiles` option
+ - deps: debug@1.0.4
+ - deps: depd@0.4.2
+
+1.3.2 / 2014-07-11
+==================
+
+ * deps: send@0.6.0
+ - Cap `maxAge` value to 1 year
+ - deps: debug@1.0.3
+
+1.3.1 / 2014-07-09
+==================
+
+ * deps: parseurl@~1.1.3
+ - faster parsing of href-only URLs
+
+1.3.0 / 2014-06-28
+==================
+
+ * Add `setHeaders` option
+ * Include HTML link in redirect response
+ * deps: send@0.5.0
+ - Accept string for `maxAge` (converted by `ms`)
+
+1.2.3 / 2014-06-11
+==================
+
+ * deps: send@0.4.3
+ - Do not throw un-catchable error on file open race condition
+ - Use `escape-html` for HTML escaping
+ - deps: debug@1.0.2
+ - deps: finished@1.2.2
+ - deps: fresh@0.2.2
+
+1.2.2 / 2014-06-09
+==================
+
+ * deps: send@0.4.2
+ - fix "event emitter leak" warnings
+ - deps: debug@1.0.1
+ - deps: finished@1.2.1
+
+1.2.1 / 2014-06-02
+==================
+
+ * use `escape-html` for escaping
+ * deps: send@0.4.1
+ - Send `max-age` in `Cache-Control` in correct format
+
+1.2.0 / 2014-05-29
+==================
+
+ * deps: send@0.4.0
+ - Calculate ETag with md5 for reduced collisions
+ - Fix wrong behavior when index file matches directory
+ - Ignore stream errors after request ends
+ - Skip directories in index file search
+ - deps: debug@0.8.1
+
+1.1.0 / 2014-04-24
+==================
+
+ * Accept options directly to `send` module
+ * deps: send@0.3.0
+
+1.0.4 / 2014-04-07
+==================
+
+ * Resolve relative paths at middleware setup
+ * Use parseurl to parse the URL from request
+
+1.0.3 / 2014-03-20
+==================
+
+ * Do not rely on connect-like environments
+
+1.0.2 / 2014-03-06
+==================
+
+ * deps: send@0.2.0
+
+1.0.1 / 2014-03-05
+==================
+
+ * Add mime export for back-compat
+
+1.0.0 / 2014-03-05
+==================
+
+ * Genesis from `connect`
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/LICENSE b/dgbuilder/dgeflows/node_modules/serve-static/LICENSE
new file mode 100644
index 0000000..b7bc085
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/LICENSE
@@ -0,0 +1,25 @@
+(The MIT License)
+
+Copyright (c) 2010 Sencha Inc.
+Copyright (c) 2011 LearnBoost
+Copyright (c) 2011 TJ Holowaychuk
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/README.md b/dgbuilder/dgeflows/node_modules/serve-static/README.md
new file mode 100644
index 0000000..39133b0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/README.md
@@ -0,0 +1,168 @@
+# serve-static
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Linux Build][travis-image]][travis-url]
+[![Windows Build][appveyor-image]][appveyor-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+## Install
+
+```sh
+$ npm install serve-static
+```
+
+## API
+
+```js
+var serveStatic = require('serve-static')
+```
+
+### serveStatic(root, options)
+
+Create a new middleware function to serve files from within a given root
+directory. The file to serve will be determined by combining `req.url`
+with the provided root directory. When a file is not found, instead of
+sending a 404 response, this module will instead call `next()` to move on
+to the next middleware, allowing for stacking and fall-backs.
+
+#### Options
+
+##### dotfiles
+
+ Set how "dotfiles" are treated when encountered. A dotfile is a file
+or directory that begins with a dot ("."). Note this check is done on
+the path itself without checking if the path actually exists on the
+disk. If `root` is specified, only the dotfiles above the root are
+checked (i.e. the root itself can be within a dotfile when set
+to "deny").
+
+The default value is `'ignore'`.
+
+ - `'allow'` No special treatment for dotfiles.
+ - `'deny'` Send a 403 for any request for a dotfile.
+ - `'ignore'` Pretend like the dotfile does not exist and call `next()`.
+
+##### etag
+
+Enable or disable etag generation, defaults to true.
+
+##### extensions
+
+Set file extension fallbacks. When set, if a file is not found, the given
+extensions will be added to the file name and search for. The first that
+exists will be served. Example: `['html', 'htm']`.
+
+The default value is `false`.
+
+##### index
+
+By default this module will send "index.html" files in response to a request
+on a directory. To disable this set `false` or to supply a new index pass a
+string or an array in preferred order.
+
+##### lastModified
+
+Enable or disable `Last-Modified` header, defaults to true. Uses the file
+system's last modified value.
+
+##### maxAge
+
+Provide a max-age in milliseconds for http caching, defaults to 0. This
+can also be a string accepted by the [ms](https://www.npmjs.org/package/ms#readme)
+module.
+
+##### redirect
+
+Redirect to trailing "/" when the pathname is a dir. Defaults to `true`.
+
+##### setHeaders
+
+Function to set custom headers on response. Alterations to the headers need to
+occur synchronously. The function is called as `fn(res, path, stat)`, where
+the arguments are:
+
+ - `res` the response object
+ - `path` the file path that is being sent
+ - `stat` the stat object of the file that is being sent
+
+## Examples
+
+### Serve files with vanilla node.js http server
+
+```js
+var finalhandler = require('finalhandler')
+var http = require('http')
+var serveStatic = require('serve-static')
+
+// Serve up public/ftp folder
+var serve = serveStatic('public/ftp', {'index': ['index.html', 'index.htm']})
+
+// Create server
+var server = http.createServer(function(req, res){
+ var done = finalhandler(req, res)
+ serve(req, res, done)
+})
+
+// Listen
+server.listen(3000)
+```
+
+### Serve all files as downloads
+
+```js
+var contentDisposition = require('content-disposition')
+var finalhandler = require('finalhandler')
+var http = require('http')
+var serveStatic = require('serve-static')
+
+// Serve up public/ftp folder
+var serve = serveStatic('public/ftp', {
+ 'index': false,
+ 'setHeaders': setHeaders
+})
+
+// Set header to force download
+function setHeaders(res, path) {
+ res.setHeader('Content-Disposition', contentDisposition(path))
+}
+
+// Create server
+var server = http.createServer(function(req, res){
+ var done = finalhandler(req, res)
+ serve(req, res, done)
+})
+
+// Listen
+server.listen(3000)
+```
+
+### Serving using express
+
+```js
+var express = require('express')
+var serveStatic = require('serve-static')
+
+var app = express()
+
+app.use(serveStatic('public/ftp', {'index': ['default.html', 'default.htm']}))
+app.listen(3000)
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/serve-static.svg?style=flat
+[npm-url]: https://npmjs.org/package/serve-static
+[travis-image]: https://img.shields.io/travis/expressjs/serve-static/master.svg?label=linux&style=flat
+[travis-url]: https://travis-ci.org/expressjs/serve-static
+[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/serve-static/master.svg?label=windows&style=flat
+[appveyor-url]: https://ci.appveyor.com/project/dougwilson/serve-static
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/serve-static/master.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/expressjs/serve-static
+[downloads-image]: https://img.shields.io/npm/dm/serve-static.svg?style=flat
+[downloads-url]: https://npmjs.org/package/serve-static
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat
+[gratipay-url]: https://gratipay.com/dougwilson/
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/index.js b/dgbuilder/dgeflows/node_modules/serve-static/index.js
new file mode 100644
index 0000000..0d1d9fb
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/index.js
@@ -0,0 +1,138 @@
+/*!
+ * serve-static
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var escapeHtml = require('escape-html');
+var merge = require('utils-merge');
+var parseurl = require('parseurl');
+var resolve = require('path').resolve;
+var send = require('send');
+var url = require('url');
+
+/**
+ * @param {String} root
+ * @param {Object} options
+ * @return {Function}
+ * @api public
+ */
+
+exports = module.exports = function serveStatic(root, options) {
+ if (!root) {
+ throw new TypeError('root path required')
+ }
+
+ if (typeof root !== 'string') {
+ throw new TypeError('root path must be a string')
+ }
+
+ // copy options object
+ options = merge({}, options)
+
+ // resolve root to absolute
+ root = resolve(root)
+
+ // default redirect
+ var redirect = options.redirect !== false
+
+ // headers listener
+ var setHeaders = options.setHeaders
+ delete options.setHeaders
+
+ if (setHeaders && typeof setHeaders !== 'function') {
+ throw new TypeError('option setHeaders must be function')
+ }
+
+ // setup options for send
+ options.maxage = options.maxage || options.maxAge || 0
+ options.root = root
+
+ return function serveStatic(req, res, next) {
+ if (req.method !== 'GET' && req.method !== 'HEAD') {
+ return next()
+ }
+
+ var opts = merge({}, options)
+ var originalUrl = parseurl.original(req)
+ var path = parseurl(req).pathname
+ var hasTrailingSlash = originalUrl.pathname[originalUrl.pathname.length - 1] === '/'
+
+ if (path === '/' && !hasTrailingSlash) {
+ // make sure redirect occurs at mount
+ path = ''
+ }
+
+ // create send stream
+ var stream = send(req, path, opts)
+
+ if (redirect) {
+ // redirect relative to originalUrl
+ stream.on('directory', function redirect() {
+ if (hasTrailingSlash) {
+ return next()
+ }
+
+ // append trailing slash
+ originalUrl.path = null
+ originalUrl.pathname = collapseLeadingSlashes(originalUrl.pathname + '/')
+
+ // reformat the URL
+ var target = url.format(originalUrl)
+
+ // send redirect response
+ res.statusCode = 303
+ res.setHeader('Content-Type', 'text/html; charset=utf-8')
+ res.setHeader('Location', target)
+ res.end('Redirecting to <a href="' + escapeHtml(target) + '">' + escapeHtml(target) + '</a>\n')
+ })
+ } else {
+ // forward to next middleware on directory
+ stream.on('directory', next)
+ }
+
+ // add headers listener
+ if (setHeaders) {
+ stream.on('headers', setHeaders)
+ }
+
+ // forward non-404 errors
+ stream.on('error', function error(err) {
+ next(err.status === 404 ? null : err)
+ })
+
+ // pipe
+ stream.pipe(res)
+ }
+}
+
+/**
+ * Expose mime module.
+ *
+ * If you wish to extend the mime table use this
+ * reference to the "mime" module in the npm registry.
+ */
+
+exports.mime = send.mime
+
+/**
+ * Collapse all leading slashes into a single slash
+ * @private
+ */
+function collapseLeadingSlashes(str) {
+ for (var i = 0; i < str.length; i++) {
+ if (str[i] !== '/') {
+ break
+ }
+ }
+
+ return i > 1
+ ? '/' + str.substr(i)
+ : str
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/.npmignore b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/.npmignore
new file mode 100644
index 0000000..48a2e24
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/.npmignore
@@ -0,0 +1,2 @@
+components
+build
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/Makefile b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/Makefile
new file mode 100644
index 0000000..3f6119d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/Makefile
@@ -0,0 +1,11 @@
+
+build: components index.js
+ @component build
+
+components:
+ @Component install
+
+clean:
+ rm -fr build components template.js
+
+.PHONY: clean
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/Readme.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/Readme.md
new file mode 100644
index 0000000..2cfcc99
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/Readme.md
@@ -0,0 +1,15 @@
+
+# escape-html
+
+ Escape HTML entities
+
+## Example
+
+```js
+var escape = require('escape-html');
+escape(str);
+```
+
+## License
+
+ MIT
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/component.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/component.json
new file mode 100644
index 0000000..cb9740f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/component.json
@@ -0,0 +1,10 @@
+{
+ "name": "escape-html",
+ "description": "Escape HTML entities",
+ "version": "1.0.1",
+ "keywords": ["escape", "html", "utility"],
+ "dependencies": {},
+ "scripts": [
+ "index.js"
+ ]
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/index.js
new file mode 100644
index 0000000..2765211
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/index.js
@@ -0,0 +1,16 @@
+/**
+ * Escape special characters in the given string of html.
+ *
+ * @param {String} html
+ * @return {String}
+ * @api private
+ */
+
+module.exports = function(html) {
+ return String(html)
+ .replace(/&/g, '&')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''')
+ .replace(/</g, '<')
+ .replace(/>/g, '>');
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/package.json
new file mode 100644
index 0000000..7f0b109
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "escape-html",
+ "description": "Escape HTML entities",
+ "version": "1.0.1",
+ "keywords": [
+ "escape",
+ "html",
+ "utility"
+ ],
+ "dependencies": {},
+ "main": "index.js",
+ "component": {
+ "scripts": {
+ "escape-html/index.js": "index.js"
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/component/escape-html.git"
+ },
+ "bugs": {
+ "url": "https://github.com/component/escape-html/issues"
+ },
+ "homepage": "https://github.com/component/escape-html",
+ "_id": "escape-html@1.0.1",
+ "dist": {
+ "shasum": "181a286ead397a39a92857cfb1d43052e356bff0",
+ "tarball": "http://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz"
+ },
+ "_from": "escape-html@1.0.1",
+ "_npmVersion": "1.3.15",
+ "_npmUser": {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ }
+ ],
+ "directories": {},
+ "_shasum": "181a286ead397a39a92857cfb1d43052e356bff0",
+ "_resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/.npmignore b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/.npmignore
new file mode 100644
index 0000000..85c82a5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/.npmignore
@@ -0,0 +1,4 @@
+benchmark/
+coverage/
+test/
+.travis.yml
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/HISTORY.md
new file mode 100644
index 0000000..65a0860
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/HISTORY.md
@@ -0,0 +1,42 @@
+1.3.0 / 2014-08-09
+==================
+
+ * Add `parseurl.original` for parsing `req.originalUrl` with fallback
+ * Return `undefined` if `req.url` is `undefined`
+
+1.2.0 / 2014-07-21
+==================
+
+ * Cache URLs based on original value
+ * Remove no-longer-needed URL mis-parse work-around
+ * Simplify the "fast-path" `RegExp`
+
+1.1.3 / 2014-07-08
+==================
+
+ * Fix typo
+
+1.1.2 / 2014-07-08
+==================
+
+ * Seriously fix Node.js 0.8 compatibility
+
+1.1.1 / 2014-07-08
+==================
+
+ * Fix Node.js 0.8 compatibility
+
+1.1.0 / 2014-07-08
+==================
+
+ * Incorporate URL href-only parse fast-path
+
+1.0.1 / 2014-03-08
+==================
+
+ * Add missing `require`
+
+1.0.0 / 2014-03-08
+==================
+
+ * Genesis from `connect`
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/LICENSE b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/LICENSE
new file mode 100644
index 0000000..ec7dfe7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/LICENSE
@@ -0,0 +1,24 @@
+
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/README.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/README.md
new file mode 100644
index 0000000..0db1d02
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/README.md
@@ -0,0 +1,107 @@
+# parseurl
+
+[![NPM version](https://badge.fury.io/js/parseurl.svg)](http://badge.fury.io/js/parseurl)
+[![Build Status](https://travis-ci.org/expressjs/parseurl.svg?branch=master)](https://travis-ci.org/expressjs/parseurl)
+[![Coverage Status](https://img.shields.io/coveralls/expressjs/parseurl.svg?branch=master)](https://coveralls.io/r/expressjs/parseurl)
+
+Parse a URL with memoization.
+
+## Install
+
+```bash
+$ npm install parseurl
+```
+
+## API
+
+```js
+var parseurl = require('parseurl')
+```
+
+### parseurl(req)
+
+Parse the URL of the given request object (looks at the `req.url` property)
+and return the result. The result is the same as `url.parse` in Node.js core.
+Calling this function multiple times on the same `req` where `req.url` does
+not change will return a cached parsed object, rather than parsing again.
+
+### parseurl.original(req)
+
+Parse the original URL of the given request object and return the result.
+This works by trying to parse `req.originalUrl` if it is a string, otherwise
+parses `req.url`. The result is the same as `url.parse` in Node.js core.
+Calling this function multiple times on the same `req` where `req.originalUrl`
+does not change will return a cached parsed object, rather than parsing again.
+
+## Benchmark
+
+```bash
+$ npm run-script bench
+
+> parseurl@1.3.0 bench nodejs-parseurl
+> node benchmark/index.js
+
+> node benchmark/fullurl.js
+
+ Parsing URL "http://localhost:8888/foo/bar?user=tj&pet=fluffy"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 1,290,780 ops/sec ±0.46% (195 runs sampled)
+ nativeurl x 56,401 ops/sec ±0.22% (196 runs sampled)
+ parseurl x 55,231 ops/sec ±0.22% (194 runs sampled)
+
+> node benchmark/pathquery.js
+
+ Parsing URL "/foo/bar?user=tj&pet=fluffy"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 1,986,668 ops/sec ±0.27% (190 runs sampled)
+ nativeurl x 98,740 ops/sec ±0.21% (195 runs sampled)
+ parseurl x 2,628,171 ops/sec ±0.36% (195 runs sampled)
+
+> node benchmark/samerequest.js
+
+ Parsing URL "/foo/bar?user=tj&pet=fluffy" on same request object
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 2,184,468 ops/sec ±0.40% (194 runs sampled)
+ nativeurl x 99,437 ops/sec ±0.71% (194 runs sampled)
+ parseurl x 10,498,005 ops/sec ±0.61% (186 runs sampled)
+
+> node benchmark/simplepath.js
+
+ Parsing URL "/foo/bar"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 4,535,825 ops/sec ±0.27% (191 runs sampled)
+ nativeurl x 98,769 ops/sec ±0.54% (191 runs sampled)
+ parseurl x 4,164,865 ops/sec ±0.34% (192 runs sampled)
+
+> node benchmark/slash.js
+
+ Parsing URL "/"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 4,908,405 ops/sec ±0.42% (191 runs sampled)
+ nativeurl x 100,945 ops/sec ±0.59% (188 runs sampled)
+ parseurl x 4,333,208 ops/sec ±0.27% (194 runs sampled)
+```
+
+## License
+
+ [MIT](LICENSE)
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/index.js
new file mode 100644
index 0000000..8632347
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/index.js
@@ -0,0 +1,136 @@
+/*!
+ * parseurl
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var url = require('url')
+var parse = url.parse
+var Url = url.Url
+
+/**
+ * Pattern for a simple path case.
+ * See: https://github.com/joyent/node/pull/7878
+ */
+
+var simplePathRegExp = /^(\/\/?(?!\/)[^\?#\s]*)(\?[^#\s]*)?$/
+
+/**
+ * Exports.
+ */
+
+module.exports = parseurl
+module.exports.original = originalurl
+
+/**
+ * Parse the `req` url with memoization.
+ *
+ * @param {ServerRequest} req
+ * @return {Object}
+ * @api public
+ */
+
+function parseurl(req) {
+ var url = req.url
+
+ if (url === undefined) {
+ // URL is undefined
+ return undefined
+ }
+
+ var parsed = req._parsedUrl
+
+ if (fresh(url, parsed)) {
+ // Return cached URL parse
+ return parsed
+ }
+
+ // Parse the URL
+ parsed = fastparse(url)
+ parsed._raw = url
+
+ return req._parsedUrl = parsed
+};
+
+/**
+ * Parse the `req` original url with fallback and memoization.
+ *
+ * @param {ServerRequest} req
+ * @return {Object}
+ * @api public
+ */
+
+function originalurl(req) {
+ var url = req.originalUrl
+
+ if (typeof url !== 'string') {
+ // Fallback
+ return parseurl(req)
+ }
+
+ var parsed = req._parsedOriginalUrl
+
+ if (fresh(url, parsed)) {
+ // Return cached URL parse
+ return parsed
+ }
+
+ // Parse the URL
+ parsed = fastparse(url)
+ parsed._raw = url
+
+ return req._parsedOriginalUrl = parsed
+};
+
+/**
+ * Parse the `str` url with fast-path short-cut.
+ *
+ * @param {string} str
+ * @return {Object}
+ * @api private
+ */
+
+function fastparse(str) {
+ // Try fast path regexp
+ // See: https://github.com/joyent/node/pull/7878
+ var simplePath = typeof str === 'string' && simplePathRegExp.exec(str)
+
+ // Construct simple URL
+ if (simplePath) {
+ var pathname = simplePath[1]
+ var search = simplePath[2] || null
+ var url = Url !== undefined
+ ? new Url()
+ : {}
+ url.path = str
+ url.href = str
+ url.pathname = pathname
+ url.search = search
+ url.query = search && search.substr(1)
+
+ return url
+ }
+
+ return parse(str)
+}
+
+/**
+ * Determine if parsed is still fresh for url.
+ *
+ * @param {string} url
+ * @param {object} parsedUrl
+ * @return {boolean}
+ * @api private
+ */
+
+function fresh(url, parsedUrl) {
+ return typeof parsedUrl === 'object'
+ && parsedUrl !== null
+ && (Url === undefined || parsedUrl instanceof Url)
+ && parsedUrl._raw === url
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/package.json
new file mode 100644
index 0000000..6fbd23e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/parseurl/package.json
@@ -0,0 +1,80 @@
+{
+ "name": "parseurl",
+ "description": "parse a url with memoization",
+ "version": "1.3.0",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/expressjs/parseurl"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "fast-url-parser": "~1.0.0",
+ "istanbul": "0.3.0",
+ "mocha": "~1.21.4"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --check-leaks --bail --reporter spec test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/"
+ },
+ "gitHead": "03b7ccca240e2bef5df6c25797e99175d28fb2cb",
+ "bugs": {
+ "url": "https://github.com/expressjs/parseurl/issues"
+ },
+ "homepage": "https://github.com/expressjs/parseurl",
+ "_id": "parseurl@1.3.0",
+ "_shasum": "b58046db4223e145afa76009e61bac87cc2281b3",
+ "_from": "parseurl@~1.3.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b58046db4223e145afa76009e61bac87cc2281b3",
+ "tarball": "http://registry.npmjs.org/parseurl/-/parseurl-1.3.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/HISTORY.md
new file mode 100644
index 0000000..b3bf34e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/HISTORY.md
@@ -0,0 +1,253 @@
+0.12.1 / 2015-02-17
+===================
+
+ * Fix regression sending zero-length files
+
+0.12.0 / 2015-02-16
+===================
+
+ * Always read the stat size from the file
+ * Fix mutating passed-in `options`
+ * deps: mime@1.3.4
+
+0.11.1 / 2015-01-20
+===================
+
+ * Fix `root` path disclosure
+
+0.11.0 / 2015-01-05
+===================
+
+ * deps: debug@~2.1.1
+ * deps: etag@~1.5.1
+ - deps: crc@3.2.1
+ * deps: ms@0.7.0
+ - Add `milliseconds`
+ - Add `msecs`
+ - Add `secs`
+ - Add `mins`
+ - Add `hrs`
+ - Add `yrs`
+ * deps: on-finished@~2.2.0
+
+0.10.1 / 2014-10-22
+===================
+
+ * deps: on-finished@~2.1.1
+ - Fix handling of pipelined requests
+
+0.10.0 / 2014-10-15
+===================
+
+ * deps: debug@~2.1.0
+ - Implement `DEBUG_FD` env variable support
+ * deps: depd@~1.0.0
+ * deps: etag@~1.5.0
+ - Improve string performance
+ - Slightly improve speed for weak ETags over 1KB
+
+0.9.3 / 2014-09-24
+==================
+
+ * deps: etag@~1.4.0
+ - Support "fake" stats objects
+
+0.9.2 / 2014-09-15
+==================
+
+ * deps: depd@0.4.5
+ * deps: etag@~1.3.1
+ * deps: range-parser@~1.0.2
+
+0.9.1 / 2014-09-07
+==================
+
+ * deps: fresh@0.2.4
+
+0.9.0 / 2014-09-07
+==================
+
+ * Add `lastModified` option
+ * Use `etag` to generate `ETag` header
+ * deps: debug@~2.0.0
+
+0.8.5 / 2014-09-04
+==================
+
+ * Fix malicious path detection for empty string path
+
+0.8.4 / 2014-09-04
+==================
+
+ * Fix a path traversal issue when using `root`
+
+0.8.3 / 2014-08-16
+==================
+
+ * deps: destroy@1.0.3
+ - renamed from dethroy
+ * deps: on-finished@2.1.0
+
+0.8.2 / 2014-08-14
+==================
+
+ * Work around `fd` leak in Node.js 0.10 for `fs.ReadStream`
+ * deps: dethroy@1.0.2
+
+0.8.1 / 2014-08-05
+==================
+
+ * Fix `extensions` behavior when file already has extension
+
+0.8.0 / 2014-08-05
+==================
+
+ * Add `extensions` option
+
+0.7.4 / 2014-08-04
+==================
+
+ * Fix serving index files without root dir
+
+0.7.3 / 2014-07-29
+==================
+
+ * Fix incorrect 403 on Windows and Node.js 0.11
+
+0.7.2 / 2014-07-27
+==================
+
+ * deps: depd@0.4.4
+ - Work-around v8 generating empty stack traces
+
+0.7.1 / 2014-07-26
+==================
+
+ * deps: depd@0.4.3
+ - Fix exception when global `Error.stackTraceLimit` is too low
+
+0.7.0 / 2014-07-20
+==================
+
+ * Deprecate `hidden` option; use `dotfiles` option
+ * Add `dotfiles` option
+ * deps: debug@1.0.4
+ * deps: depd@0.4.2
+ - Add `TRACE_DEPRECATION` environment variable
+ - Remove non-standard grey color from color output
+ - Support `--no-deprecation` argument
+ - Support `--trace-deprecation` argument
+
+0.6.0 / 2014-07-11
+==================
+
+ * Deprecate `from` option; use `root` option
+ * Deprecate `send.etag()` -- use `etag` in `options`
+ * Deprecate `send.hidden()` -- use `hidden` in `options`
+ * Deprecate `send.index()` -- use `index` in `options`
+ * Deprecate `send.maxage()` -- use `maxAge` in `options`
+ * Deprecate `send.root()` -- use `root` in `options`
+ * Cap `maxAge` value to 1 year
+ * deps: debug@1.0.3
+ - Add support for multiple wildcards in namespaces
+
+0.5.0 / 2014-06-28
+==================
+
+ * Accept string for `maxAge` (converted by `ms`)
+ * Add `headers` event
+ * Include link in default redirect response
+ * Use `EventEmitter.listenerCount` to count listeners
+
+0.4.3 / 2014-06-11
+==================
+
+ * Do not throw un-catchable error on file open race condition
+ * Use `escape-html` for HTML escaping
+ * deps: debug@1.0.2
+ - fix some debugging output colors on node.js 0.8
+ * deps: finished@1.2.2
+ * deps: fresh@0.2.2
+
+0.4.2 / 2014-06-09
+==================
+
+ * fix "event emitter leak" warnings
+ * deps: debug@1.0.1
+ * deps: finished@1.2.1
+
+0.4.1 / 2014-06-02
+==================
+
+ * Send `max-age` in `Cache-Control` in correct format
+
+0.4.0 / 2014-05-27
+==================
+
+ * Calculate ETag with md5 for reduced collisions
+ * Fix wrong behavior when index file matches directory
+ * Ignore stream errors after request ends
+ - Goodbye `EBADF, read`
+ * Skip directories in index file search
+ * deps: debug@0.8.1
+
+0.3.0 / 2014-04-24
+==================
+
+ * Fix sending files with dots without root set
+ * Coerce option types
+ * Accept API options in options object
+ * Set etags to "weak"
+ * Include file path in etag
+ * Make "Can't set headers after they are sent." catchable
+ * Send full entity-body for multi range requests
+ * Default directory access to 403 when index disabled
+ * Support multiple index paths
+ * Support "If-Range" header
+ * Control whether to generate etags
+ * deps: mime@1.2.11
+
+0.2.0 / 2014-01-29
+==================
+
+ * update range-parser and fresh
+
+0.1.4 / 2013-08-11
+==================
+
+ * update fresh
+
+0.1.3 / 2013-07-08
+==================
+
+ * Revert "Fix fd leak"
+
+0.1.2 / 2013-07-03
+==================
+
+ * Fix fd leak
+
+0.1.0 / 2012-08-25
+==================
+
+ * add options parameter to send() that is passed to fs.createReadStream() [kanongil]
+
+0.0.4 / 2012-08-16
+==================
+
+ * allow custom "Accept-Ranges" definition
+
+0.0.3 / 2012-07-16
+==================
+
+ * fix normalization of the root directory. Closes #3
+
+0.0.2 / 2012-07-09
+==================
+
+ * add passing of req explicitly for now (YUCK)
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/LICENSE b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/LICENSE
new file mode 100644
index 0000000..e4d595b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2012 TJ Holowaychuk
+Copyright (c) 2014-2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/README.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/README.md
new file mode 100644
index 0000000..3586060
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/README.md
@@ -0,0 +1,195 @@
+# send
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Linux Build][travis-image]][travis-url]
+[![Windows Build][appveyor-image]][appveyor-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+Send is a library for streaming files from the file system as a http response
+supporting partial responses (Ranges), conditional-GET negotiation, high test
+coverage, and granular events which may be leveraged to take appropriate actions
+in your application or framework.
+
+Looking to serve up entire folders mapped to URLs? Try [serve-static](https://www.npmjs.org/package/serve-static).
+
+## Installation
+
+```bash
+$ npm install send
+```
+
+## API
+
+```js
+var send = require('send')
+```
+
+### send(req, path, [options])
+
+Create a new `SendStream` for the given path to send to a `res`. The `req` is
+the Node.js HTTP request and the `path` is a urlencoded path to send (urlencoded,
+not the actual file-system path).
+
+#### Options
+
+##### dotfiles
+
+Set how "dotfiles" are treated when encountered. A dotfile is a file
+or directory that begins with a dot ("."). Note this check is done on
+the path itself without checking if the path actually exists on the
+disk. If `root` is specified, only the dotfiles above the root are
+checked (i.e. the root itself can be within a dotfile when when set
+to "deny").
+
+ - `'allow'` No special treatment for dotfiles.
+ - `'deny'` Send a 403 for any request for a dotfile.
+ - `'ignore'` Pretend like the dotfile does not exist and 404.
+
+The default value is _similar_ to `'ignore'`, with the exception that
+this default will not ignore the files within a directory that begins
+with a dot, for backward-compatibility.
+
+##### etag
+
+Enable or disable etag generation, defaults to true.
+
+##### extensions
+
+If a given file doesn't exist, try appending one of the given extensions,
+in the given order. By default, this is disabled (set to `false`). An
+example value that will serve extension-less HTML files: `['html', 'htm']`.
+This is skipped if the requested file already has an extension.
+
+##### index
+
+By default send supports "index.html" files, to disable this
+set `false` or to supply a new index pass a string or an array
+in preferred order.
+
+##### lastModified
+
+Enable or disable `Last-Modified` header, defaults to true. Uses the file
+system's last modified value.
+
+##### maxAge
+
+Provide a max-age in milliseconds for http caching, defaults to 0.
+This can also be a string accepted by the
+[ms](https://www.npmjs.org/package/ms#readme) module.
+
+##### root
+
+Serve files relative to `path`.
+
+### Events
+
+The `SendStream` is an event emitter and will emit the following events:
+
+ - `error` an error occurred `(err)`
+ - `directory` a directory was requested
+ - `file` a file was requested `(path, stat)`
+ - `headers` the headers are about to be set on a file `(res, path, stat)`
+ - `stream` file streaming has started `(stream)`
+ - `end` streaming has completed
+
+### .pipe
+
+The `pipe` method is used to pipe the response into the Node.js HTTP response
+object, typically `send(req, path, options).pipe(res)`.
+
+## Error-handling
+
+By default when no `error` listeners are present an automatic response will be
+made, otherwise you have full control over the response, aka you may show a 5xx
+page etc.
+
+## Caching
+
+It does _not_ perform internal caching, you should use a reverse proxy cache
+such as Varnish for this, or those fancy things called CDNs. If your
+application is small enough that it would benefit from single-node memory
+caching, it's small enough that it does not need caching at all ;).
+
+## Debugging
+
+To enable `debug()` instrumentation output export __DEBUG__:
+
+```
+$ DEBUG=send node app
+```
+
+## Running tests
+
+```
+$ npm install
+$ npm test
+```
+
+## Examples
+
+### Small example
+
+```js
+var http = require('http');
+var send = require('send');
+
+var app = http.createServer(function(req, res){
+ send(req, req.url).pipe(res);
+}).listen(3000);
+```
+
+Serving from a root directory with custom error-handling:
+
+```js
+var http = require('http');
+var send = require('send');
+var url = require('url');
+
+var app = http.createServer(function(req, res){
+ // your custom error-handling logic:
+ function error(err) {
+ res.statusCode = err.status || 500;
+ res.end(err.message);
+ }
+
+ // your custom headers
+ function headers(res, path, stat) {
+ // serve all files for download
+ res.setHeader('Content-Disposition', 'attachment');
+ }
+
+ // your custom directory handling logic:
+ function redirect() {
+ res.statusCode = 301;
+ res.setHeader('Location', req.url + '/');
+ res.end('Redirecting to ' + req.url + '/');
+ }
+
+ // transfer arbitrary files from within
+ // /www/example.com/public/*
+ send(req, url.parse(req.url).pathname, {root: '/www/example.com/public'})
+ .on('error', error)
+ .on('directory', redirect)
+ .on('headers', headers)
+ .pipe(res);
+}).listen(3000);
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/send.svg
+[npm-url]: https://npmjs.org/package/send
+[travis-image]: https://img.shields.io/travis/pillarjs/send/master.svg?label=linux
+[travis-url]: https://travis-ci.org/pillarjs/send
+[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/send/master.svg?label=windows
+[appveyor-url]: https://ci.appveyor.com/project/dougwilson/send
+[coveralls-image]: https://img.shields.io/coveralls/pillarjs/send/master.svg
+[coveralls-url]: https://coveralls.io/r/pillarjs/send?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/send.svg
+[downloads-url]: https://npmjs.org/package/send
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
+[gratipay-url]: https://www.gratipay.com/dougwilson/
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/index.js
new file mode 100644
index 0000000..e424edf
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/index.js
@@ -0,0 +1,788 @@
+/*!
+ * send
+ * Copyright(c) 2012 TJ Holowaychuk
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var debug = require('debug')('send')
+var deprecate = require('depd')('send')
+var destroy = require('destroy')
+var escapeHtml = require('escape-html')
+ , parseRange = require('range-parser')
+ , Stream = require('stream')
+ , mime = require('mime')
+ , fresh = require('fresh')
+ , path = require('path')
+ , http = require('http')
+ , fs = require('fs')
+ , normalize = path.normalize
+ , join = path.join
+var etag = require('etag')
+var EventEmitter = require('events').EventEmitter;
+var ms = require('ms');
+var onFinished = require('on-finished')
+
+/**
+ * Variables.
+ */
+var extname = path.extname
+var maxMaxAge = 60 * 60 * 24 * 365 * 1000; // 1 year
+var resolve = path.resolve
+var sep = path.sep
+var toString = Object.prototype.toString
+var upPathRegexp = /(?:^|[\\\/])\.\.(?:[\\\/]|$)/
+
+/**
+ * Expose `send`.
+ */
+
+exports = module.exports = send;
+
+/**
+ * Expose mime module.
+ */
+
+exports.mime = mime;
+
+/**
+ * Shim EventEmitter.listenerCount for node.js < 0.10
+ */
+
+/* istanbul ignore next */
+var listenerCount = EventEmitter.listenerCount
+ || function(emitter, type){ return emitter.listeners(type).length; };
+
+/**
+ * Return a `SendStream` for `req` and `path`.
+ *
+ * @param {Request} req
+ * @param {String} path
+ * @param {object} [options]
+ * @return {SendStream}
+ * @api public
+ */
+
+function send(req, path, options) {
+ return new SendStream(req, path, options);
+}
+
+/**
+ * Initialize a `SendStream` with the given `path`.
+ *
+ * @param {Request} req
+ * @param {String} path
+ * @param {object} [options]
+ * @api private
+ */
+
+function SendStream(req, path, options) {
+ var opts = options || {}
+
+ this.options = opts
+ this.path = path
+ this.req = req
+
+ this._etag = opts.etag !== undefined
+ ? Boolean(opts.etag)
+ : true
+
+ this._dotfiles = opts.dotfiles !== undefined
+ ? opts.dotfiles
+ : 'ignore'
+
+ if (['allow', 'deny', 'ignore'].indexOf(this._dotfiles) === -1) {
+ throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"')
+ }
+
+ this._hidden = Boolean(opts.hidden)
+
+ if (opts.hidden !== undefined) {
+ deprecate('hidden: use dotfiles: \'' + (this._hidden ? 'allow' : 'ignore') + '\' instead')
+ }
+
+ // legacy support
+ if (opts.dotfiles === undefined) {
+ this._dotfiles = undefined
+ }
+
+ this._extensions = opts.extensions !== undefined
+ ? normalizeList(opts.extensions)
+ : []
+
+ this._index = opts.index !== undefined
+ ? normalizeList(opts.index)
+ : ['index.html']
+
+ this._lastModified = opts.lastModified !== undefined
+ ? Boolean(opts.lastModified)
+ : true
+
+ this._maxage = opts.maxAge || opts.maxage
+ this._maxage = typeof this._maxage === 'string'
+ ? ms(this._maxage)
+ : Number(this._maxage)
+ this._maxage = !isNaN(this._maxage)
+ ? Math.min(Math.max(0, this._maxage), maxMaxAge)
+ : 0
+
+ this._root = opts.root
+ ? resolve(opts.root)
+ : null
+
+ if (!this._root && opts.from) {
+ this.from(opts.from)
+ }
+}
+
+/**
+ * Inherits from `Stream.prototype`.
+ */
+
+SendStream.prototype.__proto__ = Stream.prototype;
+
+/**
+ * Enable or disable etag generation.
+ *
+ * @param {Boolean} val
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.etag = deprecate.function(function etag(val) {
+ val = Boolean(val);
+ debug('etag %s', val);
+ this._etag = val;
+ return this;
+}, 'send.etag: pass etag as option');
+
+/**
+ * Enable or disable "hidden" (dot) files.
+ *
+ * @param {Boolean} path
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.hidden = deprecate.function(function hidden(val) {
+ val = Boolean(val);
+ debug('hidden %s', val);
+ this._hidden = val;
+ this._dotfiles = undefined
+ return this;
+}, 'send.hidden: use dotfiles option');
+
+/**
+ * Set index `paths`, set to a falsy
+ * value to disable index support.
+ *
+ * @param {String|Boolean|Array} paths
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.index = deprecate.function(function index(paths) {
+ var index = !paths ? [] : normalizeList(paths);
+ debug('index %o', paths);
+ this._index = index;
+ return this;
+}, 'send.index: pass index as option');
+
+/**
+ * Set root `path`.
+ *
+ * @param {String} path
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.root = function(path){
+ path = String(path);
+ this._root = resolve(path)
+ return this;
+};
+
+SendStream.prototype.from = deprecate.function(SendStream.prototype.root,
+ 'send.from: pass root as option');
+
+SendStream.prototype.root = deprecate.function(SendStream.prototype.root,
+ 'send.root: pass root as option');
+
+/**
+ * Set max-age to `maxAge`.
+ *
+ * @param {Number} maxAge
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.maxage = deprecate.function(function maxage(maxAge) {
+ maxAge = typeof maxAge === 'string'
+ ? ms(maxAge)
+ : Number(maxAge);
+ if (isNaN(maxAge)) maxAge = 0;
+ if (Infinity == maxAge) maxAge = 60 * 60 * 24 * 365 * 1000;
+ debug('max-age %d', maxAge);
+ this._maxage = maxAge;
+ return this;
+}, 'send.maxage: pass maxAge as option');
+
+/**
+ * Emit error with `status`.
+ *
+ * @param {Number} status
+ * @api private
+ */
+
+SendStream.prototype.error = function(status, err){
+ var res = this.res;
+ var msg = http.STATUS_CODES[status];
+
+ err = err || new Error(msg);
+ err.status = status;
+
+ // emit if listeners instead of responding
+ if (listenerCount(this, 'error') !== 0) {
+ return this.emit('error', err);
+ }
+
+ // wipe all existing headers
+ res._headers = undefined;
+
+ res.statusCode = err.status;
+ res.end(msg);
+};
+
+/**
+ * Check if the pathname ends with "/".
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.hasTrailingSlash = function(){
+ return '/' == this.path[this.path.length - 1];
+};
+
+/**
+ * Check if this is a conditional GET request.
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isConditionalGET = function(){
+ return this.req.headers['if-none-match']
+ || this.req.headers['if-modified-since'];
+};
+
+/**
+ * Strip content-* header fields.
+ *
+ * @api private
+ */
+
+SendStream.prototype.removeContentHeaderFields = function(){
+ var res = this.res;
+ Object.keys(res._headers).forEach(function(field){
+ if (0 == field.indexOf('content')) {
+ res.removeHeader(field);
+ }
+ });
+};
+
+/**
+ * Respond with 304 not modified.
+ *
+ * @api private
+ */
+
+SendStream.prototype.notModified = function(){
+ var res = this.res;
+ debug('not modified');
+ this.removeContentHeaderFields();
+ res.statusCode = 304;
+ res.end();
+};
+
+/**
+ * Raise error that headers already sent.
+ *
+ * @api private
+ */
+
+SendStream.prototype.headersAlreadySent = function headersAlreadySent(){
+ var err = new Error('Can\'t set headers after they are sent.');
+ debug('headers already sent');
+ this.error(500, err);
+};
+
+/**
+ * Check if the request is cacheable, aka
+ * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}).
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isCachable = function(){
+ var res = this.res;
+ return (res.statusCode >= 200 && res.statusCode < 300) || 304 == res.statusCode;
+};
+
+/**
+ * Handle stat() error.
+ *
+ * @param {Error} err
+ * @api private
+ */
+
+SendStream.prototype.onStatError = function(err){
+ var notfound = ['ENOENT', 'ENAMETOOLONG', 'ENOTDIR'];
+ if (~notfound.indexOf(err.code)) return this.error(404, err);
+ this.error(500, err);
+};
+
+/**
+ * Check if the cache is fresh.
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isFresh = function(){
+ return fresh(this.req.headers, this.res._headers);
+};
+
+/**
+ * Check if the range is fresh.
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isRangeFresh = function isRangeFresh(){
+ var ifRange = this.req.headers['if-range'];
+
+ if (!ifRange) return true;
+
+ return ~ifRange.indexOf('"')
+ ? ~ifRange.indexOf(this.res._headers['etag'])
+ : Date.parse(this.res._headers['last-modified']) <= Date.parse(ifRange);
+};
+
+/**
+ * Redirect to `path`.
+ *
+ * @param {String} path
+ * @api private
+ */
+
+SendStream.prototype.redirect = function(path){
+ if (listenerCount(this, 'directory') !== 0) {
+ return this.emit('directory');
+ }
+
+ if (this.hasTrailingSlash()) return this.error(403);
+ var res = this.res;
+ path += '/';
+ res.statusCode = 301;
+ res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ res.setHeader('Location', path);
+ res.end('Redirecting to <a href="' + escapeHtml(path) + '">' + escapeHtml(path) + '</a>\n');
+};
+
+/**
+ * Pipe to `res.
+ *
+ * @param {Stream} res
+ * @return {Stream} res
+ * @api public
+ */
+
+SendStream.prototype.pipe = function(res){
+ var self = this
+ , args = arguments
+ , root = this._root;
+
+ // references
+ this.res = res;
+
+ // decode the path
+ var path = decode(this.path)
+ if (path === -1) return this.error(400)
+
+ // null byte(s)
+ if (~path.indexOf('\0')) return this.error(400);
+
+ var parts
+ if (root !== null) {
+ // malicious path
+ if (upPathRegexp.test(normalize('.' + sep + path))) {
+ debug('malicious path "%s"', path)
+ return this.error(403)
+ }
+
+ // join / normalize from optional root dir
+ path = normalize(join(root, path))
+ root = normalize(root + sep)
+
+ // explode path parts
+ parts = path.substr(root.length).split(sep)
+ } else {
+ // ".." is malicious without "root"
+ if (upPathRegexp.test(path)) {
+ debug('malicious path "%s"', path)
+ return this.error(403)
+ }
+
+ // explode path parts
+ parts = normalize(path).split(sep)
+
+ // resolve the path
+ path = resolve(path)
+ }
+
+ // dotfile handling
+ if (containsDotFile(parts)) {
+ var access = this._dotfiles
+
+ // legacy support
+ if (access === undefined) {
+ access = parts[parts.length - 1][0] === '.'
+ ? (this._hidden ? 'allow' : 'ignore')
+ : 'allow'
+ }
+
+ debug('%s dotfile "%s"', access, path)
+ switch (access) {
+ case 'allow':
+ break
+ case 'deny':
+ return this.error(403)
+ case 'ignore':
+ default:
+ return this.error(404)
+ }
+ }
+
+ // index file support
+ if (this._index.length && this.path[this.path.length - 1] === '/') {
+ this.sendIndex(path);
+ return res;
+ }
+
+ this.sendFile(path);
+ return res;
+};
+
+/**
+ * Transfer `path`.
+ *
+ * @param {String} path
+ * @api public
+ */
+
+SendStream.prototype.send = function(path, stat){
+ var len = stat.size;
+ var options = this.options
+ var opts = {}
+ var res = this.res;
+ var req = this.req;
+ var ranges = req.headers.range;
+ var offset = options.start || 0;
+
+ if (res._header) {
+ // impossible to send now
+ return this.headersAlreadySent();
+ }
+
+ debug('pipe "%s"', path)
+
+ // set header fields
+ this.setHeader(path, stat);
+
+ // set content-type
+ this.type(path);
+
+ // conditional GET support
+ if (this.isConditionalGET()
+ && this.isCachable()
+ && this.isFresh()) {
+ return this.notModified();
+ }
+
+ // adjust len to start/end options
+ len = Math.max(0, len - offset);
+ if (options.end !== undefined) {
+ var bytes = options.end - offset + 1;
+ if (len > bytes) len = bytes;
+ }
+
+ // Range support
+ if (ranges) {
+ ranges = parseRange(len, ranges);
+
+ // If-Range support
+ if (!this.isRangeFresh()) {
+ debug('range stale');
+ ranges = -2;
+ }
+
+ // unsatisfiable
+ if (-1 == ranges) {
+ debug('range unsatisfiable');
+ res.setHeader('Content-Range', 'bytes */' + stat.size);
+ return this.error(416);
+ }
+
+ // valid (syntactically invalid/multiple ranges are treated as a regular response)
+ if (-2 != ranges && ranges.length === 1) {
+ debug('range %j', ranges);
+
+ // Content-Range
+ res.statusCode = 206;
+ res.setHeader('Content-Range', 'bytes '
+ + ranges[0].start
+ + '-'
+ + ranges[0].end
+ + '/'
+ + len);
+
+ offset += ranges[0].start;
+ len = ranges[0].end - ranges[0].start + 1;
+ }
+ }
+
+ // clone options
+ for (var prop in options) {
+ opts[prop] = options[prop]
+ }
+
+ // set read options
+ opts.start = offset
+ opts.end = Math.max(offset, offset + len - 1)
+
+ // content-length
+ res.setHeader('Content-Length', len);
+
+ // HEAD support
+ if ('HEAD' == req.method) return res.end();
+
+ this.stream(path, opts)
+};
+
+/**
+ * Transfer file for `path`.
+ *
+ * @param {String} path
+ * @api private
+ */
+SendStream.prototype.sendFile = function sendFile(path) {
+ var i = 0
+ var self = this
+
+ debug('stat "%s"', path);
+ fs.stat(path, function onstat(err, stat) {
+ if (err && err.code === 'ENOENT'
+ && !extname(path)
+ && path[path.length - 1] !== sep) {
+ // not found, check extensions
+ return next(err)
+ }
+ if (err) return self.onStatError(err)
+ if (stat.isDirectory()) return self.redirect(self.path)
+ self.emit('file', path, stat)
+ self.send(path, stat)
+ })
+
+ function next(err) {
+ if (self._extensions.length <= i) {
+ return err
+ ? self.onStatError(err)
+ : self.error(404)
+ }
+
+ var p = path + '.' + self._extensions[i++]
+
+ debug('stat "%s"', p)
+ fs.stat(p, function (err, stat) {
+ if (err) return next(err)
+ if (stat.isDirectory()) return next()
+ self.emit('file', p, stat)
+ self.send(p, stat)
+ })
+ }
+}
+
+/**
+ * Transfer index for `path`.
+ *
+ * @param {String} path
+ * @api private
+ */
+SendStream.prototype.sendIndex = function sendIndex(path){
+ var i = -1;
+ var self = this;
+
+ function next(err){
+ if (++i >= self._index.length) {
+ if (err) return self.onStatError(err);
+ return self.error(404);
+ }
+
+ var p = join(path, self._index[i]);
+
+ debug('stat "%s"', p);
+ fs.stat(p, function(err, stat){
+ if (err) return next(err);
+ if (stat.isDirectory()) return next();
+ self.emit('file', p, stat);
+ self.send(p, stat);
+ });
+ }
+
+ next();
+};
+
+/**
+ * Stream `path` to the response.
+ *
+ * @param {String} path
+ * @param {Object} options
+ * @api private
+ */
+
+SendStream.prototype.stream = function(path, options){
+ // TODO: this is all lame, refactor meeee
+ var finished = false;
+ var self = this;
+ var res = this.res;
+ var req = this.req;
+
+ // pipe
+ var stream = fs.createReadStream(path, options);
+ this.emit('stream', stream);
+ stream.pipe(res);
+
+ // response finished, done with the fd
+ onFinished(res, function onfinished(){
+ finished = true;
+ destroy(stream);
+ });
+
+ // error handling code-smell
+ stream.on('error', function onerror(err){
+ // request already finished
+ if (finished) return;
+
+ // clean up stream
+ finished = true;
+ destroy(stream);
+
+ // error
+ self.onStatError(err);
+ });
+
+ // end
+ stream.on('end', function onend(){
+ self.emit('end');
+ });
+};
+
+/**
+ * Set content-type based on `path`
+ * if it hasn't been explicitly set.
+ *
+ * @param {String} path
+ * @api private
+ */
+
+SendStream.prototype.type = function(path){
+ var res = this.res;
+ if (res.getHeader('Content-Type')) return;
+ var type = mime.lookup(path);
+ var charset = mime.charsets.lookup(type);
+ debug('content-type %s', type);
+ res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : ''));
+};
+
+/**
+ * Set response header fields, most
+ * fields may be pre-defined.
+ *
+ * @param {String} path
+ * @param {Object} stat
+ * @api private
+ */
+
+SendStream.prototype.setHeader = function setHeader(path, stat){
+ var res = this.res;
+
+ this.emit('headers', res, path, stat);
+
+ if (!res.getHeader('Accept-Ranges')) res.setHeader('Accept-Ranges', 'bytes');
+ if (!res.getHeader('Date')) res.setHeader('Date', new Date().toUTCString());
+ if (!res.getHeader('Cache-Control')) res.setHeader('Cache-Control', 'public, max-age=' + Math.floor(this._maxage / 1000));
+
+ if (this._lastModified && !res.getHeader('Last-Modified')) {
+ var modified = stat.mtime.toUTCString()
+ debug('modified %s', modified)
+ res.setHeader('Last-Modified', modified)
+ }
+
+ if (this._etag && !res.getHeader('ETag')) {
+ var val = etag(stat)
+ debug('etag %s', val)
+ res.setHeader('ETag', val)
+ }
+};
+
+/**
+ * Determine if path parts contain a dotfile.
+ *
+ * @api private
+ */
+
+function containsDotFile(parts) {
+ for (var i = 0; i < parts.length; i++) {
+ if (parts[i][0] === '.') {
+ return true
+ }
+ }
+
+ return false
+}
+
+/**
+ * decodeURIComponent.
+ *
+ * Allows V8 to only deoptimize this fn instead of all
+ * of send().
+ *
+ * @param {String} path
+ * @api private
+ */
+
+function decode(path) {
+ try {
+ return decodeURIComponent(path)
+ } catch (err) {
+ return -1
+ }
+}
+
+/**
+ * Normalize the index option into an array.
+ *
+ * @param {boolean|string|array} val
+ * @api private
+ */
+
+function normalizeList(val){
+ return [].concat(val || [])
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/.bin/mime b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/.bin/mime
new file mode 120000
index 0000000..fbb7ee0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/.bin/mime
@@ -0,0 +1 @@
+../mime/cli.js
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/History.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/History.md
new file mode 100644
index 0000000..bdbcf58
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/History.md
@@ -0,0 +1,67 @@
+1.0.0 / 2014-09-17
+==================
+
+ * No changes
+
+0.4.5 / 2014-09-09
+==================
+
+ * Improve call speed to functions using the function wrapper
+ * Support Node.js 0.6
+
+0.4.4 / 2014-07-27
+==================
+
+ * Work-around v8 generating empty stack traces
+
+0.4.3 / 2014-07-26
+==================
+
+ * Fix exception when global `Error.stackTraceLimit` is too low
+
+0.4.2 / 2014-07-19
+==================
+
+ * Correct call site for wrapped functions and properties
+
+0.4.1 / 2014-07-19
+==================
+
+ * Improve automatic message generation for function properties
+
+0.4.0 / 2014-07-19
+==================
+
+ * Add `TRACE_DEPRECATION` environment variable
+ * Remove non-standard grey color from color output
+ * Support `--no-deprecation` argument
+ * Support `--trace-deprecation` argument
+ * Support `deprecate.property(fn, prop, message)`
+
+0.3.0 / 2014-06-16
+==================
+
+ * Add `NO_DEPRECATION` environment variable
+
+0.2.0 / 2014-06-15
+==================
+
+ * Add `deprecate.property(obj, prop, message)`
+ * Remove `supports-color` dependency for node.js 0.8
+
+0.1.0 / 2014-06-15
+==================
+
+ * Add `deprecate.function(fn, message)`
+ * Add `process.on('deprecation', fn)` emitter
+ * Automatically generate message when omitted from `deprecate()`
+
+0.0.1 / 2014-06-15
+==================
+
+ * Fix warning for dynamic calls at singe call site
+
+0.0.0 / 2014-06-15
+==================
+
+ * Initial implementation
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/LICENSE b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/Readme.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/Readme.md
new file mode 100644
index 0000000..9fb2737
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/Readme.md
@@ -0,0 +1,271 @@
+# depd
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+Deprecate all the things
+
+> With great modules comes great responsibility; mark things deprecated!
+
+## Install
+
+```sh
+$ npm install depd
+```
+
+## API
+
+```js
+var deprecate = require('depd')('my-module')
+```
+
+This library allows you to display deprecation messages to your users.
+This library goes above and beyond with deprecation warnings by
+introspection of the call stack (but only the bits that it is interested
+in).
+
+Instead of just warning on the first invocation of a deprecated
+function and never again, this module will warn on the first invocation
+of a deprecated function per unique call site, making it ideal to alert
+users of all deprecated uses across the code base, rather than just
+whatever happens to execute first.
+
+The deprecation warnings from this module also include the file and line
+information for the call into the module that the deprecated function was
+in.
+
+**NOTE** this library has a similar interface to the `debug` module, and
+this module uses the calling file to get the boundary for the call stacks,
+so you should always create a new `deprecate` object in each file and not
+within some central file.
+
+### depd(namespace)
+
+Create a new deprecate function that uses the given namespace name in the
+messages and will display the call site prior to the stack entering the
+file this function was called from. It is highly suggested you use the
+name of your module as the namespace.
+
+### deprecate(message)
+
+Call this function from deprecated code to display a deprecation message.
+This message will appear once per unique caller site. Caller site is the
+first call site in the stack in a different file from the caller of this
+function.
+
+If the message is omitted, a message is generated for you based on the site
+of the `deprecate()` call and will display the name of the function called,
+similar to the name displayed in a stack trace.
+
+### deprecate.function(fn, message)
+
+Call this function to wrap a given function in a deprecation message on any
+call to the function. An optional message can be supplied to provide a custom
+message.
+
+### deprecate.property(obj, prop, message)
+
+Call this function to wrap a given property on object in a deprecation message
+on any accessing or setting of the property. An optional message can be supplied
+to provide a custom message.
+
+The method must be called on the object where the property belongs (not
+inherited from the prototype).
+
+If the property is a data descriptor, it will be converted to an accessor
+descriptor in order to display the deprecation message.
+
+### process.on('deprecation', fn)
+
+This module will allow easy capturing of deprecation errors by emitting the
+errors as the type "deprecation" on the global `process`. If there are no
+listeners for this type, the errors are written to STDERR as normal, but if
+there are any listeners, nothing will be written to STDERR and instead only
+emitted. From there, you can write the errors in a different format or to a
+logging source.
+
+The error represents the deprecation and is emitted only once with the same
+rules as writing to STDERR. The error has the following properties:
+
+ - `message` - This is the message given by the library
+ - `name` - This is always `'DeprecationError'`
+ - `namespace` - This is the namespace the deprecation came from
+ - `stack` - This is the stack of the call to the deprecated thing
+
+Example `error.stack` output:
+
+```
+DeprecationError: my-cool-module deprecated oldfunction
+ at Object.<anonymous> ([eval]-wrapper:6:22)
+ at Module._compile (module.js:456:26)
+ at evalScript (node.js:532:25)
+ at startup (node.js:80:7)
+ at node.js:902:3
+```
+
+### process.env.NO_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `NO_DEPRECATION`
+is provided as a quick solution to silencing deprecation warnings from being
+output. The format of this is similar to that of `DEBUG`:
+
+```sh
+$ NO_DEPRECATION=my-module,othermod node app.js
+```
+
+This will suppress deprecations from being output for "my-module" and "othermod".
+The value is a list of comma-separated namespaces. To suppress every warning
+across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--no-deprecation` to the `node` executable will suppress
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not suppress the deperecations given to any "deprecation"
+event listeners, just the output to STDERR.
+
+### process.env.TRACE_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION`
+is provided as a solution to getting more detailed location information in deprecation
+warnings by including the entire stack trace. The format of this is the same as
+`NO_DEPRECATION`:
+
+```sh
+$ TRACE_DEPRECATION=my-module,othermod node app.js
+```
+
+This will include stack traces for deprecations being output for "my-module" and
+"othermod". The value is a list of comma-separated namespaces. To trace every
+warning across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--trace-deprecation` to the `node` executable will trace
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`.
+
+## Display
+
+![message](files/message.png)
+
+When a user calls a function in your library that you mark deprecated, they
+will see the following written to STDERR (in the given colors, similar colors
+and layout to the `debug` module):
+
+```
+bright cyan bright yellow
+| | reset cyan
+| | | |
+▼ ▼ ▼ ▼
+my-cool-module deprecated oldfunction [eval]-wrapper:6:22
+▲ ▲ ▲ ▲
+| | | |
+namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+If the user redirects their STDERR to a file or somewhere that does not support
+colors, they see (similar layout to the `debug` module):
+
+```
+Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22
+▲ ▲ ▲ ▲ ▲
+| | | | |
+timestamp of message namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+## Examples
+
+### Deprecating all calls to a function
+
+This will display a deprecated message about "oldfunction" being deprecated
+from "my-module" on STDERR.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+// message automatically derived from function name
+// Object.oldfunction
+exports.oldfunction = deprecate.function(function oldfunction() {
+ // all calls to function are deprecated
+})
+
+// specific message
+exports.oldfunction = deprecate.function(function () {
+ // all calls to function are deprecated
+}, 'oldfunction')
+```
+
+### Conditionally deprecating a function call
+
+This will display a deprecated message about "weirdfunction" being deprecated
+from "my-module" on STDERR when called with less than 2 arguments.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ }
+}
+```
+
+When calling `deprecate` as a function, the warning is counted per call site
+within your own module, so you can display different deprecations depending
+on different situations and the users will still get all the warnings:
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ } else if (typeof arguments[0] !== 'string') {
+ // calls with non-string first argument are deprecated
+ deprecate('weirdfunction non-string first arg')
+ }
+}
+```
+
+### Deprecating property access
+
+This will display a deprecated message about "oldprop" being deprecated
+from "my-module" on STDERR when accessed. A deprecation will be displayed
+when setting the value and when getting the value.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.oldprop = 'something'
+
+// message automatically derives from property name
+deprecate.property(exports, 'oldprop')
+
+// explicit message
+deprecate.property(exports, 'oldprop', 'oldprop >= 0.10')
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-version-image]: https://img.shields.io/npm/v/depd.svg?style=flat
+[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg?style=flat
+[npm-url]: https://npmjs.org/package/depd
+[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd.svg?style=flat
+[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd
+[coveralls-image]: https://img.shields.io/coveralls/dougwilson/nodejs-depd.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master
+[node-image]: https://img.shields.io/node/v/depd.svg?style=flat
+[node-url]: http://nodejs.org/download/
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat
+[gratipay-url]: https://www.gratipay.com/dougwilson/
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/index.js
new file mode 100644
index 0000000..4fee4d9
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/index.js
@@ -0,0 +1,522 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var callSiteToString = require('./lib/compat').callSiteToString
+var EventEmitter = require('events').EventEmitter
+var relative = require('path').relative
+
+/**
+ * Module exports.
+ */
+
+module.exports = depd
+
+/**
+ * Get the path to base files on.
+ */
+
+var basePath = process.cwd()
+
+/**
+ * Get listener count on event emitter.
+ */
+
+/*istanbul ignore next*/
+var eventListenerCount = EventEmitter.listenerCount
+ || function (emitter, type) { return emitter.listeners(type).length }
+
+/**
+ * Determine if namespace is contained in the string.
+ */
+
+function containsNamespace(str, namespace) {
+ var val = str.split(/[ ,]+/)
+
+ namespace = String(namespace).toLowerCase()
+
+ for (var i = 0 ; i < val.length; i++) {
+ if (!(str = val[i])) continue;
+
+ // namespace contained
+ if (str === '*' || str.toLowerCase() === namespace) {
+ return true
+ }
+ }
+
+ return false
+}
+
+/**
+ * Convert a data descriptor to accessor descriptor.
+ */
+
+function convertDataDescriptorToAccessor(obj, prop, message) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+ var value = descriptor.value
+
+ descriptor.get = function getter() { return value }
+
+ if (descriptor.writable) {
+ descriptor.set = function setter(val) { return value = val }
+ }
+
+ delete descriptor.value
+ delete descriptor.writable
+
+ Object.defineProperty(obj, prop, descriptor)
+
+ return descriptor
+}
+
+/**
+ * Create arguments string to keep arity.
+ */
+
+function createArgumentsString(arity) {
+ var str = ''
+
+ for (var i = 0; i < arity; i++) {
+ str += ', arg' + i
+ }
+
+ return str.substr(2)
+}
+
+/**
+ * Create stack string from stack.
+ */
+
+function createStackString(stack) {
+ var str = this.name + ': ' + this.namespace
+
+ if (this.message) {
+ str += ' deprecated ' + this.message
+ }
+
+ for (var i = 0; i < stack.length; i++) {
+ str += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return str
+}
+
+/**
+ * Create deprecate for namespace in caller.
+ */
+
+function depd(namespace) {
+ if (!namespace) {
+ throw new TypeError('argument namespace is required')
+ }
+
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+ var file = site[0]
+
+ function deprecate(message) {
+ // call to self as log
+ log.call(deprecate, message)
+ }
+
+ deprecate._file = file
+ deprecate._ignored = isignored(namespace)
+ deprecate._namespace = namespace
+ deprecate._traced = istraced(namespace)
+ deprecate._warned = Object.create(null)
+
+ deprecate.function = wrapfunction
+ deprecate.property = wrapproperty
+
+ return deprecate
+}
+
+/**
+ * Determine if namespace is ignored.
+ */
+
+function isignored(namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.noDeprecation) {
+ // --no-deprecation support
+ return true
+ }
+
+ var str = process.env.NO_DEPRECATION || ''
+
+ // namespace ignored
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Determine if namespace is traced.
+ */
+
+function istraced(namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.traceDeprecation) {
+ // --trace-deprecation support
+ return true
+ }
+
+ var str = process.env.TRACE_DEPRECATION || ''
+
+ // namespace traced
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Display deprecation message.
+ */
+
+function log(message, site) {
+ var haslisteners = eventListenerCount(process, 'deprecation') !== 0
+
+ // abort early if no destination
+ if (!haslisteners && this._ignored) {
+ return
+ }
+
+ var caller
+ var callFile
+ var callSite
+ var i = 0
+ var seen = false
+ var stack = getStack()
+ var file = this._file
+
+ if (site) {
+ // provided site
+ callSite = callSiteLocation(stack[1])
+ callSite.name = site.name
+ file = callSite[0]
+ } else {
+ // get call site
+ i = 2
+ site = callSiteLocation(stack[i])
+ callSite = site
+ }
+
+ // get caller of deprecated thing in relation to file
+ for (; i < stack.length; i++) {
+ caller = callSiteLocation(stack[i])
+ callFile = caller[0]
+
+ if (callFile === file) {
+ seen = true
+ } else if (callFile === this._file) {
+ file = this._file
+ } else if (seen) {
+ break
+ }
+ }
+
+ var key = caller
+ ? site.join(':') + '__' + caller.join(':')
+ : undefined
+
+ if (key !== undefined && key in this._warned) {
+ // already warned
+ return
+ }
+
+ this._warned[key] = true
+
+ // generate automatic message from call site
+ if (!message) {
+ message = callSite === site || !callSite.name
+ ? defaultMessage(site)
+ : defaultMessage(callSite)
+ }
+
+ // emit deprecation if listeners exist
+ if (haslisteners) {
+ var err = DeprecationError(this._namespace, message, stack.slice(i))
+ process.emit('deprecation', err)
+ return
+ }
+
+ // format and write message
+ var format = process.stderr.isTTY
+ ? formatColor
+ : formatPlain
+ var msg = format.call(this, message, caller, stack.slice(i))
+ process.stderr.write(msg + '\n', 'utf8')
+
+ return
+}
+
+/**
+ * Get call site location as array.
+ */
+
+function callSiteLocation(callSite) {
+ var file = callSite.getFileName() || '<anonymous>'
+ var line = callSite.getLineNumber()
+ var colm = callSite.getColumnNumber()
+
+ if (callSite.isEval()) {
+ file = callSite.getEvalOrigin() + ', ' + file
+ }
+
+ var site = [file, line, colm]
+
+ site.callSite = callSite
+ site.name = callSite.getFunctionName()
+
+ return site
+}
+
+/**
+ * Generate a default message from the site.
+ */
+
+function defaultMessage(site) {
+ var callSite = site.callSite
+ var funcName = site.name
+ var typeName = callSite.getTypeName()
+
+ // make useful anonymous name
+ if (!funcName) {
+ funcName = '<anonymous@' + formatLocation(site) + '>'
+ }
+
+ // make useful type name
+ if (typeName === 'Function') {
+ typeName = callSite.getThis().name || typeName
+ }
+
+ return callSite.getMethodName()
+ ? typeName + '.' + funcName
+ : funcName
+}
+
+/**
+ * Format deprecation message without color.
+ */
+
+function formatPlain(msg, caller, stack) {
+ var timestamp = new Date().toUTCString()
+
+ var formatted = timestamp
+ + ' ' + this._namespace
+ + ' deprecated ' + msg
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' at ' + formatLocation(caller)
+ }
+
+ return formatted
+}
+
+/**
+ * Format deprecation message with color.
+ */
+
+function formatColor(msg, caller, stack) {
+ var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' // bold cyan
+ + ' \x1b[33;1mdeprecated\x1b[22;39m' // bold yellow
+ + ' \x1b[0m' + msg + '\x1b[39m' // reset
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+}
+
+/**
+ * Format call site location.
+ */
+
+function formatLocation(callSite) {
+ return relative(basePath, callSite[0])
+ + ':' + callSite[1]
+ + ':' + callSite[2]
+}
+
+/**
+ * Get the stack as array of call sites.
+ */
+
+function getStack() {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = Math.max(10, limit)
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice this function off the top
+ var stack = obj.stack.slice(1)
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack
+}
+
+/**
+ * Capture call site stack from v8.
+ */
+
+function prepareObjectStackTrace(obj, stack) {
+ return stack
+}
+
+/**
+ * Return a wrapped function in a deprecation message.
+ */
+
+function wrapfunction(fn, message) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('argument fn must be a function')
+ }
+
+ var args = createArgumentsString(fn.length)
+ var deprecate = this
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ site.name = fn.name
+
+ var deprecatedfn = eval('(function (' + args + ') {\n'
+ + '"use strict"\n'
+ + 'log.call(deprecate, message, site)\n'
+ + 'return fn.apply(this, arguments)\n'
+ + '})')
+
+ return deprecatedfn
+}
+
+/**
+ * Wrap property in a deprecation message.
+ */
+
+function wrapproperty(obj, prop, message) {
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
+ throw new TypeError('argument obj must be object')
+ }
+
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+
+ if (!descriptor) {
+ throw new TypeError('must call property on owner object')
+ }
+
+ if (!descriptor.configurable) {
+ throw new TypeError('property must be configurable')
+ }
+
+ var deprecate = this
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ // set site name
+ site.name = prop
+
+ // convert data descriptor
+ if ('value' in descriptor) {
+ descriptor = convertDataDescriptorToAccessor(obj, prop, message)
+ }
+
+ var get = descriptor.get
+ var set = descriptor.set
+
+ // wrap getter
+ if (typeof get === 'function') {
+ descriptor.get = function getter() {
+ log.call(deprecate, message, site)
+ return get.apply(this, arguments)
+ }
+ }
+
+ // wrap setter
+ if (typeof set === 'function') {
+ descriptor.set = function setter() {
+ log.call(deprecate, message, site)
+ return set.apply(this, arguments)
+ }
+ }
+
+ Object.defineProperty(obj, prop, descriptor)
+}
+
+/**
+ * Create DeprecationError for deprecation
+ */
+
+function DeprecationError(namespace, message, stack) {
+ var error = new Error()
+ var stackString
+
+ Object.defineProperty(error, 'constructor', {
+ value: DeprecationError
+ })
+
+ Object.defineProperty(error, 'message', {
+ configurable: true,
+ enumerable: false,
+ value: message,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'name', {
+ enumerable: false,
+ configurable: true,
+ value: 'DeprecationError',
+ writable: true
+ })
+
+ Object.defineProperty(error, 'namespace', {
+ configurable: true,
+ enumerable: false,
+ value: namespace,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'stack', {
+ configurable: true,
+ enumerable: false,
+ get: function () {
+ if (stackString !== undefined) {
+ return stackString
+ }
+
+ // prepare stack trace
+ return stackString = createStackString.call(this, stack)
+ },
+ set: function setter(val) {
+ stackString = val
+ }
+ })
+
+ return error
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/lib/compat/buffer-concat.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/lib/compat/buffer-concat.js
new file mode 100644
index 0000000..09d9721
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/lib/compat/buffer-concat.js
@@ -0,0 +1,33 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = bufferConcat
+
+/**
+ * Concatenate an array of Buffers.
+ */
+
+function bufferConcat(bufs) {
+ var length = 0
+
+ for (var i = 0, len = bufs.length; i < len; i++) {
+ length += bufs[i].length
+ }
+
+ var buf = new Buffer(length)
+ var pos = 0
+
+ for (var i = 0, len = bufs.length; i < len; i++) {
+ bufs[i].copy(buf, pos)
+ pos += bufs[i].length
+ }
+
+ return buf
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/lib/compat/callsite-tostring.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/lib/compat/callsite-tostring.js
new file mode 100644
index 0000000..17cf7ed
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/lib/compat/callsite-tostring.js
@@ -0,0 +1,101 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = callSiteToString
+
+/**
+ * Format a CallSite file location to a string.
+ */
+
+function callSiteFileLocation(callSite) {
+ var fileName
+ var fileLocation = ''
+
+ if (callSite.isNative()) {
+ fileLocation = 'native'
+ } else if (callSite.isEval()) {
+ fileName = callSite.getScriptNameOrSourceURL()
+ if (!fileName) {
+ fileLocation = callSite.getEvalOrigin()
+ }
+ } else {
+ fileName = callSite.getFileName()
+ }
+
+ if (fileName) {
+ fileLocation += fileName
+
+ var lineNumber = callSite.getLineNumber()
+ if (lineNumber != null) {
+ fileLocation += ':' + lineNumber
+
+ var columnNumber = callSite.getColumnNumber()
+ if (columnNumber) {
+ fileLocation += ':' + columnNumber
+ }
+ }
+ }
+
+ return fileLocation || 'unknown source'
+}
+
+/**
+ * Format a CallSite to a string.
+ */
+
+function callSiteToString(callSite) {
+ var addSuffix = true
+ var fileLocation = callSiteFileLocation(callSite)
+ var functionName = callSite.getFunctionName()
+ var isConstructor = callSite.isConstructor()
+ var isMethodCall = !(callSite.isToplevel() || isConstructor)
+ var line = ''
+
+ if (isMethodCall) {
+ var methodName = callSite.getMethodName()
+ var typeName = getConstructorName(callSite)
+
+ if (functionName) {
+ if (typeName && functionName.indexOf(typeName) !== 0) {
+ line += typeName + '.'
+ }
+
+ line += functionName
+
+ if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) {
+ line += ' [as ' + methodName + ']'
+ }
+ } else {
+ line += typeName + '.' + (methodName || '<anonymous>')
+ }
+ } else if (isConstructor) {
+ line += 'new ' + (functionName || '<anonymous>')
+ } else if (functionName) {
+ line += functionName
+ } else {
+ addSuffix = false
+ line += fileLocation
+ }
+
+ if (addSuffix) {
+ line += ' (' + fileLocation + ')'
+ }
+
+ return line
+}
+
+/**
+ * Get constructor name of reviver.
+ */
+
+function getConstructorName(obj) {
+ var receiver = obj.receiver
+ return (receiver.constructor && receiver.constructor.name) || null
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/lib/compat/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/lib/compat/index.js
new file mode 100644
index 0000000..7fee026
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/lib/compat/index.js
@@ -0,0 +1,69 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+lazyProperty(module.exports, 'bufferConcat', function bufferConcat() {
+ return Buffer.concat || require('./buffer-concat')
+})
+
+lazyProperty(module.exports, 'callSiteToString', function callSiteToString() {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ function prepareObjectStackTrace(obj, stack) {
+ return stack
+ }
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = 2
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice the stack
+ var stack = obj.stack.slice()
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack[0].toString ? toString : require('./callsite-tostring')
+})
+
+/**
+ * Define a lazy property.
+ */
+
+function lazyProperty(obj, prop, getter) {
+ function get() {
+ var val = getter()
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ value: val
+ })
+
+ return val
+ }
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ get: get
+ })
+}
+
+/**
+ * Call toString() on the obj
+ */
+
+function toString(obj) {
+ return obj.toString()
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/package.json
new file mode 100644
index 0000000..b72bf60
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/depd/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "depd",
+ "description": "Deprecate all the things",
+ "version": "1.0.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "deprecate",
+ "deprecated"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dougwilson/nodejs-depd"
+ },
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4",
+ "should": "~4.0.4"
+ },
+ "files": [
+ "lib/",
+ "History.md",
+ "LICENSE",
+ "index.js",
+ "Readme.md"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --reporter spec --bail --require should test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --require should test/"
+ },
+ "gitHead": "08b5a2182c8c1fdf7420e4ff8532bfd7e266a7b2",
+ "bugs": {
+ "url": "https://github.com/dougwilson/nodejs-depd/issues"
+ },
+ "homepage": "https://github.com/dougwilson/nodejs-depd",
+ "_id": "depd@1.0.0",
+ "_shasum": "2fda0d00e98aae2845d4991ab1bf1f2a199073d5",
+ "_from": "depd@~1.0.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "2fda0d00e98aae2845d4991ab1bf1f2a199073d5",
+ "tarball": "http://registry.npmjs.org/depd/-/depd-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/depd/-/depd-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/destroy/README.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/destroy/README.md
new file mode 100644
index 0000000..665acb7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/destroy/README.md
@@ -0,0 +1,38 @@
+# Destroy
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![Dependency Status][david-image]][david-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Destroy a stream.
+
+## API
+
+```js
+var destroy = require('destroy')
+
+var fs = require('fs')
+var stream = fs.createReadStream('package.json')
+destroy(stream)
+```
+
+[npm-image]: https://img.shields.io/npm/v/destroy.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/destroy
+[github-tag]: http://img.shields.io/github/tag/stream-utils/destroy.svg?style=flat-square
+[github-url]: https://github.com/stream-utils/destroy/tags
+[travis-image]: https://img.shields.io/travis/stream-utils/destroy.svg?style=flat-square
+[travis-url]: https://travis-ci.org/stream-utils/destroy
+[coveralls-image]: https://img.shields.io/coveralls/stream-utils/destroy.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/stream-utils/destroy?branch=master
+[david-image]: http://img.shields.io/david/stream-utils/destroy.svg?style=flat-square
+[david-url]: https://david-dm.org/stream-utils/destroy
+[license-image]: http://img.shields.io/npm/l/destroy.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/destroy.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/destroy
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/destroy/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/destroy/index.js
new file mode 100644
index 0000000..b455217
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/destroy/index.js
@@ -0,0 +1,36 @@
+var ReadStream = require('fs').ReadStream
+var Stream = require('stream')
+
+module.exports = function destroy(stream) {
+ if (stream instanceof ReadStream) {
+ return destroyReadStream(stream)
+ }
+
+ if (!(stream instanceof Stream)) {
+ return stream
+ }
+
+ if (typeof stream.destroy === 'function') {
+ stream.destroy()
+ }
+
+ return stream
+}
+
+function destroyReadStream(stream) {
+ stream.destroy()
+
+ if (typeof stream.close === 'function') {
+ // node.js core bug work-around
+ stream.on('open', onopenClose)
+ }
+
+ return stream
+}
+
+function onopenClose() {
+ if (typeof this.fd === 'number') {
+ // actually close down the fd
+ this.close()
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/destroy/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/destroy/package.json
new file mode 100644
index 0000000..8a58cad
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/destroy/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "destroy",
+ "description": "destroy a stream if possible",
+ "version": "1.0.3",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/stream-utils/destroy"
+ },
+ "devDependencies": {
+ "istanbul": "0",
+ "mocha": "1"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "stream",
+ "streams",
+ "destroy",
+ "cleanup",
+ "leak",
+ "fd"
+ ],
+ "gitHead": "50af95ece4a70202f9301bc3edc8f9fdbbad0f26",
+ "bugs": {
+ "url": "https://github.com/stream-utils/destroy/issues"
+ },
+ "homepage": "https://github.com/stream-utils/destroy",
+ "_id": "destroy@1.0.3",
+ "_shasum": "b433b4724e71fd8551d9885174851c5fc377e2c9",
+ "_from": "destroy@1.0.3",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b433b4724e71fd8551d9885174851c5fc377e2c9",
+ "tarball": "http://registry.npmjs.org/destroy/-/destroy-1.0.3.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.3.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/HISTORY.md
new file mode 100644
index 0000000..10cf504
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/HISTORY.md
@@ -0,0 +1,55 @@
+1.5.1 / 2014-11-19
+==================
+
+ * deps: crc@3.2.1
+ - Minor fixes
+
+1.5.0 / 2014-10-14
+==================
+
+ * Improve string performance
+ * Slightly improve speed for weak ETags over 1KB
+
+1.4.0 / 2014-09-21
+==================
+
+ * Support "fake" stats objects
+ * Support Node.js 0.6
+
+1.3.1 / 2014-09-14
+==================
+
+ * Use the (new and improved) `crc` for crc32
+
+1.3.0 / 2014-08-29
+==================
+
+ * Default strings to strong ETags
+ * Improve speed for weak ETags over 1KB
+
+1.2.1 / 2014-08-29
+==================
+
+ * Use the (much faster) `buffer-crc32` for crc32
+
+1.2.0 / 2014-08-24
+==================
+
+ * Add support for file stat objects
+
+1.1.0 / 2014-08-24
+==================
+
+ * Add fast-path for empty entity
+ * Add weak ETag generation
+ * Shrink size of generated ETags
+
+1.0.1 / 2014-08-24
+==================
+
+ * Fix behavior of string containing Unicode
+
+1.0.0 / 2014-05-18
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/LICENSE b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/README.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/README.md
new file mode 100644
index 0000000..68c16d5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/README.md
@@ -0,0 +1,141 @@
+# etag
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create simple ETags
+
+## Installation
+
+```sh
+$ npm install etag
+```
+
+## API
+
+```js
+var etag = require('etag')
+```
+
+### etag(entity, [options])
+
+Generate a strong ETag for the given entity. This should be the complete
+body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By
+default, a strong ETag is generated except for `fs.Stats`, which will
+generate a weak ETag (this can be overwritten by `options.weak`).
+
+```js
+res.setHeader('ETag', etag(body))
+```
+
+#### Options
+
+`etag` accepts these properties in the options object.
+
+##### weak
+
+Specifies if a "strong" or a "weak" ETag will be generated. The ETag can only
+really be a strong as the given input.
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## Benchmark
+
+```bash
+$ npm run-script bench
+
+> etag@1.5.1 bench nodejs-etag
+> node benchmark/index.js
+
+> node benchmark/body0-100b.js
+
+ 100B body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 425,007 ops/sec ±1.47% (184 runs sampled)
+* buffer - weak x 1,009,859 ops/sec ±0.18% (197 runs sampled)
+ string - strong x 442,096 ops/sec ±1.20% (181 runs sampled)
+ string - weak x 325,063 ops/sec ±0.31% (192 runs sampled)
+
+> node benchmark/body1-1kb.js
+
+ 1KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 263,069 ops/sec ±1.60% (190 runs sampled)
+* buffer - weak x 295,732 ops/sec ±0.43% (199 runs sampled)
+ string - strong x 274,822 ops/sec ±1.15% (191 runs sampled)
+ string - weak x 169,473 ops/sec ±1.59% (194 runs sampled)
+
+> node benchmark/body2-5kb.js
+
+ 5KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 104,299 ops/sec ±0.60% (193 runs sampled)
+* buffer - weak x 108,126 ops/sec ±0.65% (196 runs sampled)
+ string - strong x 101,736 ops/sec ±0.78% (194 runs sampled)
+ string - weak x 101,266 ops/sec ±0.85% (192 runs sampled)
+
+> node benchmark/body3-10kb.js
+
+ 10KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 59,007 ops/sec ±0.29% (198 runs sampled)
+* buffer - weak x 60,968 ops/sec ±0.48% (197 runs sampled)
+ string - strong x 51,873 ops/sec ±1.78% (178 runs sampled)
+ string - weak x 52,307 ops/sec ±2.63% (193 runs sampled)
+
+> node benchmark/body4-100kb.js
+
+ 100KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+ buffer - strong x 6,712 ops/sec ±0.11% (198 runs sampled)
+* buffer - weak x 6,716 ops/sec ±0.50% (196 runs sampled)
+ string - strong x 6,397 ops/sec ±0.36% (196 runs sampled)
+ string - weak x 6,635 ops/sec ±0.15% (198 runs sampled)
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/etag.svg?style=flat
+[npm-url]: https://npmjs.org/package/etag
+[node-version-image]: https://img.shields.io/node/v/etag.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/etag.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/etag
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/etag.svg?style=flat
+[downloads-url]: https://npmjs.org/package/etag
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/index.js
new file mode 100644
index 0000000..bb05eb7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/index.js
@@ -0,0 +1,171 @@
+/*!
+ * etag
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = etag
+
+/**
+ * Module dependencies.
+ */
+
+var crc = require('crc').crc32
+var crypto = require('crypto')
+var Stats = require('fs').Stats
+
+/**
+ * Module variables.
+ */
+
+var crc32threshold = 1000 // 1KB
+var NULL = new Buffer([0])
+var toString = Object.prototype.toString
+
+/**
+ * Create a simple ETag.
+ *
+ * @param {string|Buffer|Stats} entity
+ * @param {object} [options]
+ * @param {boolean} [options.weak]
+ * @return {String}
+ * @api public
+ */
+
+function etag(entity, options) {
+ if (entity == null) {
+ throw new TypeError('argument entity is required')
+ }
+
+ var isStats = isstats(entity)
+ var weak = options && typeof options.weak === 'boolean'
+ ? options.weak
+ : isStats
+
+ // support fs.Stats object
+ if (isStats) {
+ return stattag(entity, weak)
+ }
+
+ if (typeof entity !== 'string' && !Buffer.isBuffer(entity)) {
+ throw new TypeError('argument entity must be string, Buffer, or fs.Stats')
+ }
+
+ var hash = weak
+ ? weakhash(entity)
+ : stronghash(entity)
+
+ return weak
+ ? 'W/"' + hash + '"'
+ : '"' + hash + '"'
+}
+
+/**
+ * Determine if object is a Stats object.
+ *
+ * @param {object} obj
+ * @return {boolean}
+ * @api private
+ */
+
+function isstats(obj) {
+ // not even an object
+ if (obj === null || typeof obj !== 'object') {
+ return false
+ }
+
+ // genuine fs.Stats
+ if (obj instanceof Stats) {
+ return true
+ }
+
+ // quack quack
+ return 'atime' in obj && toString.call(obj.atime) === '[object Date]'
+ && 'ctime' in obj && toString.call(obj.ctime) === '[object Date]'
+ && 'mtime' in obj && toString.call(obj.mtime) === '[object Date]'
+ && 'ino' in obj && typeof obj.ino === 'number'
+ && 'size' in obj && typeof obj.size === 'number'
+}
+
+/**
+ * Generate a tag for a stat.
+ *
+ * @param {Buffer} entity
+ * @return {String}
+ * @api private
+ */
+
+function stattag(stat, weak) {
+ var mtime = stat.mtime.toISOString()
+ var size = stat.size.toString(16)
+
+ if (weak) {
+ return 'W/"' + size + '-' + crc(mtime) + '"'
+ }
+
+ var hash = crypto
+ .createHash('md5')
+ .update('file', 'utf8')
+ .update(NULL)
+ .update(size, 'utf8')
+ .update(NULL)
+ .update(mtime, 'utf8')
+ .digest('base64')
+
+ return '"' + hash + '"'
+}
+
+/**
+ * Generate a strong hash.
+ *
+ * @param {Buffer} entity
+ * @return {String}
+ * @api private
+ */
+
+function stronghash(entity) {
+ if (entity.length === 0) {
+ // fast-path empty
+ return '1B2M2Y8AsgTpgAmY7PhCfg=='
+ }
+
+ return crypto
+ .createHash('md5')
+ .update(entity, 'utf8')
+ .digest('base64')
+}
+
+/**
+ * Generate a weak hash.
+ *
+ * @param {Buffer} entity
+ * @return {String}
+ * @api private
+ */
+
+function weakhash(entity) {
+ if (entity.length === 0) {
+ // fast-path empty
+ return '0-0'
+ }
+
+ var len = typeof entity === 'string'
+ ? Buffer.byteLength(entity, 'utf8')
+ : entity.length
+
+ if (len <= crc32threshold) {
+ // crc32 plus length when it's fast
+ // crc(str) only accepts utf-8 encoding
+ return len.toString(16) + '-' + crc(entity).toString(16)
+ }
+
+ // use md4 for long strings
+ return crypto
+ .createHash('md4')
+ .update(entity, 'utf8')
+ .digest('base64')
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/.npmignore b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/.npmignore
new file mode 100644
index 0000000..57d4cb8
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/.npmignore
@@ -0,0 +1,5 @@
+benchmark
+src
+test
+.travis.yml
+bitcoin.png
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/LICENSE b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/LICENSE
new file mode 100644
index 0000000..c49097c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright 2014 Alex Gorbatchev
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/README.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/README.md
new file mode 100644
index 0000000..6473cbd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/README.md
@@ -0,0 +1,98 @@
+# crc
+
+[![GitTip](http://img.shields.io/gittip/alexgorbatchev.svg?style=flat)](https://www.gittip.com/alexgorbatchev/)
+[![Dependency status](http://img.shields.io/david/alexgorbatchev/node-crc.svg?style=flat)](https://david-dm.org/alexgorbatchev/node-crc)
+[![devDependency Status](http://img.shields.io/david/dev/alexgorbatchev/node-crc.svg?style=flat)](https://david-dm.org/alexgorbatchev/node-crc#info=devDependencies)
+[![Build Status](http://img.shields.io/travis/alexgorbatchev/node-crc.svg?style=flat&branch=master)](https://travis-ci.org/alexgorbatchev/node-crc)
+
+[![NPM](https://nodei.co/npm/crc.svg?style=flat)](https://npmjs.org/package/node-crc)
+
+Module for calculating Cyclic Redundancy Check (CRC).
+
+## Features
+
+* Full test suite comparing values against reference `pycrc` implementation.
+* Version 3.x is 3x to 4x faster than version 2.x.
+* Pure JavaScript implementation, no dependencies.
+* Provides CRC Tables for optimized calculations.
+* Provides support for the following CRC algorithms:
+ * CRC1 `crc.crc1(…)`
+ * CRC8 `crc.crc8(…)`
+ * CRC8 1-Wire `crc.crc81wire(…)`
+ * CRC16 `crc.crc16(…)`
+ * CRC16 CCITT `crc.crc16ccitt(…)`
+ * CRC16 Modbus `crc.crc16modbus(…)`
+ * CRC24 `crc.crc24(…)`
+ * CRC32 `crc.crc32(…)`
+
+## IMPORTANT
+
+If you've used `crc` module prior to version 2.x, you might have some inconsistentcies with the current implementation because it relied on very old code and wasn't checked against reference implementation. If you upgrading from 1.x, please take special care.
+
+## Support
+
+<a href="https://blockchain.info/address/1CZyBREeHTmy8C5zVGHZHPwqBuWFmEuUCQ"><img src="bitcoin.png" width="150" align="right"/></a> Please support me on [GitTip](https://www.gittip.com/alexgorbatchev/). I've spend days developing and grooming this module and hope to spend more time. If you have bitcoin, please use the QR code or this wallet address [`1CZyBREeHTmy8C5zVGHZHPwqBuWFmEuUCQ`](https://blockchain.info/address/1CZyBREeHTmy8C5zVGHZHPwqBuWFmEuUCQ):
+
+## Installation
+
+ npm install crc
+
+## Running tests
+
+ $ npm install
+ $ npm test
+
+## Usage Example
+
+Calculate a CRC32:
+
+ var crc = require('crc');
+
+ crc.crc32('hello').toString(16);
+ # => "3610a686"
+
+Calculate a CRC32 of a file:
+
+ crc.crc32(fs.readFileSync('README.md', 'utf8')).toString(16);
+ # => "127ad531"
+
+Or using a `Buffer`:
+
+ crc.crc32(fs.readFileSync('README.md')).toString(16);
+ # => "127ad531"
+
+Incrementally calculate a CRC32:
+
+ value = crc32('one');
+ value = crc32('two', value);
+ value = crc32('three', value);
+ value.toString(16);
+ # => "09e1c092"
+
+## Thanks!
+
+[pycrc](http://www.tty1.net/pycrc/) library is which the source of all of the CRC tables.
+
+# License
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Alex Gorbatchev
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc.js
new file mode 100644
index 0000000..1c342b7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc.js
@@ -0,0 +1,71 @@
+// Generated by CoffeeScript 1.7.1
+var CRC, hex;
+
+hex = require('./hex');
+
+module.exports = CRC = (function() {
+ CRC.prototype.INIT_CRC = 0x00;
+
+ CRC.prototype.XOR_MASK = 0x00;
+
+ CRC.prototype.WIDTH = 0;
+
+ CRC.prototype.pack = function(crc) {
+ return '';
+ };
+
+ CRC.prototype.each_byte = function(buf, cb) {
+ var i, _i, _ref, _results;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ _results = [];
+ for (i = _i = 0, _ref = buf.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
+ _results.push(cb(buf[i]));
+ }
+ return _results;
+ };
+
+ function CRC() {
+ this.crc = this.INIT_CRC;
+ }
+
+ CRC.prototype.digest_length = function() {
+ return Math.ceil(this.WIDTH / 8.0);
+ };
+
+ CRC.prototype.update = function(data) {};
+
+ CRC.prototype.reset = function() {
+ return this.crc = this.INIT_CRC;
+ };
+
+ CRC.prototype.checksum = function(signed) {
+ var sum;
+ if (signed == null) {
+ signed = true;
+ }
+ sum = this.crc ^ this.XOR_MASK;
+ if (signed) {
+ sum = sum >>> 0;
+ }
+ return sum;
+ };
+
+ CRC.prototype.finish = function() {
+ return this.pack(this.checksum());
+ };
+
+ CRC.prototype.hexdigest = function(value) {
+ var result;
+ if (value != null) {
+ this.update(value);
+ }
+ result = this.finish();
+ this.reset();
+ return result;
+ };
+
+ return CRC;
+
+})();
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc1.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc1.js
new file mode 100644
index 0000000..f094567
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc1.js
@@ -0,0 +1,21 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+module.exports = create('crc1', function(buf, previous) {
+ var accum, byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = ~~previous;
+ accum = 0;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ accum += byte;
+ }
+ crc += accum % 256;
+ return crc % 256;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc16.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc16.js
new file mode 100644
index 0000000..a09cd1e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc16.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241, 0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440, 0xcc01, 0x0cc0, 0x0d80, 0xcd41, 0x0f00, 0xcfc1, 0xce81, 0x0e40, 0x0a00, 0xcac1, 0xcb81, 0x0b40, 0xc901, 0x09c0, 0x0880, 0xc841, 0xd801, 0x18c0, 0x1980, 0xd941, 0x1b00, 0xdbc1, 0xda81, 0x1a40, 0x1e00, 0xdec1, 0xdf81, 0x1f40, 0xdd01, 0x1dc0, 0x1c80, 0xdc41, 0x1400, 0xd4c1, 0xd581, 0x1540, 0xd701, 0x17c0, 0x1680, 0xd641, 0xd201, 0x12c0, 0x1380, 0xd341, 0x1100, 0xd1c1, 0xd081, 0x1040, 0xf001, 0x30c0, 0x3180, 0xf141, 0x3300, 0xf3c1, 0xf281, 0x3240, 0x3600, 0xf6c1, 0xf781, 0x3740, 0xf501, 0x35c0, 0x3480, 0xf441, 0x3c00, 0xfcc1, 0xfd81, 0x3d40, 0xff01, 0x3fc0, 0x3e80, 0xfe41, 0xfa01, 0x3ac0, 0x3b80, 0xfb41, 0x3900, 0xf9c1, 0xf881, 0x3840, 0x2800, 0xe8c1, 0xe981, 0x2940, 0xeb01, 0x2bc0, 0x2a80, 0xea41, 0xee01, 0x2ec0, 0x2f80, 0xef41, 0x2d00, 0xedc1, 0xec81, 0x2c40, 0xe401, 0x24c0, 0x2580, 0xe541, 0x2700, 0xe7c1, 0xe681, 0x2640, 0x2200, 0xe2c1, 0xe381, 0x2340, 0xe101, 0x21c0, 0x2080, 0xe041, 0xa001, 0x60c0, 0x6180, 0xa141, 0x6300, 0xa3c1, 0xa281, 0x6240, 0x6600, 0xa6c1, 0xa781, 0x6740, 0xa501, 0x65c0, 0x6480, 0xa441, 0x6c00, 0xacc1, 0xad81, 0x6d40, 0xaf01, 0x6fc0, 0x6e80, 0xae41, 0xaa01, 0x6ac0, 0x6b80, 0xab41, 0x6900, 0xa9c1, 0xa881, 0x6840, 0x7800, 0xb8c1, 0xb981, 0x7940, 0xbb01, 0x7bc0, 0x7a80, 0xba41, 0xbe01, 0x7ec0, 0x7f80, 0xbf41, 0x7d00, 0xbdc1, 0xbc81, 0x7c40, 0xb401, 0x74c0, 0x7580, 0xb541, 0x7700, 0xb7c1, 0xb681, 0x7640, 0x7200, 0xb2c1, 0xb381, 0x7340, 0xb101, 0x71c0, 0x7080, 0xb041, 0x5000, 0x90c1, 0x9181, 0x5140, 0x9301, 0x53c0, 0x5280, 0x9241, 0x9601, 0x56c0, 0x5780, 0x9741, 0x5500, 0x95c1, 0x9481, 0x5440, 0x9c01, 0x5cc0, 0x5d80, 0x9d41, 0x5f00, 0x9fc1, 0x9e81, 0x5e40, 0x5a00, 0x9ac1, 0x9b81, 0x5b40, 0x9901, 0x59c0, 0x5880, 0x9841, 0x8801, 0x48c0, 0x4980, 0x8941, 0x4b00, 0x8bc1, 0x8a81, 0x4a40, 0x4e00, 0x8ec1, 0x8f81, 0x4f40, 0x8d01, 0x4dc0, 0x4c80, 0x8c41, 0x4400, 0x84c1, 0x8581, 0x4540, 0x8701, 0x47c0, 0x4680, 0x8641, 0x8201, 0x42c0, 0x4380, 0x8341, 0x4100, 0x81c1, 0x8081, 0x4040];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-16', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = ~~previous;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = (TABLE[(crc ^ byte) & 0xff] ^ (crc >> 8)) & 0xffff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc16_ccitt.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc16_ccitt.js
new file mode 100644
index 0000000..0bdb0bf
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc16_ccitt.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('ccitt', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = previous != null ? ~~previous : 0xffff;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = (TABLE[((crc >> 8) ^ byte) & 0xff] ^ (crc << 8)) & 0xffff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc16_modbus.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc16_modbus.js
new file mode 100644
index 0000000..52a536a
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc16_modbus.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241, 0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440, 0xcc01, 0x0cc0, 0x0d80, 0xcd41, 0x0f00, 0xcfc1, 0xce81, 0x0e40, 0x0a00, 0xcac1, 0xcb81, 0x0b40, 0xc901, 0x09c0, 0x0880, 0xc841, 0xd801, 0x18c0, 0x1980, 0xd941, 0x1b00, 0xdbc1, 0xda81, 0x1a40, 0x1e00, 0xdec1, 0xdf81, 0x1f40, 0xdd01, 0x1dc0, 0x1c80, 0xdc41, 0x1400, 0xd4c1, 0xd581, 0x1540, 0xd701, 0x17c0, 0x1680, 0xd641, 0xd201, 0x12c0, 0x1380, 0xd341, 0x1100, 0xd1c1, 0xd081, 0x1040, 0xf001, 0x30c0, 0x3180, 0xf141, 0x3300, 0xf3c1, 0xf281, 0x3240, 0x3600, 0xf6c1, 0xf781, 0x3740, 0xf501, 0x35c0, 0x3480, 0xf441, 0x3c00, 0xfcc1, 0xfd81, 0x3d40, 0xff01, 0x3fc0, 0x3e80, 0xfe41, 0xfa01, 0x3ac0, 0x3b80, 0xfb41, 0x3900, 0xf9c1, 0xf881, 0x3840, 0x2800, 0xe8c1, 0xe981, 0x2940, 0xeb01, 0x2bc0, 0x2a80, 0xea41, 0xee01, 0x2ec0, 0x2f80, 0xef41, 0x2d00, 0xedc1, 0xec81, 0x2c40, 0xe401, 0x24c0, 0x2580, 0xe541, 0x2700, 0xe7c1, 0xe681, 0x2640, 0x2200, 0xe2c1, 0xe381, 0x2340, 0xe101, 0x21c0, 0x2080, 0xe041, 0xa001, 0x60c0, 0x6180, 0xa141, 0x6300, 0xa3c1, 0xa281, 0x6240, 0x6600, 0xa6c1, 0xa781, 0x6740, 0xa501, 0x65c0, 0x6480, 0xa441, 0x6c00, 0xacc1, 0xad81, 0x6d40, 0xaf01, 0x6fc0, 0x6e80, 0xae41, 0xaa01, 0x6ac0, 0x6b80, 0xab41, 0x6900, 0xa9c1, 0xa881, 0x6840, 0x7800, 0xb8c1, 0xb981, 0x7940, 0xbb01, 0x7bc0, 0x7a80, 0xba41, 0xbe01, 0x7ec0, 0x7f80, 0xbf41, 0x7d00, 0xbdc1, 0xbc81, 0x7c40, 0xb401, 0x74c0, 0x7580, 0xb541, 0x7700, 0xb7c1, 0xb681, 0x7640, 0x7200, 0xb2c1, 0xb381, 0x7340, 0xb101, 0x71c0, 0x7080, 0xb041, 0x5000, 0x90c1, 0x9181, 0x5140, 0x9301, 0x53c0, 0x5280, 0x9241, 0x9601, 0x56c0, 0x5780, 0x9741, 0x5500, 0x95c1, 0x9481, 0x5440, 0x9c01, 0x5cc0, 0x5d80, 0x9d41, 0x5f00, 0x9fc1, 0x9e81, 0x5e40, 0x5a00, 0x9ac1, 0x9b81, 0x5b40, 0x9901, 0x59c0, 0x5880, 0x9841, 0x8801, 0x48c0, 0x4980, 0x8941, 0x4b00, 0x8bc1, 0x8a81, 0x4a40, 0x4e00, 0x8ec1, 0x8f81, 0x4f40, 0x8d01, 0x4dc0, 0x4c80, 0x8c41, 0x4400, 0x84c1, 0x8581, 0x4540, 0x8701, 0x47c0, 0x4680, 0x8641, 0x8201, 0x42c0, 0x4380, 0x8341, 0x4100, 0x81c1, 0x8081, 0x4040];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-16-modbus', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = previous != null ? ~~previous : 0xffff;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = (TABLE[(crc ^ byte) & 0xff] ^ (crc >> 8)) & 0xffff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc24.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc24.js
new file mode 100644
index 0000000..ff67bc1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc24.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x000000, 0x864cfb, 0x8ad50d, 0x0c99f6, 0x93e6e1, 0x15aa1a, 0x1933ec, 0x9f7f17, 0xa18139, 0x27cdc2, 0x2b5434, 0xad18cf, 0x3267d8, 0xb42b23, 0xb8b2d5, 0x3efe2e, 0xc54e89, 0x430272, 0x4f9b84, 0xc9d77f, 0x56a868, 0xd0e493, 0xdc7d65, 0x5a319e, 0x64cfb0, 0xe2834b, 0xee1abd, 0x685646, 0xf72951, 0x7165aa, 0x7dfc5c, 0xfbb0a7, 0x0cd1e9, 0x8a9d12, 0x8604e4, 0x00481f, 0x9f3708, 0x197bf3, 0x15e205, 0x93aefe, 0xad50d0, 0x2b1c2b, 0x2785dd, 0xa1c926, 0x3eb631, 0xb8faca, 0xb4633c, 0x322fc7, 0xc99f60, 0x4fd39b, 0x434a6d, 0xc50696, 0x5a7981, 0xdc357a, 0xd0ac8c, 0x56e077, 0x681e59, 0xee52a2, 0xe2cb54, 0x6487af, 0xfbf8b8, 0x7db443, 0x712db5, 0xf7614e, 0x19a3d2, 0x9fef29, 0x9376df, 0x153a24, 0x8a4533, 0x0c09c8, 0x00903e, 0x86dcc5, 0xb822eb, 0x3e6e10, 0x32f7e6, 0xb4bb1d, 0x2bc40a, 0xad88f1, 0xa11107, 0x275dfc, 0xdced5b, 0x5aa1a0, 0x563856, 0xd074ad, 0x4f0bba, 0xc94741, 0xc5deb7, 0x43924c, 0x7d6c62, 0xfb2099, 0xf7b96f, 0x71f594, 0xee8a83, 0x68c678, 0x645f8e, 0xe21375, 0x15723b, 0x933ec0, 0x9fa736, 0x19ebcd, 0x8694da, 0x00d821, 0x0c41d7, 0x8a0d2c, 0xb4f302, 0x32bff9, 0x3e260f, 0xb86af4, 0x2715e3, 0xa15918, 0xadc0ee, 0x2b8c15, 0xd03cb2, 0x567049, 0x5ae9bf, 0xdca544, 0x43da53, 0xc596a8, 0xc90f5e, 0x4f43a5, 0x71bd8b, 0xf7f170, 0xfb6886, 0x7d247d, 0xe25b6a, 0x641791, 0x688e67, 0xeec29c, 0x3347a4, 0xb50b5f, 0xb992a9, 0x3fde52, 0xa0a145, 0x26edbe, 0x2a7448, 0xac38b3, 0x92c69d, 0x148a66, 0x181390, 0x9e5f6b, 0x01207c, 0x876c87, 0x8bf571, 0x0db98a, 0xf6092d, 0x7045d6, 0x7cdc20, 0xfa90db, 0x65efcc, 0xe3a337, 0xef3ac1, 0x69763a, 0x578814, 0xd1c4ef, 0xdd5d19, 0x5b11e2, 0xc46ef5, 0x42220e, 0x4ebbf8, 0xc8f703, 0x3f964d, 0xb9dab6, 0xb54340, 0x330fbb, 0xac70ac, 0x2a3c57, 0x26a5a1, 0xa0e95a, 0x9e1774, 0x185b8f, 0x14c279, 0x928e82, 0x0df195, 0x8bbd6e, 0x872498, 0x016863, 0xfad8c4, 0x7c943f, 0x700dc9, 0xf64132, 0x693e25, 0xef72de, 0xe3eb28, 0x65a7d3, 0x5b59fd, 0xdd1506, 0xd18cf0, 0x57c00b, 0xc8bf1c, 0x4ef3e7, 0x426a11, 0xc426ea, 0x2ae476, 0xaca88d, 0xa0317b, 0x267d80, 0xb90297, 0x3f4e6c, 0x33d79a, 0xb59b61, 0x8b654f, 0x0d29b4, 0x01b042, 0x87fcb9, 0x1883ae, 0x9ecf55, 0x9256a3, 0x141a58, 0xefaaff, 0x69e604, 0x657ff2, 0xe33309, 0x7c4c1e, 0xfa00e5, 0xf69913, 0x70d5e8, 0x4e2bc6, 0xc8673d, 0xc4fecb, 0x42b230, 0xddcd27, 0x5b81dc, 0x57182a, 0xd154d1, 0x26359f, 0xa07964, 0xace092, 0x2aac69, 0xb5d37e, 0x339f85, 0x3f0673, 0xb94a88, 0x87b4a6, 0x01f85d, 0x0d61ab, 0x8b2d50, 0x145247, 0x921ebc, 0x9e874a, 0x18cbb1, 0xe37b16, 0x6537ed, 0x69ae1b, 0xefe2e0, 0x709df7, 0xf6d10c, 0xfa48fa, 0x7c0401, 0x42fa2f, 0xc4b6d4, 0xc82f22, 0x4e63d9, 0xd11cce, 0x575035, 0x5bc9c3, 0xdd8538];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-24', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = previous != null ? ~~previous : 0xb704ce;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = (TABLE[((crc >> 16) ^ byte) & 0xff] ^ (crc << 8)) & 0xffffff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc32.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc32.js
new file mode 100644
index 0000000..20bc024
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc32.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-32', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = previous === 0 ? 0 : ~~previous ^ -1;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = TABLE[(crc ^ byte) & 0xff] ^ (crc >>> 8);
+ }
+ return crc ^ -1;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc8.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc8.js
new file mode 100644
index 0000000..6ebe77c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc8.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15, 0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d, 0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65, 0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d, 0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb, 0xf2, 0xf5, 0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd, 0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85, 0xa8, 0xaf, 0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd, 0xc7, 0xc0, 0xc9, 0xce, 0xdb, 0xdc, 0xd5, 0xd2, 0xff, 0xf8, 0xf1, 0xf6, 0xe3, 0xe4, 0xed, 0xea, 0xb7, 0xb0, 0xb9, 0xbe, 0xab, 0xac, 0xa5, 0xa2, 0x8f, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9d, 0x9a, 0x27, 0x20, 0x29, 0x2e, 0x3b, 0x3c, 0x35, 0x32, 0x1f, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0d, 0x0a, 0x57, 0x50, 0x59, 0x5e, 0x4b, 0x4c, 0x45, 0x42, 0x6f, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7d, 0x7a, 0x89, 0x8e, 0x87, 0x80, 0x95, 0x92, 0x9b, 0x9c, 0xb1, 0xb6, 0xbf, 0xb8, 0xad, 0xaa, 0xa3, 0xa4, 0xf9, 0xfe, 0xf7, 0xf0, 0xe5, 0xe2, 0xeb, 0xec, 0xc1, 0xc6, 0xcf, 0xc8, 0xdd, 0xda, 0xd3, 0xd4, 0x69, 0x6e, 0x67, 0x60, 0x75, 0x72, 0x7b, 0x7c, 0x51, 0x56, 0x5f, 0x58, 0x4d, 0x4a, 0x43, 0x44, 0x19, 0x1e, 0x17, 0x10, 0x05, 0x02, 0x0b, 0x0c, 0x21, 0x26, 0x2f, 0x28, 0x3d, 0x3a, 0x33, 0x34, 0x4e, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5c, 0x5b, 0x76, 0x71, 0x78, 0x7f, 0x6a, 0x6d, 0x64, 0x63, 0x3e, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2c, 0x2b, 0x06, 0x01, 0x08, 0x0f, 0x1a, 0x1d, 0x14, 0x13, 0xae, 0xa9, 0xa0, 0xa7, 0xb2, 0xb5, 0xbc, 0xbb, 0x96, 0x91, 0x98, 0x9f, 0x8a, 0x8d, 0x84, 0x83, 0xde, 0xd9, 0xd0, 0xd7, 0xc2, 0xc5, 0xcc, 0xcb, 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('crc-8', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = ~~previous;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = TABLE[(crc ^ byte) & 0xff] & 0xff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc8_1wire.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc8_1wire.js
new file mode 100644
index 0000000..b561246
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/crc8_1wire.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.7.1
+var Buffer, TABLE, create;
+
+Buffer = require('buffer').Buffer;
+
+create = require('./create');
+
+TABLE = [0x00, 0x5e, 0xbc, 0xe2, 0x61, 0x3f, 0xdd, 0x83, 0xc2, 0x9c, 0x7e, 0x20, 0xa3, 0xfd, 0x1f, 0x41, 0x9d, 0xc3, 0x21, 0x7f, 0xfc, 0xa2, 0x40, 0x1e, 0x5f, 0x01, 0xe3, 0xbd, 0x3e, 0x60, 0x82, 0xdc, 0x23, 0x7d, 0x9f, 0xc1, 0x42, 0x1c, 0xfe, 0xa0, 0xe1, 0xbf, 0x5d, 0x03, 0x80, 0xde, 0x3c, 0x62, 0xbe, 0xe0, 0x02, 0x5c, 0xdf, 0x81, 0x63, 0x3d, 0x7c, 0x22, 0xc0, 0x9e, 0x1d, 0x43, 0xa1, 0xff, 0x46, 0x18, 0xfa, 0xa4, 0x27, 0x79, 0x9b, 0xc5, 0x84, 0xda, 0x38, 0x66, 0xe5, 0xbb, 0x59, 0x07, 0xdb, 0x85, 0x67, 0x39, 0xba, 0xe4, 0x06, 0x58, 0x19, 0x47, 0xa5, 0xfb, 0x78, 0x26, 0xc4, 0x9a, 0x65, 0x3b, 0xd9, 0x87, 0x04, 0x5a, 0xb8, 0xe6, 0xa7, 0xf9, 0x1b, 0x45, 0xc6, 0x98, 0x7a, 0x24, 0xf8, 0xa6, 0x44, 0x1a, 0x99, 0xc7, 0x25, 0x7b, 0x3a, 0x64, 0x86, 0xd8, 0x5b, 0x05, 0xe7, 0xb9, 0x8c, 0xd2, 0x30, 0x6e, 0xed, 0xb3, 0x51, 0x0f, 0x4e, 0x10, 0xf2, 0xac, 0x2f, 0x71, 0x93, 0xcd, 0x11, 0x4f, 0xad, 0xf3, 0x70, 0x2e, 0xcc, 0x92, 0xd3, 0x8d, 0x6f, 0x31, 0xb2, 0xec, 0x0e, 0x50, 0xaf, 0xf1, 0x13, 0x4d, 0xce, 0x90, 0x72, 0x2c, 0x6d, 0x33, 0xd1, 0x8f, 0x0c, 0x52, 0xb0, 0xee, 0x32, 0x6c, 0x8e, 0xd0, 0x53, 0x0d, 0xef, 0xb1, 0xf0, 0xae, 0x4c, 0x12, 0x91, 0xcf, 0x2d, 0x73, 0xca, 0x94, 0x76, 0x28, 0xab, 0xf5, 0x17, 0x49, 0x08, 0x56, 0xb4, 0xea, 0x69, 0x37, 0xd5, 0x8b, 0x57, 0x09, 0xeb, 0xb5, 0x36, 0x68, 0x8a, 0xd4, 0x95, 0xcb, 0x29, 0x77, 0xf4, 0xaa, 0x48, 0x16, 0xe9, 0xb7, 0x55, 0x0b, 0x88, 0xd6, 0x34, 0x6a, 0x2b, 0x75, 0x97, 0xc9, 0x4a, 0x14, 0xf6, 0xa8, 0x74, 0x2a, 0xc8, 0x96, 0x15, 0x4b, 0xa9, 0xf7, 0xb6, 0xe8, 0x0a, 0x54, 0xd7, 0x89, 0x6b, 0x35];
+
+if (typeof Int32Array !== 'undefined') {
+ TABLE = new Int32Array(TABLE);
+}
+
+module.exports = create('dallas-1-wire', function(buf, previous) {
+ var byte, crc, _i, _len;
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer(buf);
+ }
+ crc = ~~previous;
+ for (_i = 0, _len = buf.length; _i < _len; _i++) {
+ byte = buf[_i];
+ crc = TABLE[(crc ^ byte) & 0xff] & 0xff;
+ }
+ return crc;
+});
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/create.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/create.js
new file mode 100644
index 0000000..2d856bd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/create.js
@@ -0,0 +1,11 @@
+// Generated by CoffeeScript 1.7.1
+module.exports = function(model, calc) {
+ var fn;
+ fn = function(buf, previous) {
+ return calc(buf, previous) >>> 0;
+ };
+ fn.signed = calc;
+ fn.unsigned = fn;
+ fn.model = model;
+ return fn;
+};
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/hex.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/hex.js
new file mode 100644
index 0000000..0a6aa4c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/hex.js
@@ -0,0 +1,9 @@
+// Generated by CoffeeScript 1.7.1
+module.exports = function(number) {
+ var result;
+ result = number.toString(16);
+ while (result.length % 2) {
+ result = "0" + result;
+ }
+ return result;
+};
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/index.js
new file mode 100644
index 0000000..15ac34c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/lib/index.js
@@ -0,0 +1,11 @@
+// Generated by CoffeeScript 1.7.1
+module.exports = {
+ crc1: require('./crc1'),
+ crc8: require('./crc8'),
+ crc81wire: require('./crc8_1wire'),
+ crc16: require('./crc16'),
+ crc16ccitt: require('./crc16_ccitt'),
+ crc16modbus: require('./crc16_modbus'),
+ crc24: require('./crc24'),
+ crc32: require('./crc32')
+};
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/package.json
new file mode 100644
index 0000000..e6ceeb7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/node_modules/crc/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "crc",
+ "version": "3.2.1",
+ "description": "Various CRC JavaScript implementations",
+ "keywords": [
+ "crc"
+ ],
+ "main": "./lib/index.js",
+ "scripts": {
+ "test": "mocha test/*.spec.coffee",
+ "pretest": "coffee --bare --output ./lib --compile ./src/*.coffee"
+ },
+ "author": {
+ "name": "Alex Gorbatchev",
+ "url": "https://github.com/alexgorbatchev"
+ },
+ "devDependencies": {
+ "beautify-benchmark": "^0.2.4",
+ "benchmark": "^1.0.0",
+ "buffer-crc32": "^0.2.3",
+ "chai": "~1.9.1",
+ "coffee-errors": "~0.8.6",
+ "coffee-script": "~1.7.1",
+ "mocha": "*",
+ "seedrandom": "^2.3.6"
+ },
+ "homepage": "https://github.com/alexgorbatchev/node-crc",
+ "bugs": {
+ "url": "https://github.com/alexgorbatchev/node-crc/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/alexgorbatchev/node-crc.git"
+ },
+ "license": "MIT",
+ "gitHead": "71caf362b061992bfe4ca8706ee264e764d2e88e",
+ "_id": "crc@3.2.1",
+ "_shasum": "5d9c8fb77a245cd5eca291e5d2d005334bab0082",
+ "_from": "crc@3.2.1",
+ "_npmVersion": "1.4.13",
+ "_npmUser": {
+ "name": "alexgorbatchev",
+ "email": "alex.gorbatchev@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "alexgorbatchev",
+ "email": "alex.gorbatchev@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "5d9c8fb77a245cd5eca291e5d2d005334bab0082",
+ "tarball": "http://registry.npmjs.org/crc/-/crc-3.2.1.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/crc/-/crc-3.2.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/package.json
new file mode 100644
index 0000000..57e6f57
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/etag/package.json
@@ -0,0 +1,75 @@
+{
+ "name": "etag",
+ "description": "Create simple ETags",
+ "version": "1.5.1",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "David Björklund",
+ "email": "david.bjorklund@gmail.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "etag",
+ "http",
+ "res"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/etag"
+ },
+ "dependencies": {
+ "crc": "3.2.1"
+ },
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4",
+ "seedrandom": "~2.3.6"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "27335e2265388109e50a9f037452081dc8a8260f",
+ "bugs": {
+ "url": "https://github.com/jshttp/etag/issues"
+ },
+ "homepage": "https://github.com/jshttp/etag",
+ "_id": "etag@1.5.1",
+ "_shasum": "54c50de04ee42695562925ac566588291be7e9ea",
+ "_from": "etag@~1.5.1",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "54c50de04ee42695562925ac566588291be7e9ea",
+ "tarball": "http://registry.npmjs.org/etag/-/etag-1.5.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/etag/-/etag-1.5.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/HISTORY.md
new file mode 100644
index 0000000..56361df
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/HISTORY.md
@@ -0,0 +1,24 @@
+0.2.4 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+
+0.2.3 / 2014-09-07
+==================
+
+ * Move repository to jshttp
+
+0.2.2 / 2014-02-19
+==================
+
+ * Revert "Fix for blank page on Safari reload"
+
+0.2.1 / 2014-01-29
+==================
+
+ * fix: support max-age=0 for end-to-end revalidation
+
+0.2.0 / 2013-08-11
+==================
+
+ * fix: return false for no-cache
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/LICENSE b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/LICENSE
new file mode 100644
index 0000000..f527394
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/README.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/README.md
new file mode 100644
index 0000000..54a885f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/README.md
@@ -0,0 +1,58 @@
+# fresh
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+HTTP response freshness testing
+
+## Installation
+
+```
+$ npm install fresh
+```
+
+## API
+
+```js
+var fresh = require('fresh')
+```
+
+### fresh(req, res)
+
+ Check freshness of `req` and `res` headers.
+
+ When the cache is "fresh" __true__ is returned,
+ otherwise __false__ is returned to indicate that
+ the cache is now stale.
+
+## Example
+
+```js
+var req = { 'if-none-match': 'tobi' };
+var res = { 'etag': 'luna' };
+fresh(req, res);
+// => false
+
+var req = { 'if-none-match': 'tobi' };
+var res = { 'etag': 'tobi' };
+fresh(req, res);
+// => true
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/fresh.svg?style=flat
+[npm-url]: https://npmjs.org/package/fresh
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/fresh.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/fresh
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/fresh.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/fresh?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/fresh.svg?style=flat
+[downloads-url]: https://npmjs.org/package/fresh
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/index.js
new file mode 100644
index 0000000..9c3f47d
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/index.js
@@ -0,0 +1,53 @@
+
+/**
+ * Expose `fresh()`.
+ */
+
+module.exports = fresh;
+
+/**
+ * Check freshness of `req` and `res` headers.
+ *
+ * When the cache is "fresh" __true__ is returned,
+ * otherwise __false__ is returned to indicate that
+ * the cache is now stale.
+ *
+ * @param {Object} req
+ * @param {Object} res
+ * @return {Boolean}
+ * @api public
+ */
+
+function fresh(req, res) {
+ // defaults
+ var etagMatches = true;
+ var notModified = true;
+
+ // fields
+ var modifiedSince = req['if-modified-since'];
+ var noneMatch = req['if-none-match'];
+ var lastModified = res['last-modified'];
+ var etag = res['etag'];
+ var cc = req['cache-control'];
+
+ // unconditional request
+ if (!modifiedSince && !noneMatch) return false;
+
+ // check for no-cache cache request directive
+ if (cc && cc.indexOf('no-cache') !== -1) return false;
+
+ // parse if-none-match
+ if (noneMatch) noneMatch = noneMatch.split(/ *, */);
+
+ // if-none-match
+ if (noneMatch) etagMatches = ~noneMatch.indexOf(etag) || '*' == noneMatch[0];
+
+ // if-modified-since
+ if (modifiedSince) {
+ modifiedSince = new Date(modifiedSince);
+ lastModified = new Date(lastModified);
+ notModified = lastModified <= modifiedSince;
+ }
+
+ return !! (etagMatches && notModified);
+}
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/package.json
new file mode 100644
index 0000000..a153522
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/fresh/package.json
@@ -0,0 +1,77 @@
+{
+ "name": "fresh",
+ "description": "HTTP response freshness testing",
+ "version": "0.2.4",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "fresh",
+ "http",
+ "conditional",
+ "cache"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/fresh"
+ },
+ "devDependencies": {
+ "istanbul": "0",
+ "mocha": "1",
+ "should": "3"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --require should",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --require should"
+ },
+ "gitHead": "8440a4ca75fb091dec06e88654b3b1c31d7e7164",
+ "bugs": {
+ "url": "https://github.com/jshttp/fresh/issues"
+ },
+ "homepage": "https://github.com/jshttp/fresh",
+ "_id": "fresh@0.2.4",
+ "_shasum": "3582499206c9723714190edd74b4604feb4a614c",
+ "_from": "fresh@0.2.4",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "3582499206c9723714190edd74b4604feb4a614c",
+ "tarball": "http://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/.npmignore b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/.npmignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/.npmignore
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/LICENSE b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/LICENSE
new file mode 100644
index 0000000..451fc45
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2010 Benjamin Thomas, Robert Kieffer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/README.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/README.md
new file mode 100644
index 0000000..506fbe5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/README.md
@@ -0,0 +1,90 @@
+# mime
+
+Comprehensive MIME type mapping API based on mime-db module.
+
+## Install
+
+Install with [npm](http://github.com/isaacs/npm):
+
+ npm install mime
+
+## Contributing / Testing
+
+ npm run test
+
+## Command Line
+
+ mime [path_string]
+
+E.g.
+
+ > mime scripts/jquery.js
+ application/javascript
+
+## API - Queries
+
+### mime.lookup(path)
+Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.
+
+```js
+var mime = require('mime');
+
+mime.lookup('/path/to/file.txt'); // => 'text/plain'
+mime.lookup('file.txt'); // => 'text/plain'
+mime.lookup('.TXT'); // => 'text/plain'
+mime.lookup('htm'); // => 'text/html'
+```
+
+### mime.default_type
+Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)
+
+### mime.extension(type)
+Get the default extension for `type`
+
+```js
+mime.extension('text/html'); // => 'html'
+mime.extension('application/octet-stream'); // => 'bin'
+```
+
+### mime.charsets.lookup()
+
+Map mime-type to charset
+
+```js
+mime.charsets.lookup('text/plain'); // => 'UTF-8'
+```
+
+(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)
+
+## API - Defining Custom Types
+
+Custom type mappings can be added on a per-project basis via the following APIs.
+
+### mime.define()
+
+Add custom mime/extension mappings
+
+```js
+mime.define({
+ 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],
+ 'application/x-my-type': ['x-mt', 'x-mtt'],
+ // etc ...
+});
+
+mime.lookup('x-sft'); // => 'text/x-some-format'
+```
+
+The first entry in the extensions array is returned by `mime.extension()`. E.g.
+
+```js
+mime.extension('text/x-some-format'); // => 'x-sf'
+```
+
+### mime.load(filepath)
+
+Load mappings from an Apache ".types" format file
+
+```js
+mime.load('./my_project.types');
+```
+The .types file format is simple - See the `types` dir for examples.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/build/build.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/build/build.js
new file mode 100644
index 0000000..ed5313e
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/build/build.js
@@ -0,0 +1,11 @@
+var db = require('mime-db');
+
+var mapByType = {};
+Object.keys(db).forEach(function(key) {
+ var extensions = db[key].extensions;
+ if (extensions) {
+ mapByType[key] = extensions;
+ }
+});
+
+console.log(JSON.stringify(mapByType));
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/build/test.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/build/test.js
new file mode 100644
index 0000000..58b9ba7
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/build/test.js
@@ -0,0 +1,57 @@
+/**
+ * Usage: node test.js
+ */
+
+var mime = require('../mime');
+var assert = require('assert');
+var path = require('path');
+
+//
+// Test mime lookups
+//
+
+assert.equal('text/plain', mime.lookup('text.txt')); // normal file
+assert.equal('text/plain', mime.lookup('TEXT.TXT')); // uppercase
+assert.equal('text/plain', mime.lookup('dir/text.txt')); // dir + file
+assert.equal('text/plain', mime.lookup('.text.txt')); // hidden file
+assert.equal('text/plain', mime.lookup('.txt')); // nameless
+assert.equal('text/plain', mime.lookup('txt')); // extension-only
+assert.equal('text/plain', mime.lookup('/txt')); // extension-less ()
+assert.equal('text/plain', mime.lookup('\\txt')); // Windows, extension-less
+assert.equal('application/octet-stream', mime.lookup('text.nope')); // unrecognized
+assert.equal('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default
+
+//
+// Test extensions
+//
+
+assert.equal('txt', mime.extension(mime.types.text));
+assert.equal('html', mime.extension(mime.types.htm));
+assert.equal('bin', mime.extension('application/octet-stream'));
+assert.equal('bin', mime.extension('application/octet-stream '));
+assert.equal('html', mime.extension(' text/html; charset=UTF-8'));
+assert.equal('html', mime.extension('text/html; charset=UTF-8 '));
+assert.equal('html', mime.extension('text/html; charset=UTF-8'));
+assert.equal('html', mime.extension('text/html ; charset=UTF-8'));
+assert.equal('html', mime.extension('text/html;charset=UTF-8'));
+assert.equal('html', mime.extension('text/Html;charset=UTF-8'));
+assert.equal(undefined, mime.extension('unrecognized'));
+
+//
+// Test node.types lookups
+//
+
+assert.equal('application/font-woff', mime.lookup('file.woff'));
+assert.equal('application/octet-stream', mime.lookup('file.buffer'));
+assert.equal('audio/mp4', mime.lookup('file.m4a'));
+assert.equal('font/opentype', mime.lookup('file.otf'));
+
+//
+// Test charsets
+//
+
+assert.equal('UTF-8', mime.charsets.lookup('text/plain'));
+assert.equal(undefined, mime.charsets.lookup(mime.types.js));
+assert.equal('fallback', mime.charsets.lookup('application/octet-stream', 'fallback'));
+
+console.log('\nAll tests passed');
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/cli.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/cli.js
new file mode 100755
index 0000000..20b1ffe
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/cli.js
@@ -0,0 +1,8 @@
+#!/usr/bin/env node
+
+var mime = require('./mime.js');
+var file = process.argv[2];
+var type = mime.lookup(file);
+
+process.stdout.write(type + '\n');
+
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/mime.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/mime.js
new file mode 100644
index 0000000..341b6a5
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/mime.js
@@ -0,0 +1,108 @@
+var path = require('path');
+var fs = require('fs');
+
+function Mime() {
+ // Map of extension -> mime type
+ this.types = Object.create(null);
+
+ // Map of mime type -> extension
+ this.extensions = Object.create(null);
+}
+
+/**
+ * Define mimetype -> extension mappings. Each key is a mime-type that maps
+ * to an array of extensions associated with the type. The first extension is
+ * used as the default extension for the type.
+ *
+ * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});
+ *
+ * @param map (Object) type definitions
+ */
+Mime.prototype.define = function (map) {
+ for (var type in map) {
+ var exts = map[type];
+ for (var i = 0; i < exts.length; i++) {
+ if (process.env.DEBUG_MIME && this.types[exts]) {
+ console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' +
+ this.types[exts] + ' to ' + type);
+ }
+
+ this.types[exts[i]] = type;
+ }
+
+ // Default extension is the first one we encounter
+ if (!this.extensions[type]) {
+ this.extensions[type] = exts[0];
+ }
+ }
+};
+
+/**
+ * Load an Apache2-style ".types" file
+ *
+ * This may be called multiple times (it's expected). Where files declare
+ * overlapping types/extensions, the last file wins.
+ *
+ * @param file (String) path of file to load.
+ */
+Mime.prototype.load = function(file) {
+ this._loading = file;
+ // Read file and split into lines
+ var map = {},
+ content = fs.readFileSync(file, 'ascii'),
+ lines = content.split(/[\r\n]+/);
+
+ lines.forEach(function(line) {
+ // Clean up whitespace/comments, and split into fields
+ var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/);
+ map[fields.shift()] = fields;
+ });
+
+ this.define(map);
+
+ this._loading = null;
+};
+
+/**
+ * Lookup a mime type based on extension
+ */
+Mime.prototype.lookup = function(path, fallback) {
+ var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase();
+
+ return this.types[ext] || fallback || this.default_type;
+};
+
+/**
+ * Return file extension associated with a mime type
+ */
+Mime.prototype.extension = function(mimeType) {
+ var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase();
+ return this.extensions[type];
+};
+
+// Default instance
+var mime = new Mime();
+
+// Define built-in types
+mime.define(require('./types.json'));
+
+// Default type
+mime.default_type = mime.lookup('bin');
+
+//
+// Additional API specific to the default instance
+//
+
+mime.Mime = Mime;
+
+/**
+ * Lookup a charset based on mime type.
+ */
+mime.charsets = {
+ lookup: function(mimeType, fallback) {
+ // Assume text types are utf8
+ return (/^text\//).test(mimeType) ? 'UTF-8' : fallback;
+ }
+};
+
+module.exports = mime;
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/package.json
new file mode 100644
index 0000000..8b7a4ed
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/package.json
@@ -0,0 +1,71 @@
+{
+ "author": {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ },
+ "scripts": {
+ "prepublish": "node build/build.js > types.json",
+ "test": "node build/test.js"
+ },
+ "bin": {
+ "mime": "cli.js"
+ },
+ "contributors": [
+ {
+ "name": "Benjamin Thomas",
+ "email": "benjamin@benjaminthomas.org",
+ "url": "http://github.com/bentomas"
+ }
+ ],
+ "description": "A comprehensive library for mime-type mapping",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://raw.github.com/broofa/node-mime/master/LICENSE"
+ }
+ ],
+ "dependencies": {},
+ "devDependencies": {
+ "mime-db": "^1.2.0"
+ },
+ "keywords": [
+ "util",
+ "mime"
+ ],
+ "main": "mime.js",
+ "name": "mime",
+ "repository": {
+ "url": "https://github.com/broofa/node-mime",
+ "type": "git"
+ },
+ "version": "1.3.4",
+ "gitHead": "1628f6e0187095009dcef4805c3a49706f137974",
+ "bugs": {
+ "url": "https://github.com/broofa/node-mime/issues"
+ },
+ "homepage": "https://github.com/broofa/node-mime",
+ "_id": "mime@1.3.4",
+ "_shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53",
+ "_from": "mime@1.3.4",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "broofa",
+ "email": "robert@broofa.com"
+ },
+ "maintainers": [
+ {
+ "name": "broofa",
+ "email": "robert@broofa.com"
+ },
+ {
+ "name": "bentomas",
+ "email": "benjamin@benjaminthomas.org"
+ }
+ ],
+ "dist": {
+ "shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53",
+ "tarball": "http://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/types.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/types.json
new file mode 100644
index 0000000..c674b1c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/mime/types.json
@@ -0,0 +1 @@
+{"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mdp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["dmg"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":["otf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["iso"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdownload":["exe","dll","com","bat","msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","wmz","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-nzb":["nzb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-research-info-systems":["ris"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp4":["mp4a","m4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-wav":["wav"],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"font/opentype":["otf"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-mrsid-image":["sid"],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/sgml":["sgml","sgm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/vtt":["vtt"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["markdown","md","mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-pascal":["p","pas"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/.npmignore b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/.npmignore
new file mode 100644
index 0000000..d1aa0ce
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/.npmignore
@@ -0,0 +1,5 @@
+node_modules
+test
+History.md
+Makefile
+component.json
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/LICENSE b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/LICENSE
new file mode 100644
index 0000000..6c07561
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014 Guillermo Rauch <rauchg@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/README.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/README.md
new file mode 100644
index 0000000..0fd54fd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/README.md
@@ -0,0 +1,35 @@
+# ms.js: miliseconds conversion utility
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('100') // 100
+```
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](nodejs.org/download).
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as
+a number (e.g: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of
+equivalent ms is returned.
+
+## License
+
+MIT
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/index.js
new file mode 100644
index 0000000..e79bfa1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/index.js
@@ -0,0 +1,123 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} options
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options){
+ options = options || {};
+ if ('string' == typeof val) return parse(val);
+ return options.long
+ ? long(val)
+ : short(val);
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
+ if (!match) return;
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function short(ms) {
+ if (ms >= d) return Math.round(ms / d) + 'd';
+ if (ms >= h) return Math.round(ms / h) + 'h';
+ if (ms >= m) return Math.round(ms / m) + 'm';
+ if (ms >= s) return Math.round(ms / s) + 's';
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function long(ms) {
+ return plural(ms, d, 'day')
+ || plural(ms, h, 'hour')
+ || plural(ms, m, 'minute')
+ || plural(ms, s, 'second')
+ || ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) return;
+ if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/package.json
new file mode 100644
index 0000000..ec3ea9b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/ms/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "ms",
+ "version": "0.7.0",
+ "description": "Tiny ms conversion utility",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/guille/ms.js.git"
+ },
+ "main": "./index",
+ "devDependencies": {
+ "mocha": "*",
+ "expect.js": "*",
+ "serve": "*"
+ },
+ "component": {
+ "scripts": {
+ "ms/index.js": "index.js"
+ }
+ },
+ "gitHead": "1e9cd9b05ef0dc26f765434d2bfee42394376e52",
+ "bugs": {
+ "url": "https://github.com/guille/ms.js/issues"
+ },
+ "homepage": "https://github.com/guille/ms.js",
+ "_id": "ms@0.7.0",
+ "scripts": {},
+ "_shasum": "865be94c2e7397ad8a57da6a633a6e2f30798b83",
+ "_from": "ms@0.7.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "865be94c2e7397ad8a57da6a633a6e2f30798b83",
+ "tarball": "http://registry.npmjs.org/ms/-/ms-0.7.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/HISTORY.md
new file mode 100644
index 0000000..5d1e1c9
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/HISTORY.md
@@ -0,0 +1,76 @@
+2.2.0 / 2014-12-22
+==================
+
+ * Add message object to callback arguments
+
+2.1.1 / 2014-10-22
+==================
+
+ * Fix handling of pipelined requests
+
+2.1.0 / 2014-08-16
+==================
+
+ * Check if `socket` is detached
+ * Return `undefined` for `isFinished` if state unknown
+
+2.0.0 / 2014-08-16
+==================
+
+ * Add `isFinished` function
+ * Move to `jshttp` organization
+ * Remove support for plain socket argument
+ * Rename to `on-finished`
+ * Support both `req` and `res` as arguments
+ * deps: ee-first@1.0.5
+
+1.2.2 / 2014-06-10
+==================
+
+ * Reduce listeners added to emitters
+ - avoids "event emitter leak" warnings when used multiple times on same request
+
+1.2.1 / 2014-06-08
+==================
+
+ * Fix returned value when already finished
+
+1.2.0 / 2014-06-05
+==================
+
+ * Call callback when called on already-finished socket
+
+1.1.4 / 2014-05-27
+==================
+
+ * Support node.js 0.8
+
+1.1.3 / 2014-04-30
+==================
+
+ * Make sure errors passed as instanceof `Error`
+
+1.1.2 / 2014-04-18
+==================
+
+ * Default the `socket` to passed-in object
+
+1.1.1 / 2014-01-16
+==================
+
+ * Rename module to `finished`
+
+1.1.0 / 2013-12-25
+==================
+
+ * Call callback when called on already-errored socket
+
+1.0.1 / 2013-12-20
+==================
+
+ * Actually pass the error to the callback
+
+1.0.0 / 2013-12-20
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/LICENSE b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/LICENSE
new file mode 100644
index 0000000..5931fd2
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/README.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/README.md
new file mode 100644
index 0000000..29d6991
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/README.md
@@ -0,0 +1,109 @@
+# on-finished
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Execute a callback when a request closes, finishes, or errors.
+
+## Install
+
+```sh
+$ npm install on-finished
+```
+
+## API
+
+```js
+var onFinished = require('on-finished')
+```
+
+### onFinished(res, listener)
+
+Attach a listener to listen for the response to finish. The listener will
+be invoked only once when the response finished. If the response finished
+to to an error, the first argument will contain the error. If the response
+has already finished, the listener will be invoked.
+
+Listening to the end of a response would be used to close things associated
+with the response, like open files.
+
+Listener is invoked as `listener(err, res)`.
+
+```js
+onFinished(res, function (err, res) {
+ // clean up open fds, etc.
+ // err contains the error is request error'd
+})
+```
+
+### onFinished(req, listener)
+
+Attach a listener to listen for the request to finish. The listener will
+be invoked only once when the request finished. If the request finished
+to to an error, the first argument will contain the error. If the request
+has already finished, the listener will be invoked.
+
+Listening to the end of a request would be used to know when to continue
+after reading the data.
+
+Listener is invoked as `listener(err, req)`.
+
+```js
+var data = ''
+
+req.setEncoding('utf8')
+res.on('data', function (str) {
+ data += str
+})
+
+onFinished(req, function (err, req) {
+ // data is read unless there is err
+})
+```
+
+### onFinished.isFinished(res)
+
+Determine if `res` is already finished. This would be useful to check and
+not even start certain operations if the response has already finished.
+
+### onFinished.isFinished(req)
+
+Determine if `req` is already finished. This would be useful to check and
+not even start certain operations if the request has already finished.
+
+### Example
+
+The following code ensures that file descriptors are always closed
+once the response finishes.
+
+```js
+var destroy = require('destroy')
+var http = require('http')
+var onFinished = require('on-finished')
+
+http.createServer(function onRequest(req, res) {
+ var stream = fs.createReadStream('package.json')
+ stream.pipe(res)
+ onFinished(res, function (err) {
+ destroy(stream)
+ })
+})
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/on-finished.svg?style=flat
+[npm-url]: https://npmjs.org/package/on-finished
+[node-version-image]: https://img.shields.io/node/v/on-finished.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/on-finished.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/on-finished
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/on-finished.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/on-finished?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/on-finished.svg?style=flat
+[downloads-url]: https://npmjs.org/package/on-finished
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/index.js
new file mode 100644
index 0000000..f68161c
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/index.js
@@ -0,0 +1,191 @@
+/*!
+ * on-finished
+ * Copyright(c) 2013 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = onFinished;
+module.exports.isFinished = isFinished;
+
+/**
+* Module dependencies.
+*/
+
+var first = require('ee-first')
+
+/**
+* Variables.
+*/
+
+/* istanbul ignore next */
+var defer = typeof setImmediate === 'function'
+ ? setImmediate
+ : function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) }
+
+/**
+ * Invoke callback when the response has finished, useful for
+ * cleaning up resources afterwards.
+ *
+ * @param {object} msg
+ * @param {function} listener
+ * @return {object}
+ * @api public
+ */
+
+function onFinished(msg, listener) {
+ if (isFinished(msg) !== false) {
+ defer(listener, null, msg)
+ return msg
+ }
+
+ // attach the listener to the message
+ attachListener(msg, listener)
+
+ return msg
+}
+
+/**
+ * Determine if message is already finished.
+ *
+ * @param {object} msg
+ * @return {boolean}
+ * @api public
+ */
+
+function isFinished(msg) {
+ var socket = msg.socket
+
+ if (typeof msg.finished === 'boolean') {
+ // OutgoingMessage
+ return Boolean(msg.finished || (socket && !socket.writable))
+ }
+
+ if (typeof msg.complete === 'boolean') {
+ // IncomingMessage
+ return Boolean(!socket || msg.complete || !socket.readable)
+ }
+
+ // don't know
+ return undefined
+}
+
+/**
+ * Attach a finished listener to the message.
+ *
+ * @param {object} msg
+ * @param {function} callback
+ * @private
+ */
+
+function attachFinishedListener(msg, callback) {
+ var eeMsg
+ var eeSocket
+ var finished = false
+
+ function onFinish(error) {
+ eeMsg.cancel()
+ eeSocket.cancel()
+
+ finished = true
+ callback(error)
+ }
+
+ // finished on first message event
+ eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish)
+
+ function onSocket(socket) {
+ // remove listener
+ msg.removeListener('socket', onSocket)
+
+ if (finished) return
+ if (eeMsg !== eeSocket) return
+
+ // finished on first socket event
+ eeSocket = first([[socket, 'error', 'close']], onFinish)
+ }
+
+ if (msg.socket) {
+ // socket already assigned
+ onSocket(msg.socket)
+ return
+ }
+
+ // wait for socket to be assigned
+ msg.on('socket', onSocket)
+
+ if (msg.socket === undefined) {
+ // node.js 0.8 patch
+ patchAssignSocket(msg, onSocket)
+ }
+}
+
+/**
+ * Attach the listener to the message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @api private
+ */
+
+function attachListener(msg, listener) {
+ var attached = msg.__onFinished
+
+ // create a private single listener with queue
+ if (!attached || !attached.queue) {
+ attached = msg.__onFinished = createListener(msg)
+ attachFinishedListener(msg, attached)
+ }
+
+ attached.queue.push(listener)
+}
+
+/**
+ * Create listener on message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @api private
+ */
+
+function createListener(msg) {
+ function listener(err) {
+ if (msg.__onFinished === listener) msg.__onFinished = null
+ if (!listener.queue) return
+
+ var queue = listener.queue
+ listener.queue = null
+
+ for (var i = 0; i < queue.length; i++) {
+ queue[i](err, msg)
+ }
+ }
+
+ listener.queue = []
+
+ return listener
+}
+
+/**
+ * Patch ServerResponse.prototype.assignSocket for node.js 0.8.
+ *
+ * @param {ServerResponse} res
+ * @param {function} callback
+ * @private
+ */
+
+function patchAssignSocket(res, callback) {
+ var assignSocket = res.assignSocket
+
+ if (typeof assignSocket !== 'function') return
+
+ // res.on('socket', callback) is broken in 0.8
+ res.assignSocket = function _assignSocket(socket) {
+ assignSocket.call(this, socket)
+ callback(socket)
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/node_modules/ee-first/LICENSE b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/node_modules/ee-first/LICENSE
new file mode 100644
index 0000000..c1b15a1
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/node_modules/ee-first/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/node_modules/ee-first/README.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/node_modules/ee-first/README.md
new file mode 100644
index 0000000..bb16aab
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/node_modules/ee-first/README.md
@@ -0,0 +1,80 @@
+# EE First
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Get the first event in a set of event emitters and event pairs,
+then clean up after itself.
+
+## Install
+
+```sh
+$ npm install ee-first
+```
+
+## API
+
+```js
+var first = require('ee-first')
+```
+
+### first(arr, listener)
+
+Invoke `listener` on the first event from the list specified in `arr`. `arr` is
+an array of arrays, with each array in the format `[ee, ...event]`. `listener`
+will be called only once, the first time any of the given events are emitted. If
+`error` is one of the listened events, then if that fires first, the `listener`
+will be given the `err` argument.
+
+The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the
+first argument emitted from an `error` event, if applicable; `ee` is the event
+emitter that fired; `event` is the string event name that fired; and `args` is an
+array of the arguments that were emitted on the event.
+
+```js
+var ee1 = new EventEmitter()
+var ee2 = new EventEmitter()
+
+first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+```
+
+#### .cancel()
+
+The group of listeners can be cancelled before being invoked and have all the event
+listeners removed from the underlying event emitters.
+
+```js
+var thunk = first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+
+// cancel and clean up
+thunk.cancel()
+```
+
+[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/ee-first
+[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square
+[github-url]: https://github.com/jonathanong/ee-first/tags
+[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square
+[travis-url]: https://travis-ci.org/jonathanong/ee-first
+[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master
+[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/ee-first
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/node_modules/ee-first/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/node_modules/ee-first/index.js
new file mode 100644
index 0000000..1d66203
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/node_modules/ee-first/index.js
@@ -0,0 +1,68 @@
+
+module.exports = function first(stuff, done) {
+ if (!Array.isArray(stuff))
+ throw new TypeError('arg must be an array of [ee, events...] arrays')
+
+ var cleanups = []
+
+ for (var i = 0; i < stuff.length; i++) {
+ var arr = stuff[i]
+
+ if (!Array.isArray(arr) || arr.length < 2)
+ throw new TypeError('each array member must be [ee, events...]')
+
+ var ee = arr[0]
+
+ for (var j = 1; j < arr.length; j++) {
+ var event = arr[j]
+ var fn = listener(event, callback)
+
+ // listen to the event
+ ee.on(event, fn)
+ // push this listener to the list of cleanups
+ cleanups.push({
+ ee: ee,
+ event: event,
+ fn: fn,
+ })
+ }
+ }
+
+ function callback() {
+ cleanup()
+ done.apply(null, arguments)
+ }
+
+ function cleanup() {
+ var x
+ for (var i = 0; i < cleanups.length; i++) {
+ x = cleanups[i]
+ x.ee.removeListener(x.event, x.fn)
+ }
+ }
+
+ function thunk(fn) {
+ done = fn
+ }
+
+ thunk.cancel = cleanup
+
+ return thunk
+}
+
+function listener(event, done) {
+ return function onevent(arg1) {
+ var args = new Array(arguments.length)
+ var ee = this
+ var err = event === 'error'
+ ? arg1
+ : null
+
+ // copy args to prevent arguments escaping scope
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
+ }
+
+ done(err, ee, event, args)
+ }
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/node_modules/ee-first/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/node_modules/ee-first/package.json
new file mode 100644
index 0000000..5b39931
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/node_modules/ee-first/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "ee-first",
+ "description": "return the first event in a set of ee/event pairs",
+ "version": "1.1.0",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jonathanong/ee-first"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.2",
+ "mocha": "1"
+ },
+ "files": [
+ "index.js",
+ "LICENSE"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "a6412004da4745941af2fc98ec30c8da570da7ea",
+ "bugs": {
+ "url": "https://github.com/jonathanong/ee-first/issues"
+ },
+ "homepage": "https://github.com/jonathanong/ee-first",
+ "_id": "ee-first@1.1.0",
+ "_shasum": "6a0d7c6221e490feefd92ec3f441c9ce8cd097f4",
+ "_from": "ee-first@1.1.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "6a0d7c6221e490feefd92ec3f441c9ce8cd097f4",
+ "tarball": "http://registry.npmjs.org/ee-first/-/ee-first-1.1.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/package.json
new file mode 100644
index 0000000..426e3ff
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/on-finished/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "on-finished",
+ "description": "Execute a callback when a request closes, finishes, or errors",
+ "version": "2.2.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/on-finished"
+ },
+ "dependencies": {
+ "ee-first": "1.1.0"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "fcd56f5674721cac92a16eff93547929716f5192",
+ "bugs": {
+ "url": "https://github.com/jshttp/on-finished/issues"
+ },
+ "homepage": "https://github.com/jshttp/on-finished",
+ "_id": "on-finished@2.2.0",
+ "_shasum": "e6ba6a09a3482d6b7969bc3da92c86f0a967605e",
+ "_from": "on-finished@~2.2.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e6ba6a09a3482d6b7969bc3da92c86f0a967605e",
+ "tarball": "http://registry.npmjs.org/on-finished/-/on-finished-2.2.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.2.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/HISTORY.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/HISTORY.md
new file mode 100644
index 0000000..1bb53bd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/HISTORY.md
@@ -0,0 +1,35 @@
+1.0.2 / 2014-09-08
+==================
+
+ * Support Node.js 0.6
+
+1.0.1 / 2014-09-07
+==================
+
+ * Move repository to jshttp
+
+1.0.0 / 2013-12-11
+==================
+
+ * Add repository to package.json
+ * Add MIT license
+
+0.0.4 / 2012-06-17
+==================
+
+ * Change ret -1 for unsatisfiable and -2 when invalid
+
+0.0.3 / 2012-06-17
+==================
+
+ * Fix last-byte-pos default to len - 1
+
+0.0.2 / 2012-06-14
+==================
+
+ * Add `.type`
+
+0.0.1 / 2012-06-11
+==================
+
+ * Initial release
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/LICENSE b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/LICENSE
new file mode 100644
index 0000000..a491841
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012-2014 TJ Holowaychuk <vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/README.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/README.md
new file mode 100644
index 0000000..6a2682f
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/README.md
@@ -0,0 +1,48 @@
+# range-parser
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Range header field parser.
+
+## Installation
+
+```
+$ npm install range-parser
+```
+
+## Examples
+
+```js
+assert(-1 == parse(200, 'bytes=500-20'));
+assert(-2 == parse(200, 'bytes=malformed'));
+parse(200, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 199 }]));
+parse(1000, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 499 }]));
+parse(1000, 'bytes=40-80').should.eql(arr('bytes', [{ start: 40, end: 80 }]));
+parse(1000, 'bytes=-500').should.eql(arr('bytes', [{ start: 500, end: 999 }]));
+parse(1000, 'bytes=-400').should.eql(arr('bytes', [{ start: 600, end: 999 }]));
+parse(1000, 'bytes=500-').should.eql(arr('bytes', [{ start: 500, end: 999 }]));
+parse(1000, 'bytes=400-').should.eql(arr('bytes', [{ start: 400, end: 999 }]));
+parse(1000, 'bytes=0-0').should.eql(arr('bytes', [{ start: 0, end: 0 }]));
+parse(1000, 'bytes=-1').should.eql(arr('bytes', [{ start: 999, end: 999 }]));
+parse(1000, 'items=0-5').should.eql(arr('items', [{ start: 0, end: 5 }]));
+parse(1000, 'bytes=40-80,-1').should.eql(arr('bytes', [{ start: 40, end: 80 }, { start: 999, end: 999 }]));
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/range-parser.svg?style=flat
+[npm-url]: https://npmjs.org/package/range-parser
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/range-parser.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/range-parser
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/range-parser.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/range-parser
+[downloads-image]: https://img.shields.io/npm/dm/range-parser.svg?style=flat
+[downloads-url]: https://npmjs.org/package/range-parser
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/index.js
new file mode 100644
index 0000000..09a6c40
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/index.js
@@ -0,0 +1,49 @@
+
+/**
+ * Parse "Range" header `str` relative to the given file `size`.
+ *
+ * @param {Number} size
+ * @param {String} str
+ * @return {Array}
+ * @api public
+ */
+
+module.exports = function(size, str){
+ var valid = true;
+ var i = str.indexOf('=');
+
+ if (-1 == i) return -2;
+
+ var arr = str.slice(i + 1).split(',').map(function(range){
+ var range = range.split('-')
+ , start = parseInt(range[0], 10)
+ , end = parseInt(range[1], 10);
+
+ // -nnn
+ if (isNaN(start)) {
+ start = size - end;
+ end = size - 1;
+ // nnn-
+ } else if (isNaN(end)) {
+ end = size - 1;
+ }
+
+ // limit last-byte-pos to current length
+ if (end > size - 1) end = size - 1;
+
+ // invalid
+ if (isNaN(start)
+ || isNaN(end)
+ || start > end
+ || start < 0) valid = false;
+
+ return {
+ start: start,
+ end: end
+ };
+ });
+
+ arr.type = str.slice(0, i);
+
+ return valid ? arr : -1;
+};
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/package.json
new file mode 100644
index 0000000..9fc243b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/node_modules/range-parser/package.json
@@ -0,0 +1,76 @@
+{
+ "name": "range-parser",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ },
+ "description": "Range header field string parser",
+ "version": "1.0.2",
+ "license": "MIT",
+ "keywords": [
+ "range",
+ "parser",
+ "http"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/range-parser"
+ },
+ "devDependencies": {
+ "istanbul": "0",
+ "mocha": "1",
+ "should": "2"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --require should",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --require should"
+ },
+ "gitHead": "ae23b02ce705b56e7f7c48e832d41fa710227ecc",
+ "bugs": {
+ "url": "https://github.com/jshttp/range-parser/issues"
+ },
+ "homepage": "https://github.com/jshttp/range-parser",
+ "_id": "range-parser@1.0.2",
+ "_shasum": "06a12a42e5131ba8e457cd892044867f2344e549",
+ "_from": "range-parser@~1.0.2",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "06a12a42e5131ba8e457cd892044867f2344e549",
+ "tarball": "http://registry.npmjs.org/range-parser/-/range-parser-1.0.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.2.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/package.json
new file mode 100644
index 0000000..0b7efcd
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/send/package.json
@@ -0,0 +1,86 @@
+{
+ "name": "send",
+ "description": "Better streaming static file server with Range and conditional-GET support",
+ "version": "0.12.1",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/pillarjs/send"
+ },
+ "keywords": [
+ "static",
+ "file",
+ "server"
+ ],
+ "dependencies": {
+ "debug": "~2.1.1",
+ "depd": "~1.0.0",
+ "destroy": "1.0.3",
+ "escape-html": "1.0.1",
+ "etag": "~1.5.1",
+ "fresh": "0.2.4",
+ "mime": "1.3.4",
+ "ms": "0.7.0",
+ "on-finished": "~2.2.0",
+ "range-parser": "~1.0.2"
+ },
+ "devDependencies": {
+ "after": "0.8.1",
+ "istanbul": "0.3.5",
+ "mocha": "~2.1.0",
+ "supertest": "~0.15.0"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "test": "mocha --check-leaks --reporter spec --bail",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot"
+ },
+ "gitHead": "700757e7aa065b58fb101bd149bedb8239fac228",
+ "bugs": {
+ "url": "https://github.com/pillarjs/send/issues"
+ },
+ "homepage": "https://github.com/pillarjs/send",
+ "_id": "send@0.12.1",
+ "_shasum": "65e2e4330eae6b4d1082a921bfc8e9c9f1776b31",
+ "_from": "send@0.12.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "65e2e4330eae6b4d1082a921bfc8e9c9f1776b31",
+ "tarball": "http://registry.npmjs.org/send/-/send-0.12.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/send/-/send-0.12.1.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/.travis.yml b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/.travis.yml
new file mode 100644
index 0000000..af92b02
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/.travis.yml
@@ -0,0 +1,6 @@
+language: "node_js"
+node_js:
+ - "0.4"
+ - "0.6"
+ - "0.8"
+ - "0.10"
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/LICENSE b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/LICENSE
new file mode 100644
index 0000000..e33bd10
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2013 Jared Hanson
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/README.md b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/README.md
new file mode 100644
index 0000000..2f94e9b
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/README.md
@@ -0,0 +1,34 @@
+# utils-merge
+
+Merges the properties from a source object into a destination object.
+
+## Install
+
+ $ npm install utils-merge
+
+## Usage
+
+```javascript
+var a = { foo: 'bar' }
+ , b = { bar: 'baz' };
+
+merge(a, b);
+// => { foo: 'bar', bar: 'baz' }
+```
+
+## Tests
+
+ $ npm install
+ $ npm test
+
+[![Build Status](https://secure.travis-ci.org/jaredhanson/utils-merge.png)](http://travis-ci.org/jaredhanson/utils-merge)
+
+## Credits
+
+ - [Jared Hanson](http://github.com/jaredhanson)
+
+## License
+
+[The MIT License](http://opensource.org/licenses/MIT)
+
+Copyright (c) 2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/index.js b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/index.js
new file mode 100644
index 0000000..4265c69
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/index.js
@@ -0,0 +1,23 @@
+/**
+ * Merge object b with object a.
+ *
+ * var a = { foo: 'bar' }
+ * , b = { bar: 'baz' };
+ *
+ * merge(a, b);
+ * // => { foo: 'bar', bar: 'baz' }
+ *
+ * @param {Object} a
+ * @param {Object} b
+ * @return {Object}
+ * @api public
+ */
+
+exports = module.exports = function(a, b){
+ if (a && b) {
+ for (var key in b) {
+ a[key] = b[key];
+ }
+ }
+ return a;
+};
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/package.json b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/package.json
new file mode 100644
index 0000000..7c115b0
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/node_modules/utils-merge/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "utils-merge",
+ "version": "1.0.0",
+ "description": "merge() utility function",
+ "keywords": [
+ "util"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/jaredhanson/utils-merge.git"
+ },
+ "bugs": {
+ "url": "http://github.com/jaredhanson/utils-merge/issues"
+ },
+ "author": {
+ "name": "Jared Hanson",
+ "email": "jaredhanson@gmail.com",
+ "url": "http://www.jaredhanson.net/"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://www.opensource.org/licenses/MIT"
+ }
+ ],
+ "main": "./index",
+ "dependencies": {},
+ "devDependencies": {
+ "mocha": "1.x.x",
+ "chai": "1.x.x"
+ },
+ "scripts": {
+ "test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ },
+ "_id": "utils-merge@1.0.0",
+ "dist": {
+ "shasum": "0294fb922bb9375153541c4f7096231f287c8af8",
+ "tarball": "http://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
+ },
+ "_from": "utils-merge@1.0.0",
+ "_npmVersion": "1.2.25",
+ "_npmUser": {
+ "name": "jaredhanson",
+ "email": "jaredhanson@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jaredhanson",
+ "email": "jaredhanson@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_shasum": "0294fb922bb9375153541c4f7096231f287c8af8",
+ "_resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
+}
diff --git a/dgbuilder/dgeflows/node_modules/serve-static/package.json b/dgbuilder/dgeflows/node_modules/serve-static/package.json
new file mode 100644
index 0000000..f53e3ba
--- /dev/null
+++ b/dgbuilder/dgeflows/node_modules/serve-static/package.json
@@ -0,0 +1,84 @@
+{
+ "name": "serve-static",
+ "description": "Serve static files",
+ "version": "1.9.1",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/expressjs/serve-static"
+ },
+ "dependencies": {
+ "escape-html": "1.0.1",
+ "parseurl": "~1.3.0",
+ "send": "0.12.1",
+ "utils-merge": "1.0.0"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.5",
+ "mocha": "~2.1.0",
+ "supertest": "~0.15.0"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
+ },
+ "gitHead": "8cce88d079c19cb8ace548f60bd216622de993e1",
+ "bugs": {
+ "url": "https://github.com/expressjs/serve-static/issues"
+ },
+ "homepage": "https://github.com/expressjs/serve-static",
+ "_id": "serve-static@1.9.1",
+ "_shasum": "a611b2b8a2cfb5f89685f293cb365f3f5eb61451",
+ "_from": "serve-static@^1.9.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "a611b2b8a2cfb5f89685f293cb365f3f5eb61451",
+ "tarball": "http://registry.npmjs.org/serve-static/-/serve-static-1.9.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.9.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/dgeflows/npm-debug.log b/dgbuilder/dgeflows/npm-debug.log
new file mode 100644
index 0000000..05fea45
--- /dev/null
+++ b/dgbuilder/dgeflows/npm-debug.log
@@ -0,0 +1,142 @@
+0 info it worked if it ends with ok
+1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', '--save', 'install', 'lodash' ]
+2 info using npm@1.4.28
+3 info using node@v0.10.33
+4 verbose node symlink /usr/bin/node
+5 verbose readDependencies using package.json deps
+6 verbose cache add [ 'lodash', null ]
+7 verbose cache add name=undefined spec="lodash" args=["lodash",null]
+8 verbose parsed url { protocol: null,
+8 verbose parsed url slashes: null,
+8 verbose parsed url auth: null,
+8 verbose parsed url host: null,
+8 verbose parsed url port: null,
+8 verbose parsed url hostname: null,
+8 verbose parsed url hash: null,
+8 verbose parsed url search: null,
+8 verbose parsed url query: null,
+8 verbose parsed url pathname: 'lodash',
+8 verbose parsed url path: 'lodash',
+8 verbose parsed url href: 'lodash' }
+9 silly lockFile 901466a5-lodash lodash
+10 verbose lock lodash /home/users/jg2636/.npm/901466a5-lodash.lock
+11 silly lockFile 901466a5-lodash lodash
+12 silly lockFile 901466a5-lodash lodash
+13 verbose addNamed [ 'lodash', '' ]
+14 verbose addNamed [ null, '*' ]
+15 silly lockFile f856e425-lodash lodash@
+16 verbose lock lodash@ /home/users/jg2636/.npm/f856e425-lodash.lock
+17 silly addNameRange { name: 'lodash', range: '*', hasData: false }
+18 verbose request where is /lodash
+19 verbose request registry https://registry.npmjs.org/
+20 verbose request id 64c31183ee783ee0
+21 verbose url raw /lodash
+22 verbose url resolving [ 'https://registry.npmjs.org/', './lodash' ]
+23 verbose url resolved https://registry.npmjs.org/lodash
+24 verbose request where is https://registry.npmjs.org/lodash
+25 info trying registry request attempt 1 at 19:18:10
+26 verbose etag "4SFFQ49GQS2ZP8UP8RWL4JM9I"
+27 http GET https://registry.npmjs.org/lodash
+28 http 304 https://registry.npmjs.org/lodash
+29 silly registry.get cb [ 304,
+29 silly registry.get { date: 'Thu, 05 Mar 2015 19:18:12 GMT',
+29 silly registry.get server: 'Apache',
+29 silly registry.get via: '1.1 varnish',
+29 silly registry.get 'last-modified': 'Thu, 05 Mar 2015 19:17:54 GMT',
+29 silly registry.get 'cache-control': 'max-age=60',
+29 silly registry.get etag: '"4SFFQ49GQS2ZP8UP8RWL4JM9I"',
+29 silly registry.get age: '27',
+29 silly registry.get 'x-served-by': 'cache-atl6228-ATL',
+29 silly registry.get 'x-cache': 'HIT',
+29 silly registry.get 'x-cache-hits': '4',
+29 silly registry.get 'x-timer': 'S1425583092.179728,VS0,VE0',
+29 silly registry.get vary: 'Accept',
+29 silly registry.get 'content-length': '0',
+29 silly registry.get 'keep-alive': 'timeout=10, max=50',
+29 silly registry.get connection: 'Keep-Alive' } ]
+30 verbose etag https://registry.npmjs.org/lodash from cache
+31 silly addNameRange number 2 { name: 'lodash', range: '*', hasData: true }
+32 silly addNameRange versions [ 'lodash',
+32 silly addNameRange [ '0.1.0',
+32 silly addNameRange '0.2.0',
+32 silly addNameRange '0.2.1',
+32 silly addNameRange '0.2.2',
+32 silly addNameRange '0.3.0',
+32 silly addNameRange '0.3.1',
+32 silly addNameRange '0.3.2',
+32 silly addNameRange '0.4.0',
+32 silly addNameRange '0.4.1',
+32 silly addNameRange '0.4.2',
+32 silly addNameRange '0.5.0-rc.1',
+32 silly addNameRange '0.5.0',
+32 silly addNameRange '0.5.1',
+32 silly addNameRange '0.5.2',
+32 silly addNameRange '0.6.0',
+32 silly addNameRange '0.6.1',
+32 silly addNameRange '0.7.0',
+32 silly addNameRange '0.8.0',
+32 silly addNameRange '0.8.1',
+32 silly addNameRange '0.8.2',
+32 silly addNameRange '0.9.0',
+32 silly addNameRange '0.9.1',
+32 silly addNameRange '0.9.2',
+32 silly addNameRange '0.10.0',
+32 silly addNameRange '1.0.0-rc.1',
+32 silly addNameRange '1.0.0-rc.2',
+32 silly addNameRange '1.0.0-rc.3',
+32 silly addNameRange '1.0.0',
+32 silly addNameRange '1.0.1',
+32 silly addNameRange '1.1.0',
+32 silly addNameRange '1.1.1',
+32 silly addNameRange '1.2.0',
+32 silly addNameRange '1.2.1',
+32 silly addNameRange '1.3.0',
+32 silly addNameRange '1.3.1',
+32 silly addNameRange '2.0.0',
+32 silly addNameRange '2.1.0',
+32 silly addNameRange '2.2.0',
+32 silly addNameRange '2.2.1',
+32 silly addNameRange '2.3.0',
+32 silly addNameRange '2.4.0',
+32 silly addNameRange '2.4.1',
+32 silly addNameRange '3.0.0',
+32 silly addNameRange '3.0.1',
+32 silly addNameRange '3.1.0',
+32 silly addNameRange '3.2.0',
+32 silly addNameRange '3.3.0',
+32 silly addNameRange '3.3.1' ] ]
+33 verbose addNamed [ 'lodash', '3.3.1' ]
+34 verbose addNamed [ '3.3.1', '3.3.1' ]
+35 silly lockFile df186d14-lodash-3-3-1 lodash@3.3.1
+36 verbose lock lodash@3.3.1 /home/users/jg2636/.npm/df186d14-lodash-3-3-1.lock
+37 silly lockFile aa1d6b40-pmjs-org-lodash-lodash-3-3-1-tgz https://registry.npmjs.org/lodash/-/lodash-3.3.1.tgz
+38 verbose lock https://registry.npmjs.org/lodash/-/lodash-3.3.1.tgz /home/users/jg2636/.npm/aa1d6b40-pmjs-org-lodash-lodash-3-3-1-tgz.lock
+39 verbose addRemoteTarball [ 'https://registry.npmjs.org/lodash/-/lodash-3.3.1.tgz',
+39 verbose addRemoteTarball '3b914d4a1bb27efcee076e0dfa58152018e2042e' ]
+40 info retry fetch attempt 1 at 19:18:10
+41 verbose fetch to= /tmp/npm-440-4xUbidX6/registry.npmjs.org/lodash/-/lodash-3.3.1.tgz
+42 http GET https://registry.npmjs.org/lodash/-/lodash-3.3.1.tgz
+43 http 200 https://registry.npmjs.org/lodash/-/lodash-3.3.1.tgz
+44 silly lockFile aa1d6b40-pmjs-org-lodash-lodash-3-3-1-tgz https://registry.npmjs.org/lodash/-/lodash-3.3.1.tgz
+45 silly lockFile aa1d6b40-pmjs-org-lodash-lodash-3-3-1-tgz https://registry.npmjs.org/lodash/-/lodash-3.3.1.tgz
+46 silly lockFile df186d14-lodash-3-3-1 lodash@3.3.1
+47 silly lockFile df186d14-lodash-3-3-1 lodash@3.3.1
+48 silly lockFile f856e425-lodash lodash@
+49 silly lockFile f856e425-lodash lodash@
+50 error Error: EACCES, mkdir '/home/users/jg2636/.npm/lodash/3.3.1'
+50 error { [Error: EACCES, mkdir '/home/users/jg2636/.npm/lodash/3.3.1']
+50 error errno: 3,
+50 error code: 'EACCES',
+50 error path: '/home/users/jg2636/.npm/lodash/3.3.1',
+50 error parent: 'dgeflows' }
+51 error Please try running this command again as root/Administrator.
+52 error System Linux 3.13.0-40-generic
+53 error command "/usr/bin/node" "/usr/bin/npm" "--save" "install" "lodash"
+54 error cwd /home/users/jg2636/nodered/dgeflows
+55 error node -v v0.10.33
+56 error npm -v 1.4.28
+57 error path /home/users/jg2636/.npm/lodash/3.3.1
+58 error code EACCES
+59 error errno 3
+60 error stack Error: EACCES, mkdir '/home/users/jg2636/.npm/lodash/3.3.1'
+61 verbose exit [ 3, true ]
diff --git a/dgbuilder/dgeflows/package.json b/dgbuilder/dgeflows/package.json
new file mode 100644
index 0000000..893aeb9
--- /dev/null
+++ b/dgbuilder/dgeflows/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "dgeflows",
+ "version": "0.0.0",
+ "private": true,
+ "scripts": {
+ "start": "node ./bin/www"
+ },
+ "dependencies": {
+ "body-parser": "~1.10.2",
+ "cookie-parser": "~1.3.3",
+ "debug": "~2.1.1",
+ "ejs": "~2.2.3",
+ "express": "~4.11.1",
+ "morgan": "~1.5.1",
+ "serve-favicon": "~2.2.0",
+ "serve-index": "^1.6.2",
+ "serve-static": "^1.9.1"
+ }
+}
diff --git a/dgbuilder/dgeflows/public/stylesheets/style.css b/dgbuilder/dgeflows/public/stylesheets/style.css
new file mode 100644
index 0000000..30e047d
--- /dev/null
+++ b/dgbuilder/dgeflows/public/stylesheets/style.css
@@ -0,0 +1,8 @@
+body {
+ padding: 50px;
+ font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
+}
+
+a {
+ color: #00B7FF;
+}
\ No newline at end of file
diff --git a/dgbuilder/dgeflows/routes/index.js b/dgbuilder/dgeflows/routes/index.js
new file mode 100644
index 0000000..cf17638
--- /dev/null
+++ b/dgbuilder/dgeflows/routes/index.js
@@ -0,0 +1,49 @@
+var express = require('express');
+var router = express.Router();
+var dgeusers = require('../dgeusers.json');
+var path = require('path');
+var _ = require('lodash');
+
+/* GET home page. */
+router.get('/', function(req, res, next) {
+ console.log("In route and dgeusers is: " + JSON.stringify(dgeusers));
+ res.render('index', { title: 'DGE Flow Browser', dgeusers: dgeusers });
+});
+
+// GET a flow file
+router.get('/listFlows/:dgeuser/flows/shared/:fileName', function(req, res, next) {
+ var fileName =req.params.fileName;
+ console.log(req.url);
+ console.log("Getting a file...");
+ console.dir(req.params);
+ // make sure we like this user
+ if ( !(_.includes(dgeusers, req.params.dgeuser)) ) {
+ console.log("Error:User " + req.params.dgeuser + " does not exist in the dgeusers.json file.");
+ res.send("No Authorized!");
+ return;
+ }
+ //filePath=path.join(__dirname, '../../users', req.params.dgeuser,'flows/shared', req.params.fileName);
+ filePath=path.join(__dirname, '../../users', req.params.dgeuser,'flows/shared', fileName );
+ console.log("Getting this file: " + filePath);
+ res.sendFile(filePath);
+});
+
+// GET a flow file
+router.get('/listFlows/:dgeuser/flows/shared/backups/:fileName', function(req, res, next) {
+ var fileName =req.params.fileName;
+ console.log(req.url);
+ console.log("Getting a file...");
+ console.dir(req.params);
+ // make sure we like this user
+ if ( !(_.includes(dgeusers, req.params.dgeuser)) ) {
+ console.log("Error:User " + req.params.dgeuser + " does not exist in the dgeusers.json file.");
+ res.send("No Authorized!");
+ return;
+ }
+ //filePath=path.join(__dirname, '../../users', req.params.dgeuser,'flows/shared', req.params.fileName);
+ filePath=path.join(__dirname, '../../users', req.params.dgeuser,'flows/shared/backups', fileName );
+ console.log("Getting this file: " + filePath);
+ res.sendFile(filePath);
+});
+
+module.exports = router;
diff --git a/dgbuilder/dgeflows/routes/users.js b/dgbuilder/dgeflows/routes/users.js
new file mode 100644
index 0000000..623e430
--- /dev/null
+++ b/dgbuilder/dgeflows/routes/users.js
@@ -0,0 +1,9 @@
+var express = require('express');
+var router = express.Router();
+
+/* GET users listing. */
+router.get('/', function(req, res, next) {
+ res.send('respond with a resource');
+});
+
+module.exports = router;
diff --git a/dgbuilder/dgeflows/src/app.js b/dgbuilder/dgeflows/src/app.js
new file mode 100644
index 0000000..888ab56
--- /dev/null
+++ b/dgbuilder/dgeflows/src/app.js
@@ -0,0 +1,70 @@
+var express = require('express');
+var path = require('path');
+var favicon = require('serve-favicon');
+var logger = require('morgan');
+var cookieParser = require('cookie-parser');
+var bodyParser = require('body-parser');
+var serveIndex = require('serve-index');
+var serveStatic = require('serve-static')
+
+var routes = require('./routes/index');
+var users = require('./routes/users');
+var dgeusers = require('./dgeusers.json');
+console.log("Read these dgeusers: " + JSON.stringify(dgeusers));
+
+var app = express();
+
+// view engine setup
+app.set('views', path.join(__dirname, 'views'));
+app.set('view engine', 'ejs');
+
+// uncomment after placing your favicon in /public
+//app.use(favicon(__dirname + '/public/favicon.ico'));
+app.use(logger('dev'));
+app.use(bodyParser.json());
+app.use(bodyParser.urlencoded({ extended: false }));
+app.use(cookieParser());
+app.use(express.static(path.join(__dirname, 'public')));
+
+
+// set up static serving and directory listings for each user's lib/flows directory
+dgeusers.forEach( function(dgeuser) {
+ app.use('/listFlows/'+dgeuser+'/lib/flows', serveIndex('../' + dgeuser+'/lib/flows', {'view': 'details', 'icons': true}))
+});
+
+app.use('/', routes);
+app.use('/users', users);
+
+// catch 404 and forward to error handler
+app.use(function(req, res, next) {
+ var err = new Error('Not Found');
+ err.status = 404;
+ next(err);
+});
+
+// error handlers
+
+// development error handler
+// will print stacktrace
+if (app.get('env') === 'development') {
+ app.use(function(err, req, res, next) {
+ res.status(err.status || 500);
+ res.render('error', {
+ message: err.message,
+ error: err
+ });
+ });
+}
+
+// production error handler
+// no stacktraces leaked to user
+app.use(function(err, req, res, next) {
+ res.status(err.status || 500);
+ res.render('error', {
+ message: err.message,
+ error: {}
+ });
+});
+
+
+module.exports = app;
diff --git a/dgbuilder/dgeflows/src/error.ejs b/dgbuilder/dgeflows/src/error.ejs
new file mode 100644
index 0000000..7cf94ed
--- /dev/null
+++ b/dgbuilder/dgeflows/src/error.ejs
@@ -0,0 +1,3 @@
+<h1><%= message %></h1>
+<h2><%= error.status %></h2>
+<pre><%= error.stack %></pre>
diff --git a/dgbuilder/dgeflows/src/index.ejs b/dgbuilder/dgeflows/src/index.ejs
new file mode 100644
index 0000000..c207c7b
--- /dev/null
+++ b/dgbuilder/dgeflows/src/index.ejs
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title><%= title %></title>
+ <link rel='stylesheet' href='/stylesheets/style.css' />
+ </head>
+ <body>
+ <center>
+ <h1><%= title %></h1>
+ <p>Select user</p>
+ <% dgeusers.forEach( function(dgeuser) { %>
+ <p><a href='listFlows/<%= dgeuser %>/lib/flows'><%= dgeuser %></a></p>
+ <% }); %>
+ </center>
+ </body>
+</html>
diff --git a/dgbuilder/dgeflows/src/index.js b/dgbuilder/dgeflows/src/index.js
new file mode 100644
index 0000000..96a0865
--- /dev/null
+++ b/dgbuilder/dgeflows/src/index.js
@@ -0,0 +1,28 @@
+var express = require('express');
+var router = express.Router();
+var dgeusers = require('../dgeusers.json');
+var path = require('path');
+var _ = require('lodash');
+
+/* GET home page. */
+router.get('/', function(req, res, next) {
+ console.log("In route and dgeusers is: " + JSON.stringify(dgeusers));
+ res.render('index', { title: 'DGE Flow Browser', dgeusers: dgeusers });
+});
+
+// GET a flow file
+router.get('/listFlows/:dgeuser/:lib/:flows/:fileName', function(req, res, next) {
+ console.log("Getting a file...");
+ console.dir(req.params);
+ // make sure we like this user
+ if ( !(_.includes(dgeusers, req.params.dgeuser)) ) {
+ console.log("We don't like this user!");
+ res.send("No!");
+ return;
+ }
+ filePath=path.join(__dirname, '../..', req.params.dgeuser, 'lib', 'flows', req.params.fileName);
+ console.log("Getting this file: " + filePath);
+ res.sendFile(filePath);
+});
+
+module.exports = router;
diff --git a/dgbuilder/dgeflows/src/package.json b/dgbuilder/dgeflows/src/package.json
new file mode 100644
index 0000000..893aeb9
--- /dev/null
+++ b/dgbuilder/dgeflows/src/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "dgeflows",
+ "version": "0.0.0",
+ "private": true,
+ "scripts": {
+ "start": "node ./bin/www"
+ },
+ "dependencies": {
+ "body-parser": "~1.10.2",
+ "cookie-parser": "~1.3.3",
+ "debug": "~2.1.1",
+ "ejs": "~2.2.3",
+ "express": "~4.11.1",
+ "morgan": "~1.5.1",
+ "serve-favicon": "~2.2.0",
+ "serve-index": "^1.6.2",
+ "serve-static": "^1.9.1"
+ }
+}
diff --git a/dgbuilder/dgeflows/src/users.js b/dgbuilder/dgeflows/src/users.js
new file mode 100644
index 0000000..623e430
--- /dev/null
+++ b/dgbuilder/dgeflows/src/users.js
@@ -0,0 +1,9 @@
+var express = require('express');
+var router = express.Router();
+
+/* GET users listing. */
+router.get('/', function(req, res, next) {
+ res.send('respond with a resource');
+});
+
+module.exports = router;
diff --git a/dgbuilder/dgeflows/stop b/dgbuilder/dgeflows/stop
new file mode 100755
index 0000000..7dc490d
--- /dev/null
+++ b/dgbuilder/dgeflows/stop
@@ -0,0 +1,3 @@
+
+pm2 stop --name dgebrowser bin/www
+
diff --git a/dgbuilder/dgeflows/stopgo b/dgbuilder/dgeflows/stopgo
new file mode 100755
index 0000000..cfb63e2
--- /dev/null
+++ b/dgbuilder/dgeflows/stopgo
@@ -0,0 +1,4 @@
+
+./stop
+./go
+
diff --git a/dgbuilder/dgeflows/views/error.ejs b/dgbuilder/dgeflows/views/error.ejs
new file mode 100644
index 0000000..7cf94ed
--- /dev/null
+++ b/dgbuilder/dgeflows/views/error.ejs
@@ -0,0 +1,3 @@
+<h1><%= message %></h1>
+<h2><%= error.status %></h2>
+<pre><%= error.stack %></pre>
diff --git a/dgbuilder/dgeflows/views/index.ejs b/dgbuilder/dgeflows/views/index.ejs
new file mode 100644
index 0000000..d4e5122
--- /dev/null
+++ b/dgbuilder/dgeflows/views/index.ejs
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title><%= title %></title>
+ <link rel='stylesheet' href='/stylesheets/style.css' />
+ </head>
+ <body>
+ <center>
+ <h1><%= title %></h1>
+ <p>Select user</p>
+ <% dgeusers.forEach( function(dgeuser) { %>
+ <p><a href='listFlows/<%= dgeuser %>/flows/shared'><%= dgeuser %></a></p>
+ <% }); %>
+ </center>
+ </body>
+</html>
diff --git a/dgbuilder/flowShareUsers.js b/dgbuilder/flowShareUsers.js
new file mode 100644
index 0000000..d132116
--- /dev/null
+++ b/dgbuilder/flowShareUsers.js
@@ -0,0 +1,16 @@
+module.exports = {"flowShareUsers":
+ [
+ {
+ "name" : "Release sdnc1.0",
+ "rootDir" : "sdnc1.0"
+ },
+ {
+ "name" : "Release sdnc2.0",
+ "rootDir" : "sdnc2.0"
+ },
+ {
+ "name" : "Release sdnc3.0",
+ "rootDir" : "sdnc3.0"
+ }
+ ]
+}
diff --git a/dgbuilder/generatedJS/.gitignore b/dgbuilder/generatedJS/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/dgbuilder/generatedJS/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/dgbuilder/git_scripts/gitcheckout b/dgbuilder/git_scripts/gitcheckout
new file mode 100755
index 0000000..ca01dd7
--- /dev/null
+++ b/dgbuilder/git_scripts/gitcheckout
@@ -0,0 +1,17 @@
+if [ "$#" != "2" ]
+then
+ echo "Usage $0 gitLocalRepositoryDir branch"
+ exit
+fi
+branch=$2
+localGitRepository=$1
+cd $localGitRepository
+if [ -e "$localGitRepository" ]
+then
+ git checkout $branch
+ echo
+ echo -n "Now on Branch:"
+ git rev-parse --abbrev-ref HEAD
+else
+ echo Git Local repository not set
+fi
diff --git a/dgbuilder/git_scripts/gitckout b/dgbuilder/git_scripts/gitckout
new file mode 100755
index 0000000..3db9db8
--- /dev/null
+++ b/dgbuilder/git_scripts/gitckout
@@ -0,0 +1,15 @@
+if [ "$#" != "2" ]
+then
+ echo "Usage $0 commitId full_path_to_the_source_file"
+ exit
+fi
+fileName=$(basename $2)
+dirName=$(dirname $2)
+commitId=$1
+cd $dirName
+if [ -e "$2" ]
+then
+ rm $2 2>/dev/null
+fi
+git checkout $commitId $fileName
+cat $fileName
diff --git a/dgbuilder/git_scripts/gitcurbranch b/dgbuilder/git_scripts/gitcurbranch
new file mode 100755
index 0000000..5a82e48
--- /dev/null
+++ b/dgbuilder/git_scripts/gitcurbranch
@@ -0,0 +1,13 @@
+if [ "$#" != "1" ]
+then
+ echo "Usage $0 gitLocalRepositoryDir"
+ exit
+fi
+localGitRepository=$1
+cd $localGitRepository
+if [ -e "$localGitRepository" ]
+then
+ git rev-parse --abbrev-ref HEAD
+else
+ echo Git Local repository not set
+fi
diff --git a/dgbuilder/git_scripts/gitlog b/dgbuilder/git_scripts/gitlog
new file mode 100755
index 0000000..fd8cd37
--- /dev/null
+++ b/dgbuilder/git_scripts/gitlog
@@ -0,0 +1,18 @@
+if [ "$#" != "1" ]
+then
+ echo "Usage $0 full_path_to_the_source_file"
+ exit
+fi
+fileName=$(basename $1)
+dirName=$(dirname $1)
+cd $dirName
+glog=$(git log --pretty=format:'%H %cD %an %s' -n 25 ${fileName}|awk ' ORS=" "{print \
+"\n{\n" \
+"\"commit\": \"" $1 "\",\n" \
+"\"date\": \""$2 " "$3" "$4" "$5 " "$6 "\",\n" \
+"\"author\": \"" $8 ", "$9 "\",\n" \
+"\"comment\": \""} { s = ""; for (i = 10; i <= NF; i++) s = s $i " "; print s } { print "\"\n},"}')
+echo "["
+update_glog=$(echo $glog|sed -e 's/,$//g')
+echo $update_glog
+echo "]"
diff --git a/dgbuilder/git_scripts/gitpull b/dgbuilder/git_scripts/gitpull
new file mode 100755
index 0000000..8d475ad
--- /dev/null
+++ b/dgbuilder/git_scripts/gitpull
@@ -0,0 +1,7 @@
+if [ "$#" != "1" ]
+then
+ echo "Usage $0 full_path_to_local_repository"
+ exit
+fi
+cd $1
+git pull
diff --git a/dgbuilder/git_scripts/gitstatus b/dgbuilder/git_scripts/gitstatus
new file mode 100755
index 0000000..9b24ea7
--- /dev/null
+++ b/dgbuilder/git_scripts/gitstatus
@@ -0,0 +1,7 @@
+if [ "$#" != "1" ]
+then
+ echo "Usage $0 full_path_to_local_repository"
+ exit
+fi
+cd $1
+git status
diff --git a/dgbuilder/nodes/99-sample.html.demo b/dgbuilder/nodes/99-sample.html.demo
new file mode 100644
index 0000000..4dcc8ba
--- /dev/null
+++ b/dgbuilder/nodes/99-sample.html.demo
@@ -0,0 +1,79 @@
+<!--
+ Copyright 2014 IBM Corp.
+
+ 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.
+-->
+
+<!-- Sample html file that corresponds to the 99-sample.js file -->
+<!-- This creates and configures the onscreen elements of the node -->
+
+<!-- If you use this as a template, update the copyright with your own name. -->
+
+<!-- First, the content of the edit dialog is defined. -->
+
+<script type="text/x-red" data-template-name="sample">
+ <!-- data-template-name identifies the node type this is for -->
+
+ <!-- Each of the following divs creates a field in the edit dialog. -->
+ <!-- Generally, there should be an input for each property of the node. -->
+ <!-- The for and id attributes identify the corresponding property -->
+ <!-- (with the 'node-input-' prefix). -->
+ <!-- The available icon classes are defined Twitter Bootstrap glyphicons -->
+ <div class="form-row">
+ <label for="node-input-topic"><i class="fa fa-tasks"></i> Topic</label>
+ <input type="text" id="node-input-topic" placeholder="Topic">
+ </div>
+
+ <br/>
+ <!-- By convention, most nodes have a 'name' property. The following div -->
+ <!-- provides the necessary field. Should always be the last option -->
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+</script>
+
+
+<!-- Next, some simple help text is provided for the node. -->
+<script type="text/x-red" data-help-name="sample">
+ <!-- data-help-name identifies the node type this help is for -->
+ <!-- This content appears in the Info sidebar when a node is selected -->
+ <!-- The first <p> is used as the pop-up tool tip when hovering over a -->
+ <!-- node in the palette. -->
+ <p>Simple sample input node. Just sends a single message when it starts up.
+ This is not very useful.</p>
+ <p>Outputs an object called <b>msg</b> containing <b>msg.topic</b> and
+ <b>msg.payload</b>. msg.payload is a String.</p>
+</script>
+
+<!-- Finally, the node type is registered along with all of its properties -->
+<!-- The example below shows a small subset of the properties that can be set-->
+<script type="text/javascript">
+ RED.nodes.registerType('sample',{
+ category: 'input', // the palette category
+ defaults: { // defines the editable properties of the node
+ name: {value:""}, // along with default values.
+ topic: {value:"", required:true}
+ },
+ inputs:1, // set the number of inputs - only 0 or 1
+ outputs:1, // set the number of outputs - 0 to n
+ // set the icon (held in icons dir below where you save the node)
+ icon: "myicon.png", // saved in icons/myicon.png
+ label: function() { // sets the default label contents
+ return this.name||this.topic||"sample";
+ },
+ labelStyle: function() { // sets the class to apply to the label
+ return this.name?"node_label_italic":"";
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/99-sample.js.demo b/dgbuilder/nodes/99-sample.js.demo
new file mode 100644
index 0000000..f926945
--- /dev/null
+++ b/dgbuilder/nodes/99-sample.js.demo
@@ -0,0 +1,64 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+// If you use this as a template, update the copyright with your own name.
+
+// Sample Node-RED node file
+
+
+module.exports = function(RED) {
+ "use strict";
+ // require any external libraries we may need....
+ //var foo = require("foo-library");
+
+ // The main node definition - most things happen in here
+ function SampleNode(n) {
+ // Create a RED node
+ RED.nodes.createNode(this,n);
+
+ // Store local copies of the node configuration (as defined in the .html)
+ this.topic = n.topic;
+
+ // Do whatever you need to do in here - declare callbacks etc
+ // Note: this sample doesn't do anything much - it will only send
+ // this message once at startup...
+ // Look at other real nodes for some better ideas of what to do....
+ var msg = {};
+ msg.topic = this.topic;
+ msg.payload = "Hello world !"
+
+ // send out the message to the rest of the workspace.
+ this.send(msg);
+
+ // respond to inputs....
+ this.on('input', function (msg) {
+ node.warn("I saw a payload: "+msg.payload);
+ // in this example just send it straight on... should process it here really
+ this.send(msg);
+ });
+
+ this.on("close", function() {
+ // Called when the node is shutdown - eg on redeploy.
+ // Allows ports to be closed, connections dropped etc.
+ // eg: this.client.disconnect();
+ });
+ }
+
+ // Register the node by name. This must be called before overriding any of the
+ // Node functions.
+ RED.nodes.registerType("sample",SampleNode);
+
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/block.html b/dgbuilder/nodes/dge/dgelogic/block.html
new file mode 100644
index 0000000..29c85ac
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/block.html
@@ -0,0 +1,223 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+<script type="text/x-red" data-template-name="block">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <div>
+ <table border='0' width='100%' style='cellspacing:5px;'>
+ <tr>
+ <td>
+ <input type="checkbox" id="node-input-atomic-chkBox" onclick=updateXml()>
+ <input type="hidden" id="node-input-atomic" value="">
+ </td>
+ <td>
+ <span style="font-size:.8em;">Atomic</span>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!--<a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a>-->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="block">
+ <p>A block node.</p>
+ <p>Name can be anything.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+ <div class="section">
+<h3><a name="Flow_Control"></a>Flow Control</h3>
+<div class="section">
+<h4><a name="Block_node"></a>Block node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>block</b> node is used to executes a set of nodes. </p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>atomic</b></td>
+<td align="left">if <i>true</i>, then if a node returns failure, subsequent nodes will not be executed and nodes already executed will be backed out.</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>None</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<p>None</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><block>
+ <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <parameter name="file" value="/tmp/gamma_r1.log" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="RESERVED"/>
+ <parameter name="field3" value="$asePort.uni_circuit_id"/>
+ </record>
+ <return status="success">
+ <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
+ </return>
+</block></pre></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+ var blockXmlEditor ;
+ RED.nodes.registerType('block',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"block"},
+ xml: {value:"<block>\n"},
+ atomic: {value:"false"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ var atomic = $( "#node-input-atomic").val();
+ if(atomic == "true"){
+ $('#node-input-atomic-chkBox').prop('checked', true);
+ }else{
+ $('#node-input-atomic-chkBox').prop('checked', false);
+ }
+
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ blockXmlEditor=that.editor;
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ //console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ //console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ delete blockXmlEditor;
+ }
+ });
+function updateXml(){
+ if($("#node-input-atomic-chkBox").is(':checked')){
+ $("#node-input-name").val("block : atomic");
+ $("#node-input-atomic").val("true");
+ //alert($("#node-input-xml-editor div.textview div.textviewContent").text());
+ var xmlStr = blockXmlEditor.getText();
+ var re = new RegExp("<block[^<]+");
+ xmlStr=xmlStr.replace(re,"<block atomic='true'>");
+ //$("#node-input-xml-editor div.textview div.textviewContent").text(xmlStr);
+ blockXmlEditor.setText(xmlStr);
+ //console.log("block xmlStr:" + xmlStr);
+ }else{
+ $("#node-input-name").val("block");
+ $("#node-input-atomic").val("false");
+ var xmlStr = blockXmlEditor.getText();
+ var re = new RegExp("<block[^<]+");
+ xmlStr=xmlStr.replace(re,"<block>");
+ blockXmlEditor.setText(xmlStr);
+ //$("#node-input-xml-editor div.textview div.textviewContent").text(xmlStr);
+ //console.log("block xmlStr:" + xmlStr);
+ }
+}
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/block.js b/dgbuilder/nodes/dge/dgelogic/block.js
new file mode 100644
index 0000000..4414d86
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/block.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function block(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("block",block);
+ // RED.library.register("block");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/call.html b/dgbuilder/nodes/dge/dgelogic/call.html
new file mode 100644
index 0000000..02b865e
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/call.html
@@ -0,0 +1,183 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="call">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!--<a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a>-->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="call">
+ <p>A call node.</p>
+ <p>Name can be anything.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h4><a name="Call_node"></a>Call node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>call</b> node is used to call another graph</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>module</b></td>
+<td align="left">Module of directed graph to call. If unset, defaults to that of calling graph</td></tr>
+<tr class="b">
+<td align="center"><b>rpc</b></td>
+<td align="left">rpc of directed graph to call.</td></tr>
+<tr class="a">
+<td align="center"><b>version</b></td>
+<td align="left">version of graph to call, If unset, uses active version.</td></tr>
+<tr class="b">
+<td align="center"><b>mode</b></td>
+<td align="left">mode (sync/async) of graph to call. If unset, defaults to that of calling graph.</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>Not applicable</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<table border="1" class="table table-striped"><caption> .</caption>
+<tr class="a">
+<td align="center"><b>success</b></td>
+<td align="left">Sub graph returned success</td></tr>
+<tr class="b">
+<td align="center"><b>not-found</b></td>
+<td align="left">Graph not found</td></tr>
+<tr class="a">
+<td align="center"><b>failure</b></td>
+<td align="left">Subgraph returned success</td></tr></table></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><call rpc="svc-topology-reserve" mode="sync" /></pre></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('call',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"call"},
+ xml: {value:"<call module='' rpc='' mode='sync' >\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ //console.log("show Values clicked.");
+ showValuesBox(that.editor,rpcValues);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/call.js b/dgbuilder/nodes/dge/dgelogic/call.js
new file mode 100644
index 0000000..3570e3d
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/call.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function call(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("call",call);
+ // RED.library.register("call");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/configure.html b/dgbuilder/nodes/dge/dgelogic/configure.html
new file mode 100644
index 0000000..f1afc8d
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/configure.html
@@ -0,0 +1,227 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="configure">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="configure">
+ <p>A configure node.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+
+ <div class="section">
+<h3><a name="Device_Management"></a>Device Management</h3>
+<div class="section">
+<h4><a name="Configure_node"></a>Configure node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>configure</b> node is used to configure a device.</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>plugin</b></td>
+<td align="left">Fully qualified Java class of resource adaptor to be used</td></tr>
+<tr class="b">
+<td align="center"><b>activate</b></td>
+<td align="left">Activate device/interface, for devices that support a separate activation step.</td></tr>
+<tr class="a">
+<td align="center"><b>key</b></td>
+<td align="left">SQL-like string specifying criteria for item to configure</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>Specific to device adaptor.</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>success</b></td>
+<td align="left">Device successfully configured</td></tr>
+<tr class="b">
+<td align="center"><b>not-found</b></td>
+<td align="left">Element to be configured does not exist.</td></tr>
+<tr class="a">
+<td align="center"><b>not-ready</b></td>
+<td align="left">Element is not in a state where it can be configured/activated</td></tr>
+<tr class="b">
+<td align="center"><b>already-active</b></td>
+<td align="left">Attempt to activate element that is already active</td></tr>
+<tr class="a">
+<td align="center"><b>failure</b></td>
+<td align="left">Configure failed for some other reason</td></tr></table></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><configure adaptor="org.openecomp.sdnc.sli.adaptor.emt.EmtAdaptor"
+ key="$uni-circuit-id" activate="true">
+ <parameter name="circuit.id" value="$uni-circuit-id" />
+ <parameter name="subscriber.name" value="$subscriber-name" />
+ <parameter name="emt.clli" value="$edge-device-clli" />
+ <parameter name="port.tagging" value="$port-tagging" />
+ <parameter name="port.mediaSpeed" value="$media-speed" />
+ <parameter name="location.state" value="$uni-location-state" />
+ <parameter name="location.city" value="$uni-location-city" />
+ <parameter name="cosCategory" value="$cos-category" />
+ <parameter name="gosProfile" value="$gos-profile" />
+ <parameter name="lldp" value="$asePort.resource-lldp" />
+ <parameter name="mtu" value="$asePort.resource-mtu" />
+ <outcome value="success">
+ <block>
+ <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <parameter name="file" value="/tmp/gamma_r1.log" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="ACTIVE"/>
+ <parameter name="field3" value="$uni-circuit-id"/>
+ </record>
+ <return status="success">
+ <parameter name="edge-device-clli" value="$asePort.resource-emt-clli" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value="already-active">
+ <return status="failure">
+ <parameter name="error-code" value="1590" />
+ <parameter name="error-message" value="Port already active" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1542" />
+ <parameter name="error-message" value="Activation failure" />
+ </return>
+ </outcome>
+</configure></pre></div></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('configure',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"configure"},
+ xml: {value:"<configure adaptor='' key='' activate='' >\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/configure.js b/dgbuilder/nodes/dge/dgelogic/configure.js
new file mode 100644
index 0000000..7345750
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/configure.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function configure(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("configure",configure);
+ // RED.library.register("configure");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/delete.html b/dgbuilder/nodes/dge/dgelogic/delete.html
new file mode 100644
index 0000000..4a011e6
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/delete.html
@@ -0,0 +1,187 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="delete">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="delete">
+ <p>A delete node.</p>
+ <p>Name can be anything.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h4><a name="Delete_node"></a>Delete node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>delete</b> node is used to delete a resource from the local resource inventory.</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>plugin</b></td>
+<td align="left">Fully qualified Java class of resource adaptor to be used</td></tr>
+<tr class="b">
+<td align="center"><b>resource</b></td>
+<td align="left">Type of resource to delete</td></tr>
+<tr class="a">
+<td align="center"><b>key</b></td>
+<td align="left">SQL-like string specifying key to delete</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>None</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>success</b></td>
+<td align="left">Resource specified deleted successfully.</td></tr>
+<tr class="b">
+<td align="center"><i>failure</i>></td>
+<td align="left">Resource specified was not deleted</td></tr></table></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><delete plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource"
+ resource="ase-port"
+ key="uni_circuit_id == $uni-circuit-id">
+ <outcome value="true">
+ <return status="success"/>
+ </outcome>
+ <outcome value="false">
+ <return status="failure"/>
+ </outcome>
+</delete></pre></div></div></div>
+
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('delete',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"delete"},
+ xml: {value:"<delete plugin='' resource='' key=''>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/delete.js b/dgbuilder/nodes/dge/dgelogic/delete.js
new file mode 100644
index 0000000..3773106
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/delete.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function deleteNode(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("delete",deleteNode);
+ // RED.library.register("delete");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/execute.html b/dgbuilder/nodes/dge/dgelogic/execute.html
new file mode 100644
index 0000000..2a5934a
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/execute.html
@@ -0,0 +1,197 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="execute">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="execute">
+ <p>A execute node.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+ <div class="section">
+<h3><a name="Java_Plugin_Support"></a>Java Plugin Support</h3>
+<div class="section">
+<h4><a name="Execute_node"></a>Execute node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>An <b>execute</b> node is used to execute Java code supplied as a plugin</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>plugin</b></td>
+<td align="left">Fully qualified Java class of plugin to be used</td></tr>
+<tr class="b">
+<td align="center"><b>method</b></td>
+<td align="left">Name of method in the plugin class to execute. Method must return void, and take 2 arguments: a Map (for parameters) and a SvcLogicContext (to allow plugin read/write access to context memory)</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>Specific to plugin / method</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>success</b></td>
+<td align="left">Device successfully configured</td></tr>
+<tr class="b">
+<td align="center"><b>not-found</b></td>
+<td align="left">Plugin class could not be loaded</td></tr>
+<tr class="a">
+<td align="center"><b>unsupported-method</b></td>
+<td align="left">Named method taking (Map, SvcLogicContext) could not be found</td></tr>
+<tr class="b">
+<td align="center"><b>failure</b></td>
+<td align="left">Configure failed for some other reason</td></tr></table></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><execute plugin="org.openecomp.sdnc.sli.plugin.HelloWorld"
+ method="log">
+ <parameter name="message" value="Hello, world!" />
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="error-code" value="1590" />
+ <parameter name="error-message" value="Could not locate plugin" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1542" />
+ <parameter name="error-message" value="Internal error" />
+ </return>
+ </outcome>
+</execute></pre></div></div></div></div>
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('execute',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"execute"},
+ xml: {value:"<execute plugin='' method='' >\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/execute.js b/dgbuilder/nodes/dge/dgelogic/execute.js
new file mode 100644
index 0000000..66265f9
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/execute.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function execute(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("execute",execute);
+ // RED.library.register("configure");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/exists.html b/dgbuilder/nodes/dge/dgelogic/exists.html
new file mode 100644
index 0000000..652495e
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/exists.html
@@ -0,0 +1,187 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="exists">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="exists">
+ <p>A exists node.</p>
+ <p>Name can be anything.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h4><a name="Exists_node"></a>Exists node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>An <b>exists</b> node is used to determine whether a particular instance of a resource exists. For example, this might be used to test whether a particular switch CLLI is provisioned.</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>plugin</b></td>
+<td align="left">Fully qualified Java class of resource adaptor to be used</td></tr>
+<tr class="b">
+<td align="center"><b>resource</b></td>
+<td align="left">Type of resource to check</td></tr>
+<tr class="a">
+<td align="center"><b>key</b></td>
+<td align="left">SQL-like string specifying key to check for</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>None</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>true</b></td>
+<td align="left">Resource specified exists.</td></tr>
+<tr class="b">
+<td align="center"><b>false</b></td>
+<td align="left">Resource specified is unknown</td></tr></table></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><exists plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource"
+ resource="ase-port"
+ key="uni_circuit_id == $uni-circuit-id">
+ <outcome value="true">
+ <return status="success"/>
+ </outcome>
+ <outcome value="false">
+ <return status="failure"/>
+ </outcome>
+</exists></pre></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('exists',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"exists"},
+ xml: {value:"<exists plugin='' resource='' key=''>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/exists.js b/dgbuilder/nodes/dge/dgelogic/exists.js
new file mode 100644
index 0000000..d4482af
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/exists.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function exists(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("exists",exists);
+ // RED.library.register("exists");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/forNode.html b/dgbuilder/nodes/dge/dgelogic/forNode.html
new file mode 100644
index 0000000..01a8a05
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/forNode.html
@@ -0,0 +1,172 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="for">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="for">
+ <p>A for node.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>for</b> node provides a fixed iteration looping mechanism, similar to the Java for loop</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>index</b></td>
+<td align="left">index variable</td></tr>
+<tr class="b">
+<td align="center"><b>start</b></td>
+<td align="left">initial value</td></tr>
+<tr class="a">
+<td align="center"><b>end</b></td>
+<td align="left">maximum value</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>Not applicable.</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<p>Not applicable. The <b>status</b> node has no outcomes.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><for index="i" start="0" end="$network.num-segments">
+ <set>
+ <parameter name="$vlanlist" value="eval($vlanlist+','+$network.segment[i].provider-segmentation-id)"/>
+ </set>
+</for></pre></div></div></div>
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('for',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"for"},
+ xml: {value:"<for index='' start='' end='' >\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/forNode.js b/dgbuilder/nodes/dge/dgelogic/forNode.js
new file mode 100644
index 0000000..567da85
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/forNode.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function forNode(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("for",forNode);
+ // RED.library.register("for");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/get-resource.html b/dgbuilder/nodes/dge/dgelogic/get-resource.html
new file mode 100644
index 0000000..4e1b1a9
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/get-resource.html
@@ -0,0 +1,192 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="get-resource">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="get-resource">
+ <p>A get-resource node.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h4><a name="Get-resource_node"></a>Get-resource node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>get-resource</b> node is used to retrieve information about a particular resource and make it available to other nodes in the service logic tree. For example, this might be used to retrieve information about a particular uni-port.</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>plugin</b></td>
+<td align="left">Fully qualified Java class of resource adaptor to be used</td></tr>
+<tr class="b">
+<td align="center"><b>resource</b></td>
+<td align="left">Type of resource to retrieve</td></tr>
+<tr class="a">
+<td align="center"><b>key</b></td>
+<td align="left">SQL-like string specifying criteria for retrieval</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>None</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>success</b></td>
+<td align="left">Resource successfully released</td></tr>
+<tr class="b">
+<td align="center"><b>not-found</b></td>
+<td align="left">Resource referenced does not exist</td></tr>
+<tr class="a">
+<td align="center"><b>failure</b></td>
+<td align="left">Resource release failed for some other reason</td></tr></table></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><get-resource plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource"
+ resource="ase-port"
+ key="uni_circuit_id == $uni-circuit-id">
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure"/>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure"/>
+ </outcome>
+</get-resource></pre></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('get-resource',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"get-resource"},
+ xml: {value:"<get-resource plugin='' resource='' key='' >\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/get-resource.js b/dgbuilder/nodes/dge/dgelogic/get-resource.js
new file mode 100644
index 0000000..597e021
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/get-resource.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function getResource(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("get-resource",getResource);
+ // RED.library.register("get-resource");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/is-available.html b/dgbuilder/nodes/dge/dgelogic/is-available.html
new file mode 100644
index 0000000..4bc2236
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/is-available.html
@@ -0,0 +1,186 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="is-available">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="is-available">
+ <p>A is-available node.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h4><a name="Is-available_node"></a>Is-available node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>An <b>is-available</b> node is used to determine whether a particular type of resource is available. For example, this might be used to test whether any ports are available for assignment on a particular switch.</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>plugin</b></td>
+<td align="left">Fully qualified Java class of resource adaptor to be used</td></tr>
+<tr class="b">
+<td align="center"><b>resource</b></td>
+<td align="left">Type of resource to check</td></tr>
+<tr class="a">
+<td align="center"><b>key</b></td>
+<td align="left">SQL-like string specifying key to check for</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>None</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>true</b></td>
+<td align="left">Resource requested is available</td></tr>
+<tr class="b">
+<td align="center"><b>false</b></td>
+<td align="left">Resource requested is not available</td></tr></table></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><is-available plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource"
+ resource="ase-port"
+ key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value">
+ <outcome value="true">
+ <return status="success"/>
+ </outcome>
+ <outcome value="false">
+ <return status="failure"/>
+ </outcome>
+</is-available></pre></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('is-available',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"is-available"},
+ xml: {value:"<is-available plugin='' resource='' key=''>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/is-available.js b/dgbuilder/nodes/dge/dgelogic/is-available.js
new file mode 100644
index 0000000..93f23f4
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/is-available.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function isAvailable(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("is-available",isAvailable);
+ // RED.library.register("is-available");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/notify.html b/dgbuilder/nodes/dge/dgelogic/notify.html
new file mode 100644
index 0000000..7882048
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/notify.html
@@ -0,0 +1,195 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="notify">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="notify">
+ <p>A notify node.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+<!--
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>An <b>notify</b> node is used to execute Java code supplied as a plugin</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>plugin</b></td>
+<td align="left">Fully qualified Java class of plugin to be used</td></tr>
+<tr class="b">
+<td align="center"><b>method</b></td>
+<td align="left">Name of method in the plugin class to execute. Method must return void, and take 2 arguments: a Map (for parameters) and a SvcLogicContext (to allow plugin read/write access to context memory)</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>Specific to plugin / method</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>success</b></td>
+<td align="left">Device successfully configured</td></tr>
+<tr class="b">
+<td align="center"><b>not-found</b></td>
+<td align="left">Plugin class could not be loaded</td></tr>
+<tr class="a">
+<td align="center"><b>unsupported-method</b></td>
+<td align="left">Named method taking (Map, SvcLogicContext) could not be found</td></tr>
+<tr class="b">
+<td align="center"><b>failure</b></td>
+<td align="left">Configure failed for some other reason</td></tr></table></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><notify plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource"
+ resource="network-connection" action="DELETE" >
+ <parameter name="message" value="Hello, world!" />
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="error-code" value="1590" />
+ <parameter name="error-message" value="Could not locate plugin" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1542" />
+ <parameter name="error-message" value="Internal error" />
+ </return>
+ </outcome>
+</notify></pre></div></div></div></div>
+-->
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('notify',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"notify"},
+ xml: {value:"<notify plugin='' resource='' action='' >\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ //console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ //console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/notify.js b/dgbuilder/nodes/dge/dgelogic/notify.js
new file mode 100644
index 0000000..8b58e9e
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/notify.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function notify(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("notify",notify);
+ // RED.library.register("configure");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/record.html b/dgbuilder/nodes/dge/dgelogic/record.html
new file mode 100644
index 0000000..654b88d
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/record.html
@@ -0,0 +1,185 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="record">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="record">
+ <p>A record node.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h3><a name="Recording"></a>Recording</h3>
+<div class="section">
+<h4><a name="Record_node"></a>Record node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>record</b> node is used to record an event. For example, this might be used to log provisioning events.</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>plugin</b></td>
+<td align="left">Fully qualified Java class to handle recording.</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>Parameters will depend on the plugin being used. For the FileRecorder class, the parameters are as follows</p>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>file</b></td>
+<td align="left">The file to which the record should be written</td></tr>
+<tr class="b">
+<td align="center"><b>field1</b></td>
+<td align="left">First field to write. There will be <b>field</b> parameters for each field to write, from <b>field1</b> through <b>fieldN</b>. A special value __TIMESTAMP__ may be assigned to a field to insert the current timestamp</td></tr></table></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>success</b></td>
+<td align="left">Record successfully written</td></tr>
+<tr class="b">
+<td align="center"><b>failure</b></td>
+<td align="left">Record could not be successfully written</td></tr></table></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <parameter name="file" value="/tmp/gamma_r1.log" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="ACTIVE"/>
+ <parameter name="field3" value="$uni-circuit-id"/>
+</record></pre></div></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('record',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"record"},
+ xml: {value:"<record>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/record.js b/dgbuilder/nodes/dge/dgelogic/record.js
new file mode 100644
index 0000000..f29bf8f
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/record.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function record(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("record",record);
+ // RED.library.register("record");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/release.html b/dgbuilder/nodes/dge/dgelogic/release.html
new file mode 100644
index 0000000..39c8839
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/release.html
@@ -0,0 +1,192 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="release">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="release">
+ <p>A release node.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h4><a name="Release_node"></a>Release node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>release</b> node is used to mark a resource as no longer in use, and thus available for assignment.</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>plugin</b></td>
+<td align="left">Fully qualified Java class of resource adaptor to be used</td></tr>
+<tr class="b">
+<td align="center"><b>resource</b></td>
+<td align="left">Type of resource to release</td></tr>
+<tr class="a">
+<td align="center"><b>key</b></td>
+<td align="left">SQL-like string specifying key to check of resource to release</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>None</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>success</b></td>
+<td align="left">Resource successfully released</td></tr>
+<tr class="b">
+<td align="center"><b>not-found</b></td>
+<td align="left">Resource referenced does not exist</td></tr>
+<tr class="a">
+<td align="center"><b>failure</b></td>
+<td align="left">Resource release failed for some other reason</td></tr></table></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><release plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource"
+ resource="ase-port"
+ key="uni_circuit_id == $uni-circuit-id">
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure"/>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure"/>
+ </outcome>
+</release></pre></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('release',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"release"},
+ xml: {value:"<release plugin='' resource='' key='' >\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/release.js b/dgbuilder/nodes/dge/dgelogic/release.js
new file mode 100644
index 0000000..ff03fff
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/release.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function release(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("release",release);
+ // RED.library.register("release");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/reserve.html b/dgbuilder/nodes/dge/dgelogic/reserve.html
new file mode 100644
index 0000000..c2e4a10
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/reserve.html
@@ -0,0 +1,189 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="reserve">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="reserve">
+ <p>A reserve node.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h4><a name="Reserve_node"></a>Reserve node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>reserve</b> node is used to reserve a particular type of resource.. For example, this might be used to reserve a port on a particular switch.</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>plugin</b></td>
+<td align="left">Fully qualified Java class of resource adaptor to be used</td></tr>
+<tr class="b">
+<td align="center"><b>resource</b></td>
+<td align="left">Type of resource to reserve</td></tr>
+<tr class="a">
+<td align="center"><b>key</b></td>
+<td align="left">SQL-like string specifying criteria for reservation</td></tr>
+<tr class="b">
+<td align="center"><b>select</b></td>
+<td align="left">String to specify, if <b>key</b> matches multiple entries, which entry should take precedence</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>None</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>success</b></td>
+<td align="left">Resource requested was successfully reserved</td></tr>
+<tr class="b">
+<td align="center"><b>failure</b></td>
+<td align="left">Resource requested was not successfully reserved</td></tr></table></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><reserve plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource"
+ resource="ase-port"
+ key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"
+ select="min(speed)">
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure"/>
+ </outcome>
+</reserve></pre></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('reserve',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"reserve"},
+ xml: {value:"<reserve plugin='' resource='' key='' select=''>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/reserve.js b/dgbuilder/nodes/dge/dgelogic/reserve.js
new file mode 100644
index 0000000..6aab1bd
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/reserve.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function reserve(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("reserve",reserve);
+ // RED.library.register("reserve");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/save.html b/dgbuilder/nodes/dge/dgelogic/save.html
new file mode 100644
index 0000000..56bfa49
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/save.html
@@ -0,0 +1,189 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="save">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="save">
+ <p>A save node.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h4><a name="Save_node"></a>Save node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>save</b> node is used to save information about a particular resource to persistent storage. For example, this might be used to save information about a particular uni-port.</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>plugin</b></td>
+<td align="left">Fully qualified Java class of resource adaptor to be used</td></tr>
+<tr class="b">
+<td align="center"><b>resource</b></td>
+<td align="left">Type of resource to save</td></tr>
+<tr class="a">
+<td align="center"><b>key</b></td>
+<td align="left">SQL-like string specifying criteria for retrieval</td></tr>
+<tr class="b">
+<td align="center"><b>force</b></td>
+<td align="left">If "true", save resource even if this resource is already stored in persistent storage</td></tr>
+<tr class="a">
+<td align="center"><b>pfx</b></td>
+<td align="left">Prefix to be prepended to variable names, when attributes are set in SvcLogicContext</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>Values to save (columns) are specified as parameters, with each name corresponding to a column name and each value corresponding to the value to set.</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>success</b></td>
+<td align="left">Resource successfully saved</td></tr>
+<tr class="b">
+<td align="center"><b>failure</b></td>
+<td align="left">Resource save failed</td></tr></table></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><save plugin="`$gamma-resource-plugin`" resource="resourceName"
+ key="keyName=value"
+ pfx="requests.resourceName">
+ <parameter name="parameter1"
+ value="`$parameterOneValue`" />
+ <parameter name="parameter2" value="`$parameterparameterTwoValue`" />
+</save></pre></div></div></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('save',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"save"},
+ xml: {value:"<save plugin='' resource='' key='' force='' pfx=''>\n<parameter name='' value='' />\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/save.js b/dgbuilder/nodes/dge/dgelogic/save.js
new file mode 100644
index 0000000..5771ae9
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/save.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function save(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("save",save);
+ // RED.library.register("save");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/set.html b/dgbuilder/nodes/dge/dgelogic/set.html
new file mode 100644
index 0000000..b4a02f3
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/set.html
@@ -0,0 +1,162 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="set">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="set">
+ <p>A set node.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h4><a name="Set_node"></a>Set node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>set</b> node is used to set one or more values in the execution context</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<p>Not applicable. The <b>set</b> node does not have attributes.</p></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>Values to be set are passed as parameters</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<p>Not applicable. The <b>set</b> node has no outcomes.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><set>
+ <parameter name="vlan" value="$network.provider-segmentation-id" />
+</set></pre></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('set',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"set"},
+ xml: {value:"<set>\n<parameter name='' value='' />\n"},
+ comments:{value:""}
+ },
+ inputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/set.js b/dgbuilder/nodes/dge/dgelogic/set.js
new file mode 100644
index 0000000..9b93950
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/set.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function set(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("set",set);
+ // RED.library.register("set");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/switchNode.html b/dgbuilder/nodes/dge/dgelogic/switchNode.html
new file mode 100644
index 0000000..61c7109
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/switchNode.html
@@ -0,0 +1,232 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="switchNode">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="switchNode">
+ <p>A switch node.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h4><a name="Switch_node"></a>Switch node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>switch</b> node is used to make a decision based on its <b>test</b> attribute.</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>test</b></td>
+<td align="left">Condition to test</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>None</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<p>Depends on the <b>test</b> condition</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><switch test="$uni-cir-units">
+ <outcome value="Mbps">
+ <reserve plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource"
+ resource="ase-port"
+ key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"
+ pfx="asePort">
+
+ <outcome value="success">
+ <return status="success">
+ <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1010" />
+ <parameter name="error-message" value="No ports found that match criteria" />
+ </return>
+ </outcome>
+ </reserve>
+ </outcome>
+ <outcome value="Gbps">
+ <reserve plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource"
+ resource="ase-port"
+ key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value*1000"
+ pfx="asePort">
+
+ <outcome value="success">
+ <return status="success">
+ <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1010" />
+ <parameter name="error-message" value="No ports found that match criteria" />
+ </return>
+ </outcome>
+ </reserve>
+ </outcome>
+</switch></pre></div></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('switchNode',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"switch"},
+ xml: {value:"<switch test=''>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ //To increase the width of dialogbox
+ //$(".ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-front.ui-dialog-buttons.ui-draggable.ui-resizable").css("width","1400px");
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+
+function encodeTestStr(xmlStr){
+ var updatedXmlStr=xmlStr;
+ if(updatedXmlStr != null){
+ var testCondition = getAttributeValue(xmlStr,"test");
+ if(testCondition != null && testCondition != ''){
+ if(testCondition.indexOf("<") == -1){
+ testCondition=testCondition.replace(/</g,"<");
+ }
+ updatedXmlStr="<switch test=\"" + testCondition + "\" >";
+ }
+ }
+ return updatedXmlStr;
+}
+
+function decodeTestStr(xmlStr){
+ var updatedXmlStr=xmlStr;
+ if(updatedXmlStr != null){
+ var testCondition = getAttributeValue(xmlStr,"test");
+ if(testCondition != null && testCondition != ''){
+ testCondition=testCondition.replace(/</g,"<");
+ updatedXmlStr="<switch test=\"" + testCondition + "\" >";
+ }
+ }
+ return updatedXmlStr;
+}
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/switchNode.js b/dgbuilder/nodes/dge/dgelogic/switchNode.js
new file mode 100644
index 0000000..6a7a545
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/switchNode.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function switchNode(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("switchNode",switchNode);
+ // RED.library.register("switch");
+}
diff --git a/dgbuilder/nodes/dge/dgelogic/update.html b/dgbuilder/nodes/dge/dgelogic/update.html
new file mode 100644
index 0000000..b268f7a
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/update.html
@@ -0,0 +1,195 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="update">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="update">
+ <p>A update node.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+<!--
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>An <b>update</b> node is used to execute Java code supplied as a plugin</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>plugin</b></td>
+<td align="left">Fully qualified Java class of plugin to be used</td></tr>
+<tr class="b">
+<td align="center"><b>method</b></td>
+<td align="left">Name of method in the plugin class to execute. Method must return void, and take 2 arguments: a Map (for parameters) and a SvcLogicContext (to allow plugin read/write access to context memory)</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>Specific to plugin / method</p></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>success</b></td>
+<td align="left">Device successfully configured</td></tr>
+<tr class="b">
+<td align="center"><b>not-found</b></td>
+<td align="left">Plugin class could not be loaded</td></tr>
+<tr class="a">
+<td align="center"><b>unsupported-method</b></td>
+<td align="left">Named method taking (Map, SvcLogicContext) could not be found</td></tr>
+<tr class="b">
+<td align="center"><b>failure</b></td>
+<td align="left">Configure failed for some other reason</td></tr></table></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><update plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource"
+ resource="network-connection" action="DELETE" >
+ <parameter name="message" value="Hello, world!" />
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="error-code" value="1590" />
+ <parameter name="error-message" value="Could not locate plugin" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1542" />
+ <parameter name="error-message" value="Internal error" />
+ </return>
+ </outcome>
+</update></pre></div></div></div></div>
+-->
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('update',{
+ color:"#fdd0a2",
+ category: 'DGElogic',
+ defaults: {
+ name: {value:"update"},
+ xml: {value:"<update resource='' force='' plugin='' key='' pfx='' local-only=''>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ //console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ //console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgelogic/update.js b/dgbuilder/nodes/dge/dgelogic/update.js
new file mode 100644
index 0000000..f614af8
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgelogic/update.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function update(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("update",update);
+ // RED.library.register("configure");
+}
diff --git a/dgbuilder/nodes/dge/dgemain/GenericXML.html b/dgbuilder/nodes/dge/dgemain/GenericXML.html
new file mode 100644
index 0000000..270bea6
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgemain/GenericXML.html
@@ -0,0 +1,140 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="GenericXML">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 250px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!--<a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show SLI Values</b></a>-->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="GenericXML">
+ <p>A generic DGEmain node.</p>
+ <p>Name can be anything.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('GenericXML',{
+ color:"#fdd0a2",
+ category: 'DGEmain',
+ defaults: {
+ name: {value:"dge-node"},
+ xml: {value:""},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgemain/GenericXML.js b/dgbuilder/nodes/dge/dgemain/GenericXML.js
new file mode 100644
index 0000000..e5fc062
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgemain/GenericXML.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function GenericXML(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("GenericXML",GenericXML);
+ // RED.library.register("GenericXML");
+}
diff --git a/dgbuilder/nodes/dge/dgemain/comment.html b/dgbuilder/nodes/dge/dgemain/comment.html
new file mode 100644
index 0000000..c34d14c
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgemain/comment.html
@@ -0,0 +1,97 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="comment">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-comment"></i> Comment</label>
+ <input type="text" id="node-input-name" placeholder="Comment">
+ </div>
+ <div class="form-row">
+ <label for="node-input-info" style="width: 100% !important;"><i class="fa fa-comments"></i> More</label>
+ <input type="hidden" id="node-input-info" autofocus="autofocus">
+ <div style="height: 250px;" class="node-text-editor" id="node-input-info-editor" ></div>
+ <input type="hidden" id="node-input-comments">
+ </div>
+ <div class="form-tips">Tip: this isn't meant for "War and Peace" - but useful notes can be kept here.</div>
+</script>
+
+<script type="text/x-red" data-help-name="comment">
+ <p>Simple comment block.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('comment',{
+ category: 'DGEmain',
+ color:"#ffffff",
+ defaults: {
+ name: {value:""},
+ info: {value:""},
+ comments:{value:""}
+ },
+ inputs:0,
+ outputs:0,
+ icon: "comment.png",
+ label: function() {
+ return this.name||"";
+ },
+ labelStyle: function() {
+ return this.name?"node_label_italic":"";
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-info-editor").css("height",(ui.size.height-235)+"px");
+ };
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-info-editor'),
+ lang:"text",
+ showLinesRuler:false,
+ showFoldingRuler:false,
+ contents: $("#node-input-info").val()
+ });
+ $("#node-input-name").focus();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-info").val(this.editor.getText());
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgemain/comment.js b/dgbuilder/nodes/dge/dgemain/comment.js
new file mode 100644
index 0000000..ef5f080
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgemain/comment.js
@@ -0,0 +1,23 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ function CommentNode(n) {
+ RED.nodes.createNode(this,n);
+ }
+ RED.nodes.registerType("comment",CommentNode);
+}
diff --git a/dgbuilder/nodes/dge/dgemain/dgstart.html b/dgbuilder/nodes/dge/dgemain/dgstart.html
new file mode 100644
index 0000000..9caa841
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgemain/dgstart.html
@@ -0,0 +1,1322 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+<div id="svclogicPageDiv" ></div>
+<!-- dgbuilder javascript files START -->
+<script src="util/js/validateNodeXml.js"/>
+<script src="util/js/sliValues.js"/>
+<script src="util/js/dgeToXml.js"/>
+<script src="util/js/vkbeautify.0.99.00.beta.js"/>
+<!-- dgbuilder javascript files END -->
+
+<script type="text/x-red" data-template-name="dgstart">
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+<style>
+.no-close .ui-dialog-titlebar-close {display: none }
+.alertDialogButton {
+ border-top: 1px solid #96d1f8;
+ background: #65a9d7;
+ background: -webkit-gradient(linear, left top, left bottom, from(#3e779d), to(#65a9d7));
+ background: -webkit-linear-gradient(top, #3e779d, #65a9d7);
+ background: -moz-linear-gradient(top, #3e779d, #65a9d7);
+ background: -ms-linear-gradient(top, #3e779d, #65a9d7);
+ background: -o-linear-gradient(top, #3e779d, #65a9d7);
+ padding: 5px 10px;
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ border-radius: 8px;
+ -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
+ -moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
+ box-shadow: rgba(0,0,0,1) 0 1px 0;
+ text-shadow: rgba(0,0,0,.4) 0 1px 0;
+ color: white;
+ font-size: 14px;
+ font-family: Georgia, serif;
+ text-decoration: none;
+ vertical-align: middle;
+ }
+.alertDialogButton:hover {
+ border-top-color: #28597a;
+ background: #28597a;
+ color: #ccc;
+ }
+
+.alertDialogButton:active {
+ border-top-color: #1b435e;
+ background: #1b435e;
+ }
+.disabled-button {
+ border-top: 1px solid #96d1f8;
+ background: lightgrey;
+ background: -webkit-gradient(linear, left top, left bottom, from(grey), to(lightgrey));
+ background: -webkit-linear-gradient(top, grey, grey);
+ background: -moz-linear-gradient(top, grey, grey);
+ background: -ms-linear-gradient(top, grey, grey);
+ background: -o-linear-gradient(top, grey, grey);
+ padding: 5px 10px;
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ border-radius: 8px;
+ -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
+ -moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
+ box-shadow: rgba(0,0,0,1) 0 1px 0;
+ text-shadow: rgba(0,0,0,.4) 0 1px 0;
+ color: lightgrey;
+ font-size: 14px;
+ font-family: Georgia, serif;
+ text-decoration: none;
+ vertical-align: middle;
+ }
+</style>
+<script type="text/javascript">
+
+function activateDG(module,rpc,version,mode,displayOnlyCurrent){
+ var paramsObj = {'module': module , 'rpc' : rpc , 'version' : version , 'mode' : mode,'displayOnlyCurrent' : false};
+ if(displayOnlyCurrent){
+ paramsObj = {'module': module , 'rpc' : rpc , 'version' : version , 'mode' : mode,'displayOnlyCurrent' : true};
+ }
+ var dgInfo = "<div><table width='100%' border='1'><tr style='background-color:#65a9d7;color:white;' ><th>Module</th><th>RPC</th><th>Version</th></tr><tr style='background-color:white'><td>" + module +"</td><td>" + rpc + "</td><td>" +version + "</td></tr></table></div><br>";
+ var alertMsg = dgInfo + "<p>Are you sure you want to Activate this DG ?</p>";
+$( "#alertdialog" ).dialog({
+ dialogClass: "no-close",
+ autoOpen :false,
+ modal:true,
+ draggable : true,
+ /*dialogClass: "alert",*/
+ title: "Confirm Activate",
+ width: 600,
+ buttons: [
+ {
+ text: "Activate",
+ class:"alertDialogButton",
+ click: function() {
+ $.get("/activateDG" , paramsObj)
+ .done(function( data ) {
+ //RED.notify("<strong>Activated Successfully</strong>");
+ var htmlStr = "";
+ var title ="";
+ if(displayOnlyCurrent){
+ htmlStr=getHtmlStr(data,true);
+ title="Service Logic Administration Module=" + module + " and RPC=" + rpc;
+ }else{
+ htmlStr=getHtmlStr(data);
+ title= "Service Logic Administration - " + data.dbHost;
+ }
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: title,
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .fail(function( err ) {
+ RED.notify("<strong>Could not Activate</strong>");
+ var htmlStr = "<p>" + "could not activate" + module + " " + rpc + " " + version +"</p> <a onclick='javascript:showSLA()'></a>";
+ if(displayOnlyCurrent == true){
+ htmlStr = "<p>" + "could not activate" + module + " " + rpc + " " + version +"</p> <a onclick='javascript:showCurrentDGs(\"" + module + "\",\"" + rpc + "\")'>Back to DG List</a>";
+ }
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: "Service Logic Administration - " + err.dbHost,
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .always(function() {
+ // $('.ui-dialog:has(#alertdialog)').empty().remove();
+ $("#alertdialog" ).dialog('close');
+
+ });
+ }
+ },
+ {
+ text: "Cancel",
+ class:"alertDialogButton",
+ click: function() {
+ //$('.ui-dialog:has(#alertdialog)').empty().remove();
+ $( this ).dialog( "close" );
+ }
+ }
+ ]
+}).html(alertMsg).dialog('open');
+//var dialogClass = $("#alertdialog").dialog( "option", "dialogClass" );
+//$( "#alertdialog" ).dialog( "option", "dialogClass", "alert" );
+//$("#alertdialog").dialog("widget").find(".ui-dialog-buttonpane").css("background-color", "#ECECFF");
+/*
+$('#alertdialog').css("background-color", "#ECECEC");
+$("#alertdialog").dialog("widget").find(".ui-dialog-buttonpane").css("background-color", "#ECECEC");
+
+// button pane style
+$("#alertdialog").dialog("widget").find(".ui-dialog-buttonpane").css({"padding":".1em .1em .1em 0","margin":"0 0 0 0"} )
+
+// button style
+$("#alertdialog").dialog("widget").find("button").css({"padding":"0 .2em 0 .2em","margin":"0 .5em 0 0"} )
+$("#alertdialog").dialog("widget").find("button").addClass("alertDialogButton");
+*/
+//console.dir($("#alertdialog"));
+}
+
+
+function deActivateDG(module,rpc,version,mode,displayOnlyCurrent){
+ var paramsObj = {'module': module , 'rpc' : rpc , 'version' : version , 'mode' : mode,'displayOnlyCurrent' : false};
+ if(displayOnlyCurrent){
+ paramsObj = {'module': module , 'rpc' : rpc , 'version' : version , 'mode' : mode,'displayOnlyCurrent' : true};
+ }
+ var dgInfo = "<div ><table width='100%' border='1'><tr style='background-color:#65a9d7;color:white;'><th>Module</th><th>RPC</th><th>Version</th></tr><tr style='background-color:white'><td>" + module +"</td><td>" + rpc + "</td><td>" +version + "</td></tr></table></div><br>";
+ var alertMsg = dgInfo + "<p>Are you sure you want to De-Activate this DG ?</p>";
+$( "#alertdialog" ).dialog({
+ dialogClass: "no-close",
+ autoOpen : false,
+ modal:true,
+ draggable : true,
+ title: "Confirm De-Activate",
+ width: 600,
+ buttons: [
+ {
+ text: "De-Activate",
+ class:"alertDialogButton",
+ click: function() {
+ $.get("/deActivateDG" , paramsObj)
+ .done(function( data ) {
+ //RED.notify("<strong>deActivated Successfully</strong>");
+ var htmlStr = "";
+ var title ="";
+ if(displayOnlyCurrent){
+ htmlStr=getHtmlStr(data,true);
+ title="Service Logic Administration Module=" + module + " and RPC=" + rpc;
+ }else{
+ htmlStr=getHtmlStr(data);
+ title= "Service Logic Administration - " + data.dbHost;
+ }
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: title,
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .fail(function( err ) {
+ RED.notify("<strong>Could not De-Activate</strong>");
+ var htmlStr = "<p>" + "could not deactivate" + module + " " + rpc + " " + version +"</p> <a onclick='javascript:showSLA()'></a>";
+ if(displayOnlyCurrent == true){
+ htmlStr = "<p>" + "could not deactivate" + module + " " + rpc + " " + version +"</p> <a onclick='javascript:showCurrentDGs(\"" + module + "\",\"" + rpc + "\")'>Back to DG List</a>";
+ }
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: "Service Logic Administration - " + err.dbHost,
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .always(function() {
+ //$('.ui-dialog:has(#alertdialog)').empty().remove();
+ $( "#alertdialog" ).dialog( "close" );
+ //$("#alertdialog" ).dialog('destroy').remove();
+ });
+ }
+ },
+ {
+ text: "Cancel",
+ class:"alertDialogButton",
+ click: function() {
+ //$('.ui-dialog:has(#alertdialog)').empty().remove();
+ //$(this).dialog('destroy').remove()
+ //$( this ).dialog( "close" );
+ /*if ($("#alertdialog").hasClass('ui-dialog-content')) {
+ $("#alertdialog" ).dialog('close');
+ }else{
+ $( this ).dialog( "close" );
+ }
+ */
+ $( this ).dialog( "close" );
+ }
+ }
+ ]
+}).html(alertMsg).dialog("open");
+}
+
+function deleteDG(module,rpc,version,mode,displayOnlyCurrent){
+ var paramsObj = {'module': module , 'rpc' : rpc , 'version' : version , 'mode' : mode,'displayOnlyCurrent' : false};
+ if(displayOnlyCurrent){
+ paramsObj = {'module': module , 'rpc' : rpc , 'version' : version , 'mode' : mode,'displayOnlyCurrent' : true};
+ }
+ var dgInfo = "<div ><table width='100%' border='1'><tr style='background-color:#65a9d7;color:white;'><th>Module</th><th>RPC</th><th>Version</th></tr><tr style='background-color:white'><td>" + module +"</td><td>" + rpc + "</td><td>" +version + "</td></tr></table></div><br>";
+ var alertMsg = dgInfo + "<p>Are you sure you want to Delete this DG ?</p>";
+$( "#alertdialog" ).dialog({
+ dialogClass: "no-close",
+ autoOpen: false,
+ modal:true,
+ draggable : true,
+ title: "Confirm Delete",
+ width: 600,
+ buttons: [
+ {
+ text: "Delete",
+ class:"alertDialogButton",
+ click: function() {
+ $.get("/deleteDG" , paramsObj)
+ .done(function( data ) {
+ RED.notify("<strong>Deleted " + module + " " + rpc + " " + version + " Successfully</strong>");
+ var htmlStr = "";
+ var title ="";
+ if(displayOnlyCurrent){
+ htmlStr=getHtmlStr(data,true);
+ title="Service Logic Administration Module=" + module + " and RPC=" + rpc;
+ }else{
+ htmlStr=getHtmlStr(data);
+ title= "Service Logic Administration - " + data.dbHost;
+ }
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: title,
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .fail(function( err ) {
+ //RED.notify("<strong>Could not Delete" + module + " " + rpc + " " + version + "</strong>");
+ var htmlStr = "<p>" + "could not delete" + module + " " + rpc + " " + version +"</p> <a onclick='javascript:showSLA()'></a>";
+ if(displayOnlyCurrent == true){
+ htmlStr = "<p>" + "could not delete" + module + " " + rpc + " " + version +"</p> <a onclick='javascript:showCurrentDGs(\"" + module + "\",\"" + rpc + "\")'>Back to DG List</a>";
+ }
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: "Service Logic Administration - " + err.dbHost,
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .always(function() {
+ $( "#alertdialog" ).dialog( "close" );
+ //$('.ui-dialog:has(#alertdialog)').empty().remove();
+ //$("#alertdialog" ).dialog('destroy').remove();
+ });
+ }
+ },
+ {
+ text: "Cancel",
+ class:"alertDialogButton",
+ click: function() {
+ /*
+ if ($("#alertdialog").hasClass('ui-dialog-content')) {
+ $("#alertdialog" ).dialog('close');
+ }else{
+ $( this ).dialog( "close" );
+ }
+ */
+ //$( "#alertdialog" ).dialog( "close" );
+ //$('.ui-dialog:has(#alertdialog)').empty().remove();
+ //$( this ).dialog( "close" );
+ $( this ).dialog( "close" );
+ }
+ }
+ ]
+}).html(alertMsg).dialog("open");
+}
+/*
+function downloadDGXml(_module,rpc,version,mode){
+ var paramsObj = {'_module': _module , 'rpc' : rpc , 'version' : version , 'mode' : mode};
+ var form = $('<form id="dwnldDbXmlFormId" method="POST" action="/downloadDGXml"></form>');
+ form.append('<input type="hidden" name="_module" value="' + _module + '"/>');
+ form.append('<input type="hidden" name="rpc" value="' + rpc + '"/>');
+ form.append('<input type="hidden" name="version" value="' + version + '"/>');
+ form.append('<input type="hidden" name="mode" value="' + mode + '"/>');
+ form.appendTo('body');
+ $("#dwnldDbXmlFormId").submit();
+}
+*/
+
+function displayXml(module,rpc,version,mode,displayOnlyCurrent){
+ var paramsObj = {'_module': module , 'rpc' : rpc , 'version' : version , 'mode' : mode,'displayOnlyCurrent' : false};
+ var title="Service Logic Administration";
+ if(displayOnlyCurrent){
+ paramsObj = {'_module': module , 'rpc' : rpc , 'version' : version , 'mode' : mode,'displayOnlyCurrent' : true};
+ title="Service Logic Administration Module=" + module + " and RPC=" + rpc;
+ }else{
+ title="Service Logic Administration";
+ }
+ //var headingStr = "<a style='color: #337ab7;' onclick='javascript:showSLA()'><<Back to DG List</a><br><div style='background-color:#337ab7;clear:both;'><table style='width:100%;' border='0'>" +
+ var headingStr = "<a style='color: #337ab7;cursor:pointer;' onclick='javascript:showSLA()'><<Back to DG List</a><br><div style='clear:both;'><table style='width:25%' border='0'>" ;
+ if(displayOnlyCurrent == true){
+ headingStr = "<a style='color: #337ab7;cursor:pointer;' onclick='javascript:showCurrentDGs(\"" + module + "\",\"" + rpc + "\")'><<Back to DG List</a><br><div style='clear:both;'><table style='width:25%' border='0'>" ;
+ }
+ headingStr += "<tr><td><b>Module</b></td><td>" + module + "</td></tr>" +
+ "<tr><td><b>RPC</b></td><td>" + rpc + "</td></tr>" +
+ "<tr><td><b>Version</b></td><td>" + version + "</td></tr>" +
+ "<tr><td><b>Mode</b></td><td>" + mode + "</td></tr>" +
+ "</table></div>";
+
+ //var urlStr = "/displayXml?_module=" + module + "&rpc=" + rpc + "&version=" + version + "&mode=" + mode;
+ $.get("/displayXml",paramsObj)
+ .done(function( data ) {
+ //var htmlStr= headingStr + '<div style="clear:both;"></div><div style="background-color:lightgrey;border-style: solid;border-color:#337ab7;clear:both;">' + data.xmldata + "</div>";
+ var htmlStr= headingStr + '<hr style="clear:both;height:5px;background-color:#337ab7;"><div>' + data.xmldata + "</div>";
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: title,
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .fail(function( err ) {
+ //RED.notify("<strong>Could not display XML</strong>");
+ var htmlStr = "<p>" + "Could not display xml for" + module + " " + rpc + " " + version + "</p><a style='color: #337ab7;cursor:pointer;' onclick='javascript:showSLA()'>Back to DG List</a><br>";
+ if(displayOnlyCurrent == true){
+ htmlStr = "<p>" + "could not display XML" + module + " " + rpc + " " + version +"</p> <a onclick='javascript:showCurrentDGs(\"" + module + "\",\"" + rpc + "\")'>Back to DG List</a>";
+ }
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: "Service Logic Administration",
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .always(function() {
+ });
+}
+
+function displayDG(module,rpc,version,mode,displayOnlyCurrent){
+ var paramsObj = {'_module': module , 'rpc' : rpc , 'version' : version , 'mode' : mode,'displayOnlyCurrent' : false};
+ var title="Service Logic Administration";
+ if(displayOnlyCurrent){
+ paramsObj = {'_module': module , 'rpc' : rpc , 'version' : version , 'mode' : mode,'displayOnlyCurrent' : true};
+ }
+ //var headingStr = "<a style='color: #337ab7;cursor:pointer' onclick='javascript:showSLA()'><<Back to DG List</a><br><div><table id='msgTable' style='width:25%;background-color:lightgrey' border='0'>" +
+ var headingStr = "<a style='color: #337ab7;cursor:pointer;' onclick='javascript:showSLA()'><<Back to DG List</a><br><div><table id='msgTable' style='width:25%;' border='0'>" ;
+ if(displayOnlyCurrent == true){
+ headingStr = "<a style='color: #337ab7;cursor:pointer;' onclick='javascript:showCurrentDGs(\"" + module + "\",\"" + rpc + "\")'><<Back to DG List</a><br><div style='clear:both;'><table style='width:25%' border='0'>" ;
+ title="Service Logic Administration Module=" + module + " and RPC=" + rpc;
+ }
+ headingStr +="<tr><td><b>Module</b></td><td>" + module + "</td></tr>" +
+ "<tr><td><b>RPC</b></td><td>" + rpc + "</td></tr>" +
+ "<tr><td><b>Version</b></td><td>" + version + "</td></tr>" +
+ "<tr><td><b>Mode</b></td><td>" + mode + "</td></tr>" +
+ "</table></div>";
+
+ //var urlStr = "/displayAsGv?_module=" + module + "&rpc=" + rpc + "&version=" + version + "&mode=" + mode;
+ $.get("/displayAsGv",paramsObj)
+ .done(function( data ) {
+ var htmlStr= headingStr + '<div style="background-color:white;">' + data.svg_html + "</div>";
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: "Service Logic Administration",
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .fail(function( err ) {
+ //RED.notify("<strong>Could not display XML</strong>");
+ var htmlStr = "<p>" + "Could not display DG for" + module + " " + rpc + " " + version + "</p><a style='color: #337ab7;cursor:pointer;' onclick='javascript:showSLA()'>Back to DG List</a><br>";
+ if(displayOnlyCurrent == true){
+ htmlStr = "<p>" + "could not display DG for" + module + " " + rpc + " " + version +"</p> <a onclick='javascript:showCurrentDGs(\"" + module + "\",\"" + rpc + "\")'>Back to DG List</a>";
+ }
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: "Service Logic Administration",
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .always(function() {
+ });
+}
+
+function getHtmlStr(data,displayOnlyCurrent,module,rpc){
+ var styleStr = "<style> " +
+ "table#t01 { width:100%; } \n" +
+ "table#t01 th,table#t01 td { border: 1px solid black; border-collapse: collapse; } \n" +
+ /*"table, th, td { border: 1px solid #65a9d7; border-collapse: collapse; } \n" +*/
+ "table#t01 th,table#t01 td { padding: 5px; text-align: left; } \n" +
+ "table#t01 tr:nth-child(even) { background-color: #eee; }\n" +
+ "table#t01 tr:nth-child(odd) { background-color:#fff; }\n" +
+ "table#t01 th { background-color: #65a9d7; color: white; }\n" +
+ "table#t01 a { color: #337ab7; }\n" +
+ "table#t01 a:link { color: #65a9d7; }\n" +
+ "table#t01 a:visited { color: #636; }\n" +
+ "table#t01 a:hover { color: #3366CC; cursor: pointer }\n" +
+ "table#t01 a:active { color: #65a9d7 }\n" +
+ "</style>";
+ if(data != null && data.rows != undefined && data.error == undefined){
+ var alertDialog = '<div id="alertdialog"></div>';
+ htmlStr= alertDialog + "<div style='width:1050;height:650'>" + styleStr;
+ htmlStr += "<table id='t01' >";
+ htmlStr += "<tr>";
+ htmlStr += "<th>Module</th>" ;
+ htmlStr += "<th>RPC</th>" ;
+ htmlStr += "<th>Version</th>" ;
+ htmlStr += "<th>Mode</th>" ;
+ htmlStr += "<th>Active</th>" ;
+ htmlStr += "<th>Activate/Deactivate</th>";
+ htmlStr += "<th>Display DG</th>";
+ htmlStr += "<th>XML</th>";
+ htmlStr += "<th>Delete</th>";
+ htmlStr += "</tr>";
+ var rows = data.rows;
+ if(rows != null && rows.length == 0){
+ htmlStr += "<tr>";
+ htmlStr += "<td><b>No rows found</b></td>";
+ htmlStr += "</tr></table></div>";
+ return htmlStr;
+ }
+ for(var i=0;i<rows.length;i++){
+ var row = rows[i];
+ var _module = row.module;
+ var rpc = row.rpc;
+ var version = row.version;
+ var mode = row.mode;
+ var active = row.active;
+ htmlStr += "<tr>";
+ htmlStr += "<td>" + _module + "</td>";
+ htmlStr += "<td>" + rpc + "</td>";
+ htmlStr += "<td>" + version + "</td>";
+ htmlStr += "<td>" + mode + "</td>";
+ htmlStr += "<td>" + active + "</td>";
+
+ var methodParams = "'" + _module + "','" + rpc + "','" + version + "','" + mode + "'";
+ if(displayOnlyCurrent){
+ methodParams+= ",true";
+ }
+ if(active == 'Y'){
+ htmlStr += "<td><a onclick=\"javascript:deActivateDG(" + methodParams + ")\">DeActivate</a></td>";
+ }else{
+ htmlStr += "<td><a onclick=\"javascript:activateDG(" + methodParams + ")\">Activate</a></td>";
+ }
+ htmlStr += "<td><a onclick=\"javascript:displayDG(" + methodParams + ")\">Display</a></td>";
+
+ htmlStr += "<td><a onclick=\"javascript:displayXml(" + methodParams + ")\">XML</a></td>";
+
+ htmlStr += "<td><a onclick=\"javascript:deleteDG(" + methodParams + ")\">Delete</a></td>";
+ htmlStr += "</tr>";
+ }
+ htmlStr += "</table>";
+ htmlStr += "</div>";
+ }
+ return htmlStr;
+}
+
+function showSLA(){
+ var htmlStr = "";
+ try{
+ $.get("/listSLA")
+ .done(function( data ) {
+ var htmlStr=getHtmlStr(data);
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: "Service Logic Administration - " + data.dbHost,
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .fail(function(err) {
+ htmlStr= "<div>Error occured displaying the DG list</div>";
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: "Service Logic Administration - " + data.dbHost,
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .always(function() {
+ });
+ }catch(err){
+ }
+}
+
+function showCurrentDGs(module,rpc){
+ var htmlStr = "";
+ try{
+ var params="?module=" + module + "&rpc=" + rpc;
+ var url="/listCurrentDGs" + params;
+ //console.log("url:" + url);
+ $.get(url)
+ .done(function( data ) {
+ var htmlStr=getHtmlStr(data,true);
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title:"Service Logic Administration Module=" + module + " and RPC=" + rpc,
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .fail(function(err) {
+ htmlStr= "<div>Error occured displaying the DG list</div>";
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title:"Service Logic Administration Module=" + module + " and RPC=" + rpc,
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ })
+ .always(function() {
+ });
+ }catch(err){
+ }
+}
+
+
+function displaySLA(callback){
+ var htmlStr = "";
+ try{
+ $.get("/listSLA")
+ .done(function( data ) {
+ var htmlStr=getHtmlStr(data);
+ callback(htmlStr,data.dbHost);
+ })
+ .fail(function(err) {
+ htmlStr= "<div>Error occured displaying the DG list</div>";
+ callback(htmlStr,err.dbHost);
+ })
+ .always(function() {
+ });
+ }catch(err){
+ callback(htmlStr,"");
+ }
+}
+
+function displayCurrentDGs(module,rpc,callback){
+ var htmlStr = "";
+ try{
+ var params="?module=" + module + "&rpc=" + rpc;
+ var url="/listCurrentDGs" + params;
+ //console.log("url:" + url);
+ $.get(url )
+ .done(function( data ) {
+ var htmlStr=getHtmlStr(data,true);
+ callback(htmlStr,data.dbHost);
+ })
+ .fail(function(err) {
+ htmlStr= "<div>Error occured displaying the Current DG list</div>";
+ callback(htmlStr,err.dbHost);
+ })
+ .always(function() {
+ });
+ }catch(err){
+ callback(htmlStr,"");
+ }
+}
+
+
+window.onbeforeunload = function (event) {
+ var dis = $('#btn-deploy').attr('class')
+ if ( dis.indexOf('disabled') == -1 ) {
+ var message = 'Important: You have changes that were not \'deployed\'.';
+ if (typeof event == 'undefined') {
+ event = window.event;
+ }
+ if (event) {
+ event.returnValue = message;
+ }
+ return message;
+ }
+};
+</script>
+<script type="text/x-red" data-help-name="dgstart">
+ <p>This node starts a flow. This node is required on every flow.</p>
+ <p>This node has a button to its left, when clicked generates the XML for the flow</p>
+ <img src="images/dgstart.png"></img>
+</script>
+<style>
+.textview{
+ font-size:20px;
+}
+</style>
+
+<div id="screenInfoId"></div>
+<script type="text/javascript">
+function getAttributeValue(xmlStr,attribute){
+ var attrVal=null;
+ try{
+ var myRe = new RegExp(attribute + "[\s+]?=[\s+]?['\"]([^'\"]+)['\"]","m");
+ var myArray = myRe.exec(xmlStr);
+ if(myArray != null && myArray[1] != null){
+ attrVal=myArray[1];
+ }
+ }catch(err){
+ console.log(err);
+ }
+ return attrVal;
+
+}
+
+
+function showDgStartGenerateXmlStatus(){
+ var htmlStr="<div id='dgstart-generate-xml-div' style='width:375;height:225'><p>Generating XML. Please wait... </p><img src='images/page-loading.gif'></div>"
+ $("#dgstart-generate-xml-dialog").dialog({
+ modal:true,
+ title: "DGBuilder XML Generation Status",
+ width: 400,
+ height: 250,
+ minWidth : 400,
+ minHeight :200,
+ }).html(htmlStr);
+}
+
+ RED.nodes.registerType('dgstart',{
+ color:"#fdd0a2",
+ category: 'DGEmain',
+ defaults: {
+ name: {value:"DGSTART"},
+ outputs: {value:1}
+ },
+ inputs:0,
+ outputs:1,
+ icon: "inject.png",
+ label: function() {
+ return this.name;
+ },
+ onpaletteadd: function() {
+ //console.log("DGSTART Added to the palette.");
+ },
+ button: {
+ onclick: function() {
+ //$('#processingStatusId').text('working...');
+ //$('#processingStatusId').html("<span><p> Processing Please Wait...</span><img src='images/page-loading.gif'>");
+ $('#processingStatusId').html("<span style='font-size:0.2em;color:green'> Processing...</span>");
+ var timerObj = window.setTimeout(function() {
+ //document.getElementById("processingStatusId").innerHTML ="<img src='images/page-loading.gif'>";
+
+ /*
+ var target = $(event.target);
+ //target.text("Validating XML");
+ target.css({ "background-image": "url('images/page-loading.gif')" });
+ target.css({ "background-repeat": "no-repeat" });
+ target.css({ "background-size": "25px 25px" });
+ */
+
+ //deploy button
+ //$("#btn-deploy")
+ var loopDetectionEnabled = true;
+ console.log("loopDetectionEnabled:" +loopDetectionEnabled);
+ if(loopDetectionEnabled){
+ var msecs1= Date.now();
+ var isLoopDetected = detectLoop();
+ var msecs2= Date.now();
+ console.log("Time taken for loop detection:" + (msecs2 - msecs1));
+ if(isLoopDetected){
+ //RED.notify("<strong>Error</strong>: Loop Detected","error");
+ //target.css({ "background-image": "none" });
+ return false;
+ }
+ }
+ var nodeSetWithUpdatedDgNumbers = updateDgNumbers();
+ validateEachNodeXml();
+ //var nodeToXmlStr = getNodeToXml();
+ var unformatted_xml_str = getNodeToXml();
+ //console.log("Size of unformatted_xml_str" + unformatted_xml_str.length);
+ //console.log("output:" + nodeToXmlStr);
+ var formatted_xml = vkbeautify.xml(unformatted_xml_str);
+ /*
+ var minified_xml = vkbeautify.xmlmin(unformatted_xml_str,true);
+ var lengthOfMinifiedXml = minified_xml.length;
+ if(lengthOfMinifiedXml >0){
+ var val = lengthOfMinifiedXml/(1024*1024)
+ var minSizeStr = val.toFixed(4) + " MB";
+ console.log("minified XML size:" + minSizeStr);
+ }
+ */
+ var lengthOfXml = formatted_xml.length;
+ var sizeStr = "";
+ if(lengthOfXml >0){
+ var val = lengthOfXml/(1024*1024)
+ sizeStr = val.toFixed(4) + " MB";
+ console.log("length:" + val);
+ }
+ var xmlLines = formatted_xml.split("\n");
+ console.log("Number of lines " + xmlLines.length);
+ var numberOfLines = xmlLines.length;
+ //var display_formatted_xml = formatted_xml.replace("<","<");
+ var currentNodeSet = getCurrentFlowNodeSet();
+ //get max x and y coordinates
+ var x=0;
+ var y=0;
+ var maxX=0;
+ var maxY=0;
+ var moduleName = "";
+ var dgVersion = "";
+ var methodName = "";
+ var formattedMethodName = "";
+ var origModuleName = "";
+ var origMethodName = "";
+ for(var i=0;currentNodeSet != null && i<currentNodeSet.length;i++){
+ if(currentNodeSet[i].type == "service-logic"){
+ //moduleName = currentNodeSet[i].name;
+ moduleName = currentNodeSet[i].module;
+ dgVersion = currentNodeSet[i].version;
+ origModuleName = getAttributeValue(currentNodeSet[i].xml,"module");
+ }
+ if(currentNodeSet[i].type == "method"){
+ //methodName = currentNodeSet[i].name;
+ origMethodName = getAttributeValue(currentNodeSet[i].xml,"rpc");;
+ methodName = origMethodName;
+ if(methodName == ""){
+ methodName = "rpc_not_set";
+ }
+ }
+ x = currentNodeSet[i].x;
+ y = currentNodeSet[i].y;
+ if(x>maxX){
+ maxX=x;
+ }
+ if(y>maxY){
+ maxY=y;
+ }
+ }
+ //add 5 more pixels to that
+ maxX= Math.ceil(maxX) + 5;
+ maxY= Math.ceil(maxY) + 5;
+ //console.log("maxX:" + maxX);
+ //console.log("maxY:" + maxY);
+ var unformatted_json_str=JSON.stringify(currentNodeSet);
+ var formatted_json = vkbeautify.json(unformatted_json_str);
+ //var displayHtmlStr="<div><textarea readonly='1' style='width:1100px;height:700px;border:none'>" + formatted_xml + "</textarea></div>";
+ var displayHtmlStr="<div style='font-size:20px;'><xmp>" + formatted_xml + "</xmp></div>";
+ var xmlInfoStr = "<div id='xml-info-div'><p>" + "XML size:" + sizeStr + " <br>Number of Lines:" + numberOfLines + "</p></div>";
+ var htmlCode ="";
+ $( "#xmldialog" ).dialog({
+ title: "XML Generated",
+ width: 1200,
+ height: 750,
+ minWidth : 800,
+ minHeight :450,
+ dialogClass : "no-close",
+ closeOnEscape : false,
+ autoOpen : false,
+ resize: function( event, ui ) {
+ /*
+ $( this ).dialog( "option", "title",
+ ui.size.height + " x " + ui.size.width );
+ */
+ },
+ modal: true,
+ /*show: {
+ effect: "slide",
+ duration: 1000
+ },
+ */
+ /*hide: {
+ effect: "slide",
+ duration: 500
+ },
+ */
+ buttons: {
+ /*
+ "+" : function () {
+ var size= $("#xmldialog").find('.textview').css("font-size");
+ console.log("size:" + size);
+ size=size.replace("px","");
+ var fsize=Number(size) +1;
+ if(fsize<19){
+ fsize+=4;
+ }
+ if(fsize >= 26){
+ return;
+ }
+ $("#xmldialog").find('.textview').css("font-size",fsize);
+ },
+ "-" : function () {
+ var size= $("#xmldialog").find('.textview').css("font-size");
+ console.log("size:" + size);
+ size=size.replace(/px/,"");
+ var fsize=Number(size) -1;
+ if(fsize <= 14){
+ return;
+ }
+ $("#xmldialog").find('.textview').css("font-size",fsize);
+ },
+ */
+ "Validate XML" : function (event) {
+ if(!event) event = window.event;
+ var target = $(event.target);
+ target.text("Validating XML");
+ target.css({ "background-image": "url('images/page-loading.gif')" });
+ target.css({ "background-repeat": "no-repeat" });
+ target.css({ "background-size": "25px 25px" });
+
+ var resp= validateFinalXML(unformatted_xml_str);
+ console.log("errorList:" + errList);
+ if(!resp){
+ showErrors();
+ }
+ target.text("Validate XML");
+ target.css({ "background-image": "none" });
+ },
+ "Email Flow" : function (event) {
+ if(!event) event = window.event;
+ var target = $(event.target);
+ target.text("Processing");
+ target.css({ "background-image": "url('images/page-loading.gif')" });
+ target.css({ "background-repeat": "no-repeat" });
+ target.css({ "background-size": "25px 25px" });
+ d3.xhr("style.css").get(function(err,resp){
+ console.log("resp:" + resp);
+ //console.dir(resp);
+ var styleSheetText = resp.responseText;
+ /*var htmlCode = "<style>" + styleSheetText + "</style></head>" +
+ '<body><div id="chart" class="ui-droppable">' +
+ */
+ //var svgTagInfo = '<div style="overflow:auto;border:1px solid #D76D2D;height:600px;"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1024 768" preserveAspectRatio="xMidYMid meet">';
+ //var svgTagInfo = '<div style="overflow-x:auto;overflow-y:auto;border:1px solid #D76D2D;width:1200px;height:750px;"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="3500px" height="3200px" viewBox="0 0 5500 5000" >';
+ var svgTagInfo = '<div style="overflow-x:auto;overflow-y:auto;border:1px solid #D76D2D;width:1200px;height:750px;"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="3500px" height="3200px" viewBox="0 0 8000 7500" >';
+ var svgHtmlCode = $("svg").html();
+ //svgHtmlCode = svgHtmlCode.replace('<rect width="5000" height="5000"','<rect width="' + maxX + '" height="' + maxY +'"');
+ var find = 'href="icons/arrow-in.png"';
+ var re = new RegExp(find, 'g');
+ svgHtmlCode = svgHtmlCode.replace(re, 'href=""');
+ find = 'href="icons/inject.png"';
+ re = new RegExp(find, 'g');
+ svgHtmlCode = svgHtmlCode.replace(re, 'href=""');
+ htmlCode = "\n<style>\n" + styleSheetText + "</style></head>\n<body>" + svgTagInfo + svgHtmlCode + "\n</svg></div>";
+ //console.log($("svg").html());
+ //console.log(htmlCode);
+ //html,xml,json form id
+ /*
+ //using form to submit
+ var form = $('<form id="hxjFormId" method="POST" action="/sendEmail"></form>');
+ form.append('<input id="flowHtmlId" type="hidden" name="flowHtml" value=""/>');
+ form.append('<input id="flowXmlId" type="hidden" name="flowXml" value=""/>');
+ form.append('<input id="flowJsonId" type="hidden" name="flowJson" value=""/>');
+ $("#screenInfoId").append(form);
+ //console.log($("#screenInfoId").html());
+ document.getElementById("flowHtmlId").value=htmlCode;
+ document.getElementById("flowXmlId").value=formatted_xml;
+ document.getElementById("flowJsonId").value=formatted_json;
+ //console.log($("#screenInfoId").html());
+ $("#hxjFormId").submit();
+ console.log("Submitted.");
+ */
+ var reqData = {
+ "flowHtml" : htmlCode,
+ "flowXml" : formatted_xml,
+ "flowJson" : formatted_json
+ };
+
+ $.post( "/sendEmail",reqData )
+ .done(function( data ) {
+ //console.log( "Data Loaded: " + data );
+ if(data != null && data.envelope != undefined && data.envelope != null){
+ var toAddress = data.envelope.to;
+ RED.notify("Email sent successfully to " + toAddress);
+ }else{
+ RED.notify("Email sent successfully.");
+ }
+ })
+ .fail(function(err) {
+ console.log( "error" + err );
+ RED.notify("Email send Failed.");
+ })
+ .always(function() {
+ console.log( "finished" );
+ target.text("Email Flow");
+ target.css({ "background-image": "none" });
+ });
+
+ /*
+ d3.xhr("/sendEmail").post(reqData,function(err,resp){
+ console.log("Error:" + JSON.stringify(err));
+ console.log("resp:" + JSON.stringify(resp));
+ console.dir(resp);
+ });
+ */
+ });
+ },
+ /*
+ Deploy : function () {
+ $("#btn-deploy").click();
+ },
+ */
+ "Upload XML" : function (event) {
+ if(!event) event = window.event;
+ //Save the flows.json
+ //RED.view.dirty(true);
+ //$('#btn-deploy').click();
+ console.log("Deployed..");
+ var target = $(event.target);
+ target.text("Processing");
+ target.css({ "background-image": "url('images/page-loading.gif')" });
+ target.css({ "background-repeat": "no-repeat" });
+ target.css({ "background-size": "25px 25px" });
+ var date = new Date();
+
+ var fileName = date.getTime() + ".xml";
+ var reqData = {
+ "flowXml" : unformatted_xml_str,
+ "module" : origModuleName,
+ "rpc" : origMethodName
+ };
+ $.post("/uploadxml", reqData )
+ .done(function( data ) {
+ console.log("calling uploadxml. sending to server");
+ //var successHtmlStr = "<object width='600' height='450' type='text/html' data='" + data.url + "' />";
+
+ if( data != undefined && data != null && (data.stdout.indexOf('Saving SvcLogicGraph to database') != -1 || data.stderr.indexOf('Saving SvcLogicGraph to database') != -1)){
+ //RED.notify("<strong>Uploaded Successfully</strong>");
+ //console.dir(data);
+ var _moduleName = data.module;
+ var _rpc = data.rpc;
+ var msg = "";
+ var actualMsg = "";
+ var msg_lines = "";
+ msg_lines += data.stderr;
+ msg_lines += data.stdout;
+
+ msgHtmlStr="<div><p><b>Uploaded the XML.<br>Additional Details<br><textarea style='width:90%;height:100%' readonly='1' rows='10' cols='90' >" + msg_lines + "</textarea></div>";
+ $("#upload-xml-status-dialog").dialog({
+ modal:true,
+ title: "Upload XML ",
+ width: 900,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ buttons: [
+ {
+ text: "ViewDGList",
+ class:"alertDialogButton",
+ click: function() {
+ $(this).dialog("close");
+ displayCurrentDGs(_moduleName,_rpc,function(htmlStr,dbHost){
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title:"Service Logic Administration Module=" + _moduleName + " and RPC=" + _rpc,
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ });
+ }
+ },
+ {
+ text: "Close",
+ class:"alertDialogButton",
+ click: function() {
+ $(this).dialog("close");
+ }
+ }
+ ]
+ }).html(msgHtmlStr);
+ }else{
+ console.log("Could not upload.");
+ var emsg =JSON.parse( data.responseText);
+ var msg = "";
+ var actualMsg = "";
+ var msg_lines = "";
+ if( emsg.stderr != "COMPILE_ERROR"){
+ msg = JSON.stringify(emsg.stderr);
+ actualMsg = msg;
+ msg = msg.replace('\\t',"");
+ msg1 = msg.split('\\n');
+ for(var k=0;k<=msg1.length && k<=10;k++){
+ /*
+ if(k == 0){
+ //msg_lines += "<span style='color:blue'>" + msg1[k] + "</span><br>";
+ //msg_lines += msg1[k] +"\n";
+ }else{
+ if(msg1[k].indexOf("Caused by:") != -1){
+ //msg_lines += "<span style='color:red'> " + msg1[k] + "</span><br>";
+ msg_lines += msg1[k] ;
+ break;
+ }
+ }
+ */
+ if(msg1[k] != null && msg1[k].indexOf("Caused by:") != -1){
+ msg_lines += msg1[k] ;
+ if((k+1)<=msg1.length){
+ msg_lines += "\n" + msg1[k+1] ;
+ }
+ if((k+2)<=msg1.length){
+ msg_lines += "\n" + msg1[k+2] ;
+ }
+ break;
+ }
+ }
+ }
+ htmlStr="<div><p><b>Could not upload the XML. Status:" + data.status + " Message:" + data.statusText + "</b><br></p><br>Additional Details<br><textarea style='width:90%;height:100%' readonly='1' rows='10' cols='90' >" + msg_lines + "</textarea></div>";
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: "Upload XML ",
+ width: 900,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ }
+ })
+ .fail(function(err) {
+ //console.log( "error" + JSON.stringify(err) );
+ //console.log( JSON.stringify(err.responseText));
+ var emsg =JSON.parse( err.responseText);
+ //console.log( emsg.stderr);
+ var msg = "";
+ var actualMsg = "";
+ var msg_lines = "";
+ if( emsg != null && emsg.stderr != 'COMPILE_ERROR'){
+ msg = JSON.stringify(emsg.stderr);
+ actualMsg = msg;
+ //msg = msg.replace("Caused by:","<span style='color:red'>Caused by:</span>");
+ msg = msg.replace(/\\t/g,"");
+ msg1 = msg.split('\\n');
+ for(var k=0;k<=msg1.length && k<=msg1.length;k++){
+ /*
+ if(k == 0){
+ //msg_lines += "<span style='color:blue'>" + msg1[k] + "</span><br>";
+ //msg_lines += msg1[k] + "\n" ;
+ }else{
+ if(msg1[k].indexOf("Caused by:") != -1){
+ //msg_lines += "<span style='color:red'> " + msg1[k] + "</span><br>";
+ msg_lines += msg1[k] ;
+ break;
+ }
+ }
+ */
+ if(msg1[k] != null && msg1[k].indexOf("Caused by:") != -1){
+ msg_lines += msg1[k] ;
+ if((k+1)<=msg1.length){
+ msg_lines += "\n" + msg1[k+1] ;
+ }
+ if((k+2)<=msg1.length){
+ msg_lines += "\n" + msg1[k+2] ;
+ }
+ break;
+ }
+ }
+ }else{
+ msg = JSON.stringify(emsg.stdout);
+ actualMsg = msg;
+ msg = msg.replace('\\t',"");
+ msg1 = msg.split('\\n');
+ msg_lines=msg1;
+ }
+ var htmlStr="<div><p><b>Could not upload the XML. Status:" + err.status + " Message:" + err.statusText + "</b><br></p><br><b>Additional Details</b><br><textarea style='width:90%;height:100%' readonly='1' rows='15' cols='90'>" + msg_lines + "</textarea></div>";
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: "Upload XML ",
+ width: 900,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ //RED.notify("<strong>ERROR:</strong>:" + err,"error");
+ })
+ .always(function() {
+ console.log( "finished" );
+ target.text("Upload XML");
+ target.css({ "background-image": "none" });
+ });
+ /*
+ d3.xhr("/uploadxml?fileName=" + fileName).post(function(err,resp) {
+ if ( resp != null && resp.status == 200) {
+ RED.notify("<strong>Uploaded Successfully</strong>");
+ }else{
+ RED.notify("<strong>ERROR:</strong>:" + err,"error");
+ console.log(err);
+ //console.dir(resp);
+ }
+ });
+ */
+ },
+ "View DG List": function () {
+
+ displayCurrentDGs(origModuleName,origMethodName,function(htmlStr,dbHost){
+ //console.log("htmlStr:" + htmlStr);
+ $("#svclogicPageDiv").dialog({
+ modal:true,
+ title: "Service Logic Administration for Module=" + origModuleName + " and RPC=" + origMethodName,
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+ });
+ },
+ "Download XML": function () {
+ $(document).ready(function(){
+ errList=[];
+ if(moduleName != undefined && moduleName != null && moduleName != ""){
+ moduleName=moduleName.replace(/\s/g, "_");
+ }else{
+ errList.push("Module name is required in the service-logic node.");
+ }
+
+ if(dgVersion == undefined || dgVersion == null || dgVersion == ""){
+ errList.push("Module version is required in the service-logic node.");
+ }
+
+ if(methodName != undefined && methodName != null && methodName != ""){
+ methodName=methodName.replace(/\s/g, "_");
+ //formattedMethodName=methodName + "_" + dgVersion;
+ formattedMethodName=methodName ;
+ }else{
+ errList.push("rpc name is required in the method node.");
+ }
+ console.log("Download Xml moduleName:" + moduleName);
+ console.log("Download Xml methodName:" + formattedMethodName);
+
+ if(errList != null && errList.length > 0 ){
+ showErrors();
+ return;
+ }
+
+ $("#dwnldXmlFormId").empty().remove();
+ //using form to submit
+ var form = $('<form id="dwnldXmlFormId" method="POST" action="/downloadXml"></form>');
+ form.append('<input id="flowXmlId" type="hidden" name="flowXml"/>');
+ form.append('<input type="hidden" name="moduleName" value="' + moduleName + '"/>');
+ form.append('<input type="hidden" name="methodName" value="' + formattedMethodName + '"/>');
+ form.appendTo('body');
+ //$("#flowXmlId").val(formatted_xml);
+ $("#flowXmlId").val(unformatted_xml_str);
+ $("#dwnldXmlFormId").submit();
+ //console.log("Form submitted.");
+ });
+ },
+ "Download JSON": function () {
+ $(document).ready(function(){
+ errList=[];
+ if(moduleName != undefined && moduleName != null && moduleName != ""){
+ moduleName=moduleName.replace(/\s/g, "_");
+ }else{
+ errList.push("Module name is required in the service-logic node.");
+ }
+
+ if(dgVersion == undefined || dgVersion == null || dgVersion == ""){
+ errList.push("Module version is required in the service-logic node.");
+ }
+
+ if(methodName != undefined && methodName != null && methodName != ""){
+ methodName=methodName.replace(/\s/g, "_");
+ //formattedMethodName=methodName + "_" + dgVersion;
+ formattedMethodName=methodName ;
+ }else{
+ errList.push("rpc name is required in the method node.");
+ }
+ console.log("Download Xml moduleName:" + moduleName);
+ console.log("Download Xml methodName:" + formattedMethodName);
+
+ if(errList != null && errList.length > 0 ){
+ showErrors();
+ return;
+ }
+ //console.log("formatted_json:" + formatted_json);
+ $("#dwnldJsonFormId").empty().remove();
+ //using form to submit
+ var form = $('<form id="dwnldJsonFormId" method="POST" action="/downloadJson"></form>');
+ form.append('<input id="flowJsonId" type="hidden" name="flowJson" value=""/>');
+ form.append('<input type="hidden" name="moduleName" value="' + moduleName + '"/>');
+ form.append('<input type="hidden" name="methodName" value="' + formattedMethodName + '"/>');
+ form.appendTo('body');
+ //$("#flowJsonId").val(formatted_json);
+ $("#flowJsonId").val(unformatted_json_str);
+ $("#dwnldJsonFormId").submit();
+ //console.log("Form submitted.");
+ });
+ },
+ Close: function () {
+ /*
+ console.log("clearing the variables.");
+ htmlCode ="";
+ formatted_json ="";
+ formatted_xml ="";
+ xmlLines =[];
+ unformatted_xml_str="";
+ unformatted_json_str="";
+ */
+ $('.ui-dialog:has(#xmldialog)').empty().remove();
+ RED.view.redraw();
+
+ //console.log($("#xmldialog").attr('id'));
+ //$('.ui-dialog:has(# + $("#xmldialog").attr('id') + ')').empty().remove();
+ //$("#xmldialog").hide();
+ //$("#xmldialog").dialog("destroy").remove();
+ }
+ },
+ open:function (){
+ $(function(){
+ $("#xmldialog").dialog("widget").find(".ui-dialog-buttonpane").append(xmlInfoStr);
+ console.log("opened.");
+ });
+ }
+ }).html(displayHtmlStr).dialog("open");
+
+ //}).html(displayHtmlStr).dialog("widget").find(".ui-dialog-buttonpane").append(xmlInfoStr);
+
+ //display size and number of lines in XML
+ //$("#xmldialog").dialog("widget").find(".ui-dialog-buttonpane").append(xmlInfoStr);
+
+ //$("#processingStatusId").html("");
+ //This logic is commented as formatting and displaying orion is taking time
+ //START
+ /*
+ var msecs1= Date.now();
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('xmldialog'),
+ lang:"html",
+ readonly:true,
+ //showLinesRuler: false,
+ contents: formatted_xml
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ });
+ var msecs2= Date.now();
+ //console.log("Time taken for displaying XML:" + (msecs2 - msecs1));
+ */
+ //END
+ //var success = customValidation(currentNodeSet);
+ var success = customValidation(nodeSetWithUpdatedDgNumbers);
+ if(!success){
+ showFlowDesignErrorBox();
+ }
+ $('#processingStatusId').html("");
+ }, 0);
+ }
+ }
+
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgemain/dgstart.js b/dgbuilder/nodes/dge/dgemain/dgstart.js
new file mode 100644
index 0000000..f2b4815
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgemain/dgstart.js
@@ -0,0 +1,594 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+ //var dgxml=require("/home/users/schinthakayala/nodered/sheshi/dgxml/dgxml2");
+ var _=require('lodash');
+ var fs=require('fs');
+ var path = require('path');
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + RED.settings.userDir;
+ var dbHost = RED.settings.dbHost;
+ var request = require('request');
+ var sharedDir = appDir + "/" + RED.settings.sharedDir;
+ var xmlDir = appDir + "/" + RED.settings.xmlPath;
+
+ //console.log("appDir:" + appDir);
+ //var dgeraw=fs.readFileSync(appDir + "/dge.json").toString();
+ //var dgejson=JSON.parse(dgeraw);
+ //var uploadUrl=dgejson.slaHost + dgejson.uploadUrl;
+ //var slaUrl=dgejson.slaHost + dgejson.slaUrl;
+ //var uploadUrl=RED.settings.slaHost + RED.settings.uploadUrl;
+ //var slaUrl=RED.settings.slaHost + RED.settings.slaUrl;
+ var uploadUrl="";
+ var slaUrl="";
+ //console.log("Upload url: " + uploadUrl);
+
+ function dgstart(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.topic = n.topic;
+ }
+
+ function writeHtmlToFile(fileName,str){
+ var localfile = appDir + "/" + RED.settings.htmlPath + fileName;
+ try{
+ fs.writeFileSync(localfile,str);
+ }catch(e){
+ console.log("Error:" + e);
+ }
+ }
+
+ function writeXmlToFile(fileName,str){
+ var localfile = appDir + "/" + RED.settings.xmlPath + fileName;
+ try{
+ fs.writeFileSync(localfile,str);
+ }catch(e){
+ console.log("Error:" + e);
+ }
+ }
+
+ function sendXml(fileName,res) {
+ var needle, localfile, data;
+ needle = require('needle')
+ localfile = appDir + "/" + RED.settings.xmlPath + fileName;
+ console.log("localfile:" + localfile);
+ data={
+ uploadedfile: { file: localfile, content_type: 'text/xml' }
+ }
+ needle.post(uploadUrl, data, { multipart: true }, function(err, resp, body) {
+ //console.log(body)
+ if(resp != undefined && resp != null){
+ console.log("resp Code for sendXml:" + resp.statusCode);
+ }
+ fs.unlink(localfile, function (error) {
+ if (error) {
+ console.log("Error deleting file "+localfile);
+ }else{
+ //console.log("deleted file:" + localfile);
+ }
+ });
+
+ if(err){
+ console.log("Error posting to slaUrl:" + slaUrl);
+ console.log("Error:" +err);
+ res.json({"error":err});
+ }else{
+ //console.dir(resp);
+ //console.log("slaUrl:" + slaUrl);
+ res.json({"url":slaUrl});
+ }
+
+ });
+ }
+
+ function oldsendXml(fileName) {
+ console.log("In sendXML for file: " + fileName);
+ var fileStream, formdata, localfile;
+ localfile = appDir + "/" + RED.settings.xmlPath + fileName;
+
+ formdata = {
+ MAX_FILE_SIZE: "100000",
+ uploadedfile: {
+ options: {
+ contentType: 'audio/mpeg'
+ }
+ }
+
+ };
+
+ console.log("Attempting to upload file: " + localfile);
+ console.log("Sending to: " + uploadUrl);
+ formdata.uploadedfile.value = fs.createReadStream(localfile);
+ fileStream = formdata.uploadedfile.value;
+
+//console.log("Formdata:");
+//console.dir(formdata);
+
+ request.post({
+ url: uploadUrl,
+ proxy: false,
+ formData: formdata
+ }, function(err, resp, body) {
+ fileStream.close();
+ console.log("err: " + err);
+ return console.log("body: " + body);
+ });
+
+ };
+
+ RED.nodes.registerType("dgstart",dgstart);
+/*
+ RED.httpAdmin.post("/uploadxml", function(req,res) {
+ console.dir(req);
+ console.log("USER:" + req.user);
+ console.log("Got request to upload xml to SDN-C.");
+ console.log("Requested filename to upload: " + req.params.fileName);
+ console.log("Requested xml to upload: " + req.params.xmlStr);
+ writeToFile( req.params.fileName,req.params.xmlStr);
+
+ sendXml(req.params.fileName,res);
+ // res.send("Attempt complete.");
+ // res.redirect(slaUrl);
+ });
+*/
+
+ RED.httpAdmin.post("/OldUploadxml", function(req,res) {
+ //console.dir(req);
+ //console.log("USER:" + req.user);
+ var qs = require('querystring');
+ var body = '';
+ req.on('data', function (data) {
+ body += data;
+ // Too much POST data, kill the connection!
+ /*if (body.length > 1e6)
+ request.connection.destroy();
+ */
+ });
+ req.on('end', function () {
+ //console.log("BODY:" + body);
+ var d = new Date().getTime();
+ var user = req.user;
+ var fileName= user + "_" + d +".xml";
+ var post = qs.parse(body);
+ //console.log(JSON.stringify(post));
+ // use post['blah'], etc.
+ var localfile = appDir + "/" + RED.settings.xmlPath + fileName;
+ //console.log("localfile:" + localfile);
+ var xmlStr = post['flowXml'];
+ writeXmlToFile(fileName,xmlStr);
+ sendXml(fileName,res);
+
+ });
+
+ });
+
+ RED.httpAdmin.post("/uploadxml", function(req,res) {
+ //console.dir(req);
+ //console.log("USER:" + req.user);
+ var qs = require('querystring');
+ var body = '';
+ req.on('data', function (data) {
+ body += data;
+ // Too much POST data, kill the connection!
+ /*if (body.length > 1e6)
+ request.connection.destroy();
+ */
+ });
+ req.on('end', function () {
+ //console.log("BODY:" + body);
+ var d = new Date().getTime();
+ var user = req.user;
+ var fileName= user + "_" + d +".xml";
+ var post = qs.parse(body);
+ //console.log(JSON.stringify(post));
+ // use post['blah'], etc.
+ var localfile = appDir + "/" + RED.settings.xmlPath + fileName;
+ //console.log("localfile:" + localfile);
+ var xmlStr = post['flowXml'];
+ var moduleName = post['module'];
+ var rpc = post['rpc'];
+ writeXmlToFile(fileName,xmlStr);
+ uploadDG(localfile,moduleName,rpc,res);
+ });
+
+ });
+
+
+function uploadDG(filePath,moduleName,rpc,res){
+ console.log("called uploadDG...");
+ var exec = require('child_process').exec;
+ var commandToExec = appDir + "/svclogic/svclogic.sh load " + filePath + " " + userDir + "/conf/svclogic.properties";
+ console.log("commandToExec:" + commandToExec);
+ var child = exec(commandToExec ,function (error,stdout,stderr){
+ //console.log(error);
+ console.log("stdout:" + stdout);
+ console.log("stderr:" + stderr);
+ if(error){
+ console.log("Error occured:" + error);
+ if(stderr){
+ //console.log("stderr:" + stderr);
+ res.send(500,{'error':error,'stderr':stderr});
+ }else{
+ res.send(500,{'error':error});
+ }
+ //console.log("stdout :" + stdout);
+ }else{
+ if(stdout ){
+ //console.log("output:" + stdout);
+ if(stdout.indexOf('Compiler error') != -1){
+ //console.log("compileError occured.");
+
+ var resp = {
+ 'stdout':stdout,
+ 'stderr':"COMPILE_ERROR",
+ 'url':dbHost,
+ 'module':moduleName,
+ 'rpc':rpc
+ }
+ res.send(500,resp);
+ }else{
+ res.send(200,{'stdout':stdout,'stderr':stderr,"url":dbHost,"module" : moduleName,"rpc" : rpc});
+ }
+ }
+ if(stderr && !stdout){
+ //console.log("stderr:" + stderr);
+ if(stderr.indexOf("Saving SvcLogicGraph to database") != -1){
+ res.send(200,{'error':error,'stdout' :'','stderr':stderr,"url":dbHost,"module" : moduleName,"rpc" : rpc});
+ }else{
+ res.send(500,{'error':error,'stdout' :'','stderr':stderr});
+ }
+ }
+ }
+ });
+}
+
+ RED.httpAdmin.get("/displayXml", function(req,res) {
+ var _module = req.query._module;
+ var rpc = req.query.rpc;
+ var version = req.query.version;
+ var mode = req.query.mode;
+ var d = new Date().getTime();
+ displayXml(_module,rpc,version,mode,res);
+ });
+
+function displayXml(_module,rpc,version,mode,res){
+ var exec = require('child_process').exec;
+ var msg = {
+ '_module' : _module,
+ 'rpc' : rpc,
+ 'version' : version,
+ 'mode' : mode
+ }
+ var commandToExec = appDir + "/svclogic/svclogic.sh get-source " + _module + " "
+ + rpc + " " + mode + " " + version + " " + userDir + "/conf/svclogic.properties";
+ console.log("commandToExec:" + commandToExec);
+ var child = exec(commandToExec ,{'maxBuffer':16*1024*1024},function (error,stdout,stderr){
+ if(error){
+ console.log("Error occured:" + error);
+ if(stderr){
+ //console.log("stderr:" + stderr);
+ res.send(500,{'error':error,'stderr':stderr,'msg':msg});
+ }else{
+ res.send(500,{'error':error,'msg':msg});
+ }
+ }else{
+ if(stderr){
+ console.log("stderr:" + stderr);
+ }
+ if(stdout){
+ res.send({'xmldata' : "<xmp>" + stdout + "</xmp>"});
+ }
+ }
+ });
+}
+
+
+ RED.httpAdmin.post("/downloadDGXml", function(req,res) {
+ //console.dir(req);
+ var qs = require('querystring');
+ var body = '';
+ req.on('data', function (data) {
+ body += data;
+ });
+
+ req.on('end', function () {
+ var post = qs.parse(body);
+ var _module = post._module;
+ var rpc = post.rpc;
+ var version = post.version;
+ var mode = post.mode;
+ var d = new Date().getTime();
+ downloadDGXml(_module,rpc,version,mode,res);
+ });
+ });
+
+function downloadDGXml(_module,rpc,version,mode,res){
+ var exec = require('child_process').exec;
+ var msg = {
+ '_module' : _module,
+ 'rpc' : rpc,
+ 'version' : version,
+ 'mode' : mode
+ }
+ var commandToExec = appDir + "/svclogic/svclogic.sh get-source " + _module + " "
+ + rpc + " " + mode + " " + version + " " + userDir + "/conf/svclogic.properties";
+ console.log("commandToExec:" + commandToExec);
+ var child = exec(commandToExec ,function (error,stdout,stderr){
+ if(error){
+ console.log("Error occured:" + error);
+ if(stderr){
+ //console.log("stderr:" + stderr);
+ res.send(500,{'error':error,'stderr':stderr,'msg':msg});
+ }else{
+ res.send(500,{'error':error,'msg':msg});
+ }
+ }else{
+ if(stderr){
+ console.log("stderr:" + stderr);
+ }
+ if(stdout){
+ //console.log("output:" + stdout);
+ //var newOutput = "<pre>" + stdout.replace(/\n/g,'<br>') + "</pre>";
+ //res.json({'stdout': stdout ,'stderr':stderr,"msg":msg});
+ //res.set('Content-Type', 'text/xml');
+ //res.set('Content-Type', 'application/octet-stream');
+ //res.end("<code>" + stdout + "</code>" );
+ //var newOutput ="<html><body>" + stdout + "</body></html>";
+ //res.send(new Buffer( "<code>" + newOutput + "</code>" ) );
+ //res.send(newOutput);
+
+ /*
+ var xslStr = '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">' +
+ '<xsl:output omit-xml-declaration="yes" indent="yes"/>' +
+ '<xsl:template match="node()|@*">' +
+ '<xsl:copy>' +
+ '<xsl:apply-templates select="node()|@*"/>' +
+ '</xsl:copy>' +
+ '</xsl:template>' +
+ '</xsl:stylesheet>';
+ */
+
+ var formatted_date = getCurrentDate();
+ var fileName= "db_" + _module + "_" +rpc+ "_" + version + "_" + formatted_date + ".html";
+ var file = xmlDir + "/" + fileName;
+ var xmlStr = '<xmp>' + stdout + "</xmp>";
+ //var xmlStr = "<![CDATA[" + stdout + "]]";
+ //var xmlStr = stdout.replace(/</g,"<");
+ //xmlStr = xmlStr.replace(/>/g,">");
+ //xmlStr = xmlStr.replace(/\n>/g,"<br>");
+ //xmlStr = xmlStr.replace(/\t>/g," ");
+
+ writeToFile(file,"<html><body>" +xmlStr+ "</body></html>");
+ //console.log("xmlStr:" + xmlStr);
+ res.setHeader('Content-disposition', 'attachment; filename=' + file);
+ //res.setHeader('Content-type', 'text/html');
+ res.setHeader('Content-type', 'text/xml');
+ res.download(file);
+ }
+ }
+ });
+}
+
+
+ RED.httpAdmin.get("/displayAsGv", function(req,res) {
+ var _module = req.query._module;
+ var rpc = req.query.rpc;
+ var version = req.query.version;
+ var mode = req.query.mode;
+ var d = new Date().getTime();
+ displayAsGv(_module,rpc,version,mode,res);
+ });
+
+function displayAsGv(_module,rpc,version,mode,res){
+ var exec = require('child_process').exec;
+ var msg = {
+ '_module' : _module,
+ 'rpc' : rpc,
+ 'version' : version,
+ 'mode' : mode
+ }
+ var commandToExec = appDir + "/svclogic/svclogic.sh print " +
+ _module + " " + rpc + " " + mode + " " + version + " "
+ //+ userDir + "/conf/svclogic.properties | dot -Tpng ";
+ //the label="""" is giving an error so replacing it with "null"
+ + userDir + "/conf/svclogic.properties |sed -e 's%label=\"\"\"\"%label=\"null\"%g'| dot -Tsvg ";
+ console.log("commandToExec:" + commandToExec);
+ //+ userDir + "/conf/svclogic.properties | dot -Tsvg ";
+ //var child = exec(commandToExec ,function (error,stdout,stderr){
+ //var child = exec(commandToExec ,{maxBuffer:16*1024*1024},function (error,stdout,stderr){
+ //var child = exec(commandToExec ,{encoding:'base64',maxBuffer:20*1024*1024},function (error,stdout,stderr){
+ var child = exec(commandToExec ,{maxBuffer:20*1024*1024},function (error,stdout,stderr){
+ if(error){
+ console.log("Error occured:" + error);
+ if(stderr){
+ console.log("stderr:" + stderr);
+ res.send(500,{'error':error,'stderr':stderr,"msg":msg});
+ }else{
+ res.send(500,{'error':error,"msg":msg});
+ }
+ }else{
+ if(stderr){
+ console.log("stderr:" + stderr);
+ //To convert base64 to ascii
+ //console.log(new Buffer(stderr, 'base64').toString('ascii'));
+ }
+ if(stdout){
+ //console.log(stdout.length);
+ //console.log("output:" + stdout);
+ //var svg_html = stdout ;
+ //var image = "<img src='data:image/png;base64," + stdout + "'>";
+ //var image = "<iframe width='1200' height='750' src='data:image/png;base64," + stdout + "'></frame>";
+ //var image = "<iframe width='1200' height='750' src='data:image/svg+xml;base64," + stdout + "'></frame>";
+ //var image = "<iframe width='1200' height='750' src='data:image/gif;base64," + stdout + "'></frame>";
+ var image = "<iframe width='1200' height='750' src='data:image/svg+xml;UTF-8," + stdout + "'></frame>";
+ //console.log(image);
+ res.send({'svg_html':image});
+ }
+ }
+ });
+}
+
+ RED.httpAdmin.post("/shareFlow", function(req,res) {
+ //console.dir(req);
+ //console.log("USER:" + req.user);
+ var qs = require('querystring');
+ var body = '';
+ req.on('data', function (data) {
+ body += data;
+ // Too much POST data, kill the connection!
+ /*if (body.length > 1e6)
+ request.connection.destroy();
+ */
+ });
+ req.on('end', function () {
+ var post = qs.parse(body);
+
+ var nodeSet = JSON.parse(post['flowData']);
+ var activeWorkspace=post['activeWorkspace'];
+ var methodName = "";
+ var moduleName = "";
+ for(var i=0;nodeSet != null && i<nodeSet.length;i++){
+ var node = nodeSet[i];
+ if(node.type == 'module' ){
+ moduleName= node.name;
+ moduleName=moduleName.replace(/ /g,"-");
+ }
+ if(node.type == 'method' ){
+ methodName= node.name;
+ methodName=methodName.replace(/ /g,"-");
+ }
+ }
+ //console.log("BODY:" + body);
+ var d = new Date().getTime();
+ var user = req.user;
+ var fileName= moduleName + "_" +methodName+".json";
+ var localfile = sharedDir + "/" + fileName;
+ //console.log("localfile:" + localfile);
+
+ writeToFile(localfile,JSON.stringify(nodeSet));
+ res.send({"fileName": fileName});
+ });
+
+ });
+
+
+ RED.httpAdmin.post("/sendEmail", function(req,res) {
+ //console.dir(req);
+ console.log("USER:" + req.user);
+ var fromAddr = RED.settings.emailAddress;
+ var toAddr = RED.settings.emailAddress;
+ var qs = require('querystring');
+ var body = '';
+ req.on('data', function (data) {
+ body += data;
+ // Too much POST data, kill the connection!
+ /*if (body.length > 1e6)
+ request.connection.destroy();
+ */
+ });
+ req.on('end', function () {
+ //console.log("BODY:" + body);
+ var d = new Date().getTime();
+ var user = req.user;
+ var fileName= user + "_" + d +".html";
+ var post = qs.parse(body);
+ //console.log(JSON.stringify(post));
+ // use post['blah'], etc.
+ var localfile = appDir + "/" + RED.settings.htmlPath + fileName;
+ //console.log("localfile:" + localfile);
+ var nodemailer = require("nodemailer");
+ nodemailer.sendmail = true;
+ var transporter = nodemailer.createTransport();
+ var ua = req.headers['user-agent'];
+ var host = req.headers.host;
+ var fullHtml="<!doctype html><html><head>" + post['flowHtml'];
+ //fullHtml+="<div style='fill:both'></div>";
+ fullHtml+="<div style='margin-left:10px;'><p>XML</p><br><textarea rows='50' cols='150'>" + post['flowXml'] + "</textarea>";
+ fullHtml+="<p>JSON</p><br><textarea rows='50' cols='150'>" + post['flowJson'] + "</textarea></div>";
+ fullHtml+="</body></html>";
+ writeHtmlToFile(fileName,fullHtml);
+
+ transporter.sendMail({
+ from: fromAddr,
+ to: toAddr,
+ html: "<p>DG Node Flow. click on the attachment to view</p>",
+ subject: 'Node flow from Host:<' + host + '>',
+ attachments : [{'filename': fileName,
+ 'contentType': "text/html",
+ /*'filePath': localfile*/
+ 'content': fs.createReadStream(localfile)
+ }]
+
+ }, function(err, response) {
+ var fullPathtoFileName = appDir + "/" + RED.settings.htmlPath + fileName;
+ fs.unlink(fullPathtoFileName, function (error) {
+ if (error) {
+ console.log("Error deleting file "+fullPathtoFileName);
+ }else{
+ //console.log("deleted file:" + fullPathtoFileName);
+ }
+ });
+
+ if(err){
+ console.log("Error:" + err);
+ res.json(err);
+ }else{
+ res.json(response);
+ }
+ console.log(response);
+ });
+
+ });
+
+
+ });
+/*
+ RED.httpAdmin.post("/doxml/:id", function(req,res) {
+ var node = RED.nodes.getNode(req.params.id);
+ if (node != null) {
+ try {
+ // node.receive();
+ //console.log("doxml was called for node: ");
+ //console.dir(node);
+ //console.log("calling getJson");
+ var nrjson=dgxml.getJson();
+ console.log("calling nodered2xml");
+ var results=[];
+ results=dgxml.nodered2xml(nrjson,node.id);
+ var nrxml=results[0];
+ fileName=results[1];
+ console.log("Got this filename: " + fileName);
+ // res.send(200);
+ console.log("appDir: " + appDir);
+ fs.writeFileSync(appDir + "/public/xml/"+fileName,nrxml);
+ // res.send("XML generated! See help on right for link.");
+ res.send(fileName);
+ } catch(err) {
+ res.send(500);
+ node.error("doxml failed:"+err);
+ console.log(err.stack);
+ }
+ } else {
+ res.send(404);
+ }
+ });
+*/
+}
diff --git a/dgbuilder/nodes/dge/dgemain/method.html b/dgbuilder/nodes/dge/dgemain/method.html
new file mode 100644
index 0000000..5219033
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgemain/method.html
@@ -0,0 +1,141 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="method">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!--<a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show RPCs</b></a>-->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+<script type="text/x-red" data-help-name="method">
+ <p>A method node.</p>
+ <p>Name can be anything.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('method',{
+ color:"#fdd0a2",
+ category: 'DGEmain',
+ defaults: {
+ name: {value:"method"},
+ xml: {value:"<method rpc='' mode='sync'>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ //console.log("show Values clicked.");
+ showRpcsValuesBox(that.editor,rpcValues);
+ });
+
+ });
+
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgemain/method.js b/dgbuilder/nodes/dge/dgemain/method.js
new file mode 100644
index 0000000..6a29bd8
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgemain/method.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function method(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("method",method);
+ // RED.library.register("method");
+}
diff --git a/dgbuilder/nodes/dge/dgemain/serviceLogic.html b/dgbuilder/nodes/dge/dgemain/serviceLogic.html
new file mode 100644
index 0000000..7b9871c
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgemain/serviceLogic.html
@@ -0,0 +1,125 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="service-logic">
+ <div class="form-row">
+ <!--<label for="node-input-name"><i class="fa"></i> Name</label>-->
+ <input type="hidden" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <input type="hidden" id="node-input-xml">
+ <label for="node-input-module"><i class="fa"></i>Module</label>
+ <input type="text" id="node-input-module" autofocus="autofocus">
+ <label for="node-input-version"><i class="fa"></i>Version</label>
+ <input type="text" id="node-input-version">
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ </div>
+ <!--<div class="form-tips">See the Info tab for help using this node.</div>-->
+</script>
+
+<script type="text/x-red" data-help-name="service-logic">
+ <p>A service-logic node.</p>
+ <p>Double click the node to configure the module name and the version</p>
+
+</script>
+
+<script type="text/javascript">
+ RED.nodes.registerType('service-logic',{
+ color:"#fdd0a2",
+ category: 'DGEmain',
+ defaults: {
+ name: {value:"service-logic"},
+ module: {value:""},
+ version: {value:""},
+ comments:{value:""},
+ xml: {value:"<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='' version=''>\n"},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ //$("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+
+ $("#node-input-module").focus();
+
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ var module = $("#node-input-module").val();
+ if(module == null){
+ module='';
+ }
+ var version = $("#node-input-version").val();
+ if(version == null){
+ version='';
+ }
+ console.log("module:" + module);
+ console.log("version:" + version);
+ //xmlStr= xmlStr.replace("$MODULE",module);
+ //xmlStr= xmlStr.replace("$VERSION",version);
+ var xmlVal = "<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='" + module + "' version='" + version + "'>"
+ $("#node-input-xml").val(xmlVal);
+ if(module == "" || version == ""){
+ this.status = {fill:"red",shape:"dot",text:"Not configured"};
+ }else{
+ this.status = {fill:"green",shape:"dot",text:"configured"};
+ $("#node-input-name").val(module + " " + version);
+ }
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgemain/serviceLogic.js b/dgbuilder/nodes/dge/dgemain/serviceLogic.js
new file mode 100644
index 0000000..a5e77e4
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgemain/serviceLogic.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function serviceLogic(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("service-logic",serviceLogic);
+ // RED.library.register("service-logic");
+}
diff --git a/dgbuilder/nodes/dge/dgeoutcome/already-active.html b/dgbuilder/nodes/dge/dgeoutcome/already-active.html
new file mode 100644
index 0000000..a6c0778
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/already-active.html
@@ -0,0 +1,144 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="already-active">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="already-active">
+ <p>A already-active outcome.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('already-active',{
+ color: "#ffccff",
+ category: 'DGEoutcome',
+ defaults: {
+ name: {value:"already-active"},
+ xml: {value:"<outcome value='already-active'>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgeoutcome/already-active.js b/dgbuilder/nodes/dge/dgeoutcome/already-active.js
new file mode 100644
index 0000000..f6ab4fa
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/already-active.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function alreadyActive(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("already-active",alreadyActive);
+ // RED.library.register("already-active");
+}
diff --git a/dgbuilder/nodes/dge/dgeoutcome/failure.html b/dgbuilder/nodes/dge/dgeoutcome/failure.html
new file mode 100644
index 0000000..ed175a8
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/failure.html
@@ -0,0 +1,142 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="failure">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="failure">
+ <p>A failure outcome.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('failure',{
+ color:"#ffccff",
+ category: 'DGEoutcome',
+ defaults: {
+ name: {value:"failure"},
+ xml: {value:"<outcome value='failure'>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgeoutcome/failure.js b/dgbuilder/nodes/dge/dgeoutcome/failure.js
new file mode 100644
index 0000000..5abd1b7
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/failure.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function failure(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("failure",failure);
+ // RED.library.register("failure");
+}
diff --git a/dgbuilder/nodes/dge/dgeoutcome/not-found.html b/dgbuilder/nodes/dge/dgeoutcome/not-found.html
new file mode 100644
index 0000000..da09eaf
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/not-found.html
@@ -0,0 +1,142 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="not-found">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="not-found">
+ <p>A not-found outcome.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('not-found',{
+ color: "#ffccff",
+ category: 'DGEoutcome',
+ defaults: {
+ name: {value:"not-found"},
+ xml: {value:"<outcome value='not-found'>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgeoutcome/not-found.js b/dgbuilder/nodes/dge/dgeoutcome/not-found.js
new file mode 100644
index 0000000..80e10af
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/not-found.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function notFound(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("not-found",notFound);
+ // RED.library.register("not-found");
+}
diff --git a/dgbuilder/nodes/dge/dgeoutcome/other.html b/dgbuilder/nodes/dge/dgeoutcome/other.html
new file mode 100644
index 0000000..b346609
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/other.html
@@ -0,0 +1,143 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="other">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="other">
+ <p>A other outcome.</p>
+ <p>Name can be anything.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('other',{
+ color: "#ffccff",
+ category: 'DGEoutcome',
+ defaults: {
+ name: {value:"other"},
+ xml: {value:"<outcome value='Other'>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgeoutcome/other.js b/dgbuilder/nodes/dge/dgeoutcome/other.js
new file mode 100644
index 0000000..97bad48
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/other.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function other(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("other",other);
+ // RED.library.register("other");
+}
diff --git a/dgbuilder/nodes/dge/dgeoutcome/outcome.html b/dgbuilder/nodes/dge/dgeoutcome/outcome.html
new file mode 100644
index 0000000..33b084b
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/outcome.html
@@ -0,0 +1,143 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="outcome">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="outcome">
+ <p>A generic outcome node.</p>
+ <p>Use this node if you do not have a outcome value node in the node panel.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('outcome',{
+ color:"#ffccff",
+ category: 'DGEoutcome',
+ defaults: {
+ name: {value:"outcome"},
+ xml: {value:"<outcome value=''>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgeoutcome/outcome.js b/dgbuilder/nodes/dge/dgeoutcome/outcome.js
new file mode 100644
index 0000000..33513e4
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/outcome.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function outcome(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("outcome",outcome);
+ // RED.library.register("outcome");
+}
diff --git a/dgbuilder/nodes/dge/dgeoutcome/outcomeFalse.html b/dgbuilder/nodes/dge/dgeoutcome/outcomeFalse.html
new file mode 100644
index 0000000..442b51b
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/outcomeFalse.html
@@ -0,0 +1,143 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="outcomeFalse">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="outcomeFalse">
+ <p>A false outcome.</p>
+ <p>Name can be anything.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('outcomeFalse',{
+ color:"#ffccff",
+ category: 'DGEoutcome',
+ defaults: {
+ name: {value:"false"},
+ xml: {value:"<outcome value='false'>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgeoutcome/outcomeFalse.js b/dgbuilder/nodes/dge/dgeoutcome/outcomeFalse.js
new file mode 100644
index 0000000..f4a9a77
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/outcomeFalse.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function outcomeFalse(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("outcomeFalse",outcomeFalse);
+ // RED.library.register("success");
+}
diff --git a/dgbuilder/nodes/dge/dgeoutcome/outcomeTrue.html b/dgbuilder/nodes/dge/dgeoutcome/outcomeTrue.html
new file mode 100644
index 0000000..d1a27ba
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/outcomeTrue.html
@@ -0,0 +1,142 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="outcomeTrue">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="outcomeTrue">
+ <p>A true outcome.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('outcomeTrue',{
+ color:"#ffccff",
+ category: 'DGEoutcome',
+ defaults: {
+ name: {value:"true"},
+ xml: {value:"<outcome value='true'>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgeoutcome/outcomeTrue.js b/dgbuilder/nodes/dge/dgeoutcome/outcomeTrue.js
new file mode 100644
index 0000000..f27310e
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/outcomeTrue.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function outcomeTrue(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("outcomeTrue",outcomeTrue);
+ // RED.library.register("success");
+}
diff --git a/dgbuilder/nodes/dge/dgeoutcome/success.html b/dgbuilder/nodes/dge/dgeoutcome/success.html
new file mode 100644
index 0000000..3ea1266
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/success.html
@@ -0,0 +1,141 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="success">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="success">
+ <p>A success outcome.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('success',{
+ color:"#ffccff",
+ category: 'DGEoutcome',
+ defaults: {
+ name: {value:"success"},
+ xml: {value:"<outcome value='success'>\n"},
+ comments:{value:""},
+ outputs: {value:1}
+ },
+ inputs:1,
+ outputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+ $( "#node-input-outputs" ).spinner({
+ min:1
+ });
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgeoutcome/success.js b/dgbuilder/nodes/dge/dgeoutcome/success.js
new file mode 100644
index 0000000..4dbafbf
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgeoutcome/success.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function success(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("success",success);
+ // RED.library.register("success");
+}
diff --git a/dgbuilder/nodes/dge/dgereturn/returnFailure.html b/dgbuilder/nodes/dge/dgereturn/returnFailure.html
new file mode 100644
index 0000000..90adae7
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgereturn/returnFailure.html
@@ -0,0 +1,170 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="returnFailure">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="returnFailure">
+ <p>A returnFailure node.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h4><a name="Return_node"></a>Return node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>return</b> node is used to return a status to the invoking MD-SAL application</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>status</b></td>
+<td align="left">Status value to return (<i>failure</i>)</td></tr></table></div>
+<div class="section">
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>The following optional parameters may be passed to convey more detailed status information.</p>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>error-code</b></td>
+<td align="left">A brief, usually numeric, code indicating the error condition</td></tr>
+<tr class="b">
+<td align="center"><b>error-message</b></td>
+<td align="left">A more detailed error message</td></tr></table></div>
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<p>Not applicable. The <b>status</b> node has no outcomes.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><return status="failure">
+ <parameter name="error-code" value="1542" />
+ <parameter name="error-message" value="Activation failure" />
+</return></pre></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+ RED.nodes.registerType('returnFailure',{
+ color:"#ED0819",
+ category: 'DGEreturn',
+ defaults: {
+ name: {value:"return failure"},
+ xml: {value:"<return status='failure'>\n<parameter name='error-code' value='' />\n<parameter name='error-message' value='' />\n"},
+ comments:{value:""}
+ },
+ inputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgereturn/returnFailure.js b/dgbuilder/nodes/dge/dgereturn/returnFailure.js
new file mode 100644
index 0000000..da9fc74
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgereturn/returnFailure.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function returnFailure(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+ RED.nodes.registerType("returnFailure",returnFailure);
+ // RED.library.register("returnFailure");
+}
diff --git a/dgbuilder/nodes/dge/dgereturn/returnSuccess.html b/dgbuilder/nodes/dge/dgereturn/returnSuccess.html
new file mode 100644
index 0000000..8de0c26
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgereturn/returnSuccess.html
@@ -0,0 +1,174 @@
+<!--
+ Copyright 2013 IBM Corp.
+
+ 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.
+-->
+
+<script type="text/x-red" data-template-name="returnSuccess">
+ <div class="form-row">
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
+ <input type="text" id="node-input-name" placeholder="Name">
+ </div>
+ <div class="form-row">
+ <label for="node-input-xml"><i class="fa fa-wrench"></i> Node XML</label>
+ <input type="hidden" id="node-input-xml" autofocus="autofocus">
+ <div style="height: 450px;" class="node-text-editor" id="node-input-xml-editor" onkeyup="resetStatus()" ></div>
+ </div>
+ <div class="form-row">
+ <a href="#" class="btn btn-mini" id="node-input-validate" style="margin-top: 4px;"><b>Validate XML</b></a>
+ <!-- <a href="#" class="btn btn-mini" id="node-input-show-sli-values" style="margin-top: 4px;"><b>Show Values</b></a> -->
+ <input type="hidden" id="node-input-comments">
+ <a href="#" class="btn btn-mini" id="node-input-btnComments" style="margin-top: 4px;"><b>Add Comments</b></a>
+ <div id="node-validate-result" class="form-tips" style="float:right;font-size:10px"></div>
+ </div>
+ <div class="form-tips">See the Info tab for help using this node.</div>
+</script>
+
+<script type="text/x-red" data-help-name="returnSuccess">
+ <p>A returnSuccess node.</p>
+ <p>First line of XML must contain opening tag.</p>
+ <p>Do not include closing tag - it will be automatically generated.</p>
+
+<div class="section">
+<h4><a name="Return_node"></a>Return node</h4>
+<div class="section">
+<h5><a name="Description"></a>Description</h5>
+<p>A <b>return</b> node is used to return a status to the invoking MD-SAL application</p></div>
+<div class="section">
+<h5><a name="Attributes"></a>Attributes</h5>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>status</b></td>
+<td align="left">Status value to return (<i>success</i>)</td></tr></table></div>
+<div class="section">
+<!--
+<h5><a name="Parameters"></a>Parameters</h5>
+<p>The following optional parameters may be passed to convey more detailed status information.</p>
+<table border="1" class="table table-striped">
+<tr class="a">
+<td align="center"><b>error-code</b></td>
+<td align="left">A brief, usually numeric, code indicating the error condition</td></tr>
+<tr class="b">
+<td align="center"><b>error-message</b></td>
+<td align="left">A more detailed error message</td></tr></table></div>
+-->
+<div class="section">
+<h5><a name="Outcomes"></a>Outcomes</h5>
+<p>Not applicable. The <b>status</b> node has no outcomes.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+<div class="source">
+<pre><return status="success">
+ <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
+</return></pre></div></div></div>
+
+</script>
+
+
+<script type="text/javascript">
+
+ RED.nodes.registerType('returnSuccess',{
+ color:"#9AE767",
+ category: 'DGEreturn',
+ defaults: {
+ name: {value:"return success"},
+ xml: {value:"<return status='success'>\n<parameter name='' value='' />\n",required:true},
+ comments:{value:""}
+ },
+ inputs:1,
+ icon: "arrow-in.png",
+ label: function() {
+ return this.name;
+ },
+ oneditprepare: function() {
+
+
+ var comments = $( "#node-input-comments").val();
+ if(comments != null){
+ comments = comments.trim();
+ if(comments != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }
+ }
+
+ function functionDialogResize(ev,ui) {
+ $("#node-input-xml-editor").css("height",(ui.size.height-275)+"px");
+ };
+
+ $( "#dialog" ).dialog( "option", "width", 1200 );
+ $( "#dialog" ).dialog( "option", "height", 750 );
+ $( "#dialog" ).on("dialogresize", functionDialogResize);
+ $( "#dialog" ).one("dialogopen", function(ev) {
+ var size = $( "#dialog" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+
+ /* close dialog when ESC is pressed and released */
+ $( "#dialog" ).keyup(function(event){
+ if(event.which == 27 ) {
+ $("#node-dialog-cancel").click();
+ }
+ });
+
+
+ $( "#dialog" ).one("dialogclose", function(ev,ui) {
+ var height = $( "#dialog" ).dialog('option','height');
+ $( "#dialog" ).off("dialogresize",functionDialogResize);
+ });
+
+ var that = this;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('node-input-xml-editor'),
+ lang:"html",
+ contents: $("#node-input-xml").val()
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ $("#node-input-name").focus();
+ $("#node-input-validate").click(function(){
+ console.log("validate clicked.");
+ //console.dir(that.editor);
+ //console.log("getText:" + that.editor.getText());
+ var val = that.editor.getText();
+ validateXML(val);
+ });
+ $("#node-input-show-sli-values").click(function(){
+ console.log("SLIValues clicked.");
+ showValuesBox(that.editor,sliValuesObj);
+ });
+ });
+ //for click of add comments button
+ $("#node-input-btnComments").click(function(e){
+ showCommentsBox();
+ });
+
+ },
+ oneditsave: function() {
+ $("#node-input-xml").val(this.editor.getText());
+ var resp=validateXML(this.editor.getText());
+ if(resp){
+ this.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ this.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ delete this.editor;
+ }
+ });
+</script>
diff --git a/dgbuilder/nodes/dge/dgereturn/returnSuccess.js b/dgbuilder/nodes/dge/dgereturn/returnSuccess.js
new file mode 100644
index 0000000..d6c41c9
--- /dev/null
+++ b/dgbuilder/nodes/dge/dgereturn/returnSuccess.js
@@ -0,0 +1,32 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+module.exports = function(RED) {
+ "use strict";
+ var util = require("util");
+ var vm = require("vm");
+
+ function returnSuccess(n) {
+ RED.nodes.createNode(this,n);
+ this.name = n.name;
+ this.xml = n.xml;
+ this.topic = n.topic;
+ }
+
+
+ RED.nodes.registerType("returnSuccess",returnSuccess);
+ // RED.library.register("ret-success");
+}
diff --git a/dgbuilder/package.json b/dgbuilder/package.json
new file mode 100644
index 0000000..64114b3
--- /dev/null
+++ b/dgbuilder/package.json
@@ -0,0 +1,104 @@
+{
+ "name": "node-red",
+ "version": "0.9.1",
+ "description": "A visual tool for wiring the Internet of Things",
+ "homepage": "http://nodered.org",
+ "license": "Apache",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/node-red/node-red.git"
+ },
+ "main": "red/red.js",
+ "scripts": {
+ "start": "node red.js",
+ "test": "grunt"
+ },
+ "contributors": [
+ {
+ "name": "Nick O'Leary"
+ },
+ {
+ "name": "Dave Conway-Jones"
+ }
+ ],
+ "keywords": [
+ "editor",
+ "messaging",
+ "iot",
+ "m2m",
+ "pi",
+ "arduino",
+ "beaglebone",
+ "ibm",
+ "flow"
+ ],
+ "dependencies": {
+ "express": "3.17.2",
+ "when": "3.4.6",
+ "nopt": "3.0.1",
+ "mqtt": "0.3.x",
+ "ws": "0.4.32",
+ "fs-extra": "0.11.1",
+ "clone": "0.1.18",
+ "mustache": "0.8.2",
+ "cron": "1.0.4",
+ "raw-body": "1.3.0",
+ "twitter-ng": "0.6.2",
+ "oauth": "0.9.12",
+ "xml2js": "0.4.4",
+ "sentiment": "0.2.3",
+ "irc": "0.3.7",
+ "follow-redirects": "0.0.3",
+ "cors": "2.4.2",
+ "mkdirp": "0.5.0",
+ "cheerio": "0.17.0",
+ "uglify-js": "2.4.15",
+ "nodemailer": "1.3.0",
+ "imap": "0.8.13",
+ "request": "2.42.0",
+ "colors": "0.6.2",
+ "glob" : "5.0.15",
+ "lodash" : "3.7.0",
+ "multer" : "1.1.0",
+ "mysql" : "2.7.0",
+ "needle" : "0.9.2",
+ "pretty-data" : "0.40.0"
+ },
+ "devDependencies": {
+ "grunt": "0.4.5",
+ "grunt-cli": "0.1.13",
+ "grunt-simple-mocha": "0.4.0",
+ "grunt-contrib-jshint": "0.10.0",
+ "mocha": "1.21.4",
+ "should": "4.0.4",
+ "sinon": "1.10.3",
+ "supertest": "^0.13.0"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "bugs": {
+ "url": "https://github.com/node-red/node-red/issues"
+ },
+ "_id": "node-red@0.9.1",
+ "dist": {
+ "shasum": "1c5f7ae2ef3dbcd090ca7db2e9c080968adc2f73",
+ "tarball": "http://registry.npmjs.org/node-red/-/node-red-0.9.1.tgz"
+ },
+ "_from": "node-red@0.9.1",
+ "_npmVersion": "1.4.6",
+ "_npmUser": {
+ "name": "knolleary",
+ "email": "nick.oleary@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "knolleary",
+ "email": "nick.oleary@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_shasum": "1c5f7ae2ef3dbcd090ca7db2e9c080968adc2f73",
+ "_resolved": "https://registry.npmjs.org/node-red/-/node-red-0.9.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/dgbuilder/public/bootstrap/css/bootstrap.min.css b/dgbuilder/public/bootstrap/css/bootstrap.min.css
new file mode 100644
index 0000000..df96c86
--- /dev/null
+++ b/dgbuilder/public/bootstrap/css/bootstrap.min.css
@@ -0,0 +1,9 @@
+/*!
+ * Bootstrap v2.3.2
+ *
+ * Copyright 2013 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world by @mdo and @fat.
+ */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover,a:focus{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:hover,a.muted:focus{color:#808080}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,0.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed}
diff --git a/dgbuilder/public/bootstrap/img/glyphicons-halflings-white.png b/dgbuilder/public/bootstrap/img/glyphicons-halflings-white.png
new file mode 100644
index 0000000..3bf6484
--- /dev/null
+++ b/dgbuilder/public/bootstrap/img/glyphicons-halflings-white.png
Binary files differ
diff --git a/dgbuilder/public/bootstrap/img/glyphicons-halflings.png b/dgbuilder/public/bootstrap/img/glyphicons-halflings.png
new file mode 100644
index 0000000..a996999
--- /dev/null
+++ b/dgbuilder/public/bootstrap/img/glyphicons-halflings.png
Binary files differ
diff --git a/dgbuilder/public/bootstrap/js/bootstrap.min.js b/dgbuilder/public/bootstrap/js/bootstrap.min.js
new file mode 100644
index 0000000..848258d
--- /dev/null
+++ b/dgbuilder/public/bootstrap/js/bootstrap.min.js
@@ -0,0 +1,6 @@
+/*!
+* Bootstrap.js by @fat & @mdo
+* Copyright 2013 Twitter, Inc.
+* http://www.apache.org/licenses/LICENSE-2.0.txt
+*/
+!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('<div class="dropdown-backdrop"/>').insertBefore(e(this)).on("click",r),s.toggleClass("open")),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f<s.length-1&&f++,~f||(f=0),s.eq(f).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api",r).on("click.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e.fn[this.type].defaults,r={},i;this._options&&e.each(this._options,function(e,t){n[e]!=t&&(r[e]=t)},this),i=e(t.currentTarget)[this.type](r).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
\ No newline at end of file
diff --git a/dgbuilder/public/d3.v3.min.js b/dgbuilder/public/d3.v3.min.js
new file mode 100644
index 0000000..2542ced
--- /dev/null
+++ b/dgbuilder/public/d3.v3.min.js
@@ -0,0 +1,4 @@
+(function(){function t(t){return t.target}function n(t){return t.source}function e(t,n){try{for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}catch(r){t.prototype=n}}function r(t){for(var n=-1,e=t.length,r=[];e>++n;)r.push(t[n]);return r}function i(t){return Array.prototype.slice.call(t)}function u(){}function a(t){return t}function o(){return!0}function c(t){return"function"==typeof t?t:function(){return t}}function l(t,n,e){return function(){var r=e.apply(n,arguments);return arguments.length?t:r}}function s(t){return null!=t&&!isNaN(t)}function f(t){return t.length}function h(t){return t.trim().replace(/\s+/g," ")}function d(t){for(var n=1;t*n%1;)n*=10;return n}function g(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}function p(t){return t.responseText}function m(t){return JSON.parse(t.responseText)}function v(t){var n=document.createRange();return n.selectNode(document.body),n.createContextualFragment(t.responseText)}function y(t){return t.responseXML}function M(){}function b(t){function n(){for(var n,r=e,i=-1,u=r.length;u>++i;)(n=r[i].on)&&n.apply(this,arguments);return t}var e=[],r=new u;return n.on=function(n,i){var u,a=r.get(n);return 2>arguments.length?a&&a.on:(a&&(a.on=null,e=e.slice(0,u=e.indexOf(a)).concat(e.slice(u+1)),r.remove(n)),i&&e.push(r.set(n,{on:i})),t)},n}function x(t,n){return n-(t?1+Math.floor(Math.log(t+Math.pow(10,1+Math.floor(Math.log(t)/Math.LN10)-n))/Math.LN10):1)}function _(t){return t+""}function w(t,n){var e=Math.pow(10,3*Math.abs(8-n));return{scale:n>8?function(t){return t/e}:function(t){return t*e},symbol:t}}function S(t){return function(n){return 0>=n?0:n>=1?1:t(n)}}function k(t){return function(n){return 1-t(1-n)}}function E(t){return function(n){return.5*(.5>n?t(2*n):2-t(2-2*n))}}function A(t){return t*t}function N(t){return t*t*t}function T(t){if(0>=t)return 0;if(t>=1)return 1;var n=t*t,e=n*t;return 4*(.5>t?e:3*(t-n)+e-.75)}function q(t){return function(n){return Math.pow(n,t)}}function C(t){return 1-Math.cos(t*Ru/2)}function z(t){return Math.pow(2,10*(t-1))}function D(t){return 1-Math.sqrt(1-t*t)}function L(t,n){var e;return 2>arguments.length&&(n=.45),arguments.length?e=n/(2*Ru)*Math.asin(1/t):(t=1,e=n/4),function(r){return 1+t*Math.pow(2,10*-r)*Math.sin(2*(r-e)*Ru/n)}}function F(t){return t||(t=1.70158),function(n){return n*n*((t+1)*n-t)}}function H(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function R(){d3.event.stopPropagation(),d3.event.preventDefault()}function P(){for(var t,n=d3.event;t=n.sourceEvent;)n=t;return n}function j(t){for(var n=new M,e=0,r=arguments.length;r>++e;)n[arguments[e]]=b(n);return n.of=function(e,r){return function(i){try{var u=i.sourceEvent=d3.event;i.target=t,d3.event=i,n[i.type].apply(e,r)}finally{d3.event=u}}},n}function O(t){var n=[t.a,t.b],e=[t.c,t.d],r=U(n),i=Y(n,e),u=U(I(e,n,-i))||0;n[0]*e[1]<e[0]*n[1]&&(n[0]*=-1,n[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(n[1],n[0]):Math.atan2(-e[0],e[1]))*Ou,this.translate=[t.e,t.f],this.scale=[r,u],this.skew=u?Math.atan2(i,u)*Ou:0}function Y(t,n){return t[0]*n[0]+t[1]*n[1]}function U(t){var n=Math.sqrt(Y(t,t));return n&&(t[0]/=n,t[1]/=n),n}function I(t,n,e){return t[0]+=e*n[0],t[1]+=e*n[1],t}function V(t){return"transform"==t?d3.interpolateTransform:d3.interpolate}function X(t,n){return n=n-(t=+t)?1/(n-t):0,function(e){return(e-t)*n}}function Z(t,n){return n=n-(t=+t)?1/(n-t):0,function(e){return Math.max(0,Math.min(1,(e-t)*n))}}function B(){}function $(t,n,e){return new J(t,n,e)}function J(t,n,e){this.r=t,this.g=n,this.b=e}function G(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function K(t,n,e){var r,i,u,a=0,o=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(t))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return n(nn(i[0]),nn(i[1]),nn(i[2]))}return(u=aa.get(t))?n(u.r,u.g,u.b):(null!=t&&"#"===t.charAt(0)&&(4===t.length?(a=t.charAt(1),a+=a,o=t.charAt(2),o+=o,c=t.charAt(3),c+=c):7===t.length&&(a=t.substring(1,3),o=t.substring(3,5),c=t.substring(5,7)),a=parseInt(a,16),o=parseInt(o,16),c=parseInt(c,16)),n(a,o,c))}function W(t,n,e){var r,i,u=Math.min(t/=255,n/=255,e/=255),a=Math.max(t,n,e),o=a-u,c=(a+u)/2;return o?(i=.5>c?o/(a+u):o/(2-a-u),r=t==a?(n-e)/o+(e>n?6:0):n==a?(e-t)/o+2:(t-n)/o+4,r*=60):i=r=0,en(r,i,c)}function Q(t,n,e){t=tn(t),n=tn(n),e=tn(e);var r=gn((.4124564*t+.3575761*n+.1804375*e)/sa),i=gn((.2126729*t+.7151522*n+.072175*e)/fa),u=gn((.0193339*t+.119192*n+.9503041*e)/ha);return ln(116*i-16,500*(r-i),200*(i-u))}function tn(t){return.04045>=(t/=255)?t/12.92:Math.pow((t+.055)/1.055,2.4)}function nn(t){var n=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*n):n}function en(t,n,e){return new rn(t,n,e)}function rn(t,n,e){this.h=t,this.s=n,this.l=e}function un(t,n,e){function r(t){return t>360?t-=360:0>t&&(t+=360),60>t?u+(a-u)*t/60:180>t?a:240>t?u+(a-u)*(240-t)/60:u}function i(t){return Math.round(255*r(t))}var u,a;return t%=360,0>t&&(t+=360),n=0>n?0:n>1?1:n,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+n):e+n-e*n,u=2*e-a,$(i(t+120),i(t),i(t-120))}function an(t,n,e){return new on(t,n,e)}function on(t,n,e){this.h=t,this.c=n,this.l=e}function cn(t,n,e){return ln(e,Math.cos(t*=ju)*n,Math.sin(t)*n)}function ln(t,n,e){return new sn(t,n,e)}function sn(t,n,e){this.l=t,this.a=n,this.b=e}function fn(t,n,e){var r=(t+16)/116,i=r+n/500,u=r-e/200;return i=dn(i)*sa,r=dn(r)*fa,u=dn(u)*ha,$(pn(3.2404542*i-1.5371385*r-.4985314*u),pn(-.969266*i+1.8760108*r+.041556*u),pn(.0556434*i-.2040259*r+1.0572252*u))}function hn(t,n,e){return an(180*(Math.atan2(e,n)/Ru),Math.sqrt(n*n+e*e),t)}function dn(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function gn(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function pn(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function mn(t){return Iu(t,Ma),t}function vn(t){return function(){return ga(t,this)}}function yn(t){return function(){return pa(t,this)}}function Mn(t,n){function e(){this.removeAttribute(t)}function r(){this.removeAttributeNS(t.space,t.local)}function i(){this.setAttribute(t,n)}function u(){this.setAttributeNS(t.space,t.local,n)}function a(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}function o(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}return t=d3.ns.qualify(t),null==n?t.local?r:e:"function"==typeof n?t.local?o:a:t.local?u:i}function bn(t){return RegExp("(?:^|\\s+)"+d3.requote(t)+"(?:\\s+|$)","g")}function xn(t,n){function e(){for(var e=-1;i>++e;)t[e](this,n)}function r(){for(var e=-1,r=n.apply(this,arguments);i>++e;)t[e](this,r)}t=t.trim().split(/\s+/).map(_n);var i=t.length;return"function"==typeof n?r:e}function _n(t){var n=bn(t);return function(e,r){if(i=e.classList)return r?i.add(t):i.remove(t);var i=e.className,u=null!=i.baseVal,a=u?i.baseVal:i;r?(n.lastIndex=0,n.test(a)||(a=h(a+" "+t),u?i.baseVal=a:e.className=a)):a&&(a=h(a.replace(n," ")),u?i.baseVal=a:e.className=a)}}function wn(t,n,e){function r(){this.style.removeProperty(t)}function i(){this.style.setProperty(t,n,e)}function u(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}return null==n?r:"function"==typeof n?u:i}function Sn(t,n){function e(){delete this[t]}function r(){this[t]=n}function i(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}return null==n?e:"function"==typeof n?i:r}function kn(t){return{__data__:t}}function En(t){return function(){return ya(this,t)}}function An(t){return arguments.length||(t=d3.ascending),function(n,e){return t(n&&n.__data__,e&&e.__data__)}}function Nn(t,n,e){function r(){var n=this[u];n&&(this.removeEventListener(t,n,n.$),delete this[u])}function i(){function i(t){var e=d3.event;d3.event=t,o[0]=a.__data__;try{n.apply(a,o)}finally{d3.event=e}}var a=this,o=Yu(arguments);r.call(this),this.addEventListener(t,this[u]=i,i.$=e),i._=n}var u="__on"+t,a=t.indexOf(".");return a>0&&(t=t.substring(0,a)),n?i:r}function Tn(t,n){for(var e=0,r=t.length;r>e;e++)for(var i,u=t[e],a=0,o=u.length;o>a;a++)(i=u[a])&&n(i,a,e);return t}function qn(t){return Iu(t,xa),t}function Cn(t,n){return Iu(t,wa),t.id=n,t}function zn(t,n,e,r){var i=t.__transition__||(t.__transition__={active:0,count:0}),a=i[e];if(!a){var o=r.time;return a=i[e]={tween:new u,event:d3.dispatch("start","end"),time:o,ease:r.ease,delay:r.delay,duration:r.duration},++i.count,d3.timer(function(r){function u(r){return i.active>e?l():(i.active=e,h.start.call(t,s,n),a.tween.forEach(function(e,r){(r=r.call(t,s,n))&&p.push(r)}),c(r)||d3.timer(c,0,o),1)}function c(r){if(i.active!==e)return l();for(var u=(r-d)/g,a=f(u),o=p.length;o>0;)p[--o].call(t,a);return u>=1?(l(),h.end.call(t,s,n),1):void 0}function l(){return--i.count?delete i[e]:delete t.__transition__,1}var s=t.__data__,f=a.ease,h=a.event,d=a.delay,g=a.duration,p=[];return r>=d?u(r):d3.timer(u,d,o),1},0,o),a}}function Dn(t){return null==t&&(t=""),function(){this.textContent=t}}function Ln(t,n,e,r){var i=t.id;return Tn(t,"function"==typeof e?function(t,u,a){t.__transition__[i].tween.set(n,r(e.call(t,t.__data__,u,a)))}:(e=r(e),function(t){t.__transition__[i].tween.set(n,e)}))}function Fn(){for(var t,n=Date.now(),e=qa;e;)t=n-e.then,t>=e.delay&&(e.flush=e.callback(t)),e=e.next;var r=Hn()-n;r>24?(isFinite(r)&&(clearTimeout(Aa),Aa=setTimeout(Fn,r)),Ea=0):(Ea=1,Ca(Fn))}function Hn(){for(var t=null,n=qa,e=1/0;n;)n.flush?(delete Ta[n.callback.id],n=t?t.next=n.next:qa=n.next):(e=Math.min(e,n.then+n.delay),n=(t=n).next);return e}function Rn(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>za&&(window.scrollX||window.scrollY)){e=d3.select(document.body).append("svg").style("position","absolute").style("top",0).style("left",0);var i=e[0][0].getScreenCTM();za=!(i.f||i.e),e.remove()}return za?(r.x=n.pageX,r.y=n.pageY):(r.x=n.clientX,r.y=n.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var u=t.getBoundingClientRect();return[n.clientX-u.left-t.clientLeft,n.clientY-u.top-t.clientTop]}function Pn(){}function jn(t){var n=t[0],e=t[t.length-1];return e>n?[n,e]:[e,n]}function On(t){return t.rangeExtent?t.rangeExtent():jn(t.range())}function Yn(t,n){var e,r=0,i=t.length-1,u=t[r],a=t[i];return u>a&&(e=r,r=i,i=e,e=u,u=a,a=e),(n=n(a-u))&&(t[r]=n.floor(u),t[i]=n.ceil(a)),t}function Un(){return Math}function In(t,n,e,r){function i(){var i=Math.min(t.length,n.length)>2?Gn:Jn,c=r?Z:X;return a=i(t,n,c,e),o=i(n,t,c,d3.interpolate),u}function u(t){return a(t)}var a,o;return u.invert=function(t){return o(t)},u.domain=function(n){return arguments.length?(t=n.map(Number),i()):t},u.range=function(t){return arguments.length?(n=t,i()):n},u.rangeRound=function(t){return u.range(t).interpolate(d3.interpolateRound)},u.clamp=function(t){return arguments.length?(r=t,i()):r},u.interpolate=function(t){return arguments.length?(e=t,i()):e},u.ticks=function(n){return Bn(t,n)},u.tickFormat=function(n){return $n(t,n)},u.nice=function(){return Yn(t,Xn),i()},u.copy=function(){return In(t,n,e,r)},i()}function Vn(t,n){return d3.rebind(t,n,"range","rangeRound","interpolate","clamp")}function Xn(t){return t=Math.pow(10,Math.round(Math.log(t)/Math.LN10)-1),t&&{floor:function(n){return Math.floor(n/t)*t},ceil:function(n){return Math.ceil(n/t)*t}}}function Zn(t,n){var e=jn(t),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/n)/Math.LN10)),u=n/r*i;return.15>=u?i*=10:.35>=u?i*=5:.75>=u&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Bn(t,n){return d3.range.apply(d3,Zn(t,n))}function $n(t,n){return d3.format(",."+Math.max(0,-Math.floor(Math.log(Zn(t,n)[2])/Math.LN10+.01))+"f")}function Jn(t,n,e,r){var i=e(t[0],t[1]),u=r(n[0],n[1]);return function(t){return u(i(t))}}function Gn(t,n,e,r){var i=[],u=[],a=0,o=Math.min(t.length,n.length)-1;for(t[o]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());o>=++a;)i.push(e(t[a-1],t[a])),u.push(r(n[a-1],n[a]));return function(n){var e=d3.bisect(t,n,1,o)-1;return u[e](i[e](n))}}function Kn(t,n){function e(e){return t(n(e))}var r=n.pow;return e.invert=function(n){return r(t.invert(n))},e.domain=function(i){return arguments.length?(n=0>i[0]?Qn:Wn,r=n.pow,t.domain(i.map(n)),e):t.domain().map(r)},e.nice=function(){return t.domain(Yn(t.domain(),Un)),e},e.ticks=function(){var e=jn(t.domain()),i=[];if(e.every(isFinite)){var u=Math.floor(e[0]),a=Math.ceil(e[1]),o=r(e[0]),c=r(e[1]);if(n===Qn)for(i.push(r(u));a>u++;)for(var l=9;l>0;l--)i.push(r(u)*l);else{for(;a>u;u++)for(var l=1;10>l;l++)i.push(r(u)*l);i.push(r(u))}for(u=0;o>i[u];u++);for(a=i.length;i[a-1]>c;a--);i=i.slice(u,a)}return i},e.tickFormat=function(t,i){if(2>arguments.length&&(i=Da),!arguments.length)return i;var u,a=Math.max(.1,t/e.ticks().length),o=n===Qn?(u=-1e-12,Math.floor):(u=1e-12,Math.ceil);return function(t){return a>=t/r(o(n(t)+u))?i(t):""}},e.copy=function(){return Kn(t.copy(),n)},Vn(e,t)}function Wn(t){return Math.log(0>t?0:t)/Math.LN10}function Qn(t){return-Math.log(t>0?0:-t)/Math.LN10}function te(t,n){function e(n){return t(r(n))}var r=ne(n),i=ne(1/n);return e.invert=function(n){return i(t.invert(n))},e.domain=function(n){return arguments.length?(t.domain(n.map(r)),e):t.domain().map(i)},e.ticks=function(t){return Bn(e.domain(),t)},e.tickFormat=function(t){return $n(e.domain(),t)},e.nice=function(){return e.domain(Yn(e.domain(),Xn))},e.exponent=function(t){if(!arguments.length)return n;var u=e.domain();return r=ne(n=t),i=ne(1/n),e.domain(u)},e.copy=function(){return te(t.copy(),n)},Vn(e,t)}function ne(t){return function(n){return 0>n?-Math.pow(-n,t):Math.pow(n,t)}}function ee(t,n){function e(n){return a[((i.get(n)||i.set(n,t.push(n)))-1)%a.length]}function r(n,e){return d3.range(t.length).map(function(t){return n+e*t})}var i,a,o;return e.domain=function(r){if(!arguments.length)return t;t=[],i=new u;for(var a,o=-1,c=r.length;c>++o;)i.has(a=r[o])||i.set(a,t.push(a));return e[n.t].apply(e,n.a)},e.range=function(t){return arguments.length?(a=t,o=0,n={t:"range",a:arguments},e):a},e.rangePoints=function(i,u){2>arguments.length&&(u=0);var c=i[0],l=i[1],s=(l-c)/(Math.max(1,t.length-1)+u);return a=r(2>t.length?(c+l)/2:c+s*u/2,s),o=0,n={t:"rangePoints",a:arguments},e},e.rangeBands=function(i,u,c){2>arguments.length&&(u=0),3>arguments.length&&(c=u);var l=i[1]<i[0],s=i[l-0],f=i[1-l],h=(f-s)/(t.length-u+2*c);return a=r(s+h*c,h),l&&a.reverse(),o=h*(1-u),n={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(i,u,c){2>arguments.length&&(u=0),3>arguments.length&&(c=u);var l=i[1]<i[0],s=i[l-0],f=i[1-l],h=Math.floor((f-s)/(t.length-u+2*c)),d=f-s-(t.length-u)*h;return a=r(s+Math.round(d/2),h),l&&a.reverse(),o=Math.round(h*(1-u)),n={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return jn(n.a[0])},e.copy=function(){return ee(t,n)},e.domain(t)}function re(t,n){function e(){var e=0,u=n.length;for(i=[];u>++e;)i[e-1]=d3.quantile(t,e/u);return r}function r(t){return isNaN(t=+t)?0/0:n[d3.bisect(i,t)]}var i;return r.domain=function(n){return arguments.length?(t=n.filter(function(t){return!isNaN(t)}).sort(d3.ascending),e()):t},r.range=function(t){return arguments.length?(n=t,e()):n},r.quantiles=function(){return i},r.copy=function(){return re(t,n)},e()}function ie(t,n,e){function r(n){return e[Math.max(0,Math.min(a,Math.floor(u*(n-t))))]}function i(){return u=e.length/(n-t),a=e.length-1,r}var u,a;return r.domain=function(e){return arguments.length?(t=+e[0],n=+e[e.length-1],i()):[t,n]},r.range=function(t){return arguments.length?(e=t,i()):e},r.copy=function(){return ie(t,n,e)},i()}function ue(t,n){function e(e){return n[d3.bisect(t,e)]}return e.domain=function(n){return arguments.length?(t=n,e):t},e.range=function(t){return arguments.length?(n=t,e):n},e.copy=function(){return ue(t,n)},e}function ae(t){function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=e.map(n),n):t},n.ticks=function(n){return Bn(t,n)},n.tickFormat=function(n){return $n(t,n)},n.copy=function(){return ae(t)},n}function oe(t){return t.innerRadius}function ce(t){return t.outerRadius}function le(t){return t.startAngle}function se(t){return t.endAngle}function fe(t){function n(n){function a(){s.push("M",u(t(f),l))}for(var o,s=[],f=[],h=-1,d=n.length,g=c(e),p=c(r);d>++h;)i.call(this,o=n[h],h)?f.push([+g.call(this,o,h),+p.call(this,o,h)]):f.length&&(a(),f=[]);return f.length&&a(),s.length?s.join(""):null}var e=he,r=de,i=o,u=ge,a=u.key,l=.7;return n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n.defined=function(t){return arguments.length?(i=t,n):i},n.interpolate=function(t){return arguments.length?(a="function"==typeof t?u=t:(u=Oa.get(t)||ge).key,n):a},n.tension=function(t){return arguments.length?(l=t,n):l},n}function he(t){return t[0]}function de(t){return t[1]}function ge(t){return t.join("L")}function pe(t){return ge(t)+"Z"}function me(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];e>++n;)i.push("V",(r=t[n])[1],"H",r[0]);return i.join("")}function ve(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];e>++n;)i.push("H",(r=t[n])[0],"V",r[1]);return i.join("")}function ye(t,n){return 4>t.length?ge(t):t[1]+xe(t.slice(1,t.length-1),_e(t,n))}function Me(t,n){return 3>t.length?ge(t):t[0]+xe((t.push(t[0]),t),_e([t[t.length-2]].concat(t,[t[1]]),n))}function be(t,n){return 3>t.length?ge(t):t[0]+xe(t,_e(t,n))}function xe(t,n){if(1>n.length||t.length!=n.length&&t.length!=n.length+2)return ge(t);var e=t.length!=n.length,r="",i=t[0],u=t[1],a=n[0],o=a,c=1;if(e&&(r+="Q"+(u[0]-2*a[0]/3)+","+(u[1]-2*a[1]/3)+","+u[0]+","+u[1],i=t[1],c=2),n.length>1){o=n[1],u=t[c],c++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(u[0]-o[0])+","+(u[1]-o[1])+","+u[0]+","+u[1];for(var l=2;n.length>l;l++,c++)u=t[c],o=n[l],r+="S"+(u[0]-o[0])+","+(u[1]-o[1])+","+u[0]+","+u[1]}if(e){var s=t[c];r+="Q"+(u[0]+2*o[0]/3)+","+(u[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function _e(t,n){for(var e,r=[],i=(1-n)/2,u=t[0],a=t[1],o=1,c=t.length;c>++o;)e=u,u=a,a=t[o],r.push([i*(a[0]-e[0]),i*(a[1]-e[1])]);return r}function we(t){if(3>t.length)return ge(t);var n=1,e=t.length,r=t[0],i=r[0],u=r[1],a=[i,i,i,(r=t[1])[0]],o=[u,u,u,r[1]],c=[i,",",u];for(Ne(c,a,o);e>++n;)r=t[n],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Ne(c,a,o);for(n=-1;2>++n;)a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Ne(c,a,o);return c.join("")}function Se(t){if(4>t.length)return ge(t);for(var n,e=[],r=-1,i=t.length,u=[0],a=[0];3>++r;)n=t[r],u.push(n[0]),a.push(n[1]);for(e.push(Ae(Ia,u)+","+Ae(Ia,a)),--r;i>++r;)n=t[r],u.shift(),u.push(n[0]),a.shift(),a.push(n[1]),Ne(e,u,a);return e.join("")}function ke(t){for(var n,e,r=-1,i=t.length,u=i+4,a=[],o=[];4>++r;)e=t[r%i],a.push(e[0]),o.push(e[1]);for(n=[Ae(Ia,a),",",Ae(Ia,o)],--r;u>++r;)e=t[r%i],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Ne(n,a,o);return n.join("")}function Ee(t,n){var e=t.length-1;if(e)for(var r,i,u=t[0][0],a=t[0][1],o=t[e][0]-u,c=t[e][1]-a,l=-1;e>=++l;)r=t[l],i=l/e,r[0]=n*r[0]+(1-n)*(u+i*o),r[1]=n*r[1]+(1-n)*(a+i*c);return we(t)}function Ae(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function Ne(t,n,e){t.push("C",Ae(Ya,n),",",Ae(Ya,e),",",Ae(Ua,n),",",Ae(Ua,e),",",Ae(Ia,n),",",Ae(Ia,e))}function Te(t,n){return(n[1]-t[1])/(n[0]-t[0])}function qe(t){for(var n=0,e=t.length-1,r=[],i=t[0],u=t[1],a=r[0]=Te(i,u);e>++n;)r[n]=(a+(a=Te(i=u,u=t[n+1])))/2;return r[n]=a,r}function Ce(t){for(var n,e,r,i,u=[],a=qe(t),o=-1,c=t.length-1;c>++o;)n=Te(t[o],t[o+1]),1e-6>Math.abs(n)?a[o]=a[o+1]=0:(e=a[o]/n,r=a[o+1]/n,i=e*e+r*r,i>9&&(i=3*n/Math.sqrt(i),a[o]=i*e,a[o+1]=i*r));for(o=-1;c>=++o;)i=(t[Math.min(c,o+1)][0]-t[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),u.push([i||0,a[o]*i||0]);return u}function ze(t){return 3>t.length?ge(t):t[0]+xe(t,Ce(t))}function De(t){for(var n,e,r,i=-1,u=t.length;u>++i;)n=t[i],e=n[0],r=n[1]+Pa,n[0]=e*Math.cos(r),n[1]=e*Math.sin(r);return t}function Le(t){function n(n){function o(){m.push("M",l(t(y),d),h,f(t(v.reverse()),d),"Z")}for(var s,g,p,m=[],v=[],y=[],M=-1,b=n.length,x=c(e),_=c(i),w=e===r?function(){return g}:c(r),S=i===u?function(){return p}:c(u);b>++M;)a.call(this,s=n[M],M)?(v.push([g=+x.call(this,s,M),p=+_.call(this,s,M)]),y.push([+w.call(this,s,M),+S.call(this,s,M)])):v.length&&(o(),v=[],y=[]);return v.length&&o(),m.length?m.join(""):null}var e=he,r=he,i=0,u=de,a=o,l=ge,s=l.key,f=l,h="L",d=.7;return n.x=function(t){return arguments.length?(e=r=t,n):r},n.x0=function(t){return arguments.length?(e=t,n):e},n.x1=function(t){return arguments.length?(r=t,n):r},n.y=function(t){return arguments.length?(i=u=t,n):u},n.y0=function(t){return arguments.length?(i=t,n):i},n.y1=function(t){return arguments.length?(u=t,n):u},n.defined=function(t){return arguments.length?(a=t,n):a},n.interpolate=function(t){return arguments.length?(s="function"==typeof t?l=t:(l=Oa.get(t)||ge).key,f=l.reverse||l,h=l.closed?"M":"L",n):s},n.tension=function(t){return arguments.length?(d=t,n):d},n}function Fe(t){return t.radius}function He(t){return[t.x,t.y]}function Re(t){return function(){var n=t.apply(this,arguments),e=n[0],r=n[1]+Pa;return[e*Math.cos(r),e*Math.sin(r)]}}function Pe(){return 64}function je(){return"circle"}function Oe(t){var n=Math.sqrt(t/Ru);return"M0,"+n+"A"+n+","+n+" 0 1,1 0,"+-n+"A"+n+","+n+" 0 1,1 0,"+n+"Z"}function Ye(t,n){t.attr("transform",function(t){return"translate("+n(t)+",0)"})}function Ue(t,n){t.attr("transform",function(t){return"translate(0,"+n(t)+")"})}function Ie(t,n,e){if(r=[],e&&n.length>1){for(var r,i,u,a=jn(t.domain()),o=-1,c=n.length,l=(n[1]-n[0])/++e;c>++o;)for(i=e;--i>0;)(u=+n[o]-i*l)>=a[0]&&r.push(u);for(--o,i=0;e>++i&&(u=+n[o]+i*l)<a[1];)r.push(u)}return r}function Ve(){Ja||(Ja=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var t,n=d3.event;try{Ja.scrollTop=1e3,Ja.dispatchEvent(n),t=1e3-Ja.scrollTop}catch(e){t=n.wheelDelta||5*-n.detail}return t}function Xe(t){for(var n=t.source,e=t.target,r=Be(n,e),i=[n];n!==r;)n=n.parent,i.push(n);for(var u=i.length;e!==r;)i.splice(u,0,e),e=e.parent;return i}function Ze(t){for(var n=[],e=t.parent;null!=e;)n.push(t),t=e,e=e.parent;return n.push(t),n}function Be(t,n){if(t===n)return t;for(var e=Ze(t),r=Ze(n),i=e.pop(),u=r.pop(),a=null;i===u;)a=i,i=e.pop(),u=r.pop();return a}function $e(t){t.fixed|=2}function Je(t){t.fixed&=1}function Ge(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Ke(t){t.fixed&=3}function We(t,n,e){var r=0,i=0;if(t.charge=0,!t.leaf)for(var u,a=t.nodes,o=a.length,c=-1;o>++c;)u=a[c],null!=u&&(We(u,n,e),t.charge+=u.charge,r+=u.charge*u.cx,i+=u.charge*u.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var l=n*e[t.point.index];t.charge+=t.pointCharge=l,r+=l*t.point.x,i+=l*t.point.y}t.cx=r/t.charge,t.cy=i/t.charge}function Qe(){return 20}function tr(){return 1}function nr(t){return t.x}function er(t){return t.y}function rr(t,n,e){t.y0=n,t.y=e}function ir(t){return d3.range(t.length)}function ur(t){for(var n=-1,e=t[0].length,r=[];e>++n;)r[n]=0;return r}function ar(t){for(var n,e=1,r=0,i=t[0][1],u=t.length;u>e;++e)(n=t[e][1])>i&&(r=e,i=n);return r}function or(t){return t.reduce(cr,0)}function cr(t,n){return t+n[1]}function lr(t,n){return sr(t,Math.ceil(Math.log(n.length)/Math.LN2+1))}function sr(t,n){for(var e=-1,r=+t[0],i=(t[1]-r)/n,u=[];n>=++e;)u[e]=i*e+r;return u}function fr(t){return[d3.min(t),d3.max(t)]}function hr(t,n){return d3.rebind(t,n,"sort","children","value"),t.nodes=t,t.links=mr,t}function dr(t){return t.children}function gr(t){return t.value}function pr(t,n){return n.value-t.value}function mr(t){return d3.merge(t.map(function(t){return(t.children||[]).map(function(n){return{source:t,target:n}})}))}function vr(t,n){return t.value-n.value}function yr(t,n){var e=t._pack_next;t._pack_next=n,n._pack_prev=t,n._pack_next=e,e._pack_prev=n}function Mr(t,n){t._pack_next=n,n._pack_prev=t}function br(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return i*i-e*e-r*r>.001}function xr(t){function n(t){s=Math.min(t.x-t.r,s),f=Math.max(t.x+t.r,f),h=Math.min(t.y-t.r,h),d=Math.max(t.y+t.r,d)}if((e=t.children)&&(l=e.length)){var e,r,i,u,a,o,c,l,s=1/0,f=-1/0,h=1/0,d=-1/0;if(e.forEach(_r),r=e[0],r.x=-r.r,r.y=0,n(r),l>1&&(i=e[1],i.x=i.r,i.y=0,n(i),l>2))for(u=e[2],kr(r,i,u),n(u),yr(r,u),r._pack_prev=u,yr(u,i),i=r._pack_next,a=3;l>a;a++){kr(r,i,u=e[a]);var g=0,p=1,m=1;for(o=i._pack_next;o!==i;o=o._pack_next,p++)if(br(o,u)){g=1;break}if(1==g)for(c=r._pack_prev;c!==o._pack_prev&&!br(c,u);c=c._pack_prev,m++);g?(m>p||p==m&&i.r<r.r?Mr(r,i=o):Mr(r=c,i),a--):(yr(r,u),i=u,n(u))}var v=(s+f)/2,y=(h+d)/2,M=0;for(a=0;l>a;a++)u=e[a],u.x-=v,u.y-=y,M=Math.max(M,u.r+Math.sqrt(u.x*u.x+u.y*u.y));t.r=M,e.forEach(wr)}}function _r(t){t._pack_next=t._pack_prev=t}function wr(t){delete t._pack_next,delete t._pack_prev}function Sr(t,n,e,r){var i=t.children;if(t.x=n+=r*t.x,t.y=e+=r*t.y,t.r*=r,i)for(var u=-1,a=i.length;a>++u;)Sr(i[u],n,e,r)}function kr(t,n,e){var r=t.r+e.r,i=n.x-t.x,u=n.y-t.y;if(r&&(i||u)){var a=n.r+e.r,o=i*i+u*u;a*=a,r*=r;var c=.5+(r-a)/(2*o),l=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=t.x+c*i+l*u,e.y=t.y+c*u-l*i}else e.x=t.x+r,e.y=t.y}function Er(t){return 1+d3.max(t,function(t){return t.y})}function Ar(t){return t.reduce(function(t,n){return t+n.x},0)/t.length}function Nr(t){var n=t.children;return n&&n.length?Nr(n[0]):t}function Tr(t){var n,e=t.children;return e&&(n=e.length)?Tr(e[n-1]):t}function qr(t,n){return t.parent==n.parent?1:2}function Cr(t){var n=t.children;return n&&n.length?n[0]:t._tree.thread}function zr(t){var n,e=t.children;return e&&(n=e.length)?e[n-1]:t._tree.thread}function Dr(t,n){var e=t.children;if(e&&(i=e.length))for(var r,i,u=-1;i>++u;)n(r=Dr(e[u],n),t)>0&&(t=r);return t}function Lr(t,n){return t.x-n.x}function Fr(t,n){return n.x-t.x}function Hr(t,n){return t.depth-n.depth}function Rr(t,n){function e(t,r){var i=t.children;if(i&&(a=i.length))for(var u,a,o=null,c=-1;a>++c;)u=i[c],e(u,o),o=u;n(t,r)}e(t,null)}function Pr(t){for(var n,e=0,r=0,i=t.children,u=i.length;--u>=0;)n=i[u]._tree,n.prelim+=e,n.mod+=e,e+=n.shift+(r+=n.change)}function jr(t,n,e){t=t._tree,n=n._tree;var r=e/(n.number-t.number);t.change+=r,n.change-=r,n.shift+=e,n.prelim+=e,n.mod+=e}function Or(t,n,e){return t._tree.ancestor.parent==n.parent?t._tree.ancestor:e}function Yr(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Ur(t,n){var e=t.x+n[3],r=t.y+n[0],i=t.dx-n[1]-n[3],u=t.dy-n[0]-n[2];return 0>i&&(e+=i/2,i=0),0>u&&(r+=u/2,u=0),{x:e,y:r,dx:i,dy:u}}function Ir(t,n){function e(t,e){return d3.xhr(t,n,e).response(r)}function r(t){return e.parse(t.responseText)}function i(n){return n.map(u).join(t)}function u(t){return a.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var a=RegExp('["'+t+"\n]"),o=t.charCodeAt(0);return e.parse=function(t){var n;return e.parseRows(t,function(t){return n?n(t):(n=Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}"),void 0)})},e.parseRows=function(t,n){function e(){if(s>=l)return a;if(i)return i=!1,u;var n=s;if(34===t.charCodeAt(n)){for(var e=n;l>e++;)if(34===t.charCodeAt(e)){if(34!==t.charCodeAt(e+1))break;++e}s=e+2;var r=t.charCodeAt(e+1);return 13===r?(i=!0,10===t.charCodeAt(e+2)&&++s):10===r&&(i=!0),t.substring(n+1,e).replace(/""/g,'"')}for(;l>s;){var r=t.charCodeAt(s++),c=1;if(10===r)i=!0;else if(13===r)i=!0,10===t.charCodeAt(s)&&(++s,++c);else if(r!==o)continue;return t.substring(n,s-c)}return t.substring(n)}for(var r,i,u={},a={},c=[],l=t.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==u&&r!==a;)h.push(r),r=e();(!n||(h=n(h,f++)))&&c.push(h)}return c},e.format=function(t){return t.map(i).join("\n")},e}function Vr(t,n){no.hasOwnProperty(t.type)&&no[t.type](t,n)}function Xr(t,n,e){var r,i=-1,u=t.length-e;for(n.lineStart();u>++i;)r=t[i],n.point(r[0],r[1]);n.lineEnd()}function Zr(t,n){var e=-1,r=t.length;for(n.polygonStart();r>++e;)Xr(t[e],n,1);n.polygonEnd()}function Br(t){return[Math.atan2(t[1],t[0]),Math.asin(Math.max(-1,Math.min(1,t[2])))]}function $r(t,n){return Pu>Math.abs(t[0]-n[0])&&Pu>Math.abs(t[1]-n[1])}function Jr(t){var n=t[0],e=t[1],r=Math.cos(e);return[r*Math.cos(n),r*Math.sin(n),Math.sin(e)]}function Gr(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Kr(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Wr(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Qr(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function ti(t){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function ni(t){function n(n){function r(e,r){e=t(e,r),n.point(e[0],e[1])}function u(){s=0/0,p.point=a,n.lineStart()}function a(r,u){var a=Jr([r,u]),o=t(r,u);e(s,f,l,h,d,g,s=o[0],f=o[1],l=r,h=a[0],d=a[1],g=a[2],i,n),n.point(s,f)}function o(){p.point=r,n.lineEnd()}function c(){var t,r,c,m,v,y,M;u(),p.point=function(n,e){a(t=n,r=e),c=s,m=f,v=h,y=d,M=g,p.point=a},p.lineEnd=function(){e(s,f,l,h,d,g,c,m,t,v,y,M,i,n),p.lineEnd=o,o()}}var l,s,f,h,d,g,p={point:r,lineStart:u,lineEnd:o,polygonStart:function(){n.polygonStart(),p.lineStart=c},polygonEnd:function(){n.polygonEnd(),p.lineStart=u}};return p}function e(n,i,u,a,o,c,l,s,f,h,d,g,p,m){var v=l-n,y=s-i,M=v*v+y*y;if(M>4*r&&p--){var b=a+h,x=o+d,_=c+g,w=Math.sqrt(b*b+x*x+_*_),S=Math.asin(_/=w),k=Pu>Math.abs(Math.abs(_)-1)?(u+f)/2:Math.atan2(x,b),E=t(k,S),A=E[0],N=E[1],T=A-n,q=N-i,C=y*T-v*q;(C*C/M>r||Math.abs((v*T+y*q)/M-.5)>.3)&&(e(n,i,u,a,o,c,A,N,k,b/=w,x/=w,_,p,m),m.point(A,N),e(A,N,k,b,x,_,l,s,f,h,d,g,p,m))}}var r=.5,i=16;return n.precision=function(t){return arguments.length?(i=(r=t*t)>0&&16,n):Math.sqrt(r)},n}function ei(t,n){function e(t,n){var e=Math.sqrt(u-2*i*Math.sin(n))/i;return[e*Math.sin(t*=i),a-e*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(n))/2,u=1+r*(2*i-r),a=Math.sqrt(u)/i;return e.invert=function(t,n){var e=a-n;return[Math.atan2(t,e)/i,Math.asin((u-(t*t+e*e)*i*i)/(2*i))]},e}function ri(t){function n(t,n){r>t&&(r=t),t>u&&(u=t),i>n&&(i=n),n>a&&(a=n)}function e(){o.point=o.lineEnd=Pn}var r,i,u,a,o={point:n,lineStart:Pn,lineEnd:Pn,polygonStart:function(){o.lineEnd=e},polygonEnd:function(){o.point=n}};return function(n){return a=u=-(r=i=1/0),d3.geo.stream(n,t(o)),[[r,i],[u,a]]}}function ii(t,n){if(!io){++uo,t*=ju;var e=Math.cos(n*=ju);ao+=(e*Math.cos(t)-ao)/uo,oo+=(e*Math.sin(t)-oo)/uo,co+=(Math.sin(n)-co)/uo}}function ui(){var t,n;io=1,ai(),io=2;var e=lo.point;lo.point=function(r,i){e(t=r,n=i)},lo.lineEnd=function(){lo.point(t,n),oi(),lo.lineEnd=oi}}function ai(){function t(t,i){t*=ju;var u=Math.cos(i*=ju),a=u*Math.cos(t),o=u*Math.sin(t),c=Math.sin(i),l=Math.atan2(Math.sqrt((l=e*c-r*o)*l+(l=r*a-n*c)*l+(l=n*o-e*a)*l),n*a+e*o+r*c);uo+=l,ao+=l*(n+(n=a)),oo+=l*(e+(e=o)),co+=l*(r+(r=c))}var n,e,r;io>1||(1>io&&(io=1,uo=ao=oo=co=0),lo.point=function(i,u){i*=ju;var a=Math.cos(u*=ju);n=a*Math.cos(i),e=a*Math.sin(i),r=Math.sin(u),lo.point=t})}function oi(){lo.point=ii}function ci(t,n){var e=Math.cos(t),r=Math.sin(t);return function(i,u,a,o){null!=i?(i=li(e,i),u=li(e,u),(a>0?u>i:i>u)&&(i+=2*a*Ru)):(i=t+2*a*Ru,u=t);for(var c,l=a*n,s=i;a>0?s>u:u>s;s-=l)o.point((c=Br([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function li(t,n){var e=Jr(n);e[0]-=t,ti(e);var r=Math.acos(Math.max(-1,Math.min(1,-e[1])));return((0>-e[2]?-r:r)+2*Math.PI-Pu)%(2*Math.PI)}function si(t,n,e){return function(r){function i(n,e){t(n,e)&&r.point(n,e)}function u(t,n){m.point(t,n)}function a(){v.point=u,m.lineStart()}function o(){v.point=i,m.lineEnd()}function c(t,n){M.point(t,n),p.push([t,n])}function l(){M.lineStart(),p=[]}function s(){c(p[0][0],p[0][1]),M.lineEnd();var t,n=M.clean(),e=y.buffer(),i=e.length;if(!i)return g=!0,d+=mi(p,-1),p=null,void 0;if(p=null,1&n){t=e[0],h+=mi(t,1);var u,i=t.length-1,a=-1;for(r.lineStart();i>++a;)r.point((u=t[a])[0],u[1]);return r.lineEnd(),void 0}i>1&&2&n&&e.push(e.pop().concat(e.shift())),f.push(e.filter(gi))}var f,h,d,g,p,m=n(r),v={point:i,lineStart:a,lineEnd:o,polygonStart:function(){v.point=c,v.lineStart=l,v.lineEnd=s,g=!1,d=h=0,f=[],r.polygonStart()
+},polygonEnd:function(){v.point=i,v.lineStart=a,v.lineEnd=o,f=d3.merge(f),f.length?fi(f,e,r):(-Pu>h||g&&-Pu>d)&&(r.lineStart(),e(null,null,1,r),r.lineEnd()),r.polygonEnd(),f=null},sphere:function(){r.polygonStart(),r.lineStart(),e(null,null,1,r),r.lineEnd(),r.polygonEnd()}},y=pi(),M=n(y);return v}}function fi(t,n,e){var r=[],i=[];if(t.forEach(function(t){var n=t.length;if(!(1>=n)){var e=t[0],u=t[n-1],a={point:e,points:t,other:null,visited:!1,entry:!0,subject:!0},o={point:e,points:[e],other:a,visited:!1,entry:!1,subject:!1};a.other=o,r.push(a),i.push(o),a={point:u,points:[u],other:null,visited:!1,entry:!1,subject:!0},o={point:u,points:[u],other:a,visited:!1,entry:!0,subject:!1},a.other=o,r.push(a),i.push(o)}}),i.sort(di),hi(r),hi(i),r.length)for(var u,a,o,c=r[0];;){for(u=c;u.visited;)if((u=u.next)===c)return;a=u.points,e.lineStart();do{if(u.visited=u.other.visited=!0,u.entry){if(u.subject)for(var l=0;a.length>l;l++)e.point((o=a[l])[0],o[1]);else n(u.point,u.next.point,1,e);u=u.next}else{if(u.subject){a=u.prev.points;for(var l=a.length;--l>=0;)e.point((o=a[l])[0],o[1])}else n(u.point,u.prev.point,-1,e);u=u.prev}u=u.other,a=u.points}while(!u.visited);e.lineEnd()}}function hi(t){if(n=t.length){for(var n,e,r=0,i=t[0];n>++r;)i.next=e=t[r],e.prev=i,i=e;i.next=e=t[0],e.prev=i}}function di(t,n){return(0>(t=t.point)[0]?t[1]-Ru/2-Pu:Ru/2-t[1])-(0>(n=n.point)[0]?n[1]-Ru/2-Pu:Ru/2-n[1])}function gi(t){return t.length>1}function pi(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:Pn,buffer:function(){var e=n;return n=[],t=null,e}}}function mi(t,n){if(!(e=t.length))return 0;for(var e,r,i,u=0,a=0,o=t[0],c=o[0],l=o[1],s=Math.cos(l),f=Math.atan2(n*Math.sin(c)*s,Math.sin(l)),h=1-n*Math.cos(c)*s,d=f;e>++u;)o=t[u],s=Math.cos(l=o[1]),r=Math.atan2(n*Math.sin(c=o[0])*s,Math.sin(l)),i=1-n*Math.cos(c)*s,Pu>Math.abs(h-2)&&Pu>Math.abs(i-2)||(Pu>Math.abs(i)||Pu>Math.abs(h)||(Pu>Math.abs(Math.abs(r-f)-Ru)?i+h>2&&(a+=4*(r-f)):a+=Pu>Math.abs(h-2)?4*(r-d):((3*Ru+r-f)%(2*Ru)-Ru)*(h+i)),d=f,f=r,h=i);return a}function vi(t){var n,e=0/0,r=0/0,i=0/0;return{lineStart:function(){t.lineStart(),n=1},point:function(u,a){var o=u>0?Ru:-Ru,c=Math.abs(u-e);Pu>Math.abs(c-Ru)?(t.point(e,r=(r+a)/2>0?Ru/2:-Ru/2),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(o,r),t.point(u,r),n=0):i!==o&&c>=Ru&&(Pu>Math.abs(e-i)&&(e-=i*Pu),Pu>Math.abs(u-o)&&(u-=o*Pu),r=yi(e,r,u,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(o,r),n=0),t.point(e=u,r=a),i=o},lineEnd:function(){t.lineEnd(),e=r=0/0},clean:function(){return 2-n}}}function yi(t,n,e,r){var i,u,a=Math.sin(t-e);return Math.abs(a)>Pu?Math.atan((Math.sin(n)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(n))*Math.sin(t))/(i*u*a)):(n+r)/2}function Mi(t,n,e,r){var i;if(null==t)i=e*Ru/2,r.point(-Ru,i),r.point(0,i),r.point(Ru,i),r.point(Ru,0),r.point(Ru,-i),r.point(0,-i),r.point(-Ru,-i),r.point(-Ru,0),r.point(-Ru,i);else if(Math.abs(t[0]-n[0])>Pu){var u=(t[0]<n[0]?1:-1)*Ru;i=e*u/2,r.point(-u,i),r.point(0,i),r.point(u,i)}else r.point(n[0],n[1])}function bi(t){function n(t,n){return Math.cos(t)*Math.cos(n)>u}function e(t){var e,i,u,a;return{lineStart:function(){u=i=!1,a=1},point:function(o,c){var l,s=[o,c],f=n(o,c);!e&&(u=i=f)&&t.lineStart(),f!==i&&(l=r(e,s),($r(e,l)||$r(s,l))&&(s[0]+=Pu,s[1]+=Pu,f=n(s[0],s[1]))),f!==i&&(a=0,(i=f)?(t.lineStart(),l=r(s,e),t.point(l[0],l[1])):(l=r(e,s),t.point(l[0],l[1]),t.lineEnd()),e=l),!f||e&&$r(e,s)||t.point(s[0],s[1]),e=s},lineEnd:function(){i&&t.lineEnd(),e=null},clean:function(){return a|(u&&i)<<1}}}function r(t,n){var e=Jr(t,0),r=Jr(n,0),i=[1,0,0],a=Kr(e,r),o=Gr(a,a),c=a[0],l=o-c*c;if(!l)return t;var s=u*o/l,f=-u*c/l,h=Kr(i,a),d=Qr(i,s),g=Qr(a,f);Wr(d,g);var p=h,m=Gr(d,p),v=Gr(p,p),y=Math.sqrt(m*m-v*(Gr(d,d)-1)),M=Qr(p,(-m-y)/v);return Wr(M,d),Br(M)}var i=t*ju,u=Math.cos(i),a=ci(i,6*ju);return si(n,e,a)}function xi(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return e=n.invert(e,r),e&&t.invert(e[0],e[1])}),e}function _i(t,n){return[t,n]}function wi(t,n,e){var r=d3.range(t,n-Pu,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function Si(t,n,e){var r=d3.range(t,n-Pu,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function ki(t,n,e,r){function i(t){var n=Math.sin(t*=d)*g,e=Math.sin(d-t)*g,r=e*l+n*f,i=e*s+n*h,u=e*a+n*c;return[Math.atan2(i,r)/ju,Math.atan2(u,Math.sqrt(r*r+i*i))/ju]}var u=Math.cos(n),a=Math.sin(n),o=Math.cos(r),c=Math.sin(r),l=u*Math.cos(t),s=u*Math.sin(t),f=o*Math.cos(e),h=o*Math.sin(e),d=Math.acos(Math.max(-1,Math.min(1,a*c+u*o*Math.cos(e-t)))),g=1/Math.sin(d);return i.distance=d,i}function Ei(t,n){return[t/(2*Ru),Math.max(-.5,Math.min(.5,Math.log(Math.tan(Ru/4+n/2))/(2*Ru)))]}function Ai(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Ni(t){var n=ni(function(n,e){return t([n*Ou,e*Ou])});return function(t){return t=n(t),{point:function(n,e){t.point(n*ju,e*ju)},sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}}function Ti(){function t(t,n){a.push("M",t,",",n,u)}function n(t,n){a.push("M",t,",",n),o.point=e}function e(t,n){a.push("L",t,",",n)}function r(){o.point=t}function i(){a.push("Z")}var u=Ai(4.5),a=[],o={point:t,lineStart:function(){o.point=n},lineEnd:r,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=r,o.point=t},pointRadius:function(t){return u=Ai(t),o},result:function(){if(a.length){var t=a.join("");return a=[],t}}};return o}function qi(t){function n(n,e){t.moveTo(n,e),t.arc(n,e,a,0,2*Ru)}function e(n,e){t.moveTo(n,e),o.point=r}function r(n,e){t.lineTo(n,e)}function i(){o.point=n}function u(){t.closePath()}var a=4.5,o={point:n,lineStart:function(){o.point=e},lineEnd:i,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=i,o.point=n},pointRadius:function(t){return a=t,o},result:Pn};return o}function Ci(){function t(t,n){po+=i*t-r*n,r=t,i=n}var n,e,r,i;mo.point=function(u,a){mo.point=t,n=r=u,e=i=a},mo.lineEnd=function(){t(n,e)}}function zi(t,n){io||(ao+=t,oo+=n,++co)}function Di(){function t(t,r){var i=t-n,u=r-e,a=Math.sqrt(i*i+u*u);ao+=a*(n+t)/2,oo+=a*(e+r)/2,co+=a,n=t,e=r}var n,e;if(1!==io){if(!(1>io))return;io=1,ao=oo=co=0}vo.point=function(r,i){vo.point=t,n=r,e=i}}function Li(){vo.point=zi}function Fi(){function t(t,n){var e=i*t-r*n;ao+=e*(r+t),oo+=e*(i+n),co+=3*e,r=t,i=n}var n,e,r,i;2>io&&(io=2,ao=oo=co=0),vo.point=function(u,a){vo.point=t,n=r=u,e=i=a},vo.lineEnd=function(){t(n,e)}}function Hi(){function t(t,n){if(t*=ju,n*=ju,!(Pu>Math.abs(Math.abs(u)-Ru/2)&&Pu>Math.abs(Math.abs(n)-Ru/2))){var e=Math.cos(n),c=Math.sin(n);if(Pu>Math.abs(u-Ru/2))Mo+=2*(t-r);else{var l=t-i,s=Math.cos(l),f=Math.atan2(Math.sqrt((f=e*Math.sin(l))*f+(f=a*c-o*e*s)*f),o*c+a*e*s),h=(f+Ru+u+n)/4;Mo+=(0>l&&l>-Ru||l>Ru?-4:4)*Math.atan(Math.sqrt(Math.abs(Math.tan(h)*Math.tan(h-f/2)*Math.tan(h-Ru/4-u/2)*Math.tan(h-Ru/4-n/2))))}r=i,i=t,u=n,a=e,o=c}}var n,e,r,i,u,a,o;bo.point=function(c,l){bo.point=t,r=i=(n=c)*ju,u=(e=l)*ju,a=Math.cos(u),o=Math.sin(u)},bo.lineEnd=function(){t(n,e)}}function Ri(t){return Pi(function(){return t})()}function Pi(t){function n(t){return t=a(t[0]*ju,t[1]*ju),[t[0]*s+o,c-t[1]*s]}function e(t){return t=a.invert((t[0]-o)/s,(c-t[1])/s),t&&[t[0]*Ou,t[1]*Ou]}function r(){a=xi(u=Oi(p,m,v),i);var t=i(d,g);return o=f-t[0]*s,c=h+t[1]*s,n}var i,u,a,o,c,l=ni(function(t,n){return t=i(t,n),[t[0]*s+o,c-t[1]*s]}),s=150,f=480,h=250,d=0,g=0,p=0,m=0,v=0,y=so,M=null;return n.stream=function(t){return ji(u,y(l(t)))},n.clipAngle=function(t){return arguments.length?(y=null==t?(M=t,so):bi(M=+t),n):M},n.scale=function(t){return arguments.length?(s=+t,r()):s},n.translate=function(t){return arguments.length?(f=+t[0],h=+t[1],r()):[f,h]},n.center=function(t){return arguments.length?(d=t[0]%360*ju,g=t[1]%360*ju,r()):[d*Ou,g*Ou]},n.rotate=function(t){return arguments.length?(p=t[0]%360*ju,m=t[1]%360*ju,v=t.length>2?t[2]%360*ju:0,r()):[p*Ou,m*Ou,v*Ou]},d3.rebind(n,l,"precision"),function(){return i=t.apply(this,arguments),n.invert=i.invert&&e,r()}}function ji(t,n){return{point:function(e,r){r=t(e*ju,r*ju),e=r[0],n.point(e>Ru?e-2*Ru:-Ru>e?e+2*Ru:e,r[1])},sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function Oi(t,n,e){return t?n||e?xi(Ui(t),Ii(n,e)):Ui(t):n||e?Ii(n,e):_i}function Yi(t){return function(n,e){return n+=t,[n>Ru?n-2*Ru:-Ru>n?n+2*Ru:n,e]}}function Ui(t){var n=Yi(t);return n.invert=Yi(-t),n}function Ii(t,n){function e(t,n){var e=Math.cos(n),o=Math.cos(t)*e,c=Math.sin(t)*e,l=Math.sin(n),s=l*r+o*i;return[Math.atan2(c*u-s*a,o*r-l*i),Math.asin(Math.max(-1,Math.min(1,s*u+c*a)))]}var r=Math.cos(t),i=Math.sin(t),u=Math.cos(n),a=Math.sin(n);return e.invert=function(t,n){var e=Math.cos(n),o=Math.cos(t)*e,c=Math.sin(t)*e,l=Math.sin(n),s=l*u-c*a;return[Math.atan2(c*u+l*a,o*r+s*i),Math.asin(Math.max(-1,Math.min(1,s*r-o*i)))]},e}function Vi(t,n){function e(n,e){var r=Math.cos(n),i=Math.cos(e),u=t(r*i);return[u*i*Math.sin(n),u*Math.sin(e)]}return e.invert=function(t,e){var r=Math.sqrt(t*t+e*e),i=n(r),u=Math.sin(i),a=Math.cos(i);return[Math.atan2(t*u,r*a),Math.asin(r&&e*u/r)]},e}function Xi(t,n,e,r){var i,u,a,o,c,l,s;return i=r[t],u=i[0],a=i[1],i=r[n],o=i[0],c=i[1],i=r[e],l=i[0],s=i[1],(s-a)*(o-u)-(c-a)*(l-u)>0}function Zi(t,n,e){return(e[0]-n[0])*(t[1]-n[1])<(e[1]-n[1])*(t[0]-n[0])}function Bi(t,n,e,r){var i=t[0],u=e[0],a=n[0]-i,o=r[0]-u,c=t[1],l=e[1],s=n[1]-c,f=r[1]-l,h=(o*(c-l)-f*(i-u))/(f*a-o*s);return[i+h*a,c+h*s]}function $i(t,n){var e={list:t.map(function(t,n){return{index:n,x:t[0],y:t[1]}}).sort(function(t,n){return t.y<n.y?-1:t.y>n.y?1:t.x<n.x?-1:t.x>n.x?1:0}),bottomSite:null},r={list:[],leftEnd:null,rightEnd:null,init:function(){r.leftEnd=r.createHalfEdge(null,"l"),r.rightEnd=r.createHalfEdge(null,"l"),r.leftEnd.r=r.rightEnd,r.rightEnd.l=r.leftEnd,r.list.unshift(r.leftEnd,r.rightEnd)},createHalfEdge:function(t,n){return{edge:t,side:n,vertex:null,l:null,r:null}},insert:function(t,n){n.l=t,n.r=t.r,t.r.l=n,t.r=n},leftBound:function(t){var n=r.leftEnd;do n=n.r;while(n!=r.rightEnd&&i.rightOf(n,t));return n=n.l},del:function(t){t.l.r=t.r,t.r.l=t.l,t.edge=null},right:function(t){return t.r},left:function(t){return t.l},leftRegion:function(t){return null==t.edge?e.bottomSite:t.edge.region[t.side]},rightRegion:function(t){return null==t.edge?e.bottomSite:t.edge.region[_o[t.side]]}},i={bisect:function(t,n){var e={region:{l:t,r:n},ep:{l:null,r:null}},r=n.x-t.x,i=n.y-t.y,u=r>0?r:-r,a=i>0?i:-i;return e.c=t.x*r+t.y*i+.5*(r*r+i*i),u>a?(e.a=1,e.b=i/r,e.c/=r):(e.b=1,e.a=r/i,e.c/=i),e},intersect:function(t,n){var e=t.edge,r=n.edge;if(!e||!r||e.region.r==r.region.r)return null;var i=e.a*r.b-e.b*r.a;if(1e-10>Math.abs(i))return null;var u,a,o=(e.c*r.b-r.c*e.b)/i,c=(r.c*e.a-e.c*r.a)/i,l=e.region.r,s=r.region.r;l.y<s.y||l.y==s.y&&l.x<s.x?(u=t,a=e):(u=n,a=r);var f=o>=a.region.r.x;return f&&"l"===u.side||!f&&"r"===u.side?null:{x:o,y:c}},rightOf:function(t,n){var e=t.edge,r=e.region.r,i=n.x>r.x;if(i&&"l"===t.side)return 1;if(!i&&"r"===t.side)return 0;if(1===e.a){var u=n.y-r.y,a=n.x-r.x,o=0,c=0;if(!i&&0>e.b||i&&e.b>=0?c=o=u>=e.b*a:(c=n.x+n.y*e.b>e.c,0>e.b&&(c=!c),c||(o=1)),!o){var l=r.x-e.region.l.x;c=e.b*(a*a-u*u)<l*u*(1+2*a/l+e.b*e.b),0>e.b&&(c=!c)}}else{var s=e.c-e.a*n.x,f=n.y-s,h=n.x-r.x,d=s-r.y;c=f*f>h*h+d*d}return"l"===t.side?c:!c},endPoint:function(t,e,r){t.ep[e]=r,t.ep[_o[e]]&&n(t)},distance:function(t,n){var e=t.x-n.x,r=t.y-n.y;return Math.sqrt(e*e+r*r)}},u={list:[],insert:function(t,n,e){t.vertex=n,t.ystar=n.y+e;for(var r=0,i=u.list,a=i.length;a>r;r++){var o=i[r];if(!(t.ystar>o.ystar||t.ystar==o.ystar&&n.x>o.vertex.x))break}i.splice(r,0,t)},del:function(t){for(var n=0,e=u.list,r=e.length;r>n&&e[n]!=t;++n);e.splice(n,1)},empty:function(){return 0===u.list.length},nextEvent:function(t){for(var n=0,e=u.list,r=e.length;r>n;++n)if(e[n]==t)return e[n+1];return null},min:function(){var t=u.list[0];return{x:t.vertex.x,y:t.ystar}},extractMin:function(){return u.list.shift()}};r.init(),e.bottomSite=e.list.shift();for(var a,o,c,l,s,f,h,d,g,p,m,v,y,M=e.list.shift();;)if(u.empty()||(a=u.min()),M&&(u.empty()||M.y<a.y||M.y==a.y&&M.x<a.x))o=r.leftBound(M),c=r.right(o),h=r.rightRegion(o),v=i.bisect(h,M),f=r.createHalfEdge(v,"l"),r.insert(o,f),p=i.intersect(o,f),p&&(u.del(o),u.insert(o,p,i.distance(p,M))),o=f,f=r.createHalfEdge(v,"r"),r.insert(o,f),p=i.intersect(f,c),p&&u.insert(f,p,i.distance(p,M)),M=e.list.shift();else{if(u.empty())break;o=u.extractMin(),l=r.left(o),c=r.right(o),s=r.right(c),h=r.leftRegion(o),d=r.rightRegion(c),m=o.vertex,i.endPoint(o.edge,o.side,m),i.endPoint(c.edge,c.side,m),r.del(o),u.del(c),r.del(c),y="l",h.y>d.y&&(g=h,h=d,d=g,y="r"),v=i.bisect(h,d),f=r.createHalfEdge(v,y),r.insert(l,f),i.endPoint(v,_o[y],m),p=i.intersect(l,f),p&&(u.del(l),u.insert(l,p,i.distance(p,h))),p=i.intersect(f,s),p&&u.insert(f,p,i.distance(p,h))}for(o=r.right(r.leftEnd);o!=r.rightEnd;o=r.right(o))n(o.edge)}function Ji(){return{leaf:!0,nodes:[],point:null}}function Gi(t,n,e,r,i,u){if(!t(n,e,r,i,u)){var a=.5*(e+i),o=.5*(r+u),c=n.nodes;c[0]&&Gi(t,c[0],e,r,a,o),c[1]&&Gi(t,c[1],a,r,i,o),c[2]&&Gi(t,c[2],e,o,a,u),c[3]&&Gi(t,c[3],a,o,i,u)}}function Ki(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Wi(t,n,e,r){for(var i,u,a=0,o=n.length,c=e.length;o>a;){if(r>=c)return-1;if(i=n.charCodeAt(a++),37===i){if(u=Yo[n.charAt(a++)],!u||0>(r=u(t,e,r)))return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function Qi(t){return RegExp("^(?:"+t.map(d3.requote).join("|")+")","i")}function tu(t){for(var n=new u,e=-1,r=t.length;r>++e;)n.set(t[e].toLowerCase(),e);return n}function nu(t,n,e){t+="";var r=t.length;return e>r?Array(e-r+1).join(n)+t:t}function eu(t,n,e){Lo.lastIndex=0;var r=Lo.exec(n.substring(e));return r?e+=r[0].length:-1}function ru(t,n,e){Do.lastIndex=0;var r=Do.exec(n.substring(e));return r?e+=r[0].length:-1}function iu(t,n,e){Ro.lastIndex=0;var r=Ro.exec(n.substring(e));return r?(t.m=Po.get(r[0].toLowerCase()),e+=r[0].length):-1}function uu(t,n,e){Fo.lastIndex=0;var r=Fo.exec(n.substring(e));return r?(t.m=Ho.get(r[0].toLowerCase()),e+=r[0].length):-1}function au(t,n,e){return Wi(t,""+Oo.c,n,e)}function ou(t,n,e){return Wi(t,""+Oo.x,n,e)}function cu(t,n,e){return Wi(t,""+Oo.X,n,e)}function lu(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+4));return r?(t.y=+r[0],e+=r[0].length):-1}function su(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+2));return r?(t.y=fu(+r[0]),e+=r[0].length):-1}function fu(t){return t+(t>68?1900:2e3)}function hu(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+2));return r?(t.m=r[0]-1,e+=r[0].length):-1}function du(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+2));return r?(t.d=+r[0],e+=r[0].length):-1}function gu(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+2));return r?(t.H=+r[0],e+=r[0].length):-1}function pu(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+2));return r?(t.M=+r[0],e+=r[0].length):-1}function mu(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+2));return r?(t.S=+r[0],e+=r[0].length):-1}function vu(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+3));return r?(t.L=+r[0],e+=r[0].length):-1}function yu(t,n,e){var r=Io.get(n.substring(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)}function Mu(t){var n=t.getTimezoneOffset(),e=n>0?"-":"+",r=~~(Math.abs(n)/60),i=Math.abs(n)%60;return e+nu(r,"0",2)+nu(i,"0",2)}function bu(t){return t.toISOString()}function xu(t,n,e){function r(n){var e=t(n),r=u(e,1);return r-n>n-e?e:r}function i(e){return n(e=t(new wo(e-1)),1),e}function u(t,e){return n(t=new wo(+t),e),t}function a(t,r,u){var a=i(t),o=[];if(u>1)for(;r>a;)e(a)%u||o.push(new Date(+a)),n(a,1);else for(;r>a;)o.push(new Date(+a)),n(a,1);return o}function o(t,n,e){try{wo=Ki;var r=new Ki;return r._=t,a(r,n,e)}finally{wo=Date}}t.floor=t,t.round=r,t.ceil=i,t.offset=u,t.range=a;var c=t.utc=_u(t);return c.floor=c,c.round=_u(r),c.ceil=_u(i),c.offset=_u(u),c.range=o,t}function _u(t){return function(n,e){try{wo=Ki;var r=new Ki;return r._=n,t(r,e)._}finally{wo=Date}}}function wu(t,n,e){function r(n){return t(n)}return r.invert=function(n){return ku(t.invert(n))},r.domain=function(n){return arguments.length?(t.domain(n),r):t.domain().map(ku)},r.nice=function(t){return r.domain(Yn(r.domain(),function(){return t}))},r.ticks=function(e,i){var u=Su(r.domain());if("function"!=typeof e){var a=u[1]-u[0],o=a/e,c=d3.bisect(Xo,o);if(c==Xo.length)return n.year(u,e);if(!c)return t.ticks(e).map(ku);Math.log(o/Xo[c-1])<Math.log(Xo[c]/o)&&--c,e=n[c],i=e[1],e=e[0].range}return e(u[0],new Date(+u[1]+1),i)},r.tickFormat=function(){return e},r.copy=function(){return wu(t.copy(),n,e)},d3.rebind(r,t,"range","rangeRound","interpolate","clamp")}function Su(t){var n=t[0],e=t[t.length-1];return e>n?[n,e]:[e,n]}function ku(t){return new Date(t)}function Eu(t){return function(n){for(var e=t.length-1,r=t[e];!r[1](n);)r=t[--e];return r[0](n)}}function Au(t){var n=new Date(t,0,1);return n.setFullYear(t),n}function Nu(t){var n=t.getFullYear(),e=Au(n),r=Au(n+1);return n+(t-e)/(r-e)}function Tu(t){var n=new Date(Date.UTC(t,0,1));return n.setUTCFullYear(t),n}function qu(t){var n=t.getUTCFullYear(),e=Tu(n),r=Tu(n+1);return n+(t-e)/(r-e)}var Cu=".",zu=",",Du=[3,3];Date.now||(Date.now=function(){return+new Date});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(Lu){var Fu=CSSStyleDeclaration.prototype,Hu=Fu.setProperty;Fu.setProperty=function(t,n,e){Hu.call(this,t,n+"",e)}}d3={version:"3.0.3"};var Ru=Math.PI,Pu=1e-6,ju=Ru/180,Ou=180/Ru,Yu=i;try{Yu(document.documentElement.childNodes)[0].nodeType}catch(Uu){Yu=r}var Iu=[].__proto__?function(t,n){t.__proto__=n}:function(t,n){for(var e in n)t[e]=n[e]};d3.map=function(t){var n=new u;for(var e in t)n.set(e,t[e]);return n},e(u,{has:function(t){return Vu+t in this},get:function(t){return this[Vu+t]},set:function(t,n){return this[Vu+t]=n},remove:function(t){return t=Vu+t,t in this&&delete this[t]},keys:function(){var t=[];return this.forEach(function(n){t.push(n)}),t},values:function(){var t=[];return this.forEach(function(n,e){t.push(e)}),t},entries:function(){var t=[];return this.forEach(function(n,e){t.push({key:n,value:e})}),t},forEach:function(t){for(var n in this)n.charCodeAt(0)===Xu&&t.call(this,n.substring(1),this[n])}});var Vu="\0",Xu=Vu.charCodeAt(0);d3.functor=c,d3.rebind=function(t,n){for(var e,r=1,i=arguments.length;i>++r;)t[e=arguments[r]]=l(t,n,n[e]);return t},d3.ascending=function(t,n){return n>t?-1:t>n?1:t>=n?0:0/0},d3.descending=function(t,n){return t>n?-1:n>t?1:n>=t?0:0/0},d3.mean=function(t,n){var e,r=t.length,i=0,u=-1,a=0;if(1===arguments.length)for(;r>++u;)s(e=t[u])&&(i+=(e-i)/++a);else for(;r>++u;)s(e=n.call(t,t[u],u))&&(i+=(e-i)/++a);return a?i:void 0},d3.median=function(t,n){return arguments.length>1&&(t=t.map(n)),t=t.filter(s),t.length?d3.quantile(t.sort(d3.ascending),.5):void 0},d3.min=function(t,n){var e,r,i=-1,u=t.length;if(1===arguments.length){for(;u>++i&&(null==(e=t[i])||e!=e);)e=void 0;for(;u>++i;)null!=(r=t[i])&&e>r&&(e=r)}else{for(;u>++i&&(null==(e=n.call(t,t[i],i))||e!=e);)e=void 0;for(;u>++i;)null!=(r=n.call(t,t[i],i))&&e>r&&(e=r)}return e},d3.max=function(t,n){var e,r,i=-1,u=t.length;if(1===arguments.length){for(;u>++i&&(null==(e=t[i])||e!=e);)e=void 0;for(;u>++i;)null!=(r=t[i])&&r>e&&(e=r)}else{for(;u>++i&&(null==(e=n.call(t,t[i],i))||e!=e);)e=void 0;for(;u>++i;)null!=(r=n.call(t,t[i],i))&&r>e&&(e=r)}return e},d3.extent=function(t,n){var e,r,i,u=-1,a=t.length;if(1===arguments.length){for(;a>++u&&(null==(e=i=t[u])||e!=e);)e=i=void 0;for(;a>++u;)null!=(r=t[u])&&(e>r&&(e=r),r>i&&(i=r))}else{for(;a>++u&&(null==(e=i=n.call(t,t[u],u))||e!=e);)e=void 0;for(;a>++u;)null!=(r=n.call(t,t[u],u))&&(e>r&&(e=r),r>i&&(i=r))}return[e,i]},d3.random={normal:function(t,n){var e=arguments.length;return 2>e&&(n=1),1>e&&(t=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return t+n*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(t,n){var e=arguments.length;2>e&&(n=1),1>e&&(t=0);var r=d3.random.normal();return function(){return Math.exp(t+n*r())}},irwinHall:function(t){return function(){for(var n=0,e=0;t>e;e++)n+=Math.random();return n/t}}},d3.sum=function(t,n){var e,r=0,i=t.length,u=-1;if(1===arguments.length)for(;i>++u;)isNaN(e=+t[u])||(r+=e);else for(;i>++u;)isNaN(e=+n.call(t,t[u],u))||(r+=e);return r},d3.quantile=function(t,n){var e=(t.length-1)*n+1,r=Math.floor(e),i=+t[r-1],u=e-r;return u?i+u*(t[r]-i):i},d3.shuffle=function(t){for(var n,e,r=t.length;r;)e=0|Math.random()*r--,n=t[r],t[r]=t[e],t[e]=n;return t},d3.transpose=function(t){return d3.zip.apply(d3,t)},d3.zip=function(){if(!(r=arguments.length))return[];for(var t=-1,n=d3.min(arguments,f),e=Array(n);n>++t;)for(var r,i=-1,u=e[t]=Array(r);r>++i;)u[i]=arguments[i][t];return e},d3.bisector=function(t){return{left:function(n,e,r,i){for(3>arguments.length&&(r=0),4>arguments.length&&(i=n.length);i>r;){var u=r+i>>>1;e>t.call(n,n[u],u)?r=u+1:i=u}return r},right:function(n,e,r,i){for(3>arguments.length&&(r=0),4>arguments.length&&(i=n.length);i>r;){var u=r+i>>>1;t.call(n,n[u],u)>e?i=u:r=u+1}return r}}};var Zu=d3.bisector(function(t){return t});d3.bisectLeft=Zu.left,d3.bisect=d3.bisectRight=Zu.right,d3.nest=function(){function t(n,o){if(o>=a.length)return r?r.call(i,n):e?n.sort(e):n;for(var c,l,s,f=-1,h=n.length,d=a[o++],g=new u,p={};h>++f;)(s=g.get(c=d(l=n[f])))?s.push(l):g.set(c,[l]);return g.forEach(function(n,e){p[n]=t(e,o)}),p}function n(t,e){if(e>=a.length)return t;var r,i=[],u=o[e++];for(r in t)i.push({key:r,values:n(t[r],e)});return u&&i.sort(function(t,n){return u(t.key,n.key)}),i}var e,r,i={},a=[],o=[];return i.map=function(n){return t(n,0)},i.entries=function(e){return n(t(e,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return e=t,i},i.rollup=function(t){return r=t,i},i},d3.keys=function(t){var n=[];for(var e in t)n.push(e);return n},d3.values=function(t){var n=[];for(var e in t)n.push(t[e]);return n},d3.entries=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},d3.permute=function(t,n){for(var e=[],r=-1,i=n.length;i>++r;)e[r]=t[n[r]];return e},d3.merge=function(t){return Array.prototype.concat.apply([],t)},d3.range=function(t,n,e){if(3>arguments.length&&(e=1,2>arguments.length&&(n=t,t=0)),1/0===(n-t)/e)throw Error("infinite range");var r,i=[],u=d(Math.abs(e)),a=-1;if(t*=u,n*=u,e*=u,0>e)for(;(r=t+e*++a)>n;)i.push(r/u);else for(;n>(r=t+e*++a);)i.push(r/u);return i},d3.requote=function(t){return t.replace(Bu,"\\$&")};var Bu=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(t,n){return n?Math.round(t*(n=Math.pow(10,n)))/n:Math.round(t)},d3.xhr=function(t,n,e){function r(){var t=l.status;!t&&l.responseText||t>=200&&300>t||304===t?u.load.call(i,c.call(i,l)):u.error.call(i,l)}var i={},u=d3.dispatch("progress","load","error"),o={},c=a,l=new(window.XDomainRequest&&/^(http(s)?:)?\/\//.test(t)?XDomainRequest:XMLHttpRequest);return"onload"in l?l.onload=l.onerror=r:l.onreadystatechange=function(){l.readyState>3&&r()},l.onprogress=function(t){var n=d3.event;d3.event=t;try{u.progress.call(i,l)}finally{d3.event=n}},i.header=function(t,n){return t=(t+"").toLowerCase(),2>arguments.length?o[t]:(null==n?delete o[t]:o[t]=n+"",i)},i.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",i):n},i.response=function(t){return c=t,i},["get","post"].forEach(function(t){i[t]=function(){return i.send.apply(i,[t].concat(Yu(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,t,!0),null==n||"accept"in o||(o.accept=n+",*/*"),l.setRequestHeader)for(var a in o)l.setRequestHeader(a,o[a]);return null!=n&&l.overrideMimeType&&l.overrideMimeType(n),null!=u&&i.on("error",u).on("load",function(t){u(null,t)}),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},d3.rebind(i,u,"on"),2===arguments.length&&"function"==typeof n&&(e=n,n=null),null==e?i:i.get(g(e))},d3.text=function(){return d3.xhr.apply(d3,arguments).response(p)},d3.json=function(t,n){return d3.xhr(t,"application/json",n).response(m)},d3.html=function(t,n){return d3.xhr(t,"text/html",n).response(v)},d3.xml=function(){return d3.xhr.apply(d3,arguments).response(y)};var $u={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d3.ns={prefix:$u,qualify:function(t){var n=t.indexOf(":"),e=t;return n>=0&&(e=t.substring(0,n),t=t.substring(n+1)),$u.hasOwnProperty(e)?{space:$u[e],local:t}:t}},d3.dispatch=function(){for(var t=new M,n=-1,e=arguments.length;e>++n;)t[arguments[n]]=b(t);return t},M.prototype.on=function(t,n){var e=t.indexOf("."),r="";return e>0&&(r=t.substring(e+1),t=t.substring(0,e)),2>arguments.length?this[t].on(r):this[t].on(r,n)},d3.format=function(t){var n=Ju.exec(t),e=n[1]||" ",r=n[2]||">",i=n[3]||"",u=n[4]||"",a=n[5],o=+n[6],c=n[7],l=n[8],s=n[9],f=1,h="",d=!1;switch(l&&(l=+l.substring(1)),(a||"0"===e&&"="===r)&&(a=e="0",r="=",c&&(o-=Math.floor((o-1)/4))),s){case"n":c=!0,s="g";break;case"%":f=100,h="%",s="f";break;case"p":f=100,h="%",s="r";break;case"b":case"o":case"x":case"X":u&&(u="0"+s.toLowerCase());case"c":case"d":d=!0,l=0;break;case"s":f=-1,s="r"}"#"===u&&(u=""),"r"!=s||l||(s="g"),s=Gu.get(s)||_;var g=a&&c;return function(t){if(d&&t%1)return"";var n=0>t||0===t&&0>1/t?(t=-t,"-"):i;if(0>f){var p=d3.formatPrefix(t,l);t=p.scale(t),h=p.symbol}else t*=f;t=s(t,l),!a&&c&&(t=Ku(t));var m=u.length+t.length+(g?0:n.length),v=o>m?Array(m=o-m+1).join(e):"";return g&&(t=Ku(v+t)),Cu&&t.replace(".",Cu),n+=u,("<"===r?n+t+v:">"===r?v+n+t:"^"===r?v.substring(0,m>>=1)+n+t+v.substring(m):n+(g?t:v+t))+h}};var Ju=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,Gu=d3.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,n){return t.toPrecision(n)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},r:function(t,n){return d3.round(t,n=x(t,n)).toFixed(Math.max(0,Math.min(20,n)))}}),Ku=a;if(Du){var Wu=Du.length;Ku=function(t){for(var n=t.lastIndexOf("."),e=n>=0?"."+t.substring(n+1):(n=t.length,""),r=[],i=0,u=Du[0];n>0&&u>0;)r.push(t.substring(n-=u,n+u)),u=Du[i=(i+1)%Wu];return r.reverse().join(zu||"")+e}}var Qu=["y","z","a","f","p","n","μ","m","","k","M","G","T","P","E","Z","Y"].map(w);d3.formatPrefix=function(t,n){var e=0;return t&&(0>t&&(t*=-1),n&&(t=d3.round(t,x(t,n))),e=1+Math.floor(1e-12+Math.log(t)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((0>=e?e+1:e-1)/3)))),Qu[8+e/3]};var ta=function(){return a},na=d3.map({linear:ta,poly:q,quad:function(){return A},cubic:function(){return N},sin:function(){return C},exp:function(){return z},circle:function(){return D},elastic:L,back:F,bounce:function(){return H}}),ea=d3.map({"in":a,out:k,"in-out":E,"out-in":function(t){return E(k(t))}});d3.ease=function(t){var n=t.indexOf("-"),e=n>=0?t.substring(0,n):t,r=n>=0?t.substring(n+1):"in";return e=na.get(e)||ta,r=ea.get(r)||a,S(r(e.apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.transform=function(t){var n=document.createElementNS(d3.ns.prefix.svg,"g");return(d3.transform=function(t){n.setAttribute("transform",t);var e=n.transform.baseVal.consolidate();return new O(e?e.matrix:ra)})(t)},O.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ra={a:1,b:0,c:0,d:1,e:0,f:0};d3.interpolate=function(t,n){for(var e,r=d3.interpolators.length;--r>=0&&!(e=d3.interpolators[r](t,n)););return e},d3.interpolateNumber=function(t,n){return n-=t,function(e){return t+n*e}},d3.interpolateRound=function(t,n){return n-=t,function(e){return Math.round(t+n*e)}},d3.interpolateString=function(t,n){var e,r,i,u,a,o=0,c=0,l=[],s=[];for(ia.lastIndex=0,r=0;e=ia.exec(n);++r)e.index&&l.push(n.substring(o,c=e.index)),s.push({i:l.length,x:e[0]}),l.push(null),o=ia.lastIndex;for(n.length>o&&l.push(n.substring(o)),r=0,u=s.length;(e=ia.exec(t))&&u>r;++r)if(a=s[r],a.x==e[0]){if(a.i)if(null==l[a.i+1])for(l[a.i-1]+=a.x,l.splice(a.i,1),i=r+1;u>i;++i)s[i].i--;else for(l[a.i-1]+=a.x+l[a.i+1],l.splice(a.i,2),i=r+1;u>i;++i)s[i].i-=2;else if(null==l[a.i+1])l[a.i]=a.x;else for(l[a.i]=a.x+l[a.i+1],l.splice(a.i+1,1),i=r+1;u>i;++i)s[i].i--;s.splice(r,1),u--,r--}else a.x=d3.interpolateNumber(parseFloat(e[0]),parseFloat(a.x));for(;u>r;)a=s.pop(),null==l[a.i+1]?l[a.i]=a.x:(l[a.i]=a.x+l[a.i+1],l.splice(a.i+1,1)),u--;return 1===l.length?null==l[0]?s[0].x:function(){return n}:function(t){for(r=0;u>r;++r)l[(a=s[r]).i]=a.x(t);return l.join("")}},d3.interpolateTransform=function(t,n){var e,r=[],i=[],u=d3.transform(t),a=d3.transform(n),o=u.translate,c=a.translate,l=u.rotate,s=a.rotate,f=u.skew,h=a.skew,d=u.scale,g=a.scale;return o[0]!=c[0]||o[1]!=c[1]?(r.push("translate(",null,",",null,")"),i.push({i:1,x:d3.interpolateNumber(o[0],c[0])},{i:3,x:d3.interpolateNumber(o[1],c[1])})):c[0]||c[1]?r.push("translate("+c+")"):r.push(""),l!=s?(l-s>180?s+=360:s-l>180&&(l+=360),i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:d3.interpolateNumber(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:d3.interpolateNumber(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),d[0]!=g[0]||d[1]!=g[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),i.push({i:e-4,x:d3.interpolateNumber(d[0],g[0])},{i:e-2,x:d3.interpolateNumber(d[1],g[1])})):(1!=g[0]||1!=g[1])&&r.push(r.pop()+"scale("+g+")"),e=i.length,function(t){for(var n,u=-1;e>++u;)r[(n=i[u]).i]=n.x(t);return r.join("")}},d3.interpolateRgb=function(t,n){t=d3.rgb(t),n=d3.rgb(n);var e=t.r,r=t.g,i=t.b,u=n.r-e,a=n.g-r,o=n.b-i;return function(t){return"#"+G(Math.round(e+u*t))+G(Math.round(r+a*t))+G(Math.round(i+o*t))}},d3.interpolateHsl=function(t,n){t=d3.hsl(t),n=d3.hsl(n);var e=t.h,r=t.s,i=t.l,u=n.h-e,a=n.s-r,o=n.l-i;return u>180?u-=360:-180>u&&(u+=360),function(t){return un(e+u*t,r+a*t,i+o*t)+""}},d3.interpolateLab=function(t,n){t=d3.lab(t),n=d3.lab(n);var e=t.l,r=t.a,i=t.b,u=n.l-e,a=n.a-r,o=n.b-i;return function(t){return fn(e+u*t,r+a*t,i+o*t)+""}},d3.interpolateHcl=function(t,n){t=d3.hcl(t),n=d3.hcl(n);var e=t.h,r=t.c,i=t.l,u=n.h-e,a=n.c-r,o=n.l-i;return u>180?u-=360:-180>u&&(u+=360),function(t){return cn(e+u*t,r+a*t,i+o*t)+""}},d3.interpolateArray=function(t,n){var e,r=[],i=[],u=t.length,a=n.length,o=Math.min(t.length,n.length);for(e=0;o>e;++e)r.push(d3.interpolate(t[e],n[e]));for(;u>e;++e)i[e]=t[e];for(;a>e;++e)i[e]=n[e];return function(t){for(e=0;o>e;++e)i[e]=r[e](t);return i}},d3.interpolateObject=function(t,n){var e,r={},i={};for(e in t)e in n?r[e]=V(e)(t[e],n[e]):i[e]=t[e];for(e in n)e in t||(i[e]=n[e]);return function(t){for(e in r)i[e]=r[e](t);return i}};var ia=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;d3.interpolators=[d3.interpolateObject,function(t,n){return n instanceof Array&&d3.interpolateArray(t,n)},function(t,n){return("string"==typeof t||"string"==typeof n)&&d3.interpolateString(t+"",n+"")},function(t,n){return("string"==typeof n?aa.has(n)||/^(#|rgb\(|hsl\()/.test(n):n instanceof B)&&d3.interpolateRgb(t,n)},function(t,n){return!isNaN(t=+t)&&!isNaN(n=+n)&&d3.interpolateNumber(t,n)}],B.prototype.toString=function(){return this.rgb()+""},d3.rgb=function(t,n,e){return 1===arguments.length?t instanceof J?$(t.r,t.g,t.b):K(""+t,$,un):$(~~t,~~n,~~e)};var ua=J.prototype=new B;ua.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var n=this.r,e=this.g,r=this.b,i=30;return n||e||r?(n&&i>n&&(n=i),e&&i>e&&(e=i),r&&i>r&&(r=i),$(Math.min(255,Math.floor(n/t)),Math.min(255,Math.floor(e/t)),Math.min(255,Math.floor(r/t)))):$(i,i,i)},ua.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),$(Math.floor(t*this.r),Math.floor(t*this.g),Math.floor(t*this.b))
+},ua.hsl=function(){return W(this.r,this.g,this.b)},ua.toString=function(){return"#"+G(this.r)+G(this.g)+G(this.b)};var aa=d3.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});aa.forEach(function(t,n){aa.set(t,K(n,$,un))}),d3.hsl=function(t,n,e){return 1===arguments.length?t instanceof rn?en(t.h,t.s,t.l):K(""+t,W,en):en(+t,+n,+e)};var oa=rn.prototype=new B;oa.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),en(this.h,this.s,this.l/t)},oa.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),en(this.h,this.s,t*this.l)},oa.rgb=function(){return un(this.h,this.s,this.l)},d3.hcl=function(t,n,e){return 1===arguments.length?t instanceof on?an(t.h,t.c,t.l):t instanceof sn?hn(t.l,t.a,t.b):hn((t=Q((t=d3.rgb(t)).r,t.g,t.b)).l,t.a,t.b):an(+t,+n,+e)};var ca=on.prototype=new B;ca.brighter=function(t){return an(this.h,this.c,Math.min(100,this.l+la*(arguments.length?t:1)))},ca.darker=function(t){return an(this.h,this.c,Math.max(0,this.l-la*(arguments.length?t:1)))},ca.rgb=function(){return cn(this.h,this.c,this.l).rgb()},d3.lab=function(t,n,e){return 1===arguments.length?t instanceof sn?ln(t.l,t.a,t.b):t instanceof on?cn(t.l,t.c,t.h):Q((t=d3.rgb(t)).r,t.g,t.b):ln(+t,+n,+e)};var la=18,sa=.95047,fa=1,ha=1.08883,da=sn.prototype=new B;da.brighter=function(t){return ln(Math.min(100,this.l+la*(arguments.length?t:1)),this.a,this.b)},da.darker=function(t){return ln(Math.max(0,this.l-la*(arguments.length?t:1)),this.a,this.b)},da.rgb=function(){return fn(this.l,this.a,this.b)};var ga=function(t,n){return n.querySelector(t)},pa=function(t,n){return n.querySelectorAll(t)},ma=document.documentElement,va=ma.matchesSelector||ma.webkitMatchesSelector||ma.mozMatchesSelector||ma.msMatchesSelector||ma.oMatchesSelector,ya=function(t,n){return va.call(t,n)};"function"==typeof Sizzle&&(ga=function(t,n){return Sizzle(t,n)[0]||null},pa=function(t,n){return Sizzle.uniqueSort(Sizzle(t,n))},ya=Sizzle.matchesSelector);var Ma=[];d3.selection=function(){return ba},d3.selection.prototype=Ma,Ma.select=function(t){var n,e,r,i,u=[];"function"!=typeof t&&(t=vn(t));for(var a=-1,o=this.length;o>++a;){u.push(n=[]),n.parentNode=(r=this[a]).parentNode;for(var c=-1,l=r.length;l>++c;)(i=r[c])?(n.push(e=t.call(i,i.__data__,c)),e&&"__data__"in i&&(e.__data__=i.__data__)):n.push(null)}return mn(u)},Ma.selectAll=function(t){var n,e,r=[];"function"!=typeof t&&(t=yn(t));for(var i=-1,u=this.length;u>++i;)for(var a=this[i],o=-1,c=a.length;c>++o;)(e=a[o])&&(r.push(n=Yu(t.call(e,e.__data__,o))),n.parentNode=e);return mn(r)},Ma.attr=function(t,n){if(2>arguments.length){if("string"==typeof t){var e=this.node();return t=d3.ns.qualify(t),t.local?e.getAttributeNS(t.space,t.local):e.getAttribute(t)}for(n in t)this.each(Mn(n,t[n]));return this}return this.each(Mn(t,n))},Ma.classed=function(t,n){if(2>arguments.length){if("string"==typeof t){var e=this.node(),r=(t=t.trim().split(/^|\s+/g)).length,i=-1;if(n=e.classList){for(;r>++i;)if(!n.contains(t[i]))return!1}else for(n=e.className,null!=n.baseVal&&(n=n.baseVal);r>++i;)if(!bn(t[i]).test(n))return!1;return!0}for(n in t)this.each(xn(n,t[n]));return this}return this.each(xn(t,n))},Ma.style=function(t,n,e){var r=arguments.length;if(3>r){if("string"!=typeof t){2>r&&(n="");for(e in t)this.each(wn(e,t[e],n));return this}if(2>r)return getComputedStyle(this.node(),null).getPropertyValue(t);e=""}return this.each(wn(t,n,e))},Ma.property=function(t,n){if(2>arguments.length){if("string"==typeof t)return this.node()[t];for(n in t)this.each(Sn(n,t[n]));return this}return this.each(Sn(t,n))},Ma.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},Ma.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},Ma.append=function(t){function n(){return this.appendChild(document.createElementNS(this.namespaceURI,t))}function e(){return this.appendChild(document.createElementNS(t.space,t.local))}return t=d3.ns.qualify(t),this.select(t.local?e:n)},Ma.insert=function(t,n){function e(){return this.insertBefore(document.createElementNS(this.namespaceURI,t),ga(n,this))}function r(){return this.insertBefore(document.createElementNS(t.space,t.local),ga(n,this))}return t=d3.ns.qualify(t),this.select(t.local?r:e)},Ma.remove=function(){return this.each(function(){var t=this.parentNode;t&&t.removeChild(this)})},Ma.data=function(t,n){function e(t,e){var r,i,a,o=t.length,f=e.length,h=Math.min(o,f),d=Array(f),g=Array(f),p=Array(o);if(n){var m,v=new u,y=new u,M=[];for(r=-1;o>++r;)m=n.call(i=t[r],i.__data__,r),v.has(m)?p[r]=i:v.set(m,i),M.push(m);for(r=-1;f>++r;)m=n.call(e,a=e[r],r),(i=v.get(m))?(d[r]=i,i.__data__=a):y.has(m)||(g[r]=kn(a)),y.set(m,a),v.remove(m);for(r=-1;o>++r;)v.has(M[r])&&(p[r]=t[r])}else{for(r=-1;h>++r;)i=t[r],a=e[r],i?(i.__data__=a,d[r]=i):g[r]=kn(a);for(;f>r;++r)g[r]=kn(e[r]);for(;o>r;++r)p[r]=t[r]}g.update=d,g.parentNode=d.parentNode=p.parentNode=t.parentNode,c.push(g),l.push(d),s.push(p)}var r,i,a=-1,o=this.length;if(!arguments.length){for(t=Array(o=(r=this[0]).length);o>++a;)(i=r[a])&&(t[a]=i.__data__);return t}var c=qn([]),l=mn([]),s=mn([]);if("function"==typeof t)for(;o>++a;)e(r=this[a],t.call(r,r.parentNode.__data__,a));else for(;o>++a;)e(r=this[a],t);return l.enter=function(){return c},l.exit=function(){return s},l},Ma.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},Ma.filter=function(t){var n,e,r,i=[];"function"!=typeof t&&(t=En(t));for(var u=0,a=this.length;a>u;u++){i.push(n=[]),n.parentNode=(e=this[u]).parentNode;for(var o=0,c=e.length;c>o;o++)(r=e[o])&&t.call(r,r.__data__,o)&&n.push(r)}return mn(i)},Ma.order=function(){for(var t=-1,n=this.length;n>++t;)for(var e,r=this[t],i=r.length-1,u=r[i];--i>=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},Ma.sort=function(t){t=An.apply(this,arguments);for(var n=-1,e=this.length;e>++n;)this[n].sort(t);return this.order()},Ma.on=function(t,n,e){var r=arguments.length;if(3>r){if("string"!=typeof t){2>r&&(n=!1);for(e in t)this.each(Nn(e,t[e],n));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;e=!1}return this.each(Nn(t,n,e))},Ma.each=function(t){return Tn(this,function(n,e,r){t.call(n,n.__data__,e,r)})},Ma.call=function(t){var n=Yu(arguments);return t.apply(n[0]=this,n),this},Ma.empty=function(){return!this.node()},Ma.node=function(){for(var t=0,n=this.length;n>t;t++)for(var e=this[t],r=0,i=e.length;i>r;r++){var u=e[r];if(u)return u}return null},Ma.transition=function(){var t,n,e=_a||++Sa,r=[],i=Object.create(ka);i.time=Date.now();for(var u=-1,a=this.length;a>++u;){r.push(t=[]);for(var o=this[u],c=-1,l=o.length;l>++c;)(n=o[c])&&zn(n,c,e,i),t.push(n)}return Cn(r,e)};var ba=mn([[document]]);ba[0].parentNode=ma,d3.select=function(t){return"string"==typeof t?ba.select(t):mn([[t]])},d3.selectAll=function(t){return"string"==typeof t?ba.selectAll(t):mn([Yu(t)])};var xa=[];d3.selection.enter=qn,d3.selection.enter.prototype=xa,xa.append=Ma.append,xa.insert=Ma.insert,xa.empty=Ma.empty,xa.node=Ma.node,xa.select=function(t){for(var n,e,r,i,u,a=[],o=-1,c=this.length;c>++o;){r=(i=this[o]).update,a.push(n=[]),n.parentNode=i.parentNode;for(var l=-1,s=i.length;s>++l;)(u=i[l])?(n.push(r[l]=e=t.call(i.parentNode,u.__data__,l)),e.__data__=u.__data__):n.push(null)}return mn(a)};var _a,wa=[],Sa=0,ka={ease:T,delay:0,duration:250};wa.call=Ma.call,wa.empty=Ma.empty,wa.node=Ma.node,d3.transition=function(t){return arguments.length?_a?t.transition():t:ba.transition()},d3.transition.prototype=wa,wa.select=function(t){var n,e,r,i=this.id,u=[];"function"!=typeof t&&(t=vn(t));for(var a=-1,o=this.length;o>++a;){u.push(n=[]);for(var c=this[a],l=-1,s=c.length;s>++l;)(r=c[l])&&(e=t.call(r,r.__data__,l))?("__data__"in r&&(e.__data__=r.__data__),zn(e,l,i,r.__transition__[i]),n.push(e)):n.push(null)}return Cn(u,i)},wa.selectAll=function(t){var n,e,r,i,u,a=this.id,o=[];"function"!=typeof t&&(t=yn(t));for(var c=-1,l=this.length;l>++c;)for(var s=this[c],f=-1,h=s.length;h>++f;)if(r=s[f]){u=r.__transition__[a],e=t.call(r,r.__data__,f),o.push(n=[]);for(var d=-1,g=e.length;g>++d;)zn(i=e[d],d,a,u),n.push(i)}return Cn(o,a)},wa.filter=function(t){var n,e,r,i=[];"function"!=typeof t&&(t=En(t));for(var u=0,a=this.length;a>u;u++){i.push(n=[]);for(var e=this[u],o=0,c=e.length;c>o;o++)(r=e[o])&&t.call(r,r.__data__,o)&&n.push(r)}return Cn(i,this.id,this.time).ease(this.ease())},wa.attr=function(t,n){function e(){this.removeAttribute(u)}function r(){this.removeAttributeNS(u.space,u.local)}if(2>arguments.length){for(n in t)this.attr(n,t[n]);return this}var i=V(t),u=d3.ns.qualify(t);return Ln(this,"attr."+t,n,function(t){function n(){var n,e=this.getAttribute(u);return e!==t&&(n=i(e,t),function(t){this.setAttribute(u,n(t))})}function a(){var n,e=this.getAttributeNS(u.space,u.local);return e!==t&&(n=i(e,t),function(t){this.setAttributeNS(u.space,u.local,n(t))})}return null==t?u.local?r:e:(t+="",u.local?a:n)})},wa.attrTween=function(t,n){function e(t,e){var r=n.call(this,t,e,this.getAttribute(i));return r&&function(t){this.setAttribute(i,r(t))}}function r(t,e){var r=n.call(this,t,e,this.getAttributeNS(i.space,i.local));return r&&function(t){this.setAttributeNS(i.space,i.local,r(t))}}var i=d3.ns.qualify(t);return this.tween("attr."+t,i.local?r:e)},wa.style=function(t,n,e){function r(){this.style.removeProperty(t)}var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(n="");for(e in t)this.style(e,t[e],n);return this}e=""}var u=V(t);return Ln(this,"style."+t,n,function(n){function i(){var r,i=getComputedStyle(this,null).getPropertyValue(t);return i!==n&&(r=u(i,n),function(n){this.style.setProperty(t,r(n),e)})}return null==n?r:(n+="",i)})},wa.styleTween=function(t,n,e){return 3>arguments.length&&(e=""),this.tween("style."+t,function(r,i){var u=n.call(this,r,i,getComputedStyle(this,null).getPropertyValue(t));return u&&function(n){this.style.setProperty(t,u(n),e)}})},wa.text=function(t){return Ln(this,"text",t,Dn)},wa.remove=function(){return this.each("end.transition",function(){var t;!this.__transition__&&(t=this.parentNode)&&t.removeChild(this)})},wa.ease=function(t){var n=this.id;return 1>arguments.length?this.node().__transition__[n].ease:("function"!=typeof t&&(t=d3.ease.apply(d3,arguments)),Tn(this,function(e){e.__transition__[n].ease=t}))},wa.delay=function(t){var n=this.id;return Tn(this,"function"==typeof t?function(e,r,i){e.__transition__[n].delay=0|t.call(e,e.__data__,r,i)}:(t|=0,function(e){e.__transition__[n].delay=t}))},wa.duration=function(t){var n=this.id;return Tn(this,"function"==typeof t?function(e,r,i){e.__transition__[n].duration=Math.max(1,0|t.call(e,e.__data__,r,i))}:(t=Math.max(1,0|t),function(e){e.__transition__[n].duration=t}))},wa.each=function(t,n){var e=this.id;if(2>arguments.length){var r=ka,i=_a;_a=e,Tn(this,function(n,r,i){ka=n.__transition__[e],t.call(n,n.__data__,r,i)}),ka=r,_a=i}else Tn(this,function(r){r.__transition__[e].event.on(t,n)});return this},wa.transition=function(){for(var t,n,e,r,i=this.id,u=++Sa,a=[],o=0,c=this.length;c>o;o++){a.push(t=[]);for(var n=this[o],l=0,s=n.length;s>l;l++)(e=n[l])&&(r=Object.create(e.__transition__[i]),r.delay+=r.duration,zn(e,l,u,r)),t.push(e)}return Cn(a,u)},wa.tween=function(t,n){var e=this.id;return 2>arguments.length?this.node().__transition__[e].tween.get(t):Tn(this,null==n?function(n){n.__transition__[e].tween.remove(t)}:function(r){r.__transition__[e].tween.set(t,n)})};var Ea,Aa,Na=0,Ta={},qa=null;d3.timer=function(t,n,e){if(3>arguments.length){if(2>arguments.length)n=0;else if(!isFinite(n))return;e=Date.now()}var r=Ta[t.id];r&&r.callback===t?(r.then=e,r.delay=n):Ta[t.id=++Na]=qa={callback:t,then:e,delay:n,next:qa},Ea||(Aa=clearTimeout(Aa),Ea=1,Ca(Fn))},d3.timer.flush=function(){for(var t,n=Date.now(),e=qa;e;)t=n-e.then,e.delay||(e.flush=e.callback(t)),e=e.next;Hn()};var Ca=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,17)};d3.mouse=function(t){return Rn(t,P())};var za=/WebKit/.test(navigator.userAgent)?-1:0;d3.touches=function(t,n){return 2>arguments.length&&(n=P().touches),n?Yu(n).map(function(n){var e=Rn(t,n);return e.identifier=n.identifier,e}):[]},d3.scale={},d3.scale.linear=function(){return In([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return Kn(d3.scale.linear(),Wn)};var Da=d3.format(".0e");Wn.pow=function(t){return Math.pow(10,t)},Qn.pow=function(t){return-Math.pow(10,-t)},d3.scale.pow=function(){return te(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return ee([],{t:"range",a:[[]]})},d3.scale.category10=function(){return d3.scale.ordinal().range(La)},d3.scale.category20=function(){return d3.scale.ordinal().range(Fa)},d3.scale.category20b=function(){return d3.scale.ordinal().range(Ha)},d3.scale.category20c=function(){return d3.scale.ordinal().range(Ra)};var La=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Fa=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],Ha=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],Ra=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return re([],[])},d3.scale.quantize=function(){return ie(0,1,[0,1])},d3.scale.threshold=function(){return ue([.5],[0,1])},d3.scale.identity=function(){return ae([0,1])},d3.svg={},d3.svg.arc=function(){function t(){var t=n.apply(this,arguments),u=e.apply(this,arguments),a=r.apply(this,arguments)+Pa,o=i.apply(this,arguments)+Pa,c=(a>o&&(c=a,a=o,o=c),o-a),l=Ru>c?"0":"1",s=Math.cos(a),f=Math.sin(a),h=Math.cos(o),d=Math.sin(o);return c>=ja?t?"M0,"+u+"A"+u+","+u+" 0 1,1 0,"+-u+"A"+u+","+u+" 0 1,1 0,"+u+"M0,"+t+"A"+t+","+t+" 0 1,0 0,"+-t+"A"+t+","+t+" 0 1,0 0,"+t+"Z":"M0,"+u+"A"+u+","+u+" 0 1,1 0,"+-u+"A"+u+","+u+" 0 1,1 0,"+u+"Z":t?"M"+u*s+","+u*f+"A"+u+","+u+" 0 "+l+",1 "+u*h+","+u*d+"L"+t*h+","+t*d+"A"+t+","+t+" 0 "+l+",0 "+t*s+","+t*f+"Z":"M"+u*s+","+u*f+"A"+u+","+u+" 0 "+l+",1 "+u*h+","+u*d+"L0,0"+"Z"}var n=oe,e=ce,r=le,i=se;return t.innerRadius=function(e){return arguments.length?(n=c(e),t):n},t.outerRadius=function(n){return arguments.length?(e=c(n),t):e},t.startAngle=function(n){return arguments.length?(r=c(n),t):r},t.endAngle=function(n){return arguments.length?(i=c(n),t):i},t.centroid=function(){var t=(n.apply(this,arguments)+e.apply(this,arguments))/2,u=(r.apply(this,arguments)+i.apply(this,arguments))/2+Pa;return[Math.cos(u)*t,Math.sin(u)*t]},t};var Pa=-Ru/2,ja=2*Ru-1e-6;d3.svg.line=function(){return fe(a)};var Oa=d3.map({linear:ge,"linear-closed":pe,"step-before":me,"step-after":ve,basis:we,"basis-open":Se,"basis-closed":ke,bundle:Ee,cardinal:be,"cardinal-open":ye,"cardinal-closed":Me,monotone:ze});Oa.forEach(function(t,n){n.key=t,n.closed=/-closed$/.test(t)});var Ya=[0,2/3,1/3,0],Ua=[0,1/3,2/3,0],Ia=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var t=fe(De);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},me.reverse=ve,ve.reverse=me,d3.svg.area=function(){return Le(a)},d3.svg.area.radial=function(){var t=Le(De);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},d3.svg.chord=function(){function e(t,n){var e=r(this,o,t,n),c=r(this,l,t,n);return"M"+e.p0+u(e.r,e.p1,e.a1-e.a0)+(i(e,c)?a(e.r,e.p1,e.r,e.p0):a(e.r,e.p1,c.r,c.p0)+u(c.r,c.p1,c.a1-c.a0)+a(c.r,c.p1,e.r,e.p0))+"Z"}function r(t,n,e,r){var i=n.call(t,e,r),u=s.call(t,i,r),a=f.call(t,i,r)+Pa,o=h.call(t,i,r)+Pa;return{r:u,a0:a,a1:o,p0:[u*Math.cos(a),u*Math.sin(a)],p1:[u*Math.cos(o),u*Math.sin(o)]}}function i(t,n){return t.a0==n.a0&&t.a1==n.a1}function u(t,n,e){return"A"+t+","+t+" 0 "+ +(e>Ru)+",1 "+n}function a(t,n,e,r){return"Q 0,0 "+r}var o=n,l=t,s=Fe,f=le,h=se;return e.radius=function(t){return arguments.length?(s=c(t),e):s},e.source=function(t){return arguments.length?(o=c(t),e):o},e.target=function(t){return arguments.length?(l=c(t),e):l},e.startAngle=function(t){return arguments.length?(f=c(t),e):f},e.endAngle=function(t){return arguments.length?(h=c(t),e):h},e},d3.svg.diagonal=function(){function e(t,n){var e=r.call(this,t,n),a=i.call(this,t,n),o=(e.y+a.y)/2,c=[e,{x:e.x,y:o},{x:a.x,y:o},a];return c=c.map(u),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var r=n,i=t,u=He;return e.source=function(t){return arguments.length?(r=c(t),e):r},e.target=function(t){return arguments.length?(i=c(t),e):i},e.projection=function(t){return arguments.length?(u=t,e):u},e},d3.svg.diagonal.radial=function(){var t=d3.svg.diagonal(),n=He,e=t.projection;return t.projection=function(t){return arguments.length?e(Re(n=t)):n},t},d3.svg.symbol=function(){function t(t,r){return(Va.get(n.call(this,t,r))||Oe)(e.call(this,t,r))}var n=je,e=Pe;return t.type=function(e){return arguments.length?(n=c(e),t):n},t.size=function(n){return arguments.length?(e=c(n),t):e},t};var Va=d3.map({circle:Oe,cross:function(t){var n=Math.sqrt(t/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(t){var n=Math.sqrt(t/(2*Za)),e=n*Za;return"M0,"+-n+"L"+e+",0"+" 0,"+n+" "+-e+",0"+"Z"},square:function(t){var n=Math.sqrt(t)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(t){var n=Math.sqrt(t/Xa),e=n*Xa/2;return"M0,"+e+"L"+n+","+-e+" "+-n+","+-e+"Z"},"triangle-up":function(t){var n=Math.sqrt(t/Xa),e=n*Xa/2;return"M0,"+-e+"L"+n+","+e+" "+-n+","+e+"Z"}});d3.svg.symbolTypes=Va.keys();var Xa=Math.sqrt(3),Za=Math.tan(30*ju);d3.svg.axis=function(){function t(t){t.each(function(){var t,f=d3.select(this),h=null==l?e.ticks?e.ticks.apply(e,c):e.domain():l,d=null==n?e.tickFormat?e.tickFormat.apply(e,c):String:n,g=Ie(e,h,s),p=f.selectAll(".minor").data(g,String),m=p.enter().insert("line","g").attr("class","tick minor").style("opacity",1e-6),v=d3.transition(p.exit()).style("opacity",1e-6).remove(),y=d3.transition(p).style("opacity",1),M=f.selectAll("g").data(h,String),b=M.enter().insert("g","path").style("opacity",1e-6),x=d3.transition(M.exit()).style("opacity",1e-6).remove(),_=d3.transition(M).style("opacity",1),w=On(e),S=f.selectAll(".domain").data([0]),k=d3.transition(S),E=e.copy(),A=this.__chart__||E;this.__chart__=E,S.enter().append("path").attr("class","domain"),b.append("line").attr("class","tick"),b.append("text");var N=b.select("line"),T=_.select("line"),q=M.select("text").text(d),C=b.select("text"),z=_.select("text");switch(r){case"bottom":t=Ye,m.attr("y2",u),y.attr("x2",0).attr("y2",u),N.attr("y2",i),C.attr("y",Math.max(i,0)+o),T.attr("x2",0).attr("y2",i),z.attr("x",0).attr("y",Math.max(i,0)+o),q.attr("dy",".71em").style("text-anchor","middle"),k.attr("d","M"+w[0]+","+a+"V0H"+w[1]+"V"+a);break;case"top":t=Ye,m.attr("y2",-u),y.attr("x2",0).attr("y2",-u),N.attr("y2",-i),C.attr("y",-(Math.max(i,0)+o)),T.attr("x2",0).attr("y2",-i),z.attr("x",0).attr("y",-(Math.max(i,0)+o)),q.attr("dy","0em").style("text-anchor","middle"),k.attr("d","M"+w[0]+","+-a+"V0H"+w[1]+"V"+-a);break;case"left":t=Ue,m.attr("x2",-u),y.attr("x2",-u).attr("y2",0),N.attr("x2",-i),C.attr("x",-(Math.max(i,0)+o)),T.attr("x2",-i).attr("y2",0),z.attr("x",-(Math.max(i,0)+o)).attr("y",0),q.attr("dy",".32em").style("text-anchor","end"),k.attr("d","M"+-a+","+w[0]+"H0V"+w[1]+"H"+-a);break;case"right":t=Ue,m.attr("x2",u),y.attr("x2",u).attr("y2",0),N.attr("x2",i),C.attr("x",Math.max(i,0)+o),T.attr("x2",i).attr("y2",0),z.attr("x",Math.max(i,0)+o).attr("y",0),q.attr("dy",".32em").style("text-anchor","start"),k.attr("d","M"+a+","+w[0]+"H0V"+w[1]+"H"+a)}if(e.ticks)b.call(t,A),_.call(t,E),x.call(t,E),m.call(t,A),y.call(t,E),v.call(t,E);else{var D=E.rangeBand()/2,L=function(t){return E(t)+D};b.call(t,L),_.call(t,L)}})}var n,e=d3.scale.linear(),r="bottom",i=6,u=6,a=6,o=3,c=[10],l=null,s=0;return t.scale=function(n){return arguments.length?(e=n,t):e},t.orient=function(n){return arguments.length?(r=n,t):r},t.ticks=function(){return arguments.length?(c=arguments,t):c},t.tickValues=function(n){return arguments.length?(l=n,t):l},t.tickFormat=function(e){return arguments.length?(n=e,t):n},t.tickSize=function(n,e){if(!arguments.length)return i;var r=arguments.length-1;return i=+n,u=r>1?+e:i,a=r>0?+arguments[r]:i,t},t.tickPadding=function(n){return arguments.length?(o=+n,t):o},t.tickSubdivide=function(n){return arguments.length?(s=+n,t):s},t},d3.svg.brush=function(){function t(u){u.each(function(){var u,a=d3.select(this),s=a.selectAll(".background").data([0]),f=a.selectAll(".extent").data([0]),h=a.selectAll(".resize").data(l,String);a.style("pointer-events","all").on("mousedown.brush",i).on("touchstart.brush",i),s.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),f.enter().append("rect").attr("class","extent").style("cursor","move"),h.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Ba[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),h.style("display",t.empty()?"none":null),h.exit().remove(),o&&(u=On(o),s.attr("x",u[0]).attr("width",u[1]-u[0]),e(a)),c&&(u=On(c),s.attr("y",u[0]).attr("height",u[1]-u[0]),r(a)),n(a)})}function n(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+s[+/e$/.test(t)][0]+","+s[+/^s/.test(t)][1]+")"})}function e(t){t.select(".extent").attr("x",s[0][0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1][0]-s[0][0])}function r(t){t.select(".extent").attr("y",s[0][1]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1][1]-s[0][1])}function i(){function i(){var t=d3.event.changedTouches;return t?d3.touches(v,t)[0]:d3.mouse(v)}function l(){32==d3.event.keyCode&&(S||(p=null,k[0]-=s[1][0],k[1]-=s[1][1],S=2),R())}function f(){32==d3.event.keyCode&&2==S&&(k[0]+=s[1][0],k[1]+=s[1][1],S=0,R())}function h(){var t=i(),u=!1;m&&(t[0]+=m[0],t[1]+=m[1]),S||(d3.event.altKey?(p||(p=[(s[0][0]+s[1][0])/2,(s[0][1]+s[1][1])/2]),k[0]=s[+(t[0]<p[0])][0],k[1]=s[+(t[1]<p[1])][1]):p=null),_&&d(t,o,0)&&(e(b),u=!0),w&&d(t,c,1)&&(r(b),u=!0),u&&(n(b),M({type:"brush",mode:S?"move":"resize"}))}function d(t,n,e){var r,i,a=On(n),o=a[0],c=a[1],l=k[e],f=s[1][e]-s[0][e];return S&&(o-=l,c-=f+l),r=Math.max(o,Math.min(c,t[e])),S?i=(r+=l)+f:(p&&(l=Math.max(o,Math.min(c,2*p[e]-r))),r>l?(i=r,r=l):i=l),s[0][e]!==r||s[1][e]!==i?(u=null,s[0][e]=r,s[1][e]=i,!0):void 0}function g(){h(),b.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),d3.select("body").style("cursor",null),E.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),M({type:"brushend"}),R()}var p,m,v=this,y=d3.select(d3.event.target),M=a.of(v,arguments),b=d3.select(v),x=y.datum(),_=!/^(n|s)$/.test(x)&&o,w=!/^(e|w)$/.test(x)&&c,S=y.classed("extent"),k=i(),E=d3.select(window).on("mousemove.brush",h).on("mouseup.brush",g).on("touchmove.brush",h).on("touchend.brush",g).on("keydown.brush",l).on("keyup.brush",f);if(S)k[0]=s[0][0]-k[0],k[1]=s[0][1]-k[1];else if(x){var A=+/w$/.test(x),N=+/^n/.test(x);m=[s[1-A][0]-k[0],s[1-N][1]-k[1]],k[0]=s[A][0],k[1]=s[N][1]}else d3.event.altKey&&(p=k.slice());b.style("pointer-events","none").selectAll(".resize").style("display",null),d3.select("body").style("cursor",y.style("cursor")),M({type:"brushstart"}),h(),R()}var u,a=j(t,"brushstart","brush","brushend"),o=null,c=null,l=$a[0],s=[[0,0],[0,0]];return t.x=function(n){return arguments.length?(o=n,l=$a[!o<<1|!c],t):o},t.y=function(n){return arguments.length?(c=n,l=$a[!o<<1|!c],t):c},t.extent=function(n){var e,r,i,a,l;return arguments.length?(u=[[0,0],[0,0]],o&&(e=n[0],r=n[1],c&&(e=e[0],r=r[0]),u[0][0]=e,u[1][0]=r,o.invert&&(e=o(e),r=o(r)),e>r&&(l=e,e=r,r=l),s[0][0]=0|e,s[1][0]=0|r),c&&(i=n[0],a=n[1],o&&(i=i[1],a=a[1]),u[0][1]=i,u[1][1]=a,c.invert&&(i=c(i),a=c(a)),i>a&&(l=i,i=a,a=l),s[0][1]=0|i,s[1][1]=0|a),t):(n=u||s,o&&(e=n[0][0],r=n[1][0],u||(e=s[0][0],r=s[1][0],o.invert&&(e=o.invert(e),r=o.invert(r)),e>r&&(l=e,e=r,r=l))),c&&(i=n[0][1],a=n[1][1],u||(i=s[0][1],a=s[1][1],c.invert&&(i=c.invert(i),a=c.invert(a)),i>a&&(l=i,i=a,a=l))),o&&c?[[e,i],[r,a]]:o?[e,r]:c&&[i,a])},t.clear=function(){return u=null,s[0][0]=s[0][1]=s[1][0]=s[1][1]=0,t},t.empty=function(){return o&&s[0][0]===s[1][0]||c&&s[0][1]===s[1][1]},d3.rebind(t,a,"on")};var Ba={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},$a=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];d3.behavior={},d3.behavior.drag=function(){function t(){this.on("mousedown.drag",n).on("touchstart.drag",n)}function n(){function t(){var t=o.parentNode;return null!=s?d3.touches(t).filter(function(t){return t.identifier===s})[0]:d3.mouse(t)}function n(){if(!o.parentNode)return i();var n=t(),e=n[0]-f[0],r=n[1]-f[1];h|=e|r,f=n,R(),c({type:"drag",x:n[0]+a[0],y:n[1]+a[1],dx:e,dy:r})}function i(){c({type:"dragend"}),h&&(R(),d3.event.target===l&&d.on("click.drag",u,!0)),d.on(null!=s?"touchmove.drag-"+s:"mousemove.drag",null).on(null!=s?"touchend.drag-"+s:"mouseup.drag",null)}function u(){R(),d.on("click.drag",null)}var a,o=this,c=e.of(o,arguments),l=d3.event.target,s=d3.event.touches?d3.event.changedTouches[0].identifier:null,f=t(),h=0,d=d3.select(window).on(null!=s?"touchmove.drag-"+s:"mousemove.drag",n).on(null!=s?"touchend.drag-"+s:"mouseup.drag",i,!0);r?(a=r.apply(o,arguments),a=[a.x-f[0],a.y-f[1]]):a=[0,0],null==s&&R(),c({type:"dragstart"})}var e=j(t,"drag","dragstart","dragend"),r=null;return t.origin=function(n){return arguments.length?(r=n,t):r},d3.rebind(t,e,"on")},d3.behavior.zoom=function(){function t(){this.on("mousedown.zoom",o).on("mousewheel.zoom",c).on("mousemove.zoom",l).on("DOMMouseScroll.zoom",c).on("dblclick.zoom",s).on("touchstart.zoom",f).on("touchmove.zoom",h).on("touchend.zoom",f)}function n(t){return[(t[0]-b[0])/x,(t[1]-b[1])/x]}function e(t){return[t[0]*x+b[0],t[1]*x+b[1]]}function r(t){x=Math.max(_[0],Math.min(_[1],t))}function i(t,n){n=e(n),b[0]+=t[0]-n[0],b[1]+=t[1]-n[1]}function u(){m&&m.domain(p.range().map(function(t){return(t-b[0])/x}).map(p.invert)),y&&y.domain(v.range().map(function(t){return(t-b[1])/x}).map(v.invert))}function a(t){u(),d3.event.preventDefault(),t({type:"zoom",scale:x,translate:b})}function o(){function t(){l=1,i(d3.mouse(u),f),a(o)}function e(){l&&R(),s.on("mousemove.zoom",null).on("mouseup.zoom",null),l&&d3.event.target===c&&s.on("click.zoom",r,!0)}function r(){R(),s.on("click.zoom",null)}var u=this,o=w.of(u,arguments),c=d3.event.target,l=0,s=d3.select(window).on("mousemove.zoom",t).on("mouseup.zoom",e),f=n(d3.mouse(u));window.focus(),R()}function c(){d||(d=n(d3.mouse(this))),r(Math.pow(2,.002*Ve())*x),i(d3.mouse(this),d),a(w.of(this,arguments))}function l(){d=null}function s(){var t=d3.mouse(this),e=n(t),u=Math.log(x)/Math.LN2;r(Math.pow(2,d3.event.shiftKey?Math.ceil(u)-1:Math.floor(u)+1)),i(t,e),a(w.of(this,arguments))}function f(){var t=d3.touches(this),e=Date.now();if(g=x,d={},t.forEach(function(t){d[t.identifier]=n(t)}),R(),1===t.length){if(500>e-M){var u=t[0],o=n(t[0]);r(2*x),i(u,o),a(w.of(this,arguments))}M=e}}function h(){var t=d3.touches(this),n=t[0],e=d[n.identifier];if(u=t[1]){var u,o=d[u.identifier];n=[(n[0]+u[0])/2,(n[1]+u[1])/2],e=[(e[0]+o[0])/2,(e[1]+o[1])/2],r(d3.event.scale*g)}i(n,e),M=null,a(w.of(this,arguments))}var d,g,p,m,v,y,M,b=[0,0],x=1,_=Ga,w=j(t,"zoom");return t.translate=function(n){return arguments.length?(b=n.map(Number),u(),t):b},t.scale=function(n){return arguments.length?(x=+n,u(),t):x},t.scaleExtent=function(n){return arguments.length?(_=null==n?Ga:n.map(Number),t):_},t.x=function(n){return arguments.length?(m=n,p=n.copy(),b=[0,0],x=1,t):m},t.y=function(n){return arguments.length?(y=n,v=n.copy(),b=[0,0],x=1,t):y},d3.rebind(t,w,"on")};var Ja,Ga=[0,1/0];d3.layout={},d3.layout.bundle=function(){return function(t){for(var n=[],e=-1,r=t.length;r>++e;)n.push(Xe(t[e]));return n}},d3.layout.chord=function(){function t(){var t,l,f,h,d,g={},p=[],m=d3.range(u),v=[];for(e=[],r=[],t=0,h=-1;u>++h;){for(l=0,d=-1;u>++d;)l+=i[h][d];p.push(l),v.push(d3.range(u)),t+=l}for(a&&m.sort(function(t,n){return a(p[t],p[n])}),o&&v.forEach(function(t,n){t.sort(function(t,e){return o(i[n][t],i[n][e])
+})}),t=(2*Ru-s*u)/t,l=0,h=-1;u>++h;){for(f=l,d=-1;u>++d;){var y=m[h],M=v[y][d],b=i[y][M],x=l,_=l+=b*t;g[y+"-"+M]={index:y,subindex:M,startAngle:x,endAngle:_,value:b}}r[y]={index:y,startAngle:f,endAngle:l,value:(l-f)/t},l+=s}for(h=-1;u>++h;)for(d=h-1;u>++d;){var w=g[h+"-"+d],S=g[d+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&n()}function n(){e.sort(function(t,n){return c((t.source.value+t.target.value)/2,(n.source.value+n.target.value)/2)})}var e,r,i,u,a,o,c,l={},s=0;return l.matrix=function(t){return arguments.length?(u=(i=t)&&i.length,e=r=null,l):i},l.padding=function(t){return arguments.length?(s=t,e=r=null,l):s},l.sortGroups=function(t){return arguments.length?(a=t,e=r=null,l):a},l.sortSubgroups=function(t){return arguments.length?(o=t,e=null,l):o},l.sortChords=function(t){return arguments.length?(c=t,e&&n(),l):c},l.chords=function(){return e||t(),e},l.groups=function(){return r||t(),r},l},d3.layout.force=function(){function t(t){return function(n,e,r,i){if(n.point!==t){var u=n.cx-t.x,a=n.cy-t.y,o=1/Math.sqrt(u*u+a*a);if(v>(i-e)*o){var c=n.charge*o*o;return t.px-=u*c,t.py-=a*c,!0}if(n.point&&isFinite(o)){var c=n.pointCharge*o*o;t.px-=u*c,t.py-=a*c}}return!n.charge}}function n(t){t.px=d3.event.x,t.py=d3.event.y,l.resume()}var e,r,i,u,o,l={},s=d3.dispatch("start","tick","end"),f=[1,1],h=.9,d=Qe,g=tr,p=-30,m=.1,v=.8,y=[],M=[];return l.tick=function(){if(.005>(r*=.99))return s.end({type:"end",alpha:r=0}),!0;var n,e,a,c,l,d,g,v,b,x=y.length,_=M.length;for(e=0;_>e;++e)a=M[e],c=a.source,l=a.target,v=l.x-c.x,b=l.y-c.y,(d=v*v+b*b)&&(d=r*u[e]*((d=Math.sqrt(d))-i[e])/d,v*=d,b*=d,l.x-=v*(g=c.weight/(l.weight+c.weight)),l.y-=b*g,c.x+=v*(g=1-g),c.y+=b*g);if((g=r*m)&&(v=f[0]/2,b=f[1]/2,e=-1,g))for(;x>++e;)a=y[e],a.x+=(v-a.x)*g,a.y+=(b-a.y)*g;if(p)for(We(n=d3.geom.quadtree(y),r,o),e=-1;x>++e;)(a=y[e]).fixed||n.visit(t(a));for(e=-1;x>++e;)a=y[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*h,a.y-=(a.py-(a.py=a.y))*h);s.tick({type:"tick",alpha:r})},l.nodes=function(t){return arguments.length?(y=t,l):y},l.links=function(t){return arguments.length?(M=t,l):M},l.size=function(t){return arguments.length?(f=t,l):f},l.linkDistance=function(t){return arguments.length?(d=c(t),l):d},l.distance=l.linkDistance,l.linkStrength=function(t){return arguments.length?(g=c(t),l):g},l.friction=function(t){return arguments.length?(h=t,l):h},l.charge=function(t){return arguments.length?(p="function"==typeof t?t:+t,l):p},l.gravity=function(t){return arguments.length?(m=t,l):m},l.theta=function(t){return arguments.length?(v=t,l):v},l.alpha=function(t){return arguments.length?(r?r=t>0?t:0:t>0&&(s.start({type:"start",alpha:r=t}),d3.timer(l.tick)),l):r},l.start=function(){function t(t,r){for(var i,u=n(e),a=-1,o=u.length;o>++a;)if(!isNaN(i=u[a][t]))return i;return Math.random()*r}function n(){if(!a){for(a=[],r=0;s>r;++r)a[r]=[];for(r=0;h>r;++r){var t=M[r];a[t.source.index].push(t.target),a[t.target.index].push(t.source)}}return a[e]}var e,r,a,c,s=y.length,h=M.length,m=f[0],v=f[1];for(e=0;s>e;++e)(c=y[e]).index=e,c.weight=0;for(i=[],u=[],e=0;h>e;++e)c=M[e],"number"==typeof c.source&&(c.source=y[c.source]),"number"==typeof c.target&&(c.target=y[c.target]),i[e]=d.call(this,c,e),u[e]=g.call(this,c,e),++c.source.weight,++c.target.weight;for(e=0;s>e;++e)c=y[e],isNaN(c.x)&&(c.x=t("x",m)),isNaN(c.y)&&(c.y=t("y",v)),isNaN(c.px)&&(c.px=c.x),isNaN(c.py)&&(c.py=c.y);if(o=[],"function"==typeof p)for(e=0;s>e;++e)o[e]=+p.call(this,y[e],e);else for(e=0;s>e;++e)o[e]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){e||(e=d3.behavior.drag().origin(a).on("dragstart",$e).on("drag",n).on("dragend",Je)),this.on("mouseover.force",Ge).on("mouseout.force",Ke).call(e)},d3.rebind(l,s,"on")},d3.layout.partition=function(){function t(n,e,r,i){var u=n.children;if(n.x=e,n.y=n.depth*i,n.dx=r,n.dy=i,u&&(a=u.length)){var a,o,c,l=-1;for(r=n.value?r/n.value:0;a>++l;)t(o=u[l],e,c=o.value*r,i),e+=c}}function n(t){var e=t.children,r=0;if(e&&(i=e.length))for(var i,u=-1;i>++u;)r=Math.max(r,n(e[u]));return 1+r}function e(e,u){var a=r.call(this,e,u);return t(a[0],0,i[0],i[1]/n(a[0])),a}var r=d3.layout.hierarchy(),i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},hr(e,r)},d3.layout.pie=function(){function t(u){var a=u.map(function(e,r){return+n.call(t,e,r)}),o=+("function"==typeof r?r.apply(this,arguments):r),c=(("function"==typeof i?i.apply(this,arguments):i)-r)/d3.sum(a),l=d3.range(u.length);null!=e&&l.sort(e===Ka?function(t,n){return a[n]-a[t]}:function(t,n){return e(u[t],u[n])});var s=[];return l.forEach(function(t){var n;s[t]={data:u[t],value:n=a[t],startAngle:o,endAngle:o+=n*c}}),s}var n=Number,e=Ka,r=0,i=2*Ru;return t.value=function(e){return arguments.length?(n=e,t):n},t.sort=function(n){return arguments.length?(e=n,t):e},t.startAngle=function(n){return arguments.length?(r=n,t):r},t.endAngle=function(n){return arguments.length?(i=n,t):i},t};var Ka={};d3.layout.stack=function(){function t(a,c){var l=a.map(function(e,r){return n.call(t,e,r)}),s=l.map(function(n){return n.map(function(n,e){return[u.call(t,n,e),o.call(t,n,e)]})}),f=e.call(t,s,c);l=d3.permute(l,f),s=d3.permute(s,f);var h,d,g,p=r.call(t,s,c),m=l.length,v=l[0].length;for(d=0;v>d;++d)for(i.call(t,l[0][d],g=p[d],s[0][d][1]),h=1;m>h;++h)i.call(t,l[h][d],g+=s[h-1][d][1],s[h][d][1]);return a}var n=a,e=ir,r=ur,i=rr,u=nr,o=er;return t.values=function(e){return arguments.length?(n=e,t):n},t.order=function(n){return arguments.length?(e="function"==typeof n?n:Wa.get(n)||ir,t):e},t.offset=function(n){return arguments.length?(r="function"==typeof n?n:Qa.get(n)||ur,t):r},t.x=function(n){return arguments.length?(u=n,t):u},t.y=function(n){return arguments.length?(o=n,t):o},t.out=function(n){return arguments.length?(i=n,t):i},t};var Wa=d3.map({"inside-out":function(t){var n,e,r=t.length,i=t.map(ar),u=t.map(or),a=d3.range(r).sort(function(t,n){return i[t]-i[n]}),o=0,c=0,l=[],s=[];for(n=0;r>n;++n)e=a[n],c>o?(o+=u[e],l.push(e)):(c+=u[e],s.push(e));return s.reverse().concat(l)},reverse:function(t){return d3.range(t.length).reverse()},"default":ir}),Qa=d3.map({silhouette:function(t){var n,e,r,i=t.length,u=t[0].length,a=[],o=0,c=[];for(e=0;u>e;++e){for(n=0,r=0;i>n;n++)r+=t[n][e][1];r>o&&(o=r),a.push(r)}for(e=0;u>e;++e)c[e]=(o-a[e])/2;return c},wiggle:function(t){var n,e,r,i,u,a,o,c,l,s=t.length,f=t[0],h=f.length,d=[];for(d[0]=c=l=0,e=1;h>e;++e){for(n=0,i=0;s>n;++n)i+=t[n][e][1];for(n=0,u=0,o=f[e][0]-f[e-1][0];s>n;++n){for(r=0,a=(t[n][e][1]-t[n][e-1][1])/(2*o);n>r;++r)a+=(t[r][e][1]-t[r][e-1][1])/o;u+=a*t[n][e][1]}d[e]=c-=i?u/i*o:0,l>c&&(l=c)}for(e=0;h>e;++e)d[e]-=l;return d},expand:function(t){var n,e,r,i=t.length,u=t[0].length,a=1/i,o=[];for(e=0;u>e;++e){for(n=0,r=0;i>n;n++)r+=t[n][e][1];if(r)for(n=0;i>n;n++)t[n][e][1]/=r;else for(n=0;i>n;n++)t[n][e][1]=a}for(e=0;u>e;++e)o[e]=0;return o},zero:ur});d3.layout.histogram=function(){function t(t,u){for(var a,o,c=[],l=t.map(e,this),s=r.call(this,l,u),f=i.call(this,s,l,u),u=-1,h=l.length,d=f.length-1,g=n?1:1/h;d>++u;)a=c[u]=[],a.dx=f[u+1]-(a.x=f[u]),a.y=0;if(d>0)for(u=-1;h>++u;)o=l[u],o>=s[0]&&s[1]>=o&&(a=c[d3.bisect(f,o,1,d)-1],a.y+=g,a.push(t[u]));return c}var n=!0,e=Number,r=fr,i=lr;return t.value=function(n){return arguments.length?(e=n,t):e},t.range=function(n){return arguments.length?(r=c(n),t):r},t.bins=function(n){return arguments.length?(i="number"==typeof n?function(t){return sr(t,n)}:c(n),t):i},t.frequency=function(e){return arguments.length?(n=!!e,t):n},t},d3.layout.hierarchy=function(){function t(n,a,o){var c=i.call(e,n,a);if(n.depth=a,o.push(n),c&&(l=c.length)){for(var l,s,f=-1,h=n.children=[],d=0,g=a+1;l>++f;)s=t(c[f],g,o),s.parent=n,h.push(s),d+=s.value;r&&h.sort(r),u&&(n.value=d)}else u&&(n.value=+u.call(e,n,a)||0);return n}function n(t,r){var i=t.children,a=0;if(i&&(o=i.length))for(var o,c=-1,l=r+1;o>++c;)a+=n(i[c],l);else u&&(a=+u.call(e,t,r)||0);return u&&(t.value=a),a}function e(n){var e=[];return t(n,0,e),e}var r=pr,i=dr,u=gr;return e.sort=function(t){return arguments.length?(r=t,e):r},e.children=function(t){return arguments.length?(i=t,e):i},e.value=function(t){return arguments.length?(u=t,e):u},e.revalue=function(t){return n(t,0),t},e},d3.layout.pack=function(){function t(t,i){var u=n.call(this,t,i),a=u[0];a.x=0,a.y=0,Rr(a,function(t){t.r=Math.sqrt(t.value)}),Rr(a,xr);var o=r[0],c=r[1],l=Math.max(2*a.r/o,2*a.r/c);if(e>0){var s=e*l/2;Rr(a,function(t){t.r+=s}),Rr(a,xr),Rr(a,function(t){t.r-=s}),l=Math.max(2*a.r/o,2*a.r/c)}return Sr(a,o/2,c/2,1/l),u}var n=d3.layout.hierarchy().sort(vr),e=0,r=[1,1];return t.size=function(n){return arguments.length?(r=n,t):r},t.padding=function(n){return arguments.length?(e=+n,t):e},hr(t,n)},d3.layout.cluster=function(){function t(t,i){var u,a=n.call(this,t,i),o=a[0],c=0;Rr(o,function(t){var n=t.children;n&&n.length?(t.x=Ar(n),t.y=Er(n)):(t.x=u?c+=e(t,u):0,t.y=0,u=t)});var l=Nr(o),s=Tr(o),f=l.x-e(l,s)/2,h=s.x+e(s,l)/2;return Rr(o,function(t){t.x=(t.x-f)/(h-f)*r[0],t.y=(1-(o.y?t.y/o.y:1))*r[1]}),a}var n=d3.layout.hierarchy().sort(null).value(null),e=qr,r=[1,1];return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(n){return arguments.length?(r=n,t):r},hr(t,n)},d3.layout.tree=function(){function t(t,i){function u(t,n){var r=t.children,i=t._tree;if(r&&(a=r.length)){for(var a,c,l,s=r[0],f=s,h=-1;a>++h;)l=r[h],u(l,c),f=o(l,c,f),c=l;Pr(t);var d=.5*(s._tree.prelim+l._tree.prelim);n?(i.prelim=n._tree.prelim+e(t,n),i.mod=i.prelim-d):i.prelim=d}else n&&(i.prelim=n._tree.prelim+e(t,n))}function a(t,n){t.x=t._tree.prelim+n;var e=t.children;if(e&&(r=e.length)){var r,i=-1;for(n+=t._tree.mod;r>++i;)a(e[i],n)}}function o(t,n,r){if(n){for(var i,u=t,a=t,o=n,c=t.parent.children[0],l=u._tree.mod,s=a._tree.mod,f=o._tree.mod,h=c._tree.mod;o=zr(o),u=Cr(u),o&&u;)c=Cr(c),a=zr(a),a._tree.ancestor=t,i=o._tree.prelim+f-u._tree.prelim-l+e(o,u),i>0&&(jr(Or(o,t,r),t,i),l+=i,s+=i),f+=o._tree.mod,l+=u._tree.mod,h+=c._tree.mod,s+=a._tree.mod;o&&!zr(a)&&(a._tree.thread=o,a._tree.mod+=f-s),u&&!Cr(c)&&(c._tree.thread=u,c._tree.mod+=l-h,r=t)}return r}var c=n.call(this,t,i),l=c[0];Rr(l,function(t,n){t._tree={ancestor:t,prelim:0,mod:0,change:0,shift:0,number:n?n._tree.number+1:0}}),u(l),a(l,-l._tree.prelim);var s=Dr(l,Fr),f=Dr(l,Lr),h=Dr(l,Hr),d=s.x-e(s,f)/2,g=f.x+e(f,s)/2,p=h.depth||1;return Rr(l,function(t){t.x=(t.x-d)/(g-d)*r[0],t.y=t.depth/p*r[1],delete t._tree}),c}var n=d3.layout.hierarchy().sort(null).value(null),e=qr,r=[1,1];return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(n){return arguments.length?(r=n,t):r},hr(t,n)},d3.layout.treemap=function(){function t(t,n){for(var e,r,i=-1,u=t.length;u>++i;)r=(e=t[i]).value*(0>n?0:n),e.area=isNaN(r)||0>=r?0:r}function n(e){var u=e.children;if(u&&u.length){var a,o,c,l=f(e),s=[],h=u.slice(),g=1/0,p="slice"===d?l.dx:"dice"===d?l.dy:"slice-dice"===d?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(t(h,l.dx*l.dy/e.value),s.area=0;(c=h.length)>0;)s.push(a=h[c-1]),s.area+=a.area,"squarify"!==d||g>=(o=r(s,p))?(h.pop(),g=o):(s.area-=s.pop().area,i(s,p,l,!1),p=Math.min(l.dx,l.dy),s.length=s.area=0,g=1/0);s.length&&(i(s,p,l,!0),s.length=s.area=0),u.forEach(n)}}function e(n){var r=n.children;if(r&&r.length){var u,a=f(n),o=r.slice(),c=[];for(t(o,a.dx*a.dy/n.value),c.area=0;u=o.pop();)c.push(u),c.area+=u.area,null!=u.z&&(i(c,u.z?a.dx:a.dy,a,!o.length),c.length=c.area=0);r.forEach(e)}}function r(t,n){for(var e,r=t.area,i=0,u=1/0,a=-1,o=t.length;o>++a;)(e=t[a].area)&&(u>e&&(u=e),e>i&&(i=e));return r*=r,n*=n,r?Math.max(n*i*g/r,r/(n*u*g)):1/0}function i(t,n,e,r){var i,u=-1,a=t.length,o=e.x,l=e.y,s=n?c(t.area/n):0;if(n==e.dx){for((r||s>e.dy)&&(s=e.dy);a>++u;)i=t[u],i.x=o,i.y=l,i.dy=s,o+=i.dx=Math.min(e.x+e.dx-o,s?c(i.area/s):0);i.z=!0,i.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);a>++u;)i=t[u],i.x=o,i.y=l,i.dx=s,l+=i.dy=Math.min(e.y+e.dy-l,s?c(i.area/s):0);i.z=!1,i.dy+=e.y+e.dy-l,e.x+=s,e.dx-=s}}function u(r){var i=a||o(r),u=i[0];return u.x=0,u.y=0,u.dx=l[0],u.dy=l[1],a&&o.revalue(u),t([u],u.dx*u.dy/u.value),(a?e:n)(u),h&&(a=i),i}var a,o=d3.layout.hierarchy(),c=Math.round,l=[1,1],s=null,f=Yr,h=!1,d="squarify",g=.5*(1+Math.sqrt(5));return u.size=function(t){return arguments.length?(l=t,u):l},u.padding=function(t){function n(n){var e=t.call(u,n,n.depth);return null==e?Yr(n):Ur(n,"number"==typeof e?[e,e,e,e]:e)}function e(n){return Ur(n,t)}if(!arguments.length)return s;var r;return f=null==(s=t)?Yr:"function"==(r=typeof t)?n:"number"===r?(t=[t,t,t,t],e):e,u},u.round=function(t){return arguments.length?(c=t?Math.round:Number,u):c!=Number},u.sticky=function(t){return arguments.length?(h=t,a=null,u):h},u.ratio=function(t){return arguments.length?(g=t,u):g},u.mode=function(t){return arguments.length?(d=t+"",u):d},hr(u,o)},d3.csv=Ir(",","text/csv"),d3.tsv=Ir(" ","text/tab-separated-values"),d3.geo={},d3.geo.stream=function(t,n){to.hasOwnProperty(t.type)?to[t.type](t,n):Vr(t,n)};var to={Feature:function(t,n){Vr(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;i>++r;)Vr(e[r].geometry,n)}},no={Sphere:function(t,n){n.sphere()},Point:function(t,n){var e=t.coordinates;n.point(e[0],e[1])},MultiPoint:function(t,n){for(var e,r=t.coordinates,i=-1,u=r.length;u>++i;)e=r[i],n.point(e[0],e[1])},LineString:function(t,n){Xr(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;i>++r;)Xr(e[r],n,0)},Polygon:function(t,n){Zr(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;i>++r;)Zr(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;i>++r;)Vr(e[r],n)}};d3.geo.albersUsa=function(){function t(t){return n(t)(t)}function n(t){var n=t[0],a=t[1];return a>50?r:-140>n?i:21>a?u:e}var e=d3.geo.albers(),r=d3.geo.albers().rotate([160,0]).center([0,60]).parallels([55,65]),i=d3.geo.albers().rotate([160,0]).center([0,20]).parallels([8,18]),u=d3.geo.albers().rotate([60,0]).center([0,10]).parallels([8,18]);return t.scale=function(n){return arguments.length?(e.scale(n),r.scale(.6*n),i.scale(n),u.scale(1.5*n),t.translate(e.translate())):e.scale()},t.translate=function(n){if(!arguments.length)return e.translate();var a=e.scale(),o=n[0],c=n[1];return e.translate(n),r.translate([o-.4*a,c+.17*a]),i.translate([o-.19*a,c+.2*a]),u.translate([o+.58*a,c+.43*a]),t},t.scale(e.scale())},(d3.geo.albers=function(){var t=29.5*ju,n=45.5*ju,e=Pi(ei),r=e(t,n);return r.parallels=function(r){return arguments.length?e(t=r[0]*ju,n=r[1]*ju):[t*Ou,n*Ou]},r.rotate([98,0]).center([0,38]).scale(1e3)}).raw=ei;var eo=Vi(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(d3.geo.azimuthalEqualArea=function(){return Ri(eo)}).raw=eo;var ro=Vi(function(t){var n=Math.acos(t);return n&&n/Math.sin(n)},a);(d3.geo.azimuthalEquidistant=function(){return Ri(ro)}).raw=ro,d3.geo.bounds=ri(a),d3.geo.centroid=function(t){io=uo=ao=oo=co=0,d3.geo.stream(t,lo);var n;return uo&&Math.abs(n=Math.sqrt(ao*ao+oo*oo+co*co))>Pu?[Math.atan2(oo,ao)*Ou,Math.asin(Math.max(-1,Math.min(1,co/n)))*Ou]:void 0};var io,uo,ao,oo,co,lo={sphere:function(){2>io&&(io=2,uo=ao=oo=co=0)},point:ii,lineStart:ai,lineEnd:oi,polygonStart:function(){2>io&&(io=2,uo=ao=oo=co=0),lo.lineStart=ui},polygonEnd:function(){lo.lineStart=ai}};d3.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,n=Oi(-t[0]*ju,-t[1]*ju,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=n(t,e)),t[0]*=Ou,t[1]*=Ou}}),{type:"Polygon",coordinates:[i]}}var n,e,r=[0,0],i=6;return t.origin=function(n){return arguments.length?(r=n,t):r},t.angle=function(r){return arguments.length?(e=ci((n=+r)*ju,i*ju),t):n},t.precision=function(r){return arguments.length?(e=ci(n*ju,(i=+r)*ju),t):i},t.angle(90)};var so=si(o,vi,Mi);(d3.geo.equirectangular=function(){return Ri(_i).scale(250/Ru)}).raw=_i.invert=_i;var fo=Vi(function(t){return 1/t},Math.atan);(d3.geo.gnomonic=function(){return Ri(fo)}).raw=fo,d3.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:n()}}function n(){return d3.range(Math.ceil(r/c)*c,e,c).map(a).concat(d3.range(Math.ceil(u/l)*l,i,l).map(o))}var e,r,i,u,a,o,c=22.5,l=c,s=2.5;return t.lines=function(){return n().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[a(r).concat(o(i).slice(1),a(e).reverse().slice(1),o(u).reverse().slice(1))]}},t.extent=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],u=+n[0][1],i=+n[1][1],r>e&&(n=r,r=e,e=n),u>i&&(n=u,u=i,i=n),t.precision(s)):[[r,u],[e,i]]},t.step=function(n){return arguments.length?(c=+n[0],l=+n[1],t):[c,l]},t.precision=function(n){return arguments.length?(s=+n,a=wi(u,i,s),o=Si(r,e,s),t):s},t.extent([[-180+Pu,-90+Pu],[180-Pu,90-Pu]])},d3.geo.interpolate=function(t,n){return ki(t[0]*ju,t[1]*ju,n[0]*ju,n[1]*ju)},d3.geo.greatArc=function(){function e(){for(var t=r||a.apply(this,arguments),n=i||o.apply(this,arguments),e=u||d3.geo.interpolate(t,n),i=0,l=c/e.distance,s=[t];1>(i+=l);)s.push(e(i));return s.push(n),{type:"LineString",coordinates:s}}var r,i,u,a=n,o=t,c=6*ju;return e.distance=function(){return(u||d3.geo.interpolate(r||a.apply(this,arguments),i||o.apply(this,arguments))).distance},e.source=function(t){return arguments.length?(a=t,r="function"==typeof t?null:t,u=r&&i?d3.geo.interpolate(r,i):null,e):a},e.target=function(t){return arguments.length?(o=t,i="function"==typeof t?null:t,u=r&&i?d3.geo.interpolate(r,i):null,e):o},e.precision=function(t){return arguments.length?(c=t*ju,e):c/ju},e},Ei.invert=function(t,n){return[2*Ru*t,2*Math.atan(Math.exp(2*Ru*n))-Ru/2]},(d3.geo.mercator=function(){return Ri(Ei).scale(500)}).raw=Ei;var ho=Vi(function(){return 1},Math.asin);(d3.geo.orthographic=function(){return Ri(ho)}).raw=ho,d3.geo.path=function(){function t(t){return t&&d3.geo.stream(t,r(i.pointRadius("function"==typeof u?+u.apply(this,arguments):u))),i.result()}var n,e,r,i,u=4.5;return t.area=function(t){return go=0,d3.geo.stream(t,r(mo)),go},t.centroid=function(t){return io=ao=oo=co=0,d3.geo.stream(t,r(vo)),co?[ao/co,oo/co]:void 0},t.bounds=function(t){return ri(r)(t)},t.projection=function(e){return arguments.length?(r=(n=e)?e.stream||Ni(e):a,t):n},t.context=function(n){return arguments.length?(i=null==(e=n)?new Ti:new qi(n),t):e},t.pointRadius=function(n){return arguments.length?(u="function"==typeof n?n:+n,t):u},t.projection(d3.geo.albersUsa()).context(null)};var go,po,mo={point:Pn,lineStart:Pn,lineEnd:Pn,polygonStart:function(){po=0,mo.lineStart=Ci},polygonEnd:function(){mo.lineStart=mo.lineEnd=mo.point=Pn,go+=Math.abs(po/2)}},vo={point:zi,lineStart:Di,lineEnd:Li,polygonStart:function(){vo.lineStart=Fi},polygonEnd:function(){vo.point=zi,vo.lineStart=Di,vo.lineEnd=Li}};d3.geo.area=function(t){return yo=0,d3.geo.stream(t,bo),yo};var yo,Mo,bo={sphere:function(){yo+=4*Ru},point:Pn,lineStart:Pn,lineEnd:Pn,polygonStart:function(){Mo=0,bo.lineStart=Hi},polygonEnd:function(){yo+=0>Mo?4*Ru+Mo:Mo,bo.lineStart=bo.lineEnd=bo.point=Pn}};d3.geo.projection=Ri,d3.geo.projectionMutator=Pi;var xo=Vi(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(d3.geo.stereographic=function(){return Ri(xo)}).raw=xo,d3.geom={},d3.geom.hull=function(t){if(3>t.length)return[];var n,e,r,i,u,a,o,c,l,s,f=t.length,h=f-1,d=[],g=[],p=0;for(n=1;f>n;++n)t[n][1]<t[p][1]?p=n:t[n][1]==t[p][1]&&(p=t[n][0]<t[p][0]?n:p);for(n=0;f>n;++n)n!==p&&(i=t[n][1]-t[p][1],r=t[n][0]-t[p][0],d.push({angle:Math.atan2(i,r),index:n}));for(d.sort(function(t,n){return t.angle-n.angle}),l=d[0].angle,c=d[0].index,o=0,n=1;h>n;++n)e=d[n].index,l==d[n].angle?(r=t[c][0]-t[p][0],i=t[c][1]-t[p][1],u=t[e][0]-t[p][0],a=t[e][1]-t[p][1],r*r+i*i>=u*u+a*a?d[n].index=-1:(d[o].index=-1,l=d[n].angle,o=n,c=e)):(l=d[n].angle,o=n,c=e);for(g.push(p),n=0,e=0;2>n;++e)-1!==d[e].index&&(g.push(d[e].index),n++);for(s=g.length;h>e;++e)if(-1!==d[e].index){for(;!Xi(g[s-2],g[s-1],d[e].index,t);)--s;g[s++]=d[e].index}var m=[];for(n=0;s>n;++n)m.push(t[g[n]]);return m},d3.geom.polygon=function(t){return t.area=function(){for(var n=0,e=t.length,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];e>++n;)r+=t[n-1][1]*t[n][0]-t[n-1][0]*t[n][1];return.5*r},t.centroid=function(n){var e,r,i=-1,u=t.length,a=0,o=0,c=t[u-1];for(arguments.length||(n=-1/(6*t.area()));u>++i;)e=c,c=t[i],r=e[0]*c[1]-c[0]*e[1],a+=(e[0]+c[0])*r,o+=(e[1]+c[1])*r;return[a*n,o*n]},t.clip=function(n){for(var e,r,i,u,a,o,c=-1,l=t.length,s=t[l-1];l>++c;){for(e=n.slice(),n.length=0,u=t[c],a=e[(i=e.length)-1],r=-1;i>++r;)o=e[r],Zi(o,s,u)?(Zi(a,s,u)||n.push(Bi(a,o,s,u)),n.push(o)):Zi(a,s,u)&&n.push(Bi(a,o,s,u)),a=o;s=u}return n},t},d3.geom.voronoi=function(t){var n=t.map(function(){return[]}),e=1e6;return $i(t,function(t){var r,i,u,a,o,c;1===t.a&&t.b>=0?(r=t.ep.r,i=t.ep.l):(r=t.ep.l,i=t.ep.r),1===t.a?(o=r?r.y:-e,u=t.c-t.b*o,c=i?i.y:e,a=t.c-t.b*c):(u=r?r.x:-e,o=t.c-t.a*u,a=i?i.x:e,c=t.c-t.a*a);var l=[u,o],s=[a,c];n[t.region.l.index].push(l,s),n[t.region.r.index].push(l,s)}),n=n.map(function(n,e){var r=t[e][0],i=t[e][1],u=n.map(function(t){return Math.atan2(t[0]-r,t[1]-i)});return d3.range(n.length).sort(function(t,n){return u[t]-u[n]}).filter(function(t,n,e){return!n||u[t]-u[e[n-1]]>Pu}).map(function(t){return n[t]})}),n.forEach(function(n,r){var i=n.length;if(!i)return n.push([-e,-e],[-e,e],[e,e],[e,-e]);if(!(i>2)){var u=t[r],a=n[0],o=n[1],c=u[0],l=u[1],s=a[0],f=a[1],h=o[0],d=o[1],g=Math.abs(h-s),p=d-f;if(Pu>Math.abs(p)){var m=f>l?-e:e;n.push([-e,m],[e,m])}else if(Pu>g){var v=s>c?-e:e;n.push([v,-e],[v,e])}else{var m=(s-c)*(d-f)>(h-s)*(f-l)?e:-e,y=Math.abs(p)-g;Pu>Math.abs(y)?n.push([0>p?m:-m,m]):(y>0&&(m*=-1),n.push([-e,m],[e,m]))}}}),n};var _o={l:"r",r:"l"};d3.geom.delaunay=function(t){var n=t.map(function(){return[]}),e=[];return $i(t,function(e){n[e.region.l.index].push(t[e.region.r.index])}),n.forEach(function(n,r){var i=t[r],u=i[0],a=i[1];n.forEach(function(t){t.angle=Math.atan2(t[0]-u,t[1]-a)}),n.sort(function(t,n){return t.angle-n.angle});for(var o=0,c=n.length-1;c>o;o++)e.push([i,n[o],n[o+1]])}),e},d3.geom.quadtree=function(t,n,e,r,i){function u(t,n,e,r,i,u){if(!isNaN(n.x)&&!isNaN(n.y))if(t.leaf){var o=t.point;o?.01>Math.abs(o.x-n.x)+Math.abs(o.y-n.y)?a(t,n,e,r,i,u):(t.point=null,a(t,o,e,r,i,u),a(t,n,e,r,i,u)):t.point=n}else a(t,n,e,r,i,u)}function a(t,n,e,r,i,a){var o=.5*(e+i),c=.5*(r+a),l=n.x>=o,s=n.y>=c,f=(s<<1)+l;t.leaf=!1,t=t.nodes[f]||(t.nodes[f]=Ji()),l?e=o:i=o,s?r=c:a=c,u(t,n,e,r,i,a)}var o,c=-1,l=t.length;if(5>arguments.length)if(3===arguments.length)i=e,r=n,e=n=0;else for(n=e=1/0,r=i=-1/0;l>++c;)o=t[c],n>o.x&&(n=o.x),e>o.y&&(e=o.y),o.x>r&&(r=o.x),o.y>i&&(i=o.y);var s=r-n,f=i-e;s>f?i=e+s:r=n+f;var h=Ji();return h.add=function(t){u(h,t,n,e,r,i)},h.visit=function(t){Gi(t,h,n,e,r,i)},t.forEach(h.add),h},d3.time={};var wo=Date,So=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Ki.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ko.setUTCDate.apply(this._,arguments)},setDay:function(){ko.setUTCDay.apply(this._,arguments)},setFullYear:function(){ko.setUTCFullYear.apply(this._,arguments)},setHours:function(){ko.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ko.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ko.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ko.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ko.setUTCSeconds.apply(this._,arguments)},setTime:function(){ko.setTime.apply(this._,arguments)}};var ko=Date.prototype,Eo="%a %b %e %X %Y",Ao="%m/%d/%Y",No="%H:%M:%S",To=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],qo=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Co=["January","February","March","April","May","June","July","August","September","October","November","December"],zo=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];d3.time.format=function(t){function n(n){for(var r,i,u,a=[],o=-1,c=0;e>++o;)37===t.charCodeAt(o)&&(a.push(t.substring(c,o)),null!=(i=jo[r=t.charAt(++o)])&&(r=t.charAt(++o)),(u=Oo[r])&&(r=u(n,null==i?"e"===r?" ":"0":i)),a.push(r),c=o+1);return a.push(t.substring(c,o)),a.join("")}var e=t.length;return n.parse=function(n){var e={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},r=Wi(e,t,n,0);if(r!=n.length)return null;"p"in e&&(e.H=e.H%12+12*e.p);var i=new wo;return i.setFullYear(e.y,e.m,e.d),i.setHours(e.H,e.M,e.S,e.L),i},n.toString=function(){return t},n};var Do=Qi(To),Lo=Qi(qo),Fo=Qi(Co),Ho=tu(Co),Ro=Qi(zo),Po=tu(zo),jo={"-":"",_:" ",0:"0"},Oo={a:function(t){return qo[t.getDay()]},A:function(t){return To[t.getDay()]},b:function(t){return zo[t.getMonth()]},B:function(t){return Co[t.getMonth()]},c:d3.time.format(Eo),d:function(t,n){return nu(t.getDate(),n,2)},e:function(t,n){return nu(t.getDate(),n,2)},H:function(t,n){return nu(t.getHours(),n,2)},I:function(t,n){return nu(t.getHours()%12||12,n,2)},j:function(t,n){return nu(1+d3.time.dayOfYear(t),n,3)},L:function(t,n){return nu(t.getMilliseconds(),n,3)},m:function(t,n){return nu(t.getMonth()+1,n,2)},M:function(t,n){return nu(t.getMinutes(),n,2)},p:function(t){return t.getHours()>=12?"PM":"AM"},S:function(t,n){return nu(t.getSeconds(),n,2)},U:function(t,n){return nu(d3.time.sundayOfYear(t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return nu(d3.time.mondayOfYear(t),n,2)},x:d3.time.format(Ao),X:d3.time.format(No),y:function(t,n){return nu(t.getFullYear()%100,n,2)},Y:function(t,n){return nu(t.getFullYear()%1e4,n,4)},Z:Mu,"%":function(){return"%"}},Yo={a:eu,A:ru,b:iu,B:uu,c:au,d:du,e:du,H:gu,I:gu,L:vu,m:hu,M:pu,p:yu,S:mu,x:ou,X:cu,y:su,Y:lu},Uo=/^\s*\d+/,Io=d3.map({am:0,pm:1});d3.time.format.utc=function(t){function n(t){try{wo=Ki;var n=new wo;return n._=t,e(n)}finally{wo=Date}}var e=d3.time.format(t);return n.parse=function(t){try{wo=Ki;var n=e.parse(t);return n&&n._}finally{wo=Date}},n.toString=e.toString,n};var Vo=d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");d3.time.format.iso=Date.prototype.toISOString?bu:Vo,bu.parse=function(t){var n=new Date(t);return isNaN(n)?null:n},bu.toString=Vo.toString,d3.time.second=xu(function(t){return new wo(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(t.getTime()+1e3*Math.floor(n))},function(t){return t.getSeconds()}),d3.time.seconds=d3.time.second.range,d3.time.seconds.utc=d3.time.second.utc.range,d3.time.minute=xu(function(t){return new wo(6e4*Math.floor(t/6e4))},function(t,n){t.setTime(t.getTime()+6e4*Math.floor(n))},function(t){return t.getMinutes()}),d3.time.minutes=d3.time.minute.range,d3.time.minutes.utc=d3.time.minute.utc.range,d3.time.hour=xu(function(t){var n=t.getTimezoneOffset()/60;return new wo(36e5*(Math.floor(t/36e5-n)+n))},function(t,n){t.setTime(t.getTime()+36e5*Math.floor(n))},function(t){return t.getHours()}),d3.time.hours=d3.time.hour.range,d3.time.hours.utc=d3.time.hour.utc.range,d3.time.day=xu(function(t){var n=new wo(1970,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n},function(t,n){t.setDate(t.getDate()+n)},function(t){return t.getDate()-1}),d3.time.days=d3.time.day.range,d3.time.days.utc=d3.time.day.utc.range,d3.time.dayOfYear=function(t){var n=d3.time.year(t);return Math.floor((t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)},So.forEach(function(t,n){t=t.toLowerCase(),n=7-n;var e=d3.time[t]=xu(function(t){return(t=d3.time.day(t)).setDate(t.getDate()-(t.getDay()+n)%7),t},function(t,n){t.setDate(t.getDate()+7*Math.floor(n))},function(t){var e=d3.time.year(t).getDay();return Math.floor((d3.time.dayOfYear(t)+(e+n)%7)/7)-(e!==n)});d3.time[t+"s"]=e.range,d3.time[t+"s"].utc=e.utc.range,d3.time[t+"OfYear"]=function(t){var e=d3.time.year(t).getDay();return Math.floor((d3.time.dayOfYear(t)+(e+n)%7)/7)}}),d3.time.week=d3.time.sunday,d3.time.weeks=d3.time.sunday.range,d3.time.weeks.utc=d3.time.sunday.utc.range,d3.time.weekOfYear=d3.time.sundayOfYear,d3.time.month=xu(function(t){return t=d3.time.day(t),t.setDate(1),t},function(t,n){t.setMonth(t.getMonth()+n)},function(t){return t.getMonth()}),d3.time.months=d3.time.month.range,d3.time.months.utc=d3.time.month.utc.range,d3.time.year=xu(function(t){return t=d3.time.day(t),t.setMonth(0,1),t},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t){return t.getFullYear()}),d3.time.years=d3.time.year.range,d3.time.years.utc=d3.time.year.utc.range;var Xo=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Zo=[[d3.time.second,1],[d3.time.second,5],[d3.time.second,15],[d3.time.second,30],[d3.time.minute,1],[d3.time.minute,5],[d3.time.minute,15],[d3.time.minute,30],[d3.time.hour,1],[d3.time.hour,3],[d3.time.hour,6],[d3.time.hour,12],[d3.time.day,1],[d3.time.day,2],[d3.time.week,1],[d3.time.month,1],[d3.time.month,3],[d3.time.year,1]],Bo=[[d3.time.format("%Y"),o],[d3.time.format("%B"),function(t){return t.getMonth()}],[d3.time.format("%b %d"),function(t){return 1!=t.getDate()}],[d3.time.format("%a %d"),function(t){return t.getDay()&&1!=t.getDate()}],[d3.time.format("%I %p"),function(t){return t.getHours()}],[d3.time.format("%I:%M"),function(t){return t.getMinutes()}],[d3.time.format(":%S"),function(t){return t.getSeconds()}],[d3.time.format(".%L"),function(t){return t.getMilliseconds()}]],$o=d3.scale.linear(),Jo=Eu(Bo);Zo.year=function(t,n){return $o.domain(t.map(Nu)).ticks(n).map(Au)},d3.time.scale=function(){return wu(d3.scale.linear(),Zo,Jo)};var Go=Zo.map(function(t){return[t[0].utc,t[1]]}),Ko=[[d3.time.format.utc("%Y"),o],[d3.time.format.utc("%B"),function(t){return t.getUTCMonth()}],[d3.time.format.utc("%b %d"),function(t){return 1!=t.getUTCDate()}],[d3.time.format.utc("%a %d"),function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],[d3.time.format.utc("%I %p"),function(t){return t.getUTCHours()}],[d3.time.format.utc("%I:%M"),function(t){return t.getUTCMinutes()}],[d3.time.format.utc(":%S"),function(t){return t.getUTCSeconds()}],[d3.time.format.utc(".%L"),function(t){return t.getUTCMilliseconds()}]],Wo=Eu(Ko);Go.year=function(t,n){return $o.domain(t.map(qu)).ticks(n).map(Tu)},d3.time.scale.utc=function(){return wu(d3.scale.linear(),Go,Wo)}})();
\ No newline at end of file
diff --git a/dgbuilder/public/favicon.ico b/dgbuilder/public/favicon.ico
new file mode 100644
index 0000000..10210a7
--- /dev/null
+++ b/dgbuilder/public/favicon.ico
Binary files differ
diff --git a/dgbuilder/public/font-awesome/css/font-awesome.min.css b/dgbuilder/public/font-awesome/css/font-awesome.min.css
new file mode 100644
index 0000000..ec53d4d
--- /dev/null
+++ b/dgbuilder/public/font-awesome/css/font-awesome.min.css
@@ -0,0 +1,4 @@
+/*!
+ * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.2.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}
\ No newline at end of file
diff --git a/dgbuilder/public/font-awesome/fonts/FontAwesome.otf b/dgbuilder/public/font-awesome/fonts/FontAwesome.otf
new file mode 100644
index 0000000..81c9ad9
--- /dev/null
+++ b/dgbuilder/public/font-awesome/fonts/FontAwesome.otf
Binary files differ
diff --git a/dgbuilder/public/font-awesome/fonts/fontawesome-webfont.eot b/dgbuilder/public/font-awesome/fonts/fontawesome-webfont.eot
new file mode 100755
index 0000000..84677bc
--- /dev/null
+++ b/dgbuilder/public/font-awesome/fonts/fontawesome-webfont.eot
Binary files differ
diff --git a/dgbuilder/public/font-awesome/fonts/fontawesome-webfont.svg b/dgbuilder/public/font-awesome/fonts/fontawesome-webfont.svg
new file mode 100755
index 0000000..d907b25
--- /dev/null
+++ b/dgbuilder/public/font-awesome/fonts/fontawesome-webfont.svg
@@ -0,0 +1,520 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="fontawesomeregular" horiz-adv-x="1536" >
+<font-face units-per-em="1792" ascent="1536" descent="-256" />
+<missing-glyph horiz-adv-x="448" />
+<glyph unicode=" " horiz-adv-x="448" />
+<glyph unicode="	" horiz-adv-x="448" />
+<glyph unicode=" " horiz-adv-x="448" />
+<glyph unicode="¨" horiz-adv-x="1792" />
+<glyph unicode="©" horiz-adv-x="1792" />
+<glyph unicode="®" horiz-adv-x="1792" />
+<glyph unicode="´" horiz-adv-x="1792" />
+<glyph unicode="Æ" horiz-adv-x="1792" />
+<glyph unicode="Ø" horiz-adv-x="1792" />
+<glyph unicode=" " horiz-adv-x="768" />
+<glyph unicode=" " horiz-adv-x="1537" />
+<glyph unicode=" " horiz-adv-x="768" />
+<glyph unicode=" " horiz-adv-x="1537" />
+<glyph unicode=" " horiz-adv-x="512" />
+<glyph unicode=" " horiz-adv-x="384" />
+<glyph unicode=" " horiz-adv-x="256" />
+<glyph unicode=" " horiz-adv-x="256" />
+<glyph unicode=" " horiz-adv-x="192" />
+<glyph unicode=" " horiz-adv-x="307" />
+<glyph unicode=" " horiz-adv-x="85" />
+<glyph unicode=" " horiz-adv-x="307" />
+<glyph unicode=" " horiz-adv-x="384" />
+<glyph unicode="™" horiz-adv-x="1792" />
+<glyph unicode="∞" horiz-adv-x="1792" />
+<glyph unicode="≠" horiz-adv-x="1792" />
+<glyph unicode="◼" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1699 1350q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5z" />
+<glyph unicode="" d="M1536 1312v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89 t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5 t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1664 32v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1664 1083v11v13.5t-0.5 13 t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317q54 43 100.5 115.5t46.5 131.5z M1792 1120v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
+<glyph unicode="" horiz-adv-x="1792" d="M896 -128q-26 0 -44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600 q-18 -18 -44 -18z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455 l502 -73q56 -9 56 -46z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1137 532l306 297l-422 62l-189 382l-189 -382l-422 -62l306 -297l-73 -421l378 199l377 -199zM1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500 l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1408 131q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q9 0 42 -21.5t74.5 -48t108 -48t133.5 -21.5t133.5 21.5t108 48t74.5 48t42 21.5q61 0 111.5 -20t85.5 -53.5t62 -81 t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="" horiz-adv-x="1920" d="M384 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 320v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 704v128q0 26 -19 45t-45 19h-128 q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 -64v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM384 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45 t45 -19h128q26 0 45 19t19 45zM1792 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 704v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1792 320v128 q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 704v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19 t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1920 1248v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="" horiz-adv-x="1664" d="M768 512v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM768 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 512v-384q0 -52 -38 -90t-90 -38 h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
+<glyph unicode="" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 288v-192q0 -40 -28 -68t-68 -28h-320 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68z" />
+<glyph unicode="" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h960q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1671 970q0 -40 -28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68 t-28 -68l-294 -294l294 -294q28 -28 28 -68z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224 q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5 t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5z M1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z " />
+<glyph unicode="" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5 t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343zM896 1408v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90v640q0 52 38 90t90 38t90 -38t38 -90z" />
+<glyph unicode="" horiz-adv-x="1792" d="M256 96v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 224v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 480v-576q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1408 864v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1376v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23z" />
+<glyph unicode="" d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1536 749v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108q-44 -23 -91 -38 q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5v222q0 12 8 23t19 13 l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10q129 -119 165 -170q7 -8 7 -22 q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5z" />
+<glyph unicode="" horiz-adv-x="1408" d="M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832 q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5 l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z" />
+<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z " />
+<glyph unicode="" d="M896 992v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="1920" d="M1111 540v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20zM1870 73q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256 q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1280 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 416v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h465l135 -136 q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68zM1339 985q17 -41 -14 -70l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39z" />
+<glyph unicode="" d="M1120 608q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273 t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1118 660q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198 t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1023 576h316q-1 3 -2.5 8t-2.5 8l-212 496h-708l-212 -496q-1 -2 -2.5 -8t-2.5 -8h316l95 -192h320zM1536 546v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552 q25 -61 25 -123z" />
+<glyph unicode="" d="M1184 640q0 -37 -32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q14 0 25 -9 l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59z" />
+<glyph unicode="" d="M1511 480q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129q-19 -19 -45 -19t-45 19t-19 45v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117 q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5zM1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5v7q65 268 270 434.5t480 166.5 q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1792" d="M384 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M384 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1536 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5z M1536 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5zM1536 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5 t9.5 -22.5zM1664 160v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 1248v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47 t47 -113z" />
+<glyph unicode="" horiz-adv-x="1152" d="M320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192zM1152 672v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68z" />
+<glyph unicode="" horiz-adv-x="1792" d="M320 1280q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48 t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1664 650q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78 t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314q0 151 67 291t179 242.5 t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291z" />
+<glyph unicode="" horiz-adv-x="768" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1152" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142z" />
+<glyph unicode="" horiz-adv-x="1664" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5 t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289 t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z" />
+<glyph unicode="" horiz-adv-x="1408" d="M384 384v-128h-128v128h128zM384 1152v-128h-128v128h128zM1152 1152v-128h-128v128h128zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM896 896h384v384h-384v-384zM640 640v-640h-640v640h640zM1152 128v-128h-128v128h128zM1408 128v-128h-128v128h128z M1408 640v-384h-384v128h-128v-384h-128v640h384v-128h128v128h128zM640 1408v-640h-640v640h640zM1408 1408v-640h-640v640h640z" />
+<glyph unicode="" horiz-adv-x="1792" d="M63 0h-63v1408h63v-1408zM126 1h-32v1407h32v-1407zM220 1h-31v1407h31v-1407zM377 1h-31v1407h31v-1407zM534 1h-62v1407h62v-1407zM660 1h-31v1407h31v-1407zM723 1h-31v1407h31v-1407zM786 1h-31v1407h31v-1407zM943 1h-63v1407h63v-1407zM1100 1h-63v1407h63v-1407z M1226 1h-63v1407h63v-1407zM1352 1h-63v1407h63v-1407zM1446 1h-63v1407h63v-1407zM1635 1h-94v1407h94v-1407zM1698 1h-32v1407h32v-1407zM1792 0h-63v1408h63v-1408z" />
+<glyph unicode="" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91z" />
+<glyph unicode="" horiz-adv-x="1920" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91zM1899 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1639 1058q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23 q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906 q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57q38 -15 59 -43zM575 1056q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5 t-16.5 -22.5zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" />
+<glyph unicode="" horiz-adv-x="1280" d="M1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
+<glyph unicode="" horiz-adv-x="1664" d="M384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1536 576q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 576v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68 v160h-224q-13 0 -22.5 9.5t-9.5 22.5v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5z" />
+<glyph unicode="" horiz-adv-x="1920" d="M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136 q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="" horiz-adv-x="1664" d="M725 977l-170 -450q33 0 136.5 -2t160.5 -2q19 0 57 2q-87 253 -184 452zM0 -128l2 79q23 7 56 12.5t57 10.5t49.5 14.5t44.5 29t31 50.5l237 616l280 724h75h53q8 -14 11 -21l205 -480q33 -78 106 -257.5t114 -274.5q15 -34 58 -144.5t72 -168.5q20 -45 35 -57 q19 -15 88 -29.5t84 -20.5q6 -38 6 -57q0 -4 -0.5 -13t-0.5 -13q-63 0 -190 8t-191 8q-76 0 -215 -7t-178 -8q0 43 4 78l131 28q1 0 12.5 2.5t15.5 3.5t14.5 4.5t15 6.5t11 8t9 11t2.5 14q0 16 -31 96.5t-72 177.5t-42 100l-450 2q-26 -58 -76.5 -195.5t-50.5 -162.5 q0 -22 14 -37.5t43.5 -24.5t48.5 -13.5t57 -8.5t41 -4q1 -19 1 -58q0 -9 -2 -27q-58 0 -174.5 10t-174.5 10q-8 0 -26.5 -4t-21.5 -4q-80 -14 -188 -14z" />
+<glyph unicode="" horiz-adv-x="1408" d="M555 15q74 -32 140 -32q376 0 376 335q0 114 -41 180q-27 44 -61.5 74t-67.5 46.5t-80.5 25t-84 10.5t-94.5 2q-73 0 -101 -10q0 -53 -0.5 -159t-0.5 -158q0 -8 -1 -67.5t-0.5 -96.5t4.5 -83.5t12 -66.5zM541 761q42 -7 109 -7q82 0 143 13t110 44.5t74.5 89.5t25.5 142 q0 70 -29 122.5t-79 82t-108 43.5t-124 14q-50 0 -130 -13q0 -50 4 -151t4 -152q0 -27 -0.5 -80t-0.5 -79q0 -46 1 -69zM0 -128l2 94q15 4 85 16t106 27q7 12 12.5 27t8.5 33.5t5.5 32.5t3 37.5t0.5 34v35.5v30q0 982 -22 1025q-4 8 -22 14.5t-44.5 11t-49.5 7t-48.5 4.5 t-30.5 3l-4 83q98 2 340 11.5t373 9.5q23 0 68.5 -0.5t67.5 -0.5q70 0 136.5 -13t128.5 -42t108 -71t74 -104.5t28 -137.5q0 -52 -16.5 -95.5t-39 -72t-64.5 -57.5t-73 -45t-84 -40q154 -35 256.5 -134t102.5 -248q0 -100 -35 -179.5t-93.5 -130.5t-138 -85.5t-163.5 -48.5 t-176 -14q-44 0 -132 3t-132 3q-106 0 -307 -11t-231 -12z" />
+<glyph unicode="" horiz-adv-x="1024" d="M0 -126l17 85q6 2 81.5 21.5t111.5 37.5q28 35 41 101q1 7 62 289t114 543.5t52 296.5v25q-24 13 -54.5 18.5t-69.5 8t-58 5.5l19 103q33 -2 120 -6.5t149.5 -7t120.5 -2.5q48 0 98.5 2.5t121 7t98.5 6.5q-5 -39 -19 -89q-30 -10 -101.5 -28.5t-108.5 -33.5 q-8 -19 -14 -42.5t-9 -40t-7.5 -45.5t-6.5 -42q-27 -148 -87.5 -419.5t-77.5 -355.5q-2 -9 -13 -58t-20 -90t-16 -83.5t-6 -57.5l1 -18q17 -4 185 -31q-3 -44 -16 -99q-11 0 -32.5 -1.5t-32.5 -1.5q-29 0 -87 10t-86 10q-138 2 -206 2q-51 0 -143 -9t-121 -11z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1744 128q33 0 42 -18.5t-11 -44.5l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5t42 18.5h80v1024h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80zM81 1407l54 -27q12 -5 211 -5q44 0 132 2 t132 2q36 0 107.5 -0.5t107.5 -0.5h293q6 0 21 -0.5t20.5 0t16 3t17.5 9t15 17.5l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 48t-14.5 73.5t-7.5 35.5q-6 8 -12 12.5t-15.5 6t-13 2.5t-18 0.5t-16.5 -0.5 q-17 0 -66.5 0.5t-74.5 0.5t-64 -2t-71 -6q-9 -81 -8 -136q0 -94 2 -388t2 -455q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q19 42 19 383q0 101 -3 303t-3 303v117q0 2 0.5 15.5t0.5 25t-1 25.5t-3 24t-5 14q-11 12 -162 12q-33 0 -93 -12t-80 -26q-19 -13 -34 -72.5t-31.5 -111t-42.5 -53.5q-42 26 -56 44v383z" />
+<glyph unicode="" d="M81 1407l54 -27q12 -5 211 -5q44 0 132 2t132 2q70 0 246.5 1t304.5 0.5t247 -4.5q33 -1 56 31l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 47.5t-15 73.5t-7 36q-10 13 -27 19q-5 2 -66 2q-30 0 -93 1t-103 1 t-94 -2t-96 -7q-9 -81 -8 -136l1 -152v52q0 -55 1 -154t1.5 -180t0.5 -153q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q7 16 11.5 74t6 145.5t1.5 155t-0.5 153.5t-0.5 89q0 7 -2.5 21.5t-2.5 22.5q0 7 0.5 44t1 73t0 76.5t-3 67.5t-6.5 32q-11 12 -162 12q-41 0 -163 -13.5t-138 -24.5q-19 -12 -34 -71.5t-31.5 -111.5t-42.5 -54q-42 26 -56 44v383zM1310 125q12 0 42 -19.5t57.5 -41.5 t59.5 -49t36 -30q26 -21 26 -49t-26 -49q-4 -3 -36 -30t-59.5 -49t-57.5 -41.5t-42 -19.5q-13 0 -20.5 10.5t-10 28.5t-2.5 33.5t1.5 33t1.5 19.5h-1024q0 -2 1.5 -19.5t1.5 -33t-2.5 -33.5t-10 -28.5t-20.5 -10.5q-12 0 -42 19.5t-57.5 41.5t-59.5 49t-36 30q-26 21 -26 49 t26 49q4 3 36 30t59.5 49t57.5 41.5t42 19.5q13 0 20.5 -10.5t10 -28.5t2.5 -33.5t-1.5 -33t-1.5 -19.5h1024q0 2 -1.5 19.5t-1.5 33t2.5 33.5t10 28.5t20.5 10.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h896q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45t-45 -19 h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1792" d="M256 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM256 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5 t9.5 -22.5zM256 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344 q13 0 22.5 -9.5t9.5 -22.5zM256 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192 q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M384 992v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23t9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M352 704q0 -14 -9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 1184v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5 q39 -17 39 -59z" />
+<glyph unicode="" horiz-adv-x="1920" d="M640 960q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 576v-448h-1408v192l320 320l160 -160l512 512zM1760 1280h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216 q0 13 -9.5 22.5t-22.5 9.5zM1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="" d="M363 0l91 91l-235 235l-91 -91v-107h128v-128h107zM886 928q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17zM832 1120l416 -416l-832 -832h-416v416zM1515 1024q0 -53 -37 -90l-166 -166l-416 416l166 165q36 38 90 38 q53 0 91 -38l235 -234q37 -39 37 -91z" />
+<glyph unicode="" horiz-adv-x="1024" d="M768 896q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1024 896q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179q0 212 150 362t362 150t362 -150t150 -362z" />
+<glyph unicode="" d="M768 96v1088q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="1024" d="M512 384q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 512q0 -212 -150 -362t-362 -150t-362 150t-150 362 q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275z" />
+<glyph unicode="" horiz-adv-x="1792" d="M888 352l116 116l-152 152l-116 -116v-56h96v-96h56zM1328 1072q-16 16 -33 -1l-350 -350q-17 -17 -1 -33t33 1l350 350q17 17 1 33zM1408 478v-190q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29zM1312 1216l288 -288l-672 -672h-288v288zM1756 1084l-92 -92 l-288 288l92 92q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1408 547v-259q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h255v0q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832 q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29zM1645 1043l-384 -384q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5 t-38.5 114t-17.5 122q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832 q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 q24 -24 24 -57t-24 -57z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45 t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="" horiz-adv-x="1024" d="M979 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1747 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710 q19 19 32 13t13 -32v-710q4 11 13 19z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1619 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-8 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45t19 45l710 710q19 19 32 13t13 -32v-710q5 11 13 19z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1384 609l-1328 -738q-23 -13 -39.5 -3t-16.5 36v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31z" />
+<glyph unicode="" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45zM640 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45z" />
+<glyph unicode="" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1664" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
+<glyph unicode="" horiz-adv-x="1792" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710 q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
+<glyph unicode="" horiz-adv-x="1024" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19z" />
+<glyph unicode="" horiz-adv-x="1538" d="M14 557l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13t13 32zM1473 0h-1408q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19z" />
+<glyph unicode="" horiz-adv-x="1280" d="M1171 1235l-531 -531l531 -531q19 -19 19 -45t-19 -45l-166 -166q-19 -19 -45 -19t-45 19l-742 742q-19 19 -19 45t19 45l742 742q19 19 45 19t45 -19l166 -166q19 -19 19 -45t-19 -45z" />
+<glyph unicode="" horiz-adv-x="1280" d="M1107 659l-742 -742q-19 -19 -45 -19t-45 19l-166 166q-19 19 -19 45t19 45l531 531l-531 531q-19 19 -19 45t19 45l166 166q19 19 45 19t45 -19l742 -742q19 -19 19 -45t-19 -45z" />
+<glyph unicode="" d="M1216 576v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5 t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1216 576v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" />
+<glyph unicode="" d="M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19 q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1284 802q0 28 -18 46l-91 90q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M896 160v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1152 832q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26t37.5 -59 q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23 t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1197 512h-109q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109 q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5zM1536 704v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143 q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45z" />
+<glyph unicode="" d="M1097 457l-146 -146q-10 -10 -23 -10t-23 10l-137 137l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23 l-137 -137l137 -137q10 -10 10 -23t-10 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5 t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1171 723l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45t19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198 t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1312 643q0 161 -87 295l-754 -753q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5zM313 344l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199t-73 -274q0 -162 89 -299zM1536 643q0 -157 -61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61 t-245 164t-163.5 246t-61 300t61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5z" />
+<glyph unicode="" d="M1536 640v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5 t32.5 -90.5z" />
+<glyph unicode="" d="M1472 576q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1611 565q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75q-38 38 -38 90q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651 q37 -39 37 -91z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1611 704q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 896q0 -26 -19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22 t-13.5 30t-10.5 24q-127 285 -127 451q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45z" />
+<glyph unicode="" d="M755 480q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23zM1536 1344v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332 q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45z" />
+<glyph unicode="" d="M768 576v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45zM1523 1248q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45 t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1482 486q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5t59.5 77.5l266 154l-266 154 q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5l-266 -154z" />
+<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM896 161v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190q0 -13 10 -23t23 -10h192 q13 0 22 9.5t9 23.5zM894 505l18 621q0 12 -10 18q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5z" />
+<glyph unicode="" d="M928 180v56v468v192h-320v-192v-468v-56q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5zM472 1024h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68t28 -68t68 -28zM1160 1120q0 40 -28 68t-68 28q-43 0 -69 -31l-125 -161h194q40 0 68 28t28 68zM1536 864v-320 q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5 t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1280 832q0 26 -19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45q0 -26 19 -45t45 -19q24 0 45 19q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45zM1792 1030q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268 q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-30 0 -51 11t-31 24t-27 42q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5 t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1408 -160v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1152 896q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1 q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100t113.5 -122.5t72.5 -150.5t27.5 -184z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z" />
+<glyph unicode="" horiz-adv-x="1792" d="M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9 q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5 q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z " />
+<glyph unicode="" horiz-adv-x="1792" d="M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185 q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1376 1376q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23q-1 13 9 25l96 97q9 9 23 9 q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12z" />
+<glyph unicode="" horiz-adv-x="1664" d="M128 -128h288v288h-288v-288zM480 -128h320v288h-320v-288zM128 224h288v320h-288v-320zM480 224h320v320h-320v-320zM128 608h288v288h-288v-288zM864 -128h320v288h-320v-288zM480 608h320v288h-320v-288zM1248 -128h288v288h-288v-288zM864 224h320v320h-320v-320z M512 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1248 224h288v320h-288v-320zM864 608h320v288h-320v-288zM1248 608h288v288h-288v-288zM1280 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64 q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47 h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="" horiz-adv-x="1792" d="M666 1055q-60 -92 -137 -273q-22 45 -37 72.5t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q250 0 410 -225zM1792 256q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192q-32 0 -85 -0.5t-81 -1t-73 1 t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1792 1152q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5 v192h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111 t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281 q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5z" />
+<glyph unicode="" d="M1536 704v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5t-98.5 362v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384 q26 0 45 -19t19 -45zM512 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45zM1536 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1683 205l-166 -165q-19 -19 -45 -19t-45 19l-531 531l-531 -531q-19 -19 -45 -19t-45 19l-166 165q-19 19 -19 45.5t19 45.5l742 741q19 19 45 19t45 -19l742 -741q19 -19 19 -45.5t-19 -45.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1683 728l-742 -741q-19 -19 -45 -19t-45 19l-742 741q-19 19 -19 45.5t19 45.5l166 165q19 19 45 19t45 -19l531 -531l531 531q19 19 45 19t45 -19l166 -165q19 -19 19 -45.5t-19 -45.5z" />
+<glyph unicode="" horiz-adv-x="1920" d="M1280 32q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -11 7 -21 zM1920 448q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45z " />
+<glyph unicode="" horiz-adv-x="1664" d="M640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5 l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5 t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
+<glyph unicode="" horiz-adv-x="1920" d="M1879 584q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43zM1536 928v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5 t-0.5 12.5v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158z" />
+<glyph unicode="" horiz-adv-x="768" d="M704 1216q0 -26 -19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="" horiz-adv-x="2048" d="M640 640v-512h-256v512h256zM1024 1152v-1024h-256v1024h256zM2048 0v-128h-2048v1536h128v-1408h1920zM1408 896v-768h-256v768h256zM1792 1280v-1152h-256v1152h256z" />
+<glyph unicode="" d="M1280 926q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4 q21 -63 74.5 -104t121.5 -42q-116 -90 -261 -90q-26 0 -50 3q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5 t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" d="M1536 160q0 -119 -84.5 -203.5t-203.5 -84.5h-192v608h203l30 224h-233v143q0 54 28 83t96 29l132 1v207q-96 9 -180 9q-136 0 -218 -80.5t-82 -225.5v-166h-224v-224h224v-608h-544q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960 q119 0 203.5 -84.5t84.5 -203.5v-960z" />
+<glyph unicode="" horiz-adv-x="1792" d="M928 704q0 14 -9 23t-23 9q-66 0 -113 -47t-47 -113q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9t9 23zM1152 574q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM128 0h1536v128h-1536v-128zM1280 574q0 159 -112.5 271.5 t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM256 1216h384v128h-384v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM1792 1280v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5v1280 q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M832 1024q0 80 -56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136t56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56t56 136zM1683 320q0 -17 -49 -66t-66 -49q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26 l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5 t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41z" />
+<glyph unicode="" horiz-adv-x="1920" d="M896 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1664 128q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1152q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1280 731v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -10 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5 l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7 l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8q144 -133 144 -160q0 -9 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152 -23q10 -2 17 -10.5t7 -19.5zM1920 198v-140q0 -16 -149 -31 q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20 t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31zM1920 1222v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68 q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70 q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1408 768q0 -139 -94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224 q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257zM1792 512q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7 q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230z" />
+<glyph unicode="" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 768q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5 t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81zM1536 769 q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128 q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179z" />
+<glyph unicode="" d="M256 1088q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 512q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 32 18 69t-17.5 73.5t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5 t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640h32q16 0 35.5 -9t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5z M1536 511q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5 h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -74 49 -163z" />
+<glyph unicode="" horiz-adv-x="896" d="M832 1504v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1664 940q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5t-21.5 -143q0 -168 187 -355l581 -560l580 559 q188 188 188 356zM1792 940q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5 q224 0 351 -124t127 -344z" />
+<glyph unicode="" horiz-adv-x="1664" d="M640 96q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704 q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5zM1568 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45z" />
+<glyph unicode="" d="M237 122h231v694h-231v-694zM483 1030q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5zM1068 122h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694h231v388q0 38 7 56q15 35 45 59.5t74 24.5 q116 0 116 -157v-371zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1152" d="M480 672v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448q0 -14 9 -23t23 -9t23 9t9 23zM1152 320q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19t-19 45q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38 t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1408 608v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1792 1472v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45z" />
+<glyph unicode="" d="M1184 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45zM1536 992v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5 q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1664" d="M458 653q-74 162 -74 371h-256v-96q0 -78 94.5 -162t235.5 -113zM1536 928v96h-256q0 -209 -74 -371q141 29 235.5 113t94.5 162zM1664 1056v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91 t97.5 -37q75 0 133.5 -45.5t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143v128q0 40 28 68t68 28h288v96 q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68z" />
+<glyph unicode="" d="M394 184q-8 -9 -20 3q-13 11 -4 19q8 9 20 -3q12 -11 4 -19zM352 245q9 -12 0 -19q-8 -6 -17 7t0 18q9 7 17 -6zM291 305q-5 -7 -13 -2q-10 5 -7 12q3 5 13 2q10 -5 7 -12zM322 271q-6 -7 -16 3q-9 11 -2 16q6 6 16 -3q9 -11 2 -16zM451 159q-4 -12 -19 -6q-17 4 -13 15 t19 7q16 -5 13 -16zM514 154q0 -11 -16 -11q-17 -2 -17 11q0 11 16 11q17 2 17 -11zM572 164q2 -10 -14 -14t-18 8t14 15q16 2 18 -9zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-224q-16 0 -24.5 1t-19.5 5t-16 14.5t-5 27.5v239q0 97 -52 142q57 6 102.5 18t94 39 t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103 q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -103t0.5 -68q0 -22 -11 -33.5t-22 -13t-33 -1.5 h-224q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1280 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 288v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h427q21 -56 70.5 -92 t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68zM1339 936q-17 -40 -59 -40h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69z" />
+<glyph unicode="" d="M1407 710q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5 q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275zM1535 712q0 -165 -70 -327.5t-196 -288t-281 -180.5q-124 -44 -326 -44 q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5 q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -10 1 -18.5t3 -17t4 -13.5t6.5 -16t6.5 -17q16 -40 25 -118.5t9 -136.5z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1408 296q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -52.5 3.5t-57.5 12.5t-47.5 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-128 79 -264.5 215.5t-215.5 264.5q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47.5t-12.5 57.5t-3.5 52.5 q0 92 51 186q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235t235 -174 q2 -1 19 -11.5t24 -14t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1280" d="M1152 1280h-1024v-1242l423 406l89 85l89 -85l423 -406v1242zM1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289 q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
+<glyph unicode="" d="M1280 343q0 11 -2 16q-3 8 -38.5 29.5t-88.5 49.5l-53 29q-5 3 -19 13t-25 15t-21 5q-18 0 -47 -32.5t-57 -65.5t-44 -33q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170.5 126.5t-126.5 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5t-3.5 16.5q0 13 20.5 33.5t45 38.5 t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5t320.5 -216.5q6 -2 30 -11t33 -12.5 t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1620 1128q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41 q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50z" />
+<glyph unicode="" horiz-adv-x="1024" d="M959 1524v-264h-157q-86 0 -116 -36t-30 -108v-189h293l-39 -296h-254v-759h-306v759h-255v296h255v218q0 186 104 288.5t277 102.5q147 0 228 -12z" />
+<glyph unicode="" d="M1536 640q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -39.5 7t-12.5 30v211q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5 q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23 q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -89t0.5 -54q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1664 960v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5 t316.5 -131.5t131.5 -316.5z" />
+<glyph unicode="" horiz-adv-x="1920" d="M1760 1408q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600zM160 1280q-13 0 -22.5 -9.5t-9.5 -22.5v-224h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600zM1760 0q13 0 22.5 9.5t9.5 22.5v608h-1664v-608 q0 -13 9.5 -22.5t22.5 -9.5h1600zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" />
+<glyph unicode="" horiz-adv-x="1408" d="M384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 69q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5t-391.5 184.5q-25 2 -41.5 20t-16.5 43v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5 t259 -181.5q114 -113 181.5 -259t80.5 -306zM1408 67q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102q-25 1 -42.5 19.5t-17.5 43.5v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294 q187 -186 294 -425.5t120 -501.5z" />
+<glyph unicode="" d="M1040 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1296 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1408 160v320q0 13 -9.5 22.5t-22.5 9.5 h-1216q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM1536 480v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v320q0 25 16 75 l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1664 896q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5 t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384zM1536 292v954q-394 -302 -768 -343v-270q377 -42 768 -341z" />
+<glyph unicode="" horiz-adv-x="1792" d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM246 128h1300q-266 300 -266 832q0 51 -24 105t-69 103t-121.5 80.5t-169.5 31.5t-169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -532 -266 -832z M1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5 t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" />
+<glyph unicode="" d="M1376 640l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53q-41 -12 -70 19q-31 29 -19 70 l53 186l-188 48q-40 10 -52 51q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70 l-53 -186l188 -48q40 -10 52 -51q10 -42 -20 -70z" />
+<glyph unicode="" horiz-adv-x="1792" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 768q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106 q-69 -57 -140 -57h-32v-640h32q72 0 167 -32t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90zM1792 769q0 -105 -75.5 -181t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43 q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5 t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1376 128h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-2 3 -3.5 4.5t-4 4.5t-4.5 5q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576 q-50 0 -89 -38.5t-39 -89.5q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32zM1664 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45 t45 -19t45 19t19 45zM1792 768v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181q0 103 76 179t180 76h374q-22 60 -22 128 q0 122 81.5 189t206.5 67q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="" d="M1280 -64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 700q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576 q-20 0 -48.5 15t-55 33t-68 33t-84.5 15q-67 0 -97.5 -44.5t-30.5 -115.5q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140v-32h640v32q0 72 32 167t64 193.5t32 179.5zM1536 705q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5 t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76 q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227z" />
+<glyph unicode="" d="M1408 576q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33 t55 33t48.5 15v-576q0 -50 38.5 -89t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5zM1280 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 580 q0 -142 -77.5 -230t-217.5 -87l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100 q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317z" />
+<glyph unicode="" d="M1280 576v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45t18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502q26 0 45 19t19 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1285 640q0 27 -18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18l362 362l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1284 641q0 27 -18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45t18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1284 639q0 27 -18 45l-91 91q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45t18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1042 887q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11 q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 10.5t-9.5 10.5q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5 q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5 q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17t10.5 17q9 6 14 5.5t14.5 -5.5 t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-5 7 -8 9q-12 4 -27 -5q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3 q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -4.5t-6 -4q-3 -4 0 -14t-2 -14q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25 q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5q-16 0 -22 -1q-146 -80 -235 -222q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5 t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-15 25 -17 29q-3 5 -5.5 15.5 t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10t17 -20q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21 q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5 q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3 q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5t0 14t-1.5 12.5l-1 8v18l-1 8q-15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5 t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q7 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5 q15 10 -7 16q-17 5 -43 -12zM879 10q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7t-10 1.5t-11.5 -7 q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -25 -29 -40q-4 -22 12 -26q0 -7 -8 -20.5t-7 -21.5q0 -6 2 -16z" />
+<glyph unicode="" horiz-adv-x="1664" d="M384 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1028 484l-682 -682q-37 -37 -90 -37q-52 0 -91 37l-106 108q-38 36 -38 90q0 53 38 91l681 681q39 -98 114.5 -173.5t173.5 -114.5zM1662 919q0 -39 -23 -106q-47 -134 -164.5 -217.5 t-258.5 -83.5q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q58 0 121.5 -16.5t107.5 -46.5q16 -11 16 -28t-16 -28l-293 -169v-224l193 -107q5 3 79 48.5t135.5 81t70.5 35.5q15 0 23.5 -10t8.5 -25z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1024 128h640v128h-640v-128zM640 640h1024v128h-1024v-128zM1280 1152h384v128h-384v-128zM1792 320v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 832v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19 t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1403 1241q17 -41 -14 -70l-493 -493v-742q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-256 256q-19 19 -19 45v486l-493 493q-31 29 -14 70q17 39 59 39h1280q42 0 59 -39z" />
+<glyph unicode="" horiz-adv-x="1792" d="M640 1280h512v128h-512v-128zM1792 640v-480q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v480h672v-160q0 -26 19 -45t45 -19h320q26 0 45 19t19 45v160h672zM1024 640v-128h-256v128h256zM1792 1120v-384h-1792v384q0 66 47 113t113 47h352v160q0 40 28 68 t68 28h576q40 0 68 -28t28 -68v-160h352q66 0 113 -47t47 -113z" />
+<glyph unicode="" d="M1283 995l-355 -355l355 -355l144 144q29 31 70 14q39 -17 39 -59v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l144 144l-355 355l-355 -355l144 -144q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l144 -144 l355 355l-355 355l-144 -144q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v448q0 26 19 45t45 19h448q42 0 59 -40q17 -39 -14 -69l-144 -144l355 -355l355 355l-144 144q-31 30 -14 69q17 40 59 40h448q26 0 45 -19t19 -45v-448q0 -42 -39 -59q-13 -5 -25 -5q-26 0 -45 19z " />
+<glyph unicode="" horiz-adv-x="1920" d="M593 640q-162 -5 -265 -128h-134q-82 0 -138 40.5t-56 118.5q0 353 124 353q6 0 43.5 -21t97.5 -42.5t119 -21.5q67 0 133 23q-5 -37 -5 -66q0 -139 81 -256zM1664 3q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5 t43 97.5t62 81t85.5 53.5t111.5 20q10 0 43 -21.5t73 -48t107 -48t135 -21.5t135 21.5t107 48t73 48t43 21.5q61 0 111.5 -20t85.5 -53.5t62 -81t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM640 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75 t75 -181zM1344 896q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5zM1920 671q0 -78 -56 -118.5t-138 -40.5h-134q-103 123 -265 128q81 117 81 256q0 29 -5 66q66 -23 133 -23q59 0 119 21.5t97.5 42.5 t43.5 21q124 0 124 -353zM1792 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1456 320q0 40 -28 68l-208 208q-28 28 -68 28q-42 0 -72 -32q3 -3 19 -18.5t21.5 -21.5t15 -19t13 -25.5t3.5 -27.5q0 -40 -28 -68t-68 -28q-15 0 -27.5 3.5t-25.5 13t-19 15t-21.5 21.5t-18.5 19q-33 -31 -33 -73q0 -40 28 -68l206 -207q27 -27 68 -27q40 0 68 26 l147 146q28 28 28 67zM753 1025q0 40 -28 68l-206 207q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l208 -208q27 -27 68 -27q42 0 72 31q-3 3 -19 18.5t-21.5 21.5t-15 19t-13 25.5t-3.5 27.5q0 40 28 68t68 28q15 0 27.5 -3.5t25.5 -13t19 -15 t21.5 -21.5t18.5 -19q33 31 33 73zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-206 207q-83 83 -83 203q0 123 88 209l-88 88q-86 -88 -208 -88q-120 0 -204 84l-208 208q-84 84 -84 204t85 203l147 146q83 83 203 83q121 0 204 -85l206 -207 q83 -83 83 -203q0 -123 -88 -209l88 -88q86 88 208 88q120 0 204 -84l208 -208q84 -84 84 -204z" />
+<glyph unicode="" horiz-adv-x="1920" d="M1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088q-185 0 -316.5 131.5t-131.5 316.5q0 132 71 241.5t187 163.5q-2 28 -2 43q0 212 150 362t362 150q158 0 286.5 -88t187.5 -230q70 62 166 62q106 0 181 -75t75 -181q0 -75 -41 -138q129 -30 213 -134.5t84 -239.5z " />
+<glyph unicode="" horiz-adv-x="1664" d="M1527 88q56 -89 21.5 -152.5t-140.5 -63.5h-1152q-106 0 -140.5 63.5t21.5 152.5l503 793v399h-64q-26 0 -45 19t-19 45t19 45t45 19h512q26 0 45 -19t19 -45t-19 -45t-45 -19h-64v-399zM748 813l-272 -429h712l-272 429l-20 31v37v399h-128v-399v-37z" />
+<glyph unicode="" horiz-adv-x="1792" d="M960 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1260 576l507 -398q28 -20 25 -56q-5 -35 -35 -51l-128 -64q-13 -7 -29 -7q-17 0 -31 8l-690 387l-110 -66q-8 -4 -12 -5q14 -49 10 -97q-7 -77 -56 -147.5t-132 -123.5q-132 -84 -277 -84 q-136 0 -222 78q-90 84 -79 207q7 76 56 147t131 124q132 84 278 84q83 0 151 -31q9 13 22 22l122 73l-122 73q-13 9 -22 22q-68 -31 -151 -31q-146 0 -278 84q-82 53 -131 124t-56 147q-5 59 15.5 113t63.5 93q85 79 222 79q145 0 277 -84q83 -52 132 -123t56 -148 q4 -48 -10 -97q4 -1 12 -5l110 -66l690 387q14 8 31 8q16 0 29 -7l128 -64q30 -16 35 -51q3 -36 -25 -56zM579 836q46 42 21 108t-106 117q-92 59 -192 59q-74 0 -113 -36q-46 -42 -21 -108t106 -117q92 -59 192 -59q74 0 113 36zM494 91q81 51 106 117t-21 108 q-39 36 -113 36q-100 0 -192 -59q-81 -51 -106 -117t21 -108q39 -36 113 -36q100 0 192 59zM672 704l96 -58v11q0 36 33 56l14 8l-79 47l-26 -26q-3 -3 -10 -11t-12 -12q-2 -2 -4 -3.5t-3 -2.5zM896 480l96 -32l736 576l-128 64l-768 -431v-113l-160 -96l9 -8q2 -2 7 -6 q4 -4 11 -12t11 -12l26 -26zM1600 64l128 64l-520 408l-177 -138q-2 -3 -13 -7z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1696 1152q40 0 68 -28t28 -68v-1216q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v288h-544q-40 0 -68 28t-28 68v672q0 40 20 88t48 76l408 408q28 28 76 48t88 20h416q40 0 68 -28t28 -68v-328q68 40 128 40h416zM1152 939l-299 -299h299v299zM512 1323l-299 -299 h299v299zM708 676l316 316v416h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h512v256q0 40 20 88t48 76zM1664 -128v1152h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h896z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1404 151q0 -117 -79 -196t-196 -79q-135 0 -235 100l-777 776q-113 115 -113 271q0 159 110 270t269 111q158 0 273 -113l605 -606q10 -10 10 -22q0 -16 -30.5 -46.5t-46.5 -30.5q-13 0 -23 10l-606 607q-79 77 -181 77q-106 0 -179 -75t-73 -181q0 -105 76 -181 l776 -777q63 -63 145 -63q64 0 106 42t42 106q0 82 -63 145l-581 581q-26 24 -60 24q-29 0 -48 -19t-19 -48q0 -32 25 -59l410 -410q10 -10 10 -22q0 -16 -31 -47t-47 -31q-12 0 -22 10l-410 410q-63 61 -63 149q0 82 57 139t139 57q88 0 149 -63l581 -581q100 -98 100 -235 z" />
+<glyph unicode="" d="M384 0h768v384h-768v-384zM1280 0h128v896q0 14 -10 38.5t-20 34.5l-281 281q-10 10 -34 20t-39 10v-416q0 -40 -28 -68t-68 -28h-576q-40 0 -68 28t-28 68v416h-128v-1280h128v416q0 40 28 68t68 28h832q40 0 68 -28t28 -68v-416zM896 928v320q0 13 -9.5 22.5t-22.5 9.5 h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5zM1536 896v-928q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h928q40 0 88 -20t76 -48l280 -280q28 -28 48 -76t20 -88z" />
+<glyph unicode="" d="M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" d="M1536 192v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 704v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 1216v-128q0 -26 -19 -45 t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1792" d="M384 128q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 640q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1152q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z M1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M381 -84q0 -80 -54.5 -126t-135.5 -46q-106 0 -172 66l57 88q49 -45 106 -45q29 0 50.5 14.5t21.5 42.5q0 64 -105 56l-26 56q8 10 32.5 43.5t42.5 54t37 38.5v1q-16 0 -48.5 -1t-48.5 -1v-53h-106v152h333v-88l-95 -115q51 -12 81 -49t30 -88zM383 543v-159h-362 q-6 36 -6 54q0 51 23.5 93t56.5 68t66 47.5t56.5 43.5t23.5 45q0 25 -14.5 38.5t-39.5 13.5q-46 0 -81 -58l-85 59q24 51 71.5 79.5t105.5 28.5q73 0 123 -41.5t50 -112.5q0 -50 -34 -91.5t-75 -64.5t-75.5 -50.5t-35.5 -52.5h127v60h105zM1792 224v-192q0 -13 -9.5 -22.5 t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1123v-99h-335v99h107q0 41 0.5 122t0.5 121v12h-2q-8 -17 -50 -54l-71 76l136 127h106v-404h108zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5 t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1760 640q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1728q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h1728zM483 704q-28 35 -51 80q-48 97 -48 188q0 181 134 309q133 127 393 127q50 0 167 -19q66 -12 177 -48q10 -38 21 -118q14 -123 14 -183q0 -18 -5 -45l-12 -3l-84 6 l-14 2q-50 149 -103 205q-88 91 -210 91q-114 0 -182 -59q-67 -58 -67 -146q0 -73 66 -140t279 -129q69 -20 173 -66q58 -28 95 -52h-743zM990 448h411q7 -39 7 -92q0 -111 -41 -212q-23 -55 -71 -104q-37 -35 -109 -81q-80 -48 -153 -66q-80 -21 -203 -21q-114 0 -195 23 l-140 40q-57 16 -72 28q-8 8 -8 22v13q0 108 -2 156q-1 30 0 68l2 37v44l102 2q15 -34 30 -71t22.5 -56t12.5 -27q35 -57 80 -94q43 -36 105 -57q59 -22 132 -22q64 0 139 27q77 26 122 86q47 61 47 129q0 84 -81 157q-34 29 -137 71z" />
+<glyph unicode="" d="M48 1313q-37 2 -45 4l-3 88q13 1 40 1q60 0 112 -4q132 -7 166 -7q86 0 168 3q116 4 146 5q56 0 86 2l-1 -14l2 -64v-9q-60 -9 -124 -9q-60 0 -79 -25q-13 -14 -13 -132q0 -13 0.5 -32.5t0.5 -25.5l1 -229l14 -280q6 -124 51 -202q35 -59 96 -92q88 -47 177 -47 q104 0 191 28q56 18 99 51q48 36 65 64q36 56 53 114q21 73 21 229q0 79 -3.5 128t-11 122.5t-13.5 159.5l-4 59q-5 67 -24 88q-34 35 -77 34l-100 -2l-14 3l2 86h84l205 -10q76 -3 196 10l18 -2q6 -38 6 -51q0 -7 -4 -31q-45 -12 -84 -13q-73 -11 -79 -17q-15 -15 -15 -41 q0 -7 1.5 -27t1.5 -31q8 -19 22 -396q6 -195 -15 -304q-15 -76 -41 -122q-38 -65 -112 -123q-75 -57 -182 -89q-109 -33 -255 -33q-167 0 -284 46q-119 47 -179 122q-61 76 -83 195q-16 80 -16 237v333q0 188 -17 213q-25 36 -147 39zM1536 -96v64q0 14 -9 23t-23 9h-1472 q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h1472q14 0 23 9t9 23z" />
+<glyph unicode="" horiz-adv-x="1664" d="M512 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23 v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 160v192 q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192 q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1664 1248v-1088q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1344q66 0 113 -47t47 -113 z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1190 955l293 293l-107 107l-293 -293zM1637 1248q0 -27 -18 -45l-1286 -1286q-18 -18 -45 -18t-45 18l-198 198q-18 18 -18 45t18 45l1286 1286q18 18 45 18t45 -18l198 -198q18 -18 18 -45zM286 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM636 1276 l196 -60l-196 -60l-60 -196l-60 196l-196 60l196 60l60 196zM1566 798l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM926 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98z" />
+<glyph unicode="" horiz-adv-x="1792" d="M640 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM256 640h384v256h-158q-13 0 -22 -9l-195 -195q-9 -9 -9 -22v-30zM1536 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1792 1216v-1024q0 -15 -4 -26.5t-13.5 -18.5 t-16.5 -11.5t-23.5 -6t-22.5 -2t-25.5 0t-22.5 0.5q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-64q-3 0 -22.5 -0.5t-25.5 0t-22.5 2t-23.5 6t-16.5 11.5t-13.5 18.5t-4 26.5q0 26 19 45t45 19v320q0 8 -0.5 35t0 38 t2.5 34.5t6.5 37t14 30.5t22.5 30l198 198q19 19 50.5 32t58.5 13h160v192q0 26 19 45t45 19h1024q26 0 45 -19t19 -45z" />
+<glyph unicode="" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103q-111 0 -218 32q59 93 78 164q9 34 54 211q20 -39 73 -67.5t114 -28.5q121 0 216 68.5t147 188.5t52 270q0 114 -59.5 214t-172.5 163t-255 63q-105 0 -196 -29t-154.5 -77t-109 -110.5t-67 -129.5t-21.5 -134 q0 -104 40 -183t117 -111q30 -12 38 20q2 7 8 31t8 30q6 23 -11 43q-51 61 -51 151q0 151 104.5 259.5t273.5 108.5q151 0 235.5 -82t84.5 -213q0 -170 -68.5 -289t-175.5 -119q-61 0 -98 43.5t-23 104.5q8 35 26.5 93.5t30 103t11.5 75.5q0 50 -27 83t-77 33 q-62 0 -105 -57t-43 -142q0 -73 25 -122l-99 -418q-17 -70 -13 -177q-206 91 -333 281t-127 423q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-725q85 122 108 210q9 34 53 209q21 -39 73.5 -67t112.5 -28q181 0 295.5 147.5t114.5 373.5q0 84 -35 162.5t-96.5 139t-152.5 97t-197 36.5q-104 0 -194.5 -28.5t-153 -76.5 t-107.5 -109.5t-66.5 -128t-21.5 -132.5q0 -102 39.5 -180t116.5 -110q13 -5 23.5 0t14.5 19q10 44 15 61q6 23 -11 42q-50 62 -50 150q0 150 103.5 256.5t270.5 106.5q149 0 232.5 -81t83.5 -210q0 -168 -67.5 -286t-173.5 -118q-60 0 -97 43.5t-23 103.5q8 34 26.5 92.5 t29.5 102t11 74.5q0 49 -26.5 81.5t-75.5 32.5q-61 0 -103.5 -56.5t-42.5 -139.5q0 -72 24 -121l-98 -414q-24 -100 -7 -254h-183q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960z" />
+<glyph unicode="" d="M829 318q0 -76 -58.5 -112.5t-139.5 -36.5q-41 0 -80.5 9.5t-75.5 28.5t-58 53t-22 78q0 46 25 80t65.5 51.5t82 25t84.5 7.5q20 0 31 -2q2 -1 23 -16.5t26 -19t23 -18t24.5 -22t19 -22.5t17 -26t9 -26.5t4.5 -31.5zM755 863q0 -60 -33 -99.5t-92 -39.5q-53 0 -93 42.5 t-57.5 96.5t-17.5 106q0 61 32 104t92 43q53 0 93.5 -45t58 -101t17.5 -107zM861 1120l88 64h-265q-85 0 -161 -32t-127.5 -98t-51.5 -153q0 -93 64.5 -154.5t158.5 -61.5q22 0 43 3q-13 -29 -13 -54q0 -44 40 -94q-175 -12 -257 -63q-47 -29 -75.5 -73t-28.5 -95 q0 -43 18.5 -77.5t48.5 -56.5t69 -37t77.5 -21t76.5 -6q60 0 120.5 15.5t113.5 46t86 82.5t33 117q0 49 -20 89.5t-49 66.5t-58 47.5t-49 44t-20 44.5t15.5 42.5t37.5 39.5t44 42t37.5 59.5t15.5 82.5q0 60 -22.5 99.5t-72.5 90.5h83zM1152 672h128v64h-128v128h-64v-128 h-128v-64h128v-160h64v160zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1664" d="M735 740q0 -36 32 -70.5t77.5 -68t90.5 -73.5t77 -104t32 -142q0 -90 -48 -173q-72 -122 -211 -179.5t-298 -57.5q-132 0 -246.5 41.5t-171.5 137.5q-37 60 -37 131q0 81 44.5 150t118.5 115q131 82 404 100q-32 42 -47.5 74t-15.5 73q0 36 21 85q-46 -4 -68 -4 q-148 0 -249.5 96.5t-101.5 244.5q0 82 36 159t99 131q77 66 182.5 98t217.5 32h418l-138 -88h-131q74 -63 112 -133t38 -160q0 -72 -24.5 -129.5t-59 -93t-69.5 -65t-59.5 -61.5t-24.5 -66zM589 836q38 0 78 16.5t66 43.5q53 57 53 159q0 58 -17 125t-48.5 129.5 t-84.5 103.5t-117 41q-42 0 -82.5 -19.5t-65.5 -52.5q-47 -59 -47 -160q0 -46 10 -97.5t31.5 -103t52 -92.5t75 -67t96.5 -26zM591 -37q58 0 111.5 13t99 39t73 73t27.5 109q0 25 -7 49t-14.5 42t-27 41.5t-29.5 35t-38.5 34.5t-36.5 29t-41.5 30t-36.5 26q-16 2 -48 2 q-53 0 -105 -7t-107.5 -25t-97 -46t-68.5 -74.5t-27 -105.5q0 -70 35 -123.5t91.5 -83t119 -44t127.5 -14.5zM1401 839h213v-108h-213v-219h-105v219h-212v108h212v217h105v-217z" />
+<glyph unicode="" horiz-adv-x="1920" d="M768 384h384v96h-128v448h-114l-148 -137l77 -80q42 37 55 57h2v-288h-128v-96zM1280 640q0 -70 -21 -142t-59.5 -134t-101.5 -101t-138 -39t-138 39t-101.5 101t-59.5 134t-21 142t21 142t59.5 134t101.5 101t138 39t138 -39t101.5 -101t59.5 -134t21 -142zM1792 384 v512q-106 0 -181 75t-75 181h-1152q0 -106 -75 -181t-181 -75v-512q106 0 181 -75t75 -181h1152q0 106 75 181t181 75zM1920 1216v-1152q0 -26 -19 -45t-45 -19h-1792q-26 0 -45 19t-19 45v1152q0 26 19 45t45 19h1792q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1024" d="M1024 320q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="" horiz-adv-x="640" d="M640 1088v-896q0 -26 -19 -45t-45 -19t-45 19l-448 448q-19 19 -19 45t19 45l448 448q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="640" d="M576 640q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19t-19 45v896q0 26 19 45t45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="" horiz-adv-x="1664" d="M160 0h608v1152h-640v-1120q0 -13 9.5 -22.5t22.5 -9.5zM1536 32v1120h-640v-1152h608q13 0 22.5 9.5t9.5 22.5zM1664 1248v-1216q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1344q66 0 113 -47t47 -113z" />
+<glyph unicode="" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45zM1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 826v-794q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v794q44 -49 101 -87q362 -246 497 -345q57 -42 92.5 -65.5t94.5 -48t110 -24.5h1h1q51 0 110 24.5t94.5 48t92.5 65.5q170 123 498 345q57 39 100 87zM1792 1120q0 -79 -49 -151t-122 -123 q-376 -261 -468 -325q-10 -7 -42.5 -30.5t-54 -38t-52 -32.5t-57.5 -27t-50 -9h-1h-1q-23 0 -50 9t-57.5 27t-52 32.5t-54 38t-42.5 30.5q-91 64 -262 182.5t-205 142.5q-62 42 -117 115.5t-55 136.5q0 78 41.5 130t118.5 52h1472q65 0 112.5 -47t47.5 -113z" />
+<glyph unicode="" d="M349 911v-991h-330v991h330zM370 1217q1 -73 -50.5 -122t-135.5 -49h-2q-82 0 -132 49t-50 122q0 74 51.5 122.5t134.5 48.5t133 -48.5t51 -122.5zM1536 488v-568h-329v530q0 105 -40.5 164.5t-126.5 59.5q-63 0 -105.5 -34.5t-63.5 -85.5q-11 -30 -11 -81v-553h-329 q2 399 2 647t-1 296l-1 48h329v-144h-2q20 32 41 56t56.5 52t87 43.5t114.5 15.5q171 0 275 -113.5t104 -332.5z" />
+<glyph unicode="" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1771 0q0 -53 -37 -90l-107 -108q-39 -37 -91 -37q-53 0 -90 37l-363 364q-38 36 -38 90q0 53 43 96l-256 256l-126 -126q-14 -14 -34 -14t-34 14q2 -2 12.5 -12t12.5 -13t10 -11.5t10 -13.5t6 -13.5t5.5 -16.5t1.5 -18q0 -38 -28 -68q-3 -3 -16.5 -18t-19 -20.5 t-18.5 -16.5t-22 -15.5t-22 -9t-26 -4.5q-40 0 -68 28l-408 408q-28 28 -28 68q0 13 4.5 26t9 22t15.5 22t16.5 18.5t20.5 19t18 16.5q30 28 68 28q10 0 18 -1.5t16.5 -5.5t13.5 -6t13.5 -10t11.5 -10t13 -12.5t12 -12.5q-14 14 -14 34t14 34l348 348q14 14 34 14t34 -14 q-2 2 -12.5 12t-12.5 13t-10 11.5t-10 13.5t-6 13.5t-5.5 16.5t-1.5 18q0 38 28 68q3 3 16.5 18t19 20.5t18.5 16.5t22 15.5t22 9t26 4.5q40 0 68 -28l408 -408q28 -28 28 -68q0 -13 -4.5 -26t-9 -22t-15.5 -22t-16.5 -18.5t-20.5 -19t-18 -16.5q-30 -28 -68 -28 q-10 0 -18 1.5t-16.5 5.5t-13.5 6t-13.5 10t-11.5 10t-13 12.5t-12 12.5q14 -14 14 -34t-14 -34l-126 -126l256 -256q43 43 96 43q52 0 91 -37l363 -363q37 -39 37 -91z" />
+<glyph unicode="" horiz-adv-x="1792" d="M384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM576 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1004 351l101 382q6 26 -7.5 48.5t-38.5 29.5 t-48 -6.5t-30 -39.5l-101 -382q-60 -5 -107 -43.5t-63 -98.5q-20 -77 20 -146t117 -89t146 20t89 117q16 60 -6 117t-72 91zM1664 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 1024q0 53 -37.5 90.5 t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1472 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 384q0 -261 -141 -483q-19 -29 -54 -29h-1402q-35 0 -54 29 q-141 221 -141 483q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
+<glyph unicode="" horiz-adv-x="1792" d="M896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640 q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 174 120 321.5 t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M704 1152q-153 0 -286 -52t-211.5 -141t-78.5 -191q0 -82 53 -158t149 -132l97 -56l-35 -84q34 20 62 39l44 31l53 -10q78 -14 153 -14q153 0 286 52t211.5 141t78.5 191t-78.5 191t-211.5 141t-286 52zM704 1280q191 0 353.5 -68.5t256.5 -186.5t94 -257t-94 -257 t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224q0 139 94 257t256.5 186.5 t353.5 68.5zM1526 111q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129 q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230q0 -120 -71 -224.5t-195 -176.5z" />
+<glyph unicode="" horiz-adv-x="896" d="M885 970q18 -20 7 -44l-540 -1157q-13 -25 -42 -25q-4 0 -14 2q-17 5 -25.5 19t-4.5 30l197 808l-406 -101q-4 -1 -12 -1q-18 0 -31 11q-18 15 -13 39l201 825q4 14 16 23t28 9h328q19 0 32 -12.5t13 -29.5q0 -8 -5 -18l-171 -463l396 98q8 2 12 2q19 0 34 -15z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 288v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192q0 52 38 90t90 38h512v192h-96q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-96v-192h512q52 0 90 -38t38 -90v-192h96q40 0 68 -28t28 -68 z" />
+<glyph unicode="" horiz-adv-x="1664" d="M896 708v-580q0 -104 -76 -180t-180 -76t-180 76t-76 180q0 26 19 45t45 19t45 -19t19 -45q0 -50 39 -89t89 -39t89 39t39 89v580q33 11 64 11t64 -11zM1664 681q0 -13 -9.5 -22.5t-22.5 -9.5q-11 0 -23 10q-49 46 -93 69t-102 23q-68 0 -128 -37t-103 -97 q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -28 -17q-18 0 -29 17q-4 6 -14.5 24t-17.5 28q-43 60 -102.5 97t-127.5 37t-127.5 -37t-102.5 -97q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -29 -17q-17 0 -28 17q-4 6 -14.5 24t-17.5 28q-43 60 -103 97t-128 37q-58 0 -102 -23t-93 -69 q-12 -10 -23 -10q-13 0 -22.5 9.5t-9.5 22.5q0 5 1 7q45 183 172.5 319.5t298 204.5t360.5 68q140 0 274.5 -40t246.5 -113.5t194.5 -187t115.5 -251.5q1 -2 1 -7zM896 1408v-98q-42 2 -64 2t-64 -2v98q0 26 19 45t45 19t45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1792" d="M768 -128h896v640h-416q-40 0 -68 28t-28 68v416h-384v-1152zM1024 1312v64q0 13 -9.5 22.5t-22.5 9.5h-704q-13 0 -22.5 -9.5t-9.5 -22.5v-64q0 -13 9.5 -22.5t22.5 -9.5h704q13 0 22.5 9.5t9.5 22.5zM1280 640h299l-299 299v-299zM1792 512v-672q0 -40 -28 -68t-68 -28 h-960q-40 0 -68 28t-28 68v160h-544q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1088q40 0 68 -28t28 -68v-328q21 -13 36 -28l408 -408q28 -28 48 -76t20 -88z" />
+<glyph unicode="" horiz-adv-x="1024" d="M736 960q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5q0 46 -54 71t-106 25q-13 0 -22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5q50 0 99.5 -16t87 -54t37.5 -90zM896 960q0 72 -34.5 134t-90 101.5t-123 62t-136.5 22.5t-136.5 -22.5t-123 -62t-90 -101.5t-34.5 -134 q0 -101 68 -180q10 -11 30.5 -33t30.5 -33q128 -153 141 -298h228q13 145 141 298q10 11 30.5 33t30.5 33q68 79 68 180zM1024 960q0 -155 -103 -268q-45 -49 -74.5 -87t-59.5 -95.5t-34 -107.5q47 -28 47 -82q0 -37 -25 -64q25 -27 25 -64q0 -52 -45 -81q13 -23 13 -47 q0 -46 -31.5 -71t-77.5 -25q-20 -44 -60 -70t-87 -26t-87 26t-60 70q-46 0 -77.5 25t-31.5 71q0 24 13 47q-45 29 -45 81q0 37 25 64q-25 27 -25 64q0 54 47 82q-4 50 -34 107.5t-59.5 95.5t-74.5 87q-103 113 -103 268q0 99 44.5 184.5t117 142t164 89t186.5 32.5 t186.5 -32.5t164 -89t117 -142t44.5 -184.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 352v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5q-12 0 -24 10l-319 320q-9 9 -9 22q0 14 9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h1376q13 0 22.5 -9.5t9.5 -22.5zM1792 896q0 -14 -9 -23l-320 -320q-9 -9 -23 -9 q-13 0 -22.5 9.5t-9.5 22.5v192h-1376q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1376v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
+<glyph unicode="" horiz-adv-x="1920" d="M1280 608q0 14 -9 23t-23 9h-224v352q0 13 -9.5 22.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-352h-224q-13 0 -22.5 -9.5t-9.5 -22.5q0 -14 9 -23l352 -352q9 -9 23 -9t23 9l351 351q10 12 10 24zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
+<glyph unicode="" horiz-adv-x="1920" d="M1280 672q0 14 -9 23l-352 352q-9 9 -23 9t-23 -9l-351 -351q-10 -12 -10 -24q0 -14 9 -23t23 -9h224v-352q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5v352h224q13 0 22.5 9.5t9.5 22.5zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
+<glyph unicode="" horiz-adv-x="1408" d="M384 192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 68 5.5 131t24 138t47.5 132.5t81 103t120 60.5q-22 -52 -22 -120v-203q-58 -20 -93 -70t-35 -111q0 -80 56 -136t136 -56 t136 56t56 136q0 61 -35.5 111t-92.5 70v203q0 62 25 93q132 -104 295 -104t295 104q25 -31 25 -93v-64q-106 0 -181 -75t-75 -181v-89q-32 -29 -32 -71q0 -40 28 -68t68 -28t68 28t28 68q0 42 -32 71v89q0 52 38 90t90 38t90 -38t38 -90v-89q-32 -29 -32 -71q0 -40 28 -68 t68 -28t68 28t28 68q0 42 -32 71v89q0 68 -34.5 127.5t-93.5 93.5q0 10 0.5 42.5t0 48t-2.5 41.5t-7 47t-13 40q68 -15 120 -60.5t81 -103t47.5 -132.5t24 -138t5.5 -131zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5 t271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1280 832q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 832q0 -62 -35.5 -111t-92.5 -70v-395q0 -159 -131.5 -271.5t-316.5 -112.5t-316.5 112.5t-131.5 271.5v132q-164 20 -274 128t-110 252v512q0 26 19 45t45 19q6 0 16 -2q17 30 47 48 t65 18q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5q-33 0 -64 18v-402q0 -106 94 -181t226 -75t226 75t94 181v402q-31 -18 -64 -18q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5q35 0 65 -18t47 -48q10 2 16 2q26 0 45 -19t19 -45v-512q0 -144 -110 -252 t-274 -128v-132q0 -106 94 -181t226 -75t226 75t94 181v395q-57 21 -92.5 70t-35.5 111q0 80 56 136t136 56t136 -56t56 -136z" />
+<glyph unicode="" horiz-adv-x="1792" d="M640 1152h512v128h-512v-128zM288 1152v-1280h-64q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h64zM1408 1152v-1280h-1024v1280h128v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h128zM1792 928v-832q0 -92 -66 -158t-158 -66h-64v1280h64q92 0 158 -66 t66 -158z" />
+<glyph unicode="" horiz-adv-x="1792" d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5 t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" />
+<glyph unicode="" horiz-adv-x="1920" d="M1664 896q0 80 -56 136t-136 56h-64v-384h64q80 0 136 56t56 136zM0 128h1792q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM1856 896q0 -159 -112.5 -271.5t-271.5 -112.5h-64v-32q0 -92 -66 -158t-158 -66h-704q-92 0 -158 66t-66 158v736q0 26 19 45 t45 19h1152q159 0 271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="" horiz-adv-x="1408" d="M640 1472v-640q0 -61 -35.5 -111t-92.5 -70v-779q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v779q-57 20 -92.5 70t-35.5 111v640q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45 t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45zM1408 1472v-1600q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v512h-224q-13 0 -22.5 9.5t-9.5 22.5v800q0 132 94 226t226 94h256q26 0 45 -19t19 -45z" />
+<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M384 736q0 14 9 23t23 9h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64zM1120 512q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704zM1120 256q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704 q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704z" />
+<glyph unicode="" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1536h-1152v-1536h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM1408 1472v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1152h-256v-32q0 -40 -28 -68t-68 -28h-448q-40 0 -68 28t-28 68v32h-256v-1152h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM896 1056v320q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-96h-128v96q0 13 -9.5 22.5 t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v96h128v-96q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1408 1088v-1280q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1280q0 26 19 45t45 19h320 v288q0 40 28 68t68 28h448q40 0 68 -28t28 -68v-288h320q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1920" d="M640 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM256 640h384v256h-158q-14 -2 -22 -9l-195 -195q-7 -12 -9 -22v-30zM1536 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1664 800v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM1920 1344v-1152 q0 -26 -19 -45t-45 -19h-192q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-128q-26 0 -45 19t-19 45t19 45t45 19v416q0 26 13 58t32 51l198 198q19 19 51 32t58 13h160v320q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1280 416v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM640 1152h512v128h-512v-128zM256 1152v-1280h-32 q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h32zM1440 1152v-1280h-1088v1280h160v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h160zM1792 928v-832q0 -92 -66 -158t-158 -66h-32v1280h32q92 0 158 -66t66 -158z" />
+<glyph unicode="" horiz-adv-x="1920" d="M1920 576q-1 -32 -288 -96l-352 -32l-224 -64h-64l-293 -352h69q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-96h-160h-64v32h64v416h-160l-192 -224h-96l-32 32v192h32v32h128v8l-192 24v128l192 24v8h-128v32h-32v192l32 32h96l192 -224h160v416h-64v32h64h160h96 q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-69l293 -352h64l224 -64l352 -32q261 -58 287 -93z" />
+<glyph unicode="" horiz-adv-x="1664" d="M640 640v384h-256v-256q0 -53 37.5 -90.5t90.5 -37.5h128zM1664 192v-192h-1152v192l128 192h-128q-159 0 -271.5 112.5t-112.5 271.5v320l-64 64l32 128h480l32 128h960l32 -192l-64 -32v-800z" />
+<glyph unicode="" d="M1280 192v896q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-512v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-896q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h512v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" d="M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1024" d="M627 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23zM1011 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23z" />
+<glyph unicode="" horiz-adv-x="1024" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM979 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23 l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="" horiz-adv-x="1152" d="M1075 224q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM1075 608q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393 q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="" horiz-adv-x="1152" d="M1075 672q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23zM1075 1056q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="" horiz-adv-x="640" d="M627 992q0 -13 -10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="" horiz-adv-x="640" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="" horiz-adv-x="1152" d="M1075 352q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="" horiz-adv-x="1152" d="M1075 800q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="" horiz-adv-x="1920" d="M1792 544v832q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1376v-1088q0 -66 -47 -113t-113 -47h-544q0 -37 16 -77.5t32 -71t16 -43.5q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19 t-19 45q0 14 16 44t32 70t16 78h-544q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="" horiz-adv-x="1920" d="M416 256q-66 0 -113 47t-47 113v704q0 66 47 113t113 47h1088q66 0 113 -47t47 -113v-704q0 -66 -47 -113t-113 -47h-1088zM384 1120v-704q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5v704q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5z M1760 192h160v-96q0 -40 -47 -68t-113 -28h-1600q-66 0 -113 28t-47 68v96h160h1600zM1040 96q16 0 16 16t-16 16h-160q-16 0 -16 -16t16 -16h160z" />
+<glyph unicode="" horiz-adv-x="1152" d="M640 128q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1024 288v960q0 13 -9.5 22.5t-22.5 9.5h-832q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h832q13 0 22.5 9.5t9.5 22.5zM1152 1248v-1088q0 -66 -47 -113t-113 -47h-832 q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h832q66 0 113 -47t47 -113z" />
+<glyph unicode="" horiz-adv-x="768" d="M464 128q0 33 -23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5t56.5 23.5t23.5 56.5zM672 288v704q0 13 -9.5 22.5t-22.5 9.5h-512q-13 0 -22.5 -9.5t-9.5 -22.5v-704q0 -13 9.5 -22.5t22.5 -9.5h512q13 0 22.5 9.5t9.5 22.5zM480 1136 q0 16 -16 16h-160q-16 0 -16 -16t16 -16h160q16 0 16 16zM768 1152v-1024q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v1024q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
+<glyph unicode="" d="M768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103 t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="1664" d="M768 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z M1664 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z" />
+<glyph unicode="" horiz-adv-x="1664" d="M768 1216v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136zM1664 1216 v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136z" />
+<glyph unicode="" horiz-adv-x="1568" d="M496 192q0 -60 -42.5 -102t-101.5 -42q-60 0 -102 42t-42 102t42 102t102 42q59 0 101.5 -42t42.5 -102zM928 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM320 640q0 -66 -47 -113t-113 -47t-113 47t-47 113 t47 113t113 47t113 -47t47 -113zM1360 192q0 -46 -33 -79t-79 -33t-79 33t-33 79t33 79t79 33t79 -33t33 -79zM528 1088q0 -73 -51.5 -124.5t-124.5 -51.5t-124.5 51.5t-51.5 124.5t51.5 124.5t124.5 51.5t124.5 -51.5t51.5 -124.5zM992 1280q0 -80 -56 -136t-136 -56 t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1536 640q0 -40 -28 -68t-68 -28t-68 28t-28 68t28 68t68 28t68 -28t28 -68zM1328 1088q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5z" />
+<glyph unicode="" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 416q0 -166 -127 -451q-3 -7 -10.5 -24t-13.5 -30t-13 -22q-12 -17 -28 -17q-15 0 -23.5 10t-8.5 25q0 9 2.5 26.5t2.5 23.5q5 68 5 123q0 101 -17.5 181t-48.5 138.5t-80 101t-105.5 69.5t-133 42.5t-154 21.5t-175.5 6h-224v-256q0 -26 -19 -45t-45 -19t-45 19 l-512 512q-19 19 -19 45t19 45l512 512q19 19 45 19t45 -19t19 -45v-256h224q713 0 875 -403q53 -134 53 -333z" />
+<glyph unicode="" horiz-adv-x="1664" d="M640 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1280 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1440 320 q0 120 -69 204t-187 84q-41 0 -195 -21q-71 -11 -157 -11t-157 11q-152 21 -195 21q-118 0 -187 -84t-69 -204q0 -88 32 -153.5t81 -103t122 -60t140 -29.5t149 -7h168q82 0 149 7t140 29.5t122 60t81 103t32 153.5zM1664 496q0 -207 -61 -331q-38 -77 -105.5 -133t-141 -86 t-170 -47.5t-171.5 -22t-167 -4.5q-78 0 -142 3t-147.5 12.5t-152.5 30t-137 51.5t-121 81t-86 115q-62 123 -62 331q0 237 136 396q-27 82 -27 170q0 116 51 218q108 0 190 -39.5t189 -123.5q147 35 309 35q148 0 280 -32q105 82 187 121t189 39q51 -102 51 -218 q0 -87 -27 -168q136 -160 136 -398z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1536 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68v-960q0 -40 28 -68t68 -28h1216q40 0 68 28t28 68zM1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320 q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
+<glyph unicode="" horiz-adv-x="1920" d="M1781 605q0 35 -53 35h-1088q-40 0 -85.5 -21.5t-71.5 -52.5l-294 -363q-18 -24 -18 -40q0 -35 53 -35h1088q40 0 86 22t71 53l294 363q18 22 18 39zM640 768h768v160q0 40 -28 68t-68 28h-576q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68 v-853l256 315q44 53 116 87.5t140 34.5zM1909 605q0 -62 -46 -120l-295 -363q-43 -53 -116 -87.5t-140 -34.5h-1088q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158v-160h192q54 0 99 -24.5t67 -70.5q15 -32 15 -68z " />
+<glyph unicode="" horiz-adv-x="1792" />
+<glyph unicode="" horiz-adv-x="1792" />
+<glyph unicode="" d="M1134 461q-37 -121 -138 -195t-228 -74t-228 74t-138 195q-8 25 4 48.5t38 31.5q25 8 48.5 -4t31.5 -38q25 -80 92.5 -129.5t151.5 -49.5t151.5 49.5t92.5 129.5q8 26 32 38t49 4t37 -31.5t4 -48.5zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5 t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1134 307q8 -25 -4 -48.5t-37 -31.5t-49 4t-32 38q-25 80 -92.5 129.5t-151.5 49.5t-151.5 -49.5t-92.5 -129.5q-8 -26 -31.5 -38t-48.5 -4q-26 8 -38 31.5t-4 48.5q37 121 138 195t228 74t228 -74t138 -195zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204 t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1152 448q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h640q26 0 45 -19t19 -45zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="1920" d="M832 448v128q0 14 -9 23t-23 9h-192v192q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-192h-192q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h192v-192q0 -14 9 -23t23 -9h128q14 0 23 9t9 23v192h192q14 0 23 9t9 23zM1408 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1920 512q0 -212 -150 -362t-362 -150q-192 0 -338 128h-220q-146 -128 -338 -128q-212 0 -362 150 t-150 362t150 362t362 150h896q212 0 362 -150t150 -362z" />
+<glyph unicode="" horiz-adv-x="1920" d="M384 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM512 624v-96q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h224q16 0 16 -16zM384 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 368v-96q0 -16 -16 -16 h-864q-16 0 -16 16v96q0 16 16 16h864q16 0 16 -16zM768 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM640 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1024 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16 h96q16 0 16 -16zM896 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1280 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1152 880v-96 q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 880v-352q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h112v240q0 16 16 16h96q16 0 16 -16zM1792 128v896h-1664v-896 h1664zM1920 1024v-896q0 -53 -37.5 -90.5t-90.5 -37.5h-1664q-53 0 -90.5 37.5t-37.5 90.5v896q0 53 37.5 90.5t90.5 37.5h1664q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1664 491v616q-169 -91 -306 -91q-82 0 -145 32q-100 49 -184 76.5t-178 27.5q-173 0 -403 -127v-599q245 113 433 113q55 0 103.5 -7.5t98 -26t77 -31t82.5 -39.5l28 -14q44 -22 101 -22q120 0 293 92zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9 h-64q-14 0 -23 9t-9 23v1266q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102 q-15 -9 -33 -9q-16 0 -32 8q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
+<glyph unicode="" horiz-adv-x="1792" d="M832 536v192q-181 -16 -384 -117v-185q205 96 384 110zM832 954v197q-172 -8 -384 -126v-189q215 111 384 118zM1664 491v184q-235 -116 -384 -71v224q-20 6 -39 15q-5 3 -33 17t-34.5 17t-31.5 15t-34.5 15.5t-32.5 13t-36 12.5t-35 8.5t-39.5 7.5t-39.5 4t-44 2 q-23 0 -49 -3v-222h19q102 0 192.5 -29t197.5 -82q19 -9 39 -15v-188q42 -17 91 -17q120 0 293 92zM1664 918v189q-169 -91 -306 -91q-45 0 -78 8v-196q148 -42 384 90zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v1266 q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102q-15 -9 -33 -9q-16 0 -32 8 q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
+<glyph unicode="" horiz-adv-x="1664" d="M585 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23zM1664 96v-64q0 -14 -9 -23t-23 -9h-960q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h960q14 0 23 -9 t9 -23z" />
+<glyph unicode="" horiz-adv-x="1920" d="M617 137l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23zM1208 1204l-373 -1291q-4 -13 -15.5 -19.5t-23.5 -2.5l-62 17q-13 4 -19.5 15.5t-2.5 24.5 l373 1291q4 13 15.5 19.5t23.5 2.5l62 -17q13 -4 19.5 -15.5t2.5 -24.5zM1865 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23z" />
+<glyph unicode="" horiz-adv-x="1792" d="M640 454v-70q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-69l-397 -398q-19 -19 -19 -45t19 -45zM1792 416q0 -58 -17 -133.5t-38.5 -138t-48 -125t-40.5 -90.5l-20 -40q-8 -17 -28 -17q-6 0 -9 1 q-25 8 -23 34q43 400 -106 565q-64 71 -170.5 110.5t-267.5 52.5v-251q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-262q411 -28 599 -221q169 -173 169 -509z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1186 579l257 250l-356 52l-66 10l-30 60l-159 322v-963l59 -31l318 -168l-60 355l-12 66zM1638 841l-363 -354l86 -500q5 -33 -6 -51.5t-34 -18.5q-17 0 -40 12l-449 236l-449 -236q-23 -12 -40 -12q-23 0 -34 18.5t-6 51.5l86 500l-364 354q-32 32 -23 59.5t54 34.5 l502 73l225 455q20 41 49 41q28 0 49 -41l225 -455l502 -73q45 -7 54 -34.5t-24 -59.5z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1401 1187l-640 -1280q-17 -35 -57 -35q-5 0 -15 2q-22 5 -35.5 22.5t-13.5 39.5v576h-576q-22 0 -39.5 13.5t-22.5 35.5t4 42t29 30l1280 640q13 7 29 7q27 0 45 -19q15 -14 18.5 -34.5t-6.5 -39.5z" />
+<glyph unicode="" horiz-adv-x="1664" d="M557 256h595v595zM512 301l595 595h-595v-595zM1664 224v-192q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v224h-864q-14 0 -23 9t-9 23v864h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224v224q0 14 9 23t23 9h192q14 0 23 -9t9 -23 v-224h851l246 247q10 9 23 9t23 -9q9 -10 9 -23t-9 -23l-247 -246v-851h224q14 0 23 -9t9 -23z" />
+<glyph unicode="" horiz-adv-x="1024" d="M288 64q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM288 1216q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM928 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1024 1088q0 -52 -26 -96.5t-70 -69.5 q-2 -287 -226 -414q-68 -38 -203 -81q-128 -40 -169.5 -71t-41.5 -100v-26q44 -25 70 -69.5t26 -96.5q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 52 26 96.5t70 69.5v820q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136q0 -52 -26 -96.5t-70 -69.5v-497 q54 26 154 57q55 17 87.5 29.5t70.5 31t59 39.5t40.5 51t28 69.5t8.5 91.5q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136z" />
+<glyph unicode="" horiz-adv-x="1664" d="M439 265l-256 -256q-10 -9 -23 -9q-12 0 -23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23zM608 224v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM384 448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23t9 23t23 9h320 q14 0 23 -9t9 -23zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-334 335q-21 21 -42 56l239 18l273 -274q27 -27 68 -27.5t68 26.5l147 146q28 28 28 67q0 40 -28 68l-274 275l18 239q35 -21 56 -42l336 -336q84 -86 84 -204zM1031 1044l-239 -18 l-273 274q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l274 -274l-18 -240q-35 21 -56 42l-336 336q-84 86 -84 204q0 120 85 203l147 146q83 83 203 83q121 0 204 -85l334 -335q21 -21 42 -56zM1664 960q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9 t-9 23t9 23t23 9h320q14 0 23 -9t9 -23zM1120 1504v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM1527 1353l-256 -256q-11 -9 -23 -9t-23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
+<glyph unicode="" horiz-adv-x="1024" d="M704 280v-240q0 -16 -12 -28t-28 -12h-240q-16 0 -28 12t-12 28v240q0 16 12 28t28 12h240q16 0 28 -12t12 -28zM1020 880q0 -54 -15.5 -101t-35 -76.5t-55 -59.5t-57.5 -43.5t-61 -35.5q-41 -23 -68.5 -65t-27.5 -67q0 -17 -12 -32.5t-28 -15.5h-240q-15 0 -25.5 18.5 t-10.5 37.5v45q0 83 65 156.5t143 108.5q59 27 84 56t25 76q0 42 -46.5 74t-107.5 32q-65 0 -108 -29q-35 -25 -107 -115q-13 -16 -31 -16q-12 0 -25 8l-164 125q-13 10 -15.5 25t5.5 28q160 266 464 266q80 0 161 -31t146 -83t106 -127.5t41 -158.5z" />
+<glyph unicode="" horiz-adv-x="640" d="M640 192v-128q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64v384h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-576h64q26 0 45 -19t19 -45zM512 1344v-192q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v192 q0 26 19 45t45 19h256q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="640" d="M512 288v-224q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v224q0 26 19 45t45 19h256q26 0 45 -19t19 -45zM542 1344l-28 -768q-1 -26 -20.5 -45t-45.5 -19h-256q-26 0 -45.5 19t-20.5 45l-28 768q-1 26 17.5 45t44.5 19h320q26 0 44.5 -19t17.5 -45z" />
+<glyph unicode="" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1534 846v-206h-514l-3 27 q-4 28 -4 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q83 65 188 65q110 0 178 -59.5t68 -158.5q0 -56 -24.5 -103t-62 -76.5t-81.5 -58.5t-82 -50.5t-65.5 -51.5t-30.5 -63h232v80 h126z" />
+<glyph unicode="" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1536 -50v-206h-514l-4 27 q-3 45 -3 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q80 65 188 65q110 0 178 -59.5t68 -158.5q0 -66 -34.5 -118.5t-84 -86t-99.5 -62.5t-87 -63t-41 -73h232v80h126z" />
+<glyph unicode="" horiz-adv-x="1920" d="M896 128l336 384h-768l-336 -384h768zM1909 1205q15 -34 9.5 -71.5t-30.5 -65.5l-896 -1024q-38 -44 -96 -44h-768q-38 0 -69.5 20.5t-47.5 54.5q-15 34 -9.5 71.5t30.5 65.5l896 1024q38 44 96 44h768q38 0 69.5 -20.5t47.5 -54.5z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1664 438q0 -81 -44.5 -135t-123.5 -54q-41 0 -77.5 17.5t-59 38t-56.5 38t-71 17.5q-110 0 -110 -124q0 -39 16 -115t15 -115v-5q-22 0 -33 -1q-34 -3 -97.5 -11.5t-115.5 -13.5t-98 -5q-61 0 -103 26.5t-42 83.5q0 37 17.5 71t38 56.5t38 59t17.5 77.5q0 79 -54 123.5 t-135 44.5q-84 0 -143 -45.5t-59 -127.5q0 -43 15 -83t33.5 -64.5t33.5 -53t15 -50.5q0 -45 -46 -89q-37 -35 -117 -35q-95 0 -245 24q-9 2 -27.5 4t-27.5 4l-13 2q-1 0 -3 1q-2 0 -2 1v1024q2 -1 17.5 -3.5t34 -5t21.5 -3.5q150 -24 245 -24q80 0 117 35q46 44 46 89 q0 22 -15 50.5t-33.5 53t-33.5 64.5t-15 83q0 82 59 127.5t144 45.5q80 0 134 -44.5t54 -123.5q0 -41 -17.5 -77.5t-38 -59t-38 -56.5t-17.5 -71q0 -57 42 -83.5t103 -26.5q64 0 180 15t163 17v-2q-1 -2 -3.5 -17.5t-5 -34t-3.5 -21.5q-24 -150 -24 -245q0 -80 35 -117 q44 -46 89 -46q22 0 50.5 15t53 33.5t64.5 33.5t83 15q82 0 127.5 -59t45.5 -143z" />
+<glyph unicode="" horiz-adv-x="1152" d="M1152 832v-128q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-217 24 -364.5 187.5t-147.5 384.5v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -185 131.5 -316.5t316.5 -131.5 t316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45zM896 1216v-512q0 -132 -94 -226t-226 -94t-226 94t-94 226v512q0 132 94 226t226 94t226 -94t94 -226z" />
+<glyph unicode="" horiz-adv-x="1408" d="M271 591l-101 -101q-42 103 -42 214v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -53 15 -113zM1385 1193l-361 -361v-128q0 -132 -94 -226t-226 -94q-55 0 -109 19l-96 -96q97 -51 205 -51q185 0 316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45v-128 q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-125 13 -235 81l-254 -254q-10 -10 -23 -10t-23 10l-82 82q-10 10 -10 23t10 23l1234 1234q10 10 23 10t23 -10l82 -82q10 -10 10 -23 t-10 -23zM1005 1325l-621 -621v512q0 132 94 226t226 94q102 0 184.5 -59t116.5 -152z" />
+<glyph unicode="" horiz-adv-x="1280" d="M1088 576v640h-448v-1137q119 63 213 137q235 184 235 360zM1280 1344v-768q0 -86 -33.5 -170.5t-83 -150t-118 -127.5t-126.5 -103t-121 -77.5t-89.5 -49.5t-42.5 -20q-12 -6 -26 -6t-26 6q-16 7 -42.5 20t-89.5 49.5t-121 77.5t-126.5 103t-118 127.5t-83 150 t-33.5 170.5v768q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1664" d="M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="" horiz-adv-x="1408" d="M512 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 1376v-320q0 -16 -12 -25q-8 -7 -20 -7q-4 0 -7 1l-448 96q-11 2 -18 11t-7 20h-256v-102q111 -23 183.5 -111t72.5 -203v-800q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v800 q0 106 62.5 190.5t161.5 114.5v111h-32q-59 0 -115 -23.5t-91.5 -53t-66 -66.5t-40.5 -53.5t-14 -24.5q-17 -35 -57 -35q-16 0 -29 7q-23 12 -31.5 37t3.5 49q5 10 14.5 26t37.5 53.5t60.5 70t85 67t108.5 52.5q-25 42 -25 86q0 66 47 113t113 47t113 -47t47 -113 q0 -33 -14 -64h302q0 11 7 20t18 11l448 96q3 1 7 1q12 0 20 -7q12 -9 12 -25z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1440 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1664 1376q0 -249 -75.5 -430.5t-253.5 -360.5q-81 -80 -195 -176l-20 -379q-2 -16 -16 -26l-384 -224q-7 -4 -16 -4q-12 0 -23 9l-64 64q-13 14 -8 32l85 276l-281 281l-276 -85q-3 -1 -9 -1 q-14 0 -23 9l-64 64q-17 19 -5 39l224 384q10 14 26 16l379 20q96 114 176 195q188 187 358 258t431 71q14 0 24 -9.5t10 -22.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1745 763l-164 -763h-334l178 832q13 56 -15 88q-27 33 -83 33h-169l-204 -953h-334l204 953h-286l-204 -953h-334l204 953l-153 327h1276q101 0 189.5 -40.5t147.5 -113.5q60 -73 81 -168.5t0 -194.5z" />
+<glyph unicode="" d="M909 141l102 102q19 19 19 45t-19 45l-307 307l307 307q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M717 141l454 454q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l307 -307l-307 -307q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1165 397l102 102q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l307 307l307 -307q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M813 237l454 454q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-307 -307l-307 307q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1130 939l16 175h-884l47 -534h612l-22 -228l-197 -53l-196 53l-13 140h-175l22 -278l362 -100h4v1l359 99l50 544h-644l-15 181h674zM0 1408h1408l-128 -1438l-578 -162l-574 162z" />
+<glyph unicode="" horiz-adv-x="1792" d="M275 1408h1505l-266 -1333l-804 -267l-698 267l71 356h297l-29 -147l422 -161l486 161l68 339h-1208l58 297h1209l38 191h-1208z" />
+<glyph unicode="" horiz-adv-x="1792" d="M960 1280q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1792 352v-352q0 -22 -20 -30q-8 -2 -12 -2q-13 0 -23 9l-93 93q-119 -143 -318.5 -226.5t-429.5 -83.5t-429.5 83.5t-318.5 226.5l-93 -93q-9 -9 -23 -9q-4 0 -12 2q-20 8 -20 30v352 q0 14 9 23t23 9h352q22 0 30 -20q8 -19 -7 -35l-100 -100q67 -91 189.5 -153.5t271.5 -82.5v647h-192q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h192v163q-58 34 -93 92.5t-35 128.5q0 106 75 181t181 75t181 -75t75 -181q0 -70 -35 -128.5t-93 -92.5v-163h192q26 0 45 -19 t19 -45v-128q0 -26 -19 -45t-45 -19h-192v-647q149 20 271.5 82.5t189.5 153.5l-100 100q-15 16 -7 35q8 20 30 20h352q14 0 23 -9t9 -23z" />
+<glyph unicode="" horiz-adv-x="1152" d="M1056 768q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v320q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45q0 106 -75 181t-181 75t-181 -75t-75 -181 v-320h736z" />
+<glyph unicode="" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM1152 640q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM1280 640q0 -212 -150 -362t-362 -150t-362 150 t-150 362t150 362t362 150t362 -150t150 -362zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="1408" d="M384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM896 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM1408 800v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
+<glyph unicode="" horiz-adv-x="384" d="M384 288v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 1312v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
+<glyph unicode="" d="M512 256q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM863 162q-13 232 -177 396t-396 177q-14 1 -24 -9t-10 -23v-128q0 -13 8.5 -22t21.5 -10q154 -11 264 -121t121 -264q1 -13 10 -21.5t22 -8.5h128q13 0 23 10 t9 24zM1247 161q-5 154 -56 297.5t-139.5 260t-205 205t-260 139.5t-297.5 56q-14 1 -23 -9q-10 -10 -10 -23v-128q0 -13 9 -22t22 -10q204 -7 378 -111.5t278.5 -278.5t111.5 -378q1 -13 10 -22t22 -9h128q13 0 23 10q11 9 9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1152 585q32 18 32 55t-32 55l-544 320q-31 19 -64 1q-32 -19 -32 -56v-640q0 -37 32 -56 q16 -8 32 -8q17 0 32 9z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1024 1084l316 -316l-572 -572l-316 316zM813 105l618 618q19 19 19 45t-19 45l-362 362q-18 18 -45 18t-45 -18l-618 -618q-19 -19 -19 -45t19 -45l362 -362q18 -18 45 -18t45 18zM1702 742l-907 -908q-37 -37 -90.5 -37t-90.5 37l-126 126q56 56 56 136t-56 136 t-136 56t-136 -56l-125 126q-37 37 -37 90.5t37 90.5l907 906q37 37 90.5 37t90.5 -37l125 -125q-56 -56 -56 -136t56 -136t136 -56t136 56l126 -125q37 -37 37 -90.5t-37 -90.5z" />
+<glyph unicode="" d="M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h832q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5 t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1024" d="M1018 933q-18 -37 -58 -37h-192v-864q0 -14 -9 -23t-23 -9h-704q-21 0 -29 18q-8 20 4 35l160 192q9 11 25 11h320v640h-192q-40 0 -58 37q-17 37 9 68l320 384q18 22 49 22t49 -22l320 -384q27 -32 9 -68z" />
+<glyph unicode="" horiz-adv-x="1024" d="M32 1280h704q13 0 22.5 -9.5t9.5 -23.5v-863h192q40 0 58 -37t-9 -69l-320 -384q-18 -22 -49 -22t-49 22l-320 384q-26 31 -9 69q18 37 58 37h192v640h-320q-14 0 -25 11l-160 192q-13 14 -4 34q9 19 29 19z" />
+<glyph unicode="" d="M685 237l614 614q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-467 -467l-211 211q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l358 -358q19 -19 45 -19t45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5 t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" d="M404 428l152 -152l-52 -52h-56v96h-96v56zM818 818q14 -13 -3 -30l-291 -291q-17 -17 -30 -3q-14 13 3 30l291 291q17 17 30 3zM544 128l544 544l-288 288l-544 -544v-288h288zM1152 736l92 92q28 28 28 68t-28 68l-152 152q-28 28 -68 28t-68 -28l-92 -92zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" d="M1280 608v480q0 26 -19 45t-45 19h-480q-42 0 -59 -39q-17 -41 14 -70l144 -144l-534 -534q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l534 534l144 -144q18 -19 45 -19q12 0 25 5q39 17 39 59zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" d="M1005 435l352 352q19 19 19 45t-19 45l-352 352q-30 31 -69 14q-40 -17 -40 -59v-160q-119 0 -216 -19.5t-162.5 -51t-114 -79t-76.5 -95.5t-44.5 -109t-21.5 -111.5t-5 -110.5q0 -181 167 -404q10 -12 25 -12q7 0 13 3q22 9 19 33q-44 354 62 473q46 52 130 75.5 t224 23.5v-160q0 -42 40 -59q12 -5 24 -5q26 0 45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" d="M640 448l256 128l-256 128v-256zM1024 1039v-542l-512 -256v542zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1145 861q18 -35 -5 -66l-320 -448q-19 -27 -52 -27t-52 27l-320 448q-23 31 -5 66q17 35 57 35h640q40 0 57 -35zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" d="M1145 419q-17 -35 -57 -35h-640q-40 0 -57 35q-18 35 5 66l320 448q19 27 52 27t52 -27l320 -448q23 -31 5 -66zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" d="M1088 640q0 -33 -27 -52l-448 -320q-31 -23 -66 -5q-35 17 -35 57v640q0 40 35 57q35 18 66 -5l448 -320q27 -19 27 -52zM1280 160v960q0 14 -9 23t-23 9h-960q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h960q14 0 23 9t9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1024" d="M976 229l35 -159q3 -12 -3 -22.5t-17 -14.5l-5 -1q-4 -2 -10.5 -3.5t-16 -4.5t-21.5 -5.5t-25.5 -5t-30 -5t-33.5 -4.5t-36.5 -3t-38.5 -1q-234 0 -409 130.5t-238 351.5h-95q-13 0 -22.5 9.5t-9.5 22.5v113q0 13 9.5 22.5t22.5 9.5h66q-2 57 1 105h-67q-14 0 -23 9 t-9 23v114q0 14 9 23t23 9h98q67 210 243.5 338t400.5 128q102 0 194 -23q11 -3 20 -15q6 -11 3 -24l-43 -159q-3 -13 -14 -19.5t-24 -2.5l-4 1q-4 1 -11.5 2.5l-17.5 3.5t-22.5 3.5t-26 3t-29 2.5t-29.5 1q-126 0 -226 -64t-150 -176h468q16 0 25 -12q10 -12 7 -26 l-24 -114q-5 -26 -32 -26h-488q-3 -37 0 -105h459q15 0 25 -12q9 -12 6 -27l-24 -112q-2 -11 -11 -18.5t-20 -7.5h-387q48 -117 149.5 -185.5t228.5 -68.5q18 0 36 1.5t33.5 3.5t29.5 4.5t24.5 5t18.5 4.5l12 3l5 2q13 5 26 -2q12 -7 15 -21z" />
+<glyph unicode="" horiz-adv-x="1024" d="M1020 399v-367q0 -14 -9 -23t-23 -9h-956q-14 0 -23 9t-9 23v150q0 13 9.5 22.5t22.5 9.5h97v383h-95q-14 0 -23 9.5t-9 22.5v131q0 14 9 23t23 9h95v223q0 171 123.5 282t314.5 111q185 0 335 -125q9 -8 10 -20.5t-7 -22.5l-103 -127q-9 -11 -22 -12q-13 -2 -23 7 q-5 5 -26 19t-69 32t-93 18q-85 0 -137 -47t-52 -123v-215h305q13 0 22.5 -9t9.5 -23v-131q0 -13 -9.5 -22.5t-22.5 -9.5h-305v-379h414v181q0 13 9 22.5t23 9.5h162q14 0 23 -9.5t9 -22.5z" />
+<glyph unicode="" horiz-adv-x="1024" d="M978 351q0 -153 -99.5 -263.5t-258.5 -136.5v-175q0 -14 -9 -23t-23 -9h-135q-13 0 -22.5 9.5t-9.5 22.5v175q-66 9 -127.5 31t-101.5 44.5t-74 48t-46.5 37.5t-17.5 18q-17 21 -2 41l103 135q7 10 23 12q15 2 24 -9l2 -2q113 -99 243 -125q37 -8 74 -8q81 0 142.5 43 t61.5 122q0 28 -15 53t-33.5 42t-58.5 37.5t-66 32t-80 32.5q-39 16 -61.5 25t-61.5 26.5t-62.5 31t-56.5 35.5t-53.5 42.5t-43.5 49t-35.5 58t-21 66.5t-8.5 78q0 138 98 242t255 134v180q0 13 9.5 22.5t22.5 9.5h135q14 0 23 -9t9 -23v-176q57 -6 110.5 -23t87 -33.5 t63.5 -37.5t39 -29t15 -14q17 -18 5 -38l-81 -146q-8 -15 -23 -16q-14 -3 -27 7q-3 3 -14.5 12t-39 26.5t-58.5 32t-74.5 26t-85.5 11.5q-95 0 -155 -43t-60 -111q0 -26 8.5 -48t29.5 -41.5t39.5 -33t56 -31t60.5 -27t70 -27.5q53 -20 81 -31.5t76 -35t75.5 -42.5t62 -50 t53 -63.5t31.5 -76.5t13 -94z" />
+<glyph unicode="" horiz-adv-x="898" d="M898 1066v-102q0 -14 -9 -23t-23 -9h-168q-23 -144 -129 -234t-276 -110q167 -178 459 -536q14 -16 4 -34q-8 -18 -29 -18h-195q-16 0 -25 12q-306 367 -498 571q-9 9 -9 22v127q0 13 9.5 22.5t22.5 9.5h112q132 0 212.5 43t102.5 125h-427q-14 0 -23 9t-9 23v102 q0 14 9 23t23 9h413q-57 113 -268 113h-145q-13 0 -22.5 9.5t-9.5 22.5v133q0 14 9 23t23 9h832q14 0 23 -9t9 -23v-102q0 -14 -9 -23t-23 -9h-233q47 -61 64 -144h171q14 0 23 -9t9 -23z" />
+<glyph unicode="" horiz-adv-x="1027" d="M603 0h-172q-13 0 -22.5 9t-9.5 23v330h-288q-13 0 -22.5 9t-9.5 23v103q0 13 9.5 22.5t22.5 9.5h288v85h-288q-13 0 -22.5 9t-9.5 23v104q0 13 9.5 22.5t22.5 9.5h214l-321 578q-8 16 0 32q10 16 28 16h194q19 0 29 -18l215 -425q19 -38 56 -125q10 24 30.5 68t27.5 61 l191 420q8 19 29 19h191q17 0 27 -16q9 -14 1 -31l-313 -579h215q13 0 22.5 -9.5t9.5 -22.5v-104q0 -14 -9.5 -23t-22.5 -9h-290v-85h290q13 0 22.5 -9.5t9.5 -22.5v-103q0 -14 -9.5 -23t-22.5 -9h-290v-330q0 -13 -9.5 -22.5t-22.5 -9.5z" />
+<glyph unicode="" horiz-adv-x="1280" d="M1043 971q0 100 -65 162t-171 62h-320v-448h320q106 0 171 62t65 162zM1280 971q0 -193 -126.5 -315t-326.5 -122h-340v-118h505q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-505v-192q0 -14 -9.5 -23t-22.5 -9h-167q-14 0 -23 9t-9 23v192h-224q-14 0 -23 9t-9 23v128 q0 14 9 23t23 9h224v118h-224q-14 0 -23 9t-9 23v149q0 13 9 22.5t23 9.5h224v629q0 14 9 23t23 9h539q200 0 326.5 -122t126.5 -315z" />
+<glyph unicode="" horiz-adv-x="1792" d="M514 341l81 299h-159l75 -300q1 -1 1 -3t1 -3q0 1 0.5 3.5t0.5 3.5zM630 768l35 128h-292l32 -128h225zM822 768h139l-35 128h-70zM1271 340l78 300h-162l81 -299q0 -1 0.5 -3.5t1.5 -3.5q0 1 0.5 3t0.5 3zM1382 768l33 128h-297l34 -128h230zM1792 736v-64q0 -14 -9 -23 t-23 -9h-213l-164 -616q-7 -24 -31 -24h-159q-24 0 -31 24l-166 616h-209l-167 -616q-7 -24 -31 -24h-159q-11 0 -19.5 7t-10.5 17l-160 616h-208q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h175l-33 128h-142q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h109l-89 344q-5 15 5 28 q10 12 26 12h137q26 0 31 -24l90 -360h359l97 360q7 24 31 24h126q24 0 31 -24l98 -360h365l93 360q5 24 31 24h137q16 0 26 -12q10 -13 5 -28l-91 -344h111q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-145l-34 -128h179q14 0 23 -9t9 -23z" />
+<glyph unicode="" horiz-adv-x="1280" d="M1167 896q18 -182 -131 -258q117 -28 175 -103t45 -214q-7 -71 -32.5 -125t-64.5 -89t-97 -58.5t-121.5 -34.5t-145.5 -15v-255h-154v251q-80 0 -122 1v-252h-154v255q-18 0 -54 0.5t-55 0.5h-200l31 183h111q50 0 58 51v402h16q-6 1 -16 1v287q-13 68 -89 68h-111v164 l212 -1q64 0 97 1v252h154v-247q82 2 122 2v245h154v-252q79 -7 140 -22.5t113 -45t82.5 -78t36.5 -114.5zM952 351q0 36 -15 64t-37 46t-57.5 30.5t-65.5 18.5t-74 9t-69 3t-64.5 -1t-47.5 -1v-338q8 0 37 -0.5t48 -0.5t53 1.5t58.5 4t57 8.5t55.5 14t47.5 21t39.5 30 t24.5 40t9.5 51zM881 827q0 33 -12.5 58.5t-30.5 42t-48 28t-55 16.5t-61.5 8t-58 2.5t-54 -1t-39.5 -0.5v-307q5 0 34.5 -0.5t46.5 0t50 2t55 5.5t51.5 11t48.5 18.5t37 27t27 38.5t9 51z" />
+<glyph unicode="" d="M1024 1024v472q22 -14 36 -28l408 -408q14 -14 28 -36h-472zM896 992q0 -40 28 -68t68 -28h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544z" />
+<glyph unicode="" d="M1468 1060q14 -14 28 -36h-472v472q22 -14 36 -28zM992 896h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544q0 -40 28 -68t68 -28zM1152 160v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704 q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1191 1128h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1572 -23 v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -11v-2l14 2q9 2 30 2h248v119h121zM1661 874v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162 l230 -662h70z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1191 104h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1661 -150 v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162l230 -662h70zM1572 1001v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -10v-3l14 3q9 1 30 1h248 v119h121z" />
+<glyph unicode="" horiz-adv-x="1792" d="M736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1792 -32v-192q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832 q14 0 23 -9t9 -23zM1600 480v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1408 992v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1216 1504v-192q0 -14 -9 -23t-23 -9h-256 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1216 -32v-192q0 -14 -9 -23t-23 -9h-256q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192 q14 0 23 -9t9 -23zM1408 480v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1600 992v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1792 1504v-192q0 -14 -9 -23t-23 -9h-832 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832q14 0 23 -9t9 -23z" />
+<glyph unicode="" d="M1346 223q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23 zM1486 165q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5 t82 -252.5zM1456 882v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165z" />
+<glyph unicode="" d="M1346 1247q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9 t9 -23zM1456 -142v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165zM1486 1189q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13 q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5t82 -252.5z" />
+<glyph unicode="" horiz-adv-x="1664" d="M256 192q0 26 -19 45t-45 19q-27 0 -45.5 -19t-18.5 -45q0 -27 18.5 -45.5t45.5 -18.5q26 0 45 18.5t19 45.5zM416 704v-640q0 -26 -19 -45t-45 -19h-288q-26 0 -45 19t-19 45v640q0 26 19 45t45 19h288q26 0 45 -19t19 -45zM1600 704q0 -86 -55 -149q15 -44 15 -76 q3 -76 -43 -137q17 -56 0 -117q-15 -57 -54 -94q9 -112 -49 -181q-64 -76 -197 -78h-36h-76h-17q-66 0 -144 15.5t-121.5 29t-120.5 39.5q-123 43 -158 44q-26 1 -45 19.5t-19 44.5v641q0 25 18 43.5t43 20.5q24 2 76 59t101 121q68 87 101 120q18 18 31 48t17.5 48.5 t13.5 60.5q7 39 12.5 61t19.5 52t34 50q19 19 45 19q46 0 82.5 -10.5t60 -26t40 -40.5t24 -45t12 -50t5 -45t0.5 -39q0 -38 -9.5 -76t-19 -60t-27.5 -56q-3 -6 -10 -18t-11 -22t-8 -24h277q78 0 135 -57t57 -135z" />
+<glyph unicode="" horiz-adv-x="1664" d="M256 960q0 -26 -19 -45t-45 -19q-27 0 -45.5 19t-18.5 45q0 27 18.5 45.5t45.5 18.5q26 0 45 -18.5t19 -45.5zM416 448v640q0 26 -19 45t-45 19h-288q-26 0 -45 -19t-19 -45v-640q0 -26 19 -45t45 -19h288q26 0 45 19t19 45zM1545 597q55 -61 55 -149q-1 -78 -57.5 -135 t-134.5 -57h-277q4 -14 8 -24t11 -22t10 -18q18 -37 27 -57t19 -58.5t10 -76.5q0 -24 -0.5 -39t-5 -45t-12 -50t-24 -45t-40 -40.5t-60 -26t-82.5 -10.5q-26 0 -45 19q-20 20 -34 50t-19.5 52t-12.5 61q-9 42 -13.5 60.5t-17.5 48.5t-31 48q-33 33 -101 120q-49 64 -101 121 t-76 59q-25 2 -43 20.5t-18 43.5v641q0 26 19 44.5t45 19.5q35 1 158 44q77 26 120.5 39.5t121.5 29t144 15.5h17h76h36q133 -2 197 -78q58 -69 49 -181q39 -37 54 -94q17 -61 0 -117q46 -61 43 -137q0 -32 -15 -76z" />
+<glyph unicode="" d="M919 233v157q0 50 -29 50q-17 0 -33 -16v-224q16 -16 33 -16q29 0 29 49zM1103 355h66v34q0 51 -33 51t-33 -51v-34zM532 621v-70h-80v-423h-74v423h-78v70h232zM733 495v-367h-67v40q-39 -45 -76 -45q-33 0 -42 28q-6 16 -6 54v290h66v-270q0 -24 1 -26q1 -15 15 -15 q20 0 42 31v280h67zM985 384v-146q0 -52 -7 -73q-12 -42 -53 -42q-35 0 -68 41v-36h-67v493h67v-161q32 40 68 40q41 0 53 -42q7 -21 7 -74zM1236 255v-9q0 -29 -2 -43q-3 -22 -15 -40q-27 -40 -80 -40q-52 0 -81 38q-21 27 -21 86v129q0 59 20 86q29 38 80 38t78 -38 q21 -28 21 -86v-76h-133v-65q0 -51 34 -51q24 0 30 26q0 1 0.5 7t0.5 16.5v21.5h68zM785 1079v-156q0 -51 -32 -51t-32 51v156q0 52 32 52t32 -52zM1318 366q0 177 -19 260q-10 44 -43 73.5t-76 34.5q-136 15 -412 15q-275 0 -411 -15q-44 -5 -76.5 -34.5t-42.5 -73.5 q-20 -87 -20 -260q0 -176 20 -260q10 -43 42.5 -73t75.5 -35q137 -15 412 -15t412 15q43 5 75.5 35t42.5 73q20 84 20 260zM563 1017l90 296h-75l-51 -195l-53 195h-78l24 -69t23 -69q35 -103 46 -158v-201h74v201zM852 936v130q0 58 -21 87q-29 38 -78 38q-51 0 -78 -38 q-21 -29 -21 -87v-130q0 -58 21 -87q27 -38 78 -38q49 0 78 38q21 27 21 87zM1033 816h67v370h-67v-283q-22 -31 -42 -31q-15 0 -16 16q-1 2 -1 26v272h-67v-293q0 -37 6 -55q11 -27 43 -27q36 0 77 45v-40zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" d="M971 292v-211q0 -67 -39 -67q-23 0 -45 22v301q22 22 45 22q39 0 39 -67zM1309 291v-46h-90v46q0 68 45 68t45 -68zM343 509h107v94h-312v-94h105v-569h100v569zM631 -60h89v494h-89v-378q-30 -42 -57 -42q-18 0 -21 21q-1 3 -1 35v364h-89v-391q0 -49 8 -73 q12 -37 58 -37q48 0 102 61v-54zM1060 88v197q0 73 -9 99q-17 56 -71 56q-50 0 -93 -54v217h-89v-663h89v48q45 -55 93 -55q54 0 71 55q9 27 9 100zM1398 98v13h-91q0 -51 -2 -61q-7 -36 -40 -36q-46 0 -46 69v87h179v103q0 79 -27 116q-39 51 -106 51q-68 0 -107 -51 q-28 -37 -28 -116v-173q0 -79 29 -116q39 -51 108 -51q72 0 108 53q18 27 21 54q2 9 2 58zM790 1011v210q0 69 -43 69t-43 -69v-210q0 -70 43 -70t43 70zM1509 260q0 -234 -26 -350q-14 -59 -58 -99t-102 -46q-184 -21 -555 -21t-555 21q-58 6 -102.5 46t-57.5 99 q-26 112 -26 350q0 234 26 350q14 59 58 99t103 47q183 20 554 20t555 -20q58 -7 102.5 -47t57.5 -99q26 -112 26 -350zM511 1536h102l-121 -399v-271h-100v271q-14 74 -61 212q-37 103 -65 187h106l71 -263zM881 1203v-175q0 -81 -28 -118q-37 -51 -106 -51q-67 0 -105 51 q-28 38 -28 118v175q0 80 28 117q38 51 105 51q69 0 106 -51q28 -37 28 -117zM1216 1365v-499h-91v55q-53 -62 -103 -62q-46 0 -59 37q-8 24 -8 75v394h91v-367q0 -33 1 -35q3 -22 21 -22q27 0 57 43v381h91z" />
+<glyph unicode="" horiz-adv-x="1408" d="M597 869q-10 -18 -257 -456q-27 -46 -65 -46h-239q-21 0 -31 17t0 36l253 448q1 0 0 1l-161 279q-12 22 -1 37q9 15 32 15h239q40 0 66 -45zM1403 1511q11 -16 0 -37l-528 -934v-1l336 -615q11 -20 1 -37q-10 -15 -32 -15h-239q-42 0 -66 45l-339 622q18 32 531 942 q25 45 64 45h241q22 0 31 -15z" />
+<glyph unicode="" d="M685 771q0 1 -126 222q-21 34 -52 34h-184q-18 0 -26 -11q-7 -12 1 -29l125 -216v-1l-196 -346q-9 -14 0 -28q8 -13 24 -13h185q31 0 50 36zM1309 1268q-7 12 -24 12h-187q-30 0 -49 -35l-411 -729q1 -2 262 -481q20 -35 52 -35h184q18 0 25 12q8 13 -1 28l-260 476v1 l409 723q8 16 0 28zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1280 640q0 37 -30 54l-512 320q-31 20 -65 2q-33 -18 -33 -56v-640q0 -38 33 -56q16 -8 31 -8q20 0 34 10l512 320q30 17 30 54zM1792 640q0 -96 -1 -150t-8.5 -136.5t-22.5 -147.5q-16 -73 -69 -123t-124 -58q-222 -25 -671 -25t-671 25q-71 8 -124.5 58t-69.5 123 q-14 65 -21.5 147.5t-8.5 136.5t-1 150t1 150t8.5 136.5t22.5 147.5q16 73 69 123t124 58q222 25 671 25t671 -25q71 -8 124.5 -58t69.5 -123q14 -65 21.5 -147.5t8.5 -136.5t1 -150z" />
+<glyph unicode="" horiz-adv-x="1792" d="M402 829l494 -305l-342 -285l-490 319zM1388 274v-108l-490 -293v-1l-1 1l-1 -1v1l-489 293v108l147 -96l342 284v2l1 -1l1 1v-2l343 -284zM554 1418l342 -285l-494 -304l-338 270zM1390 829l338 -271l-489 -319l-343 285zM1239 1418l489 -319l-338 -270l-494 304z" />
+<glyph unicode="" horiz-adv-x="1408" d="M928 135v-151l-707 -1v151zM1169 481v-701l-1 -35v-1h-1132l-35 1h-1v736h121v-618h928v618h120zM241 393l704 -65l-13 -150l-705 65zM309 709l683 -183l-39 -146l-683 183zM472 1058l609 -360l-77 -130l-609 360zM832 1389l398 -585l-124 -85l-399 584zM1285 1536 l121 -697l-149 -26l-121 697z" />
+<glyph unicode="" d="M1362 110v648h-135q20 -63 20 -131q0 -126 -64 -232.5t-174 -168.5t-240 -62q-197 0 -337 135.5t-140 327.5q0 68 20 131h-141v-648q0 -26 17.5 -43.5t43.5 -17.5h1069q25 0 43 17.5t18 43.5zM1078 643q0 124 -90.5 211.5t-218.5 87.5q-127 0 -217.5 -87.5t-90.5 -211.5 t90.5 -211.5t217.5 -87.5q128 0 218.5 87.5t90.5 211.5zM1362 1003v165q0 28 -20 48.5t-49 20.5h-174q-29 0 -49 -20.5t-20 -48.5v-165q0 -29 20 -49t49 -20h174q29 0 49 20t20 49zM1536 1211v-1142q0 -81 -58 -139t-139 -58h-1142q-81 0 -139 58t-58 139v1142q0 81 58 139 t139 58h1142q81 0 139 -58t58 -139z" />
+<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM698 640q0 88 -62 150t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150zM1262 640q0 88 -62 150 t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150z" />
+<glyph unicode="" d="M768 914l201 -306h-402zM1133 384h94l-459 691l-459 -691h94l104 160h522zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="1408" d="M815 677q8 -63 -50.5 -101t-111.5 -6q-39 17 -53.5 58t-0.5 82t52 58q36 18 72.5 12t64 -35.5t27.5 -67.5zM926 698q-14 107 -113 164t-197 13q-63 -28 -100.5 -88.5t-34.5 -129.5q4 -91 77.5 -155t165.5 -56q91 8 152 84t50 168zM1165 1240q-20 27 -56 44.5t-58 22 t-71 12.5q-291 47 -566 -2q-43 -7 -66 -12t-55 -22t-50 -43q30 -28 76 -45.5t73.5 -22t87.5 -11.5q228 -29 448 -1q63 8 89.5 12t72.5 21.5t75 46.5zM1222 205q-8 -26 -15.5 -76.5t-14 -84t-28.5 -70t-58 -56.5q-86 -48 -189.5 -71.5t-202 -22t-201.5 18.5q-46 8 -81.5 18 t-76.5 27t-73 43.5t-52 61.5q-25 96 -57 292l6 16l18 9q223 -148 506.5 -148t507.5 148q21 -6 24 -23t-5 -45t-8 -37zM1403 1166q-26 -167 -111 -655q-5 -30 -27 -56t-43.5 -40t-54.5 -31q-252 -126 -610 -88q-248 27 -394 139q-15 12 -25.5 26.5t-17 35t-9 34t-6 39.5 t-5.5 35q-9 50 -26.5 150t-28 161.5t-23.5 147.5t-22 158q3 26 17.5 48.5t31.5 37.5t45 30t46 22.5t48 18.5q125 46 313 64q379 37 676 -50q155 -46 215 -122q16 -20 16.5 -51t-5.5 -54z" />
+<glyph unicode="" d="M848 666q0 43 -41 66t-77 1q-43 -20 -42.5 -72.5t43.5 -70.5q39 -23 81 4t36 72zM928 682q8 -66 -36 -121t-110 -61t-119 40t-56 113q-2 49 25.5 93t72.5 64q70 31 141.5 -10t81.5 -118zM1100 1073q-20 -21 -53.5 -34t-53 -16t-63.5 -8q-155 -20 -324 0q-44 6 -63 9.5 t-52.5 16t-54.5 32.5q13 19 36 31t40 15.5t47 8.5q198 35 408 1q33 -5 51 -8.5t43 -16t39 -31.5zM1142 327q0 7 5.5 26.5t3 32t-17.5 16.5q-161 -106 -365 -106t-366 106l-12 -6l-5 -12q26 -154 41 -210q47 -81 204 -108q249 -46 428 53q34 19 49 51.5t22.5 85.5t12.5 71z M1272 1020q9 53 -8 75q-43 55 -155 88q-216 63 -487 36q-132 -12 -226 -46q-38 -15 -59.5 -25t-47 -34t-29.5 -54q8 -68 19 -138t29 -171t24 -137q1 -5 5 -31t7 -36t12 -27t22 -28q105 -80 284 -100q259 -28 440 63q24 13 39.5 23t31 29t19.5 40q48 267 80 473zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1024" d="M944 207l80 -237q-23 -35 -111 -66t-177 -32q-104 -2 -190.5 26t-142.5 74t-95 106t-55.5 120t-16.5 118v544h-168v215q72 26 129 69.5t91 90t58 102t34 99t15 88.5q1 5 4.5 8.5t7.5 3.5h244v-424h333v-252h-334v-518q0 -30 6.5 -56t22.5 -52.5t49.5 -41.5t81.5 -14 q78 2 134 29z" />
+<glyph unicode="" d="M1136 75l-62 183q-44 -22 -103 -22q-36 -1 -62 10.5t-38.5 31.5t-17.5 40.5t-5 43.5v398h257v194h-256v326h-188q-8 0 -9 -10q-5 -44 -17.5 -87t-39 -95t-77 -95t-118.5 -68v-165h130v-418q0 -57 21.5 -115t65 -111t121 -85.5t176.5 -30.5q69 1 136.5 25t85.5 50z M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="768" d="M765 237q8 -19 -5 -35l-350 -384q-10 -10 -23 -10q-14 0 -24 10l-355 384q-13 16 -5 35q9 19 29 19h224v1248q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1248h224q21 0 29 -19z" />
+<glyph unicode="" horiz-adv-x="768" d="M765 1043q-9 -19 -29 -19h-224v-1248q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1248h-224q-21 0 -29 19t5 35l350 384q10 10 23 10q14 0 24 -10l355 -384q13 -16 5 -35z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 736v-192q0 -14 -9 -23t-23 -9h-1248v-224q0 -21 -19 -29t-35 5l-384 350q-10 10 -10 23q0 14 10 24l384 354q16 14 35 6q19 -9 19 -29v-224h1248q14 0 23 -9t9 -23z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1728 643q0 -14 -10 -24l-384 -354q-16 -14 -35 -6q-19 9 -19 29v224h-1248q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h1248v224q0 21 19 29t35 -5l384 -350q10 -10 10 -23z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1393 321q-39 -125 -123 -250q-129 -196 -257 -196q-49 0 -140 32q-86 32 -151 32q-61 0 -142 -33q-81 -34 -132 -34q-152 0 -301 259q-147 261 -147 503q0 228 113 374q112 144 284 144q72 0 177 -30q104 -30 138 -30q45 0 143 34q102 34 173 34q119 0 213 -65 q52 -36 104 -100q-79 -67 -114 -118q-65 -94 -65 -207q0 -124 69 -223t158 -126zM1017 1494q0 -61 -29 -136q-30 -75 -93 -138q-54 -54 -108 -72q-37 -11 -104 -17q3 149 78 257q74 107 250 148q1 -3 2.5 -11t2.5 -11q0 -4 0.5 -10t0.5 -10z" />
+<glyph unicode="" horiz-adv-x="1664" d="M682 530v-651l-682 94v557h682zM682 1273v-659h-682v565zM1664 530v-786l-907 125v661h907zM1664 1408v-794h-907v669z" />
+<glyph unicode="" horiz-adv-x="1408" d="M493 1053q16 0 27.5 11.5t11.5 27.5t-11.5 27.5t-27.5 11.5t-27 -11.5t-11 -27.5t11 -27.5t27 -11.5zM915 1053q16 0 27 11.5t11 27.5t-11 27.5t-27 11.5t-27.5 -11.5t-11.5 -27.5t11.5 -27.5t27.5 -11.5zM103 869q42 0 72 -30t30 -72v-430q0 -43 -29.5 -73t-72.5 -30 t-73 30t-30 73v430q0 42 30 72t73 30zM1163 850v-666q0 -46 -32 -78t-77 -32h-75v-227q0 -43 -30 -73t-73 -30t-73 30t-30 73v227h-138v-227q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73l-1 227h-74q-46 0 -78 32t-32 78v666h918zM931 1255q107 -55 171 -153.5t64 -215.5 h-925q0 117 64 215.5t172 153.5l-71 131q-7 13 5 20q13 6 20 -6l72 -132q95 42 201 42t201 -42l72 132q7 12 20 6q12 -7 5 -20zM1408 767v-430q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73v430q0 43 30 72.5t72 29.5q43 0 73 -29.5t30 -72.5z" />
+<glyph unicode="" d="M663 1125q-11 -1 -15.5 -10.5t-8.5 -9.5q-5 -1 -5 5q0 12 19 15h10zM750 1111q-4 -1 -11.5 6.5t-17.5 4.5q24 11 32 -2q3 -6 -3 -9zM399 684q-4 1 -6 -3t-4.5 -12.5t-5.5 -13.5t-10 -13q-7 -10 -1 -12q4 -1 12.5 7t12.5 18q1 3 2 7t2 6t1.5 4.5t0.5 4v3t-1 2.5t-3 2z M1254 325q0 18 -55 42q4 15 7.5 27.5t5 26t3 21.5t0.5 22.5t-1 19.5t-3.5 22t-4 20.5t-5 25t-5.5 26.5q-10 48 -47 103t-72 75q24 -20 57 -83q87 -162 54 -278q-11 -40 -50 -42q-31 -4 -38.5 18.5t-8 83.5t-11.5 107q-9 39 -19.5 69t-19.5 45.5t-15.5 24.5t-13 15t-7.5 7 q-14 62 -31 103t-29.5 56t-23.5 33t-15 40q-4 21 6 53.5t4.5 49.5t-44.5 25q-15 3 -44.5 18t-35.5 16q-8 1 -11 26t8 51t36 27q37 3 51 -30t4 -58q-11 -19 -2 -26.5t30 -0.5q13 4 13 36v37q-5 30 -13.5 50t-21 30.5t-23.5 15t-27 7.5q-107 -8 -89 -134q0 -15 -1 -15 q-9 9 -29.5 10.5t-33 -0.5t-15.5 5q1 57 -16 90t-45 34q-27 1 -41.5 -27.5t-16.5 -59.5q-1 -15 3.5 -37t13 -37.5t15.5 -13.5q10 3 16 14q4 9 -7 8q-7 0 -15.5 14.5t-9.5 33.5q-1 22 9 37t34 14q17 0 27 -21t9.5 -39t-1.5 -22q-22 -15 -31 -29q-8 -12 -27.5 -23.5 t-20.5 -12.5q-13 -14 -15.5 -27t7.5 -18q14 -8 25 -19.5t16 -19t18.5 -13t35.5 -6.5q47 -2 102 15q2 1 23 7t34.5 10.5t29.5 13t21 17.5q9 14 20 8q5 -3 6.5 -8.5t-3 -12t-16.5 -9.5q-20 -6 -56.5 -21.5t-45.5 -19.5q-44 -19 -70 -23q-25 -5 -79 2q-10 2 -9 -2t17 -19 q25 -23 67 -22q17 1 36 7t36 14t33.5 17.5t30 17t24.5 12t17.5 2.5t8.5 -11q0 -2 -1 -4.5t-4 -5t-6 -4.5t-8.5 -5t-9 -4.5t-10 -5t-9.5 -4.5q-28 -14 -67.5 -44t-66.5 -43t-49 -1q-21 11 -63 73q-22 31 -25 22q-1 -3 -1 -10q0 -25 -15 -56.5t-29.5 -55.5t-21 -58t11.5 -63 q-23 -6 -62.5 -90t-47.5 -141q-2 -18 -1.5 -69t-5.5 -59q-8 -24 -29 -3q-32 31 -36 94q-2 28 4 56q4 19 -1 18l-4 -5q-36 -65 10 -166q5 -12 25 -28t24 -20q20 -23 104 -90.5t93 -76.5q16 -15 17.5 -38t-14 -43t-45.5 -23q8 -15 29 -44.5t28 -54t7 -70.5q46 24 7 92 q-4 8 -10.5 16t-9.5 12t-2 6q3 5 13 9.5t20 -2.5q46 -52 166 -36q133 15 177 87q23 38 34 30q12 -6 10 -52q-1 -25 -23 -92q-9 -23 -6 -37.5t24 -15.5q3 19 14.5 77t13.5 90q2 21 -6.5 73.5t-7.5 97t23 70.5q15 18 51 18q1 37 34.5 53t72.5 10.5t60 -22.5zM626 1152 q3 17 -2.5 30t-11.5 15q-9 2 -9 -7q2 -5 5 -6q10 0 7 -15q-3 -20 8 -20q3 0 3 3zM1045 955q-2 8 -6.5 11.5t-13 5t-14.5 5.5q-5 3 -9.5 8t-7 8t-5.5 6.5t-4 4t-4 -1.5q-14 -16 7 -43.5t39 -31.5q9 -1 14.5 8t3.5 20zM867 1168q0 11 -5 19.5t-11 12.5t-9 3q-14 -1 -7 -7l4 -2 q14 -4 18 -31q0 -3 8 2zM921 1401q0 2 -2.5 5t-9 7t-9.5 6q-15 15 -24 15q-9 -1 -11.5 -7.5t-1 -13t-0.5 -12.5q-1 -4 -6 -10.5t-6 -9t3 -8.5q4 -3 8 0t11 9t15 9q1 1 9 1t15 2t9 7zM1486 60q20 -12 31 -24.5t12 -24t-2.5 -22.5t-15.5 -22t-23.5 -19.5t-30 -18.5 t-31.5 -16.5t-32 -15.5t-27 -13q-38 -19 -85.5 -56t-75.5 -64q-17 -16 -68 -19.5t-89 14.5q-18 9 -29.5 23.5t-16.5 25.5t-22 19.5t-47 9.5q-44 1 -130 1q-19 0 -57 -1.5t-58 -2.5q-44 -1 -79.5 -15t-53.5 -30t-43.5 -28.5t-53.5 -11.5q-29 1 -111 31t-146 43q-19 4 -51 9.5 t-50 9t-39.5 9.5t-33.5 14.5t-17 19.5q-10 23 7 66.5t18 54.5q1 16 -4 40t-10 42.5t-4.5 36.5t10.5 27q14 12 57 14t60 12q30 18 42 35t12 51q21 -73 -32 -106q-32 -20 -83 -15q-34 3 -43 -10q-13 -15 5 -57q2 -6 8 -18t8.5 -18t4.5 -17t1 -22q0 -15 -17 -49t-14 -48 q3 -17 37 -26q20 -6 84.5 -18.5t99.5 -20.5q24 -6 74 -22t82.5 -23t55.5 -4q43 6 64.5 28t23 48t-7.5 58.5t-19 52t-20 36.5q-121 190 -169 242q-68 74 -113 40q-11 -9 -15 15q-3 16 -2 38q1 29 10 52t24 47t22 42q8 21 26.5 72t29.5 78t30 61t39 54q110 143 124 195 q-12 112 -16 310q-2 90 24 151.5t106 104.5q39 21 104 21q53 1 106 -13.5t89 -41.5q57 -42 91.5 -121.5t29.5 -147.5q-5 -95 30 -214q34 -113 133 -218q55 -59 99.5 -163t59.5 -191q8 -49 5 -84.5t-12 -55.5t-20 -22q-10 -2 -23.5 -19t-27 -35.5t-40.5 -33.5t-61 -14 q-18 1 -31.5 5t-22.5 13.5t-13.5 15.5t-11.5 20.5t-9 19.5q-22 37 -41 30t-28 -49t7 -97q20 -70 1 -195q-10 -65 18 -100.5t73 -33t85 35.5q59 49 89.5 66.5t103.5 42.5q53 18 77 36.5t18.5 34.5t-25 28.5t-51.5 23.5q-33 11 -49.5 48t-15 72.5t15.5 47.5q1 -31 8 -56.5 t14.5 -40.5t20.5 -28.5t21 -19t21.5 -13t16.5 -9.5z" />
+<glyph unicode="" d="M1024 36q-42 241 -140 498h-2l-2 -1q-16 -6 -43 -16.5t-101 -49t-137 -82t-131 -114.5t-103 -148l-15 11q184 -150 418 -150q132 0 256 52zM839 643q-21 49 -53 111q-311 -93 -673 -93q-1 -7 -1 -21q0 -124 44 -236.5t124 -201.5q50 89 123.5 166.5t142.5 124.5t130.5 81 t99.5 48l37 13q4 1 13 3.5t13 4.5zM732 855q-120 213 -244 378q-138 -65 -234 -186t-128 -272q302 0 606 80zM1416 536q-210 60 -409 29q87 -239 128 -469q111 75 185 189.5t96 250.5zM611 1277q-1 0 -2 -1q1 1 2 1zM1201 1132q-185 164 -433 164q-76 0 -155 -19 q131 -170 246 -382q69 26 130 60.5t96.5 61.5t65.5 57t37.5 40.5zM1424 647q-3 232 -149 410l-1 -1q-9 -12 -19 -24.5t-43.5 -44.5t-71 -60.5t-100 -65t-131.5 -64.5q25 -53 44 -95q2 -6 6.5 -17.5t7.5 -16.5q36 5 74.5 7t73.5 2t69 -1.5t64 -4t56.5 -5.5t48 -6.5t36.5 -6 t25 -4.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1173 473q0 50 -19.5 91.5t-48.5 68.5t-73 49t-82.5 34t-87.5 23l-104 24q-30 7 -44 10.5t-35 11.5t-30 16t-16.5 21t-7.5 30q0 77 144 77q43 0 77 -12t54 -28.5t38 -33.5t40 -29t48 -12q47 0 75.5 32t28.5 77q0 55 -56 99.5t-142 67.5t-182 23q-68 0 -132 -15.5 t-119.5 -47t-89 -87t-33.5 -128.5q0 -61 19 -106.5t56 -75.5t80 -48.5t103 -32.5l146 -36q90 -22 112 -36q32 -20 32 -60q0 -39 -40 -64.5t-105 -25.5q-51 0 -91.5 16t-65 38.5t-45.5 45t-46 38.5t-54 16q-50 0 -75.5 -30t-25.5 -75q0 -92 122 -157.5t291 -65.5 q73 0 140 18.5t122.5 53.5t88.5 93.5t33 131.5zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5q-130 0 -234 80q-77 -16 -150 -16q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5q0 73 16 150q-80 104 -80 234q0 159 112.5 271.5t271.5 112.5q130 0 234 -80 q77 16 150 16q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -73 -16 -150q80 -104 80 -234z" />
+<glyph unicode="" horiz-adv-x="1280" d="M1000 1102l37 194q5 23 -9 40t-35 17h-712q-23 0 -38.5 -17t-15.5 -37v-1101q0 -7 6 -1l291 352q23 26 38 33.5t48 7.5h239q22 0 37 14.5t18 29.5q24 130 37 191q4 21 -11.5 40t-36.5 19h-294q-29 0 -48 19t-19 48v42q0 29 19 47.5t48 18.5h346q18 0 35 13.5t20 29.5z M1227 1324q-15 -73 -53.5 -266.5t-69.5 -350t-35 -173.5q-6 -22 -9 -32.5t-14 -32.5t-24.5 -33t-38.5 -21t-58 -10h-271q-13 0 -22 -10q-8 -9 -426 -494q-22 -25 -58.5 -28.5t-48.5 5.5q-55 22 -55 98v1410q0 55 38 102.5t120 47.5h888q95 0 127 -53t10 -159zM1227 1324 l-158 -790q4 17 35 173.5t69.5 350t53.5 266.5z" />
+<glyph unicode="" d="M704 192v1024q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-1024q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1376 576v640q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-640q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408 q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1280" d="M1280 480q0 -40 -28 -68t-68 -28q-51 0 -80 43l-227 341h-45v-132l247 -411q9 -15 9 -33q0 -26 -19 -45t-45 -19h-192v-272q0 -46 -33 -79t-79 -33h-160q-46 0 -79 33t-33 79v272h-192q-26 0 -45 19t-19 45q0 18 9 33l247 411v132h-45l-227 -341q-29 -43 -80 -43 q-40 0 -68 28t-28 68q0 29 16 53l256 384q73 107 176 107h384q103 0 176 -107l256 -384q16 -24 16 -53zM864 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="" horiz-adv-x="1024" d="M1024 832v-416q0 -40 -28 -68t-68 -28t-68 28t-28 68v352h-64v-912q0 -46 -33 -79t-79 -33t-79 33t-33 79v464h-64v-464q0 -46 -33 -79t-79 -33t-79 33t-33 79v912h-64v-352q0 -40 -28 -68t-68 -28t-68 28t-28 68v416q0 80 56 136t136 56h640q80 0 136 -56t56 -136z M736 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="" d="M773 234l350 473q16 22 24.5 59t-6 85t-61.5 79q-40 26 -83 25.5t-73.5 -17.5t-54.5 -45q-36 -40 -96 -40q-59 0 -95 40q-24 28 -54.5 45t-73.5 17.5t-84 -25.5q-46 -31 -60.5 -79t-6 -85t24.5 -59zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1472 640q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5t223.5 45.5t184 123t123 184t45.5 223.5zM1748 363q-4 -15 -20 -20l-292 -96v-306q0 -16 -13 -26q-15 -10 -29 -4 l-292 94l-180 -248q-10 -13 -26 -13t-26 13l-180 248l-292 -94q-14 -6 -29 4q-13 10 -13 26v306l-292 96q-16 5 -20 20q-5 17 4 29l180 248l-180 248q-9 13 -4 29q4 15 20 20l292 96v306q0 16 13 26q15 10 29 4l292 -94l180 248q9 12 26 12t26 -12l180 -248l292 94 q14 6 29 -4q13 -10 13 -26v-306l292 -96q16 -5 20 -20q5 -16 -4 -29l-180 -248l180 -248q9 -12 4 -29z" />
+<glyph unicode="" d="M1262 233q-54 -9 -110 -9q-182 0 -337 90t-245 245t-90 337q0 192 104 357q-201 -60 -328.5 -229t-127.5 -384q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51q144 0 273.5 61.5t220.5 171.5zM1465 318q-94 -203 -283.5 -324.5t-413.5 -121.5q-156 0 -298 61 t-245 164t-164 245t-61 298q0 153 57.5 292.5t156 241.5t235.5 164.5t290 68.5q44 2 61 -39q18 -41 -15 -72q-86 -78 -131.5 -181.5t-45.5 -218.5q0 -148 73 -273t198 -198t273 -73q118 0 228 51q41 18 72 -13q14 -14 17.5 -34t-4.5 -38z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1088 704q0 26 -19 45t-45 19h-256q-26 0 -45 -19t-19 -45t19 -45t45 -19h256q26 0 45 19t19 45zM1664 896v-960q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v960q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1728 1344v-256q0 -26 -19 -45t-45 -19h-1536 q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1536q26 0 45 -19t19 -45z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1632 576q0 -26 -19 -45t-45 -19h-224q0 -171 -67 -290l208 -209q19 -19 19 -45t-19 -45q-18 -19 -45 -19t-45 19l-198 197q-5 -5 -15 -13t-42 -28.5t-65 -36.5t-82 -29t-97 -13v896h-128v-896q-51 0 -101.5 13.5t-87 33t-66 39t-43.5 32.5l-15 14l-183 -207 q-20 -21 -48 -21q-24 0 -43 16q-19 18 -20.5 44.5t15.5 46.5l202 227q-58 114 -58 274h-224q-26 0 -45 19t-19 45t19 45t45 19h224v294l-173 173q-19 19 -19 45t19 45t45 19t45 -19l173 -173h844l173 173q19 19 45 19t45 -19t19 -45t-19 -45l-173 -173v-294h224q26 0 45 -19 t19 -45zM1152 1152h-640q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5z" />
+<glyph unicode="" horiz-adv-x="1920" d="M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-78 -100 -90 -131q-17 -41 14 -81q17 -21 81 -82h1l1 -1l1 -1l2 -2q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58 t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6 q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q17 19 38 30q53 26 239 24 q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2 q39 5 64 -2.5t31 -16.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M675 252q21 34 11 69t-45 50q-34 14 -73 1t-60 -46q-22 -34 -13 -68.5t43 -50.5t74.5 -2.5t62.5 47.5zM769 373q8 13 3.5 26.5t-17.5 18.5q-14 5 -28.5 -0.5t-21.5 -18.5q-17 -31 13 -45q14 -5 29 0.5t22 18.5zM943 266q-45 -102 -158 -150t-224 -12 q-107 34 -147.5 126.5t6.5 187.5q47 93 151.5 139t210.5 19q111 -29 158.5 -119.5t2.5 -190.5zM1255 426q-9 96 -89 170t-208.5 109t-274.5 21q-223 -23 -369.5 -141.5t-132.5 -264.5q9 -96 89 -170t208.5 -109t274.5 -21q223 23 369.5 141.5t132.5 264.5zM1563 422 q0 -68 -37 -139.5t-109 -137t-168.5 -117.5t-226 -83t-270.5 -31t-275 33.5t-240.5 93t-171.5 151t-65 199.5q0 115 69.5 245t197.5 258q169 169 341.5 236t246.5 -7q65 -64 20 -209q-4 -14 -1 -20t10 -7t14.5 0.5t13.5 3.5l6 2q139 59 246 59t153 -61q45 -63 0 -178 q-2 -13 -4.5 -20t4.5 -12.5t12 -7.5t17 -6q57 -18 103 -47t80 -81.5t34 -116.5zM1489 1046q42 -47 54.5 -108.5t-6.5 -117.5q-8 -23 -29.5 -34t-44.5 -4q-23 8 -34 29.5t-4 44.5q20 63 -24 111t-107 35q-24 -5 -45 8t-25 37q-5 24 8 44.5t37 25.5q60 13 119 -5.5t101 -65.5z M1670 1209q87 -96 112.5 -222.5t-13.5 -241.5q-9 -27 -34 -40t-52 -4t-40 34t-5 52q28 82 10 172t-80 158q-62 69 -148 95.5t-173 8.5q-28 -6 -52 9.5t-30 43.5t9.5 51.5t43.5 29.5q123 26 244 -11.5t208 -134.5z" />
+<glyph unicode="" d="M1133 -34q-171 -94 -368 -94q-196 0 -367 94q138 87 235.5 211t131.5 268q35 -144 132.5 -268t235.5 -211zM638 1394v-485q0 -252 -126.5 -459.5t-330.5 -306.5q-181 215 -181 495q0 187 83.5 349.5t229.5 269.5t325 137zM1536 638q0 -280 -181 -495 q-204 99 -330.5 306.5t-126.5 459.5v485q179 -30 325 -137t229.5 -269.5t83.5 -349.5z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1402 433q-32 -80 -76 -138t-91 -88.5t-99 -46.5t-101.5 -14.5t-96.5 8.5t-86.5 22t-69.5 27.5t-46 22.5l-17 10q-113 -228 -289.5 -359.5t-384.5 -132.5q-19 0 -32 13t-13 32t13 31.5t32 12.5q173 1 322.5 107.5t251.5 294.5q-36 -14 -72 -23t-83 -13t-91 2.5t-93 28.5 t-92 59t-84.5 100t-74.5 146q114 47 214 57t167.5 -7.5t124.5 -56.5t88.5 -77t56.5 -82q53 131 79 291q-7 -1 -18 -2.5t-46.5 -2.5t-69.5 0.5t-81.5 10t-88.5 23t-84 42.5t-75 65t-54.5 94.5t-28.5 127.5q70 28 133.5 36.5t112.5 -1t92 -30t73.5 -50t56 -61t42 -63t27.5 -56 t16 -39.5l4 -16q12 122 12 195q-8 6 -21.5 16t-49 44.5t-63.5 71.5t-54 93t-33 112.5t12 127t70 138.5q73 -25 127.5 -61.5t84.5 -76.5t48 -85t20.5 -89t-0.5 -85.5t-13 -76.5t-19 -62t-17 -42l-7 -15q1 -5 1 -50.5t-1 -71.5q3 7 10 18.5t30.5 43t50.5 58t71 55.5t91.5 44.5 t112 14.5t132.5 -24q-2 -78 -21.5 -141.5t-50 -104.5t-69.5 -71.5t-81.5 -45.5t-84.5 -24t-80 -9.5t-67.5 1t-46.5 4.5l-17 3q-23 -147 -73 -283q6 7 18 18.5t49.5 41t77.5 52.5t99.5 42t117.5 20t129 -23.5t137 -77.5z" />
+<glyph unicode="" horiz-adv-x="1280" d="M1259 283v-66q0 -85 -57.5 -144.5t-138.5 -59.5h-57l-260 -269v269h-529q-81 0 -138.5 59.5t-57.5 144.5v66h1238zM1259 609v-255h-1238v255h1238zM1259 937v-255h-1238v255h1238zM1259 1077v-67h-1238v67q0 84 57.5 143.5t138.5 59.5h846q81 0 138.5 -59.5t57.5 -143.5z " />
+<glyph unicode="" d="M1152 640q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1152 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-192q0 -14 -9 -23t-23 -9q-12 0 -24 10l-319 319q-9 9 -9 23t9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h352q13 0 22.5 -9.5t9.5 -22.5zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1024 960v-640q0 -26 -19 -45t-45 -19q-20 0 -37 12l-448 320q-27 19 -27 52t27 52l448 320q17 12 37 12q26 0 45 -19t19 -45zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5z M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5 t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1023 349l102 -204q-58 -179 -210 -290t-339 -111q-156 0 -288.5 77.5t-210 210t-77.5 288.5q0 181 104.5 330t274.5 211l17 -131q-122 -54 -195 -165.5t-73 -244.5q0 -185 131.5 -316.5t316.5 -131.5q126 0 232.5 65t165 175.5t49.5 236.5zM1571 249l58 -114l-256 -128 q-13 -7 -29 -7q-40 0 -57 35l-239 477h-472q-24 0 -42.5 16.5t-21.5 40.5l-96 779q-2 16 6 42q14 51 57 82.5t97 31.5q66 0 113 -47t47 -113q0 -69 -52 -117.5t-120 -41.5l37 -289h423v-128h-407l16 -128h455q40 0 57 -35l228 -455z" />
+<glyph unicode="" d="M1254 899q16 85 -21 132q-52 65 -187 45q-17 -3 -41 -12.5t-57.5 -30.5t-64.5 -48.5t-59.5 -70t-44.5 -91.5q80 7 113.5 -16t26.5 -99q-5 -52 -52 -143q-43 -78 -71 -99q-44 -32 -87 14q-23 24 -37.5 64.5t-19 73t-10 84t-8.5 71.5q-23 129 -34 164q-12 37 -35.5 69 t-50.5 40q-57 16 -127 -25q-54 -32 -136.5 -106t-122.5 -102v-7q16 -8 25.5 -26t21.5 -20q21 -3 54.5 8.5t58 10.5t41.5 -30q11 -18 18.5 -38.5t15 -48t12.5 -40.5q17 -46 53 -187q36 -146 57 -197q42 -99 103 -125q43 -12 85 -1.5t76 31.5q131 77 250 237 q104 139 172.5 292.5t82.5 226.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1152" d="M1152 704q0 -191 -94.5 -353t-256.5 -256.5t-353 -94.5h-160q-14 0 -23 9t-9 23v611l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v93l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v250q0 14 9 23t23 9h160 q14 0 23 -9t9 -23v-181l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-93l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-487q188 13 318 151t130 328q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" />
+<glyph unicode="" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-352v-352q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v352h-352q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h352v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-352h352q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832 q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="2176" d="M620 416q-110 -64 -268 -64h-128v64h-64q-13 0 -22.5 23.5t-9.5 56.5q0 24 7 49q-58 2 -96.5 10.5t-38.5 20.5t38.5 20.5t96.5 10.5q-7 25 -7 49q0 33 9.5 56.5t22.5 23.5h64v64h128q158 0 268 -64h1113q42 -7 106.5 -18t80.5 -14q89 -15 150 -40.5t83.5 -47.5t22.5 -40 t-22.5 -40t-83.5 -47.5t-150 -40.5q-16 -3 -80.5 -14t-106.5 -18h-1113zM1739 668q53 -36 53 -92t-53 -92l81 -30q68 48 68 122t-68 122zM625 400h1015q-217 -38 -456 -80q-57 0 -113 -24t-83 -48l-28 -24l-288 -288q-26 -26 -70.5 -45t-89.5 -19h-96l-93 464h29 q157 0 273 64zM352 816h-29l93 464h96q46 0 90 -19t70 -45l288 -288q4 -4 11 -10.5t30.5 -23t48.5 -29t61.5 -23t72.5 -10.5l456 -80h-1015q-116 64 -273 64z" />
+<glyph unicode="" horiz-adv-x="1664" d="M1519 760q62 0 103.5 -40.5t41.5 -101.5q0 -97 -93 -130l-172 -59l56 -167q7 -21 7 -47q0 -59 -42 -102t-101 -43q-47 0 -85.5 27t-53.5 72l-55 165l-310 -106l55 -164q8 -24 8 -47q0 -59 -42 -102t-102 -43q-47 0 -85 27t-53 72l-55 163l-153 -53q-29 -9 -50 -9 q-61 0 -101.5 40t-40.5 101q0 47 27.5 85t71.5 53l156 53l-105 313l-156 -54q-26 -8 -48 -8q-60 0 -101 40.5t-41 100.5q0 47 27.5 85t71.5 53l157 53l-53 159q-8 24 -8 47q0 60 42 102.5t102 42.5q47 0 85 -27t53 -72l54 -160l310 105l-54 160q-8 24 -8 47q0 59 42.5 102 t101.5 43q47 0 85.5 -27.5t53.5 -71.5l53 -161l162 55q21 6 43 6q60 0 102.5 -39.5t42.5 -98.5q0 -45 -30 -81.5t-74 -51.5l-157 -54l105 -316l164 56q24 8 46 8zM725 498l310 105l-105 315l-310 -107z" />
+<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM1280 352v436q-31 -35 -64 -55q-34 -22 -132.5 -85t-151.5 -99q-98 -69 -164 -69v0v0q-66 0 -164 69 q-46 32 -141.5 92.5t-142.5 92.5q-12 8 -33 27t-31 27v-436q0 -40 28 -68t68 -28h832q40 0 68 28t28 68zM1280 925q0 41 -27.5 70t-68.5 29h-832q-40 0 -68 -28t-28 -68q0 -37 30.5 -76.5t67.5 -64.5q47 -32 137.5 -89t129.5 -83q3 -2 17 -11.5t21 -14t21 -13t23.5 -13 t21.5 -9.5t22.5 -7.5t20.5 -2.5t20.5 2.5t22.5 7.5t21.5 9.5t23.5 13t21 13t21 14t17 11.5l267 174q35 23 66.5 62.5t31.5 73.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M127 640q0 163 67 313l367 -1005q-196 95 -315 281t-119 411zM1415 679q0 -19 -2.5 -38.5t-10 -49.5t-11.5 -44t-17.5 -59t-17.5 -58l-76 -256l-278 826q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-75 1 -202 10q-12 1 -20.5 -5t-11.5 -15t-1.5 -18.5t9 -16.5 t19.5 -8l80 -8l120 -328l-168 -504l-280 832q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-7 0 -23 0.5t-26 0.5q105 160 274.5 253.5t367.5 93.5q147 0 280.5 -53t238.5 -149h-10q-55 0 -92 -40.5t-37 -95.5q0 -12 2 -24t4 -21.5t8 -23t9 -21t12 -22.5t12.5 -21 t14.5 -24t14 -23q63 -107 63 -212zM909 573l237 -647q1 -6 5 -11q-126 -44 -255 -44q-112 0 -217 32zM1570 1009q95 -174 95 -369q0 -209 -104 -385.5t-279 -278.5l235 678q59 169 59 276q0 42 -6 79zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286 t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 -215q173 0 331.5 68t273 182.5t182.5 273t68 331.5t-68 331.5t-182.5 273t-273 182.5t-331.5 68t-331.5 -68t-273 -182.5t-182.5 -273t-68 -331.5t68 -331.5t182.5 -273 t273 -182.5t331.5 -68z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1086 1536v-1536l-272 -128q-228 20 -414 102t-293 208.5t-107 272.5q0 140 100.5 263.5t275 205.5t391.5 108v-172q-217 -38 -356.5 -150t-139.5 -255q0 -152 154.5 -267t388.5 -145v1360zM1755 954l37 -390l-525 114l147 83q-119 70 -280 99v172q277 -33 481 -157z" />
+<glyph unicode="" horiz-adv-x="2048" d="M960 1536l960 -384v-128h-128q0 -26 -20.5 -45t-48.5 -19h-1526q-28 0 -48.5 19t-20.5 45h-128v128zM256 896h256v-768h128v768h256v-768h128v768h256v-768h128v768h256v-768h59q28 0 48.5 -19t20.5 -45v-64h-1664v64q0 26 20.5 45t48.5 19h59v768zM1851 -64 q28 0 48.5 -19t20.5 -45v-128h-1920v128q0 26 20.5 45t48.5 19h1782z" />
+<glyph unicode="" horiz-adv-x="2304" d="M1774 700l18 -316q4 -69 -82 -128t-235 -93.5t-323 -34.5t-323 34.5t-235 93.5t-82 128l18 316l574 -181q22 -7 48 -7t48 7zM2304 1024q0 -23 -22 -31l-1120 -352q-4 -1 -10 -1t-10 1l-652 206q-43 -34 -71 -111.5t-34 -178.5q63 -36 63 -109q0 -69 -58 -107l58 -433 q2 -14 -8 -25q-9 -11 -24 -11h-192q-15 0 -24 11q-10 11 -8 25l58 433q-58 38 -58 107q0 73 65 111q11 207 98 330l-333 104q-22 8 -22 31t22 31l1120 352q4 1 10 1t10 -1l1120 -352q22 -8 22 -31z" />
+<glyph unicode="" d="M859 579l13 -707q-62 11 -105 11q-41 0 -105 -11l13 707q-40 69 -168.5 295.5t-216.5 374.5t-181 287q58 -15 108 -15q43 0 111 15q63 -111 133.5 -229.5t167 -276.5t138.5 -227q37 61 109.5 177.5t117.5 190t105 176t107 189.5q54 -14 107 -14q56 0 114 14v0 q-28 -39 -60 -88.5t-49.5 -78.5t-56.5 -96t-49 -84q-146 -248 -353 -610z" />
+<glyph unicode="" horiz-adv-x="1280" d="M981 197q0 25 -7 49t-14.5 42t-27 41.5t-29.5 35t-38.5 34.5t-36.5 29t-41.5 30t-36.5 26q-16 2 -49 2q-53 0 -104.5 -7t-107 -25t-97 -46t-68.5 -74.5t-27 -105.5q0 -56 23.5 -102t61 -75.5t87 -50t100 -29t101.5 -8.5q58 0 111.5 13t99 39t73 73t27.5 109zM864 1055 q0 59 -17 125.5t-48 129t-84 103.5t-117 41q-42 0 -82.5 -19.5t-66.5 -52.5q-46 -59 -46 -160q0 -46 10 -97.5t31.5 -103t52 -92.5t75 -67t96.5 -26q37 0 77.5 16.5t65.5 43.5q53 56 53 159zM752 1536h417l-137 -88h-132q75 -63 113 -133t38 -160q0 -72 -24.5 -129.5 t-59.5 -93t-69.5 -65t-59 -61.5t-24.5 -66q0 -36 32 -70.5t77 -68t90.5 -73.5t77.5 -104t32 -142q0 -91 -49 -173q-71 -122 -209.5 -179.5t-298.5 -57.5q-132 0 -246.5 41.5t-172.5 137.5q-36 59 -36 131q0 81 44.5 150t118.5 115q131 82 404 100q-32 41 -47.5 73.5 t-15.5 73.5q0 40 21 85q-46 -4 -68 -4q-148 0 -249.5 96.5t-101.5 244.5q0 82 36 159t99 131q76 66 182 98t218 32z" />
+<glyph unicode="" horiz-adv-x="1984" d="M831 572q0 -56 -40.5 -96t-96.5 -40q-57 0 -98 40t-41 96q0 57 41.5 98t97.5 41t96.5 -41t40.5 -98zM1292 711q56 0 96.5 -41t40.5 -98q0 -56 -40.5 -96t-96.5 -40q-57 0 -98 40t-41 96q0 57 41.5 98t97.5 41zM1984 722q0 -62 -31 -114t-83 -82q5 -33 5 -61 q0 -121 -68.5 -230.5t-197.5 -193.5q-125 -82 -285.5 -125.5t-335.5 -43.5q-176 0 -336.5 43.5t-284.5 125.5q-129 84 -197.5 193t-68.5 231q0 29 5 66q-48 31 -77 81.5t-29 109.5q0 94 66 160t160 66q83 0 148 -55q248 158 592 164l134 423q4 14 17.5 21.5t28.5 4.5 l347 -82q22 50 68.5 81t102.5 31q77 0 131.5 -54.5t54.5 -131.5t-54.5 -132t-131.5 -55q-76 0 -130.5 54t-55.5 131l-315 74l-116 -366q327 -14 560 -166q64 58 151 58q94 0 160 -66t66 -160zM1664 1459q-45 0 -77 -32t-32 -77t32 -77t77 -32t77 32t32 77t-32 77t-77 32z M77 722q0 -67 51 -111q49 131 180 235q-36 25 -82 25q-62 0 -105.5 -43.5t-43.5 -105.5zM1567 105q112 73 171.5 166t59.5 194t-59.5 193.5t-171.5 165.5q-116 75 -265.5 115.5t-313.5 40.5t-313.5 -40.5t-265.5 -115.5q-112 -73 -171.5 -165.5t-59.5 -193.5t59.5 -194 t171.5 -166q116 -75 265.5 -115.5t313.5 -40.5t313.5 40.5t265.5 115.5zM1850 605q57 46 57 117q0 62 -43.5 105.5t-105.5 43.5q-49 0 -86 -28q131 -105 178 -238zM1258 237q11 11 27 11t27 -11t11 -27.5t-11 -27.5q-99 -99 -319 -99h-2q-220 0 -319 99q-11 11 -11 27.5 t11 27.5t27 11t27 -11q77 -77 265 -77h2q188 0 265 77z" />
+<glyph unicode="" d="M950 393q7 7 17.5 7t17.5 -7t7 -18t-7 -18q-65 -64 -208 -64h-1h-1q-143 0 -207 64q-8 7 -8 18t8 18q7 7 17.5 7t17.5 -7q49 -51 172 -51h1h1q122 0 173 51zM671 613q0 -37 -26 -64t-63 -27t-63 27t-26 64t26 63t63 26t63 -26t26 -63zM1214 1049q-29 0 -50 21t-21 50 q0 30 21 51t50 21q30 0 51 -21t21 -51q0 -29 -21 -50t-51 -21zM1216 1408q132 0 226 -94t94 -227v-894q0 -133 -94 -227t-226 -94h-896q-132 0 -226 94t-94 227v894q0 133 94 227t226 94h896zM1321 596q35 14 57 45.5t22 70.5q0 51 -36 87.5t-87 36.5q-60 0 -98 -48 q-151 107 -375 115l83 265l206 -49q1 -50 36.5 -85t84.5 -35q50 0 86 35.5t36 85.5t-36 86t-86 36q-36 0 -66 -20.5t-45 -53.5l-227 54q-9 2 -17.5 -2.5t-11.5 -14.5l-95 -302q-224 -4 -381 -113q-36 43 -93 43q-51 0 -87 -36.5t-36 -87.5q0 -37 19.5 -67.5t52.5 -45.5 q-7 -25 -7 -54q0 -98 74 -181.5t201.5 -132t278.5 -48.5q150 0 277.5 48.5t201.5 132t74 181.5q0 27 -6 54zM971 702q37 0 63 -26t26 -63t-26 -64t-63 -27t-63 27t-26 64t26 63t63 26z" />
+<glyph unicode="" d="M866 697l90 27v62q0 79 -58 135t-138 56t-138 -55.5t-58 -134.5v-283q0 -20 -14 -33.5t-33 -13.5t-32.5 13.5t-13.5 33.5v120h-151v-122q0 -82 57.5 -139t139.5 -57q81 0 138.5 56.5t57.5 136.5v280q0 19 13.5 33t33.5 14q19 0 32.5 -14t13.5 -33v-54zM1199 502v122h-150 v-126q0 -20 -13.5 -33.5t-33.5 -13.5q-19 0 -32.5 14t-13.5 33v123l-90 -26l-60 28v-123q0 -80 58 -137t139 -57t138.5 57t57.5 139zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103 t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="1920" d="M1062 824v118q0 42 -30 72t-72 30t-72 -30t-30 -72v-612q0 -175 -126 -299t-303 -124q-178 0 -303.5 125.5t-125.5 303.5v266h328v-262q0 -43 30 -72.5t72 -29.5t72 29.5t30 72.5v620q0 171 126.5 292t301.5 121q176 0 302 -122t126 -294v-136l-195 -58zM1592 602h328 v-266q0 -178 -125.5 -303.5t-303.5 -125.5q-177 0 -303 124.5t-126 300.5v268l131 -61l195 58v-270q0 -42 30 -71.5t72 -29.5t72 29.5t30 71.5v275z" />
+<glyph unicode="" d="M1472 160v480h-704v704h-480q-93 0 -158.5 -65.5t-65.5 -158.5v-480h704v-704h480q93 0 158.5 65.5t65.5 158.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="2048" d="M328 1254h204v-983h-532v697h328v286zM328 435v369h-123v-369h123zM614 968v-697h205v697h-205zM614 1254v-204h205v204h-205zM901 968h533v-942h-533v163h328v82h-328v697zM1229 435v369h-123v-369h123zM1516 968h532v-942h-532v163h327v82h-327v697zM1843 435v369h-123 v-369h123z" />
+<glyph unicode="" d="M1046 516q0 -64 -38 -109t-91 -45q-43 0 -70 15v277q28 17 70 17q53 0 91 -45.5t38 -109.5zM703 944q0 -64 -38 -109.5t-91 -45.5q-43 0 -70 15v277q28 17 70 17q53 0 91 -45t38 -109zM1265 513q0 134 -88 229t-213 95q-20 0 -39 -3q-23 -78 -78 -136q-87 -95 -211 -101 v-636l211 41v206q51 -19 117 -19q125 0 213 95t88 229zM922 940q0 134 -88.5 229t-213.5 95q-74 0 -141 -36h-186v-840l211 41v206q55 -19 116 -19q125 0 213.5 95t88.5 229zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="2038" d="M1222 607q75 3 143.5 -20.5t118 -58.5t101 -94.5t84 -108t75.5 -120.5q33 -56 78.5 -109t75.5 -80.5t99 -88.5q-48 -30 -108.5 -57.5t-138.5 -59t-114 -47.5q-44 37 -74 115t-43.5 164.5t-33 180.5t-42.5 168.5t-72.5 123t-122.5 48.5l-10 -2l-6 -4q4 -5 13 -14 q6 -5 28 -23.5t25.5 -22t19 -18t18 -20.5t11.5 -21t10.5 -27.5t4.5 -31t4 -40.5l1 -33q1 -26 -2.5 -57.5t-7.5 -52t-12.5 -58.5t-11.5 -53q-35 1 -101 -9.5t-98 -10.5q-39 0 -72 10q-2 16 -2 47q0 74 3 96q2 13 31.5 41.5t57 59t26.5 51.5q-24 2 -43 -24 q-36 -53 -111.5 -99.5t-136.5 -46.5q-25 0 -75.5 63t-106.5 139.5t-84 96.5q-6 4 -27 30q-482 -112 -513 -112q-16 0 -28 11t-12 27q0 15 8.5 26.5t22.5 14.5l486 106q-8 14 -8 25t5.5 17.5t16 11.5t20 7t23 4.5t18.5 4.5q4 1 15.5 7.5t17.5 6.5q15 0 28 -16t20 -33 q163 37 172 37q17 0 29.5 -11t12.5 -28q0 -15 -8.5 -26t-23.5 -14l-182 -40l-1 -16q-1 -26 81.5 -117.5t104.5 -91.5q47 0 119 80t72 129q0 36 -23.5 53t-51 18.5t-51 11.5t-23.5 34q0 16 10 34l-68 19q43 44 43 117q0 26 -5 58q82 16 144 16q44 0 71.5 -1.5t48.5 -8.5 t31 -13.5t20.5 -24.5t15.5 -33.5t17 -47.5t24 -60l50 25q-3 -40 -23 -60t-42.5 -21t-40 -6.5t-16.5 -20.5zM1282 842q-5 5 -13.5 15.5t-12 14.5t-10.5 11.5t-10 10.5l-8 8t-8.5 7.5t-8 5t-8.5 4.5q-7 3 -14.5 5t-20.5 2.5t-22 0.5h-32.5h-37.5q-126 0 -217 -43 q16 30 36 46.5t54 29.5t65.5 36t46 36.5t50 55t43.5 50.5q12 -9 28 -31.5t32 -36.5t38 -13l12 1v-76l22 -1q247 95 371 190q28 21 50 39t42.5 37.5t33 31t29.5 34t24 31t24.5 37t23 38t27 47.5t29.5 53l7 9q-2 -53 -43 -139q-79 -165 -205 -264t-306 -142q-14 -3 -42 -7.5 t-50 -9.5t-39 -14q3 -19 24.5 -46t21.5 -34q0 -11 -26 -30zM1061 -79q39 26 131.5 47.5t146.5 21.5q9 0 22.5 -15.5t28 -42.5t26 -50t24 -51t14.5 -33q-121 -45 -244 -45q-61 0 -125 11zM822 568l48 12l109 -177l-73 -48zM1323 51q3 -15 3 -16q0 -7 -17.5 -14.5t-46 -13 t-54 -9.5t-53.5 -7.5t-32 -4.5l-7 43q21 2 60.5 8.5t72 10t60.5 3.5h14zM866 679l-96 -20l-6 17q10 1 32.5 7t34.5 6q19 0 35 -10zM1061 45h31l10 -83l-41 -12v95zM1950 1535v1v-1zM1950 1535l-1 -5l-2 -2l1 3zM1950 1535l1 1z" />
+<glyph unicode="" d="M1167 -50q-5 19 -24 5q-30 -22 -87 -39t-131 -17q-129 0 -193 49q-5 4 -13 4q-11 0 -26 -12q-7 -6 -7.5 -16t7.5 -20q34 -32 87.5 -46t102.5 -12.5t99 4.5q41 4 84.5 20.5t65 30t28.5 20.5q12 12 7 29zM1128 65q-19 47 -39 61q-23 15 -76 15q-47 0 -71 -10 q-29 -12 -78 -56q-26 -24 -12 -44q9 -8 17.5 -4.5t31.5 23.5q3 2 10.5 8.5t10.5 8.5t10 7t11.5 7t12.5 5t15 4.5t16.5 2.5t20.5 1q27 0 44.5 -7.5t23 -14.5t13.5 -22q10 -17 12.5 -20t12.5 1q23 12 14 34zM1483 346q0 22 -5 44.5t-16.5 45t-34 36.5t-52.5 14 q-33 0 -97 -41.5t-129 -83.5t-101 -42q-27 -1 -63.5 19t-76 49t-83.5 58t-100 49t-111 19q-115 -1 -197 -78.5t-84 -178.5q-2 -112 74 -164q29 -20 62.5 -28.5t103.5 -8.5q57 0 132 32.5t134 71t120 70.5t93 31q26 -1 65 -31.5t71.5 -67t68 -67.5t55.5 -32q35 -3 58.5 14 t55.5 63q28 41 42.5 101t14.5 106zM1536 506q0 -164 -62 -304.5t-166 -236t-242.5 -149.5t-290.5 -54t-293 57.5t-247.5 157t-170.5 241.5t-64 302q0 89 19.5 172.5t49 145.5t70.5 118.5t78.5 94t78.5 69.5t64.5 46.5t42.5 24.5q14 8 51 26.5t54.5 28.5t48 30t60.5 44 q36 28 58 72.5t30 125.5q129 -155 186 -193q44 -29 130 -68t129 -66q21 -13 39 -25t60.5 -46.5t76 -70.5t75 -95t69 -122t47 -148.5t19.5 -177.5z" />
+<glyph unicode="" d="M1070 463l-160 -160l-151 -152l-30 -30q-65 -64 -151.5 -87t-171.5 -2q-16 -70 -72 -115t-129 -45q-85 0 -145 60.5t-60 145.5q0 72 44.5 128t113.5 72q-22 86 1 173t88 152l12 12l151 -152l-11 -11q-37 -37 -37 -89t37 -90q37 -37 89 -37t89 37l30 30l151 152l161 160z M729 1145l12 -12l-152 -152l-12 12q-37 37 -89 37t-89 -37t-37 -89.5t37 -89.5l29 -29l152 -152l160 -160l-151 -152l-161 160l-151 152l-30 30q-68 67 -90 159.5t5 179.5q-70 15 -115 71t-45 129q0 85 60 145.5t145 60.5q76 0 133.5 -49t69.5 -123q84 20 169.5 -3.5 t149.5 -87.5zM1536 78q0 -85 -60 -145.5t-145 -60.5q-74 0 -131 47t-71 118q-86 -28 -179.5 -6t-161.5 90l-11 12l151 152l12 -12q37 -37 89 -37t89 37t37 89t-37 89l-30 30l-152 152l-160 160l152 152l160 -160l152 -152l29 -30q64 -64 87.5 -150.5t2.5 -171.5 q76 -11 126.5 -68.5t50.5 -134.5zM1534 1202q0 -77 -51 -135t-127 -69q26 -85 3 -176.5t-90 -158.5l-12 -12l-151 152l12 12q37 37 37 89t-37 89t-89 37t-89 -37l-30 -30l-152 -152l-160 -160l-152 152l161 160l152 152l29 30q67 67 159 89.5t178 -3.5q11 75 68.5 126 t135.5 51q85 0 145 -60.5t60 -145.5z" />
+<glyph unicode="" d="M654 458q-1 -3 -12.5 0.5t-31.5 11.5l-20 9q-44 20 -87 49q-7 5 -41 31.5t-38 28.5q-67 -103 -134 -181q-81 -95 -105 -110q-4 -2 -19.5 -4t-18.5 0q6 4 82 92q21 24 85.5 115t78.5 118q17 30 51 98.5t36 77.5q-8 1 -110 -33q-8 -2 -27.5 -7.5t-34.5 -9.5t-17 -5 q-2 -2 -2 -10.5t-1 -9.5q-5 -10 -31 -15q-23 -7 -47 0q-18 4 -28 21q-4 6 -5 23q6 2 24.5 5t29.5 6q58 16 105 32q100 35 102 35q10 2 43 19.5t44 21.5q9 3 21.5 8t14.5 5.5t6 -0.5q2 -12 -1 -33q0 -2 -12.5 -27t-26.5 -53.5t-17 -33.5q-25 -50 -77 -131l64 -28 q12 -6 74.5 -32t67.5 -28q4 -1 10.5 -25.5t4.5 -30.5zM449 944q3 -15 -4 -28q-12 -23 -50 -38q-30 -12 -60 -12q-26 3 -49 26q-14 15 -18 41l1 3q3 -3 19.5 -5t26.5 0t58 16q36 12 55 14q17 0 21 -17zM1147 815l63 -227l-139 42zM39 15l694 232v1032l-694 -233v-1031z M1280 332l102 -31l-181 657l-100 31l-216 -536l102 -31l45 110l211 -65zM777 1294l573 -184v380zM1088 -29l158 -13l-54 -160l-40 66q-130 -83 -276 -108q-58 -12 -91 -12h-84q-79 0 -199.5 39t-183.5 85q-8 7 -8 16q0 8 5 13.5t13 5.5q4 0 18 -7.5t30.5 -16.5t20.5 -11 q73 -37 159.5 -61.5t157.5 -24.5q95 0 167 14.5t157 50.5q15 7 30.5 15.5t34 19t28.5 16.5zM1536 1050v-1079l-774 246q-14 -6 -375 -127.5t-368 -121.5q-13 0 -18 13q0 1 -1 3v1078q3 9 4 10q5 6 20 11q106 35 149 50v384l558 -198q2 0 160.5 55t316 108.5t161.5 53.5 q20 0 20 -21v-418z" />
+<glyph unicode="" horiz-adv-x="1792" d="M288 1152q66 0 113 -47t47 -113v-1088q0 -66 -47 -113t-113 -47h-128q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h128zM1664 989q58 -34 93 -93t35 -128v-768q0 -106 -75 -181t-181 -75h-864q-66 0 -113 47t-47 113v1536q0 40 28 68t68 28h672q40 0 88 -20t76 -48 l152 -152q28 -28 48 -76t20 -88v-163zM928 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 512v128q0 14 -9 23 t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128 q14 0 23 9t9 23zM1184 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 256v128q0 14 -9 23t-23 9h-128 q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1536 896v256h-160q-40 0 -68 28t-28 68v160h-640v-512h896z" />
+<glyph unicode="" d="M1344 1536q26 0 45 -19t19 -45v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280zM512 1248v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 992v-64q0 -14 9 -23t23 -9h64q14 0 23 9 t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 736v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 480v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM384 160v64 q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 q14 0 23 9t9 23zM384 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 -96v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9 t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM896 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 928v64 q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 160v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9 t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23z" />
+<glyph unicode="" horiz-adv-x="1280" d="M1188 988l-292 -292v-824q0 -46 -33 -79t-79 -33t-79 33t-33 79v384h-64v-384q0 -46 -33 -79t-79 -33t-79 33t-33 79v824l-292 292q-28 28 -28 68t28 68t68 28t68 -28l228 -228h368l228 228q28 28 68 28t68 -28t28 -68t-28 -68zM864 1152q0 -93 -65.5 -158.5 t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="" horiz-adv-x="1664" d="M780 1064q0 -60 -19 -113.5t-63 -92.5t-105 -39q-76 0 -138 57.5t-92 135.5t-30 151q0 60 19 113.5t63 92.5t105 39q77 0 138.5 -57.5t91.5 -135t30 -151.5zM438 581q0 -80 -42 -139t-119 -59q-76 0 -141.5 55.5t-100.5 133.5t-35 152q0 80 42 139.5t119 59.5 q76 0 141.5 -55.5t100.5 -134t35 -152.5zM832 608q118 0 255 -97.5t229 -237t92 -254.5q0 -46 -17 -76.5t-48.5 -45t-64.5 -20t-76 -5.5q-68 0 -187.5 45t-182.5 45q-66 0 -192.5 -44.5t-200.5 -44.5q-183 0 -183 146q0 86 56 191.5t139.5 192.5t187.5 146t193 59zM1071 819 q-61 0 -105 39t-63 92.5t-19 113.5q0 74 30 151.5t91.5 135t138.5 57.5q61 0 105 -39t63 -92.5t19 -113.5q0 -73 -30 -151t-92 -135.5t-138 -57.5zM1503 923q77 0 119 -59.5t42 -139.5q0 -74 -35 -152t-100.5 -133.5t-141.5 -55.5q-77 0 -119 59t-42 139q0 74 35 152.5 t100.5 134t141.5 55.5z" />
+<glyph unicode="" horiz-adv-x="768" d="M704 1008q0 -145 -57 -243.5t-152 -135.5l45 -821q2 -26 -16 -45t-44 -19h-192q-26 0 -44 19t-16 45l45 821q-95 37 -152 135.5t-57 243.5q0 128 42.5 249.5t117.5 200t160 78.5t160 -78.5t117.5 -200t42.5 -249.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M896 -93l640 349v636l-640 -233v-752zM832 772l698 254l-698 254l-698 -254zM1664 1024v-768q0 -35 -18 -65t-49 -47l-704 -384q-28 -16 -61 -16t-61 16l-704 384q-31 17 -49 47t-18 65v768q0 40 23 73t61 47l704 256q22 8 44 8t44 -8l704 -256q38 -14 61 -47t23 -73z " />
+<glyph unicode="" horiz-adv-x="2304" d="M640 -96l384 192v314l-384 -164v-342zM576 358l404 173l-404 173l-404 -173zM1664 -96l384 192v314l-384 -164v-342zM1600 358l404 173l-404 173l-404 -173zM1152 651l384 165v266l-384 -164v-267zM1088 1030l441 189l-441 189l-441 -189zM2176 512v-416q0 -36 -19 -67 t-52 -47l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-5 2 -7 4q-2 -2 -7 -4l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-33 16 -52 47t-19 67v416q0 38 21.5 70t56.5 48l434 186v400q0 38 21.5 70t56.5 48l448 192q23 10 50 10t50 -10l448 -192q35 -16 56.5 -48t21.5 -70 v-400l434 -186q36 -16 57 -48t21 -70z" />
+<glyph unicode="" horiz-adv-x="2048" d="M1848 1197h-511v-124h511v124zM1596 771q-90 0 -146 -52.5t-62 -142.5h408q-18 195 -200 195zM1612 186q63 0 122 32t76 87h221q-100 -307 -427 -307q-214 0 -340.5 132t-126.5 347q0 208 130.5 345.5t336.5 137.5q138 0 240.5 -68t153 -179t50.5 -248q0 -17 -2 -47h-658 q0 -111 57.5 -171.5t166.5 -60.5zM277 236h296q205 0 205 167q0 180 -199 180h-302v-347zM277 773h281q78 0 123.5 36.5t45.5 113.5q0 144 -190 144h-260v-294zM0 1282h594q87 0 155 -14t126.5 -47.5t90 -96.5t31.5 -154q0 -181 -172 -263q114 -32 172 -115t58 -204 q0 -75 -24.5 -136.5t-66 -103.5t-98.5 -71t-121 -42t-134 -13h-611v1260z" />
+<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM499 1041h-371v-787h382q117 0 197 57.5t80 170.5q0 158 -143 200q107 52 107 164q0 57 -19.5 96.5 t-56.5 60.5t-79 29.5t-97 8.5zM477 723h-176v184h163q119 0 119 -90q0 -94 -106 -94zM486 388h-185v217h189q124 0 124 -113q0 -104 -128 -104zM1136 356q-68 0 -104 38t-36 107h411q1 10 1 30q0 132 -74.5 220.5t-203.5 88.5q-128 0 -210 -86t-82 -216q0 -135 79 -217 t213 -82q205 0 267 191h-138q-11 -34 -47.5 -54t-75.5 -20zM1126 722q113 0 124 -122h-254q4 56 39 89t91 33zM964 988h319v-77h-319v77z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1582 954q0 -101 -71.5 -172.5t-172.5 -71.5t-172.5 71.5t-71.5 172.5t71.5 172.5t172.5 71.5t172.5 -71.5t71.5 -172.5zM812 212q0 104 -73 177t-177 73q-27 0 -54 -6l104 -42q77 -31 109.5 -106.5t1.5 -151.5q-31 -77 -107 -109t-152 -1q-21 8 -62 24.5t-61 24.5 q32 -60 91 -96.5t130 -36.5q104 0 177 73t73 177zM1642 953q0 126 -89.5 215.5t-215.5 89.5q-127 0 -216.5 -89.5t-89.5 -215.5q0 -127 89.5 -216t216.5 -89q126 0 215.5 89t89.5 216zM1792 953q0 -189 -133.5 -322t-321.5 -133l-437 -319q-12 -129 -109 -218t-229 -89 q-121 0 -214 76t-118 192l-230 92v429l389 -157q79 48 173 48q13 0 35 -2l284 407q2 187 135.5 319t320.5 132q188 0 321.5 -133.5t133.5 -321.5z" />
+<glyph unicode="" d="M1242 889q0 80 -57 136.5t-137 56.5t-136.5 -57t-56.5 -136q0 -80 56.5 -136.5t136.5 -56.5t137 56.5t57 136.5zM632 301q0 -83 -58 -140.5t-140 -57.5q-56 0 -103 29t-72 77q52 -20 98 -40q60 -24 120 1.5t85 86.5q24 60 -1.5 120t-86.5 84l-82 33q22 5 42 5 q82 0 140 -57.5t58 -140.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v153l172 -69q20 -92 93.5 -152t168.5 -60q104 0 181 70t87 173l345 252q150 0 255.5 105.5t105.5 254.5q0 150 -105.5 255.5t-255.5 105.5 q-148 0 -253 -104.5t-107 -252.5l-225 -322q-9 1 -28 1q-75 0 -137 -37l-297 119v468q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5zM1289 887q0 -100 -71 -170.5t-171 -70.5t-170.5 70.5t-70.5 170.5t70.5 171t170.5 71q101 0 171.5 -70.5t70.5 -171.5z " />
+<glyph unicode="" horiz-adv-x="1792" d="M836 367l-15 -368l-2 -22l-420 29q-36 3 -67 31.5t-47 65.5q-11 27 -14.5 55t4 65t12 55t21.5 64t19 53q78 -12 509 -28zM449 953l180 -379l-147 92q-63 -72 -111.5 -144.5t-72.5 -125t-39.5 -94.5t-18.5 -63l-4 -21l-190 357q-17 26 -18 56t6 47l8 18q35 63 114 188 l-140 86zM1680 436l-188 -359q-12 -29 -36.5 -46.5t-43.5 -20.5l-18 -4q-71 -7 -219 -12l8 -164l-230 367l211 362l7 -173q170 -16 283 -5t170 33zM895 1360q-47 -63 -265 -435l-317 187l-19 12l225 356q20 31 60 45t80 10q24 -2 48.5 -12t42 -21t41.5 -33t36 -34.5 t36 -39.5t32 -35zM1550 1053l212 -363q18 -37 12.5 -76t-27.5 -74q-13 -20 -33 -37t-38 -28t-48.5 -22t-47 -16t-51.5 -14t-46 -12q-34 72 -265 436l313 195zM1407 1279l142 83l-220 -373l-419 20l151 86q-34 89 -75 166t-75.5 123.5t-64.5 80t-47 46.5l-17 13l405 -1 q31 3 58 -10.5t39 -28.5l11 -15q39 -61 112 -190z" />
+<glyph unicode="" horiz-adv-x="2048" d="M480 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM516 768h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5zM1888 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM2048 544v-384 q0 -14 -9 -23t-23 -9h-96v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-1024v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5t179 63.5h768q98 0 179 -63.5t104 -157.5 l105 -419h28q93 0 158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="" horiz-adv-x="2048" d="M1824 640q93 0 158.5 -65.5t65.5 -158.5v-384q0 -14 -9 -23t-23 -9h-96v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-1024v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5 t179 63.5h128v224q0 14 9 23t23 9h448q14 0 23 -9t9 -23v-224h128q98 0 179 -63.5t104 -157.5l105 -419h28zM320 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47zM516 640h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5z M1728 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47z" />
+<glyph unicode="" d="M1504 64q0 -26 -19 -45t-45 -19h-462q1 -17 6 -87.5t5 -108.5q0 -25 -18 -42.5t-43 -17.5h-320q-25 0 -43 17.5t-18 42.5q0 38 5 108.5t6 87.5h-462q-26 0 -45 19t-19 45t19 45l402 403h-229q-26 0 -45 19t-19 45t19 45l402 403h-197q-26 0 -45 19t-19 45t19 45l384 384 q19 19 45 19t45 -19l384 -384q19 -19 19 -45t-19 -45t-45 -19h-197l402 -403q19 -19 19 -45t-19 -45t-45 -19h-229l402 -403q19 -19 19 -45z" />
+<glyph unicode="" d="M1127 326q0 32 -30 51q-193 115 -447 115q-133 0 -287 -34q-42 -9 -42 -52q0 -20 13.5 -34.5t35.5 -14.5q5 0 37 8q132 27 243 27q226 0 397 -103q19 -11 33 -11q19 0 33 13.5t14 34.5zM1223 541q0 40 -35 61q-237 141 -548 141q-153 0 -303 -42q-48 -13 -48 -64 q0 -25 17.5 -42.5t42.5 -17.5q7 0 37 8q122 33 251 33q279 0 488 -124q24 -13 38 -13q25 0 42.5 17.5t17.5 42.5zM1331 789q0 47 -40 70q-126 73 -293 110.5t-343 37.5q-204 0 -364 -47q-23 -7 -38.5 -25.5t-15.5 -48.5q0 -31 20.5 -52t51.5 -21q11 0 40 8q133 37 307 37 q159 0 309.5 -34t253.5 -95q21 -12 40 -12q29 0 50.5 20.5t21.5 51.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M1397 1408q58 0 98.5 -40.5t40.5 -98.5v-1258q0 -58 -40.5 -98.5t-98.5 -40.5h-1258q-58 0 -98.5 40.5t-40.5 98.5v1258q0 58 40.5 98.5t98.5 40.5h1258zM1465 11v1258q0 28 -20 48t-48 20h-1258q-28 0 -48 -20t-20 -48v-1258q0 -28 20 -48t48 -20h1258q28 0 48 20t20 48 zM694 749l188 -387l533 145v-496q0 -7 -5.5 -12.5t-12.5 -5.5h-1258q-7 0 -12.5 5.5t-5.5 12.5v141l711 195l-212 439q4 1 12 2.5t12 1.5q170 32 303.5 21.5t221 -46t143.5 -94.5q27 -28 -25 -42q-64 -16 -256 -62l-97 198q-111 7 -240 -16zM1397 1287q7 0 12.5 -5.5 t5.5 -12.5v-428q-85 30 -188 52q-294 64 -645 12l-18 -3l-65 134h-233l85 -190q-132 -51 -230 -137v560q0 7 5.5 12.5t12.5 5.5h1258zM286 387q-14 -3 -26 4.5t-14 21.5q-24 203 166 305l129 -270z" />
+<glyph unicode="" horiz-adv-x="2304" d="M784 164l16 241l-16 523q-1 10 -7.5 17t-16.5 7q-9 0 -16 -7t-7 -17l-14 -523l14 -241q1 -10 7.5 -16.5t15.5 -6.5q22 0 24 23zM1080 193l11 211l-12 586q0 16 -13 24q-8 5 -16 5t-16 -5q-13 -8 -13 -24l-1 -6l-10 -579q0 -1 11 -236v-1q0 -10 6 -17q9 -11 23 -11 q11 0 20 9q9 7 9 20zM35 533l20 -128l-20 -126q-2 -9 -9 -9t-9 9l-17 126l17 128q2 9 9 9t9 -9zM121 612l26 -207l-26 -203q-2 -9 -10 -9q-9 0 -9 10l-23 202l23 207q0 9 9 9q8 0 10 -9zM401 159zM213 650l25 -245l-25 -237q0 -11 -11 -11q-10 0 -12 11l-21 237l21 245 q2 12 12 12q11 0 11 -12zM307 657l23 -252l-23 -244q-2 -13 -14 -13q-13 0 -13 13l-21 244l21 252q0 13 13 13q12 0 14 -13zM401 639l21 -234l-21 -246q-2 -16 -16 -16q-6 0 -10.5 4.5t-4.5 11.5l-20 246l20 234q0 6 4.5 10.5t10.5 4.5q14 0 16 -15zM784 164zM495 785 l21 -380l-21 -246q0 -7 -5 -12.5t-12 -5.5q-16 0 -18 18l-18 246l18 380q2 18 18 18q7 0 12 -5.5t5 -12.5zM589 871l19 -468l-19 -244q0 -8 -5.5 -13.5t-13.5 -5.5q-18 0 -20 19l-16 244l16 468q2 19 20 19q8 0 13.5 -5.5t5.5 -13.5zM687 911l18 -506l-18 -242 q-2 -21 -22 -21q-19 0 -21 21l-16 242l16 506q0 9 6.5 15.5t14.5 6.5q9 0 15 -6.5t7 -15.5zM1079 169v0v0zM881 915l15 -510l-15 -239q0 -10 -7.5 -17.5t-17.5 -7.5t-17 7t-8 18l-14 239l14 510q0 11 7.5 18t17.5 7t17.5 -7t7.5 -18zM980 896l14 -492l-14 -236q0 -11 -8 -19 t-19 -8t-19 8t-9 19l-12 236l12 492q1 12 9 20t19 8t18.5 -8t8.5 -20zM1192 404l-14 -231v0q0 -13 -9 -22t-22 -9t-22 9t-10 22l-6 114l-6 117l12 636v3q2 15 12 24q9 7 20 7q8 0 15 -5q14 -8 16 -26zM2304 423q0 -117 -83 -199.5t-200 -82.5h-786q-13 2 -22 11t-9 22v899 q0 23 28 33q85 34 181 34q195 0 338 -131.5t160 -323.5q53 22 110 22q117 0 200 -83t83 -201z" />
+<glyph unicode="" d="M768 768q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 0q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127 t443 -43zM768 384q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 1536q208 0 385 -34.5t280 -93.5t103 -128v-128q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5 t-103 128v128q0 69 103 128t280 93.5t385 34.5z" />
+<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M894 465q33 -26 84 -56q59 7 117 7q147 0 177 -49q16 -22 2 -52q0 -1 -1 -2l-2 -2v-1q-6 -38 -71 -38q-48 0 -115 20t-130 53q-221 -24 -392 -83q-153 -262 -242 -262q-15 0 -28 7l-24 12q-1 1 -6 5q-10 10 -6 36q9 40 56 91.5t132 96.5q14 9 23 -6q2 -2 2 -4q52 85 107 197 q68 136 104 262q-24 82 -30.5 159.5t6.5 127.5q11 40 42 40h21h1q23 0 35 -15q18 -21 9 -68q-2 -6 -4 -8q1 -3 1 -8v-30q-2 -123 -14 -192q55 -164 146 -238zM318 54q52 24 137 158q-51 -40 -87.5 -84t-49.5 -74zM716 974q-15 -42 -2 -132q1 7 7 44q0 3 7 43q1 4 4 8 q-1 1 -1 2t-0.5 1.5t-0.5 1.5q-1 22 -13 36q0 -1 -1 -2v-2zM592 313q135 54 284 81q-2 1 -13 9.5t-16 13.5q-76 67 -127 176q-27 -86 -83 -197q-30 -56 -45 -83zM1238 329q-24 24 -140 24q76 -28 124 -28q14 0 18 1q0 1 -2 3z" />
+<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M233 768v-107h70l164 -661h159l128 485q7 20 10 46q2 16 2 24h4l3 -24q1 -3 3.5 -20t5.5 -26l128 -485h159l164 661h70v107h-300v-107h90l-99 -438q-5 -20 -7 -46l-2 -21h-4l-3 21q-1 5 -4 21t-5 25l-144 545h-114l-144 -545q-2 -9 -4.5 -24.5t-3.5 -21.5l-4 -21h-4l-2 21 q-2 26 -7 46l-99 438h90v107h-300z" />
+<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M429 106v-106h281v106h-75l103 161q5 7 10 16.5t7.5 13.5t3.5 4h2q1 -4 5 -10q2 -4 4.5 -7.5t6 -8t6.5 -8.5l107 -161h-76v-106h291v106h-68l-192 273l195 282h67v107h-279v-107h74l-103 -159q-4 -7 -10 -16.5t-9 -13.5l-2 -3h-2q-1 4 -5 10q-6 11 -17 23l-106 159h76v107 h-290v-107h68l189 -272l-194 -283h-68z" />
+<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M416 106v-106h327v106h-93v167h137q76 0 118 15q67 23 106.5 87t39.5 146q0 81 -37 141t-100 87q-48 19 -130 19h-368v-107h92v-555h-92zM769 386h-119v268h120q52 0 83 -18q56 -33 56 -115q0 -89 -62 -120q-31 -15 -78 -15z" />
+<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M1280 320v-320h-1024v192l192 192l128 -128l384 384zM448 512q-80 0 -136 56t-56 136t56 136t136 56t136 -56t56 -136t-56 -136t-136 -56z" />
+<glyph unicode="" d="M640 1152v128h-128v-128h128zM768 1024v128h-128v-128h128zM640 896v128h-128v-128h128zM768 768v128h-128v-128h128zM1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400 v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-128v-128h-128v128h-512v-1536h1280zM781 593l107 -349q8 -27 8 -52q0 -83 -72.5 -137.5t-183.5 -54.5t-183.5 54.5t-72.5 137.5q0 25 8 52q21 63 120 396v128h128v-128h79 q22 0 39 -13t23 -34zM640 128q53 0 90.5 19t37.5 45t-37.5 45t-90.5 19t-90.5 -19t-37.5 -45t37.5 -45t90.5 -19z" />
+<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M620 686q20 -8 20 -30v-544q0 -22 -20 -30q-8 -2 -12 -2q-12 0 -23 9l-166 167h-131q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h131l166 167q16 15 35 7zM1037 -3q31 0 50 24q129 159 129 363t-129 363q-16 21 -43 24t-47 -14q-21 -17 -23.5 -43.5t14.5 -47.5 q100 -123 100 -282t-100 -282q-17 -21 -14.5 -47.5t23.5 -42.5q18 -15 40 -15zM826 145q27 0 47 20q87 93 87 219t-87 219q-18 19 -45 20t-46 -17t-20 -44.5t18 -46.5q52 -57 52 -131t-52 -131q-19 -20 -18 -46.5t20 -44.5q20 -17 44 -17z" />
+<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M768 768q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-384q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h384zM1260 766q20 -8 20 -30v-576q0 -22 -20 -30q-8 -2 -12 -2q-14 0 -23 9l-265 266v90l265 266q9 9 23 9q4 0 12 -2z" />
+<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M480 768q8 11 21 12.5t24 -6.5l51 -38q11 -8 12.5 -21t-6.5 -24l-182 -243l182 -243q8 -11 6.5 -24t-12.5 -21l-51 -38q-11 -8 -24 -6.5t-21 12.5l-226 301q-14 19 0 38zM1282 467q14 -19 0 -38l-226 -301q-8 -11 -21 -12.5t-24 6.5l-51 38q-11 8 -12.5 21t6.5 24l182 243 l-182 243q-8 11 -6.5 24t12.5 21l51 38q11 8 24 6.5t21 -12.5zM662 6q-13 2 -20.5 13t-5.5 24l138 831q2 13 13 20.5t24 5.5l63 -10q13 -2 20.5 -13t5.5 -24l-138 -831q-2 -13 -13 -20.5t-24 -5.5z" />
+<glyph unicode="" d="M1497 709v-198q-101 -23 -198 -23q-65 -136 -165.5 -271t-181.5 -215.5t-128 -106.5q-80 -45 -162 3q-28 17 -60.5 43.5t-85 83.5t-102.5 128.5t-107.5 184t-105.5 244t-91.5 314.5t-70.5 390h283q26 -218 70 -398.5t104.5 -317t121.5 -235.5t140 -195q169 169 287 406 q-142 72 -223 220t-81 333q0 192 104 314.5t284 122.5q178 0 273 -105.5t95 -297.5q0 -159 -58 -286q-7 -1 -19.5 -3t-46 -2t-63 6t-62 25.5t-50.5 51.5q31 103 31 184q0 87 -29 132t-79 45q-53 0 -85 -49.5t-32 -140.5q0 -186 105 -293.5t267 -107.5q62 0 121 14z" />
+<glyph unicode="" horiz-adv-x="1792" d="M216 367l603 -402v359l-334 223zM154 511l193 129l-193 129v-258zM973 -35l603 402l-269 180l-334 -223v-359zM896 458l272 182l-272 182l-272 -182zM485 733l334 223v359l-603 -402zM1445 640l193 -129v258zM1307 733l269 180l-603 402v-359zM1792 913v-546 q0 -41 -34 -64l-819 -546q-21 -13 -43 -13t-43 13l-819 546q-34 23 -34 64v546q0 41 34 64l819 546q21 13 43 13t43 -13l819 -546q34 -23 34 -64z" />
+<glyph unicode="" horiz-adv-x="2048" d="M1800 764q111 -46 179.5 -145.5t68.5 -221.5q0 -164 -118 -280.5t-285 -116.5q-4 0 -11.5 0.5t-10.5 0.5h-1209h-1h-2h-5q-170 10 -288 125.5t-118 280.5q0 110 55 203t147 147q-12 39 -12 82q0 115 82 196t199 81q95 0 172 -58q75 154 222.5 248t326.5 94 q166 0 306 -80.5t221.5 -218.5t81.5 -301q0 -6 -0.5 -18t-0.5 -18zM468 498q0 -122 84 -193t208 -71q137 0 240 99q-16 20 -47.5 56.5t-43.5 50.5q-67 -65 -144 -65q-55 0 -93.5 33.5t-38.5 87.5q0 53 38.5 87t91.5 34q44 0 84.5 -21t73 -55t65 -75t69 -82t77 -75t97 -55 t121.5 -21q121 0 204.5 71.5t83.5 190.5q0 121 -84 192t-207 71q-143 0 -241 -97q14 -16 29.5 -34t34.5 -40t29 -34q66 64 142 64q52 0 92 -33t40 -84q0 -57 -37 -91.5t-94 -34.5q-43 0 -82.5 21t-72 55t-65.5 75t-69.5 82t-77.5 75t-96.5 55t-118.5 21q-122 0 -207 -70.5 t-85 -189.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 1408q-190 0 -361 -90l194 -194q82 28 167 28t167 -28l194 194q-171 90 -361 90zM218 279l194 194 q-28 82 -28 167t28 167l-194 194q-90 -171 -90 -361t90 -361zM896 -128q190 0 361 90l-194 194q-82 -28 -167 -28t-167 28l-194 -194q171 -90 361 -90zM896 256q159 0 271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5 t271.5 -112.5zM1380 473l194 -194q90 171 90 361t-90 361l-194 -194q28 -82 28 -167t-28 -167z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348q0 222 101 414.5t276.5 317t390.5 155.5v-260q-221 -45 -366.5 -221t-145.5 -406q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5 q0 230 -145.5 406t-366.5 221v260q215 -31 390.5 -155.5t276.5 -317t101 -414.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M19 662q8 217 116 406t305 318h5q0 -1 -1 -3q-8 -8 -28 -33.5t-52 -76.5t-60 -110.5t-44.5 -135.5t-14 -150.5t39 -157.5t108.5 -154q50 -50 102 -69.5t90.5 -11.5t69.5 23.5t47 32.5l16 16q39 51 53 116.5t6.5 122.5t-21 107t-26.5 80l-14 29q-10 25 -30.5 49.5t-43 41 t-43.5 29.5t-35 19l-13 6l104 115q39 -17 78 -52t59 -61l19 -27q1 48 -18.5 103.5t-40.5 87.5l-20 31l161 183l160 -181q-33 -46 -52.5 -102.5t-22.5 -90.5l-4 -33q22 37 61.5 72.5t67.5 52.5l28 17l103 -115q-44 -14 -85 -50t-60 -65l-19 -29q-31 -56 -48 -133.5t-7 -170 t57 -156.5q33 -45 77.5 -60.5t85 -5.5t76 26.5t57.5 33.5l21 16q60 53 96.5 115t48.5 121.5t10 121.5t-18 118t-37 107.5t-45.5 93t-45 72t-34.5 47.5l-13 17q-14 13 -7 13l10 -3q40 -29 62.5 -46t62 -50t64 -58t58.5 -65t55.5 -77t45.5 -88t38 -103t23.5 -117t10.5 -136 q3 -259 -108 -465t-312 -321t-456 -115q-185 0 -351 74t-283.5 198t-184 293t-60.5 353z" />
+<glyph unicode="" horiz-adv-x="1792" d="M874 -102v-66q-208 6 -385 109.5t-283 275.5l58 34q29 -49 73 -99l65 57q148 -168 368 -212l-17 -86q65 -12 121 -13zM276 428l-83 -28q22 -60 49 -112l-57 -33q-98 180 -98 385t98 385l57 -33q-30 -56 -49 -112l82 -28q-35 -100 -35 -212q0 -109 36 -212zM1528 251 l58 -34q-106 -172 -283 -275.5t-385 -109.5v66q56 1 121 13l-17 86q220 44 368 212l65 -57q44 50 73 99zM1377 805l-233 -80q14 -42 14 -85t-14 -85l232 -80q-31 -92 -98 -169l-185 162q-57 -67 -147 -85l48 -241q-52 -10 -98 -10t-98 10l48 241q-90 18 -147 85l-185 -162 q-67 77 -98 169l232 80q-14 42 -14 85t14 85l-233 80q33 93 99 169l185 -162q59 68 147 86l-48 240q44 10 98 10t98 -10l-48 -240q88 -18 147 -86l185 162q66 -76 99 -169zM874 1448v-66q-65 -2 -121 -13l17 -86q-220 -42 -368 -211l-65 56q-38 -42 -73 -98l-57 33 q106 172 282 275.5t385 109.5zM1705 640q0 -205 -98 -385l-57 33q27 52 49 112l-83 28q36 103 36 212q0 112 -35 212l82 28q-19 56 -49 112l57 33q98 -180 98 -385zM1585 1063l-57 -33q-35 56 -73 98l-65 -56q-148 169 -368 211l17 86q-56 11 -121 13v66q209 -6 385 -109.5 t282 -275.5zM1748 640q0 173 -67.5 331t-181.5 272t-272 181.5t-331 67.5t-331 -67.5t-272 -181.5t-181.5 -272t-67.5 -331t67.5 -331t181.5 -272t272 -181.5t331 -67.5t331 67.5t272 181.5t181.5 272t67.5 331zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71 t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
+<glyph unicode="" d="M582 228q0 -66 -93 -66q-107 0 -107 63q0 64 98 64q102 0 102 -61zM546 694q0 -85 -74 -85q-77 0 -77 84q0 90 77 90q36 0 55 -25.5t19 -63.5zM712 769v125q-78 -29 -135 -29q-50 29 -110 29q-86 0 -145 -57t-59 -143q0 -50 29.5 -102t73.5 -67v-3q-38 -17 -38 -85 q0 -53 41 -77v-3q-113 -37 -113 -139q0 -45 20 -78.5t54 -51t72 -25.5t81 -8q224 0 224 188q0 67 -48 99t-126 46q-27 5 -51.5 20.5t-24.5 39.5q0 44 49 52q77 15 122 70t45 134q0 24 -10 52q37 9 49 13zM771 350h137q-2 27 -2 82v387q0 46 2 69h-137q3 -23 3 -71v-392 q0 -50 -3 -75zM1280 366v121q-30 -21 -68 -21q-53 0 -53 82v225h52q9 0 26.5 -1t26.5 -1v117h-105q0 82 3 102h-140q4 -24 4 -55v-47h-60v-117q36 3 37 3q3 0 11 -0.5t12 -0.5v-2h-2v-217q0 -37 2.5 -64t11.5 -56.5t24.5 -48.5t43.5 -31t66 -12q64 0 108 24zM924 1072 q0 36 -24 63.5t-60 27.5t-60.5 -27t-24.5 -64q0 -36 25 -62.5t60 -26.5t59.5 27t24.5 62zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M595 22q0 100 -165 100q-158 0 -158 -104q0 -101 172 -101q151 0 151 105zM536 777q0 61 -30 102t-89 41q-124 0 -124 -145q0 -135 124 -135q119 0 119 137zM805 1101v-202q-36 -12 -79 -22q16 -43 16 -84q0 -127 -73 -216.5t-197 -112.5q-40 -8 -59.5 -27t-19.5 -58 q0 -31 22.5 -51.5t58 -32t78.5 -22t86 -25.5t78.5 -37.5t58 -64t22.5 -98.5q0 -304 -363 -304q-69 0 -130 12.5t-116 41t-87.5 82t-32.5 127.5q0 165 182 225v4q-67 41 -67 126q0 109 63 137v4q-72 24 -119.5 108.5t-47.5 165.5q0 139 95 231.5t235 92.5q96 0 178 -47 q98 0 218 47zM1123 220h-222q4 45 4 134v609q0 94 -4 128h222q-4 -33 -4 -124v-613q0 -89 4 -134zM1724 442v-196q-71 -39 -174 -39q-62 0 -107 20t-70 50t-39.5 78t-18.5 92t-4 103v351h2v4q-7 0 -19 1t-18 1q-21 0 -59 -6v190h96v76q0 54 -6 89h227q-6 -41 -6 -165h171 v-190q-15 0 -43.5 2t-42.5 2h-85v-365q0 -131 87 -131q61 0 109 33zM1148 1389q0 -58 -39 -101.5t-96 -43.5q-58 0 -98 43.5t-40 101.5q0 59 39.5 103t98.5 44q58 0 96.5 -44.5t38.5 -102.5z" />
+<glyph unicode="" d="M825 547l343 588h-150q-21 -39 -63.5 -118.5t-68 -128.5t-59.5 -118.5t-60 -128.5h-3q-21 48 -44.5 97t-52 105.5t-46.5 92t-54 104.5t-49 95h-150l323 -589v-435h134v436zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1280" d="M842 964q0 -80 -57 -136.5t-136 -56.5q-60 0 -111 35q-62 -67 -115 -146q-247 -371 -202 -859q1 -22 -12.5 -38.5t-34.5 -18.5h-5q-20 0 -35 13.5t-17 33.5q-14 126 -3.5 247.5t29.5 217t54 186t69 155.5t74 125q61 90 132 165q-16 35 -16 77q0 80 56.5 136.5t136.5 56.5 t136.5 -56.5t56.5 -136.5zM1223 953q0 -158 -78 -292t-212.5 -212t-292.5 -78q-64 0 -131 14q-21 5 -32.5 23.5t-6.5 39.5q5 20 23 31.5t39 7.5q51 -13 108 -13q97 0 186 38t153 102t102 153t38 186t-38 186t-102 153t-153 102t-186 38t-186 -38t-153 -102t-102 -153 t-38 -186q0 -114 52 -218q10 -20 3.5 -40t-25.5 -30t-39.5 -3t-30.5 26q-64 123 -64 265q0 119 46.5 227t124.5 186t186 124t226 46q158 0 292.5 -78t212.5 -212.5t78 -292.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M270 730q-8 19 -8 52q0 20 11 49t24 45q-1 22 7.5 53t22.5 43q0 139 92.5 288.5t217.5 209.5q139 66 324 66q133 0 266 -55q49 -21 90 -48t71 -56t55 -68t42 -74t32.5 -84.5t25.5 -89.5t22 -98l1 -5q55 -83 55 -150q0 -14 -9 -40t-9 -38q0 -1 1.5 -3.5t3.5 -5t2 -3.5 q77 -114 120.5 -214.5t43.5 -208.5q0 -43 -19.5 -100t-55.5 -57q-9 0 -19.5 7.5t-19 17.5t-19 26t-16 26.5t-13.5 26t-9 17.5q-1 1 -3 1l-5 -4q-59 -154 -132 -223q20 -20 61.5 -38.5t69 -41.5t35.5 -65q-2 -4 -4 -16t-7 -18q-64 -97 -302 -97q-53 0 -110.5 9t-98 20 t-104.5 30q-15 5 -23 7q-14 4 -46 4.5t-40 1.5q-41 -45 -127.5 -65t-168.5 -20q-35 0 -69 1.5t-93 9t-101 20.5t-74.5 40t-32.5 64q0 40 10 59.5t41 48.5q11 2 40.5 13t49.5 12q4 0 14 2q2 2 2 4l-2 3q-48 11 -108 105.5t-73 156.5l-5 3q-4 0 -12 -20q-18 -41 -54.5 -74.5 t-77.5 -37.5h-1q-4 0 -6 4.5t-5 5.5q-23 54 -23 100q0 275 252 466z" />
+<glyph unicode="" horiz-adv-x="2048" d="M580 1075q0 41 -25 66t-66 25q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 66 24.5t25 65.5zM1323 568q0 28 -25.5 50t-65.5 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q40 0 65.5 22t25.5 51zM1087 1075q0 41 -24.5 66t-65.5 25 q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 65.5 24.5t24.5 65.5zM1722 568q0 28 -26 50t-65 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q39 0 65 22t26 51zM1456 965q-31 4 -70 4q-169 0 -311 -77t-223.5 -208.5t-81.5 -287.5 q0 -78 23 -152q-35 -3 -68 -3q-26 0 -50 1.5t-55 6.5t-44.5 7t-54.5 10.5t-50 10.5l-253 -127l72 218q-290 203 -290 490q0 169 97.5 311t264 223.5t363.5 81.5q176 0 332.5 -66t262 -182.5t136.5 -260.5zM2048 404q0 -117 -68.5 -223.5t-185.5 -193.5l55 -181l-199 109 q-150 -37 -218 -37q-169 0 -311 70.5t-223.5 191.5t-81.5 264t81.5 264t223.5 191.5t311 70.5q161 0 303 -70.5t227.5 -192t85.5 -263.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-453 185l-242 -295q-18 -23 -49 -23q-13 0 -22 4q-19 7 -30.5 23.5t-11.5 36.5v349l864 1059l-1069 -925l-395 162q-37 14 -40 55q-2 40 32 59l1664 960q15 9 32 9q20 0 36 -11z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-527 215l-298 -327q-18 -21 -47 -21q-14 0 -23 4q-19 7 -30 23.5t-11 36.5v452l-472 193q-37 14 -40 55q-3 39 32 59l1664 960q35 21 68 -2zM1422 26l221 1323l-1434 -827l336 -137 l863 639l-478 -797z" />
+<glyph unicode="" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298zM896 928v-448q0 -14 -9 -23 t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23z" />
+<glyph unicode="" d="M768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1682 -128q-44 0 -132.5 3.5t-133.5 3.5q-44 0 -132 -3.5t-132 -3.5q-24 0 -37 20.5t-13 45.5q0 31 17 46t39 17t51 7t45 15q33 21 33 140l-1 391q0 21 -1 31q-13 4 -50 4h-675q-38 0 -51 -4q-1 -10 -1 -31l-1 -371q0 -142 37 -164q16 -10 48 -13t57 -3.5t45 -15 t20 -45.5q0 -26 -12.5 -48t-36.5 -22q-47 0 -139.5 3.5t-138.5 3.5q-43 0 -128 -3.5t-127 -3.5q-23 0 -35.5 21t-12.5 45q0 30 15.5 45t36 17.5t47.5 7.5t42 15q33 23 33 143l-1 57v813q0 3 0.5 26t0 36.5t-1.5 38.5t-3.5 42t-6.5 36.5t-11 31.5t-16 18q-15 10 -45 12t-53 2 t-41 14t-18 45q0 26 12 48t36 22q46 0 138.5 -3.5t138.5 -3.5q42 0 126.5 3.5t126.5 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17 -43.5t-38.5 -14.5t-49.5 -4t-43 -13q-35 -21 -35 -160l1 -320q0 -21 1 -32q13 -3 39 -3h699q25 0 38 3q1 11 1 32l1 320q0 139 -35 160 q-18 11 -58.5 12.5t-66 13t-25.5 49.5q0 26 12.5 48t37.5 22q44 0 132 -3.5t132 -3.5q43 0 129 3.5t129 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17.5 -44t-40 -14.5t-51.5 -3t-44 -12.5q-35 -23 -35 -161l1 -943q0 -119 34 -140q16 -10 46 -13.5t53.5 -4.5t41.5 -15.5t18 -44.5 q0 -26 -12 -48t-36 -22z" />
+<glyph unicode="" horiz-adv-x="1280" d="M1278 1347v-73q0 -29 -18.5 -61t-42.5 -32q-50 0 -54 -1q-26 -6 -32 -31q-3 -11 -3 -64v-1152q0 -25 -18 -43t-43 -18h-108q-25 0 -43 18t-18 43v1218h-143v-1218q0 -25 -17.5 -43t-43.5 -18h-108q-26 0 -43.5 18t-17.5 43v496q-147 12 -245 59q-126 58 -192 179 q-64 117 -64 259q0 166 88 286q88 118 209 159q111 37 417 37h479q25 0 43 -18t18 -43z" />
+<glyph unicode="" d="M352 128v-128h-352v128h352zM704 256q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM864 640v-128h-864v128h864zM224 1152v-128h-224v128h224zM1536 128v-128h-736v128h736zM576 1280q26 0 45 -19t19 -45v-256 q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1216 768q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1536 640v-128h-224v128h224zM1536 1152v-128h-864v128h864z" />
+<glyph unicode="" d="M1216 512q133 0 226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5t-226.5 93.5t-93.5 226.5q0 12 2 34l-360 180q-92 -86 -218 -86q-133 0 -226.5 93.5t-93.5 226.5t93.5 226.5t226.5 93.5q126 0 218 -86l360 180q-2 22 -2 34q0 133 93.5 226.5t226.5 93.5 t226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5q-126 0 -218 86l-360 -180q2 -22 2 -34t-2 -34l360 -180q92 86 218 86z" />
+<glyph unicode="" d="M1280 341q0 88 -62.5 151t-150.5 63q-84 0 -145 -58l-241 120q2 16 2 23t-2 23l241 120q61 -58 145 -58q88 0 150.5 63t62.5 151t-62.5 150.5t-150.5 62.5t-151 -62.5t-63 -150.5q0 -7 2 -23l-241 -120q-62 57 -145 57q-88 0 -150.5 -62.5t-62.5 -150.5t62.5 -150.5 t150.5 -62.5q83 0 145 57l241 -120q-2 -16 -2 -23q0 -88 63 -150.5t151 -62.5t150.5 62.5t62.5 150.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M571 947q-10 25 -34 35t-49 0q-108 -44 -191 -127t-127 -191q-10 -25 0 -49t35 -34q13 -5 24 -5q42 0 60 40q34 84 98.5 148.5t148.5 98.5q25 11 35 35t0 49zM1513 1303l46 -46l-244 -243l68 -68q19 -19 19 -45.5t-19 -45.5l-64 -64q89 -161 89 -343q0 -143 -55.5 -273.5 t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5q182 0 343 -89l64 64q19 19 45.5 19t45.5 -19l68 -68zM1521 1359q-10 -10 -22 -10q-13 0 -23 10l-91 90q-9 10 -9 23t9 23q10 9 23 9t23 -9l90 -91 q10 -9 10 -22.5t-10 -22.5zM1751 1129q-11 -9 -23 -9t-23 9l-90 91q-10 9 -10 22.5t10 22.5q9 10 22.5 10t22.5 -10l91 -90q9 -10 9 -23t-9 -23zM1792 1312q0 -14 -9 -23t-23 -9h-96q-14 0 -23 9t-9 23t9 23t23 9h96q14 0 23 -9t9 -23zM1600 1504v-96q0 -14 -9 -23t-23 -9 t-23 9t-9 23v96q0 14 9 23t23 9t23 -9t9 -23zM1751 1449l-91 -90q-10 -10 -22 -10q-13 0 -23 10q-10 9 -10 22.5t10 22.5l90 91q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
+<glyph unicode="" horiz-adv-x="1792" d="M609 720l287 208l287 -208l-109 -336h-355zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM1515 186q149 203 149 454v3l-102 -89l-240 224l63 323 l134 -12q-150 206 -389 282l53 -124l-287 -159l-287 159l53 124q-239 -76 -389 -282l135 12l62 -323l-240 -224l-102 89v-3q0 -251 149 -454l30 132l326 -40l139 -298l-116 -69q117 -39 240 -39t240 39l-116 69l139 298l326 40z" />
+<glyph unicode="" horiz-adv-x="1792" d="M448 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM256 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM832 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM66 768q-28 0 -47 19t-19 46v129h514v-129q0 -27 -19 -46t-46 -19h-383zM1216 224v-192q0 -14 -9 -23t-23 -9h-192 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1600 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23 zM1408 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1016v-13h-514v10q0 104 -382 102q-382 -1 -382 -102v-10h-514v13q0 17 8.5 43t34 64t65.5 75.5t110.5 76t160 67.5t224 47.5t293.5 18.5t293 -18.5t224 -47.5 t160.5 -67.5t110.5 -76t65.5 -75.5t34 -64t8.5 -43zM1792 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 962v-129q0 -27 -19 -46t-46 -19h-384q-27 0 -46 19t-19 46v129h514z" />
+<glyph unicode="" horiz-adv-x="1792" d="M704 1216v-768q0 -26 -19 -45t-45 -19v-576q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v512l249 873q7 23 31 23h424zM1024 1216v-704h-256v704h256zM1792 320v-512q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v576q-26 0 -45 19t-19 45v768h424q24 0 31 -23z M736 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23zM1408 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1755 1083q37 -37 37 -90t-37 -91l-401 -400l150 -150l-160 -160q-163 -163 -389.5 -186.5t-411.5 100.5l-362 -362h-181v181l362 362q-124 185 -100.5 411.5t186.5 389.5l160 160l150 -150l400 401q38 37 91 37t90 -37t37 -90.5t-37 -90.5l-400 -401l234 -234l401 400 q38 37 91 37t90 -37z" />
+<glyph unicode="" horiz-adv-x="1792" d="M873 796q0 -83 -63.5 -142.5t-152.5 -59.5t-152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59t152.5 -59t63.5 -143zM1375 796q0 -83 -63 -142.5t-153 -59.5q-89 0 -152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59q90 0 153 -59t63 -143zM1600 616v667q0 87 -32 123.5 t-111 36.5h-1112q-83 0 -112.5 -34t-29.5 -126v-673q43 -23 88.5 -40t81 -28t81 -18.5t71 -11t70 -4t58.5 -0.5t56.5 2t44.5 2q68 1 95 -27q6 -6 10 -9q26 -25 61 -51q7 91 118 87q5 0 36.5 -1.5t43 -2t45.5 -1t53 1t54.5 4.5t61 8.5t62 13.5t67 19.5t67.5 27t72 34.5z M1763 621q-121 -149 -372 -252q84 -285 -23 -465q-66 -113 -183 -148q-104 -32 -182 15q-86 51 -82 164l-1 326v1q-8 2 -24.5 6t-23.5 5l-1 -338q4 -114 -83 -164q-79 -47 -183 -15q-117 36 -182 150q-105 180 -22 463q-251 103 -372 252q-25 37 -4 63t60 -1q3 -2 11 -7 t11 -8v694q0 72 47 123t114 51h1257q67 0 114 -51t47 -123v-694l21 15q39 27 60 1t-4 -63z" />
+<glyph unicode="" horiz-adv-x="1792" d="M896 1102v-434h-145v434h145zM1294 1102v-434h-145v434h145zM1294 342l253 254v795h-1194v-1049h326v-217l217 217h398zM1692 1536v-1013l-434 -434h-326l-217 -217h-217v217h-398v1158l109 289h1483z" />
+<glyph unicode="" d="M773 217v-127q-1 -292 -6 -305q-12 -32 -51 -40q-54 -9 -181.5 38t-162.5 89q-13 15 -17 36q-1 12 4 26q4 10 34 47t181 216q1 0 60 70q15 19 39.5 24.5t49.5 -3.5q24 -10 37.5 -29t12.5 -42zM624 468q-3 -55 -52 -70l-120 -39q-275 -88 -292 -88q-35 2 -54 36 q-12 25 -17 75q-8 76 1 166.5t30 124.5t56 32q13 0 202 -77q70 -29 115 -47l84 -34q23 -9 35.5 -30.5t11.5 -48.5zM1450 171q-7 -54 -91.5 -161t-135.5 -127q-37 -14 -63 7q-14 10 -184 287l-47 77q-14 21 -11.5 46t19.5 46q35 43 83 26q1 -1 119 -40q203 -66 242 -79.5 t47 -20.5q28 -22 22 -61zM778 803q5 -102 -54 -122q-58 -17 -114 71l-378 598q-8 35 19 62q41 43 207.5 89.5t224.5 31.5q40 -10 49 -45q3 -18 22 -305.5t24 -379.5zM1440 695q3 -39 -26 -59q-15 -10 -329 -86q-67 -15 -91 -23l1 2q-23 -6 -46 4t-37 32q-30 47 0 87 q1 1 75 102q125 171 150 204t34 39q28 19 65 2q48 -23 123 -133.5t81 -167.5v-3z" />
+<glyph unicode="" horiz-adv-x="2048" d="M1024 1024h-384v-384h384v384zM1152 384v-128h-640v128h640zM1152 1152v-640h-640v640h640zM1792 384v-128h-512v128h512zM1792 640v-128h-512v128h512zM1792 896v-128h-512v128h512zM1792 1152v-128h-512v128h512zM256 192v960h-128v-960q0 -26 19 -45t45 -19t45 19 t19 45zM1920 192v1088h-1536v-1088q0 -33 -11 -64h1483q26 0 45 19t19 45zM2048 1408v-1216q0 -80 -56 -136t-136 -56h-1664q-80 0 -136 56t-56 136v1088h256v128h1792z" />
+<glyph unicode="" horiz-adv-x="2048" d="M1024 13q-20 0 -93 73.5t-73 93.5q0 32 62.5 54t103.5 22t103.5 -22t62.5 -54q0 -20 -73 -93.5t-93 -73.5zM1294 284q-2 0 -40 25t-101.5 50t-128.5 25t-128.5 -25t-101 -50t-40.5 -25q-18 0 -93.5 75t-75.5 93q0 13 10 23q78 77 196 121t233 44t233 -44t196 -121 q10 -10 10 -23q0 -18 -75.5 -93t-93.5 -75zM1567 556q-11 0 -23 8q-136 105 -252 154.5t-268 49.5q-85 0 -170.5 -22t-149 -53t-113.5 -62t-79 -53t-31 -22q-17 0 -92 75t-75 93q0 12 10 22q132 132 320 205t380 73t380 -73t320 -205q10 -10 10 -22q0 -18 -75 -93t-92 -75z M1838 827q-11 0 -22 9q-179 157 -371.5 236.5t-420.5 79.5t-420.5 -79.5t-371.5 -236.5q-11 -9 -22 -9q-17 0 -92.5 75t-75.5 93q0 13 10 23q187 186 445 288t527 102t527 -102t445 -288q10 -10 10 -23q0 -18 -75.5 -93t-92.5 -75z" />
+<glyph unicode="" horiz-adv-x="1792" d="M384 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5 t37.5 90.5zM384 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 768q0 53 -37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1536 0v384q0 52 -38 90t-90 38t-90 -38t-38 -90v-384q0 -52 38 -90t90 -38t90 38t38 90zM1152 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5z M1536 1088v256q0 26 -19 45t-45 19h-1280q-26 0 -45 -19t-19 -45v-256q0 -26 19 -45t45 -19h1280q26 0 45 19t19 45zM1536 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1408v-1536q0 -52 -38 -90t-90 -38 h-1408q-52 0 -90 38t-38 90v1536q0 52 38 90t90 38h1408q52 0 90 -38t38 -90z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1112 1090q0 159 -237 159h-70q-32 0 -59.5 -21.5t-34.5 -52.5l-63 -276q-2 -5 -2 -16q0 -24 17 -39.5t41 -15.5h53q69 0 128.5 13t112.5 41t83.5 81.5t30.5 126.5zM1716 938q0 -265 -220 -428q-219 -161 -612 -161h-61q-32 0 -59 -21.5t-34 -52.5l-73 -316 q-8 -36 -40.5 -61.5t-69.5 -25.5h-213q-31 0 -53 20t-22 51q0 10 13 65h151q34 0 64 23.5t38 56.5l73 316q8 33 37.5 57t63.5 24h61q390 0 607 160t217 421q0 129 -51 207q183 -92 183 -335zM1533 1123q0 -264 -221 -428q-218 -161 -612 -161h-60q-32 0 -59.5 -22t-34.5 -53 l-73 -315q-8 -36 -40 -61.5t-69 -25.5h-214q-31 0 -52.5 19.5t-21.5 51.5q0 8 2 20l300 1301q8 36 40.5 61.5t69.5 25.5h444q68 0 125 -4t120.5 -15t113.5 -30t96.5 -50.5t77.5 -74t49.5 -103.5t18.5 -136z" />
+<glyph unicode="" horiz-adv-x="1792" d="M602 949q19 -61 31 -123.5t17 -141.5t-14 -159t-62 -145q-21 81 -67 157t-95.5 127t-99 90.5t-78.5 57.5t-33 19q-62 34 -81.5 100t14.5 128t101 81.5t129 -14.5q138 -83 238 -177zM927 1236q11 -25 20.5 -46t36.5 -100.5t42.5 -150.5t25.5 -179.5t0 -205.5t-47.5 -209.5 t-105.5 -208.5q-51 -72 -138 -72q-54 0 -98 31q-57 40 -69 109t28 127q60 85 81 195t13 199.5t-32 180.5t-39 128t-22 52q-31 63 -8.5 129.5t85.5 97.5q34 17 75 17q47 0 88.5 -25t63.5 -69zM1248 567q-17 -160 -72 -311q-17 131 -63 246q25 174 -5 361q-27 178 -94 342 q114 -90 212 -211q9 -37 15 -80q26 -179 7 -347zM1520 1440q9 -17 23.5 -49.5t43.5 -117.5t50.5 -178t34 -227.5t5 -269t-47 -300t-112.5 -323.5q-22 -48 -66 -75.5t-95 -27.5q-39 0 -74 16q-67 31 -92.5 100t4.5 136q58 126 90 257.5t37.5 239.5t-3.5 213.5t-26.5 180.5 t-38.5 138.5t-32.5 90t-15.5 32.5q-34 65 -11.5 135.5t87.5 104.5q37 20 81 20q49 0 91.5 -25.5t66.5 -70.5z" />
+<glyph unicode="" horiz-adv-x="2304" d="M1975 546h-138q14 37 66 179l3 9q4 10 10 26t9 26l12 -55zM531 611l-58 295q-11 54 -75 54h-268l-2 -13q311 -79 403 -336zM710 960l-162 -438l-17 89q-26 70 -85 129.5t-131 88.5l135 -510h175l261 641h-176zM849 318h166l104 642h-166zM1617 944q-69 27 -149 27 q-123 0 -201 -59t-79 -153q-1 -102 145 -174q48 -23 67 -41t19 -39q0 -30 -30 -46t-69 -16q-86 0 -156 33l-22 11l-23 -144q74 -34 185 -34q130 -1 208.5 59t80.5 160q0 106 -140 174q-49 25 -71 42t-22 38q0 22 24.5 38.5t70.5 16.5q70 1 124 -24l15 -8zM2042 960h-128 q-65 0 -87 -54l-246 -588h174l35 96h212q5 -22 20 -96h154zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="" horiz-adv-x="2304" d="M671 603h-13q-47 0 -47 -32q0 -22 20 -22q17 0 28 15t12 39zM1066 639h62v3q1 4 0.5 6.5t-1 7t-2 8t-4.5 6.5t-7.5 5t-11.5 2q-28 0 -36 -38zM1606 603h-12q-48 0 -48 -32q0 -22 20 -22q17 0 28 15t12 39zM1925 629q0 41 -30 41q-19 0 -31 -20t-12 -51q0 -42 28 -42 q20 0 32.5 20t12.5 52zM480 770h87l-44 -262h-56l32 201l-71 -201h-39l-4 200l-34 -200h-53l44 262h81l2 -163zM733 663q0 -6 -4 -42q-16 -101 -17 -113h-47l1 22q-20 -26 -58 -26q-23 0 -37.5 16t-14.5 42q0 39 26 60.5t73 21.5q14 0 23 -1q0 3 0.5 5.5t1 4.5t0.5 3 q0 20 -36 20q-29 0 -59 -10q0 4 7 48q38 11 67 11q74 0 74 -62zM889 721l-8 -49q-22 3 -41 3q-27 0 -27 -17q0 -8 4.5 -12t21.5 -11q40 -19 40 -60q0 -72 -87 -71q-34 0 -58 6q0 2 7 49q29 -8 51 -8q32 0 32 19q0 7 -4.5 11.5t-21.5 12.5q-43 20 -43 59q0 72 84 72 q30 0 50 -4zM977 721h28l-7 -52h-29q-2 -17 -6.5 -40.5t-7 -38.5t-2.5 -18q0 -16 19 -16q8 0 16 2l-8 -47q-21 -7 -40 -7q-43 0 -45 47q0 12 8 56q3 20 25 146h55zM1180 648q0 -23 -7 -52h-111q-3 -22 10 -33t38 -11q30 0 58 14l-9 -54q-30 -8 -57 -8q-95 0 -95 95 q0 55 27.5 90.5t69.5 35.5q35 0 55.5 -21t20.5 -56zM1319 722q-13 -23 -22 -62q-22 2 -31 -24t-25 -128h-56l3 14q22 130 29 199h51l-3 -33q14 21 25.5 29.5t28.5 4.5zM1506 763l-9 -57q-28 14 -50 14q-31 0 -51 -27.5t-20 -70.5q0 -30 13.5 -47t38.5 -17q21 0 48 13 l-10 -59q-28 -8 -50 -8q-45 0 -71.5 30.5t-26.5 82.5q0 70 35.5 114.5t91.5 44.5q26 0 61 -13zM1668 663q0 -18 -4 -42q-13 -79 -17 -113h-46l1 22q-20 -26 -59 -26q-23 0 -37 16t-14 42q0 39 25.5 60.5t72.5 21.5q15 0 23 -1q2 7 2 13q0 20 -36 20q-29 0 -59 -10q0 4 8 48 q38 11 67 11q73 0 73 -62zM1809 722q-14 -24 -21 -62q-23 2 -31.5 -23t-25.5 -129h-56l3 14q19 104 29 199h52q0 -11 -4 -33q15 21 26.5 29.5t27.5 4.5zM1950 770h56l-43 -262h-53l3 19q-23 -23 -52 -23q-31 0 -49.5 24t-18.5 64q0 53 27.5 92t64.5 39q31 0 53 -29z M2061 640q0 148 -72.5 273t-198 198t-273.5 73q-181 0 -328 -110q127 -116 171 -284h-50q-44 150 -158 253q-114 -103 -158 -253h-50q44 168 171 284q-147 110 -328 110q-148 0 -273.5 -73t-198 -198t-72.5 -273t72.5 -273t198 -198t273.5 -73q181 0 328 110 q-120 111 -165 264h50q46 -138 152 -233q106 95 152 233h50q-45 -153 -165 -264q147 -110 328 -110q148 0 273.5 73t198 198t72.5 273zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="" horiz-adv-x="2304" d="M313 759q0 -51 -36 -84q-29 -26 -89 -26h-17v220h17q61 0 89 -27q36 -31 36 -83zM2089 824q0 -52 -64 -52h-19v101h20q63 0 63 -49zM380 759q0 74 -50 120.5t-129 46.5h-95v-333h95q74 0 119 38q60 51 60 128zM410 593h65v333h-65v-333zM730 694q0 40 -20.5 62t-75.5 42 q-29 10 -39.5 19t-10.5 23q0 16 13.5 26.5t34.5 10.5q29 0 53 -27l34 44q-41 37 -98 37q-44 0 -74 -27.5t-30 -67.5q0 -35 18 -55.5t64 -36.5q37 -13 45 -19q19 -12 19 -34q0 -20 -14 -33.5t-36 -13.5q-48 0 -71 44l-42 -40q44 -64 115 -64q51 0 83 30.5t32 79.5zM1008 604 v77q-37 -37 -78 -37q-49 0 -80.5 32.5t-31.5 82.5q0 48 31.5 81.5t77.5 33.5q43 0 81 -38v77q-40 20 -80 20q-74 0 -125.5 -50.5t-51.5 -123.5t51 -123.5t125 -50.5q42 0 81 19zM2240 0v527q-65 -40 -144.5 -84t-237.5 -117t-329.5 -137.5t-417.5 -134.5t-504 -118h1569 q26 0 45 19t19 45zM1389 757q0 75 -53 128t-128 53t-128 -53t-53 -128t53 -128t128 -53t128 53t53 128zM1541 584l144 342h-71l-90 -224l-89 224h-71l142 -342h35zM1714 593h184v56h-119v90h115v56h-115v74h119v57h-184v-333zM2105 593h80l-105 140q76 16 76 94q0 47 -31 73 t-87 26h-97v-333h65v133h9zM2304 1274v-1268q0 -56 -38.5 -95t-93.5 -39h-2040q-55 0 -93.5 39t-38.5 95v1268q0 56 38.5 95t93.5 39h2040q55 0 93.5 -39t38.5 -95z" />
+<glyph unicode="" horiz-adv-x="2304" d="M119 854h89l-45 108zM740 328l74 79l-70 79h-163v-49h142v-55h-142v-54h159zM898 406l99 -110v217zM1186 453q0 33 -40 33h-84v-69h83q41 0 41 36zM1475 457q0 29 -42 29h-82v-61h81q43 0 43 32zM1197 923q0 29 -42 29h-82v-60h81q43 0 43 31zM1656 854h89l-44 108z M699 1009v-271h-66v212l-94 -212h-57l-94 212v-212h-132l-25 60h-135l-25 -60h-70l116 271h96l110 -257v257h106l85 -184l77 184h108zM1255 453q0 -20 -5.5 -35t-14 -25t-22.5 -16.5t-26 -10t-31.5 -4.5t-31.5 -1t-32.5 0.5t-29.5 0.5v-91h-126l-80 90l-83 -90h-256v271h260 l80 -89l82 89h207q109 0 109 -89zM964 794v-56h-217v271h217v-57h-152v-49h148v-55h-148v-54h152zM2304 235v-229q0 -55 -38.5 -94.5t-93.5 -39.5h-2040q-55 0 -93.5 39.5t-38.5 94.5v678h111l25 61h55l25 -61h218v46l19 -46h113l20 47v-47h541v99l10 1q10 0 10 -14v-86h279 v23q23 -12 55 -18t52.5 -6.5t63 0.5t51.5 1l25 61h56l25 -61h227v58l34 -58h182v378h-180v-44l-25 44h-185v-44l-23 44h-249q-69 0 -109 -22v22h-172v-22q-24 22 -73 22h-628l-43 -97l-43 97h-198v-44l-22 44h-169l-78 -179v391q0 55 38.5 94.5t93.5 39.5h2040 q55 0 93.5 -39.5t38.5 -94.5v-678h-120q-51 0 -81 -22v22h-177q-55 0 -78 -22v22h-316v-22q-31 22 -87 22h-209v-22q-23 22 -91 22h-234l-54 -58l-50 58h-349v-378h343l55 59l52 -59h211v89h21q59 0 90 13v-102h174v99h8q8 0 10 -2t2 -10v-87h529q57 0 88 24v-24h168 q60 0 95 17zM1546 469q0 -23 -12 -43t-34 -29q25 -9 34 -26t9 -46v-54h-65v45q0 33 -12 43.5t-46 10.5h-69v-99h-65v271h154q48 0 77 -15t29 -58zM1269 936q0 -24 -12.5 -44t-33.5 -29q26 -9 34.5 -25.5t8.5 -46.5v-53h-65q0 9 0.5 26.5t0 25t-3 18.5t-8.5 16t-17.5 8.5 t-29.5 3.5h-70v-98h-64v271l153 -1q49 0 78 -14.5t29 -57.5zM1798 327v-56h-216v271h216v-56h-151v-49h148v-55h-148v-54zM1372 1009v-271h-66v271h66zM2065 357q0 -86 -102 -86h-126v58h126q34 0 34 25q0 16 -17 21t-41.5 5t-49.5 3.5t-42 22.5t-17 55q0 39 26 60t66 21 h130v-57h-119q-36 0 -36 -25q0 -16 17.5 -20.5t42 -4t49 -2.5t42 -21.5t17.5 -54.5zM2304 407v-101q-24 -35 -88 -35h-125v58h125q33 0 33 25q0 13 -12.5 19t-31 5.5t-40 2t-40 8t-31 24t-12.5 48.5q0 39 26.5 60t66.5 21h129v-57h-118q-36 0 -36 -25q0 -20 29 -22t68.5 -5 t56.5 -26zM2139 1008v-270h-92l-122 203v-203h-132l-26 60h-134l-25 -60h-75q-129 0 -129 133q0 138 133 138h63v-59q-7 0 -28 1t-28.5 0.5t-23 -2t-21.5 -6.5t-14.5 -13.5t-11.5 -23t-3 -33.5q0 -38 13.5 -58t49.5 -20h29l92 213h97l109 -256v256h99l114 -188v188h66z" />
+<glyph unicode="" horiz-adv-x="2304" d="M322 689h-15q-19 0 -19 18q0 28 19 85q5 15 15 19.5t28 4.5q77 0 77 -49q0 -41 -30.5 -59.5t-74.5 -18.5zM664 528q-47 0 -47 29q0 62 123 62l3 -3q-5 -88 -79 -88zM1438 687h-15q-19 0 -19 19q0 28 19 85q5 15 14.5 19t28.5 4q77 0 77 -49q0 -41 -30.5 -59.5 t-74.5 -18.5zM1780 527q-47 0 -47 30q0 62 123 62l3 -3q-5 -89 -79 -89zM373 894h-128q-8 0 -14.5 -4t-8.5 -7.5t-7 -12.5q-3 -7 -45 -190t-42 -192q0 -7 5.5 -12.5t13.5 -5.5h62q25 0 32.5 34.5l15 69t32.5 34.5q47 0 87.5 7.5t80.5 24.5t63.5 52.5t23.5 84.5 q0 36 -14.5 61t-41 36.5t-53.5 15.5t-62 4zM719 798q-38 0 -74 -6q-2 0 -8.5 -1t-9 -1.5l-7.5 -1.5t-7.5 -2t-6.5 -3t-6.5 -4t-5 -5t-4.5 -7t-4 -9q-9 -29 -9 -39t9 -10q5 0 21.5 5t19.5 6q30 8 58 8q74 0 74 -36q0 -11 -10 -14q-8 -2 -18 -3t-21.5 -1.5t-17.5 -1.5 q-38 -4 -64.5 -10t-56.5 -19.5t-45.5 -39t-15.5 -62.5q0 -38 26 -59.5t64 -21.5q24 0 45.5 6.5t33 13t38.5 23.5q-3 -7 -3 -15t5.5 -13.5t12.5 -5.5h56q1 1 7 3.5t7.5 3.5t5 3.5t5 5.5t2.5 8l45 194q4 13 4 30q0 81 -145 81zM1247 793h-74q-22 0 -39 -23q-5 -7 -29.5 -51 t-46.5 -81.5t-26 -38.5l-5 4q0 77 -27 166q-1 5 -3.5 8.5t-6 6.5t-6.5 5t-8.5 3t-8.5 1.5t-9.5 1t-9 0.5h-10h-8.5q-38 0 -38 -21l1 -5q5 -53 25 -151t25 -143q2 -16 2 -24q0 -19 -30.5 -61.5t-30.5 -58.5q0 -13 40 -13q61 0 76 25l245 415q10 20 10 26q0 9 -8 9zM1489 892 h-129q-18 0 -29 -23q-6 -13 -46.5 -191.5t-40.5 -190.5q0 -20 43 -20h7.5h9h9t9.5 1t8.5 2t8.5 3t6.5 4.5t5.5 6t3 8.5l21 91q2 10 10.5 17t19.5 7q47 0 87.5 7t80.5 24.5t63.5 52.5t23.5 84q0 36 -14.5 61t-41 36.5t-53.5 15.5t-62 4zM1835 798q-26 0 -74 -6 q-38 -6 -48 -16q-7 -8 -11 -19q-8 -24 -8 -39q0 -10 8 -10q1 0 41 12q30 8 58 8q74 0 74 -36q0 -12 -10 -14q-4 -1 -57 -7q-38 -4 -64.5 -10t-56.5 -19.5t-45.5 -39t-15.5 -62.5t26 -58.5t64 -21.5q24 0 45 6t34 13t38 24q-3 -15 -3 -16q0 -5 2 -8.5t6.5 -5.5t8 -3.5 t10.5 -2t9.5 -0.5h9.5h8q42 0 48 25l45 194q3 15 3 31q0 81 -145 81zM2157 889h-55q-25 0 -33 -40q-10 -44 -36.5 -167t-42.5 -190v-5q0 -16 16 -18h1h57q10 0 18.5 6.5t10.5 16.5l83 374h-1l1 5q0 7 -5.5 12.5t-13.5 5.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048 q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="" horiz-adv-x="2304" d="M1597 633q0 -69 -21 -106q-19 -35 -52 -35q-23 0 -41 9v224q29 30 57 30q57 0 57 -122zM2035 669h-110q6 98 56 98q51 0 54 -98zM476 534q0 59 -33 91.5t-101 57.5q-36 13 -52 24t-16 25q0 26 38 26q58 0 124 -33l18 112q-67 32 -149 32q-77 0 -123 -38q-48 -39 -48 -109 q0 -58 32.5 -90.5t99.5 -56.5q39 -14 54.5 -25.5t15.5 -27.5q0 -31 -48 -31q-29 0 -70 12.5t-72 30.5l-18 -113q72 -41 168 -41q81 0 129 37q51 41 51 117zM771 749l19 111h-96v135l-129 -21l-18 -114l-46 -8l-17 -103h62v-219q0 -84 44 -120q38 -30 111 -30q32 0 79 11v118 q-32 -7 -44 -7q-42 0 -42 50v197h77zM1087 724v139q-15 3 -28 3q-32 0 -55.5 -16t-33.5 -46l-10 56h-131v-471h150v306q26 31 82 31q16 0 26 -2zM1124 389h150v471h-150v-471zM1746 638q0 122 -45 179q-40 52 -111 52q-64 0 -117 -56l-8 47h-132v-645l150 25v151 q36 -11 68 -11q83 0 134 56q61 65 61 202zM1278 986q0 33 -23 56t-56 23t-56 -23t-23 -56t23 -56.5t56 -23.5t56 23.5t23 56.5zM2176 629q0 113 -48 176q-50 64 -144 64q-96 0 -151.5 -66t-55.5 -180q0 -128 63 -188q55 -55 161 -55q101 0 160 40l-16 103q-57 -31 -128 -31 q-43 0 -63 19q-23 19 -28 66h248q2 14 2 52zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="" horiz-adv-x="2048" d="M1558 684q61 -356 298 -556q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5zM1024 -176q16 0 16 16t-16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5zM2026 1424q8 -10 7.5 -23.5t-10.5 -22.5 l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5 l418 363q10 8 23.5 7t21.5 -11z" />
+<glyph unicode="" horiz-adv-x="2048" d="M1040 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM503 315l877 760q-42 88 -132.5 146.5t-223.5 58.5q-93 0 -169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -384 -137 -645zM1856 128 q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5l149 129h757q-166 187 -227 459l111 97q61 -356 298 -556zM1942 1520l84 -96q8 -10 7.5 -23.5t-10.5 -22.5l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161 q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5l418 363q10 8 23.5 7t21.5 -11z" />
+<glyph unicode="" horiz-adv-x="1408" d="M512 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM768 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1024 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704 q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167 q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
+<glyph unicode="" d="M1150 462v-109q0 -50 -36.5 -89t-94 -60.5t-118 -32.5t-117.5 -11q-205 0 -342.5 139t-137.5 346q0 203 136 339t339 136q34 0 75.5 -4.5t93 -18t92.5 -34t69 -56.5t28 -81v-109q0 -16 -16 -16h-118q-16 0 -16 16v70q0 43 -65.5 67.5t-137.5 24.5q-140 0 -228.5 -91.5 t-88.5 -237.5q0 -151 91.5 -249.5t233.5 -98.5q68 0 138 24t70 66v70q0 7 4.5 11.5t10.5 4.5h119q6 0 11 -4.5t5 -11.5zM768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5 t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" d="M972 761q0 108 -53.5 169t-147.5 61q-63 0 -124 -30.5t-110 -84.5t-79.5 -137t-30.5 -180q0 -112 53.5 -173t150.5 -61q96 0 176 66.5t122.5 166t42.5 203.5zM1536 640q0 -111 -37 -197t-98.5 -135t-131.5 -74.5t-145 -27.5q-6 0 -15.5 -0.5t-16.5 -0.5q-95 0 -142 53 q-28 33 -33 83q-52 -66 -131.5 -110t-173.5 -44q-161 0 -249.5 95.5t-88.5 269.5q0 157 66 290t179 210.5t246 77.5q87 0 155 -35.5t106 -99.5l2 19l11 56q1 6 5.5 12t9.5 6h118q5 0 13 -11q5 -5 3 -16l-120 -614q-5 -24 -5 -48q0 -39 12.5 -52t44.5 -13q28 1 57 5.5t73 24 t77 50t57 89.5t24 137q0 292 -174 466t-466 174q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51q228 0 405 144q11 9 24 8t21 -12l41 -49q8 -12 7 -24q-2 -13 -12 -22q-102 -83 -227.5 -128t-258.5 -45q-156 0 -298 61 t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q344 0 556 -212t212 -556z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1698 1442q94 -94 94 -226.5t-94 -225.5l-225 -223l104 -104q10 -10 10 -23t-10 -23l-210 -210q-10 -10 -23 -10t-23 10l-105 105l-603 -603q-37 -37 -90 -37h-203l-256 -128l-64 64l128 256v203q0 53 37 90l603 603l-105 105q-10 10 -10 23t10 23l210 210q10 10 23 10 t23 -10l104 -104l223 225q93 94 225.5 94t226.5 -94zM512 64l576 576l-192 192l-576 -576v-192h192z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1615 1536q70 0 122.5 -46.5t52.5 -116.5q0 -63 -45 -151q-332 -629 -465 -752q-97 -91 -218 -91q-126 0 -216.5 92.5t-90.5 219.5q0 128 92 212l638 579q59 54 130 54zM706 502q39 -76 106.5 -130t150.5 -76l1 -71q4 -213 -129.5 -347t-348.5 -134q-123 0 -218 46.5 t-152.5 127.5t-86.5 183t-29 220q7 -5 41 -30t62 -44.5t59 -36.5t46 -17q41 0 55 37q25 66 57.5 112.5t69.5 76t88 47.5t103 25.5t125 10.5z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1792 128v-384h-1792v384q45 0 85 14t59 27.5t47 37.5q30 27 51.5 38t56.5 11t55.5 -11t52.5 -38q29 -25 47 -38t58 -27t86 -14q45 0 85 14.5t58 27t48 37.5q21 19 32.5 27t31 15t43.5 7q35 0 56.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14t85 14t59 27.5t47 37.5 q30 27 51.5 38t56.5 11q34 0 55.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14zM1792 448v-192q-35 0 -55.5 11t-52.5 38q-29 25 -47 38t-58 27t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-22 -19 -33 -27t-31 -15t-44 -7q-35 0 -56.5 11t-51.5 38q-29 25 -47 38t-58 27 t-86 14q-45 0 -85 -14.5t-58 -27t-48 -37.5q-21 -19 -32.5 -27t-31 -15t-43.5 -7q-35 0 -56.5 11t-51.5 38q-28 24 -47 37.5t-59 27.5t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-30 -27 -51.5 -38t-56.5 -11v192q0 80 56 136t136 56h64v448h256v-448h256v448h256v-448h256v448 h256v-448h64q80 0 136 -56t56 -136zM512 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1024 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51 t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1536 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150z" />
+<glyph unicode="" horiz-adv-x="2048" d="M2048 0v-128h-2048v1536h128v-1408h1920zM1664 1024l256 -896h-1664v576l448 576l576 -576z" />
+<glyph unicode="" horiz-adv-x="1792" d="M768 646l546 -546q-106 -108 -247.5 -168t-298.5 -60q-209 0 -385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103v-762zM955 640h773q0 -157 -60 -298.5t-168 -247.5zM1664 768h-768v768q209 0 385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="" horiz-adv-x="2048" d="M2048 0v-128h-2048v1536h128v-1408h1920zM1920 1248v-435q0 -21 -19.5 -29.5t-35.5 7.5l-121 121l-633 -633q-10 -10 -23 -10t-23 10l-233 233l-416 -416l-192 192l585 585q10 10 23 10t23 -10l233 -233l464 464l-121 121q-16 16 -7.5 35.5t29.5 19.5h435q14 0 23 -9 t9 -23z" />
+<glyph unicode="" horiz-adv-x="1792" d="M1292 832q0 -6 10 -41q10 -29 25 -49.5t41 -34t44 -20t55 -16.5q325 -91 325 -332q0 -146 -105.5 -242.5t-254.5 -96.5q-59 0 -111.5 18.5t-91.5 45.5t-77 74.5t-63 87.5t-53.5 103.5t-43.5 103t-39.5 106.5t-35.5 95q-32 81 -61.5 133.5t-73.5 96.5t-104 64t-142 20 q-96 0 -183 -55.5t-138 -144.5t-51 -185q0 -160 106.5 -279.5t263.5 -119.5q177 0 258 95q56 63 83 116l84 -152q-15 -34 -44 -70l1 -1q-131 -152 -388 -152q-147 0 -269.5 79t-190.5 207.5t-68 274.5q0 105 43.5 206t116 176.5t172 121.5t204.5 46q87 0 159 -19t123.5 -50 t95 -80t72.5 -99t58.5 -117t50.5 -124.5t50 -130.5t55 -127q96 -200 233 -200q81 0 138.5 48.5t57.5 128.5q0 42 -19 72t-50.5 46t-72.5 31.5t-84.5 27t-87.5 34t-81 52t-65 82t-39 122.5q-3 16 -3 33q0 110 87.5 192t198.5 78q78 -3 120.5 -14.5t90.5 -53.5h-1 q12 -11 23 -24.5t26 -36t19 -27.5l-129 -99q-26 49 -54 70v1q-23 21 -97 21q-49 0 -84 -33t-35 -83z" />
+<glyph unicode="" d="M1432 484q0 173 -234 239q-35 10 -53 16.5t-38 25t-29 46.5q0 2 -2 8.5t-3 12t-1 7.5q0 36 24.5 59.5t60.5 23.5q54 0 71 -15h-1q20 -15 39 -51l93 71q-39 54 -49 64q-33 29 -67.5 39t-85.5 10q-80 0 -142 -57.5t-62 -137.5q0 -7 2 -23q16 -96 64.5 -140t148.5 -73 q29 -8 49 -15.5t45 -21.5t38.5 -34.5t13.5 -46.5v-5q1 -58 -40.5 -93t-100.5 -35q-97 0 -167 144q-23 47 -51.5 121.5t-48 125.5t-54 110.5t-74 95.5t-103.5 60.5t-147 24.5q-101 0 -192 -56t-144 -148t-50 -192v-1q4 -108 50.5 -199t133.5 -147.5t196 -56.5q186 0 279 110 q20 27 31 51l-60 109q-42 -80 -99 -116t-146 -36q-115 0 -191 87t-76 204q0 105 82 189t186 84q112 0 170 -53.5t104 -172.5q8 -21 25.5 -68.5t28.5 -76.5t31.5 -74.5t38.5 -74t45.5 -62.5t55.5 -53.5t66 -33t80 -13.5q107 0 183 69.5t76 174.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="" horiz-adv-x="2048" d="M1152 640q0 104 -40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM1920 640q0 104 -40.5 198.5 t-109.5 163.5t-163.5 109.5t-198.5 40.5h-386q119 -90 188.5 -224t69.5 -288t-69.5 -288t-188.5 -224h386q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM2048 640q0 -130 -51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5 t-136.5 204t-51 248.5t51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5z" />
+<glyph unicode="" horiz-adv-x="2048" d="M0 640q0 130 51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5t-51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5t-136.5 204t-51 248.5zM1408 128q104 0 198.5 40.5t163.5 109.5 t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5z" />
+<glyph unicode="" horiz-adv-x="2304" d="M762 384h-314q-40 0 -57.5 35t6.5 67l188 251q-65 31 -137 31q-132 0 -226 -94t-94 -226t94 -226t226 -94q115 0 203 72.5t111 183.5zM576 512h186q-18 85 -75 148zM1056 512l288 384h-480l-99 -132q105 -103 126 -252h165zM2176 448q0 132 -94 226t-226 94 q-60 0 -121 -24l174 -260q15 -23 10 -49t-27 -40q-15 -11 -36 -11q-35 0 -53 29l-174 260q-93 -95 -93 -225q0 -132 94 -226t226 -94t226 94t94 226zM2304 448q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 97 39.5 183.5t109.5 149.5l-65 98l-353 -469 q-18 -26 -51 -26h-197q-23 -164 -149 -274t-294 -110q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q114 0 215 -55l137 183h-224q-26 0 -45 19t-19 45t19 45t45 19h384v-128h435l-85 128h-222q-26 0 -45 19t-19 45t19 45t45 19h256q33 0 53 -28l267 -400 q91 44 192 44q185 0 316.5 -131.5t131.5 -316.5z" />
+<glyph unicode="" d="M384 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1362 716l-72 384q-5 23 -22.5 37.5t-40.5 14.5 h-918q-23 0 -40.5 -14.5t-22.5 -37.5l-72 -384q-5 -30 14 -53t49 -23h1062q30 0 49 23t14 53zM1136 1328q0 20 -14 34t-34 14h-640q-20 0 -34 -14t-14 -34t14 -34t34 -14h640q20 0 34 14t14 34zM1536 603v-603h-128v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5v128h-768v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5v128h-128v603q0 112 25 223l103 454q9 78 97.5 137t230 89t312.5 30t312.5 -30t230 -89t97.5 -137l105 -454q23 -102 23 -223z" />
+<glyph unicode="" horiz-adv-x="2048" d="M1463 704q0 -35 -25 -60.5t-61 -25.5h-702q-36 0 -61 25.5t-25 60.5t25 60.5t61 25.5h702q36 0 61 -25.5t25 -60.5zM1677 704q0 86 -23 170h-982q-36 0 -61 25t-25 60q0 36 25 61t61 25h908q-88 143 -235 227t-320 84q-177 0 -327.5 -87.5t-238 -237.5t-87.5 -327 q0 -86 23 -170h982q36 0 61 -25t25 -60q0 -36 -25 -61t-61 -25h-908q88 -143 235.5 -227t320.5 -84q132 0 253 51.5t208 139t139 208t52 253.5zM2048 959q0 -35 -25 -60t-61 -25h-131q17 -85 17 -170q0 -167 -65.5 -319.5t-175.5 -263t-262.5 -176t-319.5 -65.5 q-246 0 -448.5 133t-301.5 350h-189q-36 0 -61 25t-25 61q0 35 25 60t61 25h132q-17 85 -17 170q0 167 65.5 319.5t175.5 263t262.5 176t320.5 65.5q245 0 447.5 -133t301.5 -350h188q36 0 61 -25t25 -61z" />
+<glyph unicode="" horiz-adv-x="1280" d="M953 1158l-114 -328l117 -21q165 451 165 518q0 56 -38 56q-57 0 -130 -225zM654 471l33 -88q37 42 71 67l-33 5.5t-38.5 7t-32.5 8.5zM362 1367q0 -98 159 -521q18 10 49 10q15 0 75 -5l-121 351q-75 220 -123 220q-19 0 -29 -17.5t-10 -37.5zM283 608q0 -36 51.5 -119 t117.5 -153t100 -70q14 0 25.5 13t11.5 27q0 24 -32 102q-13 32 -32 72t-47.5 89t-61.5 81t-62 32q-20 0 -45.5 -27t-25.5 -47zM125 273q0 -41 25 -104q59 -145 183.5 -227t281.5 -82q227 0 382 170q152 169 152 427q0 43 -1 67t-11.5 62t-30.5 56q-56 49 -211.5 75.5 t-270.5 26.5q-37 0 -49 -11q-12 -5 -12 -35q0 -34 21.5 -60t55.5 -40t77.5 -23.5t87.5 -11.5t85 -4t70 0h23q24 0 40 -19q15 -19 19 -55q-28 -28 -96 -54q-61 -22 -93 -46q-64 -46 -108.5 -114t-44.5 -137q0 -31 18.5 -88.5t18.5 -87.5l-3 -12q-4 -12 -4 -14 q-137 10 -146 216q-8 -2 -41 -2q2 -7 2 -21q0 -53 -40.5 -89.5t-94.5 -36.5q-82 0 -166.5 78t-84.5 159q0 34 33 67q52 -64 60 -76q77 -104 133 -104q12 0 26.5 8.5t14.5 20.5q0 34 -87.5 145t-116.5 111q-43 0 -70 -44.5t-27 -90.5zM11 264q0 101 42.5 163t136.5 88 q-28 74 -28 104q0 62 61 123t122 61q29 0 70 -15q-163 462 -163 567q0 80 41 130.5t119 50.5q131 0 325 -581q6 -17 8 -23q6 16 29 79.5t43.5 118.5t54 127.5t64.5 123t70.5 86.5t76.5 36q71 0 112 -49t41 -122q0 -108 -159 -550q61 -15 100.5 -46t58.5 -78t26 -93.5 t7 -110.5q0 -150 -47 -280t-132 -225t-211 -150t-278 -55q-111 0 -223 42q-149 57 -258 191.5t-109 286.5z" />
+<glyph unicode="" horiz-adv-x="2048" d="M785 528h207q-14 -158 -98.5 -248.5t-214.5 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-203q-5 64 -35.5 99t-81.5 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t40 -51.5t66 -18q95 0 109 139zM1497 528h206 q-14 -158 -98 -248.5t-214 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-204q-4 64 -35 99t-81 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t39.5 -51.5t65.5 -18q49 0 76.5 38t33.5 101zM1856 647q0 207 -15.5 307 t-60.5 161q-6 8 -13.5 14t-21.5 15t-16 11q-86 63 -697 63q-625 0 -710 -63q-5 -4 -17.5 -11.5t-21 -14t-14.5 -14.5q-45 -60 -60 -159.5t-15 -308.5q0 -208 15 -307.5t60 -160.5q6 -8 15 -15t20.5 -14t17.5 -12q44 -33 239.5 -49t470.5 -16q610 0 697 65q5 4 17 11t20.5 14 t13.5 16q46 60 61 159t15 309zM2048 1408v-1536h-2048v1536h2048z" />
+<glyph unicode="" d="M992 912v-496q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v496q0 112 -80 192t-192 80h-272v-1152q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v1344q0 14 9 23t23 9h464q135 0 249 -66.5t180.5 -180.5t66.5 -249zM1376 1376v-880q0 -135 -66.5 -249t-180.5 -180.5 t-249 -66.5h-464q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h160q14 0 23 -9t9 -23v-768h272q112 0 192 80t80 192v880q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" />
+<glyph unicode="" d="M1311 694v-114q0 -24 -13.5 -38t-37.5 -14h-202q-24 0 -38 14t-14 38v114q0 24 14 38t38 14h202q24 0 37.5 -14t13.5 -38zM821 464v250q0 53 -32.5 85.5t-85.5 32.5h-133q-68 0 -96 -52q-28 52 -96 52h-130q-53 0 -85.5 -32.5t-32.5 -85.5v-250q0 -22 21 -22h55 q22 0 22 22v230q0 24 13.5 38t38.5 14h94q24 0 38 -14t14 -38v-230q0 -22 21 -22h54q22 0 22 22v230q0 24 14 38t38 14h97q24 0 37.5 -14t13.5 -38v-230q0 -22 22 -22h55q21 0 21 22zM1410 560v154q0 53 -33 85.5t-86 32.5h-264q-53 0 -86 -32.5t-33 -85.5v-410 q0 -21 22 -21h55q21 0 21 21v180q31 -42 94 -42h191q53 0 86 32.5t33 85.5zM1536 1176v-1072q0 -96 -68 -164t-164 -68h-1072q-96 0 -164 68t-68 164v1072q0 96 68 164t164 68h1072q96 0 164 -68t68 -164z" />
+<glyph unicode="" horiz-adv-x="1792" />
+<glyph unicode="" horiz-adv-x="1792" />
+<glyph unicode="" horiz-adv-x="1792" />
+</font>
+</defs></svg>
\ No newline at end of file
diff --git a/dgbuilder/public/font-awesome/fonts/fontawesome-webfont.ttf b/dgbuilder/public/font-awesome/fonts/fontawesome-webfont.ttf
new file mode 100755
index 0000000..96a3639
--- /dev/null
+++ b/dgbuilder/public/font-awesome/fonts/fontawesome-webfont.ttf
Binary files differ
diff --git a/dgbuilder/public/font-awesome/fonts/fontawesome-webfont.woff b/dgbuilder/public/font-awesome/fonts/fontawesome-webfont.woff
new file mode 100755
index 0000000..628b6a5
--- /dev/null
+++ b/dgbuilder/public/font-awesome/fonts/fontawesome-webfont.woff
Binary files differ
diff --git a/dgbuilder/public/grip.png b/dgbuilder/public/grip.png
new file mode 100644
index 0000000..c01edb5
--- /dev/null
+++ b/dgbuilder/public/grip.png
Binary files differ
diff --git a/dgbuilder/public/icons/alert.png b/dgbuilder/public/icons/alert.png
new file mode 100644
index 0000000..a863111
--- /dev/null
+++ b/dgbuilder/public/icons/alert.png
Binary files differ
diff --git a/dgbuilder/public/icons/arduino.png b/dgbuilder/public/icons/arduino.png
new file mode 100644
index 0000000..43e7d4b
--- /dev/null
+++ b/dgbuilder/public/icons/arduino.png
Binary files differ
diff --git a/dgbuilder/public/icons/arrow-in.png b/dgbuilder/public/icons/arrow-in.png
new file mode 100644
index 0000000..e38f391
--- /dev/null
+++ b/dgbuilder/public/icons/arrow-in.png
Binary files differ
diff --git a/dgbuilder/public/icons/bluetooth.png b/dgbuilder/public/icons/bluetooth.png
new file mode 100644
index 0000000..1967b06
--- /dev/null
+++ b/dgbuilder/public/icons/bluetooth.png
Binary files differ
diff --git a/dgbuilder/public/icons/bridge-dash.png b/dgbuilder/public/icons/bridge-dash.png
new file mode 100644
index 0000000..beaf8e6
--- /dev/null
+++ b/dgbuilder/public/icons/bridge-dash.png
Binary files differ
diff --git a/dgbuilder/public/icons/bridge.png b/dgbuilder/public/icons/bridge.png
new file mode 100644
index 0000000..2011292
--- /dev/null
+++ b/dgbuilder/public/icons/bridge.png
Binary files differ
diff --git a/dgbuilder/public/icons/comment.png b/dgbuilder/public/icons/comment.png
new file mode 100644
index 0000000..d64d12a
--- /dev/null
+++ b/dgbuilder/public/icons/comment.png
Binary files differ
diff --git a/dgbuilder/public/icons/db.png b/dgbuilder/public/icons/db.png
new file mode 100644
index 0000000..5e74f74
--- /dev/null
+++ b/dgbuilder/public/icons/db.png
Binary files differ
diff --git a/dgbuilder/public/icons/debug.png b/dgbuilder/public/icons/debug.png
new file mode 100644
index 0000000..0569156
--- /dev/null
+++ b/dgbuilder/public/icons/debug.png
Binary files differ
diff --git a/dgbuilder/public/icons/envelope.png b/dgbuilder/public/icons/envelope.png
new file mode 100644
index 0000000..fb0d36b
--- /dev/null
+++ b/dgbuilder/public/icons/envelope.png
Binary files differ
diff --git a/dgbuilder/public/icons/feed.png b/dgbuilder/public/icons/feed.png
new file mode 100644
index 0000000..9f2671c
--- /dev/null
+++ b/dgbuilder/public/icons/feed.png
Binary files differ
diff --git a/dgbuilder/public/icons/file.png b/dgbuilder/public/icons/file.png
new file mode 100644
index 0000000..78ee09f
--- /dev/null
+++ b/dgbuilder/public/icons/file.png
Binary files differ
diff --git a/dgbuilder/public/icons/function.png b/dgbuilder/public/icons/function.png
new file mode 100644
index 0000000..9095050
--- /dev/null
+++ b/dgbuilder/public/icons/function.png
Binary files differ
diff --git a/dgbuilder/public/icons/hash.png b/dgbuilder/public/icons/hash.png
new file mode 100644
index 0000000..e68e45d
--- /dev/null
+++ b/dgbuilder/public/icons/hash.png
Binary files differ
diff --git a/dgbuilder/public/icons/inject.png b/dgbuilder/public/icons/inject.png
new file mode 100644
index 0000000..dbf4711
--- /dev/null
+++ b/dgbuilder/public/icons/inject.png
Binary files differ
diff --git a/dgbuilder/public/icons/leveldb.png b/dgbuilder/public/icons/leveldb.png
new file mode 100644
index 0000000..55760c7
--- /dev/null
+++ b/dgbuilder/public/icons/leveldb.png
Binary files differ
diff --git a/dgbuilder/public/icons/light.png b/dgbuilder/public/icons/light.png
new file mode 100644
index 0000000..ce21542
--- /dev/null
+++ b/dgbuilder/public/icons/light.png
Binary files differ
diff --git a/dgbuilder/public/icons/mongodb.png b/dgbuilder/public/icons/mongodb.png
new file mode 100644
index 0000000..3a1fc11
--- /dev/null
+++ b/dgbuilder/public/icons/mongodb.png
Binary files differ
diff --git a/dgbuilder/public/icons/node-changed.png b/dgbuilder/public/icons/node-changed.png
new file mode 100644
index 0000000..38a1794
--- /dev/null
+++ b/dgbuilder/public/icons/node-changed.png
Binary files differ
diff --git a/dgbuilder/public/icons/node-error.png b/dgbuilder/public/icons/node-error.png
new file mode 100644
index 0000000..c20c8e8
--- /dev/null
+++ b/dgbuilder/public/icons/node-error.png
Binary files differ
diff --git a/dgbuilder/public/icons/range.png b/dgbuilder/public/icons/range.png
new file mode 100644
index 0000000..2e7183c
--- /dev/null
+++ b/dgbuilder/public/icons/range.png
Binary files differ
diff --git a/dgbuilder/public/icons/redis.png b/dgbuilder/public/icons/redis.png
new file mode 100644
index 0000000..92e82fd
--- /dev/null
+++ b/dgbuilder/public/icons/redis.png
Binary files differ
diff --git a/dgbuilder/public/icons/rpi.png b/dgbuilder/public/icons/rpi.png
new file mode 100644
index 0000000..162b99d
--- /dev/null
+++ b/dgbuilder/public/icons/rpi.png
Binary files differ
diff --git a/dgbuilder/public/icons/serial.png b/dgbuilder/public/icons/serial.png
new file mode 100644
index 0000000..f4bcedc
--- /dev/null
+++ b/dgbuilder/public/icons/serial.png
Binary files differ
diff --git a/dgbuilder/public/icons/swap.png b/dgbuilder/public/icons/swap.png
new file mode 100644
index 0000000..e9e70ef
--- /dev/null
+++ b/dgbuilder/public/icons/swap.png
Binary files differ
diff --git a/dgbuilder/public/icons/switch.png b/dgbuilder/public/icons/switch.png
new file mode 100644
index 0000000..4d172de
--- /dev/null
+++ b/dgbuilder/public/icons/switch.png
Binary files differ
diff --git a/dgbuilder/public/icons/template.png b/dgbuilder/public/icons/template.png
new file mode 100644
index 0000000..1db6f27
--- /dev/null
+++ b/dgbuilder/public/icons/template.png
Binary files differ
diff --git a/dgbuilder/public/icons/timer.png b/dgbuilder/public/icons/timer.png
new file mode 100644
index 0000000..4f02f46
--- /dev/null
+++ b/dgbuilder/public/icons/timer.png
Binary files differ
diff --git a/dgbuilder/public/icons/trigger.png b/dgbuilder/public/icons/trigger.png
new file mode 100644
index 0000000..37b60f1
--- /dev/null
+++ b/dgbuilder/public/icons/trigger.png
Binary files differ
diff --git a/dgbuilder/public/icons/twitter.png b/dgbuilder/public/icons/twitter.png
new file mode 100644
index 0000000..d060594
--- /dev/null
+++ b/dgbuilder/public/icons/twitter.png
Binary files differ
diff --git a/dgbuilder/public/icons/watch.png b/dgbuilder/public/icons/watch.png
new file mode 100644
index 0000000..a6c1b94
--- /dev/null
+++ b/dgbuilder/public/icons/watch.png
Binary files differ
diff --git a/dgbuilder/public/icons/white-globe.png b/dgbuilder/public/icons/white-globe.png
new file mode 100644
index 0000000..8a19079
--- /dev/null
+++ b/dgbuilder/public/icons/white-globe.png
Binary files differ
diff --git a/dgbuilder/public/images/dgstart.png b/dgbuilder/public/images/dgstart.png
new file mode 100644
index 0000000..58521af
--- /dev/null
+++ b/dgbuilder/public/images/dgstart.png
Binary files differ
diff --git a/dgbuilder/public/images/page-loading.gif b/dgbuilder/public/images/page-loading.gif
new file mode 100644
index 0000000..c25b436
--- /dev/null
+++ b/dgbuilder/public/images/page-loading.gif
Binary files differ
diff --git a/dgbuilder/public/index.html b/dgbuilder/public/index.html
new file mode 100644
index 0000000..07090db
--- /dev/null
+++ b/dgbuilder/public/index.html
@@ -0,0 +1,332 @@
+<!DOCTYPE html>
+<html>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
+<meta name="apple-mobile-web-app-capable" content="yes">
+<meta name="mobile-web-app-capable" content="yes">
+
+<!--
+ Copyright 2013, 2014 IBM Corp.
+
+ 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.
+-->
+<head>
+<!--<title>Node-RED</title>-->
+<title>Directed Graph Builder</title>
+<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
+<link href="jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" media="screen">
+<link rel="stylesheet" type="text/css" href="orion/built-editor.css"/>
+<link rel="stylesheet" type="text/css" href="font-awesome/css/font-awesome.min.css"/>
+<link rel="stylesheet" href="style.css">
+</head>
+<body spellcheck="false">
+<div id="header">
+ <!--<span class="logo"><img src="node-red.png"> <span>Node-RED</span></span>-->
+ <!--<span class="logo"><img src="node-red.png"> <span>Directed Graph Builder</span></span>-->
+ <span class="logo"><img src="node-red.png"> <span>Directed Graph Builder</span><span id='processingStatusId' ></span></span>
+ <div class="pull-right">
+ <span id='releaseId' ></span>
+ <a id="btn-deploy" class="button action-deploy disabled" href="#"><i id="btn-icn-deploy" class="fa fa-download"></i>Save</a>
+ <a id="btn-sidemenu" class="button dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-bars"></i></a>
+ </div>
+</div>
+<div id="main-container" class="sidebar-closed">
+ <div id="palette">
+ <img src="spin.svg" class="palette-spinner"/>
+ <div id="palette-container" class="palette-scroll">
+ </div>
+ <div id="palette-search">
+ <i class="fa fa-search"></i><input id="palette-search-input" type="text" placeholder="filter"><a href="#" id="palette-search-clear"><i class="fa fa-times"></i></a></input>
+ </div>
+ </div><!-- /palette -->
+
+ <div id="workspace">
+ <ul id="workspace-tabs"></ul>
+ <div id="workspace-add-tab"><a id="btn-workspace-add-tab" href="#"><i class="fa fa-plus"></i></a></div>
+ <div id="chart"></div>
+ <div id="workspace-toolbar">
+ <div class="btn-group">
+ <a class="btn btn-small" href="#"><i class="fa fa-search-minus"></i></a>
+ <a class="btn btn-small" href="#"><i class="fa fa-dot-circle-o"></i></a>
+ <a class="btn btn-small" href="#"><i class="fa fa-search-plus"></i></a>
+ </div>
+ </div>
+ </div>
+
+ <div id="chart-zoom-controls">
+ <div class="btn-group">
+ <a class="btn btn-mini" id="btn-zoom-out" href="#"><i class="fa fa-search-minus"></i></a>
+ <a class="btn btn-mini" id="btn-zoom-zero" href="#"><i class="fa fa-dot-circle-o"></i></a>
+ <a class="btn btn-mini" id="btn-zoom-in" href="#"><i class="fa fa-search-plus"></i></a>
+ </div>
+ </div>
+
+ <div id="sidebar">
+ <ul id="sidebar-tabs"></ul>
+ <div id="sidebar-content"></div>
+ </div>
+
+ <div id="sidebar-separator"></div>
+
+</div>
+
+<div id="notifications"></div>
+<div id="dropTarget"><div>Drop the flow here<br/><i class="fa fa-download"></i></div></div>
+
+<div id="dialog" class="hide"><form id="dialog-form" class="form-horizontal"></form></div>
+<div id="node-config-dialog" class="hide"><form id="dialog-config-form" class="form-horizontal"></form><div class="form-tips" id="node-config-dialog-user-count"></div></div>
+
+<div id="node-dialog-confirm-deploy" class="hide">
+ <form class="form-horizontal">
+ <div id="node-dialog-confirm-deploy-config" style="text-align: center; padding-top: 30px;">
+ Some of the nodes are not properly configured. Are you sure you want to deploy?
+ </div>
+ <div id="node-dialog-confirm-deploy-unknown" style="text-align: center; padding-top: 10px;">
+ The workspace contains some unknown node types:
+ <ul style="width: 300px; margin: auto; text-align: left;" id="node-dialog-confirm-deploy-unknown-list"></ul>
+ Are you sure you want to deploy?
+ </div>
+ </form>
+</div>
+
+<div id="node-help" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="node-help-label" aria-hidden="true">
+ <div class="modal-header">
+ <h5 id="node-help-label">Keyboard Shortcuts <!-- <span style="float: right;"><a href="http://node-red.github.io/docs" target="_blank">Open help in new window »</a></span> -->
+</h5>
+ </div>
+ <div class="modal-body">
+ <table>
+ <tr>
+ <td><span class="help-key">?</span></td><td>Help</td>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">a</span></td><td>Select all nodes</td>
+ </tr>
+ <tr>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">Space</span></td><td>Toggle sidebar</td>
+ <td><span class="help-key">Shift</span> <span class="help-key">Click</span></td><td>Select all connected nodes</td>
+ </tr>
+ <tr>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">z</span></td><td>Undo</td>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">Click</span></td><td>Add/remove node from selection</td>
+ </tr>
+ <tr>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">m</span></td><td>Toggle Node Palette</td>
+ <td><span class="help-key">Delete</span></td><td>Delete selected nodes or link</td>
+ </tr>
+ <tr>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">x</span></td><td>Cut selected nodes</td>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">b</span></td><td>Find Node</td>
+ </tr>
+ <tr>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">c</span></td><td>Copy selected nodes</td>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">v</span></td><td>Paste nodes</td>
+ </tr>
+ <tr>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">i</span></td><td>Import nodes</td>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">e</span></td><td>Export selected nodes</td>
+ </tr>
+ <tr>
+ <td colspan="2"></td>
+ </tr>
+ <tr>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">+</span></td><td>Zoom in</td>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">-</span></td><td>Zoom out</td>
+ </tr>
+ </table>
+ </div>
+ <div class="modal-footer">
+ <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
+ </div>
+</div>
+
+<div id="node-dialog-library-save-confirm" class="hide">
+ <form class="form-horizontal">
+ <div style="text-align: center; padding-top: 30px;">
+ A <span id="node-dialog-library-save-type"></span> called <span id="node-dialog-library-save-name"></span> already exists. Overwrite?
+ </div>
+ </form>
+</div>
+
+<div id="node-dialog-library-save" class="hide">
+ <form class="form-horizontal">
+ <div class="form-row">
+ <label for="node-dialog-library-save-folder"><i class="fa fa-folder-open"></i> Folder</label>
+ <input type="text" id="node-dialog-library-save-folder" placeholder="Folder">
+ </div>
+ <div class="form-row">
+ <label for="node-dialog-library-save-filename"><i class="fa fa-file"></i> Filename</label>
+ <input type="text" id="node-dialog-library-save-filename" placeholder="Filename">
+ </div>
+ </form>
+</div>
+
+<div id="node-dialog-library-lookup" class="hide">
+ <form class="form-horizontal">
+ <div class="form-row">
+ <ul id="node-dialog-library-breadcrumbs" class="breadcrumb">
+ <li class="active"><a href="#">Library</a></li>
+ </ul>
+ </div>
+ <div class="form-row">
+ <div style="vertical-align: top; display: inline-block; height: 100%; width: 30%; padding-right: 20px;">
+ <div id="node-select-library" style="border: 1px solid #999; width: 100%; height: 100%; overflow:scroll;"><ul></ul></div>
+ </div>
+ <div style="vertical-align: top; display: inline-block;width: 65%; height: 100%;">
+ <div style="height: 100%; width: 95%;" class="node-text-editor" id="node-select-library-text" ></div>
+ </div>
+ </div>
+ </form>
+</div>
+<div id="node-dialog-rename-workspace" class="hide">
+ <form class="form-horizontal">
+ <div class="form-row">
+ <label for="node-input-workspace-name" ><i class="fa fa-tag"></i> Name:</label>
+ <input type="text" id="node-input-workspace-name">
+ </div>
+ </form>
+</div>
+<div id="node-dialog-delete-workspace" class="hide">
+ <form class="form-horizontal">
+ <div style="text-align: center; padding-top: 30px;">
+ Are you sure you want to delete '<span id="node-dialog-delete-workspace-name"></span>'?
+ </div>
+ </form>
+</div>
+<div id="xmldialog" class="hide"></div>
+<div id="filter-tabs-dialog" class="hide"></div>
+<div id="loop-detection-dialog" class="hide"></div>
+<div id="dgnumber-find-dialog" class="hide"></div>
+<div id="search-text-dialog" class="hide"></div>
+<div id="dgstart-generate-xml-dialog" class="hide"></div>
+<div id="update-password-dialog" class="hide"></div>
+<div id="update-configuration-dialog" class="hide"></div>
+<div id="dgflow-browser-dialog" class="hide"></div>
+<div id="codecloud-browser-dialog" class="hide"></div>
+<div id="gitlocal-browser-dialog" class="hide"></div>
+<div id="gitcommands-dialog" class="hide"></div>
+<div id="upload-xml-status-dialog" class="hide"></div>
+<div id="flow-design-err-dialog" class="hide"></div>
+<div id="sli-values-dialog" class="hide"></div>
+<div id="comments-dialog" class="hide"></div>
+<div id="show-errors-dialog" class="hide"></div>
+<div id="yang-upload-dialog" class="hide"></div>
+<div id="yang-modules-browser-dialog" class="hide"></div>
+<div id="list-yang-browser-dialog" class="hide"></div>
+<div id="request-input-dialog" class="hide"></div>
+<script type="text/x-red" data-template-name="export-clipboard-dialog">
+ <div class="form-row">
+ <label for="node-input-export" style="display: block; width:100%;"><i class="fa fa-clipboard"></i> Nodes:</label>
+ <textarea readonly style="font-family: monospace; font-size: 12px; background:rgb(226, 229, 255); padding-left: 0.5em;" class="input-block-level" id="node-input-export" rows="5"></textarea>
+ </div>
+ <div class="form-tips">
+ Select the text above and copy to the clipboard with Ctrl-A Ctrl-C.
+ </div>
+</script>
+<script type="text/x-red" data-template-name="export-library-dialog">
+ <div class="form-row">
+ <label for="node-input-filename" ><i class="fa fa-file"></i> Filename:</label>
+ <input type="text" id="node-input-filename" placeholder="Filename">
+ </div>
+</script>
+<script type="text/x-red" data-template-name="import-dialog">
+ <div class="form-row">
+ <label for="node-input-import"><i class="fa fa-clipboard"></i> Nodes:</label>
+ <textarea style="font-family: monospace; font-size: 12px; background:rgb(226, 229, 255); padding-left: 0.5em;" class="input-block-level" id="node-input-import" rows="5" placeholder="Paste nodes here"></textarea>
+ </div>
+</script>
+
+<script src="jquery/js/jquery-1.11.1.min.js"></script>
+<script src="bootstrap/js/bootstrap.min.js"></script>
+<script src="jquery/js/jquery-ui-1.10.3.custom.min.js"></script>
+<script src="jquery/js/jquery.ui.touch-punch.min.js"></script>
+<script src="orion/built-editor.min.js"></script>
+<script src="d3.v3.min.js"></script>
+
+<script src="red/main.js"></script>
+<script src="red/comms.js"></script>
+<script src="red/ui/state.js"></script>
+<script src="red/nodes.js"></script>
+<script src="red/history.js"></script>
+<script src="red/validators.js"></script>
+<script src="red/ui/menu.js"></script>
+<script src="red/ui/keyboard.js"></script>
+<script src="red/ui/tabs.js"></script>
+<script src="red/ui/view.js"></script>
+<script src="red/ui/sidebar.js"></script>
+<script src="red/ui/palette.js"></script>
+<script src="red/ui/tab-info.js"></script>
+<script src="red/ui/tab-config.js"></script>
+<script src="red/ui/editor.js"></script>
+<script src="red/ui/library.js"></script>
+<script src="red/ui/notifications.js"></script>
+<script src="red/ui/touch/radialMenu.js"></script>
+
+
+<script lang="javascript">
+ $(function() {
+ RED.keyboard.add(/* M */ 77,{ctrl:true},function(){RED.menu.setSelected("btn-node-panel",!RED.menu.isSelected("btn-node-panel"));d3.event.preventDefault();});
+ RED.menu.setSelected("btn-node-panel",true);
+ });
+
+var sliValuesObj = {};
+var rpcValues = {};
+var reqInputValues = {};
+$(function(){
+ $.get("/initialLoadSelectedModules")
+ .done(function( data ) {
+ //console.dir(data);
+ if(data != undefined && data != null){
+ for(var i=0;i<data.sliValuesObj.length;i++){
+ var moduleName = data.sliValuesObj[i].moduleName;
+ //console.dir(data.sliValuesObj[i][ moduleName + '_PROPS']);
+ //console.dir(data.sliValuesObj[i][moduleName + '_RPCS']);
+ sliValuesObj[moduleName] = data.sliValuesObj[i][moduleName + '_PROPS'];
+ rpcValues[moduleName] = data.sliValuesObj[i][ moduleName +'_RPCS'];
+ for(var k=0;rpcValues[moduleName] != undefined && k<rpcValues[moduleName].length;k++){
+ var rpcName = rpcValues[moduleName][k];
+ reqInputValues[moduleName + "_" + rpcName] = data.sliValuesObj[i][rpcName +"-input"];
+ }
+ }
+ }
+
+ })
+ .fail(function(err) {
+ console.dir(err);
+ })
+ .always(function() {
+ });
+});
+
+</script>
+<script>
+ $(document).ready(function() {
+
+var urlPath="/getRelease";
+ $.get(urlPath)
+ .done(function( data ) {
+ //console.dir(data);
+ if(data != undefined && data != null){
+ var release = data.release;
+ //document.title +=" " + release;
+ $("#releaseId").text("Workspace:" + release);
+ $("#releaseId").css({color:'lightgrey'});
+
+ }
+ })
+ .fail(function(err) {
+ })
+ .always(function() {
+ });
+});
+</script>
+</body>
+</html>
diff --git a/dgbuilder/public/index.html.orig b/dgbuilder/public/index.html.orig
new file mode 100644
index 0000000..8141b8a
--- /dev/null
+++ b/dgbuilder/public/index.html.orig
@@ -0,0 +1,247 @@
+<!DOCTYPE html>
+<html>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
+<meta name="apple-mobile-web-app-capable" content="yes">
+<meta name="mobile-web-app-capable" content="yes">
+
+<!--
+ Copyright 2013, 2014 IBM Corp.
+
+ 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.
+-->
+<head>
+<title>Node-RED</title>
+<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
+<link href="jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" media="screen">
+<link rel="stylesheet" type="text/css" href="orion/built-editor.css"/>
+<link rel="stylesheet" type="text/css" href="font-awesome/css/font-awesome.min.css"/>
+<link rel="stylesheet" href="style.css">
+</head>
+<body spellcheck="false">
+<div id="header">
+ <span class="logo"><img src="node-red.png"> <span>Node-RED</span></span>
+ <div class="pull-right">
+ <a id="btn-deploy" class="button action-deploy disabled" href="#"><i id="btn-icn-deploy" class="fa fa-download"></i> Deploy</a>
+ <a id="btn-sidemenu" class="button dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-bars"></i></a>
+ </div>
+</div>
+<div id="main-container" class="sidebar-closed">
+ <div id="palette">
+ <img src="spin.svg" class="palette-spinner"/>
+ <div id="palette-container" class="palette-scroll">
+ </div>
+ <div id="palette-search">
+ <i class="fa fa-search"></i><input id="palette-search-input" type="text" placeholder="filter"><a href="#" id="palette-search-clear"><i class="fa fa-times"></i></a></input>
+ </div>
+ </div><!-- /palette -->
+
+ <div id="workspace">
+ <ul id="workspace-tabs"></ul>
+ <div id="workspace-add-tab"><a id="btn-workspace-add-tab" href="#"><i class="fa fa-plus"></i></a></div>
+ <div id="chart"></div>
+ <div id="workspace-toolbar">
+ <div class="btn-group">
+ <a class="btn btn-small" href="#"><i class="fa fa-search-minus"></i></a>
+ <a class="btn btn-small" href="#"><i class="fa fa-dot-circle-o"></i></a>
+ <a class="btn btn-small" href="#"><i class="fa fa-search-plus"></i></a>
+ </div>
+ </div>
+ </div>
+
+ <div id="chart-zoom-controls">
+ <div class="btn-group">
+ <a class="btn btn-mini" id="btn-zoom-out" href="#"><i class="fa fa-search-minus"></i></a>
+ <a class="btn btn-mini" id="btn-zoom-zero" href="#"><i class="fa fa-dot-circle-o"></i></a>
+ <a class="btn btn-mini" id="btn-zoom-in" href="#"><i class="fa fa-search-plus"></i></a>
+ </div>
+ </div>
+
+ <div id="sidebar">
+ <ul id="sidebar-tabs"></ul>
+ <div id="sidebar-content"></div>
+ </div>
+
+ <div id="sidebar-separator"></div>
+
+</div>
+
+<div id="notifications"></div>
+<div id="dropTarget"><div>Drop the flow here<br/><i class="fa fa-download"></i></div></div>
+
+<div id="dialog" class="hide"><form id="dialog-form" class="form-horizontal"></form></div>
+<div id="node-config-dialog" class="hide"><form id="dialog-config-form" class="form-horizontal"></form><div class="form-tips" id="node-config-dialog-user-count"></div></div>
+
+<div id="node-dialog-confirm-deploy" class="hide">
+ <form class="form-horizontal">
+ <div id="node-dialog-confirm-deploy-config" style="text-align: center; padding-top: 30px;">
+ Some of the nodes are not properly configured. Are you sure you want to deploy?
+ </div>
+ <div id="node-dialog-confirm-deploy-unknown" style="text-align: center; padding-top: 10px;">
+ The workspace contains some unknown node types:
+ <ul style="width: 300px; margin: auto; text-align: left;" id="node-dialog-confirm-deploy-unknown-list"></ul>
+ Are you sure you want to deploy?
+ </div>
+ </form>
+</div>
+
+<div id="node-help" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="node-help-label" aria-hidden="true">
+ <div class="modal-header">
+ <h5 id="node-help-label">Keyboard Shortcuts <span style="float: right;"><a href="http://node-red.github.io/docs" target="_blank">Open help in new window »</a></span></h5>
+ </div>
+ <div class="modal-body">
+ <table>
+ <tr>
+ <td><span class="help-key">?</span></td><td>Help</td>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">a</span></td><td>Select all nodes</td>
+ </tr>
+ <tr>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">Space</span></td><td>Toggle sidebar</td>
+ <td><span class="help-key">Shift</span> <span class="help-key">Click</span></td><td>Select all connected nodes</td>
+ </tr>
+ <tr>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">z</span></td><td>Undo</td>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">Click</span></td><td>Add/remove node from selection</td>
+ </tr>
+ <tr>
+ <td></td><td></td>
+ <td><span class="help-key">Delete</span></td><td>Delete selected nodes or link</td>
+ </tr>
+ <tr>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">x</span></td><td>Cut selected nodes</td>
+ <td></td><td></td>
+ </tr>
+ <tr>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">c</span></td><td>Copy selected nodes</td>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">v</span></td><td>Paste nodes</td>
+ </tr>
+ <tr>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">i</span></td><td>Import nodes</td>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">e</span></td><td>Export selected nodes</td>
+ </tr>
+ <tr>
+ <td colspan="2"></td>
+ </tr>
+ <tr>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">+</span></td><td>Zoom in</td>
+ <td><span class="help-key">Ctrl</span> <span class="help-key">-</span></td><td>Zoom out</td>
+ </tr>
+ </table>
+ </div>
+ <div class="modal-footer">
+ <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
+ </div>
+</div>
+
+<div id="node-dialog-library-save-confirm" class="hide">
+ <form class="form-horizontal">
+ <div style="text-align: center; padding-top: 30px;">
+ A <span id="node-dialog-library-save-type"></span> called <span id="node-dialog-library-save-name"></span> already exists. Overwrite?
+ </div>
+ </form>
+</div>
+
+<div id="node-dialog-library-save" class="hide">
+ <form class="form-horizontal">
+ <div class="form-row">
+ <label for="node-dialog-library-save-folder"><i class="fa fa-folder-open"></i> Folder</label>
+ <input type="text" id="node-dialog-library-save-folder" placeholder="Folder">
+ </div>
+ <div class="form-row">
+ <label for="node-dialog-library-save-filename"><i class="fa fa-file"></i> Filename</label>
+ <input type="text" id="node-dialog-library-save-filename" placeholder="Filename">
+ </div>
+ </form>
+</div>
+
+<div id="node-dialog-library-lookup" class="hide">
+ <form class="form-horizontal">
+ <div class="form-row">
+ <ul id="node-dialog-library-breadcrumbs" class="breadcrumb">
+ <li class="active"><a href="#">Library</a></li>
+ </ul>
+ </div>
+ <div class="form-row">
+ <div style="vertical-align: top; display: inline-block; height: 100%; width: 30%; padding-right: 20px;">
+ <div id="node-select-library" style="border: 1px solid #999; width: 100%; height: 100%; overflow:scroll;"><ul></ul></div>
+ </div>
+ <div style="vertical-align: top; display: inline-block;width: 65%; height: 100%;">
+ <div style="height: 100%; width: 95%;" class="node-text-editor" id="node-select-library-text" ></div>
+ </div>
+ </div>
+ </form>
+</div>
+<div id="node-dialog-rename-workspace" class="hide">
+ <form class="form-horizontal">
+ <div class="form-row">
+ <label for="node-input-workspace-name" ><i class="fa fa-tag"></i> Name:</label>
+ <input type="text" id="node-input-workspace-name">
+ </div>
+ </form>
+</div>
+<div id="node-dialog-delete-workspace" class="hide">
+ <form class="form-horizontal">
+ <div style="text-align: center; padding-top: 30px;">
+ Are you sure you want to delete '<span id="node-dialog-delete-workspace-name"></span>'?
+ </div>
+ </form>
+</div>
+
+<script type="text/x-red" data-template-name="export-clipboard-dialog">
+ <div class="form-row">
+ <label for="node-input-export" style="display: block; width:100%;"><i class="fa fa-clipboard"></i> Nodes:</label>
+ <textarea readonly style="font-family: monospace; font-size: 12px; background:rgb(226, 229, 255); padding-left: 0.5em;" class="input-block-level" id="node-input-export" rows="5"></textarea>
+ </div>
+ <div class="form-tips">
+ Select the text above and copy to the clipboard with Ctrl-A Ctrl-C.
+ </div>
+</script>
+<script type="text/x-red" data-template-name="export-library-dialog">
+ <div class="form-row">
+ <label for="node-input-filename" ><i class="fa fa-file"></i> Filename:</label>
+ <input type="text" id="node-input-filename" placeholder="Filename">
+ </div>
+</script>
+<script type="text/x-red" data-template-name="import-dialog">
+ <div class="form-row">
+ <label for="node-input-import"><i class="fa fa-clipboard"></i> Nodes:</label>
+ <textarea style="font-family: monospace; font-size: 12px; background:rgb(226, 229, 255); padding-left: 0.5em;" class="input-block-level" id="node-input-import" rows="5" placeholder="Paste nodes here"></textarea>
+ </div>
+</script>
+
+<script src="jquery/js/jquery-1.11.1.min.js"></script>
+<script src="bootstrap/js/bootstrap.min.js"></script>
+<script src="jquery/js/jquery-ui-1.10.3.custom.min.js"></script>
+<script src="jquery/js/jquery.ui.touch-punch.min.js"></script>
+<script src="orion/built-editor.min.js"></script>
+<script src="d3.v3.min.js"></script>
+<script src="red/main.js"></script>
+<script src="red/comms.js"></script>
+<script src="red/ui/state.js"></script>
+<script src="red/nodes.js"></script>
+<script src="red/history.js"></script>
+<script src="red/validators.js"></script>
+<script src="red/ui/menu.js"></script>
+<script src="red/ui/keyboard.js"></script>
+<script src="red/ui/tabs.js"></script>
+<script src="red/ui/view.js"></script>
+<script src="red/ui/sidebar.js"></script>
+<script src="red/ui/palette.js"></script>
+<script src="red/ui/tab-info.js"></script>
+<script src="red/ui/tab-config.js"></script>
+<script src="red/ui/editor.js"></script>
+<script src="red/ui/library.js"></script>
+<script src="red/ui/notifications.js"></script>
+<script src="red/ui/touch/radialMenu.js"></script>
+</body>
+</html>
diff --git a/dgbuilder/public/jquery/css/smoothness/images/animated-overlay.gif b/dgbuilder/public/jquery/css/smoothness/images/animated-overlay.gif
new file mode 100644
index 0000000..d441f75
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/animated-overlay.gif
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
new file mode 100644
index 0000000..736b15a
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
new file mode 100644
index 0000000..450d29e
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100644
index 0000000..d1f3621
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100644
index 0000000..a7a6501
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png
new file mode 100644
index 0000000..eadb5fb
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
new file mode 100644
index 0000000..24ae2b7
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
new file mode 100644
index 0000000..c48f520
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
new file mode 100644
index 0000000..f8e7c29
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/images/ui-icons_222222_256x240.png b/dgbuilder/public/jquery/css/smoothness/images/ui-icons_222222_256x240.png
new file mode 100644
index 0000000..c1cb117
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/ui-icons_222222_256x240.png
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png b/dgbuilder/public/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png
new file mode 100644
index 0000000..84b601b
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/images/ui-icons_454545_256x240.png b/dgbuilder/public/jquery/css/smoothness/images/ui-icons_454545_256x240.png
new file mode 100644
index 0000000..b6db1ac
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/ui-icons_454545_256x240.png
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/images/ui-icons_888888_256x240.png b/dgbuilder/public/jquery/css/smoothness/images/ui-icons_888888_256x240.png
new file mode 100644
index 0000000..feea0e2
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/ui-icons_888888_256x240.png
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png b/dgbuilder/public/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png
new file mode 100644
index 0000000..ed5b6b0
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png
Binary files differ
diff --git a/dgbuilder/public/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css b/dgbuilder/public/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css
new file mode 100644
index 0000000..8d0e72c
--- /dev/null
+++ b/dgbuilder/public/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css
@@ -0,0 +1,5 @@
+/*! jQuery UI - v1.10.3 - 2013-08-17
+* http://jqueryui.com
+* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css
+* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
+* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:0}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:400}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:400;margin:-1px}.ui-menu .ui-state-disabled{font-weight:400;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url(images/animated-overlay.gif);height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:0;background:0;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:0;border-bottom:0;border-right:0}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
\ No newline at end of file
diff --git a/dgbuilder/public/jquery/js/jquery-1.11.1.min.js b/dgbuilder/public/jquery/js/jquery-1.11.1.min.js
new file mode 100644
index 0000000..ab28a24
--- /dev/null
+++ b/dgbuilder/public/jquery/js/jquery-1.11.1.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
+if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"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 null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.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]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.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=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,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||(m.cssNumber[c]?"":"px")
+},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,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):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],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 kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.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){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
diff --git a/dgbuilder/public/jquery/js/jquery-ui-1.10.3.custom.min.js b/dgbuilder/public/jquery/js/jquery-ui-1.10.3.custom.min.js
new file mode 100644
index 0000000..491cda7
--- /dev/null
+++ b/dgbuilder/public/jquery/js/jquery-ui-1.10.3.custom.min.js
@@ -0,0 +1,7 @@
+/*! jQuery UI - v1.10.3 - 2013-08-17
+* http://jqueryui.com
+* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js
+* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
+
+(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,m,g,v,b,_=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),x=(e.collision||"flip").split(" "),k={};return b=n(_),_[0].preventDefault&&(e.at="left top"),p=b.width,m=b.height,g=b.offset,v=t.extend({},g),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),k[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=m:"center"===e.at[1]&&(v.top+=m/2),a=i(k.at,p,m),v.left+=a[0],v.top+=a[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),b=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,T=d+b+s(this,"marginBottom")+w.height,C=t.extend({},v),M=i(k.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?C.left-=u:"center"===e.my[0]&&(C.left-=u/2),"bottom"===e.my[1]?C.top-=d:"center"===e.my[1]&&(C.top-=d/2),C.left+=M[0],C.top+=M[1],t.support.offsetFractions||(C.left=h(C.left),C.top=h(C.top)),n={marginLeft:f,marginTop:b},t.each(["left","top"],function(i,s){t.ui.position[x[i]]&&t.ui.position[x[i]][s](C,{targetWidth:p,targetHeight:m,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:T,offset:[a[0]+M[0],a[1]+M[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=g.left-C.left,s=i+p-u,n=g.top-C.top,a=n+m-d,h={target:{element:_,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:C.left,top:C.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>m&&m>r(n+a)&&(h.vertical="middle"),h.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(C,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-o-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-o-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-o-a,t.top+p+f+m>c&&(0>s||r(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,t.top+p+f+m>u&&(i>0||u>r(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){e("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||e.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,e(document).width()-this.helperProportions.width-this.margins.left,(e(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(t){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=t.pageX,l=t.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var s=e(this).data("ui-draggable"),n=s.options,a=e.extend({},i,{item:s.element});s.sortables=[],e(n.connectToSortable).each(function(){var i=e.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,a))})},stop:function(t,i){var s=e(this).data("ui-draggable"),n=e.extend({},i,{item:s.element});e.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,n))})},drag:function(t,i){var s=e(this).data("ui-draggable"),n=this;e.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,e.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",t),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",t),s.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._opacity&&e(i.helper).css("opacity",s._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-e(document).scrollTop()<s.scrollSensitivity?n=e(document).scrollTop(e(document).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<s.scrollSensitivity&&(n=e(document).scrollTop(e(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-e(document).scrollLeft()<s.scrollSensitivity?n=e(document).scrollLeft(e(document).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<s.scrollSensitivity&&(n=e(document).scrollLeft(e(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("ui-draggable"),i=t.options;t.snapElements=[],e(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=e(this),s=i.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(t,i){var s,n,a,o,r,h,l,u,c,d,p=e(this).data("ui-draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.width,b=i.offset.top,y=b+p.helperProportions.height;for(c=p.snapElements.length-1;c>=0;c--)r=p.snapElements[c].left,h=r+p.snapElements[c].width,l=p.snapElements[c].top,u=l+p.snapElements[c].height,r-m>v||g>h+m||l-m>y||b>u+m||!e.contains(p.snapElements[c].item.ownerDocument,p.snapElements[c].item)?(p.snapElements[c].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(s=m>=Math.abs(l-y),n=m>=Math.abs(u-b),a=m>=Math.abs(r-v),o=m>=Math.abs(h-g),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||a||o,"outer"!==f.snapMode&&(s=m>=Math.abs(l-b),n=m>=Math.abs(u-y),a=m>=Math.abs(r-g),o=m>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[c].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=s||n||a||o||d)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,i=this.data("ui-draggable").options,s=e.makeArray(e(i.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});s.length&&(t=parseInt(e(s[0]).css("zIndex"),10)||0,e(s).each(function(i){e(this).css("zIndex",t+i)}),this.css("zIndex",t+s.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._zIndex&&e(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(e){function t(e,t,i){return e>t&&t+i>e}e.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,i=t.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,i=e.ui.ddmanager.droppables[this.options.scope];i.length>t;t++)i[t]===this&&i.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){"accept"===t&&(this.accept=e.isFunction(i)?i:function(e){return e.is(i)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"ui-droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope===s.options.scope&&t.accept.call(t.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(e,i,s){if(!i.offset)return!1;var n,a,o=(e.positionAbs||e.position.absolute).left,r=o+e.helperProportions.width,h=(e.positionAbs||e.position.absolute).top,l=h+e.helperProportions.height,u=i.offset.left,c=u+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return o>=u&&c>=r&&h>=d&&p>=l;case"intersect":return o+e.helperProportions.width/2>u&&c>r-e.helperProportions.width/2&&h+e.helperProportions.height/2>d&&p>l-e.helperProportions.height/2;case"pointer":return n=(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,a=(e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,t(a,d,i.proportions.height)&&t(n,u,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(o>=u&&c>=o||r>=u&&c>=r||u>o&&r>c);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions.height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions={width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight})}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e.data(this,"ui-droppable").options.scope===n}),a.length&&(s=e.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}}})(jQuery);(function(e){function t(e){return parseInt(e,10)||0}function i(e){return!isNaN(parseInt(e,10))}e.widget("ui.resizable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=e(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=t(this.helper.css("left")),n=t(this.helper.css("top")),o.containment&&(s+=e(o.containment).scrollLeft()||0,n+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(t){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,u=this.size.height,c=t.pageX-a.left||0,d=t.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[t,c,d]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==u&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(n)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&e.ui.hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),i(e.left)&&(this.position.left=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,s=this.size,n=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===n&&(e.left=t.left+(s.width-e.width),e.top=null),"nw"===n&&(e.top=t.top+(s.height-e.height),e.left=t.left+(s.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,s=this.axis,n=i(e.width)&&t.maxWidth&&t.maxWidth<e.width,a=i(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=i(e.width)&&t.minWidth&&t.minWidth>e.width,r=i(e.height)&&t.minHeight&&t.minHeight>e.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,u=/sw|nw|w/.test(s),c=/nw|ne|n/.test(s);return o&&(e.width=t.minWidth),r&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),a&&(e.height=t.maxHeight),o&&u&&(e.left=h-t.minWidth),n&&u&&(e.left=h-t.maxWidth),r&&c&&(e.top=l-t.minHeight),a&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,i,s,n,a=this.helper||this.element;for(e=0;this._proportionallyResizeElements.length>e;e++){if(n=this._proportionallyResizeElements[e],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],t=0;i.length>t;t++)this.borderDif[t]=(parseInt(i[t],10)||0)+(parseInt(s[t],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&e.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=e(this).data("ui-resizable"),u=l.options,c=l.element,d=u.containment,p=d instanceof e?d.get(0):/parent/.test(d)?c.parent().get(0):d;p&&(l.containerElement=e(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(i=e(p),s=[],e(["Top","Right","Left","Bottom"]).each(function(e,n){s[e]=t(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=e.ui.hasScroll(p,"left")?p.scrollWidth:o,h=e.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(t){var i,s,n,a,o=e(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,c={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(c=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-c.left),u&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-c.left:o.offset.left-c.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-c.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=o.parentData.left),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)})},resize:function(t,i){var s=e(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(t,s){e(t).each(function(){var t=e(this),n=e(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var i=(n[t]||0)+(r[t]||0);i&&i>=0&&(a[t]=i||null)}),t.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):e.each(n.alsoResize,function(e,t){h(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size,n=t.originalSize,a=t.originalPosition,o=t.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,u=Math.round((s.width-n.width)/h)*h,c=Math.round((s.height-n.height)/l)*l,d=n.width+u,p=n.height+c,f=i.maxWidth&&d>i.maxWidth,m=i.maxHeight&&p>i.maxHeight,g=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,g&&(d+=h),v&&(p+=l),f&&(d-=h),m&&(p-=l),/^(se|s|e)$/.test(o)?(t.size.width=d,t.size.height=p):/^(ne)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.top=a.top-c):/^(sw)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.left=a.left-u):(t.size.width=d,t.size.height=p,t.position.top=a.top-c,t.position.left=a.left-u)}})})(jQuery);(function(e){e.widget("ui.selectable",e.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,"selectable-item");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=t.pageX,h=t.pageY;return a>r&&(i=r,r=a,a=i),o>h&&(i=h,h=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:h-o}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,a.widgetName+"-item")===a?(s=t(this),!1):undefined}),t.data(e.target,a.widgetName+"-item")===a&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=t("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(e.pageY-t(document).scrollTop()<o.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<o.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+o.scrollSpeed)),e.pageX-t(document).scrollLeft()<o.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<o.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+o.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=t.left,o=a+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>a&&o>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,a=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return n?this.floating?o&&"right"===o||"down"===a?2:1:a&&("down"===a?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return this.floating&&a?"right"===a&&s||"left"===a&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,a,o=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&r.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){o.push(this)});return t(o)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(u.push([t.isFunction(a.options.items)?a.options.items.call(a.element[0],e,{item:this.currentItem}):t(a.options.items,a.element),a]),this.containers.push(a));for(i=u.length-1;i>=0;i--)for(o=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",o),c.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td> </td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,a,o,r,h,l,c,u,d,p,f=null,m=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],m=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",s,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(o=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],a=this.items.length-1;a>=0;a--)t.contains(this.containers[m].element[0],this.items[a].item[0])&&this.items[a].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[a].top,this.items[a].height))&&(u=this.items[a].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[a][l]-c)&&(d=!0,u+=this.items[a][l]),o>Math.abs(u-c)&&(o=Math.abs(u-c),r=this.items[a],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[m].element,!0),this._trigger("change",s,this._uiHash()),this.containers[m]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",s,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,a=e.pageX,o=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery);(function(t){var e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),undefined):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e),undefined)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),a=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(t(e.target).attr("tabIndex",-1),t(a).attr("tabIndex",0),a.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightStyle,a=this.element.parent(),o=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),a=n.attr("id");s||(s=o+"-header-"+e,i.attr("id",s)),a||(a=o+"-panel-"+e,n.attr("id",a)),i.attr("aria-controls",a),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(i=a.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?t():n,newPanel:r};e.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,n){var a,o,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(o=d),o=o||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(a=t.show().outerHeight(),e.animate(i,{duration:r,easing:o,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(s,{duration:r,easing:o,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(a-e.outerHeight()-l),l=0)}}),undefined):e.animate(i,r,o,p):t.animate(s,r,o,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})})(jQuery);(function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var a=t.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:e=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case a.UP:e=!0,this._keyEvent("previous",n);break;case a.DOWN:e=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})})(jQuery);(function(t){var e,i,s,n,a="ui-button ui-widget ui-state-default ui-corner-all",o="ui-state-hover ui-state-active ",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var o=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(a).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){o.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){o.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||o.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),o.buttonElement.attr("aria-pressed","true");var e=o.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,o.document.one("mouseup",function(){e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(a+" "+o+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):a.push("ui-button-text-only"),e.addClass(a.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(a.inline?e.parent()[0]:a.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var a,r="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,a;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),a=this._newInst(t(e),n),a.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,a):n&&this._inlineDatepicker(e,a)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,r,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,a,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[o?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(a?t("<img/>").attr({src:a,alt:n,title:n}):n)),e[o?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,a=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},a.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),t.input.attr("size",this._formatDate(t,a).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,a,o){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],r,p)),n(p.settings,a||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,r);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,r),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,a){var r,o,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(r=s||{},"string"==typeof s&&(r={},r[s]=a),c&&(this._curInst===c&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,r),null!==h&&r.dateFormat!==e&&r.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&r.dateFormat!==e&&r.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,o),this._updateAlternate(c),this._updateDatepicker(c)),e)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,a=t.datepicker._getInst(e.target),r=!0,o=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),r=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",a.dpDiv),n[0]&&t.datepicker._selectDay(e.target,a.selectedMonth,a.selectedYear,n[0]),i=t.datepicker._get(a,"onSelect"),i?(s=t.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),r=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),r=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),r=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),r=e.ctrlKey||e.metaKey;break;default:r=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):r=!1;r&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var s,n,a=t.datepicker._getInst(i.target);return t.datepicker._get(a,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(a,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,a,r,o,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),a=s?s.apply(e,[e,i]):{},a!==!1&&(n(i.settings,a),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),o={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),o=t.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,a=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],r=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",r*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),a=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-r:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+o?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+o):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,a,o=this._curInst;!o||e&&o!==t.data(e,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){t.datepicker._tidyDialog(o)},t.effects&&(t.effects.effect[i]||t.effects[i])?o.dpDiv.hide(i,t.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(e,i,s,n){var a,r=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(a=this._getInst(r[0]),a.selectedDay=a.currentDay=t("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(e,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,a=this._get(e,"altField");a&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(a).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var a,r,o,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,m=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,v=-1,_=-1,b=-1,y=!1,x=function(t){var e=i.length>a+1&&i.charAt(a+1)===t;return e&&a++,e},k=function(t){var e=x(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),a=s.substring(l).match(n);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},w=function(i,n,a){var r=-1,o=t.map(x(i)?a:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(o,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(r=i[0],l+=n.length,!1):e}),-1!==r)return r+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(a))throw"Unexpected literal at position "+l;l++};for(a=0;i.length>a;a++)if(y)"'"!==i.charAt(a)||x("'")?D():y=!1;else switch(i.charAt(a)){case"d":_=k("d");break;case"D":w("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=w("M",f,m);break;case"y":g=k("y");break;case"@":h=new Date(k("@")),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":x("'")?D():y=!0;break;default:D()}if(s.length>l&&(o=s.substr(l),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=g?0:-100)),b>-1)for(v=1,_=b;;){if(r=this._getDaysInMonth(g,v-1),r>=_)break;v++,_-=r}if(h=this._daylightSavingAdjust(new Date(g,v-1,_)),h.getFullYear()!==g||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,a);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),r,o);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),a=n,r=this._getFormatConfig(t);try{a=this.parseDate(i,s,r)||n}catch(o){s=e?"":s}t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),t.currentDay=s?a.getDate():0,t.currentMonth=s?a.getMonth():0,t.currentYear=s?a.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},a=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,a=n.getFullYear(),r=n.getMonth(),o=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":o+=parseInt(l[1],10);break;case"w":case"W":o+=7*parseInt(l[1],10);break;case"m":case"M":r+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r));break;case"y":case"Y":a+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r))}l=h.exec(i)}return new Date(a,r,o)},r=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?s:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,a=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),n===t.selectedMonth&&a===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,a,r,o,h,l,c,u,d,p,f,m,g,v,_,b,y,x,k,w,D,T,C,M,S,N,I,P,A,z,H,E,F,O,W,j,R=new Date,L=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),J=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),Q=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),U=this._get(t,"stepMonths"),q=1!==Q[0]||1!==Q[1],X=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),$=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),$)for(e=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-Q[0]*Q[1]+1,$.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-U,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":J?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+U,1)),this._getFormatConfig(t)):n,a=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":J?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",r=this._get(t,"currentText"),o=this._get(t,"gotoCurrent")&&t.currentDay?X:L,r=K?this.formatDate(r,o,this._getFormatConfig(t)):r,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;Q[0]>k;k++){for(w="",this.maxRows=4,D=0;Q[1]>D;D++){if(T=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),C=" ui-corner-all",M="",q){if(M+="<div class='ui-datepicker-group",Q[1]>1)switch(D){case 0:M+=" ui-datepicker-group-first",C=" ui-corner-"+(Y?"right":"left");break;case Q[1]-1:M+=" ui-datepicker-group-last",C=" ui-corner-"+(Y?"left":"right");break;default:M+=" ui-datepicker-group-middle",C=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+C+"'>"+(/all|left/.test(C)&&0===k?Y?a:s:"")+(/all|right/.test(C)&&0===k?Y?s:a:"")+this._generateMonthYearHeader(t,Z,te,G,$,k>0||D>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",S=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",x=0;7>x;x++)N=(x+c)%7,S+="<th"+((x+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[N]+"'>"+p[N]+"</span></th>";for(M+=S+"</tr></thead><tbody>",I=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,I)),P=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((P+I)/7),z=q?this.maxRows>A?this.maxRows:A:A,this.maxRows=z,H=this._daylightSavingAdjust(new Date(te,Z,1-P)),E=0;z>E;E++){for(M+="<tr>",F=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(H)+"</td>":"",x=0;7>x;x++)O=g?g.apply(t.input?t.input[0]:null,[H]):[!0,""],W=H.getMonth()!==Z,j=W&&!_||!O[0]||G&&G>H||$&&H>$,F+="<td class='"+((x+c+6)%7>=5?" ui-datepicker-week-end":"")+(W?" ui-datepicker-other-month":"")+(H.getTime()===T.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===H.getTime()&&b.getTime()===T.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(W&&!v?"":" "+O[1]+(H.getTime()===X.getTime()?" "+this._currentClass:"")+(H.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(W&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"'")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+H.getMonth()+"' data-year='"+H.getFullYear()+"'")+">"+(W&&!v?" ":j?"<span class='ui-state-default'>"+H.getDate()+"</span>":"<a class='ui-state-default"+(H.getTime()===L.getTime()?" ui-state-highlight":"")+(H.getTime()===X.getTime()?" ui-state-active":"")+(W?" ui-priority-secondary":"")+"' href='#'>"+H.getDate()+"</a>")+"</td>",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);M+=F+"</tr>"}Z++,Z>11&&(Z=0,te++),M+="</tbody></table>"+(q?"</div>"+(Q[0]>0&&D===Q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),w+=M}y+=w}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,a,r,o){var h,l,c,u,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(a||!g)y+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+o[c]+"</option>");y+="</select>"}if(_||(b+=y+(!a&&g&&v?"":" ")),!t.yearshtml)if(t.yearshtml="",a||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);
+return isNaN(e)?d:e},f=p(u[0]),m=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!a&&g&&v?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),a=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,a)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),a=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(t,a)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),a=this._getMinMaxDate(t,"max"),r=null,o=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=s),i[1].match(/[+\-].*/)&&(o+=s)),(!n||e.getTime()>=n.getTime())&&(!a||e.getTime()<=a.getTime())&&(!r||e.getFullYear()>=r)&&(!o||o>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"})(jQuery);(function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html(" "),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(t.each(i,function(i,s){var n,a;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(a).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,a){s.position=[a.position.left-i.document.scrollLeft(),a.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(a))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,a){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(a))}}).css("position",a)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,a=!1,o={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(a=!0),t in i&&(o[t]=s)}),a&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})})(jQuery);(function(t){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})})(jQuery);(function(t,e){t.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,h,l,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),h=a.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-a.width()/2,top:e.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i,!0))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](u,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery);(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>▲</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>▼</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery);(function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(a,""))===decodeURIComponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),u=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),u&&l.data("ui-tabs-aria-controls",u),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),u={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,u))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})})(jQuery);(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,a=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=a),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function a(t){l.of=t,o.is(":hidden")||o.position(l)}var o,r,h,l=t.extend({},this.options.position);if(n){if(o=this._find(s),o.length)return o.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),o=this._tooltip(s),e(s,o.attr("id")),o.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:a}),a(i)):o.position(t.extend({of:s},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){o.is(":visible")&&(a(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:o}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(o)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),a=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),a.stop(!0),this._hide(a,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:a}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[c[l].cache]=o[c[l].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,o,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,h],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),a=c[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],l=s[a],c=u[n.type]||{};null!==l&&(null===o?h[a]=l:(c.mod&&(l-o>c.mod/2?o+=c.mod:o-l>c.mod/2&&(o-=c.mod)),h[a]=i((l-o)*e+o,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[o]=d,n):l(d)},f(a,function(e,i){l.fn[e]||(l.fn[e]=function(n){var a,o=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=l(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var h=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",m=i.test(u),g={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),a=t.effects.createWrapper(h).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,g[p]=v?o:0,m||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),g[f]=v?r:o+r),v&&(a.css(p,0),m||a.css(f,r+o)),a.animate(g,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(o,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),m=e.duration/f,g=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,m,g)),l&&(d/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,m,g).animate(a,m,g),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(o,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[d](),l&&(n.css(d,0),n.css(p,a/2)),f[d]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),m||p.hide(),i()}var a,o,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(h=g.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=g.left+o*v,l=o-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(m?l*v:0),top:h+(m?c*_:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:c*_),opacity:m?1:0},e.duration||500,e.easing,s)}})(jQuery);(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery);(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],m=e.duration/2,g={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),g[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(g,m,e.easing).animate(v,m,e.easing,function(){l&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}})(jQuery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery);(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,h=o||"hide"===a,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,m=e.scale||"both",g=e.origin||["middle","center"],v=o.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.y,o.from),o.to=t.effects.setTransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.x,o.from),o.to=t.effects.setTransition(o,d,a.to.x,o.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(l),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=t.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===m||"both"===m)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,u,a.from.y,i.from),i.to=t.effects.setTransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,d,a.from.x,i.from),i.to=t.effects.setTransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,m[d]=(p?"+=":"-=")+2*h,g[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s++)n.animate(m,u,e.easing).animate(g,u,e.easing);n.animate(m,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jQuery);
\ No newline at end of file
diff --git a/dgbuilder/public/jquery/js/jquery.ui.touch-punch.min.js b/dgbuilder/public/jquery/js/jquery.ui.touch-punch.min.js
new file mode 100644
index 0000000..31272ce
--- /dev/null
+++ b/dgbuilder/public/jquery/js/jquery.ui.touch-punch.min.js
@@ -0,0 +1,11 @@
+/*!
+ * jQuery UI Touch Punch 0.2.3
+ *
+ * Copyright 2011–2014, Dave Furfero
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ * jquery.ui.mouse.js
+ */
+!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);
\ No newline at end of file
diff --git a/dgbuilder/public/node-red.png b/dgbuilder/public/node-red.png
new file mode 100644
index 0000000..a60c267
--- /dev/null
+++ b/dgbuilder/public/node-red.png
Binary files differ
diff --git a/dgbuilder/public/orion/built-editor.css b/dgbuilder/public/orion/built-editor.css
new file mode 100644
index 0000000..0204578
--- /dev/null
+++ b/dgbuilder/public/orion/built-editor.css
@@ -0,0 +1,526 @@
+.textview {
+ background-color: white;
+ font-family: "Consolas", "Monaco", "Vera Mono", "monospace";
+ font-size: 10pt;
+ min-width: 50px;
+ min-height: 50px;
+}
+.textviewScroll {
+ padding: 1px 2px;
+}
+.textviewContent {
+ cursor: auto;
+}
+.textviewLeftRuler {
+ border-right: 1px solid #eaeaea;
+}
+.textviewRightRuler {
+ border-left: 1px solid #eaeaea;
+}
+.textviewMarginRuler {
+ border-left: 1px solid #eaeaea;
+}
+.textviewBlockCursor {
+ background: black;
+ opacity: 0.4;
+}
+.ruler {
+}
+.ruler.annotations {
+ width: 16px;
+}
+.ruler.folding {
+ width: 14px;
+}
+.ruler.lines {
+ text-align: right;
+}
+.ruler.overview {
+ width: 14px;
+}
+.rulerLines {
+ color: silver;
+}
+.rulerLines.even
+.rulerLines.odd {
+}
+.tooltipTheme.textview {
+ background-color: InfoBackground !important;
+ color: InfoText !important;
+}
+.tooltipTheme .textviewScroll {
+ padding: 0px;
+}
+.textviewTooltip {
+ font-family: "Consolas", "Monaco", "Vera Mono", "monospace";
+ font-size: 10pt;
+ background-color: InfoBackground;
+ color: InfoText;
+ padding: 2px;
+ border-radius: 4px;
+ border: 1px solid black;
+ z-index: 100;
+ position: fixed;
+ overflow: hidden;
+}
+.textviewTooltip em {
+ font-style: normal;
+ font-weight: bold;
+}
+.textviewTooltip span {
+ vertical-align: baseline;
+}
+.textviewTooltip .tooltipRow {
+ display: table-row;
+}
+.textviewTooltip .tooltipTitle {
+ float: right;
+}
+.tooltipTheme .annotationLine.currentLine {
+ background-color: transparent !important;
+}
+.contentassist {
+ font-size:9pt;
+ display: none;
+ background-color: white;
+ position: fixed;
+ top: 100px;
+ left: 100px;
+ z-index:100;
+ cursor: default;
+ min-width: 70px;
+ max-width: 350px;
+ max-height: 170px;
+ overflow: hidden;
+ white-space: nowrap;
+ border-radius: 5px;
+ box-shadow: rgba(0, 0, 0, 0.3) 2px 2px 10px;
+ line-height: 18px;
+}
+.contentassist:focus {
+ outline: none;
+}
+.contentassist:hover {
+ overflow-y: auto;
+}
+.contentassist .proposal-emphasis {
+ font-weight: normal;
+}
+.contentassist hr{
+ border: 0;
+ height: 0;
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.3);
+}
+.contentassist .proposal-noemphasis-keyword {
+ background-color: aliceblue;
+ color: #CC4C07;
+ font-weight: bold;
+}
+.contentassist .proposal-noemphasis {
+ background-color: aliceblue;
+ font-weight: lighter;
+ color: black;
+}
+.contentassist .proposal-noemphasis-title-keywords {
+ background-color: aliceblue;
+ color: grey;
+}
+.contentassist .proposal-noemphasis-title {
+ background-color: aliceblue;
+ color: grey;
+ padding-top: 5px;
+}
+.contentassist .proposal-noemphasis-title::before {
+ content: "- ";
+}
+.contentassist .proposal-noemphasis-title::after {
+ content: " -";
+}
+.contentassist .proposal-default {
+
+}
+.contentassist .proposal-name {
+ font-weight: bold;
+}
+.contentassist > div:hover {
+ background-color: #fab467;
+ background: linear-gradient(#fabb76, #e1a25c);
+ border-radius: 3px;
+}
+.contentassist>div.proposal-hr:hover {
+ background-color: white;
+ background: none;
+}
+.contentassist .selected {
+ background-color: rgb(48, 135, 179);
+ background: linear-gradient(rgb(60, 150, 190), rgb(30, 120, 160));
+ border-radius: 3px;
+ color: white;
+}
+.contentassist .cloneProposal {
+ box-shadow: rgba(0, 0, 0, 0.9) 2px 2px 8px;
+ position: fixed;
+ z-index: 1000;
+}
+.contentassist>div {
+ padding: 1px 3px 1px 5px;
+}
+.cloneWrapper {
+ display: block;
+ overflow: visible;
+ z-index: 1000;
+}
+.contentassist.cloneWrapper:hover {
+ overflow: visible;
+}
+.comment.block.documentation, .comment-block-documentation {
+ color: #00008F;
+}
+.comment {
+ color: #3C802C;
+}
+.constant.character.entity, .constant-character-entity {
+ font-style: normal;
+}
+.constant {
+ color: blue;
+}
+.entity.name.function, .entity.name.type, .entity-name-function, .entity-name-type {
+ font-weight: bold;
+}
+.entity.name.tag, .entity-name-tag {
+ color: #CC4C07;
+}
+.entity.other.attribute.name, .entity-other-attribute-name {
+ color: #3C802C;
+}
+.entity {
+ color: #3f7f7f;
+}
+.invalid.illegal, .invalid-illegal {
+ color: white;
+ background-color: red;
+}
+.invalid.deprecated, .invalid-deprecated {
+ text-decoration: line-through;
+}
+.invalid {
+ color: red;
+ font-weight: bold;
+}
+.keyword.other.documentation.markup {
+ color: #7F7F9F;
+}
+.keyword.other.documentation {
+ color: #7F9FBF;
+}
+.keyword.operator, .keyword-operator {
+ color: #ddd;
+}
+.keyword {
+ color: #CC4C07;
+ font-weight: bold;
+}
+.markup.heading, .markup-heading {
+ font-weight: bold;
+}
+.markup.quote, .markup-quote {
+ font-style: italic;
+}
+.meta.annotation.currentLine {
+ background-color: #EAF2FE;
+}
+.meta.tag {
+ color: #3f7f7f;
+}
+.punctuation.definition.comment, .punctuation-definition-comment {
+ color: #3f5fbf;
+}
+.punctuation.definition.string, .punctuation-definition-string {
+ color: blue;
+}
+.punctuation.separator.space {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABVJREFUCNdj3L17938GBgYGJgYoAAAxOAM004kASgAAAABJRU5ErkJggg==");
+ background-repeat: no-repeat;
+ background-position: center center;
+}
+.punctuation.separator.tab {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAFCAYAAABmWJ3mAAAAAXNSR0IArs4c6QAAABtJREFUCNdj2L17938GKEBmYwgQJ0m8IAMDAwDemh/hgxuOkwAAAABJRU5ErkJggg==");
+ background-repeat: no-repeat;
+ background-position: left center;
+}
+.storage {
+ color: #7F0055;
+}
+.string {
+ color: #446fbd;
+}
+.support {
+ color: #21439c;
+}
+.variable.parameter, .variable-parameter {
+ color: black;
+}
+.variable.language, .variable-language {
+ color: #7F0055;
+ font-weight: bold;
+}
+.variable {
+ color: #0000c0;
+}
+.cm-meta { color: #00008F; }
+.cm-keyword { font-weight: bold; color: #7F0055; }
+.cm-atom { color: #21439c; }
+.cm-number { color: black; }
+.cm-def { color: green; }
+.cm-variable { color: black; }
+.cm-variable-2 { color: #004080; }
+.cm-variable-3 { color: #004080; }
+.cm-property { color: black; }
+.cm-operator { color: #222; }
+.cm-comment { color: green; }
+.cm-string { color: blue; }
+.cm-error { color: #ff0000; }
+.cm-qualifier { color: gray; }
+.cm-builtin { color: #7F0055; }
+.cm-bracket { color: white; background-color: gray; }
+.cm-tag { color: #3f7f7f; }
+.cm-attribute { color: #7f007f; }
+.annotation {
+}
+.annotation.error,
+.annotation.warning,
+.annotation.task,
+.annotation.bookmark,
+.annotation.breakpoint,
+.annotation.collapsed,
+.annotation.expanded,
+.annotation.currentBracket,
+.annotation.matchingBracket,
+.annotation.currentLine,
+.annotation.matchingSearch,
+.annotation.currentSearch,
+.annotation.readOccurrence,
+.annotation.writeOccurrence,
+.annotation.linkedGroup,
+.annotation.currentLinkedGroup,
+.annotation.selectedLinkedGroup {
+}
+.annotation.blame {
+ color: gray;
+ background-color: rgb(255, 132, 44);
+}
+.annotation.currentBlame {
+ color: black;
+ background-color: rgb(184, 103, 163);
+}
+.annotationHTML {
+ cursor: pointer;
+ width: 16px;
+ height: 16px;
+ display: inline-block;
+ vertical-align: middle;
+ background-position: center;
+ background-repeat: no-repeat;
+}
+.annotationHTML.error {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjNGNTlDOUMxMUVDNDExRTM4NDU4RjQ3Q0I3NkI4OTBDIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjNGNTlDOUMyMUVDNDExRTM4NDU4RjQ3Q0I3NkI4OTBDIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6M0Y1OUM5QkYxRUM0MTFFMzg0NThGNDdDQjc2Qjg5MEMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6M0Y1OUM5QzAxRUM0MTFFMzg0NThGNDdDQjc2Qjg5MEMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4Be44kAAAAqklEQVR42mL8//8/AyWAiYFCQLEBLNgEX+aURgGpAiA2gAqdB+KJ4lO6l6GrZUQPA6DmqUAqC4eF04CGZOP0AtRmkOZ/QHwLSeoWVCwLqgZnGORD6TtA7ArEp6DYFSqGrAZrGBhCaTUgXg3EoVD+aqgYshraRON5JD+HQm2GueQWmhqsBkyE0ipAvBuIzaB4N1QMWQ11opERW16ARlU+UoARn5CGXmYCCDAAPz09iI0KJ9QAAAAASUVORK5CYII=");
+}
+.annotationHTML.warning {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkREMTE1OUNDMUVDMjExRTM4NDU4RjQ3Q0I3NkI4OTBDIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkREMTE1OUNEMUVDMjExRTM4NDU4RjQ3Q0I3NkI4OTBDIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6REQxMTU5Q0ExRUMyMTFFMzg0NThGNDdDQjc2Qjg5MEMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6REQxMTU5Q0IxRUMyMTFFMzg0NThGNDdDQjc2Qjg5MEMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4Kzt/qAAAA0ElEQVR42mL8//8/AyWAiYFCQLEBLLgkfl8obARSZUD8HYiLWQ3652NTx4gtDICao4HUbCDeBRVyBmI3oCHHCRoA1MwOpO4A8V+gBgWo2AMg9QaITYFi/wl5IRaIZYD4K1AjI8gSIBYBYnkg9gLirYQCMRdKc0M1KUDZIFCM1wtAG02B1Ckk+WlQSzKQxLSA3riOywUpaHxHILZHE8vA54VQNL4XFCODaHyB+B6IBZH4s7CE0Ud8LvCHhsFfKN8VihmgYqegavAnpKGVmQACDACxJDv3vmRk+gAAAABJRU5ErkJggg==");
+}
+.annotationHTML.task {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjdEMjg0RkI2MUVFMzExRTM4NDU4RjQ3Q0I3NkI4OTBDIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjdEMjg0RkI3MUVFMzExRTM4NDU4RjQ3Q0I3NkI4OTBDIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6N0QyODRGQjQxRUUzMTFFMzg0NThGNDdDQjc2Qjg5MEMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6N0QyODRGQjUxRUUzMTFFMzg0NThGNDdDQjc2Qjg5MEMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6Utm8RAAAAl0lEQVR42mL8//8/AyWAiYFCQLEBLMicqtVRRPmnLXQZIzkuuEuJF04BsTEQ15JjAEizGxB/AmJpYgz4DsTLoewrQOwJ9PNHID0ViDPwBiIURAPxBqjm2UDN74CB2wFkZxKMBSioAOJ9QI1t0JgBaS4nKhqhwAyIdwE1ugLpLHyacRkAM+QcECtTkhKViYlfxqGfmQACDAAjXCa0hW/NdQAAAABJRU5ErkJggg==");
+}
+.annotationHTML.bookmark {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjdEMjg0RkIyMUVFMzExRTM4NDU4RjQ3Q0I3NkI4OTBDIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjdEMjg0RkIzMUVFMzExRTM4NDU4RjQ3Q0I3NkI4OTBDIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6N0QyODRGQjAxRUUzMTFFMzg0NThGNDdDQjc2Qjg5MEMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6N0QyODRGQjExRUUzMTFFMzg0NThGNDdDQjc2Qjg5MEMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz54SgjJAAAAuUlEQVR42mL8//8/AyWAiYFCQFsDWrdcMAViY3xqWAhYEADEv4H4LLle8IVinIARORaAzpUHiUG5qkC8C8p2AOKHQPwDhKt9DD7gcoEREJ8H4vtImkHgAFTsKhB743QB1BWyQGo+EDujGb4JiNOBtr/AawDUEH0gdQFNWBGo+QGxgRgEpV8C8SsoO4KUWAAZsAeIDYBYB4g3A3EUwViAOl8Falsb0Mn/kMRTQYYCxe4TDIOhlZkAAgwAunFAhB2QB2cAAAAASUVORK5CYII=");
+}
+.annotationHTML.breakpoint {
+
+ background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAFheoFxkoFxnpmt0pmZxpnF7rYyWwmJwpnaFs3aDrWt8rXGBrYycwmZ3mXuNs42cu77F03GIs3aJrYGVu2J5oKCuxeDj6LK/03GLrYieu3aIoIygu6m4zcLN3MTM1m6Rs2aLriRgkSZilXGXtoGcs7LD0QBLhSZikihol3ScubrO2Yaqu5q4xpO0wpm7yabF0ZO9yaXI0r3X3tHj6P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADQALAAAAAAQABAAAAafQJpwSCwWLYZBIDAwWIw0A+FFpW6aRUPCxe1yE4ahhdCCxWSzmSwGgxGeUceKpUqhUCkVa7UK0wgkJCUjJoUmIyWBBEIEGhoeJ4YmJx6OAUIADQ0QIZIhEJoAQgEUFBUgkiAVpZdRCxIPFx8iIh8XDw4FfhYHDhgZHB0dHBkYEwdwUQoTEc3OEwp+QwYHCBMMDBMIB9JESAJLAk5Q5EVBADs=");
+}
+.annotationHTML.collapsed {
+
+ width: 14px;
+ height: 14px;
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWBJREFUeNpi/P//PwMlgImBQkCxASzoAp++fo+6de+Z+fXbD/Jev/nAICoiwKCpqrBBTUlqNR835zJ09YzIYfDxy7eo/cevLmXlYGNQUJAEahZieP3mHcODB08Zfv/4w+BoqR3Nz8O1DKcXzt94HPqXmZlBU1+LgZNfkMHazIOBA0hr6uswgMTP33gYijcMLlx/EMAnLs7w7sc/hg9AG0HgPZB+B8S84hJA+UcBeMPg+at3DJIMnAxZzt5wsUhnXzDdsmIVWB6vAcLCfAys3z4wzN64huEfkJ/uH8IwexOQDQymD2/fgeXxekFLRWHD51evGDhZGRi4WSFSnCwgNjB2Xr1m0AbK4zXAQkdhNdPf3wx3r91g+PruLcOqnasYvn54x3Dv2k0G5r+/GMyB8nijEQTefvoadeH6w9Cbtx8GvH//kUFQkJ9BQ1V+g76m/GphPu5lBA0YenmBYgMAAgwA34GIKjmLxOUAAAAASUVORK5CYII=");
+}
+.annotationHTML.expanded {
+
+ width: 14px;
+ height: 14px;
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAT5JREFUeNrUksFKw0AURW+mTWw67SSEiG209U90r4jddFO34l+5U0HdZCHiFwiCOz9AlMSmGEpMOqk1TWJSFGyFbATR2dyZd+Dw3mOENE3xkyP8PYHrBT3OX7uW43ZefA6FUaw1dJPSyrmu1k8KBYOh37Od4XFZLEPXFdRrFMGIw3U9TKMYqw1tb0VjcxLy9eEF425CCIxWE5JcxSQGxCyNloG87gXhwWIHc4J767lTZQw8ShFGSZbxRyaQmZJxd3NRUJ6ffwQNEi6PzG/L2tjdmvFCgcKqKL2F2Olu43MzggDka+IjPuOFI7Sbujn2fUglYKkkzFIi+R0I/QDrGS8UqDX5QkhiOHYfE84hkhSTkGNgOyDJFCzjhYLTq+vDtrG8r1LZtB6fcHtzB+uhD5VWzLx+lvF/8JV/XfAuwADsrJbMGG4l4AAAAABJRU5ErkJggg==");
+}
+.annotationHTML.multiple {
+
+ background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAOdpa+yJiuFYXOFYXeBYXONwded8f+NwdmhwkHB4iPr7/ezx+fP2+2h4kOzy+Wh4iPr8/gCBwTaczjaXyjaYyjaXyTaYyfr8/QCMzQCMzACHxzao2jal2Dak1zag03iAgI/Ckn64fZrHmX+4fZLCianPopPCiarOoqbLlafLlbnXq7nWq6fLlMTcsoCIeJCQcIiIeKCYaJiQcO16ee16evGVlfGWlfahn/ahoPWhn/WhoPe1tP///////wAAAAAAACH5BAEAAD0ALAAAAAAQABAAAAaRwJ5wSCwaj8WYcslcDmObaDTGq1Zjzw4mk+FQIRcFTzaUeTRoj4zHaI+HL0lkLnnxFgsH7zWEWSoTFBMwVlUwQy6JMDCJjYwuQx8tk5MfOzk4OjcfkSssKCkqHzY0MzQ1nEIJJSYkJCcJAQCzAQlDDyIjISMiCQYEAgMGD0MNIMfHDQUHBc3EQgjR0tPSSNY9QQA7");
+}
+.annotationHTML.overlay {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJEAQvB2JVdrAAAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAAD1JREFUCNdtjkESADAEAzemf69f66HMqGlOIhYiFRFRtSQBWAY7mzx+EDTL6sSgb1jTk7Q87rxyqe37fXsAa78gLyZnRgEAAAAASUVORK5CYII=");
+ background-position: right bottom;
+ position: relative;
+ top: -16px;
+}
+.annotationHTML.currentBracket {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sLEBULCGQmEKAAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAnklEQVQ4y7VTsRHDIBATJg1HCUzAHEzFBExAzwZsRMkE9gifKhc72ODYibr/+xcnoQdugq0LAujEwmbn0UxQh4OxpjX1XgshwFqLnPM5PQTQGlprWpbl3RhJ/CSQUm7qPYLp7i8cEpRSoJT6ju0lIaVEQgiKMQ4lHHpQayVjzHWCn5jIOcc8z9dMBADvPZxz3SC1tzCI8vgWdvL+VzwB8JSj2GFTyxIAAAAASUVORK5CYII=");
+}
+.annotationHTML.matchingBracket {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sLEBUMAsuyb3kAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAoklEQVQ4y61TsQ3EIAw80DcI0USKGIApWIsB2IGGKbJPugxBR3VfvfRRCOSTvw7LPuPzGXgI8f0gwAsFu5rXIYMdDiEOIdnKW5YFzjnEGH+bhwA/KKVwmibu0BhRnpEZY1BrHTaVT7fQJZjnGeu63tOAJFNKVEox53yqQZfAWstt27oidgm01ve3UEqBaBjnspG89wgh3LiFgZXHt3Dh23/FGxKViehm0X85AAAAAElFTkSuQmCC");
+}
+.annotationHTML.currentLine {
+
+ background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQAALxe0bNWzbdZzrlb0KpPx61RybBTy6VLxadNxZGctIeUroyYsG92hHyMqIKRq2l9nmyAoHGDonaIpStXj6q80k1aXf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABYALAAAAAAQABAAAAVCoCWOZGmeKDql5ppOMGXBk/zOoltSNO6XrlXwxIPNYiMGq8SoLC2MaNPygEQkDYdikUg6LQcEoWAICAaA5HPNLoUAADs=");
+}
+.annotationHTML.matchingSearch {
+
+ background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAALClrLu1ubOpsKqdp6eapKufqMTAw7attLSrsrGnr62jq8C7v765vaebpb22vLmyuMbCxsnGycfEx8G+wcrIysTBxUltof//yf///v70jergpPvws+nWc/npqvrpqvrpq/raffffnvXVkfTVkvXUkd+9f+SiOemvV+uyXa2OX7mYZqeIXKuNX/ClO7KQYqiIXJ59Vp19VpFvTo9uTZBvTpNyUJNyUf///////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADgALAAAAAAQABAAAAZ4QJxwSCwajS2aS1U6DlunzcagcuKgG4sn5HJiLZ2QiHbEbj6hEapVTKVYr3OItG5TIhVGLF0npigUEAsPAjV9Q24pEhMBCAoybEUmGRcrDgcAAzNGkxcYNzAJBQSbRJ0YqBc2DaVEHJ6pGTStRBqfGBcZILRWvThBADs=");
+}
+.annotationHTML.currentSearch {
+
+ background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAALClrLu1ubOpsKqdp6eapKufqMTAw7attLSrsrGnr62jq8C7v765vaebpb22vLmyuMbCxsnGycfEx8G+wcrIysTBxUltof//yf///v70jergpPvws+nWc/npqvrpqvrpq/raffffnvXVkfTVkvXUkd+9f+SiOemvV+uyXa2OX7mYZqeIXKuNX/ClO7KQYqiIXJ59Vp19VpFvTo9uTZBvTpNyUJNyUf///////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADgALAAAAAAQABAAAAZ4QJxwSCwajS2aS1U6DlunzcagcuKgG4sn5HJiLZ2QiHbEbj6hEapVTKVYr3OItG5TIhVGLF0npigUEAsPAjV9Q24pEhMBCAoybEUmGRcrDgcAAzNGkxcYNzAJBQSbRJ0YqBc2DaVEHJ6pGTStRBqfGBcZILRWvThBADs=");
+}
+.annotationHTML.readOccurrence {
+
+ background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAP3ykf3zn/7lIv7kI/fbI/7nRf7scLe0oMXDtfXXHsG4gaKdgOXBF+rIJqKdhaijjNWxHeLBL6GafLuYJpmQcvvdg5OHZpyRcJ+UdLavm4+BXqGWeYZ1TYx7VZ6QcJ2NbI+Ebv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACEALAAAAAAQABAAAAZewJBwSCwaj0KMBFlULphDJwIakh6gGckCcXgyLxjuYol0PA6YMQbZqFAOhw/Gc2wHABaJhAMy2gEGBRoSHRtFf4ECDRpGERV3iQ0TRwyQBQSSRAmbAwEMnxAQClRQQQA7");
+}
+.annotationHTML.writeOccurrence {
+
+ background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAP3ykf3zn/7lIv7kI/fbI/7nRf7scLe0oMXDtfXXHsG4gaKdgOXBF+rIJqKdhaijjNWxHeLBL6GafLuYJpmQcvvdg5OHZpyRcJ+UdLavm4+BXqGWeYZ1TYx7VZ6QcJ2NbI+Ebv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACEALAAAAAAQABAAAAZewJBwSCwaj0KMBFlULphDJwIakh6gGckCcXgyLxjuYol0PA6YMQbZqFAOhw/Gc2wHABaJhAMy2gEGBRoSHRtFf4ECDRpGERV3iQ0TRwyQBQSSRAmbAwEMnxAQClRQQQA7");
+}
+.annotationHTML.blame {
+ float: left;
+}
+.annotationHTML.currentBlame {
+ float: left;
+}
+.annotationHTML.blame.single {
+ width: 32px;
+ height: 32px;
+}
+.annotationHTML.currentBlame.single {
+ width: 32px;
+ height: 32px;
+}
+.annotationOverview {
+ cursor: pointer;
+ border-radius: 2px;
+ left: 2px;
+ width: 8px;
+}
+.annotationOverview.task {
+ background-color: #93bb7a;
+ border: 1px solid #79aa59;
+}
+.annotationOverview.breakpoint {
+ background-color: lightblue;
+ border: 1px solid blue;
+}
+.annotationOverview.bookmark {
+ background-color: #84b3cf;
+ border: 1px solid #9cc2d8;
+}
+.annotationOverview.error {
+ background-color: #EFA1A7;
+ border: 1px solid #ec8a91;
+}
+.annotationOverview.warning {
+ background-color: #fce1a9;
+ border: 1px solid #face70;
+}
+.annotationOverview.currentBracket {
+ background-color: lightgray;
+ border: 1px solid red;
+}
+.annotationOverview.matchingBracket {
+ background-color: #ff7f7f;
+ border: 1px solid #ff3232;
+}
+.annotationOverview.currentLine {
+ background-color: #f8a852;
+ border: 1px solid #f79327;
+}
+.annotationOverview.matchingSearch {
+background-color: #C3E1FF;
+border: 1px solid #afcae5;
+}
+.annotationOverview.currentSearch {
+ background-color: #53D1FF;
+ border: 1px solid #42a7cc;
+}
+.annotationOverview.readOccurrence {
+ background-color: lightgray;
+ border: 1px solid black;
+}
+.annotationOverview.writeOccurrence {
+ background-color: Gold;
+ border: 1px solid darkred;
+}
+.annotationOverview.currentBlame {
+ background-color: rgb(184, 103, 163);
+ border: 1px solid black;
+}
+.annotationRange {
+ background-repeat: repeat-x;
+ background-position: left bottom;
+}
+.annotationRange.task {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sLDhEoIrb7JmcAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAGUlEQVQI12NggIH/DGdhDCM45z/DfyiBAADgdQjGhI/4DAAAAABJRU5ErkJggg==");
+}
+.annotationRange.breakpoint {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sLDhEqHTKradgAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAIklEQVQI11XJMQ0AMAzAMGMafwrFlD19+sUKIJTFo9k+B/kQ+Qr2bIVKOgAAAABJRU5ErkJggg==");
+}
+.annotationRange.bookmark {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
+}
+.annotationRange.error {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==");
+}
+.annotationRange.warning {
+
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
+}
+.annotationRange.currentBracket {
+}
+.annotationRange.matchingBracket {
+ outline: 1px solid red;
+}
+.annotationRange.readOccurrence {
+ background-color: lightgray;
+}
+.annotationRange.writeOccurrence {
+ background-color: yellow;
+}
+.annotationRange.matchingSearch {
+ background-color: #C3E1FF;
+}
+.annotationRange.currentSearch {
+ background-color: #53D1FF;
+}
+.annotationRange.linkedGroup {
+ outline: 1px solid grey;
+}
+.annotationRange.currentLinkedGroup {
+ background-color: #C3E1FF;
+}
+.annotationRange.selectedLinkedGroup {
+ background-color: #53D1FF;
+}
+.annotationLine {
+}
+.annotationLine.currentLine {
+ background-color: #EAF2FE;
+}
diff --git a/dgbuilder/public/orion/built-editor.min.js b/dgbuilder/public/orion/built-editor.min.js
new file mode 100644
index 0000000..b7d1209
--- /dev/null
+++ b/dgbuilder/public/orion/built-editor.min.js
@@ -0,0 +1,1081 @@
+/*
+
+ Copyright (c) 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2010, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ Felipe Heidrich (IBM Corporation) - initial API and implementation
+ Silenio Quarti (IBM Corporation) - initial API and implementation
+
+ Copyright (c) 2010, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ Felipe Heidrich (IBM Corporation) - initial API and implementation
+ Silenio Quarti (IBM Corporation) - initial API and implementation
+
+ Copyright (c) 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2010, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ Felipe Heidrich (IBM Corporation) - initial API and implementation
+ Silenio Quarti (IBM Corporation) - initial API and implementation
+
+ Copyright (c) 2010, 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ Felipe Heidrich (IBM Corporation) - initial API and implementation
+ Silenio Quarti (IBM Corporation) - initial API and implementation
+
+ Copyright (c) 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+
+ Copyright (c) 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+
+ Copyright (c) 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2010, 2014 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ Felipe Heidrich (IBM Corporation) - initial API and implementation
+ Silenio Quarti (IBM Corporation) - initial API and implementation
+ Mihai Sucan (Mozilla Foundation) - fix for Bug#334583 Bug#348471 Bug#349485 Bug#350595 Bug#360726 Bug#361180 Bug#362835 Bug#362428 Bug#362286 Bug#354270 Bug#361474 Bug#363945 Bug#366312 Bug#370584
+
+ Copyright (c) 2010, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ Felipe Heidrich (IBM Corporation) - initial API and implementation
+ Silenio Quarti (IBM Corporation) - initial API and implementation
+
+ Copyright (c) 2010, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ Felipe Heidrich (IBM Corporation) - initial API and implementation
+ Silenio Quarti (IBM Corporation) - initial API and implementation
+
+ Copyright (c) 2010, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2010, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2010, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2010, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ Felipe Heidrich (IBM Corporation) - initial API and implementation
+ Silenio Quarti (IBM Corporation) - initial API and implementation
+
+ Copyright (c) 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2009, 2014 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+
+ Copyright (c) 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+
+ Copyright (c) 2010, 2014 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+
+ Copyright (c) 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+
+ Copyright (c) 2011, 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+
+ Copyright (c) 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2011, 2014 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+
+ Copyright (c) 2014 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2014 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2011, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+
+ Copyright (c) 2011, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+
+ Copyright (c) 2014 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2011, 2014 IBM Corporation and others.
+ Copyright (c) 2012 VMware, Inc.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+ Andrew Eisenberg - rename to jsTemplateContentAssist.js
+
+ Copyright (c) 2011, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2011, 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+
+ Copyright (c) 2011, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2011, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2010, 2012 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+ Alex Lakatos - fix for bug#369781
+
+ Copyright (c) 2014 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2014 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2014 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors: IBM Corporation - initial API and implementation
+
+ Copyright (c) 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+ RequireJS i18n 2.0.2 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
+ Available via the MIT or new BSD license.
+ see: http://github.com/requirejs/i18n for details
+
+ Copyright (c) 2011, 2013 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+*/
+var requirejs,require,define;
+(function(k){function m(a,b){var e,j,w,x,f,l,c,d,o,g=b&&b.split("/"),h=q.map,p=h&&h["*"]||{};if(a&&a.charAt(0)===".")if(b){g=g.slice(0,g.length-1);a=g.concat(a.split("/"));for(d=0;d<a.length;d+=1)if(e=a[d],e===".")a.splice(d,1),d-=1;else if(e==="..")if(d===1&&(a[2]===".."||a[0]===".."))break;else d>0&&(a.splice(d-1,2),d-=2);a=a.join("/")}else a.indexOf("./")===0&&(a=a.substring(2));if((g||p)&&h){e=a.split("/");for(d=e.length;d>0;d-=1){j=e.slice(0,d).join("/");if(g)for(o=g.length;o>0;o-=1)if(w=h[g.slice(0,
+o).join("/")])if(w=w[j]){x=w;f=d;break}if(x)break;!l&&p&&p[j]&&(l=p[j],c=d)}!x&&l&&(x=l,f=c);x&&(e.splice(0,f,x),a=e.join("/"))}return a}function n(a,e){return function(){return b.apply(k,t.call(arguments,0).concat([a,e]))}}function i(a){return function(b){return m(b,a)}}function c(a){return function(b){l[a]=b}}function d(a){if(p.call(o,a)){var b=o[a];delete o[a];r[a]=!0;h.apply(k,b)}if(!p.call(l,a)&&!p.call(r,a))throw Error("No "+a);return l[a]}function f(a){var b,e=a?a.indexOf("!"):-1;e>-1&&(b=
+a.substring(0,e),a=a.substring(e+1,a.length));return[b,a]}function g(a){return function(){return q&&q.config&&q.config[a]||{}}}var h,b,a,e,l={},o={},q={},r={},p=Object.prototype.hasOwnProperty,t=[].slice;a=function(a,b){var e,j=f(a),w=j[0],a=j[1];w&&(w=m(w,b),e=d(w));w?a=e&&e.normalize?e.normalize(a,i(b)):m(a,b):(a=m(a,b),j=f(a),w=j[0],a=j[1],w&&(e=d(w)));return{f:w?w+"!"+a:a,n:a,pr:w,p:e}};e={require:function(a){return n(a)},exports:function(a){var b=l[a];return typeof b!=="undefined"?b:l[a]={}},
+module:function(a){return{id:a,uri:"",exports:l[a],config:g(a)}}};h=function(b,f,g,j){var w,x,D,y,h=[],q,j=j||b;if(typeof g==="function"){f=!f.length&&g.length?["require","exports","module"]:f;for(y=0;y<f.length;y+=1)if(D=a(f[y],j),x=D.f,x==="require")h[y]=e.require(b);else if(x==="exports")h[y]=e.exports(b),q=!0;else if(x==="module")w=h[y]=e.module(b);else if(p.call(l,x)||p.call(o,x)||p.call(r,x))h[y]=d(x);else if(D.p)D.p.load(D.n,n(j,!0),c(x),{}),h[y]=l[x];else throw Error(b+" missing "+x);f=g.apply(l[b],
+h);if(b)if(w&&w.exports!==k&&w.exports!==l[b])l[b]=w.exports;else if(f!==k||!q)l[b]=f}else b&&(l[b]=g)};requirejs=require=b=function(f,l,c,j,w){if(typeof f==="string")return e[f]?e[f](l):d(a(f,l).f);else f.splice||(q=f,l.splice?(f=l,l=c,c=null):f=k);l=l||function(){};typeof c==="function"&&(c=j,j=w);j?h(k,f,l,c):setTimeout(function(){h(k,f,l,c)},4);return b};b.config=function(a){q=a;return b};define=function(a,b,e){b.splice||(e=b,b=[]);!p.call(l,a)&&!p.call(o,a)&&(o[a]=[a,b,e])};define.amd={jQuery:!0}})();
+define("almond",function(){});
+define("orion/editor/shim",[],function(){if(!Object.create)Object.create=function(k,m){function n(){}n.prototype=k;var i=new n;if(m)for(var c in m)m.hasOwnProperty(c)&&(i[c]=m[c].hasOwnProperty("value")?m[c].value:function(){if(arguments.length>0)return m[c].get();else m[c].set(arguments)});return i};if(!Object.keys)Object.keys=function(k){var m=[],n;for(n in k)k.hasOwnProperty(n)&&m.push(n);return m};if(!Function.prototype.bind)Function.prototype.bind=function(k){var m=this,n=Array.prototype.slice.call(arguments,
+1);return n.length?function(){return arguments.length?m.apply(k,n.concat(Array.prototype.slice.call(arguments))):m.apply(k,n)}:function(){return arguments.length?m.apply(k,arguments):m.call(k)}};if(!Array.isArray)Array.isArray=function(k){return Object.prototype.toString.call(k)==="[object Array]"};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(k){for(var m=0;m<this.length;m++)if(this[m]===k)return m;return-1};if(!Array.prototype.forEach)Array.prototype.forEach=function(k){for(var m=
+0;m<this.length;m++)k(this[m],m)};if(!Array.prototype.map)Array.prototype.map=function(k){for(var m=Array(this.length),n=0;n<this.length;n++)m[n]=k(this[n]);return m};if(!Array.prototype.reduce)Array.prototype.reduce=function(k,m){var n,i=!1;1<arguments.length&&(n=m,i=!0);for(var c=0;this.length>c;++c)i?n=k(n,this[c],c,this):(n=this[c],i=!0);return n};if(!String.prototype.trim)String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};if(!String.prototype.trimLeft)String.prototype.trimLeft=
+function(){return this.replace(/^\s+/g,"")};if(!String.prototype.trimRight)String.prototype.trimRight=function(){return this.replace(/\s+$/g,"")};return{}});
+(function(){function k(c,d,f,g,h,b){d[c]&&(f.push(c),(d[c]===!0||d[c]===1)&&g.push(h+c+"/"+b))}function m(c,d,f,g,h){d=g+d+"/"+h;require._fileExists(c.toUrl(d+".js"))&&f.push(d)}function n(c,d,f){for(var g in d)d.hasOwnProperty(g)&&(!c.hasOwnProperty(g)||f)?c[g]=d[g]:typeof d[g]==="object"&&n(c[g],d[g],f)}var i=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(c){var d=c.config?c.config():{};return{version:"2.0.1+",load:function(f,c,h,b){b=b||{};if(b.locale)d.locale=b.locale;
+var a=i.exec(f),e=a[1],l=a[4],o=a[5],q=l.split("-"),r=[],p={},t,v="";if(a[5])e=a[1],f=e+o;else{o=a[4];l=d.locale;if(!l)l=d.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase();q=l.split("-")}if(b.isBuild){r.push(f);m(c,"root",r,e,o);for(t=0;t<q.length;t++)b=q[t],v+=(v?"-":"")+b,m(c,v,r,e,o);c(r,function(){h()})}else c([f],function(a){var b=[],j;k("root",a,b,r,e,o);for(t=0;t<q.length;t++)j=q[t],v+=(v?"-":"")+j,k(v,a,b,r,e,o);c(r,function(){var j,
+x,f;for(j=b.length-1;j>-1&&b[j];j--){f=b[j];x=a[f];if(x===!0||x===1)x=c(e+f+"/"+o);n(p,x)}h(p)})})}}})})();define("orion/editor/i18n",{load:function(k,m,n){m.specified&&m.specified("orion/bootstrap")?m(["orion/i18n!"+k],function(i){n(i)}):n({})}});
+define("orion/editor/nls/root/messages",{multipleAnnotations:"Multiple annotations:",line:"Line: ${0}",breakpoint:"Breakpoint",bookmark:"Bookmark",task:"Task",error:"Error",warning:"Warning",matchingSearch:"Matching Search",currentSearch:"Current Search",currentLine:"Current Line",matchingBracket:"Matching Bracket",currentBracket:"Current Bracket",lineUp:"Line Up",lineDown:"Line Down",lineStart:"Line Start",lineEnd:"Line End",charPrevious:"Previous Character",charNext:"Next Character",pageUp:"Page Up",
+pageDown:"Page Down",scrollPageUp:"Scroll Page Up",scrollPageDown:"Scroll Page Down",scrollLineUp:"Scroll Line Up",scrollLineDown:"Scroll Line Down",wordPrevious:"Previous Word",wordNext:"Next Word",textStart:"Document Start",textEnd:"Document End",scrollTextStart:"Scroll Document Start",scrollTextEnd:"Scroll Document End",centerLine:"Center Line",selectLineUp:"Select Line Up",selectLineDown:"Select Line Down",selectWholeLineUp:" Select Whole Line Up",selectWholeLineDown:"Select Whole Line Down",
+selectLineStart:"Select Line Start",selectLineEnd:"Select Line End",selectCharPrevious:"Select Previous Character",selectCharNext:"Select Next Character",selectPageUp:"Select Page Up",selectPageDown:"Select Page Down",selectWordPrevious:"Select Previous Word",selectWordNext:"Select Next Word",selectTextStart:"Select Document Start",selectTextEnd:"Select Document End",deletePrevious:"Delete Previous Character",deleteNext:"Delete Next Character",deleteWordPrevious:"Delete Previous Word",deleteWordNext:"Delete Next Word",
+deleteLineStart:"Delete Line Start",deleteLineEnd:"Delete Line End",tab:"Insert Tab",enter:"Insert Line Delimiter",enterNoCursor:"Insert Line Delimiter",selectAll:"Select All",copy:"Copy",cut:"Cut",paste:"Paste",uppercase:"To Upper Case",lowercase:"To Lower Case",capitalize:"Capitalize",reversecase:"Reverse Case",toggleWrapMode:"Toggle Wrap Mode",toggleTabMode:"Toggle Tab Mode",toggleOverwriteMode:"Toggle Overwrite Mode",committerOnTime:"${0} on ${1}",emacs:"Emacs",exchangeMarkPoint:"Exchange Mark and Point",
+setMarkCommand:"Set Mark",clearMark:"Clear Mark",digitArgument:"Digit Argument ${0}",negativeArgument:"Negative Argument",Comment:"Comment","Flat outline":"Flat outline",incrementalFindStr:"Incremental find: ${0}",incrementalFindStrNotFound:"Incremental find: ${0} (not found)",incrementalFindReverseStr:"Reverse Incremental find: ${0}",incrementalFindReverseStrNotFound:"Reverse Incremental find: ${0} (not found)",find:"Find...",undo:"Undo",redo:"Redo",cancelMode:"Cancel Current Mode",findNext:"Find Next Occurrence",
+findPrevious:"Find Previous Occurrence",incrementalFind:"Incremental Find",incrementalFindReverse:"Incremental Find Reverse",indentLines:"Indent Lines",unindentLines:"Unindent Lines",moveLinesUp:"Move Lines Up",moveLinesDown:"Move Lines Down",copyLinesUp:"Copy Lines Up",copyLinesDown:"Copy Lines Down",deleteLines:"Delete Lines",gotoLine:"Goto Line...",gotoLinePrompty:"Goto Line:",nextAnnotation:"Next Annotation",prevAnnotation:"Previous Annotation",expand:"Expand",collapse:"Collapse",expandAll:"Expand All",
+collapseAll:"Collapse All",lastEdit:"Last Edit Location",trimTrailingWhitespaces:"Trim Trailing Whitespaces",toggleLineComment:"Toggle Line Comment",addBlockComment:"Add Block Comment",removeBlockComment:"Remove Block Comment",linkedModeEntered:"Linked Mode entered",linkedModeExited:"Linked Mode exited",syntaxError:"Syntax Error",contentAssist:"Content Assist",lineColumn:"Line ${0} : Col ${1}",vi:"vi",vimove:"(Move)",viyank:"(Yank)",videlete:"(Delete)",vichange:"(Change)",viLeft:"${0} Left",viRight:"${0} Right",
+viUp:"${0} Up",viDown:"${0} Down",viw:"${0} Next Word",vib:"${0} Beginning of Word",viW:"${0} Next Word (ws stop)",viB:"${0} Beginning of Word (ws stop)",vie:"${0} End of Word",viE:"${0} End of Word (ws stop)",vi$:"${0} End of the line","vi^_":"${0} First non-blank Char Current Line","vi+":"${0} First Char Next Line","vi-":"${0} First Char Previous Line","vi|":"${0} nth Column in Line",viH:"${0} Top of Page",viM:"${0} Middle of Page",viL:"${0} Bottom of Page","vi/":"${0} Search Forward","vi?":"${0} Search Backward",
+vin:"${0} Next Search",viN:"${0} Previous Search",vif:"${0} Search Char Fwd",viF:"${0} Search Char Bckwd",vit:"${0} Search Before Char Fwd",viT:"${0} Search Before Char Bckwd","vi,":"${0} Repeat Reverse Char Search","vi;":"${0} Repeat Char Search",viG:"${0} Go to Line",viycd:"${0} Current Line",via:"Append After Cursor",viA:"Append to End of Line",vii:"Insert Before Cursor",viI:"Insert at Beginning of Line",viO:"Insert Line Above",vio:"Insert Line Below",viR:"Begin Overwriting Text",vis:"Substitute a Character",
+viS:"Substitute Entire Line",viC:"Change Text Until Line End",vip:"Paste After Char or Line",viP:"Paste Before Char or Line",viStar:"Search Word Under Cursor",replaceAll:"Replacing all...",replacedMatches:"Replaced ${0} matches",nothingReplaced:"Nothing replaced",notFound:"Not found"});
+define("orion/editor/nls/messages",["orion/editor/i18n!orion/editor/nls/messages","orion/editor/nls/root/messages"],function(k,m){var n={root:m},i;for(i in k)k.hasOwnProperty(i)&&typeof n[i]==="undefined"&&(n[i]=k[i]);return n});
+define("orion/editor/eventTarget",[],function(){function k(){}k.addMixin=function(m){var n=k.prototype,i;for(i in n)n.hasOwnProperty(i)&&(m[i]=n[i])};k.prototype={addEventListener:function(k,n,i){if(!this._eventTypes)this._eventTypes={};var c=this._eventTypes[k];c||(c=this._eventTypes[k]={level:0,listeners:[]});c.listeners.push({listener:n,useCapture:i})},dispatchEvent:function(k){var n=k.type;this._dispatchEvent("pre"+n,k);this._dispatchEvent(n,k);this._dispatchEvent("post"+n,k)},_dispatchEvent:function(k,
+n){var i=this._eventTypes?this._eventTypes[k]:null;if(i){var c=i.listeners;try{if(i.level++,c)for(var d=0,f=c.length;d<f;d++)if(c[d]){var g=c[d].listener;typeof g==="function"?g.call(this,n):g.handleEvent&&typeof g.handleEvent==="function"&&g.handleEvent(n)}}finally{if(i.level--,i.compact&&i.level===0){for(d=c.length-1;d>=0;d--)c[d]||c.splice(d,1);c.length===0&&delete this._eventTypes[k];i.compact=!1}}}},isListening:function(k){return!this._eventTypes?!1:this._eventTypes[k]!==void 0},removeEventListener:function(k,
+n,i){if(this._eventTypes){var c=this._eventTypes[k];if(c){for(var d=c.listeners,f=0,g=d.length;f<g;f++){var h=d[f];if(h&&h.listener===n&&h.useCapture===i){c.level!==0?(d[f]=null,c.compact=!0):d.splice(f,1);break}}d.length===0&&delete this._eventTypes[k]}}}};return{EventTarget:k}});define("orion/regex",[],function(){return{escape:function(k){return k.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(k){return(k=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(k))?{pattern:k[1],flags:k[2]}:null}}});
+define("orion/util",[],function(){var k=navigator.userAgent,m=k.indexOf("MSIE")!==-1||k.indexOf("Trident")!==-1?document.documentMode:void 0,n=parseFloat(k.split("Firefox/")[1]||k.split("Minefield/")[1])||void 0,i=k.indexOf("Opera")!==-1?parseFloat(k.split("Version/")[1]):void 0,c=parseFloat(k.split("Chrome/")[1])||void 0,d=k.indexOf("Safari")!==-1&&!c,f=parseFloat(k.split("WebKit/")[1])||void 0,g=k.indexOf("Android")!==-1,h=k.indexOf("iPad")!==-1,k=k.indexOf("iPhone")!==-1,b=h||k,a=navigator.platform.indexOf("Mac")!==
+-1,e=navigator.platform.indexOf("Win")!==-1,l=navigator.platform.indexOf("Linux")!==-1;return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,e){return b[(e<<0)+1]})},createElement:function(a,b){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",b):a.createElement(b)},isIE:m,isFirefox:n,isOpera:i,isChrome:c,isSafari:d,isWebkit:f,isAndroid:g,isIPad:h,isIPhone:k,isIOS:b,isMac:a,isWindows:e,isLinux:l,platformDelimiter:e?"\r\n":"\n"}});
+define("orion/editor/textModel",["orion/editor/eventTarget","orion/regex","orion/util"],function(k,m,n){function i(c,d){this._lastLineIndex=-1;this._text=[""];this._lineOffsets=[0];this.setText(c);this.setLineDelimiter(d)}i.prototype={destroy:function(){},find:function(c){if(this._text.length>1)this._text=[this._text.join("")];var d=c.string,f=c.regex,g=d,h="",b=c.caseInsensitive;if(g)if(f){if(d=m.parse(g))g=d.pattern,h=d.flags}else g=d.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&"),b&&(g=g.replace(/[iI\u0130\u0131]/g,
+"[Ii\u0130\u0131]"));var a=null,e;if(g){var d=c.reverse,l=c.wrap,f=c.wholeWord,o=c.start||0,c=c.end,q=c!==null&&c!==void 0;h.indexOf("g")===-1&&(h+="g");h.indexOf("m")===-1&&(h+="m");b&&h.indexOf("i")===-1&&(h+="i");f&&(g="\\b"+g+"\\b");var i=this._text[0],p,t,v=0;q&&(b=o<c?o:c,i=i.substring(b,o<c?c:o),v=b);var s=RegExp(g,h);if(d)e=function(){var a=null;for(s.lastIndex=0;;){t=s.lastIndex;p=s.exec(i);if(t===s.lastIndex)return null;if(p){if(!(p.index+v<o)){if(!l||a)break;o=i.length+v}a={start:p.index+
+v,end:s.lastIndex+v}}else break}if(a)o=a.start;return a};else{if(!q)s.lastIndex=o;e=function(){for(;;){t=s.lastIndex;p=s.exec(i);if(t===s.lastIndex)break;if(p)return{start:p.index+v,end:s.lastIndex+v};if(!(t!==0&&l))break}return null}}a=e()}return{next:function(){var b=a;b&&(a=e());return b},hasNext:function(){return a!==null}}},getCharCount:function(){for(var c=0,d=0;d<this._text.length;d++)c+=this._text[d].length;return c},getLine:function(c,d){var f=this.getLineCount();if(!(0<=c&&c<f))return null;
+var g=this._lineOffsets[c];if(c+1<f){f=this.getText(g,this._lineOffsets[c+1]);if(d)return f;for(var g=f.length,h;(h=f.charCodeAt(g-1))===10||h===13;)g--;return f.substring(0,g)}else return this.getText(g)},getLineAtOffset:function(c){var d=this.getCharCount();if(!(0<=c&&c<=d))return-1;var f=this.getLineCount();if(c===d)return f-1;var g,h,b=this._lastLineIndex;if(0<=b&&b<f&&(g=this._lineOffsets[b],h=b+1<f?this._lineOffsets[b+1]:d,g<=c&&c<h))return b;for(var a=f,e=-1;a-e>1;)if(b=Math.floor((a+e)/2),
+g=this._lineOffsets[b],h=b+1<f?this._lineOffsets[b+1]:d,c<=g)a=b;else if(c<h){a=b;break}else e=b;return this._lastLineIndex=a},getLineCount:function(){return this._lineOffsets.length},getLineDelimiter:function(){return this._lineDelimiter},getLineEnd:function(c,d){var f=this.getLineCount();if(!(0<=c&&c<f))return-1;if(c+1<f){f=this._lineOffsets[c+1];if(d)return f;for(var g=this.getText(Math.max(this._lineOffsets[c],f-2),f),h=g.length,b;(b=g.charCodeAt(h-1))===10||b===13;)h--;return f-(g.length-h)}else return this.getCharCount()},
+getLineStart:function(c){return!(0<=c&&c<this.getLineCount())?-1:this._lineOffsets[c]},getText:function(c,d){c===void 0&&(c=0);d===void 0&&(d=this.getCharCount());if(c===d)return"";for(var f=0,g=0,h;g<this._text.length;){h=this._text[g].length;if(c<=f+h)break;f+=h;g++}for(var b=f,a=g;g<this._text.length;){h=this._text[g].length;if(d<=f+h)break;f+=h;g++}if(a===g)return this._text[a].substring(c-b,d-f);b=this._text[a].substring(c-b);f=this._text[g].substring(0,d-f);return b+this._text.slice(a+1,g).join("")+
+f},onChanging:function(c){return this.dispatchEvent(c)},onChanged:function(c){return this.dispatchEvent(c)},setLineDelimiter:function(c,d){c==="auto"&&(c=void 0,this.getLineCount()>1&&(c=this.getText(this.getLineEnd(0),this.getLineEnd(0,!0))));this._lineDelimiter=c?c:n.platformDelimiter;if(d){var f=this.getLineCount();if(f>1){for(var g=Array(f),h=0;h<f;h++)g[h]=this.getLine(h);this.setText(g.join(this._lineDelimiter))}}},setText:function(c,d,f){c===void 0&&(c="");d===void 0&&(d=0);f===void 0&&(f=
+this.getCharCount());if(!(d===f&&c==="")){for(var g=this.getLineAtOffset(d),h=this.getLineAtOffset(f),b=d,a=f-d,e=h-g,l=c.length,o=0,i=this.getLineCount(),r=0,p=0,t=0,v=[];;){r!==-1&&r<=t&&(r=c.indexOf("\r",t));p!==-1&&p<=t&&(p=c.indexOf("\n",t));if(p===-1&&r===-1)break;t=r!==-1&&p!==-1?r+1===p?p+1:(r<p?r:p)+1:r!==-1?r+1:p+1;v.push(d+t);o++}this.onChanging({type:"Changing",text:c,start:b,removedCharCount:a,addedCharCount:l,removedLineCount:e,addedLineCount:o});v.length===0&&(t=this.getLineStart(g),
+h=h+1<i?this.getLineStart(h+1):this.getCharCount(),d!==t&&(c=this.getText(t,d)+c,d=t),f!==h&&(c+=this.getText(f,h),f=h));t=l-a;for(h=g+e+1;h<i;h++)this._lineOffsets[h]+=t;if(v.length<5E4)g=[g+1,e].concat(v),Array.prototype.splice.apply(this._lineOffsets,g);else{t=g+1;this._lineOffsets.splice(t,e);for(i=0;i<v.length;i+=5E4)g=[t,0].concat(v.slice(i,Math.min(v.length,i+5E4))),Array.prototype.splice.apply(this._lineOffsets,g),t+=5E4}for(t=i=0;t<this._text.length;){h=this._text[t].length;if(d<=i+h)break;
+i+=h;t++}g=i;for(v=t;t<this._text.length;){h=this._text[t].length;if(f<=i+h)break;i+=h;t++}h=this._text[t];d=this._text[v].substring(0,d-g);f=h.substring(f-i);v=[v,t-v+1];d&&v.push(d);c&&v.push(c);f&&v.push(f);Array.prototype.splice.apply(this._text,v);if(this._text.length===0)this._text=[""];this.onChanged({type:"Changed",start:b,removedCharCount:a,addedCharCount:l,removedLineCount:e,addedLineCount:o})}}};k.EventTarget.addMixin(i.prototype);return{TextModel:i}});
+define("orion/keyBinding",["orion/util"],function(k){function m(i,c,d,f,g,h){this.type=h||"keydown";this.keyCode=typeof i==="string"&&this.type==="keydown"?i.toUpperCase().charCodeAt(0):i;this.mod1=c!==void 0&&c!==null?c:!1;this.mod2=d!==void 0&&d!==null?d:!1;this.mod3=f!==void 0&&f!==null?f:!1;this.mod4=g!==void 0&&g!==null?g:!1}function n(i){this.keys=i}m.prototype={getKeys:function(){return[this]},match:function(i,c){if(c!==void 0){if(c!==0)return!1}else if(i instanceof Array){if(i.length>1)return!1;
+i=i[0]}return i.type!==this.type?!1:this.keyCode===i.keyCode||this.keyCode===String.fromCharCode(k.isOpera?i.which:i.charCode!==void 0?i.charCode:i.keyCode)?this.mod1!==(k.isMac?i.metaKey:i.ctrlKey)?!1:this.type==="keydown"&&this.mod2!==i.shiftKey?!1:this.mod3!==i.altKey?!1:k.isMac&&this.mod4!==i.ctrlKey?!1:!0:!1},equals:function(i){return!i?!1:this.keyCode!==i.keyCode?!1:this.mod1!==i.mod1?!1:this.mod2!==i.mod2?!1:this.mod3!==i.mod3?!1:this.mod4!==i.mod4?!1:this.type!==i.type?!1:!0}};n.prototype=
+{getKeys:function(){return this.keys.slice(0)},match:function(i,c){var d=this.keys;if(c!==void 0)return c>d.length?!1:d[c].match(i)?c===d.length-1?!0:c+1:!1;else{i instanceof Array||(i=[i]);if(i.length>d.length)return!1;var f;for(f=0;f<i.length;f++)if(!d[f].match(i[f]))return!1;return f===d.length?!0:f}},equals:function(i){if(!i.keys)return!1;if(i.keys.length!==this.keys.length)return!1;for(var c=0;c<i.keys.length;c++)if(!i.keys[c].equals(this.keys[c]))return!1;return!0}};return{KeyBinding:m,KeyStroke:m,
+KeySequence:n}});
+define("orion/editor/keyModes",["orion/keyBinding","orion/util"],function(k,m){function n(c){if(c)this._view=c,this._keyBindings=this.createKeyBindings(),this._keyBindingIndex=0}function i(c){n.call(this,c)}n.prototype={createKeyBindings:function(){return[]},getKeyBindings:function(c){for(var d=[],f=this._keyBindings,g=0;g<f.length;g++)f[g].actionID===c&&d.push(f[g].keyBinding);return d},getView:function(){return this._view},isActive:function(){return this._view.getKeyModes().indexOf(this)!==-1},
+match:function(c){if(c.type==="keydown")switch(c.keyCode){case 16:case 17:case 18:case 91:return}for(var d=this._keyBindingIndex,f=this._matchingKeyBindings||this._keyBindings,g=[],h=0;h<f.length;h++){var b=f[h],a=b.keyBinding.match(c,d);if(a===!0)return this._keyBindingIndex=0,this._matchingKeyBindings=null,b.actionID;else typeof a==="number"&&g.push(b)}if(g.length===0)this._keyBindingIndex=0,this._matchingKeyBindings=null;else return this._keyBindingIndex++,this._matchingKeyBindings=g,"noop"},setKeyBinding:function(c,
+d){for(var f=this._keyBindings,g=0;g<f.length;g++){var h=f[g];if(h.keyBinding.equals(c)){d?h.actionID=d:h.predefined?h.actionID="noop":f.splice(g,1);return}}d&&f.push({keyBinding:c,actionID:d})},setView:function(c){this._view=c}};i.prototype=new n;i.prototype.createKeyBindings=function(){var c=k.KeyBinding,d=[];d.push({actionID:"lineUp",keyBinding:new c(38),predefined:!0});d.push({actionID:"lineDown",keyBinding:new c(40),predefined:!0});d.push({actionID:"charPrevious",keyBinding:new c(37),predefined:!0});
+d.push({actionID:"charNext",keyBinding:new c(39),predefined:!0});m.isMac?(d.push({actionID:"scrollPageUp",keyBinding:new c(33),predefined:!0}),d.push({actionID:"scrollPageDown",keyBinding:new c(34),predefined:!0}),d.push({actionID:"pageUp",keyBinding:new c(33,null,null,!0),predefined:!0}),d.push({actionID:"pageDown",keyBinding:new c(34,null,null,!0),predefined:!0}),d.push({actionID:"lineStart",keyBinding:new c(37,!0),predefined:!0}),d.push({actionID:"lineEnd",keyBinding:new c(39,!0),predefined:!0}),
+d.push({actionID:"wordPrevious",keyBinding:new c(37,null,null,!0),predefined:!0}),d.push({actionID:"wordNext",keyBinding:new c(39,null,null,!0),predefined:!0}),d.push({actionID:"scrollTextStart",keyBinding:new c(36),predefined:!0}),d.push({actionID:"scrollTextEnd",keyBinding:new c(35),predefined:!0}),d.push({actionID:"textStart",keyBinding:new c(38,!0),predefined:!0}),d.push({actionID:"textEnd",keyBinding:new c(40,!0),predefined:!0}),d.push({actionID:"scrollPageUp",keyBinding:new c(38,null,null,null,
+!0),predefined:!0}),d.push({actionID:"scrollPageDown",keyBinding:new c(40,null,null,null,!0),predefined:!0}),d.push({actionID:"lineStart",keyBinding:new c(37,null,null,null,!0),predefined:!0}),d.push({actionID:"lineEnd",keyBinding:new c(39,null,null,null,!0),predefined:!0}),d.push({actionID:"lineStart",keyBinding:new c(38,null,null,!0),predefined:!0}),d.push({actionID:"lineEnd",keyBinding:new c(40,null,null,!0),predefined:!0})):(d.push({actionID:"pageUp",keyBinding:new c(33),predefined:!0}),d.push({actionID:"pageDown",
+keyBinding:new c(34),predefined:!0}),d.push({actionID:"lineStart",keyBinding:new c(36),predefined:!0}),d.push({actionID:"lineEnd",keyBinding:new c(35),predefined:!0}),d.push({actionID:"wordPrevious",keyBinding:new c(37,!0),predefined:!0}),d.push({actionID:"wordNext",keyBinding:new c(39,!0),predefined:!0}),d.push({actionID:"textStart",keyBinding:new c(36,!0),predefined:!0}),d.push({actionID:"textEnd",keyBinding:new c(35,!0),predefined:!0}));m.isFirefox&&m.isLinux&&(d.push({actionID:"lineUp",keyBinding:new c(38,
+!0),predefined:!0}),d.push({actionID:"lineDown",keyBinding:new c(40,!0),predefined:!0}));m.isWindows&&(d.push({actionID:"scrollLineUp",keyBinding:new c(38,!0),predefined:!0}),d.push({actionID:"scrollLineDown",keyBinding:new c(40,!0),predefined:!0}));d.push({actionID:"selectLineUp",keyBinding:new c(38,null,!0),predefined:!0});d.push({actionID:"selectLineDown",keyBinding:new c(40,null,!0),predefined:!0});d.push({actionID:"selectCharPrevious",keyBinding:new c(37,null,!0),predefined:!0});d.push({actionID:"selectCharNext",
+keyBinding:new c(39,null,!0),predefined:!0});d.push({actionID:"selectPageUp",keyBinding:new c(33,null,!0),predefined:!0});d.push({actionID:"selectPageDown",keyBinding:new c(34,null,!0),predefined:!0});m.isMac?(d.push({actionID:"selectLineStart",keyBinding:new c(37,!0,!0),predefined:!0}),d.push({actionID:"selectLineEnd",keyBinding:new c(39,!0,!0),predefined:!0}),d.push({actionID:"selectWordPrevious",keyBinding:new c(37,null,!0,!0),predefined:!0}),d.push({actionID:"selectWordNext",keyBinding:new c(39,
+null,!0,!0),predefined:!0}),d.push({actionID:"selectTextStart",keyBinding:new c(36,null,!0),predefined:!0}),d.push({actionID:"selectTextEnd",keyBinding:new c(35,null,!0),predefined:!0}),d.push({actionID:"selectTextStart",keyBinding:new c(38,!0,!0),predefined:!0}),d.push({actionID:"selectTextEnd",keyBinding:new c(40,!0,!0),predefined:!0}),d.push({actionID:"selectLineStart",keyBinding:new c(37,null,!0,null,!0),predefined:!0}),d.push({actionID:"selectLineEnd",keyBinding:new c(39,null,!0,null,!0),predefined:!0}),
+d.push({actionID:"selectLineStart",keyBinding:new c(38,null,!0,!0),predefined:!0}),d.push({actionID:"selectLineEnd",keyBinding:new c(40,null,!0,!0),predefined:!0})):(m.isLinux&&(d.push({actionID:"selectWholeLineUp",keyBinding:new c(38,!0,!0),predefined:!0}),d.push({actionID:"selectWholeLineDown",keyBinding:new c(40,!0,!0),predefined:!0})),d.push({actionID:"selectLineStart",keyBinding:new c(36,null,!0),predefined:!0}),d.push({actionID:"selectLineEnd",keyBinding:new c(35,null,!0),predefined:!0}),d.push({actionID:"selectWordPrevious",
+keyBinding:new c(37,!0,!0),predefined:!0}),d.push({actionID:"selectWordNext",keyBinding:new c(39,!0,!0),predefined:!0}),d.push({actionID:"selectTextStart",keyBinding:new c(36,!0,!0),predefined:!0}),d.push({actionID:"selectTextEnd",keyBinding:new c(35,!0,!0),predefined:!0}));d.push({actionID:"undo",keyBinding:new k.KeyBinding("z",!0),predefined:!0});m.isMac?d.push({actionID:"redo",keyBinding:new k.KeyBinding("z",!0,!0),predefined:!0}):d.push({actionID:"redo",keyBinding:new k.KeyBinding("y",!0),predefined:!0});
+d.push({actionID:"deletePrevious",keyBinding:new c(8),predefined:!0});d.push({actionID:"deletePrevious",keyBinding:new c(8,null,!0),predefined:!0});d.push({actionID:"deleteNext",keyBinding:new c(46),predefined:!0});d.push({actionID:"deleteWordPrevious",keyBinding:new c(8,!0),predefined:!0});d.push({actionID:"deleteWordPrevious",keyBinding:new c(8,!0,!0),predefined:!0});d.push({actionID:"deleteWordNext",keyBinding:new c(46,!0),predefined:!0});d.push({actionID:"tab",keyBinding:new c(9),predefined:!0});
+d.push({actionID:"shiftTab",keyBinding:new c(9,null,!0),predefined:!0});d.push({actionID:"enter",keyBinding:new c(13),predefined:!0});d.push({actionID:"enter",keyBinding:new c(13,null,!0),predefined:!0});d.push({actionID:"selectAll",keyBinding:new c("a",!0),predefined:!0});d.push({actionID:"toggleTabMode",keyBinding:new c("m",!0),predefined:!0});m.isMac&&(d.push({actionID:"deleteNext",keyBinding:new c(46,null,!0),predefined:!0}),d.push({actionID:"deleteWordPrevious",keyBinding:new c(8,null,null,!0),
+predefined:!0}),d.push({actionID:"deleteWordNext",keyBinding:new c(46,null,null,!0),predefined:!0}));d.push({actionID:"toggleWrapMode",keyBinding:new k.KeyBinding("w",!0,!1,!0)});d.push({actionID:"toggleOverwriteMode",keyBinding:new k.KeyBinding(45)});if(!m.isFirefox){var f=m.isMac&&m.isChrome;d.push({actionID:"noop",keyBinding:new c("u",!f,!1,!1,f),predefined:!0});d.push({actionID:"noop",keyBinding:new c("i",!f,!1,!1,f),predefined:!0});d.push({actionID:"noop",keyBinding:new c("b",!f,!1,!1,f),predefined:!0})}m.isFirefox&&
+(d.push({actionID:"copy",keyBinding:new c(45,!0),predefined:!0}),d.push({actionID:"paste",keyBinding:new c(45,null,!0),predefined:!0}),d.push({actionID:"cut",keyBinding:new c(46,null,!0),predefined:!0}));m.isMac&&(d.push({actionID:"lineStart",keyBinding:new c("a",!1,!1,!1,!0),predefined:!0}),d.push({actionID:"lineEnd",keyBinding:new c("e",!1,!1,!1,!0),predefined:!0}),d.push({actionID:"lineUp",keyBinding:new c("p",!1,!1,!1,!0),predefined:!0}),d.push({actionID:"lineDown",keyBinding:new c("n",!1,!1,
+!1,!0),predefined:!0}),d.push({actionID:"charPrevious",keyBinding:new c("b",!1,!1,!1,!0),predefined:!0}),d.push({actionID:"charNext",keyBinding:new c("f",!1,!1,!1,!0),predefined:!0}),d.push({actionID:"deletePrevious",keyBinding:new c("h",!1,!1,!1,!0),predefined:!0}),d.push({actionID:"deleteNext",keyBinding:new c("d",!1,!1,!1,!0),predefined:!0}),d.push({actionID:"deleteLineEnd",keyBinding:new c("k",!1,!1,!1,!0),predefined:!0}),m.isFirefox?(d.push({actionID:"scrollPageDown",keyBinding:new c("v",!1,
+!1,!1,!0),predefined:!0}),d.push({actionID:"deleteLineStart",keyBinding:new c("u",!1,!1,!1,!0),predefined:!0}),d.push({actionID:"deleteWordPrevious",keyBinding:new c("w",!1,!1,!1,!0),predefined:!0})):(d.push({actionID:"pageDown",keyBinding:new c("v",!1,!1,!1,!0),predefined:!0}),d.push({actionID:"centerLine",keyBinding:new c("l",!1,!1,!1,!0),predefined:!0}),d.push({actionID:"enterNoCursor",keyBinding:new c("o",!1,!1,!1,!0),predefined:!0})));return d};return{KeyMode:n,DefaultKeyMode:i}});
+define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(k,m,n){function i(c){c=c||{};this._document=c.document||document}var c={};i.getTheme=function(d){var d=d||"default",f=c[d];f||(f=c[d]=new i);return f};i.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(c,f){var g=this,h=g._themeClass;g._themeClass=c;this._load(c,f,function(){g.onThemeChanged({type:"ThemeChanged",oldValue:h,newValue:g.getThemeClass()})})},onThemeChanged:function(c){return this.dispatchEvent(c)},
+buildStyleSheet:function(c,f){function g(b,a,e){a&&(h.push("."+c+" ."+b+" {"),h.push("\t"+(e?"background-color":"color")+": "+a+";"),h.push("}"))}var h=[];h.push("");h.push("."+c+" {");f.fontFamily&&h.push("\tfont-family: "+f.fontFamily+";");f.fontSize&&h.push("\tfont-size: "+f.fontSize+";");f.fontSize&&h.push("\tcolor: "+f.text+";");h.push("}");h.push("."+c+".textview {");f.background&&h.push("\tbackground-color: "+f.background+";");h.push("}");g("ruler.annotations",f.annotationRuler,!0);g("ruler.lines",
+f.annotationRuler,!0);g("ruler.folding",f.annotationRuler,!0);g("ruler.overview",f.overviewRuler,!0);g("rulerLines",f.lineNumber,!1);g("rulerLines.even",f.lineNumberEven,!1);g("rulerLines.odd",f.lineNumberOdd,!1);g("annotationLine.currentLine",f.currentLine,!0);g("entity-name-tag",f.keyword,!1);g("entity-other-attribute-name",f.attribute,!1);g("string-quoted",f.string,!1);g("meta.annotation.currentLine",f.currentLine,!0);g("keyword",f.keyword,!1);g("string",f.string,!1);g("comment",f.comment,!1);
+g("comment.block.documentation",f.comment,!1);g("keyword.other.documentation.markup",f.comment,!1);return h.join("\n")},_createStyle:function(c,f,g,h){var b=this._document,c="orion-theme-"+c,a=b.getElementById(c);if(a){if(h||a.firstChild.data===f)return;a.removeChild(a.firstChild);a.appendChild(b.createTextNode(f))}else h?(a=n.createElement(b,"link"),a.rel="stylesheet",a.type="text/css",a.href=f,a.addEventListener("load",function(){g()})):(a=n.createElement(b,"style"),a.appendChild(b.createTextNode(f))),
+a.id=c,(b.getElementsByTagName("head")[0]||b.documentElement).appendChild(a);h||g()},_load:function(c,f,g){if(c)if(typeof f==="string")this._createStyle(c,f,g);else if(f=f.href,f.substring(f.length-4)!==".css"&&(f+=".css"),/^\//.test(f)||/[a-zA-Z0-9]+:\/\//i.test(f)||!k.toUrl)this._createStyle(c,f,g,!0);else{var h=this;k(["text!"+f],function(b){h._createStyle(c,b,g,!1)})}else g()}};m.EventTarget.addMixin(i.prototype);return{TextTheme:i}});
+define("orion/editor/util",[],function(){return{contains:function(k,m){if(!m)return!1;if(!k.compareDocumentPosition){for(var n=m;n;){if(k===n)return!0;n=n.parentNode}return!1}return k===m||(k.compareDocumentPosition(m)&16)!==0},addEventListener:function(k,m,n,i){typeof k.addEventListener==="function"?k.addEventListener(m,n,i===!0):k.attachEvent("on"+m,n)},removeEventListener:function(k,m,n,i){typeof k.removeEventListener==="function"?k.removeEventListener(m,n,i===!0):k.detachEvent("on"+m,n)}}});
+define("orion/editor/textView","i18n!orion/editor/nls/messages,orion/editor/textModel,orion/editor/keyModes,orion/editor/eventTarget,orion/editor/textTheme,orion/editor/util,orion/util".split(","),function(k,m,n,i,c,d,f){function g(j,a,b){if(b){a.className="";for(var b=a.attributes,e=b.length;e-- >0;)(!f.isIE||f.isIE>=9||f.isIE<9&&b[e].specified)&&a.removeAttribute(b[e].name)}if(j){if(j.styleClass)a.className=j.styleClass;if(b=j.style)for(var c in b)b.hasOwnProperty(c)&&(a.style[c]=b[c]);if(j=j.attributes)for(var l in j)j.hasOwnProperty(l)&&
+a.setAttribute(l,j[l])}}function h(j){return j instanceof Array?j.slice(0):j}function b(j,a){if(!j)return a;if(!a)return j;for(var b in a)a.hasOwnProperty(b)&&(j.hasOwnProperty(b)||(j[b]=a[b]));return j}function a(j,w){if(j===w)return!0;if(j&&!w||!j&&w)return!1;if(j&&j.constructor===String||w&&w.constructor===String)return!1;if(j instanceof Array||w instanceof Array){if(!(j instanceof Array&&w instanceof Array))return!1;if(j.length!==w.length)return!1;for(var b=0;b<j.length;b++)if(!a(j[b],w[b]))return!1;
+return!0}if(!(j instanceof Object)||!(w instanceof Object))return!1;for(b in j)if(j.hasOwnProperty(b)){if(!w.hasOwnProperty(b))return!1;if(!a(j[b],w[b]))return!1}for(b in w)if(!j.hasOwnProperty(b))return!1;return!0}function e(j,a,b){for(var e=0,c=0,f=0,l=j.length;f<l;){e!==-1&&e<=f&&(e=j.indexOf("\r",f));c!==-1&&c<=f&&(c=j.indexOf("\n",f));var d=f,o;if(c===-1&&e===-1){a(j.substring(f));break}e!==-1&&c!==-1?e+1===c?(o=e,f=c+1):(o=e<c?e:c,f=(e<c?e:c)+1):e!==-1?(o=e,f=e+1):(o=c,f=c+1);a(j.substring(d,
+o));b()}}function l(j){var a,b,e,c,f=j.ownerDocument.defaultView||j.ownerDocument.parentWindow;if(f.getComputedStyle)j=f.getComputedStyle(j,null),a=j.getPropertyValue("padding-left"),b=j.getPropertyValue("padding-top"),e=j.getPropertyValue("padding-right"),c=j.getPropertyValue("padding-bottom");else if(j.currentStyle)a=j.currentStyle.paddingLeft,b=j.currentStyle.paddingTop,e=j.currentStyle.paddingRight,c=j.currentStyle.paddingBottom;return{left:parseInt(a,10)||0,top:parseInt(b,10)||0,right:parseInt(e,
+10)||0,bottom:parseInt(c,10)||0}}function o(j){var a,b,e,c,f=j._trim;if(!f){var f=l(j),d=j.ownerDocument.defaultView||j.ownerDocument.parentWindow;if(d.getComputedStyle)c=d.getComputedStyle(j,null),a=c.getPropertyValue("border-left-width"),b=c.getPropertyValue("border-top-width"),e=c.getPropertyValue("border-right-width"),c=c.getPropertyValue("border-bottom-width");else if(j.currentStyle)a=j.currentStyle.borderLeftWidth,b=j.currentStyle.borderTopWidth,e=j.currentStyle.borderRightWidth,c=j.currentStyle.borderBottomWidth;
+a=parseInt(a,10)||0;b=parseInt(b,10)||0;e=parseInt(e,10)||0;c=parseInt(c,10)||0;f.left+=a;f.top+=b;f.right+=e;f.bottom+=c;j._trim=f}return f}function q(j,a,b){this.start=j;this.end=a;this.caret=b}function r(j){this.left=j.left;this.top=j.top;this.right=j.right;this.bottom=j.bottom}function p(j,a,b){this.view=j;this.lineIndex=a;this._lineDiv=b}function t(j){this._init(j||{})}var v=d.addEventListener,s=d.removeEventListener,u=function(){function j(j){this.options=j}j.prototype.play=function(){var j=
+typeof this.options.duration==="number"?this.options.duration:350,a=this.options.easing||this.defaultEasing,b=this.options.onAnimate||function(){},e=this.options.curve[0],c=this.options.curve[1],f=c-e,l=-1,d,o=this;this.interval=this.options.window.setInterval(function(){l=l===-1?(new Date).getTime():l;var g=((new Date).getTime()-l)/j;g<1?(g=a(g),d=e+g*f,b(d)):(b(c),o.stop())},typeof this.options.rate==="number"?this.options.rate:20)};j.prototype.stop=function(){this.options.window.clearInterval(this.interval);
+(this.options.onEnd||function(){})()};j.prototype.defaultEasing=function(j){return Math.sin(j*(Math.PI/2))};return j}();q.prototype={clone:function(){return new q(this.start,this.end,this.caret)},collapse:function(){this.caret?this.end=this.start:this.start=this.end},extend:function(j){this.caret?this.start=j:this.end=j;if(this.start>this.end)j=this.start,this.start=this.end,this.end=j,this.caret=!this.caret},setCaret:function(j){this.end=this.start=j;this.caret=!1},getCaret:function(){return this.caret?
+this.start:this.end},toString:function(){return"start="+this.start+" end="+this.end+(this.caret?" caret is at start":" caret is at end")},isEmpty:function(){return this.start===this.end},equals:function(j){return this.caret===j.caret&&this.start===j.start&&this.end===j.end}};r.prototype={toString:function(){return"{l="+this.left+", t="+this.top+", r="+this.right+", b="+this.bottom+"}"}};p.prototype={create:function(j,a){if(!this._lineDiv){var b=this._lineDiv=this._createLine(j,a,this.lineIndex);b._line=
+this;return b}},_createLine:function(j,w,b){var e=this.view,c=e._model,l=c.getLine(b),d=c.getLineStart(b),o={type:"LineStyle",textView:e,lineIndex:b,lineText:l,lineStart:d};if(l.length<2E3)e.onLineStyle(o);c=w||f.createElement(j.ownerDocument,"div");if(!w||!a(w.viewStyle,o.style)){g(o.style,c,w);if(w)w._trim=null;c.viewStyle=o.style;c.setAttribute("role","presentation")}c.lineIndex=b;b=[];this._createRanges(o.ranges,l,0,l.length,d,{tabOffset:0,ranges:b});l=" ";!e._fullSelection&&f.isIE<9&&(l="\ufeff");
+o={text:l,style:e._metrics.largestFontStyle,ignoreChars:1};b.length===0||!b[b.length-1].style||b[b.length-1].style.tagName!=="div"?b.push(o):b.splice(b.length-1,0,o);var h,p,i,q,r,l=e=0,s,t;if(w){if(p=w.modelChangedEvent)p.removedLineCount===0&&p.addedLineCount===0?(t=p.start-d,s=p.addedCharCount-p.removedCharCount):t=-1,w.modelChangedEvent=void 0;p=w.firstChild}for(d=0;d<b.length;d++){o=b[d];q=o.text;e+=q.length;h=o.style;if(p)if(r=p.firstChild.data,i=p.viewStyle,r===q&&a(h,i)){l+=r.length;p._rectsCache=
+void 0;h=p=p.nextSibling;continue}else for(;p;){if(t!==-1){i=e;i>=t&&(i-=s);r=(r=p.firstChild.data)?r.length:0;if(l+r>i)break;l+=r}i=p.nextSibling;c.removeChild(p);p=i}h=this._createSpan(c,q,h,o.ignoreChars);p?c.insertBefore(h,p):c.appendChild(h);if(w)w.lineWidth=void 0}if(w)for(j=h?h.nextSibling:null;j;)i=j.nextSibling,w.removeChild(j),j=i;else j.appendChild(c);return c},_createRanges:function(j,w,b,e,c,f){if(!(b>e)){if(j)for(var l=0;l<j.length;l++){var d=j[l];if(!(d.end<c+b)){var o=Math.max(c+b,
+d.start)-c;if(o>e)break;var g=Math.min(c+e,d.end)-c;if(o<=g){o=Math.max(b,o);g=Math.min(e,g);b<o&&this._createRange(w,b,o,null,f);if(!d.style||!d.style.unmergeable)for(;l+1<j.length&&j[l+1].start-c===g&&a(d.style,j[l+1].style);)d=j[l+1],g=Math.min(c+e,d.end)-c,l++;this._createRange(w,o,g,d.style,f);b=g}}}b<e&&this._createRange(w,b,e,null,f)}},_createRange:function(j,a,b,e,c){if(!(a>b)){var f=this.view._customTabSize;if(f&&f!==8)for(var l=j.indexOf("\t",a);l!==-1&&l<b;){a<l&&(a={text:j.substring(a,
+l),style:e},c.ranges.push(a),c.tabOffset+=a.text.length);a=f-c.tabOffset%f;if(a>0){for(var d="\u00a0",o=1;o<a;o++)d+=" ";a={text:d,style:e,ignoreChars:a-1};c.ranges.push(a);c.tabOffset+=a.text.length}a=l+1;if(a===b)return;l=j.indexOf("\t",a)}a<=b&&(a={text:j.substring(a,b),style:e},c.ranges.push(a),c.tabOffset+=a.text.length)}},_createSpan:function(j,a,b,e){var c=this.view,l="span";b&&b.tagName&&(l=b.tagName.toLowerCase());var d=l==="a";if(d)j.hasLink=!0;d&&!c._linksVisible&&(l="span");d=j.ownerDocument;
+j=f.createElement(j.ownerDocument,l);b&&b.html?(j.innerHTML=b.html,j.ignore=!0):b&&b.node?(j.appendChild(b.node),j.ignore=!0):j.appendChild(d.createTextNode(b&&b.text?b.text:a));g(b,j);if(l==="a"){var o=c._getWindow();v(j,"click",function(j){return c._handleLinkClick(j?j:o.event)},!1)}j.viewStyle=b;if(e)j.ignoreChars=e;return j},_ensureCreated:function(){return this._lineDiv?this._lineDiv:this._createdDiv=this.create(this.view._clientDiv,null)},getBoundingClientRect:function(j,a){var b=this._ensureCreated(),
+e=this.view;if(j===void 0)return this._getLineBoundingClientRect(b,!0);var c=e._model,l=b.ownerDocument,d=this.lineIndex,o=null;if(j<c.getLineEnd(d)){d=c.getLineStart(d);for(c=b.firstChild;c;){if(!c.ignore){var g=c.firstChild,p=g.length;c.ignoreChars&&(p-=c.ignoreChars);if(d+p>j){o=j-d;if(g.length===1)o=new r(c.getBoundingClientRect());else if(e._isRangeRects)l=l.createRange(),l.setStart(g,o),l.setEnd(g,o+1),o=new r(l.getBoundingClientRect());else if(f.isIE){if(l=l.body.createTextRange(),l.moveToElementText(c),
+l.collapse(),(d=o===0&&f.isIE===8)&&(o=1),l.moveEnd("character",o+1),l.moveStart("character",o),o=new r(l.getBoundingClientRect()),d)o.left=c.getClientRects()[0].left}else{var h=g.data;c.removeChild(g);c.appendChild(l.createTextNode(h.substring(0,o)));var i=f.createElement(l,"span");i.appendChild(l.createTextNode(h.substring(o,o+1)));c.appendChild(i);c.appendChild(l.createTextNode(h.substring(o+1)));o=new r(i.getBoundingClientRect());c.innerHTML="";c.appendChild(g);this._createdDiv||(l=e._getSelection(),
+(d<=l.start&&l.start<d+p||d<=l.end&&l.end<d+p)&&e._updateDOMSelection())}f.isIE&&(l=b.ownerDocument.defaultView||b.ownerDocument.parentWindow,b=l.screen.logicalXDPI/l.screen.deviceXDPI,l=l.screen.logicalYDPI/l.screen.deviceYDPI,o.left*=b,o.right*=b,o.top*=l,o.bottom*=l);break}d+=p}c=c.nextSibling}}b=this.getBoundingClientRect();if(!o)e._wrapMode?(e=this.getClientRects(),o=e[e.length-1],o.left=o.right,o.left+=b.left,o.top+=b.top,o.right+=b.left,o.bottom+=b.top):(o=new r(b),o.left=o.right);if(a||a===
+void 0)o.left-=b.left,o.top-=b.top,o.right-=b.left,o.bottom-=b.top;return o},_getClientRects:function(j,a){var b,e,c,l;if(!j._rectsCache){b=j.getClientRects();e=Array(b.length);for(l=0;l<b.length;l++)c=e[l]=new r(b[l]),c.left-=a.left,c.top-=a.top,c.right-=a.left,c.bottom-=a.top;j._rectsCache=e}b=j._rectsCache;e=[b.length];for(l=0;l<b.length;l++)e[l]=new r(b[l]);return e},getClientRects:function(j){if(!this.view._wrapMode)return[this.getBoundingClientRect()];for(var a=this._ensureCreated(),b=[],e=
+a.firstChild,c,l=a.getBoundingClientRect();e;){if(!e.ignore)for(var f=this._getClientRects(e,l),a=0;a<f.length;a++){var o=f[a],d;if(o.top!==o.bottom){var g=o.top+(o.bottom-o.top)/2;for(d=0;d<b.length;d++)if(c=b[d],c.top<=g&&g<c.bottom)break;if(d===b.length)b.push(o);else{if(o.left<c.left)c.left=o.left;if(o.top<c.top)c.top=o.top;if(o.right>c.right)c.right=o.right;if(o.bottom>c.bottom)c.bottom=o.bottom}}}e=e.nextSibling}return j!==void 0?b[j]:b},_getLineBoundingClientRect:function(j,a){var b=new r(j.getBoundingClientRect());
+if(!this.view._wrapMode){b.right=b.left;for(var e=j.lastChild;e&&e.ignoreChars===e.firstChild.length;)e=e.previousSibling;if(e)e=e.getBoundingClientRect(),b.right=e.right+o(j).right}a&&(e=o(j),b.left+=e.left,b.right-=e.right);return b},getLineCount:function(){return!this.view._wrapMode?1:this.getClientRects().length},getLineIndex:function(j){if(!this.view._wrapMode)return 0;for(var a=this.getClientRects(),j=this.getBoundingClientRect(j),j=j.top+(j.bottom-j.top)/2,b=0;b<a.length;b++)if(a[b].top<=j&&
+j<a[b].bottom)return b;return a.length-1},getLineStart:function(j){if(!this.view._wrapMode||j===0)return this.view._model.getLineStart(j);var a=this.getClientRects();return this.getOffset(a[j].left+1,a[j].top+1)},getOffset:function(j,a){var b=this.view,e=b._model,c=this.lineIndex,l=e.getLineStart(c),o=e.getLineEnd(c);if(l===o)return l;var d=this._ensureCreated(),g=this.getBoundingClientRect(),p,h;if(b._wrapMode){p=this.getClientRects();if(a<p[0].top)a=p[0].top;for(var i=0;i<p.length;i++)if(h=p[i],
+h.top<=a&&a<h.bottom)break;if(j<h.left)j=h.left;j>h.right&&(j=h.right-1)}else j<0&&(j=0),j>g.right-g.left&&(j=g.right-g.left);var q=d.ownerDocument,i=q.defaultView||q.parentWindow,r=f.isIE?i.screen.logicalXDPI/i.screen.deviceXDPI:1,s=f.isIE?i.screen.logicalYDPI/i.screen.deviceYDPI:1,i=l,t=d.firstChild;a:for(;t;){if(!t.ignore){var u=t.firstChild,d=u.length;t.ignoreChars&&(d-=t.ignoreChars);var v,k,n;p=this._getClientRects(t,g);for(var m=0;m<p.length;m++)if(h=p[m],h.left<=j&&j<h.right&&(!b._wrapMode||
+h.top<=a&&a<h.bottom)){var m=h.left+g.left,A;if(f.isIE||b._isRangeRects){for(var q=b._isRangeRects?q.createRange():q.body.createTextRange(),z=d,C=-1;z-C>1;){var J=Math.floor((z+C)/2);p=C+1;h=J===d-1&&t.ignoreChars?u.length:J+1;A=p===0&&f.isIE===8;b._isRangeRects?(q.setStart(u,p),q.setEnd(u,h)):(A&&(p=1),q.moveToElementText(t),q.move("character",p),q.moveEnd("character",h-p));p=q.getClientRects();for(var N=!1,L=0;L<p.length;L++)if(h=p[L],v=(A?m:h.left)*r-g.left,n=h.right*r-g.left,k=h.top*s-g.top,h=
+h.bottom*s-g.top,v<=j&&j<n&&(!b._wrapMode||k<=a&&a<h)){N=!0;break}N?z=J:C=J}i+=z;p=z;h=z===d-1&&t.ignoreChars?u.length:Math.min(z+1,u.length);b._isRangeRects?(q.setStart(u,p),q.setEnd(u,h)):(q.moveToElementText(t),q.move("character",p),q.moveEnd("character",h-p));p=q.getClientRects();b=!1;p.length>0&&(h=p[0],v=(A?m:h.left)*r-g.left,n=h.right*r-g.left,b=j>v+(n-v)/2);g=i-l;e=e.getLine(c);c=e.charCodeAt(g);55296<=c&&c<=56319&&b?g<e.length&&(c=e.charCodeAt(g+1),56320<=c&&c<=57343&&(i+=1)):56320<=c&&c<=
+57343&&!b&&g>0&&(c=e.charCodeAt(g-1),55296<=c&&c<=56319&&(i-=1));b&&i++}else{e=[];for(c=0;c<d;c++)e.push("<span>"),c===d-1?e.push(u.data.substring(c)):e.push(u.data.substring(c,c+1)),e.push("</span>");t.innerHTML=e.join("");for(e=t.firstChild;e;){h=e.getBoundingClientRect();v=h.left-g.left;n=h.right-g.left;if(v<=j&&j<n){j>v+(n-v)/2&&i++;break}i++;e=e.nextSibling}if(!this._createdDiv)t.innerHTML="",t.appendChild(u),g=b._getSelection(),(i<=g.start&&g.start<i+d||i<=g.end&&g.end<i+d)&&b._updateDOMSelection()}break a}i+=
+d}t=t.nextSibling}return Math.min(o,Math.max(l,i))},getNextOffset:function(j,a){if(a.unit==="line"){var b=this.view._model,e=b.getLineAtOffset(j);if(a.count>0)return a.count--,b.getLineEnd(e);a.count++;return b.getLineStart(e)}return a.unit==="wordend"||a.unit==="wordWS"||a.unit==="wordendWS"?this._getNextOffset_W3C(j,a):f.isIE?this._getNextOffset_IE(j,a):this._getNextOffset_W3C(j,a)},_getNextOffset_W3C:function(j,a){function b(j){return 33<=j&&j<=47||58<=j&&j<=64||91<=j&&j<=94||j===96||123<=j&&j<=
+126}function e(j){return j===32||j===9}var c=this.view._model,l=c.getLineAtOffset(j),f=c.getLine(l),o=c.getLineStart(l),c=c.getLineEnd(l),l=f.length,d=j-o,g,h=a.count<0?-1:1;if(a.unit==="word"||a.unit==="wordend"||a.unit==="wordWS"||a.unit==="wordendWS")for(var p,i,q;a.count!==0;){if(a.count>0){if(d===l)return c;g=f.charCodeAt(d);p=b(g);i=!p&&!e(g);for(d++;d<l;){g=f.charCodeAt(d);if(a.unit!=="wordWS"&&a.unit!=="wordendWS"){q=b(g);if(a.unit==="wordend"){if(!q&&p)break}else if(q&&!p)break;g=!q&&!e(g)}else g=
+!e(g);if(a.unit==="wordend"||a.unit==="wordendWS"){if(!g&&i)break}else if(g&&!i)break;i=g;p=q;d++}}else{if(d===0)return o;d--;g=f.charCodeAt(d);p=b(g);for(i=!p&&!e(g);0<d;){g=f.charCodeAt(d-1);if(a.unit!=="wordWS"&&a.unit!=="wordendWS"){q=b(g);if(a.unit==="wordend"){if(q&&!p)break}else if(!q&&p)break;g=!q&&!e(g)}else g=!e(g);if(a.unit==="wordend"||a.unit==="wordendWS"){if(g&&!i)break}else if(!g&&i)break;i=g;p=q;d--}}a.count-=h}else for(;a.count!==0&&0<=d+h&&d+h<=l;)d+=h,g=f.charCodeAt(d),56320<=g&&
+g<=57343&&d>0&&(g=f.charCodeAt(d-1),55296<=g&&g<=56319&&(d+=h)),a.count-=h;return o+d},_getNextOffset_IE:function(j,a){var b=this._ensureCreated(),e=this.view._model,c=this.lineIndex,l=0,f;f=e.getLineStart(c);var d=b.ownerDocument,o=a.count<0?-1:1;if(j===e.getLineEnd(c)){for(b=b.lastChild;b&&b.ignoreChars===b.firstChild.length;)b=b.previousSibling;if(!b)return f;l=d.body.createTextRange();l.moveToElementText(b);f=l.text.length;l.moveEnd(a.unit,o);l=j+l.text.length-f}else if(j===f&&a.count<0)l=f;else for(b=
+b.firstChild;b;){e=b.firstChild.length;b.ignoreChars&&(e-=b.ignoreChars);if(f+e>j){l=d.body.createTextRange();if(j===f&&a.count<0){for(f=b.previousSibling;f;){if(f.firstChild&&f.firstChild.length)break;f=f.previousSibling}l.moveToElementText(f?f:b.previousSibling)}else l.moveToElementText(b),l.collapse(),l.moveEnd("character",j-f);f=l.text.length;l.moveEnd(a.unit,o);l=j+l.text.length-f;break}f=e+f;b=b.nextSibling}a.count-=o;return l},destroy:function(){var j=this._createdDiv;if(j)j.parentNode.removeChild(j),
+this._createdDiv=null}};t.prototype={addKeyMode:function(j,a){var b=this._keyModes;a!==void 0?b.splice(a,0,j):b.push(j);j._modeAdded&&j._modeAdded()},addRuler:function(j,a){j.setView(this);var b=this._rulers;if(a!==void 0){var e,c;for(e=0,c=0;e<b.length&&c<a;e++)j.getLocation()===b[e].getLocation()&&c++;b.splice(c,0,j);a=c}else b.push(j);this._createRuler(j,a);this._update()},computeSize:function(){var j=0,a=0,b=this._model,e=this._clientDiv;if(!e)return{width:j,height:a};var c=e.style.width;if(f.isWebkit)e.style.width=
+"0x7fffffffpx";for(var b=b.getLineCount(),l=0;l<b;l++){var d=this._getLine(l),o=d.getBoundingClientRect(),j=Math.max(j,o.right-o.left);a+=o.bottom-o.top;d.destroy()}if(f.isWebkit)e.style.width=c;e=this._getViewPadding();j+=e.right+e.left+this._metrics.scrollWidth;a+=e.bottom+e.top+this._metrics.scrollWidth;return{width:j,height:a}},convert:function(j,a,b){if(this._clientDiv){var e=this._getScroll(),c=this._getViewPadding(),l=this._viewDiv.getBoundingClientRect();a==="document"&&(j.x!==void 0&&(j.x+=
+-e.x+l.left+c.left),j.y!==void 0&&(j.y+=-e.y+l.top+c.top));b==="document"&&(j.x!==void 0&&(j.x+=e.x-l.left-c.left),j.y!==void 0&&(j.y+=e.y-l.top-c.top));return j}},destroy:function(){for(var j=0;j<this._rulers.length;j++)this._rulers[j].setView(null);this.rulers=null;this._destroyView();this.onDestroy({type:"Destroy"});this._parent=null;this._model&&this._model.destroy&&this._model.destroy();this._actions=this._keyModes=this._doubleClickSelection=this._selection=this._theme=this._model=null},focus:function(){this._clientDiv&&
+(this._updateDOMSelection(),this._clientDiv.focus(),this._updateDOMSelection())},hasFocus:function(){return this._hasFocus},getActionDescription:function(j){if(j=this._actions[j])return j.actionDescription},getActions:function(j){var a=[],b=this._actions,e;for(e in b)b.hasOwnProperty(e)&&(j||!b[e].defaultHandler)&&a.push(e);return a},getBottomIndex:function(j){return!this._clientDiv?0:this._getBottomIndex(j)},getBottomPixel:function(){return!this._clientDiv?0:this._getScroll().y+this._getClientHeight()},
+getCaretOffset:function(){return this._getSelection().getCaret()},getClientArea:function(){if(!this._clientDiv)return{x:0,y:0,width:0,height:0};var j=this._getScroll();return{x:j.x,y:j.y,width:this._getClientWidth(),height:this._getClientHeight()}},getHorizontalPixel:function(){return!this._clientDiv?0:this._getScroll().x},getKeyBindings:function(j){for(var a=[],b=this._keyModes,e=0;e<b.length;e++)a=a.concat(b[e].getKeyBindings(j));return a},getKeyModes:function(){return this._keyModes.slice(0)},
+getLineHeight:function(j){return!this._clientDiv?0:this._getLineHeight(j)},getLineIndex:function(j){return!this._clientDiv?0:this._getLineIndex(j)},getLinePixel:function(j){return!this._clientDiv?0:this._getLinePixel(j)},getLocationAtOffset:function(j){if(!this._clientDiv)return{x:0,y:0};var a=this._model,j=Math.min(Math.max(0,j),a.getCharCount()),a=a.getLineAtOffset(j),b=this._getLine(a),j=b.getBoundingClientRect(j);b.destroy();b=j.left;a=this._getLinePixel(a)+j.top;return{x:b,y:a}},getNextOffset:function(j,
+a){var b=new q(j,j,!1);this._doMove(a,b);return b.getCaret()},getOptions:function(){var j;if(arguments.length===0)j=this._defaultOptions();else if(arguments.length===1){if(j=arguments[0],typeof j==="string")return h(this["_"+j])}else{j={};for(var a in arguments)arguments.hasOwnProperty(a)&&(j[arguments[a]]=void 0)}for(var b in j)j.hasOwnProperty(b)&&(j[b]=h(this["_"+b]));return j},getModel:function(){return this._model},getOffsetAtLocation:function(j,a){if(!this._clientDiv)return 0;var b=this._getLineIndex(a),
+e=this._getLine(b),b=e.getOffset(j,a-this._getLinePixel(b));e.destroy();return b},getLineAtOffset:function(j){this.getModel().getLineAtOffset(j)},getLineStart:function(j){this.getModel().getLineStart(j)},getRulers:function(){return this._rulers.slice(0)},getSelection:function(){var j=this._getSelection();return{start:j.start,end:j.end}},getText:function(j,a){return this._model.getText(j,a)},getTopIndex:function(j){return!this._clientDiv?0:this._getTopIndex(j)},getTopPixel:function(){return!this._clientDiv?
+0:this._getScroll().y},invokeAction:function(j,a,b){if(this._clientDiv){if(j=this._actions[j]){if(!a&&j.handler&&j.handler(b))return!0;if(j.defaultHandler)return typeof j.defaultHandler(b)==="boolean"}return!1}},isDestroyed:function(){return!this._clientDiv},onContextMenu:function(j){return this.dispatchEvent(j)},onDragStart:function(j){return this.dispatchEvent(j)},onDrag:function(j){return this.dispatchEvent(j)},onDragEnd:function(j){return this.dispatchEvent(j)},onDragEnter:function(j){return this.dispatchEvent(j)},
+onDragOver:function(j){return this.dispatchEvent(j)},onDragLeave:function(j){return this.dispatchEvent(j)},onDrop:function(j){return this.dispatchEvent(j)},onDestroy:function(j){return this.dispatchEvent(j)},onLineStyle:function(j){return this.dispatchEvent(j)},onKeyDown:function(j){return this.dispatchEvent(j)},onKeyPress:function(j){return this.dispatchEvent(j)},onKeyUp:function(j){return this.dispatchEvent(j)},onModelChanged:function(j){return this.dispatchEvent(j)},onModelChanging:function(j){return this.dispatchEvent(j)},
+onModify:function(j){return this.dispatchEvent(j)},onMouseDown:function(j){return this.dispatchEvent(j)},onMouseUp:function(j){return this.dispatchEvent(j)},onMouseMove:function(j){return this.dispatchEvent(j)},onMouseOver:function(j){return this.dispatchEvent(j)},onMouseOut:function(j){return this.dispatchEvent(j)},onSelection:function(j){return this.dispatchEvent(j)},onScroll:function(j){return this.dispatchEvent(j)},onVerify:function(j){return this.dispatchEvent(j)},onFocus:function(j){return this.dispatchEvent(j)},
+onBlur:function(j){return this.dispatchEvent(j)},redraw:function(){if(!(this._redrawCount>0)){var j=this._model.getLineCount();this.redrawRulers(0,j);this.redrawLines(0,j)}},redrawRulers:function(j,a){if(!(this._redrawCount>0))for(var b=this.getRulers(),e=0;e<b.length;e++)this.redrawLines(j,a,b[e])},redrawLines:function(j,a,b){if(!(this._redrawCount>0)&&(j===void 0&&(j=0),a===void 0&&(a=this._model.getLineCount()),j!==a)){var e=this._clientDiv;if(e){if(b)for(e=this._getRulerParent(b).firstChild;e;){if(e._ruler===
+b)break;e=e.nextSibling}b?e.rulerChanged=!0:this._lineHeight&&this._resetLineHeight(j,a);if(!b||b.getOverview()==="page")for(e=e.firstChild;e;){var c=e.lineIndex;if(j<=c&&c<a)e.lineChanged=!0;e=e.nextSibling}if(!b&&!this._wrapMode&&j<=this._maxLineIndex&&this._maxLineIndex<a)this._checkMaxLineIndex=this._maxLineIndex,this._maxLineIndex=-1,this._maxLineWidth=0;this._queueUpdate()}}},redrawRange:function(j,a){if(!(this._redrawCount>0)){var b=this._model;j===void 0&&(j=0);a===void 0&&(a=b.getCharCount());
+var e=b.getLineAtOffset(j),b=b.getLineAtOffset(Math.max(j,a-1))+1;this.redrawLines(e,b)}},removeKeyMode:function(j){for(var a=this._keyModes,b=0;b<a.length;b++)if(a[b]===j){a.splice(b,1);break}j._modeRemoved&&j._modeRemoved()},removeRuler:function(j){for(var a=this._rulers,b=0;b<a.length;b++)if(a[b]===j){a.splice(b,1);j.setView(null);this._destroyRuler(j);this._update();break}},resize:function(){this._clientDiv&&this._handleResize(null)},setAction:function(j,a,b){if(j){var e=this._actions,c=e[j];
+c||(c=e[j]={});c.handler=a;if(b!==void 0)c.actionDescription=b}},setKeyBinding:function(j,a){this._keyModes[0].setKeyBinding(j,a)},setCaretOffset:function(j,a,b){var e=this._model.getCharCount(),j=Math.max(0,Math.min(j,e));this._setSelection(new q(j,j,!1),a===void 0||a,!0,b)},setHorizontalPixel:function(j){this._clientDiv&&(j=Math.max(0,j),this._scrollView(j-this._getScroll().x,0))},setRedraw:function(j){j?--this._redrawCount===0&&this.redraw():this._redrawCount++},setModel:function(j){if(j&&j!==
+this._model){this._model.removeEventListener("preChanging",this._modelListener.onChanging);this._model.removeEventListener("postChanged",this._modelListener.onChanged);var a=this._model.getLineCount(),b=this._model.getCharCount(),e=j.getLineCount(),c=j.getCharCount(),l={type:"ModelChanging",text:j.getText(),start:0,removedCharCount:b,addedCharCount:c,removedLineCount:a,addedLineCount:e};this.onModelChanging(l);this._model=j;l={type:"ModelChanged",start:0,removedCharCount:b,addedCharCount:c,removedLineCount:a,
+addedLineCount:e};this.onModelChanged(l);this._model.addEventListener("preChanging",this._modelListener.onChanging);this._model.addEventListener("postChanged",this._modelListener.onChanged);this._reset();this._update()}},setOptions:function(j){var b=this._defaultOptions(),e;for(e in j)if(j.hasOwnProperty(e)){var c=j[e];if(!a(this["_"+e],c)){var l=b[e]?b[e].update:null;l?l.call(this,c):this["_"+e]=h(c)}}},setSelection:function(j,a,b,e){var c=j>a;if(c)var l=j,j=a,a=l;l=this._model.getCharCount();j=
+Math.max(0,Math.min(j,l));a=Math.max(0,Math.min(a,l));this._setSelection(new q(j,a,c),b===void 0||b,!0,e)},setText:function(j,a,b){var e=a===void 0&&b===void 0;a===void 0&&(a=0);b===void 0&&(b=this._model.getCharCount());if(e)this._variableLineHeight=!1;this._modifyContent({text:j,start:a,end:b,_code:!0},!e);if(e)this._columnX=-1,this._setSelection(new q(0,0,!1),!0),f.isFirefox&&this._fixCaret()},setTopIndex:function(j){this._clientDiv&&this._scrollView(0,this._getLinePixel(Math.max(0,j))-this._getScroll().y)},
+setTopPixel:function(j){this._clientDiv&&this._scrollView(0,Math.max(0,j)-this._getScroll().y)},showSelection:function(){return this._showCaret(!0)},update:function(j,a){this._clientDiv&&(j&&this._updateStyle(),a===void 0||a?this._update():this._queueUpdate())},_handleRootMouseDown:function(j){if(!this._ignoreEvent(j)){if(f.isFirefox&&j.which===1)this._clientDiv.contentEditable=!1,this._ignoreBlur=(this._overlayDiv||this._clientDiv).draggable=!0;var a=this._overlayDiv||this._clientDiv;if(f.isIE<9)a=
+this._viewDiv;for(var b=j.target?j.target:j.srcElement;b;){if(a===b)return;b=b.parentNode}j.preventDefault&&j.preventDefault();j.stopPropagation&&j.stopPropagation();if(!this._isW3CEvents){var e=this;this._getWindow().setTimeout(function(){e._clientDiv.focus()},0)}}},_handleRootMouseUp:function(j){if(!this._ignoreEvent(j)&&f.isFirefox&&j.which===1)this._clientDiv.contentEditable=!0,(this._overlayDiv||this._clientDiv).draggable=!1,this._fixCaret(),this._ignoreBlur=!1},_handleBlur:function(){if(!this._ignoreBlur){this._hasFocus=
+!1;if(f.isIE<9&&!this._getSelection().isEmpty()){var j=this._rootDiv,a=f.createElement(j.ownerDocument,"div");j.appendChild(a);j.removeChild(a)}if(this._cursorDiv)this._cursorDiv.style.display="none";if(this._selDiv1)if(this._selDiv1.style.background="lightgray",this._selDiv2.style.background="lightgray",this._selDiv3.style.background="lightgray",j=this._getWindow(),a=this._selDiv1.ownerDocument,j.getSelection){a=j.getSelection();for(j=a.anchorNode;j;){if(j===this._clientDiv){a.rangeCount>0&&a.removeAllRanges();
+break}j=j.parentNode}}else if(a.selection){this._ignoreSelect=!1;for(j=a.selection.createRange().parentElement();j;){if(j===this._clientDiv){a.selection.empty();break}j=j.parentNode}this._ignoreSelect=!0}if(!this._ignoreFocus)this.onBlur({type:"Blur"})}},_handleContextMenu:function(j){if(!this._ignoreEvent(j)){f.isIE&&this._lastMouseButton===3&&this._updateDOMSelection();var a=!1;this.isListening("ContextMenu")?(a=this._createMouseEvent("ContextMenu",j),a.screenX=j.screenX,a.screenY=j.screenY,this.onContextMenu(a),
+a=a.defaultPrevented):f.isMac&&f.isFirefox&&j.button===0&&(a=!0);if(a)return j.preventDefault&&j.preventDefault(),!1}},_handleCopy:function(j){if(!this._ignoreEvent(j)&&!this._ignoreCopy&&this._doCopy(j))return j.preventDefault&&j.preventDefault(),!1},_handleCut:function(j){if(!this._ignoreEvent(j)&&this._doCut(j))return j.preventDefault&&j.preventDefault(),!1},_handleDataModified:function(j){this._ignoreEvent(j)||this._startIME()},_handleDblclick:function(j){if(!this._ignoreEvent(j)&&(this._lastMouseTime=
+j.timeStamp?j.timeStamp:(new Date).getTime(),this._clickCount!==2))this._clickCount=2,this._handleMouse(j)},_handleDragStart:function(j){if(!this._ignoreEvent(j)){if(f.isFirefox){var a=this;this._getWindow().setTimeout(function(){a._clientDiv.contentEditable=!0;a._clientDiv.draggable=!1;a._ignoreBlur=!1},0)}if(this.isListening("DragStart")&&this._dragOffset!==-1)this._isMouseDown=!1,this.onDragStart(this._createMouseEvent("DragStart",j)),this._dragOffset=-1;else return j.preventDefault&&j.preventDefault(),
+!1}},_handleDrag:function(j){if(!this._ignoreEvent(j)&&this.isListening("Drag"))this.onDrag(this._createMouseEvent("Drag",j))},_handleDragEnd:function(j){if(!this._ignoreEvent(j)){this._dropTarget=!1;this._dragOffset=-1;if(this.isListening("DragEnd"))this.onDragEnd(this._createMouseEvent("DragEnd",j));f.isFirefox&&(this._fixCaret(),j.dataTransfer.dropEffect==="none"&&!j.dataTransfer.mozUserCancelled&&this._fixCaret())}},_handleDragEnter:function(j){if(!this._ignoreEvent(j)){var a=!0;this._dropTarget=
+!0;this.isListening("DragEnter")&&(a=!1,this.onDragEnter(this._createMouseEvent("DragEnter",j)));if(f.isWebkit||a)return j.preventDefault&&j.preventDefault(),!1}},_handleDragOver:function(j){if(!this._ignoreEvent(j)){var a=!0;this.isListening("DragOver")&&(a=!1,this.onDragOver(this._createMouseEvent("DragOver",j)));if(f.isWebkit||a){if(a)j.dataTransfer.dropEffect="none";j.preventDefault&&j.preventDefault();return!1}}},_handleDragLeave:function(j){if(!this._ignoreEvent(j)&&(this._dropTarget=!1,this.isListening("DragLeave")))this.onDragLeave(this._createMouseEvent("DragLeave",
+j))},_handleDrop:function(j){if(!this._ignoreEvent(j)){this._dropTarget=!1;if(this.isListening("Drop"))this.onDrop(this._createMouseEvent("Drop",j));j.preventDefault&&j.preventDefault();return!1}},_handleFocus:function(){this._hasFocus=!0;f.isIOS&&this._lastTouchOffset!==void 0?(this.setCaretOffset(this._lastTouchOffset,!0),this._lastTouchOffset=void 0):this._updateDOMSelection();if(this._cursorDiv)this._cursorDiv.style.display="block";if(this._selDiv1){var j=this._highlightRGB;this._selDiv1.style.background=
+j;this._selDiv2.style.background=j;this._selDiv3.style.background=j}if(!this._ignoreFocus)this.onFocus({type:"Focus"})},_handleKeyDown:function(j){if(!this._ignoreEvent(j)){if(this.isListening("KeyDown")){var a=this._createKeyEvent("KeyDown",j);this.onKeyDown(a);if(a.defaultPrevented){if(f.isFirefox)this._keyDownPrevented=!0;j.preventDefault();return}}a=!1;switch(j.keyCode){case 16:case 17:case 18:case 91:a=!0;break;default:this._setLinksVisible(!1)}if(j.keyCode===229){if(this._readonly)return j.preventDefault&&
+j.preventDefault(),!1;a=!0;if(f.isSafari&&f.isMac&&j.ctrlKey)a=!1,j.keyCode=129;a&&this._startIME()}else a||this._commitIME();if((f.isMac||f.isLinux)&&f.isFirefox<4||f.isOpera<12.16)return this._keyDownEvent=j,!0;if(this._doAction(j))return j.preventDefault?(j.preventDefault(),j.stopPropagation()):(j.cancelBubble=!0,j.returnValue=!1,j.keyCode=0),!1}},_handleKeyPress:function(j){if(!this._ignoreEvent(j))if(this._keyDownPrevented)j.preventDefault&&(j.preventDefault(),j.stopPropagation()),this._keyDownPrevented=
+void 0;else{if(f.isMac&&f.isWebkit&&(63232<=j.keyCode&&j.keyCode<=63487||j.keyCode===13||j.keyCode===8))return j.preventDefault&&j.preventDefault(),!1;if(((f.isMac||f.isLinux)&&f.isFirefox<4||f.isOpera<12.16)&&this._doAction(this._keyDownEvent))return j.preventDefault&&j.preventDefault(),!1;var a=f.isMac?j.metaKey:j.ctrlKey;if(j.charCode!==void 0&&a)switch(j.charCode){case 99:case 118:case 120:return!0}if(this.isListening("KeyPress")&&(a=this._createKeyEvent("KeyPress",j),this.onKeyPress(a),a.defaultPrevented)){j.preventDefault();
+return}if(this._doAction(j))return j.preventDefault?(j.preventDefault(),j.stopPropagation()):(j.cancelBubble=!0,j.returnValue=!1,j.keyCode=0),!1;a=!1;if(f.isMac){if(j.ctrlKey||j.metaKey)a=!0}else if(f.isFirefox){if(j.ctrlKey||j.altKey)a=!0}else j.ctrlKey^j.altKey&&(a=!0);if(!a&&(a=f.isOpera?j.which:j.charCode!==void 0?j.charCode:j.keyCode,a>31))return this._doContent(String.fromCharCode(a)),j.preventDefault&&j.preventDefault(),!1}},_handleDocKeyUp:function(j){(f.isMac?j.metaKey:j.ctrlKey)||this._setLinksVisible(!1)},
+_handleKeyUp:function(j){if(!this._ignoreEvent(j)){if(this.isListening("KeyUp")){var a=this._createKeyEvent("KeyUp",j);this.onKeyUp(a);if(a.defaultPrevented){j.preventDefault();return}}this._handleDocKeyUp(j);j.keyCode===13&&this._commitIME()}},_handleLinkClick:function(j){if(!(f.isMac?j.metaKey:j.ctrlKey))return j.preventDefault&&j.preventDefault(),!1},_handleMouse:function(j){var a=this._getWindow(),b=!0,e=a;if(f.isIE||f.isFirefox&&!this._overlayDiv)e=this._clientDiv;if(this._overlayDiv){if(this._hasFocus)this._ignoreFocus=
+!0;var c=this;a.setTimeout(function(){c.focus();c._ignoreFocus=!1},0)}this._clickCount===1?(b=this._setSelectionTo(j.clientX,j.clientY,j.shiftKey,(!f.isOpera||f.isOpera>=12.16)&&this._hasFocus&&this.isListening("DragStart")))&&this._setGrab(e):(this._isW3CEvents&&this._setGrab(e),this._doubleClickSelection=null,this._setSelectionTo(j.clientX,j.clientY,j.shiftKey),this._doubleClickSelection=this._getSelection());return b},_handleMouseDown:function(j){if(!this._ignoreEvent(j)){if(this._linksVisible)if((j.target||
+j.srcElement).tagName!=="A")this._setLinksVisible(!1);else return;this._commitIME();var a=j.which;a||(j.button===4&&(a=2),j.button===2&&(a=3),j.button===1&&(a=1));var b=a!==2&&j.timeStamp?j.timeStamp:(new Date).getTime(),e=b-this._lastMouseTime,c=Math.abs(this._lastMouseX-j.clientX),l=Math.abs(this._lastMouseY-j.clientY),d=this._lastMouseButton===a;this._lastMouseX=j.clientX;this._lastMouseY=j.clientY;this._lastMouseTime=b;this._lastMouseButton=a;if(a===1)this._isMouseDown=!0,d&&e<=this._clickTime&&
+c<=this._clickDist&&l<=this._clickDist?this._clickCount++:this._clickCount=1;if(this.isListening("MouseDown")&&(b=this._createMouseEvent("MouseDown",j),this.onMouseDown(b),b.defaultPrevented)){j.preventDefault();return}if(a===1&&this._handleMouse(j)&&(f.isIE>=9||f.isOpera||f.isChrome||f.isSafari||f.isFirefox&&!this._overlayDiv))this._hasFocus||this.focus(),j.preventDefault();f.isFirefox&&this._lastMouseButton===3&&this._updateDOMSelection()}},_handleMouseOver:function(j){if(!this._ignoreEvent(j)&&
+!this._animation&&this.isListening("MouseOver"))this.onMouseOver(this._createMouseEvent("MouseOver",j))},_handleMouseOut:function(j){if(!this._ignoreEvent(j)&&!this._animation&&this.isListening("MouseOut"))this.onMouseOut(this._createMouseEvent("MouseOut",j))},_handleMouseMove:function(j){if(!this._animation){var a=this._isClientDiv(j);if(this.isListening("MouseMove")&&a)this.onMouseMove(this._createMouseEvent("MouseMove",j));if(!this._dropTarget){var b=this._linksVisible||this._lastMouseMoveX!==
+j.clientX||this._lastMouseMoveY!==j.clientY;this._lastMouseMoveX=j.clientX;this._lastMouseMoveY=j.clientY;this._setLinksVisible(b&&!this._isMouseDown&&(f.isMac?j.metaKey:j.ctrlKey));if(!this._isW3CEvents){if(j.button===0)return this._setGrab(null),!0;if(!this._isMouseDown&&j.button===1&&(this._clickCount&1)!==0&&a)return this._clickCount=2,this._handleMouse(j,this._clickCount)}if(this._isMouseDown&&this._dragOffset===-1){var a=j.clientX,j=j.clientY,e=this._getViewPadding(),c=this._viewDiv.getBoundingClientRect(),
+l=this._getClientWidth(),d=this._getClientHeight(),b=c.left+e.left,o=c.top+e.top,l=c.left+e.left+l,e=c.top+e.top+d;j<o?this._doAutoScroll("up",a,j-o):j>e?this._doAutoScroll("down",a,j-e):a<b&&!this._wrapMode?this._doAutoScroll("left",a-b,j):a>l&&!this._wrapMode?this._doAutoScroll("right",a-l,j):(this._endAutoScroll(),this._setSelectionTo(a,j,!0))}}}},_isClientDiv:function(j){for(var a=this._overlayDiv||this._clientDiv,j=j.target?j.target:j.srcElement;j;){if(a===j)return!0;j=j.parentNode}return!1},
+_createKeyEvent:function(j,a){return{type:j,event:a,preventDefault:function(){this.defaultPrevented=!0}}},_createMouseEvent:function(j,a){var b=this.convert({x:a.clientX,y:a.clientY},"page","document");return{type:j,event:a,clickCount:this._clickCount,x:b.x,y:b.y,preventDefault:function(){this.defaultPrevented=!0}}},_handleMouseUp:function(j){var a=j.which?j.button===0:j.button===1;if(this.isListening("MouseUp")&&(this._isClientDiv(j)||a&&this._isMouseDown))this.onMouseUp(this._createMouseEvent("MouseUp",
+j));if(!this._linksVisible&&a&&this._isMouseDown){if(this._dragOffset!==-1)a=this._getSelection(),a.extend(this._dragOffset),a.collapse(),this._setSelection(a,!0,!0),this._dragOffset=-1;this._isMouseDown=!1;this._endAutoScroll();this._isW3CEvents&&this._setGrab(null);f.isFirefox&&j.preventDefault()}},_handleMouseWheel:function(j){var a=this._getLineHeight(),b=0,e=0;f.isIE||f.isOpera?e=-j.wheelDelta/40*a:f.isFirefox?(a=f.isMac?j.detail*3:Math.max(-256,Math.min(256,j.detail))*a,j.axis===j.HORIZONTAL_AXIS?
+b=a:e=a):f.isMac?(e=j.timeStamp-this._wheelTimeStamp,this._wheelTimeStamp=j.timeStamp,b=j.wheelDeltaX%120!==0?1:e<40?40/(40-e):40,e=j.wheelDeltaY%120!==0?1:e<40?40/(40-e):40,b=Math.ceil(-j.wheelDeltaX/b),-1<b&&b<0&&(b=-1),0<b&&b<1&&(b=1),e=Math.ceil(-j.wheelDeltaY/e),-1<e&&e<0&&(e=-1),0<e&&e<1&&(e=1)):(b=-j.wheelDeltaX,e=-j.wheelDeltaY/120*8*a);if(f.isSafari){for(a=j.target;a&&a.lineIndex===void 0;)a=a.parentNode;this._mouseWheelLine=a}a=this._getScroll();this._scrollView(b,e);b=this._getScroll();
+if(a.x!==b.x||a.y!==b.y)return j.preventDefault&&j.preventDefault(),!1},_handlePaste:function(j){if(!this._ignoreEvent(j)&&!this._ignorePaste&&this._doPaste(j)){if(f.isIE){var a=this;this._ignoreFocus=!0;this._getWindow().setTimeout(function(){a._updateDOMSelection();a._ignoreFocus=!1},0)}j.preventDefault&&j.preventDefault();return!1}},_handleResize:function(){var j=this._rootDiv.clientWidth,b=this._rootDiv.clientHeight;if(this._rootWidth!==j||this._rootHeight!==b){this._rootWidth!==j&&this._wrapMode&&
+this._resetLineHeight();this._rootWidth=j;this._rootHeight=b;j=f.isIE<9;b=this._calculateMetrics();if(!a(b,this._metrics)){if(this._variableLineHeight)this._variableLineHeight=!1,this._resetLineHeight();this._metrics=b;j=!0}j?this._queueUpdate():this._update()}},_handleRulerEvent:function(j){for(var a=j.target?j.target:j.srcElement,b=a.lineIndex;a&&!a._ruler;){if(b===void 0&&a.lineIndex!==void 0)b=a.lineIndex;a=a.parentNode}var e=a?a._ruler:null;if(b===void 0&&e&&e.getOverview()==="document"){var b=
+this._getClientHeight(),c=this._model.getLineCount(),l=this._getViewPadding(),f=this._viewDiv.getBoundingClientRect(),b=Math.floor((j.clientY-f.top-this._metrics.scrollWidth)*c/(b+l.top+l.bottom-2*this._metrics.scrollWidth));0<=b&&b<c||(b=void 0)}if(e)switch(j.type){case "click":if(e.onClick)e.onClick(b,j);break;case "dblclick":if(e.onDblClick)e.onDblClick(b,j);break;case "mousemove":if(e.onMouseMove)e.onMouseMove(b,j);break;case "mouseover":if(e.onMouseOver)e.onMouseOver(b,j);break;case "mouseout":if(e.onMouseOut){for(c=
+j.relatedTarget;c&&c!==this._rootDiv;){if(c===a)return;c=c.parentNode}e.onMouseOut(b,j)}}},_handleScroll:function(){var j=this._getScroll(!1),a=this._hScroll,b=this._vScroll;if(a!==j.x||b!==j.y)this._hScroll=j.x,this._vScroll=j.y,this._commitIME(),this._update(b===j.y),this.onScroll({type:"Scroll",oldValue:{x:a,y:b},newValue:j})},_handleSelectStart:function(j){if(this._ignoreSelect)return j&&j.preventDefault&&j.preventDefault(),!1},_getModelOffset:function(j,a){if(j){var b;b=j.tagName==="DIV"?j:j.parentNode.parentNode;
+var e=0,c=b.lineIndex;if(j.tagName!=="DIV")for(b=b.firstChild;b;){var l=b.firstChild;if(l===j){b.ignoreChars&&(e-=b.ignoreChars);e+=a;break}b.ignoreChars&&(e-=b.ignoreChars);e+=l.data.length;b=b.nextSibling}return Math.max(0,e)+this._model.getLineStart(c)}},_updateSelectionFromDOM:function(){var j=this._getWindow().getSelection(),a=this._getModelOffset(j.anchorNode,j.anchorOffset),j=this._getModelOffset(j.focusNode,j.focusOffset);a===void 0||j===void 0||this._setSelection(new q(a,j),!1,!1)},_handleSelectionChange:function(){if(this._imeOffset===
+-1)if(f.isAndroid){var j=this._getWindow();this._selTimer&&j.clearTimeout(this._selTimer);var a=this;this._selTimer=j.setTimeout(function(){if(a._clientDiv)a._selTimer=null,a._updateSelectionFromDOM()},250)}else this._updateSelectionFromDOM()},_handleTextInput:function(j){if(!this._ignoreEvent(j)){this._imeOffset=-1;var a=this._getWindow().getSelection();if(a.anchorNode!==this._anchorNode||a.focusNode!==this._focusNode||a.anchorOffset!==this._anchorOffset||a.focusOffset!==this._focusOffset){for(var b=
+a.anchorNode;b;){if(b.lineIndex!==void 0)break;b=b.parentNode}if(b){var e=this._model,c=b.lineIndex,l=e.getLine(c),f=l,d=0,e=e.getLineStart(c);if(a.rangeCount>0)a.getRangeAt(0).deleteContents(),c=b.ownerDocument.createTextNode(j.data),a.getRangeAt(0).insertNode(c),d=this._getDOMText(b,c),f=d.text,d=d.offset,c.parentNode.removeChild(c);b.lineRemoved=!0;for(b=0;l.charCodeAt(b)===f.charCodeAt(b)&&b<d;)b++;a=l.length-1;for(c=f.length-l.length;l.charCodeAt(a)===f.charCodeAt(a+c)&&a+c>=d+j.data.length;)a--;
+a++;l=f.substring(b,a+c);b+=e;a+=e;this._modifyContent({text:l,start:b,end:a,_ignoreDOMSelection:!0},!0)}}else this._doContent(j.data);j.preventDefault()}},_handleTouchStart:function(j){this._commitIME();var a=this._getWindow();if(this._touchScrollTimer)this._vScrollDiv.style.display="none",this._hScrollDiv.style.display="none",a.clearInterval(this._touchScrollTimer),this._touchScrollTimer=null;var b=j.touches;if(b.length===1){var b=b[0],e=b.clientX,c=b.clientY;this._touchStartX=e;this._touchStartY=
+c;if(f.isAndroid&&(c<b.pageY-a.pageYOffset||e<b.pageX-a.pageXOffset))e=b.pageX-a.pageXOffset,c=b.pageY-a.pageYOffset;a=this.convert({x:e,y:c},"page","document");this._lastTouchOffset=this.getOffsetAtLocation(a.x,a.y);this._touchStartTime=j.timeStamp;this._touching=!0}},_handleTouchMove:function(j){var a=j.touches;if(a.length===1){a=a[0];this._touchCurrentX=a.clientX;this._touchCurrentY=a.clientY;if(!this._touchScrollTimer&&j.timeStamp-this._touchStartTime<200){this._vScrollDiv.style.display="block";
+if(!this._wrapMode)this._hScrollDiv.style.display="block";var b=this,e=this._getWindow();this._touchScrollTimer=e.setInterval(function(){var j=0,a=0;if(b._touching)j=b._touchStartX-b._touchCurrentX,a=b._touchStartY-b._touchCurrentY,b._touchSpeedX=j/10,b._touchSpeedY=a/10,b._touchStartX=b._touchCurrentX,b._touchStartY=b._touchCurrentY;else if(Math.abs(b._touchSpeedX)<0.1&&Math.abs(b._touchSpeedY)<0.1){b._vScrollDiv.style.display="none";b._hScrollDiv.style.display="none";e.clearInterval(b._touchScrollTimer);
+b._touchScrollTimer=null;return}else j=b._touchSpeedX*10,a=b._touchSpeedY*10,b._touchSpeedX*=0.95,b._touchSpeedY*=0.95;b._scrollView(j,a)},10)}this._touchScrollTimer&&j.preventDefault()}},_handleTouchEnd:function(j){if(j.touches.length===0)this._touching=!1},_doAction:function(j){var a,b,e=this._keyModes;for(b=e.length-1;b>=0;b--)if(a=e[b],typeof a.match==="function"&&(a=a.match(j),a!==void 0))return this.invokeAction(a);return!1},_doMove:function(j,a){var b=this._model,e=a.getCaret(),c=b.getLineAtOffset(e);
+if(!j.count)j.count=1;for(;j.count!==0;){var l=b.getLineStart(c);if(j.count<0&&e===l)if(c>0)j.unit==="character"&&j.count++,c--,a.extend(b.getLineEnd(c));else break;else if(j.count>0&&e===b.getLineEnd(c))if(c+1<b.getLineCount())j.unit==="character"&&j.count--,c++,a.extend(b.getLineStart(c));else break;else{var f=!1;j.expandTab&&j.unit==="character"&&(e-l)%this._tabSize===0&&(f=!/[^ ]/.test(b.getText(l,e)));f?(a.extend(e-this._tabSize),j.count+=j.count<0?1:-1):(l=this._getLine(c),a.extend(l.getNextOffset(e,
+j)),l.destroy())}e=a.getCaret()}return a},_doBackspace:function(j){var a=this._getSelection();if(a.isEmpty()){if(!j.count)j.count=1;j.count*=-1;j.expandTab=this._expandTab;this._doMove(j,a)}this._modifyContent({text:"",start:a.start,end:a.end},!0);return!0},_doCase:function(j){var a=this._getSelection();this._doMove(j,a);var b=this.getText(a.start,a.end);this._setSelection(a,!0);switch(j.type){case "lower":b=b.toLowerCase();break;case "capitalize":b=b.replace(/(?:^|\s)\S/g,function(j){return j.toUpperCase()});
+break;case "reverse":j="";for(a=0;a<b.length;a++){var e=b[a],c=e.toLowerCase(),e=c!==e?c:e.toUpperCase();j+=e}b=j;break;default:b=b.toUpperCase()}this._doContent(b);return!0},_doContent:function(j){var a=this._getSelection();if(this._overwriteMode&&a.isEmpty()){var b=this._model,e=b.getLineAtOffset(a.end);a.end<b.getLineEnd(e)&&(b=this._getLine(e),a.extend(b.getNextOffset(a.getCaret(),{unit:"character",count:1})),b.destroy())}this._modifyContent({text:j,start:a.start,end:a.end,_ignoreDOMSelection:!0},
+!0)},_doCopy:function(j){var a=this._getSelection();return!a.isEmpty()?this._setClipboardText(this._getBaseText(a.start,a.end),j):!0},_doCursorNext:function(j){var a=this._getSelection();!a.isEmpty()&&!j.select?a.start=a.end:this._doMove(j,a);j.select||a.collapse();this._setSelection(a,!0);return!0},_doCursorPrevious:function(j){var a=this._getSelection();if(!a.isEmpty()&&!j.select)a.end=a.start;else{if(!j.count)j.count=1;j.count*=-1;this._doMove(j,a)}j.select||a.collapse();this._setSelection(a,!0);
+return!0},_doCut:function(j){var a=this._getSelection();return!a.isEmpty()?(a=this._getBaseText(a.start,a.end),this._doContent(""),this._setClipboardText(a,j)):!0},_doDelete:function(j){var a=this._getSelection();a.isEmpty()&&this._doMove(j,a);this._modifyContent({text:"",start:a.start,end:a.end},!0);return!0},_doEnd:function(j){var a=this._getSelection(),b=this._model,e;if(j.ctrl)a.extend(b.getCharCount()),e=function(){};else{var c=a.getCaret(),l=b.getLineAtOffset(c);if(this._wrapMode){var f=this._getLine(l),
+c=f.getLineIndex(c),c=c===f.getLineCount()-1?b.getLineEnd(l):f.getLineStart(c+1)-1;f.destroy()}else j.count&&j.count>0&&(l=Math.min(l+j.count-1,b.getLineCount()-1)),c=b.getLineEnd(l);a.extend(c)}j.select||a.collapse();this._setSelection(a,!0,!0,e);return!0},_doEnter:function(j){var a=this._model,b=this._getSelection();this._doContent(a.getLineDelimiter());if(j&&j.noCursor)b.end=b.start,this._setSelection(b,!0);return!0},_doHome:function(j){var a=this._getSelection(),b=this._model,e;if(j.ctrl)a.extend(0),
+e=function(){};else{var c=a.getCaret(),l=b.getLineAtOffset(c);this._wrapMode?(b=this._getLine(l),c=b.getLineIndex(c),c=b.getLineStart(c),b.destroy()):c=b.getLineStart(l);a.extend(c)}j.select||a.collapse();this._setSelection(a,!0,!0,e);return!0},_doLineDown:function(j){var a=this._model,b=this._getSelection(),e=b.getCaret(),c=a.getLineAtOffset(e),l=this._getLine(c),d=this._columnX,o=1,g=!1;if(d===-1||j.wholeLine||j.select&&f.isIE)d=j.wholeLine?a.getLineEnd(c+1):e,d=l.getBoundingClientRect(d).left;
+(e=l.getLineIndex(e))<l.getLineCount()-1?o=l.getClientRects(e+1).top+1:(e=a.getLineCount()-1,g=c===e,j.count&&j.count>0?c=Math.min(c+j.count,e):c++);e=!1;if(g){if(j.select||f.isMac||f.isLinux)b.extend(a.getCharCount()),e=!0}else l.lineIndex!==c&&(l.destroy(),l=this._getLine(c)),b.extend(l.getOffset(d,o)),e=!0;e&&(j.select||b.collapse(),this._setSelection(b,!0,!0));this._columnX=d;l.destroy();return!0},_doLineUp:function(a){var b=this._model,e=this._getSelection(),c=e.getCaret(),l=b.getLineAtOffset(c),
+d=this._getLine(l),o=this._columnX,g=!1,h;if(o===-1||a.wholeLine||a.select&&f.isIE)o=a.wholeLine?b.getLineStart(l-1):c,o=d.getBoundingClientRect(o).left;(c=d.getLineIndex(c))>0?h=d.getClientRects(c-1).top+1:(g=l===0,g||(a.count&&a.count>0?l=Math.max(l-a.count,0):l--,h=this._getLineHeight(l)-1));c=!1;if(g){if(a.select||f.isMac||f.isLinux)e.extend(0),c=!0}else d.lineIndex!==l&&(d.destroy(),d=this._getLine(l)),e.extend(d.getOffset(o,h)),c=!0;c&&(a.select||e.collapse(),this._setSelection(e,!0,!0));this._columnX=
+o;d.destroy();return!0},_doNoop:function(){return!0},_doPageDown:function(a){var b=this,e=this._model,c=this._getSelection(),l=c.getCaret(),d=e.getLineAtOffset(l),o=e.getLineCount(),g=this._getScroll(),e=this._getClientHeight(),h,p;if(this._lineHeight){h=this._columnX;g=this._getBoundsAtOffset(l);if(h===-1||a.select&&f.isIE)h=g.left;l=this._getLineIndex(g.top+e);p=this._getLine(l);d=this._getLinePixel(l);l=p.getOffset(h,g.top+e-d);e=p.getBoundingClientRect(l);p.destroy();c.extend(l);a.select||c.collapse();
+this._setSelection(c,!0,!0,function(){b._columnX=h},e.top+d-g.top);return!0}if(d<o-1){var i=this._getLineHeight(),q=Math.min(o-d-1,Math.floor(e/i)),q=Math.max(1,q);h=this._columnX;if(h===-1||a.select&&f.isIE)p=this._getLine(d),h=p.getBoundingClientRect(l).left,p.destroy();p=this._getLine(d+q);c.extend(p.getOffset(h,0));p.destroy();a.select||c.collapse();a=o*i;l=g.y+q*i;l+e>a&&(l=a-e);this._setSelection(c,!0,!0,function(){b._columnX=h},l-g.y)}return!0},_doPageUp:function(a){var b=this,e=this._model,
+c=this._getSelection(),l=c.getCaret(),d=e.getLineAtOffset(l),o=this._getScroll(),g=this._getClientHeight(),h;if(this._lineHeight){h=this._columnX;o=this._getBoundsAtOffset(l);if(h===-1||a.select&&f.isIE)h=o.left;l=this._getLineIndex(o.bottom-g);e=this._getLine(l);d=this._getLinePixel(l);l=e.getOffset(h,o.bottom-g-d);g=e.getBoundingClientRect(l);e.destroy();c.extend(l);a.select||c.collapse();this._setSelection(c,!0,!0,function(){b._columnX=h},g.top+d-o.top);return!0}if(d>0){var p=this._getLineHeight(),
+g=Math.max(1,Math.min(d,Math.floor(g/p)));h=this._columnX;if(h===-1||a.select&&f.isIE)e=this._getLine(d),h=e.getBoundingClientRect(l).left,e.destroy();e=this._getLine(d-g);c.extend(e.getOffset(h,this._getLineHeight(d-g)-1));e.destroy();a.select||c.collapse();a=Math.max(0,o.y-g*p);this._setSelection(c,!0,!0,function(){b._columnX=h},a-o.y)}return!0},_doPaste:function(a){var b=this;return this._getClipboardText(a,function(a){a&&(f.isLinux&&b._lastMouseButton===2&&(new Date).getTime()-b._lastMouseTime<=
+b._clickTime&&b._setSelectionTo(b._lastMouseX,b._lastMouseY),b._doContent(a))})!==null},_doScroll:function(a){var b=a.type,e=this._model,c=e.getLineCount(),a=this._getClientHeight(),l=this._getLineHeight();c*=l;var f=this._getScroll().y,d;switch(b){case "textStart":d=0;break;case "textEnd":d=c-a;break;case "pageDown":d=f+a;break;case "pageUp":d=f-a;break;case "lineDown":d=f+l;break;case "lineUp":d=f-l;break;case "centerLine":b=this._getSelection(),d=e.getLineAtOffset(b.start),e=(e.getLineAtOffset(b.end)-
+d+1)*l,d=d*l-a/2+e/2}d!==void 0&&(d=Math.min(Math.max(0,d),c-a),this._scrollViewAnimated(0,d-f,function(){}));return!0},_doSelectAll:function(){var a=this._model,b=this._getSelection();b.setCaret(0);b.extend(a.getCharCount());this._setSelection(b,!1);return!0},_doTab:function(){if(this._tabMode&&!this._readonly){var a="\t";if(this._expandTab)var b=this._model,a=this._getSelection().getCaret(),e=b.getLineAtOffset(a),b=b.getLineStart(e),a=Array(this._tabSize-(a-b)%this._tabSize+1).join(" ");this._doContent(a);
+return!0}},_doShiftTab:function(){return!this._tabMode||this._readonly?void 0:!0},_doOverwriteMode:function(){if(!this._readonly)return this.setOptions({overwriteMode:!this.getOptions("overwriteMode")}),!0},_doTabMode:function(){this._tabMode=!this._tabMode;return!0},_doWrapMode:function(){this.setOptions({wrapMode:!this.getOptions("wrapMode")});return!0},_autoScroll:function(){var a=this._model,b=this._getSelection(),e=this.convert({x:this._autoScrollX,y:this._autoScrollY},"page","document"),c=b.getCaret(),
+l=a.getLineCount(),d=a.getLineAtOffset(c),o;if(this._autoScrollDir==="up"||this._autoScrollDir==="down")c=this._autoScrollY/this._getLineHeight(),c=c<0?Math.floor(c):Math.ceil(c),o=Math.max(0,Math.min(l-1,d+c));else if(this._autoScrollDir==="left"||this._autoScrollDir==="right")o=this._getLineIndex(e.y),d=this._getLine(d),e.x+=d.getBoundingClientRect(c,!1).left,d.destroy();o===0&&(f.isMac||f.isLinux)?b.extend(0):o===l-1&&(f.isMac||f.isLinux)?b.extend(a.getCharCount()):(d=this._getLine(o),b.extend(d.getOffset(e.x,
+e.y-this._getLinePixel(o))),d.destroy());this._setSelection(b,!0)},_autoScrollTimer:function(){this._autoScroll();var a=this;this._autoScrollTimerID=this._getWindow().setTimeout(function(){a._autoScrollTimer()},this._AUTO_SCROLL_RATE)},_calculateLineHeightTimer:function(a){if(this._lineHeight&&!this._calculateLHTimer){var b=this._model.getLineCount(),e=0;if(a){for(var a=0,c=(new Date).getTime(),l=0;e<b;)if(this._lineHeight[e]||(a++,l||(l=e),this._lineHeight[e]=this._calculateLineHeight(e)),e++,(new Date).getTime()-
+c>100)break;this.redrawRulers(0,b);this._queueUpdate()}a=this._getWindow();if(e!==b){var f=this;this._calculateLHTimer=a.setTimeout(function(){f._calculateLHTimer=null;f._calculateLineHeightTimer(!0)},0)}else if(this._calculateLHTimer)a.clearTimeout(this._calculateLHTimer),this._calculateLHTimer=void 0}},_calculateLineHeight:function(a){var a=this._getLine(a),b=a.getBoundingClientRect();a.destroy();return Math.max(1,b.bottom-b.top)},_calculateMetrics:function(){var a=this._clientDiv,b=a.ownerDocument,
+e=f.createElement(b,"div");e.style.lineHeight="normal";var c={type:"LineStyle",textView:this,0:0,lineText:this._model.getLine(0),lineStart:0};this.onLineStyle(c);g(c.style,e);e.style.position="fixed";e.style.left="-1000px";var d=f.createElement(b,"span");d.appendChild(b.createTextNode(" "));e.appendChild(d);var h=f.createElement(b,"span");h.style.fontStyle="italic";h.appendChild(b.createTextNode(" "));e.appendChild(h);var p=f.createElement(b,"span");p.style.fontWeight="bold";p.appendChild(b.createTextNode(" "));
+e.appendChild(p);c=f.createElement(b,"span");c.style.fontWeight="bold";c.style.fontStyle="italic";c.appendChild(b.createTextNode(" "));e.appendChild(c);a.appendChild(e);var i=e.getBoundingClientRect(),d=d.getBoundingClientRect(),h=h.getBoundingClientRect(),p=p.getBoundingClientRect(),c=c.getBoundingClientRect(),d=d.bottom-d.top,h=h.bottom-h.top,p=p.bottom-p.top,q=c.bottom-c.top,r=0,c=i.bottom-i.top<=0,i=Math.max(1,i.bottom-i.top);h>d&&(r=1);p>h&&(r=2);q>p&&(r=3);var s;if(r!==0){s={style:{}};if((r&
+1)!==0)s.style.fontStyle="italic";if((r&2)!==0)s.style.fontWeight="bold"}d=o(e);a.removeChild(e);q=l(this._viewDiv);e=f.createElement(b,"div");e.style.position="fixed";e.style.left="-1000px";e.style.paddingLeft=q.left+"px";e.style.paddingTop=q.top+"px";e.style.paddingRight=q.right+"px";e.style.paddingBottom=q.bottom+"px";e.style.width="100px";e.style.height="100px";q=f.createElement(b,"div");q.style.width="100%";q.style.height="100%";e.appendChild(q);a.appendChild(e);r=e.getBoundingClientRect();h=
+q.getBoundingClientRect();p=0;if(!this._singleMode)e.style.overflow="hidden",q.style.height="200px",p=e.clientWidth,e.style.overflow="scroll",p-=e.clientWidth;a.removeChild(e);q={left:h.left-r.left,top:h.top-r.top,right:r.right-h.right,bottom:r.bottom-h.bottom};h=r=0;if(!c&&(this._wrapOffset||this._marginOffset))e=f.createElement(b,"div"),e.style.position="fixed",e.style.left="-1000px",e.innerHTML=Array(this._wrapOffset+1).join(" "),a.appendChild(e),r=e.getBoundingClientRect(),r=Math.ceil(r.right-
+r.left),e.innerHTML=Array(this._marginOffset+1).join(" "),h=e.getBoundingClientRect(),h=Math.ceil(h.right-h.left),a.removeChild(e);return{lineHeight:i,largestFontStyle:s,lineTrim:d,viewPadding:q,scrollWidth:p,wrapWidth:r,marginWidth:h,invalid:c}},_cancelAnimation:function(){if(this._animation)this._animation.stop(),this._animation=null},_clearSelection:function(a){var b=this._getSelection();if(b.isEmpty())return!1;a==="next"?b.start=b.end:b.end=b.start;this._setSelection(b,!0);return!0},_commitIME:function(){if(this._imeOffset!==
+-1){this._scrollDiv.focus();this._clientDiv.focus();var a=this._model,b=a.getLineAtOffset(this._imeOffset),e=a.getLineStart(b),c=this._getDOMText(this._getLineNode(b)).text,a=a.getLine(b),e=this._imeOffset-e,a=e+c.length-a.length;e!==a&&this._doContent(c.substring(e,a));this._imeOffset=-1}},_createActions:function(){this.addKeyMode(new n.DefaultKeyMode(this));var a=this;this._actions={noop:{defaultHandler:function(){return a._doNoop()}},lineUp:{defaultHandler:function(e){return a._doLineUp(b(e,{select:!1}))},
+actionDescription:{name:k.lineUp}},lineDown:{defaultHandler:function(e){return a._doLineDown(b(e,{select:!1}))},actionDescription:{name:k.lineDown}},lineStart:{defaultHandler:function(e){return a._doHome(b(e,{select:!1,ctrl:!1}))},actionDescription:{name:k.lineStart}},lineEnd:{defaultHandler:function(e){return a._doEnd(b(e,{select:!1,ctrl:!1}))},actionDescription:{name:k.lineEnd}},charPrevious:{defaultHandler:function(e){return a._doCursorPrevious(b(e,{select:!1,unit:"character"}))},actionDescription:{name:k.charPrevious}},
+charNext:{defaultHandler:function(e){return a._doCursorNext(b(e,{select:!1,unit:"character"}))},actionDescription:{name:k.charNext}},pageUp:{defaultHandler:function(e){return a._doPageUp(b(e,{select:!1}))},actionDescription:{name:k.pageUp}},pageDown:{defaultHandler:function(e){return a._doPageDown(b(e,{select:!1}))},actionDescription:{name:k.pageDown}},scrollPageUp:{defaultHandler:function(e){return a._doScroll(b(e,{type:"pageUp"}))},actionDescription:{name:k.scrollPageUp}},scrollPageDown:{defaultHandler:function(e){return a._doScroll(b(e,
+{type:"pageDown"}))},actionDescription:{name:k.scrollPageDown}},scrollLineUp:{defaultHandler:function(e){return a._doScroll(b(e,{type:"lineUp"}))},actionDescription:{name:k.scrollLineUp}},scrollLineDown:{defaultHandler:function(e){return a._doScroll(b(e,{type:"lineDown"}))},actionDescription:{name:k.scrollLineDown}},wordPrevious:{defaultHandler:function(e){return a._doCursorPrevious(b(e,{select:!1,unit:"word"}))},actionDescription:{name:k.wordPrevious}},wordNext:{defaultHandler:function(e){return a._doCursorNext(b(e,
+{select:!1,unit:"word"}))},actionDescription:{name:k.wordNext}},textStart:{defaultHandler:function(e){return a._doHome(b(e,{select:!1,ctrl:!0}))},actionDescription:{name:k.textStart}},textEnd:{defaultHandler:function(e){return a._doEnd(b(e,{select:!1,ctrl:!0}))},actionDescription:{name:k.textEnd}},scrollTextStart:{defaultHandler:function(e){return a._doScroll(b(e,{type:"textStart"}))},actionDescription:{name:k.scrollTextStart}},scrollTextEnd:{defaultHandler:function(e){return a._doScroll(b(e,{type:"textEnd"}))},
+actionDescription:{name:k.scrollTextEnd}},centerLine:{defaultHandler:function(e){return a._doScroll(b(e,{type:"centerLine"}))},actionDescription:{name:k.centerLine}},selectLineUp:{defaultHandler:function(e){return a._doLineUp(b(e,{select:!0}))},actionDescription:{name:k.selectLineUp}},selectLineDown:{defaultHandler:function(e){return a._doLineDown(b(e,{select:!0}))},actionDescription:{name:k.selectLineDown}},selectWholeLineUp:{defaultHandler:function(e){return a._doLineUp(b(e,{select:!0,wholeLine:!0}))},
+actionDescription:{name:k.selectWholeLineUp}},selectWholeLineDown:{defaultHandler:function(e){return a._doLineDown(b(e,{select:!0,wholeLine:!0}))},actionDescription:{name:k.selectWholeLineDown}},selectLineStart:{defaultHandler:function(e){return a._doHome(b(e,{select:!0,ctrl:!1}))},actionDescription:{name:k.selectLineStart}},selectLineEnd:{defaultHandler:function(e){return a._doEnd(b(e,{select:!0,ctrl:!1}))},actionDescription:{name:k.selectLineEnd}},selectCharPrevious:{defaultHandler:function(e){return a._doCursorPrevious(b(e,
+{select:!0,unit:"character"}))},actionDescription:{name:k.selectCharPrevious}},selectCharNext:{defaultHandler:function(e){return a._doCursorNext(b(e,{select:!0,unit:"character"}))},actionDescription:{name:k.selectCharNext}},selectPageUp:{defaultHandler:function(e){return a._doPageUp(b(e,{select:!0}))},actionDescription:{name:k.selectPageUp}},selectPageDown:{defaultHandler:function(e){return a._doPageDown(b(e,{select:!0}))},actionDescription:{name:k.selectPageDown}},selectWordPrevious:{defaultHandler:function(e){return a._doCursorPrevious(b(e,
+{select:!0,unit:"word"}))},actionDescription:{name:k.selectWordPrevious}},selectWordNext:{defaultHandler:function(e){return a._doCursorNext(b(e,{select:!0,unit:"word"}))},actionDescription:{name:k.selectWordNext}},selectTextStart:{defaultHandler:function(e){return a._doHome(b(e,{select:!0,ctrl:!0}))},actionDescription:{name:k.selectTextStart}},selectTextEnd:{defaultHandler:function(e){return a._doEnd(b(e,{select:!0,ctrl:!0}))},actionDescription:{name:k.selectTextEnd}},deletePrevious:{defaultHandler:function(e){return a._doBackspace(b(e,
+{unit:"character"}))},actionDescription:{name:k.deletePrevious}},deleteNext:{defaultHandler:function(e){return a._doDelete(b(e,{unit:"character"}))},actionDescription:{name:k.deleteNext}},deleteWordPrevious:{defaultHandler:function(e){return a._doBackspace(b(e,{unit:"word"}))},actionDescription:{name:k.deleteWordPrevious}},deleteWordNext:{defaultHandler:function(e){return a._doDelete(b(e,{unit:"word"}))},actionDescription:{name:k.deleteWordNext}},deleteLineStart:{defaultHandler:function(e){return a._doBackspace(b(e,
+{unit:"line"}))},actionDescription:{name:k.deleteLineStart}},deleteLineEnd:{defaultHandler:function(e){return a._doDelete(b(e,{unit:"line"}))},actionDescription:{name:k.deleteLineEnd}},tab:{defaultHandler:function(){return a._doTab()},actionDescription:{name:k.tab}},shiftTab:{defaultHandler:function(){return a._doShiftTab()},actionDescription:{name:k.shiftTab}},enter:{defaultHandler:function(){return a._doEnter()},actionDescription:{name:k.enter}},enterNoCursor:{defaultHandler:function(e){return a._doEnter(b(e,
+{noCursor:!0}))},actionDescription:{name:k.enterNoCursor}},selectAll:{defaultHandler:function(){return a._doSelectAll()},actionDescription:{name:k.selectAll}},copy:{defaultHandler:function(){return a._doCopy()},actionDescription:{name:k.copy}},cut:{defaultHandler:function(){return a._doCut()},actionDescription:{name:k.cut}},paste:{defaultHandler:function(){return a._doPaste()},actionDescription:{name:k.paste}},uppercase:{defaultHandler:function(e){return a._doCase(b(e,{type:"upper"}))},actionDescription:{name:k.uppercase}},
+lowercase:{defaultHandler:function(e){return a._doCase(b(e,{type:"lower"}))},actionDescription:{name:k.lowercase}},capitalize:{defaultHandler:function(e){return a._doCase(b(e,{unit:"word",type:"capitalize"}))},actionDescription:{name:k.capitalize}},reversecase:{defaultHandler:function(e){return a._doCase(b(e,{type:"reverse"}))},actionDescription:{name:k.reversecase}},toggleOverwriteMode:{defaultHandler:function(){return a._doOverwriteMode()},actionDescription:{name:k.toggleOverwriteMode}},toggleTabMode:{defaultHandler:function(){return a._doTabMode()},
+actionDescription:{name:k.toggleTabMode}},toggleWrapMode:{defaultHandler:function(){return a._doWrapMode()},actionDescription:{name:k.toggleWrapMode}}}},_createRulerParent:function(a){var b=f.createElement(document,"div");b.className=a;b.tabIndex=-1;b.style.overflow="hidden";b.style.MozUserSelect="none";b.style.WebkitUserSelect="none";b.style.position="absolute";b.style.top="0px";b.style.bottom="0px";b.style.cursor="default";b.style.display="none";b.setAttribute("aria-hidden","true");this._rootDiv.appendChild(b);
+return b},_createRuler:function(a,b){if(this._clientDiv){var e=this._getRulerParent(a);if(e){if(e!==this._marginDiv||this._marginOffset)e.style.display="block";var c=f.createElement(e.ownerDocument,"div");c._ruler=a;c.rulerChanged=!0;c.style.position="relative";c.style.cssFloat="left";c.style.styleFloat="left";c.style.outline="none";if(b===void 0||b<0||b>=e.children.length)e.appendChild(c);else{for(var l=e.firstChild;l&&b-- >0;)l=l.nextSibling;e.insertBefore(c,l)}}}},_createView:function(){if(!this._clientDiv){for(var a=
+this._parent;a.hasChildNodes();)a.removeChild(a.lastChild);var b=a.ownerDocument,e=f.createElement(b,"div");this._rootDiv=e;e.tabIndex=-1;e.style.position="relative";e.style.overflow="hidden";e.style.width="100%";e.style.height="100%";e.style.overflow="hidden";e.style.WebkitTextSizeAdjust="100%";e.setAttribute("role","application");a.appendChild(e);this._leftDiv=this._createRulerParent("textviewLeftRuler");a=f.createElement(b,"div");a.className="textviewScroll";this._viewDiv=a;a.tabIndex=-1;a.style.position=
+"absolute";a.style.top="0px";a.style.bottom="0px";a.style.borderWidth="0px";a.style.margin="0px";a.style.outline="none";a.style.background="transparent";if(f.isMac&&f.isWebkit)a.style.pointerEvents="none",a.style.zIndex="2";e.appendChild(a);var c=this._createRulerParent("textviewRightRuler");this._rightDiv=c;c.style.right="0px";this._scrollDiv=c=f.createElement(b,"div");c.style.margin="0px";c.style.borderWidth="0px";c.style.padding="0px";a.appendChild(c);(this._marginDiv=this._createRulerParent("textviewMarginRuler")).style.zIndex=
+"4";if(!f.isIE&&!f.isIOS)this._clipDiv=a=f.createElement(b,"div"),a.style.position="absolute",a.style.overflow="hidden",a.style.margin="0px",a.style.borderWidth="0px",a.style.padding="0px",a.style.background="transparent",e.appendChild(a),this._clipScrollDiv=c=f.createElement(b,"div"),c.style.position="absolute",c.style.height="1px",c.style.top="-1000px",c.style.background="transparent",a.appendChild(c);this._setFullSelection(this._fullSelection,!0);a=f.createElement(b,"div");a.className="textviewContent";
+this._clientDiv=a;a.tabIndex=0;a.style.position="absolute";a.style.borderWidth="0px";a.style.margin="0px";a.style.padding="0px";a.style.outline="none";a.style.zIndex="1";a.style.WebkitUserSelect="text";a.setAttribute("spellcheck","false");if(f.isIOS||f.isAndroid)a.style.WebkitTapHighlightColor="transparent";(this._clipDiv||e).appendChild(a);if(f.isIOS||f.isAndroid)this._vScrollDiv=c=f.createElement(b,"div"),c.style.position="absolute",c.style.borderWidth="1px",c.style.borderColor="white",c.style.borderStyle=
+"solid",c.style.borderRadius="4px",c.style.backgroundColor="black",c.style.opacity="0.5",c.style.margin="0px",c.style.padding="0px",c.style.outline="none",c.style.zIndex="3",c.style.width="8px",c.style.display="none",e.appendChild(c),this._hScrollDiv=c=f.createElement(b,"div"),c.style.position="absolute",c.style.borderWidth="1px",c.style.borderColor="white",c.style.borderStyle="solid",c.style.borderRadius="4px",c.style.backgroundColor="black",c.style.opacity="0.5",c.style.margin="0px",c.style.padding=
+"0px",c.style.outline="none",c.style.zIndex="3",c.style.height="8px",c.style.display="none",e.appendChild(c);if(f.isFirefox&&!a.setCapture)this._overlayDiv=b=f.createElement(b,"div"),b.style.position=a.style.position,b.style.borderWidth=a.style.borderWidth,b.style.margin=a.style.margin,b.style.padding=a.style.padding,b.style.cursor="text",b.style.zIndex="2",(this._clipDiv||e).appendChild(b);a.contentEditable="true";a.setAttribute("role","textbox");a.setAttribute("aria-multiline","true");this._setWrapMode(this._wrapMode,
+!0);this._setReadOnly(this._readonly);this._setThemeClass(this._themeClass,!0);this._setTabSize(this._tabSize,!0);this._setMarginOffset(this._marginOffset,!0);this._hookEvents();e=this._rulers;for(b=0;b<e.length;b++)this._createRuler(e[b]);this._update()}},_defaultOptions:function(){return{parent:{value:void 0,update:null},model:{value:void 0,update:this.setModel},scrollAnimation:{value:0,update:null},readonly:{value:!1,update:this._setReadOnly},fullSelection:{value:!0,update:this._setFullSelection},
+tabMode:{value:!0,update:null},tabSize:{value:8,update:this._setTabSize},expandTab:{value:!1,update:null},singleMode:{value:!1,update:this._setSingleMode},overwriteMode:{value:!1,update:this._setOverwriteMode},blockCursorVisible:{value:!1,update:this._setBlockCursor},marginOffset:{value:0,update:this._setMarginOffset},wrapOffset:{value:0,update:this._setWrapOffset},wrapMode:{value:!1,update:this._setWrapMode},wrappable:{value:!1,update:null},theme:{value:c.TextTheme.getTheme(),update:this._setTheme},
+themeClass:{value:void 0,update:this._setThemeClass}}},_destroyRuler:function(a){var b=this._getRulerParent(a);if(b)for(var e=b.firstChild;e;){if(e._ruler===a){e._ruler=void 0;b.removeChild(e);if(b.children.length===0&&(b!==this._marginDiv||!this._marginOffset))b.style.display="none";break}e=e.nextSibling}},_destroyView:function(){if(this._clientDiv){this._setGrab(null);this._unhookEvents();var a=this._getWindow();if(this._autoScrollTimerID)a.clearTimeout(this._autoScrollTimerID),this._autoScrollTimerID=
+null;if(this._updateTimer)a.clearTimeout(this._updateTimer),this._updateTimer=null;a=this._rootDiv;a.parentNode.removeChild(a);this._hScrollDiv=this._vScrollDiv=this._cursorDiv=this._marginDiv=this._rightDiv=this._leftDiv=this._overlayDiv=this._clientDiv=this._clipScrollDiv=this._clipDiv=this._viewDiv=this._scrollDiv=this._rootDiv=this._clipboardDiv=this._selDiv3=this._selDiv2=this._selDiv1=null}},_doAutoScroll:function(a,b,e){this._autoScrollDir=a;this._autoScrollX=b;this._autoScrollY=e;this._autoScrollTimerID||
+this._autoScrollTimer()},_endAutoScroll:function(){this._autoScrollTimerID&&this._getWindow().clearTimeout(this._autoScrollTimerID);this._autoScrollTimerID=this._autoScrollDir=void 0},_fixCaret:function(){var a=this._clientDiv;if(a){var b=this._hasFocus;this._ignoreFocus=!0;b&&a.blur();a.contentEditable=!1;a.contentEditable=!0;b&&a.focus();this._ignoreFocus=!1}},_getBaseText:function(a,b){var e=this._model;e.getBaseModel&&(a=e.mapOffset(a),b=e.mapOffset(b),e=e.getBaseModel());return e.getText(a,b)},
+_getBottomIndex:function(a){var b=this._bottomChild;if(a&&this._getClientHeight()>this._getLineHeight()){var a=b.getBoundingClientRect(),e=this._clientDiv.getBoundingClientRect();a.bottom>e.bottom&&(b=this._getLinePrevious(b)||b)}return b.lineIndex},_getBoundsAtOffset:function(a){var b=this._getLine(this._model.getLineAtOffset(a)),a=b.getBoundingClientRect(a),e=this._getLinePixel(b.lineIndex);a.top+=e;a.bottom+=e;b.destroy();return a},_getClientHeight:function(){var a=this._getViewPadding();return Math.max(0,
+this._viewDiv.clientHeight-a.top-a.bottom)},_getClientWidth:function(){var a=this._getViewPadding();return Math.max(0,this._viewDiv.clientWidth-a.left-a.right)},_getClipboardText:function(a,b){var c=this._model.getLineDelimiter(),l,d,o=this._getWindow(),g=o.clipboardData;if(!g&&a)g=a.clipboardData;if(g)return l=[],d=g.getData(f.isIE?"Text":"text/plain"),e(d,function(a){l.push(a)},function(){l.push(c)}),d=l.join(""),b&&b(d),d;if(f.isFirefox){this._ignoreFocus=!0;var h=this._clipboardDiv,g=this._rootDiv.ownerDocument;
+if(!h)this._clipboardDiv=h=f.createElement(g,"div"),h.style.position="fixed",h.style.whiteSpace="pre",h.style.left="-1000px",this._rootDiv.appendChild(h);h.innerHTML="<pre contenteditable=''></pre>";h.firstChild.focus();var p=this,i=function(){var a=p._getTextFromElement(h);h.innerHTML="";l=[];e(a,function(a){l.push(a)},function(){l.push(c)});return l.join("")},q=!1;this._ignorePaste=!0;if(!f.isLinux||this._lastMouseButton!==2)try{q=g.execCommand("paste",!1,null)}catch(r){q=h.childNodes.length>1||
+h.firstChild&&h.firstChild.childNodes.length>0}this._ignorePaste=!1;if(!q)return a?(o.setTimeout(function(){p.focus();(d=i())&&b&&b(d);p._ignoreFocus=!1},0),null):(this.focus(),this._ignoreFocus=!1,"");this.focus();this._ignoreFocus=!1;(d=i())&&b&&b(d);return d}return""},_getDOMText:function(a,b){for(var e=a.firstChild,c="",l=0;e;){var f;if(!e.ignore)if(e.ignoreChars){f=e.lastChild;for(var d=0,o=[],g=-1;f;){var h=f.data;if(h)for(var p=h.length-1;p>=0;p--){var i=h.substring(p,p+1);d<e.ignoreChars&&
+(i===" "||i==="\u200b"||i==="\ufeff")?d++:o.push(i==="\u00a0"?"\t":i)}if(b===f)g=o.length;f=f.previousSibling}o=o.reverse().join("");g!==-1&&(l=c.length+o.length-g);c+=o}else for(f=e.firstChild;f;){if(b===f)l=c.length;c+=f.data;f=f.nextSibling}e=e.nextSibling}return{text:c,offset:l}},_getTextFromElement:function(a){var b=a.ownerDocument,e=b.defaultView;if(!e.getSelection)return a.innerText||a.textContent;b=b.createRange();b.selectNode(a);var a=e.getSelection(),e=[],c;for(c=0;c<a.rangeCount;c++)e.push(a.getRangeAt(c));
+this._ignoreSelect=!0;a.removeAllRanges();a.addRange(b);b=a.toString();a.removeAllRanges();for(c=0;c<e.length;c++)a.addRange(e[c]);this._ignoreSelect=!1;return b},_getViewPadding:function(){return this._metrics.viewPadding},_getLine:function(a){var b=this._getLineNode(a);return b&&!b.lineChanged&&!b.lineRemoved?b._line:new p(this,a)},_getLineHeight:function(a,b){if(a!==void 0&&this._lineHeight){var e=this._lineHeight[a];if(e)return e;if(b||b===void 0)return this._lineHeight[a]=this._calculateLineHeight(a)}return this._metrics.lineHeight},
+_getLineNode:function(a){for(var b=this._clientDiv.firstChild;b;){if(a===b.lineIndex)return b;b=b.nextSibling}},_getLineNext:function(a){for(a=a?a.nextSibling:this._clientDiv.firstChild;a&&a.lineIndex===-1;)a=a.nextSibling;return a},_getLinePrevious:function(a){for(a=a?a.previousSibling:this._clientDiv.lastChild;a&&a.lineIndex===-1;)a=a.previousSibling;return a},_getLinePixel:function(a){a=Math.min(Math.max(0,a),this._model.getLineCount());if(this._lineHeight){var b=this._getTopIndex(),e=-this._topIndexY+
+this._getScroll().y;if(a>b)for(;b<a;b++)e+=this._getLineHeight(b);else for(b-=1;b>=a;b--)e-=this._getLineHeight(b);return e}return this._getLineHeight()*a},_getLineIndex:function(a){var b,e=0,c=this._model.getLineCount();if(this._lineHeight){var e=this._getTopIndex(),l=-this._topIndexY+this._getScroll().y;if(a!==l)if(a<l)for(;a<l&&e>0;)a+=this._getLineHeight(--e);else for(b=this._getLineHeight(e);a-b>=l&&e<c-1;)a-=b,b=this._getLineHeight(++e)}else b=this._getLineHeight(),e=Math.floor(a/b);return Math.max(0,
+Math.min(c-1,e))},_getRulerParent:function(a){switch(a.getLocation()){case "left":return this._leftDiv;case "right":return this._rightDiv;case "margin":return this._marginDiv}return null},_getScroll:function(a){(a===void 0||a)&&this._cancelAnimation();a=this._viewDiv;return{x:a.scrollLeft,y:a.scrollTop}},_getSelection:function(){return this._selection.clone()},_getTopIndex:function(a){var b=this._topChild;if(a&&this._getClientHeight()>this._getLineHeight()){var a=b.getBoundingClientRect(),e=this._getViewPadding(),
+c=this._viewDiv.getBoundingClientRect();a.top<c.top+e.top&&(b=this._getLineNext(b)||b)}return b.lineIndex},_hookEvents:function(){var a=this;this._modelListener={onChanging:function(b){a._onModelChanging(b)},onChanged:function(b){a._onModelChanged(b)}};this._model.addEventListener("preChanging",this._modelListener.onChanging);this._model.addEventListener("postChanged",this._modelListener.onChanged);this._themeListener={onChanged:function(){a._setThemeClass(a._themeClass)}};this._theme.addEventListener("ThemeChanged",
+this._themeListener.onChanged);var b=this._handlers=[],e=this._clientDiv,c=this._viewDiv,l=this._rootDiv,d=this._overlayDiv||e,o=e.ownerDocument,g=this._getWindow(),h=f.isIE?o:g;b.push({target:g,type:"resize",handler:function(b){return a._handleResize(b?b:g.event)}});b.push({target:e,type:"blur",handler:function(b){return a._handleBlur(b?b:g.event)}});b.push({target:e,type:"focus",handler:function(b){return a._handleFocus(b?b:g.event)}});b.push({target:c,type:"focus",handler:function(){e.focus()}});
+b.push({target:c,type:"scroll",handler:function(b){return a._handleScroll(b?b:g.event)}});b.push({target:e,type:"textInput",handler:function(b){return a._handleTextInput(b?b:g.event)}});b.push({target:e,type:"keydown",handler:function(b){return a._handleKeyDown(b?b:g.event)}});b.push({target:e,type:"keypress",handler:function(b){return a._handleKeyPress(b?b:g.event)}});b.push({target:e,type:"keyup",handler:function(b){return a._handleKeyUp(b?b:g.event)}});f.isIE&&b.push({target:o,type:"keyup",handler:function(b){return a._handleDocKeyUp(b?
+b:g.event)}});b.push({target:e,type:"contextmenu",handler:function(b){return a._handleContextMenu(b?b:g.event)}});b.push({target:e,type:"copy",handler:function(b){return a._handleCopy(b?b:g.event)}});b.push({target:e,type:"cut",handler:function(b){return a._handleCut(b?b:g.event)}});b.push({target:e,type:"paste",handler:function(b){return a._handlePaste(b?b:g.event)}});if(f.isIOS||f.isAndroid)b.push({target:o,type:"selectionchange",handler:function(b){return a._handleSelectionChange(b?b:g.event)}}),
+b.push({target:e,type:"touchstart",handler:function(b){return a._handleTouchStart(b?b:g.event)}}),b.push({target:e,type:"touchmove",handler:function(b){return a._handleTouchMove(b?b:g.event)}}),b.push({target:e,type:"touchend",handler:function(b){return a._handleTouchEnd(b?b:g.event)}});else{b.push({target:e,type:"selectstart",handler:function(b){return a._handleSelectStart(b?b:g.event)}});b.push({target:e,type:"mousedown",handler:function(b){return a._handleMouseDown(b?b:g.event)}});b.push({target:e,
+type:"mouseover",handler:function(b){return a._handleMouseOver(b?b:g.event)}});b.push({target:e,type:"mouseout",handler:function(b){return a._handleMouseOut(b?b:g.event)}});b.push({target:h,type:"mouseup",handler:function(b){return a._handleMouseUp(b?b:g.event)}});b.push({target:h,type:"mousemove",handler:function(b){return a._handleMouseMove(b?b:g.event)}});b.push({target:l,type:"mousedown",handler:function(b){return a._handleRootMouseDown(b?b:g.event)}});b.push({target:l,type:"mouseup",handler:function(b){return a._handleRootMouseUp(b?
+b:g.event)}});b.push({target:d,type:"dragstart",handler:function(b){return a._handleDragStart(b?b:g.event)}});b.push({target:d,type:"drag",handler:function(b){return a._handleDrag(b?b:g.event)}});b.push({target:d,type:"dragend",handler:function(b){return a._handleDragEnd(b?b:g.event)}});b.push({target:d,type:"dragenter",handler:function(b){return a._handleDragEnter(b?b:g.event)}});b.push({target:d,type:"dragover",handler:function(b){return a._handleDragOver(b?b:g.event)}});b.push({target:d,type:"dragleave",
+handler:function(b){return a._handleDragLeave(b?b:g.event)}});b.push({target:d,type:"drop",handler:function(b){return a._handleDrop(b?b:g.event)}});b.push({target:this._clientDiv,type:f.isFirefox?"DOMMouseScroll":"mousewheel",handler:function(b){return a._handleMouseWheel(b?b:g.event)}});this._clipDiv&&b.push({target:this._clipDiv,type:f.isFirefox?"DOMMouseScroll":"mousewheel",handler:function(b){return a._handleMouseWheel(b?b:g.event)}});if(f.isFirefox&&(!f.isWindows||f.isFirefox>=15))(c=g.MutationObserver||
+g.MozMutationObserver)?(this._mutationObserver=new c(function(b){a._handleDataModified(b)}),this._mutationObserver.observe(e,{subtree:!0,characterData:!0})):b.push({target:this._clientDiv,type:"DOMCharacterDataModified",handler:function(b){return a._handleDataModified(b?b:g.event)}});this._overlayDiv&&(b.push({target:this._overlayDiv,type:"mousedown",handler:function(b){return a._handleMouseDown(b?b:g.event)}}),b.push({target:this._overlayDiv,type:"mouseover",handler:function(b){return a._handleMouseOver(b?
+b:g.event)}}),b.push({target:this._overlayDiv,type:"mouseout",handler:function(b){return a._handleMouseOut(b?b:g.event)}}),b.push({target:this._overlayDiv,type:"contextmenu",handler:function(b){return a._handleContextMenu(b?b:g.event)}}));this._isW3CEvents||b.push({target:this._clientDiv,type:"dblclick",handler:function(b){return a._handleDblclick(b?b:g.event)}})}this._hookRulerEvents(this._leftDiv,b);this._hookRulerEvents(this._rightDiv,b);this._hookRulerEvents(this._marginDiv,b);for(c=0;c<b.length;c++)l=
+b[c],v(l.target,l.type,l.handler,l.capture)},_hookRulerEvents:function(a,b){if(a){var e=this,c=this._getWindow();f.isIE&&b.push({target:a,type:"selectstart",handler:function(){return!1}});b.push({target:a,type:f.isFirefox?"DOMMouseScroll":"mousewheel",handler:function(a){return e._handleMouseWheel(a?a:c.event)}});b.push({target:a,type:"click",handler:function(a){e._handleRulerEvent(a?a:c.event)}});b.push({target:a,type:"dblclick",handler:function(a){e._handleRulerEvent(a?a:c.event)}});b.push({target:a,
+type:"mousemove",handler:function(a){e._handleRulerEvent(a?a:c.event)}});b.push({target:a,type:"mouseover",handler:function(a){e._handleRulerEvent(a?a:c.event)}});b.push({target:a,type:"mouseout",handler:function(a){e._handleRulerEvent(a?a:c.event)}})}},_getWindow:function(){return this._parent.ownerDocument.defaultView||this._parent.ownerDocument.parentWindow},_ignoreEvent:function(a){for(a=a.target;a&&a!==this._clientDiv;){if(a.ignore)return!0;a=a.parentNode}return!1},_init:function(a){var b=a.parent;
+typeof b==="string"&&(b=(a.document||document).getElementById(b));if(!b)throw"no parent";a.parent=b;a.model=a.model||new m.TextModel;var e=this._defaultOptions(),c;for(c in e)e.hasOwnProperty(c)&&(this["_"+c]=a[c]!==void 0?a[c]:e[c].value);this._keyModes=[];this._rulers=[];this._selection=new q(0,0,!1);this._linksVisible=!1;this._maxLineWidth=this._redrawCount=0;this._maxLineIndex=-1;this._ignoreSelect=!0;this._hasFocus=this._ignoreFocus=!1;this._dragOffset=this._columnX=-1;this._isRangeRects=(!f.isIE||
+f.isIE>=9)&&typeof b.ownerDocument.createRange().getBoundingClientRect==="function";this._isW3CEvents=b.addEventListener;this._autoScrollTimerID=this._autoScrollY=this._autoScrollX=null;this._AUTO_SCROLL_RATE=50;this._mouseUpClosure=this._moseMoveClosure=this._grabControl=null;this._clickCount=this._lastMouseTime=this._lastMouseY=this._lastMouseX=0;this._clickTime=250;this._clickDist=5;this._isMouseDown=!1;this._doubleClickSelection=null;this._vScroll=this._hScroll=0;this._imeOffset=-1;this._createActions();
+this._createView()},_modifyContent:function(a,b){if(!this._readonly||a._code)if(a.type="Verify",this.onVerify(a),!(a.text===null||a.text===void 0)){var e=this._model;try{if(a._ignoreDOMSelection)this._ignoreDOMSelection=!0;e.setText(a.text,a.start,a.end)}finally{if(a._ignoreDOMSelection)this._ignoreDOMSelection=!1}b&&(e=this._getSelection(),e.setCaret(a.start+a.text.length),this._setSelection(e,!0));this.onModify({type:"Modify"})}},_onModelChanged:function(a){a.type="ModelChanged";this.onModelChanged(a);
+a.type="Changed";var b=a.start,e=a.addedCharCount,c=a.removedCharCount,l=a.addedLineCount,f=a.removedLineCount,d=this._getSelection();d.end>b&&(d.end>b&&d.start<b+c?d.setCaret(b+e):(d.start+=e-c,d.end+=e-c),this._setSelection(d,!1,!1));b=this._model.getLineAtOffset(b);for(e=this._getLineNext();e;){c=e.lineIndex;if(b<=c&&c<=b+f)b===c&&!e.modelChangedEvent&&!e.lineRemoved?(e.modelChangedEvent=a,e.lineChanged=!0):(e.lineRemoved=!0,e.lineChanged=!1,e.modelChangedEvent=null);if(c>b+f)e.lineIndex=c+l-f,
+e._line.lineIndex=e.lineIndex;e=this._getLineNext(e)}this._lineHeight&&(a=[b,f].concat(Array(l)),Array.prototype.splice.apply(this._lineHeight,a));if(!this._wrapMode&&b<=this._maxLineIndex&&this._maxLineIndex<=b+f)this._checkMaxLineIndex=this._maxLineIndex,this._maxLineIndex=-1,this._maxLineWidth=0;this._update()},_onModelChanging:function(a){a.type="ModelChanging";this.onModelChanging(a);a.type="Changing"},_queueUpdate:function(){if(!this._updateTimer&&!this._ignoreQueueUpdate){var a=this;this._updateTimer=
+this._getWindow().setTimeout(function(){a._updateTimer=null;a._update()},0)}},_resetLineHeight:function(a,b){if(this._wrapMode||this._variableLineHeight){if(a!==void 0&&b!==void 0)for(var e=a;e<b;e++)this._lineHeight[e]=void 0;else this._lineHeight=Array(this._model.getLineCount());this._calculateLineHeightTimer()}else this._lineHeight=null},_resetLineWidth:function(){var a=this._clientDiv;if(a)for(a=a.firstChild;a;)a.lineWidth=void 0,a=a.nextSibling},_reset:function(){this._maxLineIndex=-1;this._maxLineWidth=
+0;this._columnX=-1;this._bottomChild=this._topChild=null;this._topIndexY=0;this._variableLineHeight=!1;this._resetLineHeight();this._setSelection(new q(0,0,!1),!1,!1);if(this._viewDiv)this._viewDiv.scrollLeft=0,this._viewDiv.scrollTop=0;var a=this._clientDiv;if(a){for(var b=a.firstChild;b;)b.lineRemoved=!0,b=b.nextSibling;if(f.isFirefox)this._ignoreFocus=!1,(b=this._hasFocus)&&a.blur(),a.contentEditable=!1,a.contentEditable=!0,b&&a.focus(),this._ignoreFocus=!1}},_scrollViewAnimated:function(a,b,e){var c=
+this._getWindow();if(e&&this._scrollAnimation){var l=this;this._animation=new u({window:c,duration:this._scrollAnimation,curve:[b,0],onAnimate:function(a){a=b-Math.floor(a);l._scrollView(0,a);b-=a},onEnd:function(){l._animation=null;l._scrollView(a,b);e&&c.setTimeout(e,0)}});this._animation.play()}else this._scrollView(a,b),e&&c.setTimeout(e,0)},_scrollView:function(a,b){this._ensureCaretVisible=!1;var e=this._viewDiv;a&&(e.scrollLeft+=a);b&&(e.scrollTop+=b)},_setClipboardText:function(a,b){var c,
+l=this._getWindow(),d=l.clipboardData;if(!d&&b)d=b.clipboardData;if(d&&(c=[],e(a,function(a){c.push(a)},function(){c.push(f.platformDelimiter)}),d.setData(f.isIE?"Text":"text/plain",c.join(""))))return!0;var o=this._parent.ownerDocument,g=f.createElement(o,"pre");g.style.position="fixed";g.style.left="-1000px";e(a,function(a){g.appendChild(o.createTextNode(a))},function(){g.appendChild(f.createElement(o,"br"))});g.appendChild(o.createTextNode(" "));this._clientDiv.appendChild(g);d=o.createRange();
+d.setStart(g.firstChild,0);d.setEndBefore(g.lastChild);var h=l.getSelection();h.rangeCount>0&&h.removeAllRanges();h.addRange(d);var p=this,d=function(){g&&g.parentNode===p._clientDiv&&p._clientDiv.removeChild(g);p._updateDOMSelection()},h=!1;this._ignoreCopy=!0;try{h=o.execCommand("copy",!1,null)}catch(i){}this._ignoreCopy=!1;if(!h&&b)return l.setTimeout(d,0),!1;d();return!0},_setDOMSelection:function(a,b,e,c,l){for(var d,o,g,h,p=0,i=a.firstChild,q,r,s=this._model.getLine(a.lineIndex).length;i;){if(!i.ignore){q=
+i.firstChild;r=q.length;i.ignoreChars&&(r-=i.ignoreChars);if(p+r>b||p+r>=s){d=q;o=b-p;i.ignoreChars&&r>0&&o===r&&(o+=i.ignoreChars);break}p+=r}i=i.nextSibling}for(var p=0,i=e.firstChild,t=this._model.getLine(e.lineIndex).length;i;){if(!i.ignore){q=i.firstChild;r=q.length;i.ignoreChars&&(r-=i.ignoreChars);if(r+p>c||p+r>=t){g=q;h=c-p;i.ignoreChars&&r>0&&h===r&&(h+=i.ignoreChars);break}p+=r}i=i.nextSibling}this._setDOMFullSelection(a,b,s,e,c,t);a=this._getWindow();b=this._parent.ownerDocument;if(a.getSelection){e=
+a.getSelection();a=b.createRange();a.setStart(d,o);a.setEnd(g,h);if(this._hasFocus&&(e.anchorNode!==d||e.anchorOffset!==o||e.focusNode!==g||e.focusOffset!==h||e.anchorNode!==g||e.anchorOffset!==h||e.focusNode!==d||e.focusOffset!==o))this._anchorNode=d,this._anchorOffset=o,this._focusNode=g,this._focusOffset=h,this._ignoreSelect=!1,e.rangeCount>0&&e.removeAllRanges(),e.addRange(a),this._ignoreSelect=!0;if(this._cursorDiv&&(a=b.createRange(),l?(a.setStart(d,o),a.setEnd(d,o)):(a.setStart(g,h),a.setEnd(g,
+h)),g=a.getClientRects()[0],h=this._cursorDiv.parentNode,d=h.getBoundingClientRect(),g&&d))this._cursorDiv.style.top=g.top-d.top+h.scrollTop+"px",this._cursorDiv.style.left=g.left-d.left+h.scrollLeft+"px"}else if(b.selection&&this._hasFocus)l=b.body,a=f.createElement(b,"div"),l.appendChild(a),l.removeChild(a),a=l.createTextRange(),a.moveToElementText(d.parentNode),a.moveStart("character",o),d=l.createTextRange(),d.moveToElementText(g.parentNode),d.moveStart("character",h),a.setEndPoint("EndToStart",
+d),this._ignoreSelect=!1,a.select(),this._ignoreSelect=!0},_setDOMFullSelection:function(a,b,e,c,l){if(this._selDiv1&&(e=this._selDiv1,e.style.width="0px",e.style.height="0px",e=this._selDiv2,e.style.width="0px",e.style.height="0px",e=this._selDiv3,e.style.width="0px",e.style.height="0px",!(a===c&&b===l))){var f=this._model,d=this._getViewPadding(),o=this._clientDiv.getBoundingClientRect(),g=this._viewDiv.getBoundingClientRect(),e=g.left+d.left,h=o.right,d=g.top+d.top,i=o.bottom,g=o=0;this._clipDiv?
+(g=this._clipDiv.getBoundingClientRect(),o=g.left-this._clipDiv.scrollLeft):(g=this._rootDiv.getBoundingClientRect(),o=g.left);g=g.top;this._ignoreDOMSelection=!0;var q=(new p(this,a.lineIndex,a)).getBoundingClientRect(f.getLineStart(a.lineIndex)+b,!1),r=q.left,b=(new p(this,c.lineIndex,c)).getBoundingClientRect(f.getLineStart(c.lineIndex)+l,!1),f=b.left;this._ignoreDOMSelection=!1;var s=this._selDiv1,r=Math.min(h,Math.max(e,r)),t=Math.min(i,Math.max(d,q.top)),u=h,l=Math.min(i,Math.max(d,q.bottom));
+s.style.left=r-o+"px";s.style.top=t-g+"px";s.style.width=Math.max(0,u-r)+"px";s.style.height=Math.max(0,l-t)+"px";if(a.lineIndex===c.lineIndex)u=Math.min(f,h),s.style.width=Math.max(0,u-r)+"px";else if(q=Math.min(i,Math.max(d,b.top)),f=Math.min(h,Math.max(e,f)),d=Math.min(i,Math.max(d,b.bottom)),i=this._selDiv3,i.style.left=e-o+"px",i.style.top=q-g+"px",i.style.width=Math.max(0,f-e)+"px",i.style.height=Math.max(0,d-q)+"px",Math.abs(a.lineIndex-c.lineIndex)>1)a=this._selDiv2,a.style.left=e-o+"px",
+a.style.top=l-g+"px",a.style.width=Math.max(0,h-e)+"px",a.style.height=Math.max(0,q-l)+"px"}},_setGrab:function(a){if(a!==this._grabControl)a?(a.setCapture&&a.setCapture(),this._grabControl=a):(this._grabControl.releaseCapture&&this._grabControl.releaseCapture(),this._grabControl=null)},_setLinksVisible:function(a){if(this._linksVisible!==a){this._linksVisible=a;if(f.isIE&&a)this._hadFocus=this._hasFocus;var b=this._clientDiv;b.contentEditable=!a;this._hadFocus&&!a&&b.focus();if(this._overlayDiv)this._overlayDiv.style.zIndex=
+a?"-1":"1";for(a=this._getLineNext();a;){if(a.hasLink)for(b=a.firstChild;b;)if(b.ignore)b=b.nextSibling;else{var e=b.nextSibling,c=b.viewStyle;c&&c.tagName&&c.tagName.toLowerCase()==="a"&&a.replaceChild(a._line._createSpan(a,b.firstChild.data,c),b);b=e}a=this._getLineNext(a)}this._updateDOMSelection()}},_setSelection:function(a,b,e,c,l){if(a){this._columnX=-1;e===void 0&&(e=!0);var f=this._selection;this._selection=a;b!==!1&&this._showCaret(!1,c,b,l);e&&this._updateDOMSelection();if(!f.equals(a))this.onSelection({type:"Selection",
+oldValue:{start:f.start,end:f.end},newValue:{start:a.start,end:a.end}})}},_setSelectionTo:function(a,b,e,c){var l=this._model,f=this._getSelection(),b=this.convert({x:a,y:b},"page","document"),a=this._getLineIndex(b.y);if(this._clickCount===1){l=this._getLine(a);a=l.getOffset(b.x,b.y-this._getLinePixel(a));l.destroy();if(c&&!e&&f.start<=a&&a<f.end)return this._dragOffset=a,!1;f.extend(a);e||f.collapse()}else(this._clickCount&1)===0?(l=this._getLine(a),a=l.getOffset(b.x,b.y-this._getLinePixel(a)),
+this._doubleClickSelection?a>=this._doubleClickSelection.start?(e=this._doubleClickSelection.start,c=l.getNextOffset(a,{unit:"wordend",count:1})):(e=l.getNextOffset(a,{unit:"word",count:-1}),c=this._doubleClickSelection.end):(e=l.getNextOffset(a,{unit:"word",count:-1}),c=l.getNextOffset(e,{unit:"wordend",count:1})),l.destroy()):this._doubleClickSelection?(c=l.getLineAtOffset(this._doubleClickSelection.start),a>=c?(e=l.getLineStart(c),c=l.getLineEnd(a)):(e=l.getLineStart(a),c=l.getLineEnd(c))):(e=
+l.getLineStart(a),c=l.getLineEnd(a)),f.setCaret(e),f.extend(c);this._setSelection(f,!0,!0);return!0},_setFullSelection:function(a,b){this._fullSelection=a;if(f.isWebkit)this._fullSelection=!0;var e=this._clipDiv||this._rootDiv;if(e)if(this._fullSelection){if(!this._selDiv1&&this._fullSelection&&!f.isIOS){var c=e.ownerDocument;this._highlightRGB=f.isWebkit?"transparent":"Highlight";var l=f.createElement(c,"div");this._selDiv1=l;l.style.position="absolute";l.style.borderWidth="0px";l.style.margin="0px";
+l.style.padding="0px";l.style.outline="none";l.style.background=this._highlightRGB;l.style.width="0px";l.style.height="0px";l.style.zIndex="0";e.appendChild(l);var d=f.createElement(c,"div");this._selDiv2=d;d.style.position="absolute";d.style.borderWidth="0px";d.style.margin="0px";d.style.padding="0px";d.style.outline="none";d.style.background=this._highlightRGB;d.style.width="0px";d.style.height="0px";d.style.zIndex="0";e.appendChild(d);this._selDiv3=c=f.createElement(c,"div");c.style.position="absolute";
+c.style.borderWidth="0px";c.style.margin="0px";c.style.padding="0px";c.style.outline="none";c.style.background=this._highlightRGB;c.style.width="0px";c.style.height="0px";c.style.zIndex="0";e.appendChild(c);if(f.isFirefox&&f.isMac){e=this._getWindow().getComputedStyle(c,null).getPropertyValue("background-color");switch(e){case "rgb(119, 141, 168)":e="rgb(199, 208, 218)";break;case "rgb(127, 127, 127)":e="rgb(198, 198, 198)";break;case "rgb(255, 193, 31)":e="rgb(250, 236, 115)";break;case "rgb(243, 70, 72)":e=
+"rgb(255, 176, 139)";break;case "rgb(255, 138, 34)":e="rgb(255, 209, 129)";break;case "rgb(102, 197, 71)":e="rgb(194, 249, 144)";break;case "rgb(140, 78, 184)":e="rgb(232, 184, 255)";break;default:e="rgb(180, 213, 255)"}this._highlightRGB=e;l.style.background=e;d.style.background=e;c.style.background=e}b||this._updateDOMSelection()}}else{if(this._selDiv1)e.removeChild(this._selDiv1),this._selDiv1=null;if(this._selDiv2)e.removeChild(this._selDiv2),this._selDiv2=null;if(this._selDiv3)e.removeChild(this._selDiv3),
+this._selDiv3=null}},_setBlockCursor:function(a){this._blockCursorVisible=a;this._updateBlockCursorVisible()},_setOverwriteMode:function(a){this._overwriteMode=a;this._updateBlockCursorVisible()},_updateBlockCursorVisible:function(){if(this._blockCursorVisible||this._overwriteMode){if(!this._cursorDiv){var a=f.createElement(document,"div");a.className="textviewBlockCursor";this._cursorDiv=a;a.tabIndex=-1;a.style.zIndex="2";a.style.color="transparent";a.style.position="absolute";a.style.pointerEvents=
+"none";a.innerHTML=" ";this._viewDiv.appendChild(a);this._updateDOMSelection()}}else if(this._cursorDiv)this._cursorDiv.parentNode.removeChild(this._cursorDiv),this._cursorDiv=null},_setMarginOffset:function(a,b){this._marginOffset=a;this._marginDiv.style.display=a?"block":"none";if(!b)this._metrics=this._calculateMetrics(),this._queueUpdate()},_setWrapOffset:function(a,b){this._wrapOffset=a;if(!b)this._metrics=this._calculateMetrics(),this._queueUpdate()},_setReadOnly:function(a){this._readonly=
+a;this._clientDiv.setAttribute("aria-readonly",a?"true":"false")},_setSingleMode:function(a,b){this._singleMode=a;this._updateOverflow();this._updateStyle(b)},_setTabSize:function(a,b){this._tabSize=a;this._customTabSize=void 0;var e=this._clientDiv;if(f.isOpera){if(e)e.style.OTabSize=this._tabSize+""}else if(f.isWebkit>=537.1){if(e)e.style.tabSize=this._tabSize+""}else if(f.isFirefox>=4){if(e)e.style.MozTabSize=this._tabSize+""}else if(this._tabSize!==8)this._customTabSize=this._tabSize;b||(this.redrawLines(),
+this._resetLineWidth())},_setTheme:function(a){this._theme&&this._theme.removeEventListener("ThemeChanged",this._themeListener.onChanged);(this._theme=a)&&this._theme.addEventListener("ThemeChanged",this._themeListener.onChanged);this._setThemeClass(this._themeClass)},_setThemeClass:function(a,b){this._themeClass=a;var e="textview",c=this._theme.getThemeClass();c&&(e+=" "+c);this._themeClass&&c!==this._themeClass&&(e+=" "+this._themeClass);this._rootDiv.className=e;this._updateStyle(b)},_setWrapMode:function(a,
+b){this._wrapMode=a&&this._wrappable;var e=this._clientDiv;this._wrapMode?(e.style.whiteSpace="pre-wrap",e.style.wordWrap="break-word"):(e.style.whiteSpace="pre",e.style.wordWrap="normal");this._updateOverflow();b||(this.redraw(),this._resetLineWidth());this._resetLineHeight()},_showCaret:function(a,b,e,c){if(this._clientDiv){var l=this._model,f=this._getSelection(),d=this._getScroll(),o=f.getCaret(),g=f.start,h=f.end,p=l.getLineAtOffset(h),i=Math.max(Math.max(g,l.getLineStart(p)),h-1),l=this._getClientWidth(),
+p=this._getClientHeight(),q=l/4,r=this._getBoundsAtOffset(o===g?g:i),s=r.left,t=r.right,u=r.top,v=r.bottom;a&&!f.isEmpty()&&(r=this._getBoundsAtOffset(o===h?g:i),r.top===u?o===g?t=s+Math.min(r.right-s,l):s=t-Math.min(t-r.left,l):o===g?v=u+Math.min(r.bottom-u,p):u=v-Math.min(v-r.top,p));a=0;s<d.x&&(a=Math.min(s-d.x,-q));t>d.x+l&&(a=Math.max(t-d.x-l,q));f=0;u<d.y?f=u-d.y:v>d.y+p&&(f=v-d.y-p);c&&(c>0?f>0&&(f=Math.max(f,c)):f<0&&(f=Math.min(f,c)));if(a!==0||f!==0)return f!==0&&typeof e==="number"&&(e<
+0&&(e=0),e>1&&(e=1),f+=Math.floor(f>0?e*p:-e*p)),this._scrollViewAnimated(a,f,b),p!==this._getClientHeight()||l!==this._getClientWidth()?this._showCaret():this._ensureCaretVisible=!0,!0;else b&&b();return!1}},_startIME:function(){if(this._imeOffset===-1){var a=this._getSelection();a.isEmpty()||this._modifyContent({text:"",start:a.start,end:a.end},!0);this._imeOffset=a.start}},_unhookEvents:function(){this._model.removeEventListener("preChanging",this._modelListener.onChanging);this._model.removeEventListener("postChanged",
+this._modelListener.onChanged);this._theme.removeEventListener("ThemeChanged",this._themeListener.onChanged);this._modelListener=null;for(var a=0;a<this._handlers.length;a++){var b=this._handlers[a];s(b.target,b.type,b.handler)}this._handlers=null;if(this._mutationObserver)this._mutationObserver.disconnect(),this._mutationObserver=null},_updateDOMSelection:function(){if(!(this._redrawCount>0)&&!this._ignoreDOMSelection&&this._clientDiv){var a=this._getSelection(),b=this._model,e=b.getLineAtOffset(a.start),
+c=b.getLineAtOffset(a.end),l=this._getLineNext();if(l){var f=this._getLinePrevious(),d;e<l.lineIndex?(d=l,e=0):e>f.lineIndex?(d=f,e=0):(d=this._getLineNode(e),e=a.start-b.getLineStart(e));c<l.lineIndex?b=0:c>f.lineIndex?(l=f,b=0):(l=this._getLineNode(c),b=a.end-b.getLineStart(c));this._setDOMSelection(d,e,l,b,a.caret)}}},_update:function(a){if(!(this._redrawCount>0)){if(this._updateTimer)this._getWindow().clearTimeout(this._updateTimer),this._updateTimer=null,a=!1;var b=this._clientDiv,e=this._viewDiv;
+if(b){if(this._metrics.invalid)this._ignoreQueueUpdate=!0,this._updateStyle(),this._ignoreQueueUpdate=!1;var c=this._model,l=this._getScroll(!1),d=this._getViewPadding(),o=c.getLineCount(),g=this._getLineHeight(),h=!1,i=!1,q=!1,r=this._metrics.scrollWidth;if(this._wrapMode)b.style.width=(this._metrics.wrapWidth||this._getClientWidth())+"px";var s,t,u,v,k=0,n=0,m;if(this._lineHeight){for(;n<o;){m=this._getLineHeight(n);if(k+m>l.y)break;k+=m;n++}s=n;t=Math.max(0,s-1);u=c=l.y-k;s>0&&(c+=this._getLineHeight(s-
+1))}else v=Math.max(0,l.y)/g,s=Math.floor(v),t=Math.max(0,s-1),c=Math.round((v-t)*g),u=Math.round((v-s)*g);this._topIndexY=u;v=this._rootDiv;var I=v.clientWidth,F=v.clientHeight;if(a){g=0;this._leftDiv&&(s=this._leftDiv.getBoundingClientRect(),g=s.right-s.left);s=this._getClientWidth();v=this._getClientHeight();i=s;if(this._wrapMode){if(this._metrics.wrapWidth)i=this._metrics.wrapWidth}else i=Math.max(this._maxLineWidth,i);for(;n<o;)m=this._getLineHeight(n,!1),k+=m,n++;o=k}else{v=this._getClientHeight();
+u=Math.min(s+Math.floor((v+u)/g),o-1);var l=Math.min(u+1,o-1),A;for(m=b.firstChild;m;){A=m.lineIndex;var z=m.nextSibling;if(!(t<=A&&A<=l)||m.lineRemoved||m.lineIndex===-1)this._mouseWheelLine===m?(m.style.display="none",m.lineIndex=-1):b.removeChild(m);m=z}m=this._getLineNext();var z=e.ownerDocument,C=z.createDocumentFragment();for(A=t;A<=l;A++)if(!m||m.lineIndex>A)(new p(this,A)).create(C,null);else{C.firstChild&&(b.insertBefore(C,m),C=z.createDocumentFragment());if(m&&m.lineChanged)m=(new p(this,
+A)).create(C,m),m.lineChanged=!1;m=this._getLineNext(m)}C.firstChild&&b.insertBefore(C,m);if(f.isWebkit&&!this._wrapMode)b.style.width="0x7fffffffpx";m=this._getLineNext();A=v+c;for(C=!1;m;){t=m.lineWidth;if(t===void 0)if(z=m._line.getBoundingClientRect(),t=m.lineWidth=Math.ceil(z.right-z.left),z=z.bottom-z.top,this._lineHeight)this._lineHeight[m.lineIndex]=z;else if(g!==0&&z!==0&&Math.ceil(g)!==Math.ceil(z))this._variableLineHeight=!0,this._lineHeight=[],this._lineHeight[m.lineIndex]=z;if(this._lineHeight&&
+!C&&(A-=this._lineHeight[m.lineIndex],A<0))u=m.lineIndex,C=!0;if(!this._wrapMode){if(t>=this._maxLineWidth)this._maxLineWidth=t,this._maxLineIndex=m.lineIndex;if(this._checkMaxLineIndex===m.lineIndex)this._checkMaxLineIndex=-1}if(m.lineIndex===s)this._topChild=m;if(m.lineIndex===u)this._bottomChild=m;m=this._getLineNext(m)}if(this._checkMaxLineIndex!==-1&&(A=this._checkMaxLineIndex,this._checkMaxLineIndex=-1,0<=A&&A<o)){g=new p(this,A);z=g.getBoundingClientRect();t=z.right-z.left;if(t>=this._maxLineWidth)this._maxLineWidth=
+t,this._maxLineIndex=A;g.destroy()}for(;n<o;)m=this._getLineHeight(n,n<=u),k+=m,n++;o=k;this._updateRuler(this._leftDiv,s,l,F);this._updateRuler(this._rightDiv,s,l,F);this._updateRuler(this._marginDiv,s,l,F);g=0;this._leftDiv&&(s=this._leftDiv.getBoundingClientRect(),g=s.right-s.left);l=0;this._rightDiv&&(l=this._rightDiv.getBoundingClientRect(),l=l.right-l.left);e.style.left=g+"px";e.style.right=l+"px";l=this._scrollDiv;l.style.height=o+"px";s=this._getClientWidth();if(!this._singleMode&&!this._wrapMode){k=
+h=v;(n=e.style.overflowX==="scroll")?h+=r:k-=r;m=u=s;(t=e.style.overflowY==="scroll")?u+=r:m-=r;v=h;s=u;o>v&&(q=!0,s=m);this._maxLineWidth>s&&(i=!0,v=k,o>v&&(q=!0,s=m));if(n!==i)e.style.overflowX=i?"scroll":"hidden";if(t!==q)e.style.overflowY=q?"scroll":"hidden";h=n!==i||t!==q}q=s;if(this._wrapMode){if(this._metrics.wrapWidth)q=this._metrics.wrapWidth}else q=Math.max(this._maxLineWidth,q);i=q;if((!f.isIE||f.isIE>=9)&&this._maxLineWidth>s)q+=d.right+d.left;l.style.width=q+"px";if(this._clipScrollDiv)this._clipScrollDiv.style.width=
+q+"px";l=this._getScroll(!1)}if(this._vScrollDiv)q=v-8,k=Math.max(15,Math.ceil(Math.min(1,q/(o+d.top+d.bottom))*q)),this._vScrollDiv.style.left=g+s-8+"px",this._vScrollDiv.style.top=Math.floor(Math.max(0,l.y*q/o))+"px",this._vScrollDiv.style.height=k+"px";if(!this._wrapMode&&this._hScrollDiv)q=s-8,k=Math.max(15,Math.ceil(Math.min(1,q/(this._maxLineWidth+d.left+d.right))*q)),this._hScrollDiv.style.left=g+Math.floor(Math.max(0,Math.floor(l.x*q/this._maxLineWidth)))+"px",this._hScrollDiv.style.top=v-
+9+"px",this._hScrollDiv.style.width=k+"px";n=l.x;k=this._clipDiv;q=this._overlayDiv;if(u=this._marginDiv)u.style.left=-n+g+this._metrics.marginWidth+d.left+"px",u.style.bottom=(e.style.overflowX==="scroll"?r:0)+"px";if(k){k.scrollLeft=n;k.scrollTop=0;e=g+d.left;r=d.top;a=s;g=v;n=0;u=-c;if(l.x===0)e-=d.left,a+=d.left,n=d.left;l.x+s===i&&(a+=d.right);l.y===0&&(r-=d.top,g+=d.top,u+=d.top);l.y+v===o&&(g+=d.bottom);k.style.left=e+"px";k.style.top=r+"px";k.style.right=I-a-e+"px";k.style.bottom=F-g-r+"px";
+b.style.left=n+"px";b.style.top=u+"px";b.style.width=i+"px";b.style.height=v+c+"px";if(q)q.style.left=b.style.left,q.style.top=b.style.top,q.style.width=b.style.width,q.style.height=b.style.height}else{e=n;r=c;I=n+s;F=c+v;e===0&&(e-=d.left);r===0&&(r-=d.top);I===i&&(I+=d.right);l.y+v===o&&(F+=d.bottom);b.style.clip="rect("+r+"px,"+I+"px,"+F+"px,"+e+"px)";b.style.left=-n+g+d.left+"px";b.style.width=(this._wrapMode||f.isWebkit?i:s+n)+"px";if(!a)b.style.top=-c+d.top+"px",b.style.height=v+c+"px";if(q&&
+(q.style.clip=b.style.clip,q.style.left=b.style.left,q.style.width=b.style.width,!a))q.style.top=b.style.top,q.style.height=b.style.height}this._updateDOMSelection();if(h)b=this._ensureCaretVisible,this._ensureCaretVisible=!1,b&&this._showCaret(),this._queueUpdate()}}},_updateOverflow:function(){var a=this._viewDiv;this._wrapMode?(a.style.overflowX="hidden",a.style.overflowY="scroll"):a.style.overflow="hidden"},_updateRuler:function(a,b,e,c){if(a)for(var l=this._parent.ownerDocument,d=this._getLineHeight(),
+o=this._getViewPadding(),a=a.firstChild;a;){var h=a._ruler,p=d,i=h.getOverview();i==="page"&&(p+=this._topIndexY);a.style.top=-p+"px";a.style.height=c+p+"px";a.rulerChanged&&g(h.getRulerStyle(),a);var q,r=a.firstChild;r?(q=r,r=r.nextSibling):(q=f.createElement(l,"div"),q.style.visibility="hidden",a.appendChild(q));var s;if(a.rulerChanged&&q){p=-1;if(s=h.getWidestAnnotation())if(g(s.style,q),s.html)q.innerHTML=s.html;q.lineIndex=p;q.style.height=d+o.top+"px"}var t;if(i==="page"){for(h=h.getAnnotations(b,
+e+1);r;)p=r.lineIndex,s=r.nextSibling,(!(b<=p&&p<=e)||r.lineChanged)&&a.removeChild(r),r=s;r=a.firstChild.nextSibling;t=l.createDocumentFragment();for(p=b;p<=e;p++)if(!r||r.lineIndex>p){q=f.createElement(l,"div");if(s=h[p]){g(s.style,q);if(s.html)q.innerHTML=s.html;q.annotation=s}q.lineIndex=p;q.style.height=this._getLineHeight(p)+"px";t.appendChild(q)}else if(t.firstChild&&(a.insertBefore(t,r),t=l.createDocumentFragment()),r)r=r.nextSibling;t.firstChild&&a.insertBefore(t,r)}else{s=this._getClientHeight();
+p=this._model.getLineCount();r=s+o.top+o.bottom-2*this._metrics.scrollWidth;i=d*p<r?d:r/p;if(a.rulerChanged){for(s=a.childNodes.length;s>1;)a.removeChild(a.lastChild),s--;h=h.getAnnotations(0,p);t=l.createDocumentFragment();for(var u in h)if(p=u>>>0,!(p<0)){q=f.createElement(l,"div");s=h[u];g(s.style,q);q.style.position="absolute";q.style.top=this._metrics.scrollWidth+d+Math.floor(p*i)+"px";if(s.html)q.innerHTML=s.html;q.annotation=s;q.lineIndex=p;t.appendChild(q)}a.appendChild(t)}else if(a._oldTrackHeight!==
+r)for(q=a.firstChild?a.firstChild.nextSibling:null;q;)q.style.top=this._metrics.scrollWidth+d+Math.floor(q.lineIndex*i)+"px",q=q.nextSibling;a._oldTrackHeight=r}a.rulerChanged=!1;a=a.nextSibling}},_updateStyleSheet:function(){var a="";f.isWebkit&&this._metrics.scrollWidth>0&&(a+="\n.textview ::-webkit-scrollbar-corner {background: #eeeeee;}");f.isFirefox&&f.isMac&&this._highlightRGB&&this._highlightRGB!=="Highlight"&&(a+="\n.textview ::-moz-selection {background: "+this._highlightRGB+";}");if(a){var b=
+document.getElementById("_textviewStyle");if(b)b.removeChild(b.firstChild),b.appendChild(document.createTextNode(a));else{b=f.createElement(document,"style");b.id="_textviewStyle";var e=document.getElementsByTagName("head")[0]||document.documentElement;b.appendChild(document.createTextNode(a));e.insertBefore(b,e.firstChild)}}},_updateStyle:function(a){if(!a&&f.isIE)this._rootDiv.style.lineHeight="normal";var b=this._metrics=this._calculateMetrics();this._rootDiv.style.lineHeight=f.isIE?b.lineHeight-
+(b.lineTrim.top+b.lineTrim.bottom)+"px":"normal";this._updateStyleSheet();a||(this.redraw(),this._resetLineWidth())}};i.EventTarget.addMixin(t.prototype);return{TextView:t}});
+define("orion/editor/projectionTextModel",["orion/editor/textModel","orion/editor/eventTarget"],function(k,m){function n(i){this._model=i;this._projections=[];var c=this;this._listener={onChanged:function(d){c._onChanged(d)},onChanging:function(d){c._onChanging(d)}};i.addEventListener("postChanged",this._listener.onChanged);i.addEventListener("preChanging",this._listener.onChanging)}n.prototype={destroy:function(){if(this._model)this._model.removeEventListener("postChanged",this._listener.onChanged),
+this._model.removeEventListener("preChanging",this._listener.onChanging),this._model=null},addProjection:function(i){if(i){var c=this._model,d=this._projections;i._lineIndex=c.getLineAtOffset(i.start);i._lineCount=c.getLineAtOffset(i.end)-i._lineIndex;var f=i.text;f||(f="");i._model=typeof f==="string"?new k.TextModel(f,c.getLineDelimiter()):f;var c=this.mapOffset(i.start,!0),f=i.end-i.start,g=i._lineCount,h=i._model.getCharCount(),b=i._model.getLineCount()-1;this.onChanging({type:"Changing",text:i._model.getText(),
+start:c,removedCharCount:f,addedCharCount:h,removedLineCount:g,addedLineCount:b});var a=this._binarySearch(d,i.start);d.splice(a,0,i);this.onChanged({type:"Changed",start:c,removedCharCount:f,addedCharCount:h,removedLineCount:g,addedLineCount:b})}},getProjections:function(){return this._projections.slice(0)},getBaseModel:function(){return this._model},mapOffset:function(i,c){var d=this._projections,f=0,g,h;if(c){for(g=0;g<d.length;g++){h=d[g];if(h.start>i)break;if(h.end>i)return-1;f+=h._model.getCharCount()-
+(h.end-h.start)}return i+f}for(g=0;g<d.length;g++){h=d[g];if(h.start>i-f)break;var b=h._model.getCharCount();if(h.start+b>i-f)return-1;f+=b-(h.end-h.start)}return i-f},removeProjection:function(i){var c,d=0;for(c=0;c<this._projections.length;c++){var f=this._projections[c];if(f===i){i=f;break}d+=f._model.getCharCount()-(f.end-f.start)}if(c<this._projections.length){var f=this._model,d=i.start+d,g=i.end-i.start,h=i._lineCount,b=i._model.getCharCount(),a=i._model.getLineCount()-1;this.onChanging({type:"Changing",
+text:f.getText(i.start,i.end),start:d,removedCharCount:b,addedCharCount:g,removedLineCount:a,addedLineCount:h});this._projections.splice(c,1);this.onChanged({type:"Changed",start:d,removedCharCount:b,addedCharCount:g,removedLineCount:a,addedLineCount:h})}},_binarySearch:function(i,c){for(var d=i.length,f=-1,g;d-f>1;)g=Math.floor((d+f)/2),c<=i[g].start?d=g:f=g;return d},getCharCount:function(){for(var i=this._model.getCharCount(),c=this._projections,d=0;d<c.length;d++){var f=c[d];i+=f._model.getCharCount()-
+(f.end-f.start)}return i},getLine:function(i,c){if(i<0)return null;var d=this._model,f=this._projections,g=0,h=[],b=0,a,e,l;for(a=0;a<f.length;a++){l=f[a];if(l._lineIndex>=i-g)break;e=l._model.getLineCount()-1;if(l._lineIndex+e>=i-g)if(b=i-(l._lineIndex+g),b<e)return l._model.getLine(b,c);else h.push(l._model.getLine(e));b=l.end;g+=e-l._lineCount}for(b=Math.max(b,d.getLineStart(i-g));a<f.length;a++){l=f[a];if(l._lineIndex>i-g)break;h.push(d.getText(b,l.start));e=l._model.getLineCount()-1;if(l._lineIndex+
+e>i-g)return h.push(l._model.getLine(0,c)),h.join("");h.push(l._model.getText());b=l.end;g+=e-l._lineCount}f=d.getLineEnd(i-g,c);b<f&&h.push(d.getText(b,f));return h.join("")},getLineAtOffset:function(i){for(var c=this._model,d=this._projections,f=0,g=0,h=0;h<d.length;h++){var b=d[h];if(b.start>i-f)break;var a=b._model.getCharCount();if(b.start+a>i-f){d=i-(b.start+f);g+=b._model.getLineAtOffset(d);f+=d;break}g+=b._model.getLineCount()-1-b._lineCount;f+=a-(b.end-b.start)}return c.getLineAtOffset(i-
+f)+g},getLineCount:function(){for(var i=this._projections,c=this._model.getLineCount(),d=0;d<i.length;d++){var f=i[d];c+=f._model.getLineCount()-1-f._lineCount}return c},getLineDelimiter:function(){return this._model.getLineDelimiter()},getLineEnd:function(i,c){if(i<0)return-1;for(var d=this._model,f=this._projections,g=0,h=0,b=0;b<f.length;b++){var a=f[b];if(a._lineIndex>i-g)break;var e=a._model.getLineCount()-1;if(a._lineIndex+e>i-g)return a._model.getLineEnd(i-(a._lineIndex+g),c)+a.start+h;h+=
+a._model.getCharCount()-(a.end-a.start);g+=e-a._lineCount}return d.getLineEnd(i-g,c)+h},getLineStart:function(i){if(i<0)return-1;for(var c=this._model,d=this._projections,f=0,g=0,h=0;h<d.length;h++){var b=d[h];if(b._lineIndex>=i-f)break;var a=b._model.getLineCount()-1;if(b._lineIndex+a>=i-f)return b._model.getLineStart(i-(b._lineIndex+f))+b.start+g;g+=b._model.getCharCount()-(b.end-b.start);f+=a-b._lineCount}return c.getLineStart(i-f)+g},getText:function(i,c){i===void 0&&(i=0);var d=this._model,f=
+this._projections,g=0,h=[],b,a,e;for(b=0;b<f.length;b++){a=f[b];if(a.start>i-g)break;e=a._model.getCharCount();if(a.start+e>i-g)if(c!==void 0&&a.start+e>c-g)return a._model.getText(i-(a.start+g),c-(a.start+g));else h.push(a._model.getText(i-(a.start+g))),i=a.end+g+e-(a.end-a.start);g+=e-(a.end-a.start)}var l=i-g;if(c!==void 0){for(;b<f.length;b++){a=f[b];if(a.start>c-g)break;h.push(d.getText(l,a.start));e=a._model.getCharCount();if(a.start+e>c-g)return h.push(a._model.getText(0,c-(a.start+g))),h.join("");
+h.push(a._model.getText());l=a.end;g+=e-(a.end-a.start)}h.push(d.getText(l,c-g))}else{for(;b<f.length;b++)a=f[b],h.push(d.getText(l,a.start)),h.push(a._model.getText()),l=a.end;h.push(d.getText(l))}return h.join("")},_onChanged:function(){var i=this._change,c=i.baseStart,d=i.baseEnd,f,g,h=this._projections;for(f=0;f<h.length;f++)if(g=h[f],g.end>c)break;var b=f;for(f=0;f<h.length;f++)if(g=h[f],g.start>=d)break;var a=f,e=this._model,c=i.baseText.length-(d-c);for(f=a;f<h.length;f++)g=h[f],g.start+=c,
+g.end+=c,g._lineIndex=e.getLineAtOffset(g.start);g=h.splice(b,a-b);for(f=0;f<g.length;f++)g[f].annotation&&g[f].annotation._expand();this.onChanged({type:"Changed",start:i.start,removedCharCount:i.removedCharCount,addedCharCount:i.addedCharCount,removedLineCount:i.removedLineCount,addedLineCount:i.addedLineCount});this._change=void 0},_onChanging:function(i){var c=!!this._change,d=this._change||{},f=i.start,g=f+i.removedCharCount;d.baseStart=f;d.baseEnd=g;d.baseText=i.text;d.addedLineCount=i.addedLineCount;
+if(!c){this._change=d;d.text=i.text;var h=this._projections,b,a,e,i=function(c){for(a=0,b=0;a<h.length;a++){e=h[a];if(e.start>c)break;if(e.end>c)return-1;b+=e._model.getCharCount()-(e.end-e.start)}return c+b};d.start=i(f);if(d.start===-1)d.text=this._model.getText(e.start,f)+d.text,d.addedLineCount+=this._model.getLineAtOffset(f)-this._model.getLineAtOffset(e.start),d.start=e.start+b;d.end=i(g);if(d.end===-1)d.text+=this._model.getText(g,e.end),d.addedLineCount+=this._model.getLineAtOffset(e.end)-
+this._model.getLineAtOffset(g),d.end=e.start+b}d.addedCharCount=d.text.length;d.removedCharCount=d.end-d.start;d.removedLineCount=this.getLineAtOffset(d.end)-this.getLineAtOffset(d.start);this.onChanging({type:"Changing",text:d.text,start:d.start,removedCharCount:d.removedCharCount,addedCharCount:d.addedCharCount,removedLineCount:d.removedLineCount,addedLineCount:d.addedLineCount})},onChanging:function(i){return this.dispatchEvent(i)},onChanged:function(i){return this.dispatchEvent(i)},setLineDelimiter:function(i){this._model.setLineDelimiter(i)},
+setText:function(i,c,d){function f(e){for(b=0,h=0;b<g.length;b++){a=g[b];if(a.start>e-h)break;var c=a._model.getCharCount();if(a.start+c>e-h)return-1;h+=c-(a.end-a.start)}return e-h}this._change={text:i||"",start:c||0,end:d===void 0?this.getCharCount():d};var g=this._projections,h,b,a,e,l,i=f(this._change.start);if(i===-1)e={projection:a,start:this._change.start-(a.start+h)},i=a.end;c=f(this._change.end);if(c===-1)l={projection:a,end:this._change.end-(a.start+h)},c=a.start;if(e&&l&&e.projection===
+l.projection)a._model.setText(this._change.text,e.start,l.end);else{this._model.setText(this._change.text,i,c);if(e)a=e.projection,a._model.setText("",e.start);if(l)a=l.projection,a._model.setText("",0,l.end),a.start=a.end,a._lineCount=0}this._change=void 0}};m.EventTarget.addMixin(n.prototype);return{ProjectionTextModel:n}});
+define("orion/editor/annotations",["i18n!orion/editor/nls/messages","orion/editor/eventTarget"],function(k,m){function n(b,a,e){this.start=b;this.end=a;this._projectionModel=e;this.html=this._expandedHTML;this.style=this._expandedStyle;this.expanded=!0}function i(){}function c(b,a){var e=b.lastIndexOf("."),e=b.substring(e+1),c={title:k[e],style:{styleClass:"annotation "+e},html:"<div class='annotationHTML "+e+"'></div>",overviewStyle:{styleClass:"annotationOverview "+e}};a?c.lineStyle={styleClass:"annotationLine "+
+e}:c.rangeStyle={styleClass:"annotationRange "+e};i.registerType(b,c)}function d(){}function f(b){this._annotations=[];var a=this;this._listener={onChanged:function(b){a._onChanged(b)}};this.setTextModel(b)}function g(b,a){this._view=b;this._annotationModel=a;var e=this;this._listener={onDestroy:function(a){e._onDestroy(a)},onLineStyle:function(a){e._onLineStyle(a)},onChanged:function(a){e._onAnnotationModelChanged(a)}};b.addEventListener("Destroy",this._listener.onDestroy);b.addEventListener("postLineStyle",
+this._listener.onLineStyle);a.addEventListener("Changed",this._listener.onChanged)}n.prototype={_expandedHTML:"<div class='annotationHTML expanded'></div>",_expandedStyle:{styleClass:"annotation expanded"},_collapsedHTML:"<div class='annotationHTML collapsed'></div>",_collapsedStyle:{styleClass:"annotation collapsed"},_collapse:function(){if(!this.expanded)return!1;this.expanded=!1;this.html=this._collapsedHTML;this.style=this._collapsedStyle;this._annotationModel&&this._annotationModel.modifyAnnotation(this);
+return!0},_expand:function(){if(this.expanded)return!1;this.expanded=!0;this.html=this._expandedHTML;this.style=this._expandedStyle;this._annotationModel&&this._annotationModel.modifyAnnotation(this);return!0},collapse:function(){if(this._collapse()){var b=this._projectionModel,a=b.getBaseModel();this._projection={annotation:this,start:a.getLineStart(a.getLineAtOffset(this.start)+1),end:a.getLineEnd(a.getLineAtOffset(this.end),!0)};b.addProjection(this._projection)}},expand:function(){this._expand()&&
+this._projectionModel.removeProjection(this._projection)}};i.ANNOTATION_ERROR="orion.annotation.error";i.ANNOTATION_WARNING="orion.annotation.warning";i.ANNOTATION_TASK="orion.annotation.task";i.ANNOTATION_BREAKPOINT="orion.annotation.breakpoint";i.ANNOTATION_BOOKMARK="orion.annotation.bookmark";i.ANNOTATION_FOLDING="orion.annotation.folding";i.ANNOTATION_CURRENT_BRACKET="orion.annotation.currentBracket";i.ANNOTATION_MATCHING_BRACKET="orion.annotation.matchingBracket";i.ANNOTATION_CURRENT_LINE="orion.annotation.currentLine";
+i.ANNOTATION_CURRENT_SEARCH="orion.annotation.currentSearch";i.ANNOTATION_MATCHING_SEARCH="orion.annotation.matchingSearch";i.ANNOTATION_READ_OCCURRENCE="orion.annotation.readOccurrence";i.ANNOTATION_WRITE_OCCURRENCE="orion.annotation.writeOccurrence";i.ANNOTATION_SELECTED_LINKED_GROUP="orion.annotation.selectedLinkedGroup";i.ANNOTATION_CURRENT_LINKED_GROUP="orion.annotation.currentLinkedGroup";i.ANNOTATION_LINKED_GROUP="orion.annotation.linkedGroup";i.ANNOTATION_BLAME="orion.annotation.blame";i.ANNOTATION_CURRENT_BLAME=
+"orion.annotation.currentBlame";var h={};i.registerType=function(b,a){var e=a;if(typeof e!=="function")e=function(a,b,e){this.start=a;this.end=b;if(e!==void 0)this.title=e},e.prototype=a;e.prototype.type=b;h[b]=e;return b};i.createAnnotation=function(b,a,e,c){return new (this.getType(b))(a,e,c)};i.getType=function(b){return h[b]};c(i.ANNOTATION_ERROR);c(i.ANNOTATION_WARNING);c(i.ANNOTATION_TASK);c(i.ANNOTATION_BREAKPOINT);c(i.ANNOTATION_BOOKMARK);c(i.ANNOTATION_CURRENT_BRACKET);c(i.ANNOTATION_MATCHING_BRACKET);
+c(i.ANNOTATION_CURRENT_SEARCH);c(i.ANNOTATION_MATCHING_SEARCH);c(i.ANNOTATION_READ_OCCURRENCE);c(i.ANNOTATION_WRITE_OCCURRENCE);c(i.ANNOTATION_SELECTED_LINKED_GROUP);c(i.ANNOTATION_CURRENT_LINKED_GROUP);c(i.ANNOTATION_LINKED_GROUP);c(i.ANNOTATION_CURRENT_LINE,!0);c(i.ANNOTATION_BLAME,!0);c(i.ANNOTATION_CURRENT_BLAME,!0);i.registerType(i.ANNOTATION_FOLDING,n);d.addMixin=function(b){var a=d.prototype,e;for(e in a)a.hasOwnProperty(e)&&(b[e]=a[e])};d.prototype={addAnnotationType:function(b){if(!this._annotationTypes)this._annotationTypes=
+[];this._annotationTypes.push(b)},getAnnotationTypePriority:function(b){if(this._annotationTypes)for(var a=0;a<this._annotationTypes.length;a++)if(this._annotationTypes[a]===b)return a+1;return 0},getAnnotationsByType:function(b,a,e){b=b.getAnnotations(a,e);for(e=[];b.hasNext();)a=b.next(),this.getAnnotationTypePriority(a.type)!==0&&e.push(a);var c=this;e.sort(function(a,b){return c.getAnnotationTypePriority(a.type)-c.getAnnotationTypePriority(b.type)});return e},isAnnotationTypeVisible:function(b){return this.getAnnotationTypePriority(b)!==
+0},removeAnnotationType:function(b){if(this._annotationTypes)for(var a=0;a<this._annotationTypes.length;a++)if(this._annotationTypes[a]===b){this._annotationTypes.splice(a,1);break}}};f.prototype={addAnnotation:function(b){if(b){var a=this._annotations,e=this._binarySearch(a,b.start);a.splice(e,0,b);b._annotationModel=this;this.onChanged({type:"Changed",added:[b],removed:[],changed:[]})}},getTextModel:function(){return this._model},getAnnotations:function(b,a){var e=this._annotations,c,d=0,f;f=b===
+void 0&&a===void 0?function(){return d<e.length?e[d++]:null}:function(){for(;d<e.length;){var c=e[d++];if(b===c.start||(b>c.start?b<c.end:c.start<a))return c;if(c.start>=a)break}return null};c=f();return{next:function(){var a=c;a&&(c=f());return a},hasNext:function(){return c!==null}}},modifyAnnotation:function(b){if(b&&!(this._getAnnotationIndex(b)<0))this.onChanged({type:"Changed",added:[],removed:[],changed:[b]})},onChanged:function(b){return this.dispatchEvent(b)},removeAnnotations:function(b){var a=
+this._annotations,e,c;if(b){e=[];for(c=a.length-1;c>=0;c--){var d=a[c];if(d.type===b)a.splice(c,1),e.splice(0,0,d),d._annotationModel=null}}else e=a;this.onChanged({type:"Changed",removed:e,added:[],changed:[]})},removeAnnotation:function(b){if(b){var a=this._getAnnotationIndex(b);if(!(a<0))b._annotationModel=null,this.onChanged({type:"Changed",removed:this._annotations.splice(a,1),added:[],changed:[]})}},replaceAnnotations:function(b,a){var e=this._annotations,c,d,f,g=[];if(b)for(c=b.length-1;c>=
+0;c--)if(f=b[c],d=this._getAnnotationIndex(f),!(d<0))f._annotationModel=null,e.splice(d,1),g.splice(0,0,f);a||(a=[]);for(c=0;c<a.length;c++)f=a[c],d=this._binarySearch(e,f.start),f._annotationModel=this,e.splice(d,0,f);this.onChanged({type:"Changed",removed:g,added:a,changed:[]})},setTextModel:function(b){this._model&&this._model.removeEventListener("Changed",this._listener.onChanged);(this._model=b)&&this._model.addEventListener("Changed",this._listener.onChanged)},_binarySearch:function(b,a){for(var e=
+b.length,c=-1,d;e-c>1;)d=Math.floor((e+c)/2),a<=b[d].start?e=d:c=d;return e},_getAnnotationIndex:function(b){for(var a=this._annotations,e=this._binarySearch(a,b.start);e<a.length&&a[e].start===b.start;){if(a[e]===b)return e;e++}return-1},_onChanged:function(b){var a=b.start,e=b.removedCharCount,c=this._annotations,d=a+e;if(0<c.length){for(var f={type:"Changed",added:[],removed:[],changed:[],textModelChangedEvent:b},b=b.addedCharCount-e,e=0;e<c.length;e++){var g=c[e];if(g.start>=d)g._oldStart=g.start,
+g._oldEnd=g.end,g.start+=b,g.end+=b,f.changed.push(g);else if(!(g.end<=a))g.start<a&&d<g.end?(g._oldStart=g.start,g._oldEnd=g.end,g.end+=b,f.changed.push(g)):(c.splice(e,1),f.removed.push(g),g._annotationModel=null,g.expand&&g.expand(),e--)}if(f.added.length>0||f.removed.length>0||f.changed.length>0)this.onChanged(f)}}};m.EventTarget.addMixin(f.prototype);g.prototype={destroy:function(){var b=this._view;if(b)b.removeEventListener("Destroy",this._listener.onDestroy),b.removeEventListener("LineStyle",
+this._listener.onLineStyle),this.view=null;(b=this._annotationModel)&&b.removeEventListener("Changed",this._listener.onChanged)},_mergeStyle:function(b,a){if(a){b||(b={});b.styleClass&&a.styleClass&&b.styleClass!==a.styleClass?b.styleClass+=" "+a.styleClass:b.styleClass=a.styleClass;var e;if(a.tagName&&!b.tagName)b.tagName=a.tagName;if(a.style){if(!b.style)b.style={};for(e in a.style)b.style[e]||(b.style[e]=a.style[e])}if(a.attributes){if(!b.attributes)b.attributes={};for(e in a.attributes)b.attributes[e]||
+(b.attributes[e]=a.attributes[e])}}return b},_mergeStyleRanges:function(b,a){b||(b=[]);var e,c;for(c=0;c<b.length&&a;c++){var d=b[c];if(a.end<=d.start)break;if(!(a.start>=d.end)){e=this._mergeStyle({},d.style);e=this._mergeStyle(e,a.style);var f=[];f.push(c,1);a.start<d.start&&f.push({start:a.start,end:d.start,style:a.style});a.start>d.start&&f.push({start:d.start,end:a.start,style:d.style});f.push({start:Math.max(d.start,a.start),end:Math.min(d.end,a.end),style:e});a.end<d.end&&f.push({start:a.end,
+end:d.end,style:d.style});a=a.end>d.end?{start:d.end,end:a.end,style:a.style}:null;Array.prototype.splice.apply(b,f)}}a&&(e=this._mergeStyle({},a.style),b.splice(c,0,{start:a.start,end:a.end,style:e}));return b},_onAnnotationModelChanged:function(b){function a(a,b){f.getBaseModel&&(a=f.mapOffset(a,!0),b=f.mapOffset(b,!0));a!==-1&&b!==-1&&c.redrawRange(a,b)}function e(b,e){for(var c=0;c<b.length;c++)if(d.isAnnotationTypeVisible(b[c].type)){var l=b[c];a(l.start,l.end);e&&l._oldStart!==void 0&&l._oldEnd&&
+a(l._oldStart,l._oldEnd)}}var c=this._view;if(c){var d=this,f=c.getModel();e(b.added);e(b.removed);e(b.changed,!0)}},_onDestroy:function(){this.destroy()},_onLineStyle:function(b){var a=this._annotationModel,e=b.textView.getModel(),c=a.getTextModel(),d=b.lineStart,f=b.lineStart+b.lineText.length;c!==e&&(d=e.mapOffset(d),f=e.mapOffset(f));for(a=a.getAnnotations(d,f);a.hasNext();)if(d=a.next(),this.isAnnotationTypeVisible(d.type)){if(d.rangeStyle){var f=d.start,g=d.end;c!==e&&(f=e.mapOffset(f,!0),g=
+e.mapOffset(g,!0));b.ranges=this._mergeStyleRanges(b.ranges,{start:f,end:g,style:d.rangeStyle})}if(d.lineStyle)b.style=this._mergeStyle({},b.style),b.style=this._mergeStyle(b.style,d.lineStyle)}}};d.addMixin(g.prototype);return{FoldingAnnotation:n,AnnotationType:i,AnnotationTypeList:d,AnnotationModel:f,AnnotationStyler:g}});
+define("orion/editor/tooltip","i18n!orion/editor/nls/messages,orion/editor/textView,orion/editor/textModel,orion/editor/projectionTextModel,orion/editor/util,orion/util".split(","),function(k,m,n,i,c,d){function f(c){this._view=c;this._fadeDelay=500;this._hideDelay=200;this._showDelay=500;this._autoHideDelay=5E3;this._create(c.getOptions("parent").ownerDocument)}f.getTooltip=function(c){if(!c._tooltip)c._tooltip=new f(c);return c._tooltip};f.prototype={_create:function(f){if(!this._tooltipDiv){var h=
+this._tooltipDiv=d.createElement(f,"div");h.tabIndex=0;h.className="textviewTooltip";h.setAttribute("aria-live","assertive");h.setAttribute("aria-atomic","true");var b=this._tooltipContents=d.createElement(f,"div");h.appendChild(b);f.body.appendChild(h);var a=this;c.addEventListener(h,"mouseover",function(){if(a._hideDelay){var b=a._getWindow();if(a._delayedHideTimeout)b.clearTimeout(a._delayedHideTimeout),a._delayedHideTimeout=null;if(a._hideTimeout)b.clearTimeout(a._hideTimeout),a._hideTimeout=
+null;a._nextTarget=null}},!1);c.addEventListener(h,"mouseout",function(b){b=b.relatedTarget||b.toElement;b===h||a._hasFocus()||(!b||!c.contains(h,b))&&a._hide()},!1);c.addEventListener(h,"keydown",function(b){b.keyCode===27&&a._hide()},!1);c.addEventListener(f,"mousedown",this._mouseDownHandler=function(b){a.isVisible()&&(c.contains(h,b.target||b.srcElement)||a._hide())},!0);this._view.addEventListener("Destroy",function(){a.destroy()});this._hide()}},_getWindow:function(){var c=this._tooltipDiv.ownerDocument;
+return c.defaultView||c.parentWindow},destroy:function(){if(this._tooltipDiv){this._hide();var d=this._tooltipDiv.parentNode;d&&d.removeChild(this._tooltipDiv);c.removeEventListener(this._tooltipDiv.ownerDocument,"mousedown",this._mouseDownHandler,!0);this._tooltipDiv=null}},_hasFocus:function(){var d=this._tooltipDiv;return!d?!1:c.contains(d,d.ownerDocument.activeElement)},hide:function(c){if(c===void 0)c=this._hideDelay;var d=this._getWindow();if(this._delayedHideTimeout)d.clearTimeout(this._delayedHideTimeout),
+this._delayedHideTimeout=null;var b=this;c?b._delayedHideTimeout=d.setTimeout(function(){b._delayedHideTimeout=null;b._hide();b.setTarget(b._nextTarget,0)},c):(b._hide(),b.setTarget(b._nextTarget,0))},_hide:function(){var c=this._tooltipDiv;if(c){this._hasFocus()&&this._view.focus();if(this._contentsView)this._contentsView.destroy(),this._contentsView=null;if(this._tooltipContents)this._tooltipContents.innerHTML="";c.style.visibility="hidden";c=this._getWindow();if(this._showTimeout)c.clearTimeout(this._showTimeout),
+this._showTimeout=null;if(this._delayedHideTimeout)c.clearTimeout(this._delayedHideTimeout),this._delayedHideTimeout=null;if(this._hideTimeout)c.clearTimeout(this._hideTimeout),this._hideTimeout=null;if(this._fadeTimeout)c.clearInterval(this._fadeTimeout),this._fadeTimeout=null}},isVisible:function(){return this._tooltipDiv&&this._tooltipDiv.style.visibility==="visible"},setTarget:function(c,d,b){if(this.isVisible()){if(!this._hasFocus())this._nextTarget=c,this.hide(b)}else if(this._target=c){var a=
+this,c=a._getWindow();if(a._showTimeout)c.clearTimeout(a._showTimeout),a._showTimeout=null;d===0?a.show(!0):a._showTimeout=c.setTimeout(function(){a._showTimeout=null;a.show(!0)},d?d:a._showDelay)}},show:function(c){if(this._target){var d=this._target.getTooltipInfo();if(d){var b=this._tooltipDiv,a=this._tooltipContents;b.style.left=b.style.right=b.style.width=b.style.height=a.style.width=a.style.height="auto";var e=d.contents;e instanceof Array&&(e=this._getAnnotationContents(e));if(typeof e==="string")a.innerHTML=
+e;else if(this._isNode(e))a.appendChild(e);else if(e instanceof i.ProjectionTextModel){var l=this._view,f=l.getOptions();f.wrapMode=!1;f.parent=a;var q=f.themeClass;q?((q=q.replace("tooltipTheme",""))&&(q=" "+q),q="tooltipTheme"+q):q="tooltipTheme";f.themeClass=q;f=this._contentsView=new m.TextView(f);f.addEventListener("LineStyle",function(a){l.onLineStyle(a)});f.setModel(e);e=f.computeSize();a.style.width=e.width+"px";a.style.height=e.height+"px";f.resize()}else return;a=b.ownerDocument.documentElement;
+d.anchor==="right"?(e=a.clientWidth-d.x,b.style.right=e+"px"):(e=parseInt(this._getNodeStyle(b,"padding-left","0"),10),e+=parseInt(this._getNodeStyle(b,"border-left-width","0"),10),e=d.x-e,b.style.left=e+"px");b.style.maxWidth=a.clientWidth-e-10+"px";e=parseInt(this._getNodeStyle(b,"padding-top","0"),10);e+=parseInt(this._getNodeStyle(b,"border-top-width","0"),10);e=d.y-e;b.style.top=e+"px";b.style.maxHeight=a.clientHeight-e-10+"px";b.style.opacity="1";b.style.visibility="visible";if(c){var r=this,
+p=this._getWindow();r._hideTimeout=p.setTimeout(function(){r._hideTimeout=null;var a=parseFloat(r._getNodeStyle(b,"opacity","1"));r._fadeTimeout=p.setInterval(function(){b.style.visibility==="visible"&&a>0?(a-=0.1,b.style.opacity=a):r._hide()},r._fadeDelay/10)},r._autoHideDelay)}}}},_getAnnotationContents:function(f){function h(a,b){var e=t.getLineStart(t.getLineAtOffset(a)),c=t.getLineEnd(t.getLineAtOffset(b),!0);return t.getText(e,c)}function b(a){var b=a.title,e=d.createElement(q,"div");e.className=
+"tooltipRow";if(a.html)e.innerHTML=a.html,e.lastChild&&c.addEventListener(e.lastChild,"click",function(){var b=a.start,e=a.end;p.getBaseModel&&(b=p.mapOffset(b,!0),e=p.mapOffset(e,!0));r.setSelection(b,e,1/3,function(){o._hide()})},!1),e.appendChild(q.createTextNode("\u00a0"));b||(b=h(a.start,a.end));typeof b==="function"&&(b=a.title());if(typeof b==="string"){var j=d.createElement(q,"span");j.appendChild(q.createTextNode(b));b=j}e.appendChild(b);return e}for(var a,e=[],l=0;l<f.length;l++)a=f[l],
+a.title!==""&&!a.groupAnnotation&&e.push(a);f=e;if(f.length===0)return null;var o=this,q=this._tooltipDiv.ownerDocument,r=this._view,p=r.getModel(),t=p.getBaseModel?p.getBaseModel():p;if(f.length===1)if(a=f[0],a.title!==void 0){a=b(a);if(a.firstChild)(f=a.firstChild.className)&&(f+=" "),f+="single",a.firstChild.className=f;return a}else return f=new i.ProjectionTextModel(t),e=t.getLineStart(t.getLineAtOffset(a.start)),l=t.getCharCount(),a.end!==l&&f.addProjection({start:a.end,end:l}),e>0&&f.addProjection({start:0,
+end:e}),f;else{e=d.createElement(q,"div");a=d.createElement(q,"em");a.appendChild(q.createTextNode(k.multipleAnnotations));e.appendChild(a);for(l=0;l<f.length;l++)a=f[l],(a=b(a))&&e.appendChild(a);return e}},_getNodeStyle:function(c,d,b){var a;if(c&&(a=c.style[d],!a))if(c.currentStyle){for(a=0;(a=d.indexOf("-",a))!==-1;)d=d.substring(0,a)+d.substring(a+1,a+2).toUpperCase()+d.substring(a+2);a=c.currentStyle[d]}else a=(c=c.ownerDocument.defaultView.getComputedStyle(c,null))?c.getPropertyValue(d):null;
+return a||b},_isNode:function(c){return typeof Node==="object"?c instanceof Node:c&&typeof c==="object"&&typeof c.nodeType==="number"&&typeof c.nodeName==="string"}};return{Tooltip:f}});
+define("orion/editor/rulers",["i18n!orion/editor/nls/messages","orion/editor/annotations","orion/editor/tooltip","orion/util"],function(k,m,n,i){function c(b,a,e,c){this._location=a||"left";this._overview=e||"page";this._rulerStyle=c;this._view=null;var d=this;this._listener={onTextModelChanged:function(a){d._onTextModelChanged(a)},onAnnotationModelChanged:function(a){d._onAnnotationModelChanged(a)}};this.setAnnotationModel(b)}function d(b,a,e,l,d){c.call(this,b,a,"page",e);this._oddStyle=l||{style:{backgroundColor:"white"}};
+this._evenStyle=d||{style:{backgroundColor:"white"}};this._numOfDigits=0;this._firstLine=1}function f(b,a,e){c.call(this,b,a,"page",e)}function g(b,a,e){c.call(this,b,a,"document",e)}function h(b,a,e){f.call(this,b,a,e)}c.prototype={getAnnotations:function(b,a){var e=this._annotationModel;if(!e)return[];var c=this._view.getModel(),d=c.getLineStart(b),f=c.getLineEnd(a-1),g=c;c.getBaseModel&&(g=c.getBaseModel(),d=c.mapOffset(d),f=c.mapOffset(f));for(var h=[],e=this.getAnnotationsByType(e,d,f),d=0;d<
+e.length;d++)for(var f=e[d],i=g.getLineAtOffset(f.start),v=g.getLineAtOffset(Math.max(f.start,f.end-1)),s=i;s<=v;s++){var u=s;if(c!==g){u=g.getLineStart(s);u=c.mapOffset(u,!0);if(u===-1)continue;u=c.getLineAtOffset(u)}if(b<=u&&u<a){var j=this._mergeAnnotation(h[u],f,s-i,v-i+1);j&&(h[u]=j)}}if(!this._multiAnnotation&&this._multiAnnotationOverlay)for(var k in h)h[k]._multiple&&(h[k].html+=this._multiAnnotationOverlay.html);return h},getAnnotationModel:function(){return this._annotationModel},getLocation:function(){return this._location},
+getOverview:function(){return this._overview},getRulerStyle:function(){return this._rulerStyle},getView:function(){return this._view},getWidestAnnotation:function(){return null},setAnnotationModel:function(b){this._annotationModel&&this._annotationModel.removEventListener("Changed",this._listener.onAnnotationModelChanged);(this._annotationModel=b)&&this._annotationModel.addEventListener("Changed",this._listener.onAnnotationModelChanged)},setMultiAnnotation:function(b){this._multiAnnotation=b},setMultiAnnotationOverlay:function(b){this._multiAnnotationOverlay=
+b},setView:function(b){this._onTextModelChanged&&this._view&&this._view.removeEventListener("ModelChanged",this._listener.onTextModelChanged);this._view=b;this._onTextModelChanged&&this._view&&this._view.addEventListener("ModelChanged",this._listener.onTextModelChanged)},onClick:function(b){if(b!==void 0){var a=this._view,e=a.getModel(),c=e,d=e.getLineStart(b),f=d,g=d,h=this._annotationModel;if(h){a=a.getSelection();g=e.getLineEnd(b,!0);if(d<=a.start&&a.start<g)d=a.start;e.getBaseModel&&(d=e.mapOffset(d),
+g=e.mapOffset(g),c=e.getBaseModel());for(var i,g=h.getAnnotations(d,g),h=null;!i&&g.hasNext();)a=g.next(),this.isAnnotationTypeVisible(a.type)&&(h=a,a.start<=d||(i=a));if(h&&h.groupId!==void 0)this._currentClickGroup=this._currentClickGroup===h.groupId?null:h.groupId,this._setCurrentGroup(b);i&&c.getLineAtOffset(i.start)===c.getLineAtOffset(d)?(d=i.start,g=i.end):g=d=f;e.getBaseModel&&(d=e.mapOffset(d,!0),g=e.mapOffset(g,!0))}(b=n.Tooltip.getTooltip(this._view))&&b.setTarget(null);this._view.setSelection(g,
+d,1/3,function(){})}},onDblClick:function(){},onMouseMove:function(b,a){var e=n.Tooltip.getTooltip(this._view);if(e&&!(e.isVisible()&&this._tooltipLineIndex===b)){this._tooltipLineIndex=b;var c=this;e.setTarget({y:a.clientY,getTooltipInfo:function(){return c._getTooltipInfo(c._tooltipLineIndex,this.y)}})}},onMouseOver:function(b,a){this.onMouseMove(b,a);this._currentClickGroup||this._setCurrentGroup(b)},onMouseOut:function(){this._currentClickGroup||this._setCurrentGroup(-1);var b=n.Tooltip.getTooltip(this._view);
+b&&b.setTarget(null)},_getTooltipInfo:function(b,a){if(b!==void 0){var e=this._view,c=e.getModel(),d=this._annotationModel,f=[];if(d){var f=c.getLineStart(b),g=c.getLineEnd(b);c.getBaseModel&&(f=c.mapOffset(f),g=c.mapOffset(g));f=this.getAnnotationsByType(d,f,g)}d=this._getTooltipContents(b,f);if(!d)return null;d={contents:d,anchor:this.getLocation()};f=e.getClientArea();f.y=this.getOverview()==="document"?e.convert({y:a},"view","document").y:e.getLocationAtOffset(c.getLineStart(b)).y;e.convert(f,
+"document","page");d.x=f.x;d.y=f.y;d.anchor==="right"&&(d.x+=f.width);return d}},_getTooltipContents:function(b,a){return a},_onAnnotationModelChanged:function(b){function a(a){for(var b=0;b<a.length;b++)if(d.isAnnotationTypeVisible(a[b].type)){var f=a[b].start,g=a[b].end;c.getBaseModel&&(f=c.mapOffset(f,!0),g=c.mapOffset(g,!0));f!==-1&&g!==-1&&e.redrawLines(c.getLineAtOffset(f),c.getLineAtOffset(Math.max(f,g-1))+1,d)}}var e=this._view;if(e){var c=e.getModel(),d=this,f=c.getLineCount();b.textModelChangedEvent?
+(b=b.textModelChangedEvent.start,c.getBaseModel&&(b=c.mapOffset(b,!0)),b=c.getLineAtOffset(b),e.redrawLines(b,f,d)):(a(b.added),a(b.removed),a(b.changed))}},_mergeAnnotation:function(b,a,e){b||(b={});if(e===0)if(b.html&&a.html){if(a.html!==b.html&&!b._multiple&&this._multiAnnotation)b.html=this._multiAnnotation.html;b._multiple=!0}else b.html=a.html;b.style=this._mergeStyle(b.style,a.style);return b},_mergeStyle:function(b,a){if(a){b||(b={});b.styleClass&&a.styleClass&&b.styleClass!==a.styleClass?
+b.styleClass+=" "+a.styleClass:b.styleClass=a.styleClass;var e;if(a.style){if(!b.style)b.style={};for(e in a.style)b.style[e]===void 0&&(b.style[e]=a.style[e])}if(a.attributes){if(!b.attributes)b.attributes={};for(e in a.attributes)b.attributes[e]===void 0&&(b.attributes[e]=a.attributes[e])}}return b},_setCurrentGroup:function(b){var a=this._annotationModel,e=null,c=a.getTextModel(),d,f=this._currentGroupAnnotation;if(b!==-1){var g=c.getLineStart(b),h=c.getLineEnd(b);c.getBaseModel&&(g=c.mapOffset(g),
+h=c.mapOffset(h));for(d=a.getAnnotations(g,h);d.hasNext();)if(c=d.next(),this.isAnnotationTypeVisible(c.type)&&c.start<=g&&c.end>=h&&c.groupId!==void 0){e=c;break}if(f&&e&&f.groupId===e.groupId)return}this._currentGroupAnnotation=null;f&&a.removeAnnotations(f.groupType);if(e&&b!==-1){this._currentGroupAnnotation=e;d=a.getAnnotations();for(b=[];d.hasNext();)c=d.next(),delete c.groupAnnotation,c.groupId===e.groupId&&(c=c.createGroupAnnotation(),b.push(c));a.replaceAnnotations(null,b)}}};m.AnnotationTypeList.addMixin(c.prototype);
+d.prototype=new c;d.prototype.getAnnotations=function(b,a){for(var e=c.prototype.getAnnotations.call(this,b,a),d=this._view.getModel(),f=b;f<a;f++){var g=f&1?this._oddStyle:this._evenStyle,h=f;d.getBaseModel&&(h=d.getLineStart(h),h=d.getBaseModel().getLineAtOffset(d.mapOffset(h)));e[f]||(e[f]={});e[f].html=this._firstLine+h+"";if(!e[f].style)e[f].style=g}return e};d.prototype.getWidestAnnotation=function(){var b=this._view.getModel().getLineCount();return this.getAnnotations(b-1,b)[b-1]};d.prototype.setFirstLine=
+function(b){this._firstLine=b!==void 0?b:1};d.prototype._onTextModelChanged=function(b){var b=b.start,a=this._view.getModel(),e=(this._firstLine+(a.getBaseModel?a.getBaseModel().getLineCount():a.getLineCount())-1+"").length;if(this._numOfDigits!==e)this._numOfDigits=e,this._view.redrawLines(a.getLineAtOffset(b),a.getLineCount(),this)};f.prototype=new c;g.prototype=new c;g.prototype.getRulerStyle=function(){var b={style:{lineHeight:"1px",fontSize:"1px"}};return b=this._mergeStyle(b,this._rulerStyle)};
+g.prototype._getTooltipContents=function(b,a){if(a.length===0){var e=this._view.getModel(),d=b;e.getBaseModel&&(d=e.getLineStart(d),d=e.getBaseModel().getLineAtOffset(e.mapOffset(d)));return i.formatMessage(k.line,d+1)}return c.prototype._getTooltipContents.call(this,b,a)};g.prototype._mergeAnnotation=function(b,a,e,c){if(e===0){if(!b)b={html:" ",style:{style:{height:3*c+"px"}}},b.style=this._mergeStyle(b.style,a.overviewStyle);return b}};h.prototype=new f;h.prototype.onClick=function(b){if(b!==
+void 0){var a=this._annotationModel;if(a){var e=this._view.getModel(),c=e.getLineStart(b),b=e.getLineEnd(b,!0);e.getBaseModel&&(c=e.mapOffset(c),b=e.mapOffset(b),e=e.getBaseModel());for(var d,a=a.getAnnotations(c,b);!d&&a.hasNext();)b=a.next(),this.isAnnotationTypeVisible(b.type)&&(d=b);d&&e.getLineAtOffset(d.start)===e.getLineAtOffset(c)&&((e=n.Tooltip.getTooltip(this._view))&&e.setTarget(null),d.expanded?d.collapse():d.expand())}}};h.prototype._getTooltipContents=function(b,a){return a.length===
+1&&a[0].expanded?null:f.prototype._getTooltipContents.call(this,b,a)};h.prototype._onAnnotationModelChanged=function(b){function a(a){for(g=0;g<a.length;g++)if(d.isAnnotationTypeVisible(a[g].type)){var b=a[g].start;c.getBaseModel&&(b=c.mapOffset(b,!0));b!==-1&&(p=Math.min(p,c.getLineAtOffset(b)))}}if(b.textModelChangedEvent)f.prototype._onAnnotationModelChanged.call(this,b);else{var e=this._view;if(e){var c=e.getModel(),d=this,g,h=c.getLineCount(),p=h;a(b.added);a(b.removed);a(b.changed);b=e.getRulers();
+for(g=0;g<b.length;g++)e.redrawLines(p,h,b[g])}}};return{Ruler:c,AnnotationRuler:f,LineNumberRuler:d,OverviewRuler:g,FoldingRuler:h}});
+define("orion/editor/undoStack",[],function(){function k(i,c,d,f,g){this.model=i;this.offset=c;this.text=d;this.previousText=f;this.type=g}function m(i){this.owner=i;this.changes=[]}function n(i,c){this.size=c!==void 0?c:100;this.reset();var d=this;this._listener={onChanging:function(c){d._onChanging(c)},onDestroy:function(c){d._onDestroy(c)}};if(i.getModel){var f=i.getModel();f.getBaseModel&&(f=f.getBaseModel());this.model=f;this.setView(i)}else this.shared=!0,this.model=i;this.model.addEventListener("Changing",
+this._listener.onChanging)}k.prototype={getRedoChanges:function(){return[{start:this.offset,end:this.offset+this.previousText.length,text:this.text}]},getUndoChanges:function(){return[{start:this.offset,end:this.offset+this.text.length,text:this.previousText}]},undo:function(i,c){this._doUndoRedo(this.offset,this.previousText,this.text,i,c);return!0},redo:function(i,c){this._doUndoRedo(this.offset,this.text,this.previousText,i,c);return!0},merge:function(i,c,d,f,g){if(f===this.type)if(f===1&&i===
+this.offset+this.text.length)return this.text+=c,!0;else if(f===-1&&g===this.offset)return this.offset=i,this.previousText=d+this.previousText,!0;else if(f===-1&&i===this.offset)return this.previousText+=d,!0;return!1},_doUndoRedo:function(i,c,d,f,g){this.model.setText(c,i,i+d.length);g&&f&&(d=f.getModel(),d!==this.model&&(i=d.mapOffset(i,!0)),f.setSelection(i,i+c.length))}};m.prototype={getRedoChanges:function(){for(var i=[],c=0;c<this.changes.length;c++)i=i.concat(this.changes[c].getRedoChanges());
+return i},getUndoChanges:function(){for(var i=[],c=this.changes.length-1;c>=0;c--)i=i.concat(this.changes[c].getUndoChanges());return i},add:function(i){this.changes.push(i)},end:function(i){if(i)this.endSelection=i.getSelection(),this.endCaret=i.getCaretOffset();(i=this.owner)&&i.end&&i.end()},undo:function(i,c){this.changes.length>1&&i&&i.setRedraw(!1);for(var d=this.changes.length-1;d>=0;d--)this.changes[d].undo(i,!1);this.changes.length>1&&i&&i.setRedraw(!0);if(c&&i){var d=this.startSelection.start,
+f=this.startSelection.end;i.setSelection(this.startCaret?d:f,this.startCaret?f:d)}(d=this.owner)&&d.undo&&d.undo();return this.changes.length>0},redo:function(i,c){this.changes.length>1&&i&&i.setRedraw(!1);for(var d=0;d<this.changes.length;d++)this.changes[d].redo(i,!1);i&&i.setRedraw(!0);if(c&&i){var d=this.endSelection.start,f=this.endSelection.end;i.setSelection(this.endCaret?d:f,this.endCaret?f:d)}(d=this.owner)&&d.redo&&d.redo();return this.changes.length>0},merge:function(i,c,d,f,g){var h=this.changes.length;
+return h>0?this.changes[h-1].merge(i,c,d,f,g):!1},start:function(i){if(i)this.startSelection=i.getSelection(),this.startCaret=i.getCaretOffset();(i=this.owner)&&i.start&&i.start()}};n.prototype={destroy:function(){this._onDestroy()},add:function(i){this.compoundChange?this.compoundChange.add(i):(this.stack.splice(this.index,this.stack.length-this.index,i),this.index++,this.stack.length>this.size&&(this.stack.shift(),this.index--))},markClean:function(){this._commitUndo();if(this.cleanChange=this.stack[this.index-
+1])this.cleanChange.type=2},isClean:function(){return this.cleanChange===this.stack[this.index-1]},canUndo:function(){return this.index>0},canRedo:function(){return this.stack.length-this.index>0},endCompoundChange:function(){this.compoundChange&&this.compoundChange.end(this.view);this.compoundChange=void 0},getSize:function(){return{undo:this.index,redo:this.stack.length-this.index}},getRedoChanges:function(){this._commitUndo();for(var i=[],c=this.index;c<this.stack.length;c++)i=i.concat(this.stack[c].getRedoChanges());
+return i},getUndoChanges:function(){this._commitUndo();for(var i=[],c=this.index;c>=0;c--)i=i.concat(this.stack[c].getUndoChanges());return i},undo:function(){this._commitUndo();var i;i=!1;this._ignoreUndo=!0;do{if(this.index<=0)break;i=this.stack[--this.index]}while(!(i=i.undo(this.view,!0)));this._ignoreUndo=!1;return i},redo:function(){this._commitUndo();var i;this._ignoreUndo=!0;do{if(this.index>=this.stack.length)break;i=this.stack[this.index++]}while(!i.redo(this.view,!0));this._ignoreUndo=
+!1;return!0},reset:function(){this.index=0;this.cleanChange=void 0;this.stack=[];this._ignoreUndo=!1;this._compoundChange=void 0},setView:function(i){if(this.view!==i)this.view&&i.removeEventListener("Destroy",this._listener.onDestroy),(this.view=i)&&i.addEventListener("Destroy",this._listener.onDestroy)},startCompoundChange:function(i){this._commitUndo();i=new m(i);this.add(i);this.compoundChange=i;this.compoundChange.start(this.view);return this.compoundChange},_commitUndo:function(){this.endCompoundChange()},
+_onDestroy:function(i){(!i||!this.shared)&&this.model.removeEventListener("Changing",this._listener.onChanging);if(this.view)this.view.removeEventListener("Destroy",this._listener.onDestroy),this.view=null},_onChanging:function(i){if(!this._ignoreUndo){var c=i.text,d=i.start,f=i.addedCharCount,g=i.removedCharCount,i=d+g,h=0;f===0&&g===1?h=-1:f===1&&g===0&&(h=1);f=this.stack.length;g=this.model.getText(d,i);(!(f>0&&this.index===f)||!this.stack[f-1].merge(d,c,g,h,i))&&this.add(new k(this.model,d,c,
+g,h))}}};return{UndoStack:n}});
+define("orion/editor/textDND",["orion/util"],function(k){function m(k,i){this._view=k;this._undoStack=i;this._dragSelection=null;this._dropOffset=-1;this._dropText=null;var c=this;this._listener={onDragStart:function(d){c._onDragStart(d)},onDragEnd:function(d){c._onDragEnd(d)},onDragEnter:function(d){c._onDragEnter(d)},onDragOver:function(d){c._onDragOver(d)},onDrop:function(d){c._onDrop(d)},onDestroy:function(d){c._onDestroy(d)}};k.addEventListener("DragStart",this._listener.onDragStart);k.addEventListener("DragEnd",
+this._listener.onDragEnd);k.addEventListener("DragEnter",this._listener.onDragEnter);k.addEventListener("DragOver",this._listener.onDragOver);k.addEventListener("Drop",this._listener.onDrop);k.addEventListener("Destroy",this._listener.onDestroy)}m.prototype={destroy:function(){var k=this._view;if(k)k.removeEventListener("DragStart",this._listener.onDragStart),k.removeEventListener("DragEnd",this._listener.onDragEnd),k.removeEventListener("DragEnter",this._listener.onDragEnter),k.removeEventListener("DragOver",
+this._listener.onDragOver),k.removeEventListener("Drop",this._listener.onDrop),k.removeEventListener("Destroy",this._listener.onDestroy),this._view=null},_onDestroy:function(){this.destroy()},_onDragStart:function(k){var i=this._view,c=i.getSelection(),i=i.getModel();if(i.getBaseModel)c.start=i.mapOffset(c.start),c.end=i.mapOffset(c.end),i=i.getBaseModel();if(i=i.getText(c.start,c.end))this._dragSelection=c,k.event.dataTransfer.effectAllowed="copyMove",k.event.dataTransfer.setData("Text",i)},_onDragEnd:function(m){if(this._dragSelection){var i=
+this._view,c=m.event.dataTransfer.dropEffect;if(!k.isFirefox&&(c!=="none"||this._dropText))c=m.event.dataTransfer.dropEffect=this._dropEffect;this._undoStack&&this._undoStack.startCompoundChange();(m=c==="move")&&i.setText("",this._dragSelection.start,this._dragSelection.end);if(this._dropText){var c=this._dropText,d=this._dropOffset;if(m)if(d>=this._dragSelection.end)d-=this._dragSelection.end-this._dragSelection.start;else if(d>=this._dragSelection.start)d=this._dragSelection.start;i.setText(c,
+d,d);i.setSelection(d,d+c.length);this._dropText=null;this._dropOffset=-1}this._undoStack&&this._undoStack.endCompoundChange()}this._dragSelection=null},_onDragEnter:function(k){this._onDragOver(k)},_onDragOver:function(m){var i=m.event.dataTransfer.types,c=!this._view.getOptions("readonly");c&&i&&(c=i.contains?i.contains("text/plain")||i.contains("Text"):i.indexOf("text/plain")!==-1||i.indexOf("Text")!==-1);if(c){if(!k.isFirefox)this._dropEffect=m.event.dataTransfer.dropEffect=(k.isMac?m.event.altKey:
+m.event.ctrlKey)?"copy":"move"}else m.event.dataTransfer.dropEffect="none"},_onDrop:function(m){var i=this._view,c=m.event.dataTransfer.getData("Text");if(c){if(!k.isFirefox)m.event.dataTransfer.dropEffect=this._dropEffect;m=i.getOffsetAtLocation(m.x,m.y);this._dragSelection?(this._dropOffset=m,this._dropText=c):(i.setText(c,m,m),i.setSelection(m,m+c.length))}}};return{TextDND:m}});
+define("orion/objects",[],function(){function k(k){for(var n=1;n<arguments.length;n++){var i=arguments[n],c;for(c in i)Object.prototype.hasOwnProperty.call(i,c)&&(k[c]=i[c])}return k}return{clone:function(m){if(Array.isArray(m))return Array.prototype.slice.call(m);var n=Object.create(Object.getPrototypeOf(m));k(n,m);return n},mixin:k,toArray:function(k){return Array.isArray(k)?k:[k]}}});
+define("orion/editor/editor","i18n!orion/editor/nls/messages,orion/editor/eventTarget,orion/editor/tooltip,orion/editor/annotations,orion/objects,orion/util".split(","),function(k,m,n,i,c,d){function f(b){b=b||{};this._domNode=b.domNode;this._model=b.model;this._undoStack=b.undoStack;this._statusReporter=b.statusReporter;this._title=null;var a=this;this._listener={onChanged:function(b){a.onChanged(b)}};this._model&&this._model.addEventListener("Changed",this._listener.onChanged);this.checkDirty()}
+function g(b){b=b||{};f.call(this,b);this._textViewFactory=b.textViewFactory;this._undoStackFactory=b.undoStackFactory;this._textDNDFactory=b.textDNDFactory;this._annotationFactory=b.annotationFactory;this._foldingRulerFactory=b.foldingRulerFactory;this._lineNumberRulerFactory=b.lineNumberRulerFactory;this._contentAssistFactory=b.contentAssistFactory;this._keyBindingFactory=b.keyBindingFactory;this._contentAssist=this._foldingRuler=this._overviewRuler=this._lineNumberRuler=this._annotationRuler=this._annotationModel=
+this._annotationStyler=null}var h=i.AnnotationType;f.prototype={destroy:function(){this.uninstall();this._statusReporter=this._domNode=null;this._model&&this._model.removeEventListener("Changed",this._listener.onChanged)},checkDirty:function(){this.setDirty(this._undoStack&&!this._undoStack.isClean())},focus:function(){},getModel:function(){return this._model},getText:function(b,a){return this.getModel().getText(b,a)},getTitle:function(){return this._title},getUndoStack:function(){return this._undoStack},
+install:function(){this.installed=!0},isDirty:function(){return this._dirty},markClean:function(){this.getUndoStack().markClean();this.setDirty(!1)},onDirtyChanged:function(b){return this.dispatchEvent(b)},onInputChanged:function(b){return this.dispatchEvent(b)},onChanged:function(){this.checkDirty()},reportStatus:function(b,a,e){this._statusReporter&&this._statusReporter(b,a,e)},resize:function(){},setDirty:function(b){if(this._dirty!==b)this._dirty=b,this.onDirtyChanged({type:"DirtyChanged"})},
+_setModelText:function(b){this._model&&this._model.setText(b)},setInput:function(b,a,e,c){this._title=b;c||(a?this.reportStatus(a,"error"):e!==null&&e!==void 0&&typeof e==="string"&&this._setModelText(e),this._undoStack&&this._undoStack.reset());this.checkDirty();this.onInputChanged({type:"InputChanged",title:b,message:a,contents:e,contentsSaved:c})},setText:function(b,a,e){this.getModel().setText(b,a,e)},uninstall:function(){this.installed=!1}};m.EventTarget.addMixin(f.prototype);g.prototype=new f;
+c.mixin(g.prototype,{destroy:function(){f.prototype.destroy.call(this);this._textViewFactory=this._undoStackFactory=this._textDNDFactory=this._annotationFactory=this._foldingRulerFactory=this._lineNumberRulerFactory=this._contentAssistFactory=this._keyBindingFactory=null},getAnnotationModel:function(){return this._annotationModel},getAnnotationRuler:function(){return this._annotationRuler},getAnnotationStyler:function(){return this._annotationStyler},getContentAssist:function(){return this._contentAssist},
+getFoldingRuler:function(){return this._foldingRuler},getLineNumberRuler:function(){return this._lineNumberRuler},getModel:function(){if(!this._textView)return null;var b=this._textView.getModel();b.getBaseModel&&(b=b.getBaseModel());return b},getOverviewRuler:function(){return this._overviewRuler},getTextView:function(){return this._textView},getKeyModes:function(){return this._textView.getKeyModes()},getSourceCodeActions:function(){return this._sourceCodeActions},getLinkedMode:function(){return this._linkedMode},
+getTextActions:function(){return this._textActions},focus:function(){this._textView&&this._textView.focus()},resize:function(){this._textView&&this._textView.resize()},setAnnotationRulerVisible:function(b,a){if(this._annotationRulerVisible!==b||a)if(this._annotationRulerVisible=b,this._annotationRuler){var e=this._textView;b?e.addRuler(this._annotationRuler,0):e.removeRuler(this._annotationRuler)}},setFoldingRulerVisible:function(b,a){if(this._foldingRulerVisible!==b||a)if(this._foldingRulerVisible=
+b,this._foldingRuler){var e=this._textView;e.getModel().getBaseModel&&(b?e.addRuler(this._foldingRuler):e.removeRuler(this._foldingRuler))}},setLineNumberRulerVisible:function(b,a){if(this._lineNumberRulerVisible!==b||a)if(this._lineNumberRulerVisible=b,this._lineNumberRuler){var e=this._textView;b?e.addRuler(this._lineNumberRuler,!this._annotationRulerVisible?0:1):e.removeRuler(this._lineNumberRuler)}},setOverviewRulerVisible:function(b,a){if(this._overviewRulerVisible!==b||a)if(this._overviewRulerVisible=
+b,this._overviewRuler){var e=this._textView;b?e.addRuler(this._overviewRuler):e.removeRuler(this._overviewRuler)}},mapOffset:function(b,a){var e=this._textView.getModel();e.getBaseModel&&(b=e.mapOffset(b,a));return b},getLineAtOffset:function(b){return this.getModel().getLineAtOffset(this.mapOffset(b))},getLineStart:function(b){return this.getModel().getLineStart(b)},getCaretOffset:function(){return this.mapOffset(this._textView.getCaretOffset())},getSelection:function(){var b=this._textView,a=b.getSelection(),
+b=b.getModel();if(b.getBaseModel)a.start=b.mapOffset(a.start),a.end=b.mapOffset(a.end);return a},_expandOffset:function(b){var a=this._textView.getModel(),e=this._annotationModel;if(e&&a.getBaseModel)for(b=e.getAnnotations(b,b+1);b.hasNext();)a=b.next(),a.type===h.ANNOTATION_FOLDING&&a.expand&&a.expand()},setCaretOffset:function(b,a,e){var c=this._textView,d=c.getModel();d.getBaseModel&&(this._expandOffset(b),b=d.mapOffset(b,!0));c.setCaretOffset(b,a,e)},setText:function(b,a,e){var c=this._textView,
+d=c.getModel();d.getBaseModel&&(a!==void 0&&(this._expandOffset(a),a=d.mapOffset(a,!0)),e!==void 0&&(this._expandOffset(e),e=d.mapOffset(e,!0)));c.setText(b,a,e)},setSelection:function(b,a,e,c){var d=this._textView,f=d.getModel();f.getBaseModel&&(this._expandOffset(b),this._expandOffset(a),b=f.mapOffset(b,!0),a=f.mapOffset(a,!0));d.setSelection(b,a,e,c)},moveSelection:function(b,a,e,c){var d=this._textView;this.setSelection(b,a||b,1/3,function(){(c===void 0||c)&&d.focus();e&&e()})},_getTooltipInfo:function(b,
+a){var e=this._textView,c=this.getAnnotationModel();if(!c)return null;var d=this._annotationStyler;if(!d)return null;var f=e.getOffsetAtLocation(b,a);if(f===-1)return null;f=this.mapOffset(f);d=d.getAnnotationsByType(c,f,f+1);c=[];for(f=0;f<d.length;f++)d[f].rangeStyle&&c.push(d[f]);if(c.length===0)return null;e=e.convert({x:b,y:a},"document","page");return{contents:c,anchor:"left",x:e.x+10,y:e.y+20}},_highlightCurrentLine:function(b,a){var e=this._annotationModel;if(e){var c=this._textView;if(!c.getOptions("singleMode")){var d=
+c.getModel(),f=a?d.getLineAtOffset(a.start):-1,g=d.getLineAtOffset(b.start),c=b.start===b.end,p=!a||a.start===a.end,i=d.getLineStart(g),k=d.getLineEnd(g);d.getBaseModel&&(i=d.mapOffset(i),k=d.mapOffset(k));d=this._currentLineAnnotation;if(!(f===g&&p&&c&&d&&d.start===i&&d.end===k)){var f=d?[d]:null,s;c&&(d=h.createAnnotation(h.ANNOTATION_CURRENT_LINE,i,k),s=[d]);this._currentLineAnnotation=d;e.replaceAnnotations(f,s)}}}},installTextView:function(){this.install()},install:function(){if(!this._textView){this._textView=
+this._textViewFactory();if(this._undoStackFactory)this._undoStack=this._undoStackFactory.createUndoStack(this),this.checkDirty();if(this._textDNDFactory)this._textDND=this._textDNDFactory.createTextDND(this,this._undoStack);if(this._contentAssistFactory)this._contentAssist=this._contentAssistFactory.createContentAssistMode(this).getContentAssist();var b=this,a=this._textView,e=this;this._listener={onModelChanged:function(){e.checkDirty()},onMouseOver:function(a){e._listener.onMouseMove(a)},onMouseMove:function(b){var c=
+n.Tooltip.getTooltip(a);if(c&&!(e._listener.lastMouseX===b.event.clientX&&e._listener.lastMouseY===b.event.clientY))e._listener.lastMouseX=b.event.clientX,e._listener.lastMouseY=b.event.clientY,c.setTarget({x:b.x,y:b.y,getTooltipInfo:function(){return e._getTooltipInfo(this.x,this.y)}})},onMouseOut:function(b){var c=n.Tooltip.getTooltip(a);if(c&&!(e._listener.lastMouseX===b.event.clientX&&e._listener.lastMouseY===b.event.clientY))e._listener.lastMouseX=b.event.clientX,e._listener.lastMouseY=b.event.clientY,
+c.setTarget(null)},onScroll:function(){var b=n.Tooltip.getTooltip(a);b&&b.setTarget(null,0,0)},onSelection:function(a){e._updateCursorStatus();e._highlightCurrentLine(a.newValue,a.oldValue)}};a.addEventListener("ModelChanged",this._listener.onModelChanged);a.addEventListener("Selection",this._listener.onSelection);a.addEventListener("MouseOver",this._listener.onMouseOver);a.addEventListener("MouseOut",this._listener.onMouseOut);a.addEventListener("MouseMove",this._listener.onMouseMove);a.addEventListener("Scroll",
+this._listener.onScroll);if(this._keyBindingFactory){var c;if(c=typeof this._keyBindingFactory==="function"?this._keyBindingFactory(this,this.getKeyModes(),this._undoStack,this._contentAssist):this._keyBindingFactory.createKeyBindings(b,this._undoStack,this._contentAssist))this._textActions=c.textActions,this._linkedMode=c.linkedMode,this._sourceCodeActions=c.sourceCodeActions}c=function(a){if(a!==void 0&&a!==-1){for(var e=this.getView().getModel(),c=this.getAnnotationModel(),d=b.mapOffset(e.getLineStart(a)),
+a=b.mapOffset(e.getLineEnd(a)),e=c.getAnnotations(d,a),f=null;e.hasNext();){var l=e.next();if(l.type===h.ANNOTATION_BOOKMARK){f=l;break}}f?c.removeAnnotation(f):(f=h.createAnnotation(h.ANNOTATION_BOOKMARK,d,a),f.title=void 0,c.addAnnotation(f))}};if(this._annotationFactory){var d=a.getModel();d.getBaseModel&&(d=d.getBaseModel());if(this._annotationModel=this._annotationFactory.createAnnotationModel(d))if(d=this._annotationStyler=this._annotationFactory.createAnnotationStyler(a,this._annotationModel))d.addAnnotationType(h.ANNOTATION_CURRENT_SEARCH),
+d.addAnnotationType(h.ANNOTATION_MATCHING_SEARCH),d.addAnnotationType(h.ANNOTATION_ERROR),d.addAnnotationType(h.ANNOTATION_WARNING),d.addAnnotationType(h.ANNOTATION_MATCHING_BRACKET),d.addAnnotationType(h.ANNOTATION_CURRENT_BRACKET),d.addAnnotationType(h.ANNOTATION_CURRENT_LINE),d.addAnnotationType(h.ANNOTATION_READ_OCCURRENCE),d.addAnnotationType(h.ANNOTATION_WRITE_OCCURRENCE),d.addAnnotationType(h.ANNOTATION_SELECTED_LINKED_GROUP),d.addAnnotationType(h.ANNOTATION_CURRENT_LINKED_GROUP),d.addAnnotationType(h.ANNOTATION_LINKED_GROUP),
+d.addAnnotationType("orion.annotation.highlightError");var d=this._annotationFactory.createAnnotationRulers(this._annotationModel),g=this._annotationRuler=d.annotationRuler;if(g)g.onDblClick=c,g.setMultiAnnotationOverlay({html:"<div class='annotationHTML overlay'></div>"}),g.addAnnotationType(h.ANNOTATION_ERROR),g.addAnnotationType(h.ANNOTATION_WARNING),g.addAnnotationType(h.ANNOTATION_TASK),g.addAnnotationType(h.ANNOTATION_BOOKMARK);this.setAnnotationRulerVisible(this._annotationRulerVisible||this._annotationRulerVisible===
+void 0,!0);if(g=this._overviewRuler=d.overviewRuler)g.addAnnotationType(h.ANNOTATION_CURRENT_SEARCH),g.addAnnotationType(h.ANNOTATION_MATCHING_SEARCH),g.addAnnotationType(h.ANNOTATION_READ_OCCURRENCE),g.addAnnotationType(h.ANNOTATION_WRITE_OCCURRENCE),g.addAnnotationType(h.ANNOTATION_CURRENT_BLAME),g.addAnnotationType(h.ANNOTATION_ERROR),g.addAnnotationType(h.ANNOTATION_WARNING),g.addAnnotationType(h.ANNOTATION_TASK),g.addAnnotationType(h.ANNOTATION_BOOKMARK),g.addAnnotationType(h.ANNOTATION_MATCHING_BRACKET),
+g.addAnnotationType(h.ANNOTATION_CURRENT_BRACKET),g.addAnnotationType(h.ANNOTATION_CURRENT_LINE);this.setOverviewRulerVisible(this._overviewRulerVisible||this._overviewRulerVisible===void 0,!0)}if(this._lineNumberRulerFactory)this._lineNumberRuler=this._lineNumberRulerFactory.createLineNumberRuler(this._annotationModel),this._lineNumberRuler.addAnnotationType(h.ANNOTATION_CURRENT_BLAME),this._lineNumberRuler.addAnnotationType(h.ANNOTATION_BLAME),this._lineNumberRuler.onDblClick=c,this.setLineNumberRulerVisible(this._lineNumberRulerVisible||
+this._lineNumberRulerVisible===void 0,!0);if(this._foldingRulerFactory)this._foldingRuler=this._foldingRulerFactory.createFoldingRuler(this._annotationModel),this._foldingRuler.addAnnotationType(h.ANNOTATION_FOLDING),this.setFoldingRulerVisible(this._foldingRulerVisible||this._foldingRulerVisible===void 0,!0);this.dispatchEvent({type:"TextViewInstalled",textView:a});f.prototype.install.call(this)}},uninstallTextView:function(){this.uninstall()},uninstall:function(){var b=this._textView;if(b)b.destroy(),
+this._textView=this._undoStack=this._textDND=this._contentAssist=this._listener=this._annotationModel=this._annotationStyler=this._annotationRuler=this._overviewRuler=this._lineNumberRuler=this._foldingRuler=this._currentLineAnnotation=this._title=null,this._dirty=!1,this._foldingRulerVisible=this._overviewRulerVisible=this._lineNumberRulerVisible=this._annotationRulerVisible=void 0,this.dispatchEvent({type:"TextViewUninstalled",textView:b}),f.prototype.uninstall.call(this)},_updateCursorStatus:function(){var b=
+this.getModel(),a=this.getCaretOffset(),e=b.getLineAtOffset(a),b=b.getLineStart(e);a-=b;for(var b=this.getKeyModes(),c=0;c<b.length;c++){var f=b[c];if(f.isActive()&&f.isStatusActive&&f.isStatusActive())return}this.reportStatus(d.formatMessage(k.lineColumn,e+1,a+1))},showAnnotations:function(b,a,e,c){var d=this._annotationModel;if(d){for(var f=[],g=[],i=d.getTextModel(),t=d.getAnnotations(),k;t.hasNext();)k=t.next(),a.indexOf(k.type)!==-1&&k.creatorID===this&&f.push(k);if(b)for(a=0;a<b.length;a++)if(k=
+b[a]){if(e)k=e(k);else{var s;typeof k.line==="number"?(s=i.getLineStart(k.line-1),t=s+k.start-1,s=s+k.end-1):(t=k.start,s=k.end);var u=c(k);if(!u)continue;k=h.createAnnotation(u,t,s,k.description)}k.creatorID=this;g.push(k)}d.replaceAnnotations(f,g)}},showProblems:function(b){this.showAnnotations(b,[h.ANNOTATION_ERROR,h.ANNOTATION_WARNING,h.ANNOTATION_TASK],null,function(a){switch(a.severity){case "error":return h.ANNOTATION_ERROR;case "warning":return h.ANNOTATION_WARNING;case "task":return h.ANNOTATION_TASK}return null})},
+showOccurrences:function(b){this.showAnnotations(b,[h.ANNOTATION_READ_OCCURRENCE,h.ANNOTATION_WRITE_OCCURRENCE],null,function(a){return a.readAccess?h.ANNOTATION_READ_OCCURRENCE:h.ANNOTATION_WRITE_OCCURRENCE})},showBlame:function(b){var a=this._blameRGB,e=this.getTextView().getOptions("parent").ownerDocument;if(!a){var f=d.createElement(e,"div");f.className="annotation blame";e.body.appendChild(f);var g=(e.defaultView||e.parentWindow).getComputedStyle(f).getPropertyValue("background-color");f.parentNode.removeChild(f);
+var f=g.indexOf("("),q=g.indexOf(")"),g=g.substring(f+1,q);this._blameRGB=a=g.split(",").slice(0,3)}var r=function(){var a=i.AnnotationType.createAnnotation(this.groupType,this.start,this.end,this.title);a.style=c.mixin({},a.style);a.style.style=c.mixin({},a.style.style);a.style.style.backgroundColor="";this.groupAnnotation=a;a.blame=this.blame;a.html=this.html;a.creatorID=this.creatorID;return a},p=function(){var a=d.createElement(e,"div");a.className="tooltipTitle";var b=this.blame.Message.indexOf("\n");
+if(b===-1)b=this.blame.Message.length;var c=d.createElement(e,"a");c.href=this.blame.CommitLink;c.appendChild(e.createTextNode(this.blame.Message.substring(0,b)));a.appendChild(c);a.appendChild(d.createElement(e,"br"));a.appendChild(e.createTextNode(d.formatMessage(k.committerOnTime,this.blame.AuthorName,this.blame.Time)));return a},t=this.getModel();this.showAnnotations(b,[h.ANNOTATION_BLAME,h.ANNOTATION_CURRENT_BLAME],function(b){var e=t.getLineStart(b.Start-1),d=t.getLineEnd(b.End-1,!0),e=i.AnnotationType.createAnnotation(h.ANNOTATION_BLAME,
+e,d,p),d=a.slice(0);d.push(b.Shade);e.style=c.mixin({},e.style);e.style.style=c.mixin({},e.style.style);e.style.style.backgroundColor="rgba("+d.join()+")";e.groupId=b.Name;e.groupType=h.ANNOTATION_CURRENT_BLAME;e.createGroupAnnotation=r;e.html='<img class="annotationHTML blame" src="'+b.AuthorImage+'"/>';e.blame=b;return e})},showSelection:function(b,a,e,c,d){typeof b==="number"?(typeof a!=="number"&&(a=b),this.moveSelection(b,a)):typeof e==="number"&&(b=this.getModel().getLineStart(e-1),typeof c===
+"number"&&(b+=c),typeof d!=="number"&&(d=0),this.moveSelection(b,b+d))},_setModelText:function(b){this._textView&&(this._textView.setText(b),this._textView.getModel().setLineDelimiter("auto"),this._highlightCurrentLine(this._textView.getSelection()))},setInput:function(b,a,e,c,d){f.prototype.setInput.call(this,b,a,e,c);this._textView&&!c&&!d&&this._textView.focus()},onGotoLine:function(b,a,e,c){if(this._textView){var d=this.getModel(),b=Math.max(0,Math.min(b,d.getLineCount()-1)),f=d.getLineStart(b),
+g=0;e===void 0&&(e=0);typeof a==="string"?(b=d.getLine(b).indexOf(a),b!==-1&&(g=b,e=g+a.length)):(g=a,a=d.getLineEnd(b)-f,g=Math.min(g,a),e=Math.min(e,a));this.moveSelection(f+g,f+e,c)}}});return{BaseEditor:f,Editor:g}});
+define("orion/editor/find","i18n!orion/editor/nls/messages,orion/keyBinding,orion/editor/keyModes,orion/editor/annotations,orion/regex,orion/objects,orion/util".split(","),function(k,m,n,i,c,d,f){function g(a){var b=a.getTextView();n.KeyMode.call(this,b);this.editor=a;this._active=!1;this._success=!0;this._ignoreSelection=!1;this._prefix="";b.setAction("incrementalFindCancel",function(){this.setActive(!1);return!0}.bind(this));b.setAction("incrementalFindBackspace",function(){return this._backspace()}.bind(this));
+var d=this;this._listener={onVerify:function(a){var b=d.editor,e=b.getModel(),f=b.mapOffset(a.start),b=b.mapOffset(a.end),e=e.getText(f,b);if((e=d._prefix.match(RegExp("^"+c.escape(e),"i")))&&e.length>0)d._prefix+=a.text,d._success=!0,d._status(),d.find(d._forward,!0),a.text=null},onSelection:function(){d._ignoreSelection||d.setActive(!1)}}}function h(a,b,c){if(a){this._editor=a;this._undoStack=b;this._showAll=!0;this._visible=!1;this._wrap=this._caseInsensitive=!0;this._wholeWord=!1;this._incremental=
+!0;this._regex=!1;this._findAfterReplace=!0;this._reverse=this._hideAfterFind=!1;this._timer=this._end=this._start=void 0;this._lastString="";var d=this;this._listeners={onEditorFocus:function(a){d._removeCurrentAnnotation(a)}};this.setOptions(c)}}var b={};g.prototype=new n.KeyMode;d.mixin(g.prototype,{createKeyBindings:function(){var a=m.KeyBinding,b=[];b.push({actionID:"incrementalFindBackspace",keyBinding:new a(8)});b.push({actionID:"incrementalFindCancel",keyBinding:new a(13)});b.push({actionID:"incrementalFindCancel",
+keyBinding:new a(27)});b.push({actionID:"incrementalFindReverse",keyBinding:new a(38)});b.push({actionID:"incrementalFind",keyBinding:new a(40)});b.push({actionID:"incrementalFindReverse",keyBinding:new a("k",!0,!0)});b.push({actionID:"incrementalFind",keyBinding:new a("k",!0)});return b},find:function(a,b){this._forward=a;if(!this.isActive())return this.setActive(!0),!1;var c=this._prefix;if(c.length===0)return!1;var d=this.editor,f=d.getModel(),f=a?this._success?b?this._start:d.getCaretOffset()+
+1:0:this._success?b?this._start:d.getCaretOffset():f.getCharCount()-1;if(c=d.getModel().find({string:c,start:f,reverse:!a,caseInsensitive:c.toLowerCase()===c}).next()){if(!b)this._start=f;this._ignoreSelection=this._success=!0;d.moveSelection(a?c.start:c.end,a?c.end:c.start);this._ignoreSelection=!1}else this._success=!1;this._status();return!0},isActive:function(){return this._active},isStatusActive:function(){return this.isActive()},setActive:function(a){if(this._active!==a)this._active=a,this._prefix=
+"",this._success=!0,a=this.editor.getTextView(),this._start=this.editor.getCaretOffset(),this.editor.setCaretOffset(this._start),this._active?(a.addEventListener("Verify",this._listener.onVerify),a.addEventListener("Selection",this._listener.onSelection),a.addKeyMode(this)):(a.removeEventListener("Verify",this._listener.onVerify),a.removeEventListener("Selection",this._listener.onSelection),a.removeKeyMode(this)),this._status()},_backspace:function(){var a=this._prefix,a=this._prefix=a.substring(0,
+a.length-1);return a.length===0?(this._ignoreSelection=this._success=!0,this.editor.setCaretOffset(this.editor.getSelection().start),this._ignoreSelection=!1,this._status(),!0):this.find(this._forward,!0)},_status:function(){if(this.isActive()){var a;a=this._forward?this._success?k.incrementalFindStr:k.incrementalFindStrNotFound:this._success?k.incrementalFindReverseStr:k.incrementalFindReverseStrNotFound;a=f.formatMessage(a,this._prefix);this.editor.reportStatus(a,this._success?"":"error")}else this.editor.reportStatus("")}});
+b.IncrementalFind=g;h.prototype={find:function(a,b,c){this.setOptions({reverse:!a});var d=this.getFindString(),f;if(b)d=b.findString||d,f=b.count;a=this.getOptions();this.setOptions(b);b=c?this._startOffset:this.getStartOffset();if((f=this._doFind(d,b,f))&&!c)this._startOffset=f.start;this.setOptions(a);this._hideAfterFind&&this.hide();return f},getStartOffset:function(){return this._start!==void 0?this._start:this._reverse?this._editor.getSelection().start-1:this._editor.getCaretOffset()},getFindString:function(){var a=
+this._editor.getSelection(),a=this._editor.getText(a.start,a.end);this._regex&&(a=c.escape(a));return a||this._lastString},getOptions:function(){return{showAll:this._showAll,caseInsensitive:this._caseInsensitive,wrap:this._wrap,wholeWord:this._wholeWord,incremental:this._incremental,regex:this._regex,findAfterReplace:this._findAfterReplace,hideAfterFind:this._hideAfterFind,reverse:this._reverse,findCallback:this._findCallback,start:this._start,end:this._end}},getReplaceString:function(){return""},
+hide:function(){this._visible=!1;if(this._savedOptions&&(this.setOptions(this._savedOptions.pop()),this._savedOptions.length===0))this._savedOptions=null;this._removeAllAnnotations();var a=this._editor.getTextView();a&&(a.removeEventListener("Focus",this._listeners.onEditorFocus),a.focus())},_processReplaceString:function(a){var b=a;if(this._regex){for(var b="",c=!1,d=this._editor.getModel().getLineDelimiter(),f=0;f<a.length;f++){var g=a.substring(f,f+1);if(c){switch(g){case "R":b+=d;break;case "r":b+=
+"\r";break;case "n":b+="\n";break;case "t":b+="\t";break;case "\\":b+="\\";break;default:b+="\\"+g}c=!1}else g==="\\"?c=!0:b+=g}c&&(b+="\\")}return b},isVisible:function(){return this._visible},replace:function(){var a=this.getFindString();if(a){var b=this._editor,c=this._processReplaceString(this.getReplaceString()),d=b.getSelection().start;if(b=b.getModel().find({string:a,start:d,reverse:!1,wrap:this._wrap,regex:this._regex,wholeWord:this._wholeWord,caseInsensitive:this._caseInsensitive}).next())this.startUndo(),
+this._doReplace(b.start,b.end,a,c),this.endUndo()}this._findAfterReplace&&a&&this._doFind(a,this.getStartOffset())},replaceAll:function(){var a=this.getFindString();if(a){this._replacingAll=!0;var b=this._editor,c=b.getTextView();b.reportStatus(k.replaceAll);var d=this._processReplaceString(this.getReplaceString()),g=this;window.setTimeout(function(){for(var h=0,i=0;;){var t=g._doFind(a,h,null,!0);if(!t)break;i++;i===1&&(c.setRedraw(!1),g.startUndo());g._doReplace(t.start,t.end,a,d);h=g.getStartOffset()}i>
+0&&(g.endUndo(),c.setRedraw(!0));h>0?b.reportStatus(f.formatMessage(k.replacedMatches,i)):b.reportStatus(k.nothingReplaced,"error");g._replacingAll=!1},100)}},setOptions:function(a){if(a){if((a.showAll===!0||a.showAll===!1)&&this._showAll!==a.showAll)if(this._showAll=a.showAll,this.isVisible())if(this._showAll)this._markAllOccurrences();else{var b=this._editor.getAnnotationModel();b&&b.removeAnnotations(i.AnnotationType.ANNOTATION_MATCHING_SEARCH)}if(a.caseInsensitive===!0||a.caseInsensitive===!1)this._caseInsensitive=
+a.caseInsensitive;if(a.wrap===!0||a.wrap===!1)this._wrap=a.wrap;if(a.wholeWord===!0||a.wholeWord===!1)this._wholeWord=a.wholeWord;if(a.incremental===!0||a.incremental===!1)this._incremental=a.incremental;if(a.regex===!0||a.regex===!1)this._regex=a.regex;if(a.findAfterReplace===!0||a.findAfterReplace===!1)this._findAfterReplace=a.findAfterReplace;if(a.hideAfterFind===!0||a.hideAfterFind===!1)this._hideAfterFind=a.hideAfterFind;if(a.reverse===!0||a.reverse===!1)this._reverse=a.reverse;if(a.hasOwnProperty("findCallback"))this._findCallback=
+a.findCallback;if(a.hasOwnProperty("start"))this._start=a.start;if(a.hasOwnProperty("end"))this._end=a.end}},show:function(a){this._visible=!0;if(a){if(!this._savedOptions)this._savedOptions=[];this._savedOptions.push(this.getOptions());this.setOptions(a)}this._startOffset=this._editor.getSelection().start;this._editor.getTextView().addEventListener("Focus",this._listeners.onEditorFocus);var b=this;window.setTimeout(function(){b._incremental&&b.find(!0,null,!0)},0)},startUndo:function(){this._undoStack&&
+this._undoStack.startCompoundChange()},endUndo:function(){this._undoStack&&this._undoStack.endCompoundChange()},_find:function(a,b,c){return this._editor.getModel().find({string:a,start:b,end:this._end,reverse:this._reverse,wrap:c?!1:this._wrap,regex:this._regex,wholeWord:this._wholeWord,caseInsensitive:this._caseInsensitive})},_doFind:function(a,b,c,d){var c=c||1,f=this._editor;if(!a)return this._removeAllAnnotations(),null;this._lastString=a;var g,h;if(this._regex)try{h=this._find(a,b,d)}catch(t){f.reportStatus(t.message,
+"error");return}else h=this._find(a,b,d);for(a=0;a<c&&h.hasNext();a++)g=h.next();if(!this._replacingAll){g?this._editor.reportStatus(""):this._editor.reportStatus(k.notFound,"error");if(this.isVisible()){c=i.AnnotationType.ANNOTATION_CURRENT_SEARCH;if(h=f.getAnnotationModel())h.removeAnnotations(c),g&&h.addAnnotation(i.AnnotationType.createAnnotation(c,g.start,g.end));if(this._showAll){this._timer&&window.clearTimeout(this._timer);var v=this;this._timer=window.setTimeout(function(){v._markAllOccurrences();
+v._timer=null},500)}}this._findCallback?this._findCallback(g):g&&f.moveSelection(g.start,g.end,null,!1)}return g},_doReplace:function(a,b,c,d){var f=this._editor;if(this._regex&&(d=f.getText(a,b).replace(RegExp(c,this._caseInsensitive?"i":""),d),!d))return;f.setText(d,a,b);f.setSelection(a,a+d.length,!0)},_markAllOccurrences:function(){var a=this._editor.getAnnotationModel();if(a){for(var b=i.AnnotationType.ANNOTATION_MATCHING_SEARCH,c=a.getAnnotations(),d=[],f;c.hasNext();){var g=c.next();g.type===
+b&&d.push(g)}if(this.isVisible()){c=this.getFindString();c=this._editor.getModel().find({string:c,regex:this._regex,wholeWord:this._wholeWord,caseInsensitive:this._caseInsensitive});for(f=[];c.hasNext();)g=c.next(),f.push(i.AnnotationType.createAnnotation(b,g.start,g.end))}a.replaceAnnotations(d,f)}},_removeAllAnnotations:function(){var a=this._editor.getAnnotationModel();a&&(a.removeAnnotations(i.AnnotationType.ANNOTATION_CURRENT_SEARCH),a.removeAnnotations(i.AnnotationType.ANNOTATION_MATCHING_SEARCH))},
+_removeCurrentAnnotation:function(){var a=this._editor.getAnnotationModel();a&&a.removeAnnotations(i.AnnotationType.ANNOTATION_CURRENT_SEARCH)}};b.Find=h;return b});
+define("orion/editor/actions","i18n!orion/editor/nls/messages,orion/keyBinding,orion/editor/annotations,orion/editor/tooltip,orion/editor/find,orion/util".split(","),function(k,m,n,i,c,d){function f(a,b,d){this.editor=a;this.undoStack=b;this._incrementalFind=new c.IncrementalFind(a);this._find=d?d:new c.Find(a,b);this._lastEditLocation=null;this.init()}function g(a,b,c,d){this.editor=a;this.undoStack=b;this.contentAssist=c;this.linkedMode=d;this.contentAssist&&this.contentAssist.addEventListener("ProposalApplied",
+this.contentAssistProposalApplied.bind(this));this.init()}var h=n.AnnotationType,b={};f.prototype={init:function(){var a=this.editor.getTextView();this._lastEditListener={onModelChanged:function(a){if(this.editor.isDirty())this._lastEditLocation=a.start+a.addedCharCount}.bind(this)};a.addEventListener("ModelChanged",this._lastEditListener.onModelChanged);a.setAction("undo",function(a){if(this.undoStack){var b=1;if(a&&a.count)b=a.count;for(;b>0;)this.undoStack.undo(),--b;return!0}return!1}.bind(this),
+{name:k.undo});a.setAction("redo",function(a){if(this.undoStack){var b=1;if(a&&a.count)b=a.count;for(;b>0;)this.undoStack.redo(),--b;return!0}return!1}.bind(this),{name:k.redo});a.setKeyBinding(new m.KeyBinding("f",!0),"find");a.setAction("find",function(){if(this._find){var a=this.editor.getSelection();(a=prompt(k.find,this.editor.getText(a.start,a.end)))&&this._find.find(!0,{findString:a})}}.bind(this),{name:k.find});a.setKeyBinding(new m.KeyBinding("k",!0),"findNext");a.setAction("findNext",function(a){return this._find?
+(this._find.find(!0,a),!0):!1}.bind(this),{name:k.findNext});a.setKeyBinding(new m.KeyBinding("k",!0,!0),"findPrevious");a.setAction("findPrevious",function(a){return this._find?(this._find.find(!1,a),!0):!1}.bind(this),{name:k.findPrevious});a.setKeyBinding(new m.KeyBinding("j",!0),"incrementalFind");a.setAction("incrementalFind",function(){this._incrementalFind&&this._incrementalFind.find(!0);return!0}.bind(this),{name:k.incrementalFind});a.setKeyBinding(new m.KeyBinding("j",!0,!0),"incrementalFindReverse");
+a.setAction("incrementalFindReverse",function(){this._incrementalFind&&this._incrementalFind.find(!1);return!0}.bind(this),{name:k.incrementalFindReverse});a.setAction("tab",function(){return this.indentLines()}.bind(this));a.setAction("shiftTab",function(){return this.unindentLines()}.bind(this),{name:k.unindentLines});a.setKeyBinding(new m.KeyBinding(38,!1,!1,!0),"moveLinesUp");a.setAction("moveLinesUp",function(){return this.moveLinesUp()}.bind(this),{name:k.moveLinesUp});a.setKeyBinding(new m.KeyBinding(40,
+!1,!1,!0),"moveLinesDown");a.setAction("moveLinesDown",function(){return this.moveLinesDown()}.bind(this),{name:k.moveLinesDown});a.setKeyBinding(new m.KeyBinding(38,!0,!1,!0),"copyLinesUp");a.setAction("copyLinesUp",function(){return this.copyLinesUp()}.bind(this),{name:k.copyLinesUp});a.setKeyBinding(new m.KeyBinding(40,!0,!1,!0),"copyLinesDown");a.setAction("copyLinesDown",function(){return this.copyLinesDown()}.bind(this),{name:k.copyLinesDown});a.setKeyBinding(new m.KeyBinding("d",!0,!1,!1),
+"deleteLines");a.setAction("deleteLines",function(a){return this.deleteLines(a)}.bind(this),{name:k.deleteLines});a.setKeyBinding(new m.KeyBinding("l",!d.isMac,!1,!1,d.isMac),"gotoLine");a.setAction("gotoLine",function(){return this.gotoLine()}.bind(this),{name:k.gotoLine});a.setKeyBinding(new m.KeyBinding(190,!0),"nextAnnotation");a.setAction("nextAnnotation",function(){return this.nextAnnotation(!0)}.bind(this),{name:k.nextAnnotation});a.setKeyBinding(new m.KeyBinding(188,!0),"previousAnnotation");
+a.setAction("previousAnnotation",function(){return this.nextAnnotation(!1)}.bind(this),{name:k.prevAnnotation});a.setKeyBinding(new m.KeyBinding("e",!0,!1,!0,!1),"expand");a.setAction("expand",function(){return this.expandAnnotation(!0)}.bind(this),{name:k.expand});a.setKeyBinding(new m.KeyBinding("c",!0,!1,!0,!1),"collapse");a.setAction("collapse",function(){return this.expandAnnotation(!1)}.bind(this),{name:k.collapse});a.setKeyBinding(new m.KeyBinding("e",!0,!0,!0,!1),"expandAll");a.setAction("expandAll",
+function(){return this.expandAnnotations(!0)}.bind(this),{name:k.expandAll});a.setKeyBinding(new m.KeyBinding("c",!0,!0,!0,!1),"collapseAll");a.setAction("collapseAll",function(){return this.expandAnnotations(!1)}.bind(this),{name:k.collapseAll});a.setKeyBinding(new m.KeyBinding("q",!d.isMac,!1,!1,d.isMac),"lastEdit");a.setAction("lastEdit",function(){return this.gotoLastEdit()}.bind(this),{name:k.lastEdit})},copyLinesDown:function(){var a=this.editor;if(a.getTextView().getOptions("readonly"))return!1;
+var b=a.getModel(),c=a.getSelection(),d=b.getLineAtOffset(c.start),c=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),f=b.getLineStart(d),d=b.getLineEnd(c,!0),g=b.getLineCount(),h="",f=b.getText(f,d);c===g-1&&(f=(h=b.getLineDelimiter())+f);a.setText(f,d,d);a.setSelection(d+h.length,d+f.length);return!0},copyLinesUp:function(){var a=this.editor;if(a.getTextView().getOptions("readonly"))return!1;var b=a.getModel(),c=a.getSelection(),d=b.getLineAtOffset(c.start),c=b.getLineAtOffset(c.end>c.start?c.end-
+1:c.end),d=b.getLineStart(d),f=b.getLineEnd(c,!0),g=b.getLineCount(),h="",f=b.getText(d,f);c===g-1&&(f+=h=b.getLineDelimiter());a.setText(f,d,d);a.setSelection(d,d+f.length-h.length);return!0},deleteLines:function(a){var b=this.editor;if(b.getTextView().getOptions("readonly"))return!1;var c=1;if(a&&a.count)c=a.count;var d=b.getSelection(),f=b.getModel(),g=f.getLineAtOffset(d.start),a=f.getLineStart(g),c=d.start!==d.end||c===1?f.getLineAtOffset(d.end>d.start?d.end-1:d.end):Math.min(g+c-1,f.getLineCount()-
+1),c=f.getLineEnd(c,!0);b.setText("",a,c);return!0},expandAnnotation:function(a){var b=this.editor,c=b.getAnnotationModel();if(!c)return!0;var d=b.getModel(),f=b.getCaretOffset(),g=d.getLineAtOffset(f),f=d.getLineStart(g),g=d.getLineEnd(g,!0);d.getBaseModel&&(f=d.mapOffset(f),g=d.mapOffset(g),d.getBaseModel());for(var h,c=c.getAnnotations(f,g);!h&&c.hasNext();)d=c.next(),d.type===n.AnnotationType.ANNOTATION_FOLDING&&(h=d);h&&a!==h.expanded&&(a?h.expand():(b.setCaretOffset(h.start),h.collapse()));
+return!0},expandAnnotations:function(a){var b=this.editor,c=b.getTextView(),d=b.getAnnotationModel();if(!d)return!0;b.getModel();d=d.getAnnotations();for(c.setRedraw(!1);d.hasNext();)b=d.next(),b.type===n.AnnotationType.ANNOTATION_FOLDING&&a!==b.expanded&&(a?b.expand():b.collapse());c.setRedraw(!0);return!0},indentLines:function(){var a=this.editor,b=a.getTextView();if(b.getOptions("readonly"))return!1;if(b.getOptions("tabMode")){var c=a.getModel(),d=a.getSelection(),f=c.getLineAtOffset(d.start),
+g=c.getLineAtOffset(d.end>d.start?d.end-1:d.end);if(f!==g){var h=[];h.push("");for(var i=f;i<=g;i++)h.push(c.getLine(i,!0));i=c.getLineStart(f);c=c.getLineEnd(g,!0);b=b.getOptions("tabSize","expandTab");b=b.expandTab?Array(b.tabSize+1).join(" "):"\t";a.setText(h.join(b),i,c);a.setSelection(i===d.start?d.start:d.start+b.length,d.end+(g-f+1)*b.length);return!0}return!1}},gotoLastEdit:function(){typeof this._lastEditLocation==="number"&&this.editor.showSelection(this._lastEditLocation);return!0},gotoLine:function(){var a=
+this.editor,b=a.getModel().getLineAtOffset(a.getCaretOffset());if(b=prompt(k.gotoLinePrompty,b+1))b=parseInt(b,10),a.onGotoLine(b-1,0);return!0},moveLinesDown:function(){var a=this.editor;if(a.getTextView().getOptions("readonly"))return!1;var b=a.getModel(),c=a.getSelection(),d=b.getLineAtOffset(c.start),f=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),g=b.getLineCount();if(f===g-1)return!0;var d=b.getLineStart(d),c=b.getLineEnd(f,!0),h=b.getLineEnd(f+1,!0)-(c-d),i=0;f!==g-2?b=b.getText(d,c):(f=b.getLineEnd(f),
+b=b.getText(f,c)+b.getText(d,f),i+=c-f);this.startUndo();a.setText("",d,c);a.setText(b,h,h);a.setSelection(h+i,h+i+b.length);this.endUndo();return!0},moveLinesUp:function(){var a=this.editor;if(a.getTextView().getOptions("readonly"))return!1;var b=a.getModel(),c=a.getSelection(),d=b.getLineAtOffset(c.start);if(d===0)return!0;var f=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),g=b.getLineCount(),c=b.getLineStart(d-1),h=b.getLineStart(d),i=b.getLineEnd(f,!0),k=b.getText(h,i),s=0;f===g-1&&(f=b.getLineEnd(d-
+1),d=b.getLineEnd(d-1,!0),k+=b.getText(f,d),h=f,s=d-f);this.startUndo();a.setText("",h,i);a.setText(k,c,c);a.setSelection(c,c+k.length-s);this.endUndo();return!0},nextAnnotation:function(a){function b(a){return!!a.lineStyle||a.type===h.ANNOTATION_MATCHING_BRACKET||a.type===h.ANNOTATION_CURRENT_BRACKET||!f.isAnnotationTypeVisible(a.type)}var c=this.editor,d=c.getAnnotationModel();if(!d)return!0;var f=c.getOverviewRuler()||c.getAnnotationStyler();if(!f)return!0;for(var g=c.getModel(),p=c.getCaretOffset(),
+t=d.getAnnotations(a?p:0,a?g.getCharCount():p),k=null;t.hasNext();){var s=t.next();if(a){if(s.start<=p)continue}else if(s.start>=p)continue;if(!b(s)&&(k=s,a))break}if(k){for(var u=[k],t=d.getAnnotations(k.start,k.start);t.hasNext();)s=t.next(),s!==k&&!b(s)&&u.push(s);var j=c.getTextView(),m=g.getLineAtOffset(k.start),n=i.Tooltip.getTooltip(j);if(!n)return c.moveSelection(k.start),!0;c.moveSelection(k.start,k.start,function(){n.setTarget({getTooltipInfo:function(){var a=j.convert({x:j.getLocationAtOffset(k.start).x,
+y:j.getLocationAtOffset(g.getLineStart(m)).y},"document","page");return{contents:u,x:a.x,y:a.y+Math.floor(j.getLineHeight(m)*1.33)}}},0)})}return!0},unindentLines:function(){var a=this.editor,b=a.getTextView();if(b.getOptions("readonly"))return!1;if(b.getOptions("tabMode")){for(var c=a.getModel(),d=a.getSelection(),f=c.getLineAtOffset(d.start),g=c.getLineAtOffset(d.end>d.start?d.end-1:d.end),h=b.getOptions("tabSize"),i=Array(h+1).join(" "),k=[],s=b=0,u=f;u<=g;u++){var j=c.getLine(u,!0);if(c.getLineStart(u)!==
+c.getLineEnd(u))if(j.indexOf("\t")===0)j=j.substring(1),b++;else if(j.indexOf(i)===0)j=j.substring(h),b+=h;else return!0;u===f&&(s=b);k.push(j)}f=c.getLineStart(f);h=c.getLineEnd(g,!0);c=c.getLineStart(g);a.setText(k.join(""),f,h);g=f===d.start?d.start:d.start-s;d=Math.max(g,d.end-b+(d.end===c+1&&d.start!==d.end?1:0));a.setSelection(g,d);return!0}},startUndo:function(){this.undoStack&&this.undoStack.startCompoundChange()},endUndo:function(){this.undoStack&&this.undoStack.endCompoundChange()}};b.TextActions=
+f;g.prototype={init:function(){var a=this.editor.getTextView();a.setAction("lineStart",function(){return this.lineStart()}.bind(this));a.setAction("enter",function(){return this.autoIndent()}.bind(this));a.setKeyBinding(new m.KeyBinding("t",!0,!1,!0),"trimTrailingWhitespaces");a.setAction("trimTrailingWhitespaces",function(){return this.trimTrailingWhitespaces()}.bind(this),{name:k.trimTrailingWhitespaces});a.setKeyBinding(new m.KeyBinding(191,!0),"toggleLineComment");a.setAction("toggleLineComment",
+function(){return this.toggleLineComment()}.bind(this),{name:k.toggleLineComment});a.setKeyBinding(new m.KeyBinding(191,!0,!d.isMac,!1,d.isMac),"addBlockComment");a.setAction("addBlockComment",function(){return this.addBlockComment()}.bind(this),{name:k.addBlockComment});a.setKeyBinding(new m.KeyBinding(220,!0,!d.isMac,!1,d.isMac),"removeBlockComment");a.setAction("removeBlockComment",function(){return this.removeBlockComment()}.bind(this),{name:k.removeBlockComment});a.setKeyBinding(new m.KeyBinding("[",
+!1,!1,!1,!1,"keypress"),"autoPairSquareBracket");a.setAction("autoPairSquareBracket",function(){return this.autoPairBrackets("[","]")}.bind(this));a.setKeyBinding(new m.KeyBinding("]",!1,!1,!1,!1,"keypress"),"skipClosingSquareBracket");a.setAction("skipClosingSquareBracket",function(){return this.skipClosingBracket("]")}.bind(this));a.setKeyBinding(new m.KeyBinding("<",!1,!1,!1,!1,"keypress"),"autoPairAngleBracket");a.setAction("autoPairAngleBracket",function(){return this.autoPairBrackets("<",">")}.bind(this));
+a.setKeyBinding(new m.KeyBinding(">",!1,!1,!1,!1,"keypress"),"skipClosingAngleBracket");a.setAction("skipClosingAngleBracket",function(){return this.skipClosingBracket(">")}.bind(this));a.setKeyBinding(new m.KeyBinding("(",!1,!1,!1,!1,"keypress"),"autoPairParentheses");a.setAction("autoPairParentheses",function(){return this.autoPairBrackets("(",")")}.bind(this));a.setKeyBinding(new m.KeyBinding(")",!1,!1,!1,!1,"keypress"),"skipClosingParenthesis");a.setAction("skipClosingParenthesis",function(){return this.skipClosingBracket(")")}.bind(this));
+a.setKeyBinding(new m.KeyBinding("{",!1,!1,!1,!1,"keypress"),"autoPairBraces");a.setAction("autoPairBraces",function(){return this.autoPairBrackets("{","}")}.bind(this));a.setKeyBinding(new m.KeyBinding("}",!1,!1,!1,!1,"keypress"),"skipClosingBrace");a.setAction("skipClosingBrace",function(){return this.skipClosingBracket("}")}.bind(this));a.setKeyBinding(new m.KeyBinding("'",!1,!1,!1,!1,"keypress"),"autoPairSingleQuotation");a.setAction("autoPairSingleQuotation",function(){return this.autoPairQuotations("'")}.bind(this));
+a.setKeyBinding(new m.KeyBinding('"',!1,!1,!1,!1,"keypress"),"autoPairDblQuotation");a.setAction("autoPairDblQuotation",function(){return this.autoPairQuotations('"')}.bind(this));a.setAction("deletePrevious",function(){return this.deletePrevious()}.bind(this))},autoIndent:function(){var a=this.editor,b=a.getTextView();if(b.getOptions("readonly"))return!1;var c=a.getSelection();if(c.start===c.end){for(var d=a.getModel(),f=d.getLineAtOffset(c.start),g=d.getLine(f,!1),h=d.getLineStart(f),i=0,k=c.start-
+h,s;i<k&&((s=g.charCodeAt(i))===32||s===9);)i++;var h=g.substring(0,i),b=b.getOptions("tabSize","expandTab"),u=b.expandTab?Array(b.tabSize+1).join(" "):"\t",b=d.getLineDelimiter(),j=/^[\s]*\/\*[\*]*[\s]*$/,m=/^[\s]*\*/,n=/\*\/[\s]*$/,D=g.substring(0,k),y=g.substring(k),K;if(this.smartIndentation&&g.charCodeAt(K=D.trimRight().length-1)===123)return d=k-K-1,y=y.length-y.trimLeft().length,g=g.charCodeAt(k+y)===125?b+h+u+b+h:b+h+u,a.setText(g,c.start-d,c.end+y),a.setCaretOffset(c.start+b.length+h.length+
+u.length-d),!0;else if(this.autoCompleteComments&&!n.test(D)&&(j.test(D)||m.test(D))){if(i=j.exec(D)){g=b+h+" * ";g+=n.test(y)?y.substring(0,y.length-2).trim():y.trim();if(d.getLineCount()===f+1||!m.test(d.getLine(f+1)))g+=b+h+" */";a.setText(g,c.start,c.end+y.length);a.setCaretOffset(c.start+b.length+h.length+3);return!0}if(i=m.exec(D))for(f-=1;f>=0;f--)if(i=d.getLine(f,!1),j.test(i))return n.test(y)||g.charCodeAt(k)===47?(g=b+h+"*"+y,h=c.start+b.length+h.length+1):(g=b+h+"* "+y,h=c.start+b.length+
+h.length+2),a.setText(g,c.start,c.end+y.length),a.setCaretOffset(h),!0;else if(!m.test(i))break}else if(n.test(D)&&h.charCodeAt(h.length-1)===32)return g=b+h.substring(0,h.length-1),a.setText(g,c.start,c.end),a.setCaretOffset(c.start+g.length),!0;else if(i>0){for(i=k;i<g.length&&((s=g.charCodeAt(i++))===32||s===9);)c.end++;a.setText(d.getLineDelimiter()+h,c.start,c.end);return!0}}return!1},addBlockComment:function(){var a=this.editor;if(a.getTextView().getOptions("readonly"))return!1;var b=a.getModel(),
+c=a.getSelection(),d=this._findEnclosingComment(b,c.start,c.end);if(d.commentStart!==void 0&&d.commentEnd!==void 0)return!0;b=b.getText(c.start,c.end);if(b.length===0)return!0;var d=b.length,b=b.replace(/\/\*|\*\//g,""),f=b.length;a.setText("/*"+b+"*/",c.start,c.end);a.setSelection(c.start+2,c.end+2+(f-d));return!0},autoPairBrackets:function(a,b){if(a==="["&&!this.autoPairSquareBrackets)return!1;else if(a==="{"&&!this.autoPairBraces)return!1;else if(a==="("&&!this.autoPairParentheses)return!1;else if(a===
+"<"&&!this.autoPairAngleBrackets)return!1;var c=this.editor;if(c.getTextView().getOptions("readonly"))return!1;var d=c.getSelection(),f=c.getModel(),g=c.getCaretOffset()===f.getCharCount()?"":f.getText(d.start,d.start+1).trim(),h=/^$|[)}\]>]/;if(d.start===d.end&&h.test(g))return c.setText(a+b,d.start,d.start),c.setCaretOffset(d.start+1),!0;else if(d.start!==d.end)return f=f.getText(d.start,d.end),c.setText(a+f+b,d.start,d.end),c.setSelection(d.start+1,d.end+1),!0;return!1},autoPairQuotations:function(a){if(!this.autoPairQuotation)return!1;
+var b=this.editor;if(b.getTextView().getOptions("readonly"))return!1;var c=b.getSelection(),d=b.getModel(),f=b.getCaretOffset(),g=f===0?"":d.getText(c.start-1,c.start).trim(),h=f===d.getCharCount()?"":d.getText(c.start,c.start+1).trim(),f=/^"$|^'$/,i=/\w/,k=/^$|[)}\]>]/;if(c.start!==c.end){d=d.getText(c.start,c.end);if(f.test(d))return!1;b.setText(a+d+a,c.start,c.end);b.setSelection(c.start+1,c.end+1)}else if(h===a)b.setCaretOffset(c.start+1);else if(g===a||f.test(h)||i.test(g)||!k.test(h))return!1;
+else b.setText(a+a,c.start,c.start),b.setCaretOffset(c.start+1);return!0},contentAssistProposalApplied:function(a){a=a.data.proposal;if(a.positions&&a.positions.length>0&&this.linkedMode){for(var b=[],c=0;c<a.positions.length;++c)b[c]={positions:[{offset:a.positions[c].offset,length:a.positions[c].length}]};this.linkedMode.enterLinkedMode({groups:b,escapePosition:a.escapePosition})}else a.groups&&a.groups.length>0&&this.linkedMode?this.linkedMode.enterLinkedMode({groups:a.groups,escapePosition:a.escapePosition}):
+a.escapePosition&&this.editor.getTextView().setCaretOffset(a.escapePosition);return!0},deletePrevious:function(){var a=this.editor;if(a.getTextView().getOptions("readonly"))return!1;var b=a.getSelection();if(b.start!==b.end)return!1;var c=a.getModel(),d=a.getCaretOffset(),f=d===0?"":c.getText(b.start-1,b.start),c=d===c.getCharCount()?"":c.getText(b.start,b.start+1);(f==="("&&c===")"||f==="["&&c==="]"||f==="{"&&c==="}"||f==="<"&&c===">"||f==='"'&&c==='"'||f==="'"&&c==="'")&&a.setText("",b.start,b.start+
+1);return!1},_findEnclosingComment:function(a,b,c){var d=a.getLineAtOffset(b),f=a.getLineAtOffset(c),g,h,i,k,s,u;for(g=d;g>=0;g--)if(h=a.getLine(g),i=g===d?b-a.getLineStart(d):h.length,k=h.lastIndexOf("/*",i),h=h.lastIndexOf("*/",i),h>k)break;else if(k!==-1){s=a.getLineStart(g)+k;break}for(g=f;g<a.getLineCount();g++)if(h=a.getLine(g),i=g===f?c-a.getLineStart(f):0,k=h.indexOf("/*",i),h=h.indexOf("*/",i),k!==-1&&k<h)break;else if(h!==-1){u=a.getLineStart(g)+h;break}return{commentStart:s,commentEnd:u}},
+lineStart:function(){for(var a=this.editor,b=a.getModel(),c=a.getCaretOffset(),d=b.getLineAtOffset(c),f=b.getLineStart(d),b=b.getLine(d),d=0;d<b.length;d++){var g=b.charCodeAt(d);if(!(g===32||g===9))break}d+=f;return c!==d?(a.setSelection(d,d),!0):!1},removeBlockComment:function(){var a=this.editor;if(a.getTextView().getOptions("readonly"))return!1;var b=a.getModel(),c=a.getSelection(),d=b.getText(c.start,c.end),f,g,h;for(h=0;h<d.length;h++)if(d.substring(h,h+2)==="/*"){f=c.start+h;break}for(;h<d.length;h++)if(d.substring(h,
+h+2)==="*/"){g=c.start+h;break}if(f!==void 0&&g!==void 0)a.setText(b.getText(f+2,g),f,g+2),a.setSelection(f,g);else{d=this._findEnclosingComment(b,c.start,c.end);if(d.commentStart===void 0||d.commentEnd===void 0)return!0;b=b.getText(d.commentStart+2,d.commentEnd);a.setText(b,d.commentStart,d.commentEnd+2);a.setSelection(c.start-2,c.end-2)}return!0},toggleLineComment:function(){var a=this.editor;if(a.getTextView().getOptions("readonly"))return!1;for(var b=a.getModel(),c=a.getSelection(),d=b.getLineAtOffset(c.start),
+f=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),g=!0,h=[],i,k,s=d;s<=f;s++)if(i=b.getLine(s,!0),h.push(i),!g||(k=i.indexOf("//"))===-1)g=!1;else if(k!==0){var u;for(u=0;u<k;u++)if(g=i.charCodeAt(u),!(g===32||g===9))break;g=u===k}s=b.getLineStart(d);u=b.getLineEnd(f,!0);if(g){for(g=0;g<h.length;g++)i=h[g],k=i.indexOf("//"),h[g]=i.substring(0,k)+i.substring(k+2);h=h.join("");i=b.getLineStart(f);b=s===c.start?c.start:c.start-2;c=c.end-2*(f-d+1)+(c.end===i+1?2:0)}else h.splice(0,0,""),h=h.join("//"),
+b=s===c.start?c.start:c.start+2,c=c.end+2*(f-d+1);a.setText(h,s,u);a.setSelection(b,c);return!0},trimTrailingWhitespaces:function(){var a=this.editor,b=a.getModel(),c=a.getSelection();a.getTextView().setRedraw(!1);a.getUndoStack().startCompoundChange();for(var d=/(\s+$)/,f=b.getLineCount(),g=0;g<f;g++){var h=b.getLine(g),i=d.exec(h);if(i){var k=b.getLineStart(g),h=i[0].length,i=k+i.index;b.setText("",i,i+h);if(c.start>i)c.start=Math.max(i,c.start-h);if(c.start!==c.end&&c.end>i)c.end=Math.max(i,c.end-
+h)}}a.getUndoStack().endCompoundChange();a.getTextView().setRedraw(!0);a.setSelection(c.start,c.end,!1)},startUndo:function(){this.undoStack&&this.undoStack.startCompoundChange()},skipClosingBracket:function(a){var b=this.editor;if(b.getTextView().getOptions("readonly"))return!1;var c=b.getSelection(),d=b.getModel();return(b.getCaretOffset()===d.getCharCount()?"":d.getText(c.start,c.start+1))===a?(b.setCaretOffset(c.start+1),!0):!1},endUndo:function(){this.undoStack&&this.undoStack.endCompoundChange()},
+setAutoPairParentheses:function(a){this.autoPairParentheses=a},setAutoPairBraces:function(a){this.autoPairBraces=a},setAutoPairSquareBrackets:function(a){this.autoPairSquareBrackets=a},setAutoPairAngleBrackets:function(a){this.autoPairAngleBrackets=a},setAutoPairQuotations:function(a){this.autoPairQuotation=a},setAutoCompleteComments:function(a){this.autoCompleteComments=a},setSmartIndentation:function(a){this.smartIndentation=a}};b.SourceCodeActions=g;if(!String.prototype.trimLeft)String.prototype.trimLeft=
+function(){return this.replace(/^\s+/g,"")};if(!String.prototype.trimRight)String.prototype.trimRight=function(){return this.replace(/\s+$/g,"")};return b});
+define("orion/editor/templates",[],function(){function k(k,i,c,d){this.prefix=k;this.description=i;this.template=c;this.name=d;this._parse()}function m(k,i){this._keywords=k||[];this._templates=[];this.addTemplates(i||[])}k.prototype={getProposal:function(k,i,c){var k=i-k.length,i={},d,f=c.delimiter!==void 0?c.delimiter:"\n";c.indentation&&(f+=c.indentation);for(var g=c.tab!==void 0?c.tab:"\t",h=0,b=this.variables,a=this.segments,c=[],e=0;e<a.length;e++){var l=a[e],o=b[l];if(o!==void 0)switch(l){case "${tab}":l=
+g;break;case "${delimiter}":l=f;break;case "${cursor}":l="";d=h;break;default:var q=i[l];q||(q=i[l]={data:o.data,positions:[]});l=o.substitution;q.data&&q.data.values&&(l=q.data.values[0]);q.positions.push({offset:k+h,length:l.length})}c.push(l);h+=l.length}var f=[],r;for(r in i)i.hasOwnProperty(r)&&f.push(i[r]);c=c.join("");if(d===void 0)d=c.length;return{proposal:c,name:this.name,description:this.description,groups:f,escapePosition:k+d,style:"noemphasis"}},match:function(k){return this.prefix.indexOf(k)===
+0},_parse:function(){var k=this.template,i=[],c={},d,f=0,k=k.replace(/\n/g,"${delimiter}"),k=k.replace(/\t/g,"${tab}");k.replace(/\$\{((?:[^\\}]+|\\.))*\}/g,function(g,h,b){var a=g.substring(2,g.length-1),h=g,e=a,l=null,o=e.indexOf(":");o!==-1&&(e=e.substring(0,o),h="${"+e+"}",l=JSON.parse(a.substring(o+1).replace("\\}","}").trim()));(a=c[h])||(a=c[h]={});a.substitution=e;if(l)a.data=l;(d=k.substring(f,b))&&i.push(d);i.push(h);f=b+g.length;return e});(d=k.substring(f,k.length))&&i.push(d);this.segments=
+i;this.variables=c}};m.prototype={addTemplates:function(m){for(var i=this.getTemplates(),c=0;c<m.length;c++)i.push(new k(m[c].prefix,m[c].description,m[c].template,m[c].name))},computeProposals:function(k,i,c){var d=this.getPrefix(k,i,c),f=[];this.isValid(d,k,i,c)&&(f=f.concat(this.getTemplateProposals(d,i,c)),f=f.concat(this.getKeywordProposals(d)));return f},getKeywords:function(){return this._keywords},getKeywordProposals:function(k){var i=[],c=this.getKeywords();if(c){for(var d=0;d<c.length;d++)c[d].indexOf(k)===
+0&&i.push({proposal:c[d].substring(k.length),description:c[d],style:"noemphasis_keyword"});0<i.length&&i.splice(0,0,{proposal:"",description:"Keywords",style:"noemphasis_title_keywords",unselectable:!0})}return i},getPrefix:function(k,i,c){return c.prefix},getTemplates:function(){return this._templates},getTemplateProposals:function(k,i,c){for(var d=[],f=this.getTemplates(),g=0;g<f.length;g++){var h=f[g];h.match(k)&&(h=h.getProposal(k,i,c),this.removePrefix(k,h),d.push(h))}0<d.length&&(d.sort(function(b,
+a){return b.name<a.name?-1:b.name>a.name?1:0}),d.splice(0,0,{proposal:"",description:"Templates",style:"noemphasis_title",unselectable:!0}));return d},removePrefix:function(k,i){if(!(i.overwrite=i.proposal.substring(0,k.length)!==k))i.proposal=i.proposal.substring(k.length)},isValid:function(){return!0}};return{Template:k,TemplateContentAssist:m}});
+define("orion/editor/linkedMode","i18n!orion/editor/nls/messages,orion/keyBinding,orion/editor/keyModes,orion/editor/annotations,orion/editor/templates,orion/objects,orion/util".split(","),function(k,m,n,i,c,d){function f(c,b,a){var e=c.getTextView();n.KeyMode.call(this,e);this.editor=c;this.undoStack=b;this.contentAssist=a;this.linkedModeModel=null;e.setAction("linkedModeEnter",function(){this.exitLinkedMode(!0);return!0}.bind(this));e.setAction("linkedModeCancel",function(){this.exitLinkedMode(!1);
+return!0}.bind(this));e.setAction("linkedModeNextGroup",function(){var a=this.linkedModeModel;this.selectLinkedGroup((a.selectedGroupIndex+1)%a.groups.length);return!0}.bind(this));e.setAction("linkedModePreviousGroup",function(){var a=this.linkedModeModel;this.selectLinkedGroup(a.selectedGroupIndex>0?a.selectedGroupIndex-1:a.groups.length-1);return!0}.bind(this));this.linkedModeListener={onActivating:function(){this._groupContentAssistProvider&&(this.contentAssist.setProviders([this._groupContentAssistProvider]),
+this.contentAssist.setProgress(null))}.bind(this),onModelChanged:function(a){if(!this.ignoreVerify){for(var b=this.editor.mapOffset(a.start),c=this.linkedModeModel,e,d;c;)if(e=this._getPositionChanged(c,b,b+a.removedCharCount),d=e.position,d===void 0||d.model!==c)this.exitLinkedMode(!1),c=this.linkedModeModel;else break;if(c){c=0;a=a.addedCharCount-a.removedCharCount;e=e.positions;for(var f,g=0;g<e.length;++g){f=e[g];d=f.position;var h=d.offset<=b&&b<=d.offset+d.length;h&&!f.ansestor?(d.offset+=c,
+d.length+=a,c+=a):(d.offset+=c,f.ansestor&&h&&(d.length+=a));if(f.escape)f.model.escapePosition=d.offset}this._updateAnnotations(e)}}}.bind(this),onVerify:function(a){if(!this.ignoreVerify){for(var b=this.editor,c=b.mapOffset(a.start),e=this.editor.mapOffset(a.end),d=this.linkedModeModel,f,g;d;)if(f=this._getPositionChanged(d,c,e),g=f.position,g===void 0||g.model!==d)this.exitLinkedMode(!1),d=this.linkedModeModel;else break;if(d){var h=this._compoundChange;h?h.owner.model===d&&h.owner.group===g.group||
+(this.endUndo(),this.startUndo()):this.startUndo();d.selectedGroupIndex=g.group;var h=0,i=a.text.length-(e-c);f=f.positions;var j;c-=g.position.offset;for(var k=e-g.position.offset,m=0;m<f.length;++m)if(j=f[m],e=j.position,j.oldOffset=e.offset,j.model===d&&j.group===g.group?(e.offset+=h,e.length+=i,h+=i):(e.offset+=h,j.ansestor&&(e.length+=g.count*i)),j.escape)j.model.escapePosition=e.offset;this.ignoreVerify=!0;for(m=f.length-1;m>=0;m--)j=f[m],j.model===d&&j.group===g.group&&b.setText(a.text,j.oldOffset+
+c,j.oldOffset+k);this.ignoreVerify=!1;a.text=null;this._updateAnnotations(f)}}}.bind(this)}}var g={};f.prototype=new n.KeyMode;d.mixin(f.prototype,{createKeyBindings:function(){var c=m.KeyBinding,b=[];b.push({actionID:"linkedModeEnter",keyBinding:new c(13)});b.push({actionID:"linkedModeCancel",keyBinding:new c(27)});b.push({actionID:"linkedModeNextGroup",keyBinding:new c(9)});b.push({actionID:"linkedModePreviousGroup",keyBinding:new c(9,!1,!0)});return b},enterLinkedMode:function(c){if(!this.linkedModeModel){var b=
+this.editor.getTextView();b.addKeyMode(this);b.addEventListener("Verify",this.linkedModeListener.onVerify);b.addEventListener("ModelChanged",this.linkedModeListener.onModelChanged);this.contentAssist.addEventListener("Activating",this.linkedModeListener.onActivating);this.editor.reportStatus(k.linkedModeEntered,null,!0)}this._sortedPositions=null;if(this.linkedModeModel)c.previousModel=this.linkedModeModel,c.parentGroup=this.linkedModeModel.selectedGroupIndex,this.linkedModeModel.nextModel=c;this.linkedModeModel=
+c;this.selectLinkedGroup(0)},exitLinkedMode:function(c){if(this.isActive()){if(this._compoundChange)this.endUndo(),this._compoundChange=null;this._sortedPositions=null;var b=this.linkedModeModel;this.linkedModeModel=b.previousModel;b.parentGroup=b.previousModel=void 0;if(this.linkedModeModel)this.linkedModeModel.nextModel=void 0;if(!this.linkedModeModel){var a=this.editor,e=a.getTextView();e.removeKeyMode(this);e.removeEventListener("Verify",this.linkedModeListener.onVerify);e.removeEventListener("ModelChanged",
+this.linkedModeListener.onModelChanged);e=this.contentAssist;e.removeEventListener("Activating",this.linkedModeListener.onActivating);e.offset=void 0;this.editor.reportStatus(k.linkedModeExited,null,!0);c&&a.setCaretOffset(b.escapePosition,!1)}this.selectLinkedGroup(0)}},startUndo:function(){if(this.undoStack){var c=this,b=this.linkedModeModel;this._compoundChange=this.undoStack.startCompoundChange({model:b,group:b.selectedGroupIndex,end:function(){c._compoundChange=null}})}},endUndo:function(){this.undoStack&&
+this.undoStack.endCompoundChange()},isActive:function(){return!!this.linkedModeModel},isStatusActive:function(){return!!this.linkedModeModel},selectLinkedGroup:function(d){var b=this.linkedModeModel;if(b){b.selectedGroupIndex=d;var d=b.groups[d],a=d.positions[0],e=this.editor;e.setSelection(a.offset,a.offset+a.length);if(b=this.contentAssist)if(b.offset=void 0,d.data&&d.data.type==="link"&&d.data.values)(this._groupContentAssistProvider=new c.TemplateContentAssist(d.data.values)).getPrefix=function(){var b=
+e.getSelection();return b.start===b.end&&(b=e.getCaretOffset(),a.offset<=b&&b<=a.offset+a.length)?e.getText(a.offset,b):""},b.offset=a.offset,b.deactivate(),b.activate();else if(this._groupContentAssistProvider)this._groupContentAssistProvider=null,b.deactivate()}this._updateAnnotations()},_getModelPositions:function(c,b,a){for(var e=b.groups,d=0;d<e.length;d++)for(var f=e[d].positions,g=0;g<f.length;g++){var i=f[g];a&&(i={offset:i.offset+a,length:i.length});i={index:g,group:d,count:f.length,model:b,
+position:i};c.push(i);if(b.nextModel&&b.nextModel.parentGroup===d)i.ansestor=!0,this._getModelPositions(c,b.nextModel,(a||0)+f[g].offset-f[0].offset)}},_getSortedPositions:function(c){var b=this._sortedPositions;if(!b){for(b=[];c.previousModel;)c=c.previousModel;for(this._getModelPositions(b,c);c;)c.escapePosition!==void 0&&b.push({escape:!0,model:c,position:{offset:c.escapePosition,length:0}}),c=c.nextModel;b.sort(function(a,b){return a.position.offset-b.position.offset});this._sortedPositions=b}return b},
+_getPositionChanged:function(c,b,a){for(var e,c=this._getSortedPositions(c),d=c.length-1;d>=0;d--){var f=c[d].position;if(f.offset<=b&&a<=f.offset+f.length){e=c[d];break}}return{position:e,positions:c}},_updateAnnotations:function(c){var b=this.editor.getAnnotationModel();if(b){var a=[],e=[];b.getTextModel();for(var d=b.getAnnotations(),f;d.hasNext();)switch(f=d.next(),f.type){case i.AnnotationType.ANNOTATION_LINKED_GROUP:case i.AnnotationType.ANNOTATION_CURRENT_LINKED_GROUP:case i.AnnotationType.ANNOTATION_SELECTED_LINKED_GROUP:a.push(f)}if(d=
+this.linkedModeModel)for(var c=c||this._getSortedPositions(d),g=0;g<c.length;g++)if(f=c[g],f.model===d){var k=i.AnnotationType.ANNOTATION_LINKED_GROUP;f.group===d.selectedGroupIndex&&(k=f.index===0?i.AnnotationType.ANNOTATION_SELECTED_LINKED_GROUP:i.AnnotationType.ANNOTATION_CURRENT_LINKED_GROUP);f=f.position;f=i.AnnotationType.createAnnotation(k,f.offset,f.offset+f.length,"");e.push(f)}b.replaceAnnotations(a,e)}}});g.LinkedMode=f;return g});
+define("orion/editor/factories","orion/editor/actions,orion/editor/undoStack,orion/editor/rulers,orion/editor/annotations,orion/editor/textDND,orion/editor/linkedMode".split(","),function(k,m,n,i,c,d){function f(){}function g(){}function h(){}function b(){}function a(){}function e(){}var l={};f.prototype={createKeyBindings:function(a,b,c,e){var e=new k.TextActions(a,b,e),f=new d.LinkedMode(a,b,c),a=new k.SourceCodeActions(a,b,c,f);return{textActions:e,linkedMode:f,sourceCodeActions:a}}};l.KeyBindingsFactory=
+f;g.prototype={createUndoStack:function(a){a=a.getTextView();return new m.UndoStack(a,200)}};l.UndoFactory=g;h.prototype={createLineNumberRuler:function(a){return new n.LineNumberRuler(a,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"})}};l.LineNumberRulerFactory=h;b.prototype={createFoldingRuler:function(a){return new n.FoldingRuler(a,"left",{styleClass:"ruler folding"})}};l.FoldingRulerFactory=b;a.prototype={createAnnotationModel:function(a){return new i.AnnotationModel(a)},
+createAnnotationStyler:function(a,b){return new i.AnnotationStyler(a,b)},createAnnotationRulers:function(a){var b=new n.AnnotationRuler(a,"left",{styleClass:"ruler annotations"}),a=new n.OverviewRuler(a,"right",{styleClass:"ruler overview"});return{annotationRuler:b,overviewRuler:a}}};l.AnnotationFactory=a;e.prototype={createTextDND:function(a,b){return new c.TextDND(a.getTextView(),b)}};l.TextDNDFactory=e;return l});
+define("orion/editor/editorFeatures",["orion/editor/factories","orion/editor/actions","orion/editor/linkedMode","orion/objects"],function(k,m,n,i){return i.mixin({},k,m,n)});
+(function(k,m){typeof define==="function"&&define.amd?define("orion/Deferred",m):typeof exports==="object"?module.exports=m():(k.orion=k.orion||{},k.orion.Deferred=m())})(this,function(){function k(){for(var f;f=c.shift();)f();d=!1}function m(f){c.push(f);d||(d=!0,setTimeout(k,0))}function n(c){return function(){c.apply(void 0,arguments)}}function i(){function d(){for(var b;b=l.shift();){var f=b.deferred,g=e==="fulfilled"?"resolve":"reject";if(typeof b[g]==="function")try{var h=(0,b[g])(a),i=h&&(typeof h===
+"object"||typeof h==="function")&&h.then;if(typeof i==="function")if(h===f.promise)f.reject(new TypeError);else{var k=h.cancel;typeof k==="function"?f._protected(c).parentCancel=k.bind(h):delete f._protected(c).parentCancel;i.call(h,n(f.resolve),n(f.reject),n(f.progress))}else f.resolve(h)}catch(j){f.reject(j)}else f[g](a)}}function g(b){delete q.parentCancel;e="rejected";a=b;l.length&&m(d)}function h(b){function c(a){return function(b){t||(t=!0,a(b))}}var t=!1;delete q.parentCancel;try{var v=b&&
+(typeof b==="object"||typeof b==="function")&&b.then;if(typeof v==="function")if(b===k)g(new TypeError);else{e="assumed";var s=b&&b.cancel;if(typeof s!=="function"){var u=new i,b=u.promise;try{v(u.resolve,u.reject,u.progress)}catch(j){u.reject(j)}s=b.cancel;v=b.then}a=b;v.call(b,c(h),c(g));q.parentCancel=s.bind(b)}else e="fulfilled",a=b,l.length&&m(d)}catch(w){c(g)(w)}}function b(){var a=q.parentCancel;if(a)delete q.parentCancel,a();else if(!e)a=Error("Cancel"),a.name="Cancel",g(a)}var a,e,l=[],k=
+this,q={};Object.defineProperty(this,"_protected",{value:function(a){if(a!==c)throw Error("protected");return q}});this.resolve=function(a){e||h(a);return k};this.reject=function(a){e||g(a);return k};this.progress=function(a){e||l.forEach(function(b){if(b.progress)try{b.progress(a)}catch(c){}});return k.promise};this.cancel=function(){q.parentCancel?setTimeout(b,0):b();return k};this.then=function(a,b,g){a={resolve:a,reject:b,progress:g,deferred:new i};l.push(a);a.deferred._protected(c).parentCancel=
+k.promise.cancel.bind(k);(e==="fulfilled"||e==="rejected")&&m(d);return a.deferred.promise};this.promise={then:k.then,cancel:k.cancel}}var c=[],d=!1;i.all=function(c,d){function h(b,c){l||(e[b]=c,--a===0&&k.resolve(e))}function b(a,b){if(!l){if(d)try{h(a,d(b));return}catch(c){b=c}k.reject(b)}}var a=c.length,e=[],l=!1,k=new i;k.then(void 0,function(){l=!0;c.forEach(function(a){a.cancel&&a.cancel()})});a===0?k.resolve(e):c.forEach(function(a,c){a.then(h.bind(void 0,c),b.bind(void 0,c))});return k.promise};
+i.when=function(c,d,h,b){var a;if(!(c&&typeof c.then==="function"))a=new i,a.resolve(c),c=a.promise;return c.then(d,h,b)};return i});
+define("orion/webui/littlelib",["orion/util"],function(k){function m(c,d){d||(d=document);return d.querySelectorAll(c)}function n(c){if(c.tabIndex>=0)return c;if(c.hasChildNodes())for(var d=0;d<c.childNodes.length;d++){var b=n(c.childNodes[d]);if(b)return b}return null}function i(c){if(c.tabIndex>=0)return c;if(c.hasChildNodes())for(var d=c.childNodes.length-1;d>=0;d--){var b=i(c.childNodes[d]);if(b)return b}return null}function c(f,h){if(f.nodeType===3){var b=d.exec(f.nodeValue);b&&b.length>1&&h(f,
+b)}if(f.hasChildNodes())for(b=0;b<f.childNodes.length;b++)c(f.childNodes[b],h)}var d=/\$\{([^\}]+)\}/,f=null;return{$:function(c,d){d||(d=document);return d.querySelector(c)},$$:m,$$array:function(c,d){return Array.prototype.slice.call(m(c,d))},node:function(c){var d=c;typeof c==="string"&&(d=document.getElementById(c));return d},contains:function(c,d){if(!c||!d)return!1;if(c===d)return!0;var b=c.compareDocumentPosition(d);return Boolean(b&16)},bounds:function(c){c=c.getBoundingClientRect();return{left:c.left+
+document.documentElement.scrollLeft,top:c.top+document.documentElement.scrollTop,width:c.width,height:c.height}},empty:function(c){for(;c.hasChildNodes();)c.removeChild(c.firstChild)},firstTabbable:n,lastTabbable:i,stop:function(c){if(window.document.all)c.keyCode=0;c.preventDefault&&(c.preventDefault(),c.stopPropagation())},processTextNodes:function(d,f){c(d,function(b,a){b.parentNode.replaceChild(document.createTextNode(f[a[1]]||a[1]),b)})},processDOMNodes:function(d,f){c(d,function(b,a){var c=
+f[a[1]];if(c){var d=document.createRange(),g=a.index;d.setStart(b,g);d.setEnd(b,g+a[0].length);d.deleteContents();d.insertNode(c)}})},addAutoDismiss:function(c,d){function b(a){f.forEach(function(b){var c=!1,d=b.excludeNodes.some(function(b){return document.body.contains(b)?(c=!0,b.contains(a.target)):!1});if(c&&!d)try{b.dismiss(a)}catch(f){typeof console!=="undefined"&&console&&console.error(f&&f.message)}});f=f.filter(function(a){return a.excludeNodes.some(function(a){return document.body.contains(a)})})}
+f===null&&(f=[],document.addEventListener("click",b,!0),k.isIOS&&document.addEventListener("touchend",function(a){function b(){a.target.removeEventListener("click",b)}a.touches.length===0&&a.target.addEventListener("click",b)},!1));f.push({excludeNodes:c,dismiss:d})},setFramesEnabled:function(c){for(var d=document.getElementsByTagName("iframe"),b=0;b<d.length;b++)d[b].parentNode.style.pointerEvents=c?"":"none"},removeAutoDismiss:function(c){f=f.filter(function(d){return c!==d.dismiss})},KEY:{BKSPC:8,
+TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DEL:46}}});
+define("orion/editor/contentAssist","i18n!orion/editor/nls/messages,orion/keyBinding,orion/editor/keyModes,orion/editor/eventTarget,orion/Deferred,orion/objects,orion/editor/util,orion/util,orion/webui/littlelib".split(","),function(k,m,n,i,c,d,f,g,h){var b,a,e;function l(c){this.textView=c;this.state=b;this.resetProviderInfoArray();var d=this;this.contentAssistListener={onModelChanging:function(a){this._latestModelChangingEvent=a}.bind(this),onSelection:function(c){this.isDeactivatingChange(this._latestModelChangingEvent,
+c)?this.setState(b):this.isActive()&&(this.state===a&&this.setState(e),this.filterProposals(c));this._latestModelChangingEvent=null}.bind(this),onScroll:function(){this.setState(b)}.bind(this)};c.setKeyBinding(g.isMac?new m.KeyBinding(" ",!1,!1,!1,!0):new m.KeyBinding(" ",!0),"contentAssist");c.setKeyBinding(g.isMac?new m.KeyBinding(" ",!1,!1,!0,!0):new m.KeyBinding(" ",!0,!1,!0),"contentAssist");c.setAction("contentAssist",function(){c.getOptions("readonly")||d.activate();return!0},{name:k.contentAssist})}
+function o(a,b){var c=a.textView;n.KeyMode.call(this,c);this.contentAssist=a;this.widget=b;this.proposals=[];var d=this;this.contentAssist.addEventListener("ProposalsComputed",function(a){d.proposals=a.data.proposals;if(d.proposals.length===0)d.selectedIndex=-1,d.cancel();else{for(d.selectedIndex=0;d.proposals[d.selectedIndex]&&d.proposals[d.selectedIndex].unselectable;)d.selectedIndex++;if(d.proposals[d.selectedIndex]){if(d.widget){var b=!0;if(a.autoApply){for(a=d.selectedIndex+1;d.proposals[a]&&
+d.proposals[a].unselectable;)a++;d.proposals[a]||(b=!1,d.contentAssist.apply(d.proposals[d.selectedIndex]))}b&&(d.widget.show(),d.widget.selectNode(d.selectedIndex))}}else d.selectedIndex=-1,d.cancel()}});c.setAction("contentAssistApply",function(){return this.enter()}.bind(this));c.setAction("contentAssistCancel",function(){return this.cancel()}.bind(this));c.setAction("contentAssistNextProposal",function(){return this.lineDown()}.bind(this));c.setAction("contentAssistPreviousProposal",function(){return this.lineUp()}.bind(this));
+c.setAction("contentAssistNextPage",function(){return this.pageDown()}.bind(this));c.setAction("contentAssistPreviousPage",function(){return this.pageUp()}.bind(this));c.setAction("contentAssistHome",function(){this.widget&&this.widget.scrollIndex(0,!0);return this.lineDown(0)}.bind(this));c.setAction("contentAssistEnd",function(){return this.lineUp(this.proposals.length-1)}.bind(this));c.setAction("contentAssistTab",function(){return this.tab()}.bind(this));this.widget&&(this.widget.setContentAssistMode(this),
+this.widget.createAccessible())}function q(a,b){this.contentAssist=a;this.textView=this.contentAssist.getTextView();this.isShowing=this.textViewListenerAdded=!1;var c=this.textView.getOptions("parent").ownerDocument;this.parentNode=typeof b==="string"?c.getElementById(b):b;if(!this.parentNode){this.parentNode=g.createElement(c,"div");this.parentNode.className="contentassist";var d=c.getElementsByTagName("body")[0];if(d)d.appendChild(this.parentNode);else throw Error("parentNode is required");}this.parentNode.addEventListener("scroll",
+this.onScroll.bind(this));var e=this;this.textViewListener={onMouseDown:function(a){(a.event.target||a.event.srcElement).parentElement!==e.parentNode&&e.contentAssist.deactivate()}};this.contentAssist.addEventListener("Deactivating",function(){e.hide()});this.scrollListener=function(){e.isShowing&&e.position()};f.addEventListener(c,"scroll",this.scrollListener)}b=1;a=2;e=3;var r={selected:"selected",hr:"proposal-hr",emphasis:"proposal-emphasis",noemphasis:"proposal-noemphasis",noemphasis_keyword:"proposal-noemphasis-keyword",
+noemphasis_title:"proposal-noemphasis-title",noemphasis_title_keywords:"proposal-noemphasis-title-keywords",dfault:"proposal-default"};l.prototype={apply:function(a){if(!a)return!1;var c=this.textView,d=c.getSelection(),e=this._initialCaretOffset,f=e,j=d=Math.max(d.start,d.end),g=c.getModel();g.getBaseModel&&(f=g.mapOffset(f),j=g.mapOffset(j),g=g.getBaseModel());a.overwrite&&(e=this.getPrefixStart(g,f));f={proposal:a,start:f,end:j};this.setState(b);c.setText(typeof a==="string"?a:a.proposal,e,d);
+this.dispatchEvent({type:"ProposalApplied",data:f});return!0},activate:function(c,d){if(this.state===b)this._autoTriggered=d?!0:!1,this.setState(a,c)},deactivate:function(){this.setState(b)},getTextView:function(){return this.textView},isActive:function(){return this.state===a||this.state===e},isDeactivatingChange:function(a,b){var c=!1;b.newValue.start<this._initialCaretOffset?c=!0:a&&(c=a.removedLineCount>0||a.addedLineCount>0);return c},setState:function(c,d){var e;if(c===a)this._filterText="",
+e="Activating",this._mode&&this._mode.setActive(!0);else if(c===b)e="Deactivating",this._mode&&this._mode.setActive(!1),this._initialCaretOffset=-1,this._filterText="";e&&this.dispatchEvent({type:e,providerInfoArray:d});this.state=c;this.onStateChange(c)},setMode:function(a){this._mode=a},onStateChange:function(c){if(c===b){if(this.listenerAdded)this._latestModelChangingEvent=null,this.textView.removeEventListener("ModelChanging",this.contentAssistListener.onModelChanging),this.textView.removeEventListener("Scroll",
+this.contentAssistListener.onScroll),this.textView.removeEventListener("Selection",this.contentAssistListener.onSelection),this.listenerAdded=!1}else if(c===a){if(!this.listenerAdded)this.textView.addEventListener("ModelChanging",this.contentAssistListener.onModelChanging),this.textView.addEventListener("Scroll",this.contentAssistListener.onScroll),this.textView.addEventListener("Selection",this.contentAssistListener.onSelection),this.listenerAdded=!0;this.computeProposals()}},computeProposals:function(){var a=
+this,b=this.textView.getCaretOffset(),c=this.textView.getSelection(),c=Math.min(c.start,c.end);this._initialCaretOffset=Math.min(b,c);this._computeProposals(this._initialCaretOffset).then(function(b){a._computedProposals=b;a.isActive()&&(b=a._flatten(b),a.dispatchEvent({type:"ProposalsComputed",data:{proposals:b},autoApply:!a._autoTriggered}))})},getPrefixStart:function(a,b){for(var c=b;c>0&&/[A-Za-z0-9_]/.test(a.getText(c-1,c));)c--;return c},handleError:function(a){typeof console!=="undefined"&&
+(console.log("Error retrieving content assist proposals"),console.log(a&&a.stack))},_computeProposals:function(a){var b=this._providerInfoArray,e=this.textView,f=e.getSelection(),g=e.getModel(),j=a;if(g.getBaseModel)j=g.mapOffset(j),f.start=g.mapOffset(f.start),f.end=g.mapOffset(f.end),g=g.getBaseModel();for(var a=g.getLine(g.getLineAtOffset(j)),h=0;h<a.length&&/\s/.test(a.charAt(h));)h++;var h=a.substring(0,h),e=e.getOptions("tabSize","expandTab"),e=e.expandTab?Array(e.tabSize+1).join(" "):"\t",
+i={line:a,offset:j,prefix:g.getText(this.getPrefixStart(g,j),j),selection:f,delimiter:g.getLineDelimiter(),tab:e,indentation:h},l=this,b=b.map(function(a){var a=a.provider,b;try{var e,f;if(e=a.computeContentAssist){var h=l.editorContextProvider,k=h.getEditorContext();i=d.mixin(i,h.getOptions());f=e.apply(a,[k,i])}else if(e=a.getProposals||a.computeProposals)f=e.apply(a,[g.getText(),j,i]);b=l.progress?l.progress.progress(f,"Generating content assist proposal"):f}catch(s){l.handleError(s)}return c.when(b)});
+return c.all(b,this.handleError)},filterProposals:function(){var a="",b=0;if(this._latestModelChangingEvent){a=this._latestModelChangingEvent.text;if(b=this._latestModelChangingEvent.removedCharCount)this._filterText=this._filterText.substring(0,this._filterText.length-b);if(a)this._filterText=this._filterText.concat(a);a=this.textView.getModel();a.getBaseModel&&(a=a.getBaseModel());var c=this.textView.getText(this.getPrefixStart(a,this._initialCaretOffset),this._initialCaretOffset),d=[];this._computedProposals.forEach(function(a){a=
+a.filter(function(a){if(r[a.style]===r.hr||r[a.style]===r.noemphasis_title)return!0;var b="";if(a.overwrite){if(a.name)b=a.name;else if(a.proposal)b=a.proposal;else return!1;return 0===b.indexOf(c+this._filterText)}else return a.name||a.proposal?(b=!1,a.name&&(b=0===a.name.indexOf(c+this._filterText)),!b&&a.proposal&&(b=0===a.proposal.indexOf(this._filterText)),b):typeof a==="string"?0===a.indexOf(this._filterText):!1},this);a.length>0&&d.push(a)},this);d=this._removeExtraUnselectableElements(d);
+this.dispatchEvent({type:"ProposalsComputed",data:{proposals:this._flatten(d)},autoApply:!1})}},_removeExtraUnselectableElements:function(a){return a.map(function(a){return a.filter(function(b,c){var d=!0;if(r[b.style]===r.hr)0===c||a.length-1===c?d=!1:r.hr===r[a[c-1].style]&&(d=!1);else if(r[b.style]===r.noemphasis_title){var e=a[c+1];e?r[e.style]===r.noemphasis_title&&(d=!1):d=!1}return d})})},setEditorContextProvider:function(a){this.editorContextProvider=a},_generateProviderId:function(){this._uniqueProviderIdCounter?
+this._uniqueProviderIdCounter++:this._uniqueProviderIdCounter=0;return"ContentAssistGeneratedID_"+this._uniqueProviderIdCounter},setAutoTriggerEnabled:function(a){this._autoTriggerEnabled=a;this._updateAutoTriggerListenerState()},setProviders:function(a){this.setProviderInfoArray(a.map(function(a){return{provider:a,id:this._generateProviderId()}},this))},setProviderInfoArray:function(a){this.resetProviderInfoArray();this._providerInfoArray=a;this._charTriggersInstalled=a.some(function(a){return a.charTriggers});
+this._updateAutoTriggerListenerState()},resetProviderInfoArray:function(){this._providerInfoArray=[];this._charTriggersInstalled=!1;this._updateAutoTriggerListenerState()},setProgress:function(a){this.progress=a},setStyleAccessor:function(a){this._styleAccessor=a},_flatten:function(a){return a.reduce(function(a,b){var c=a;if(Array.isArray(b)&&b.length>0){var c=b,d=a;b[0].style&&0===r[b[0].style].indexOf(r.noemphasis)&&(c=a,d=b);c.length>0&&c[c.length-1].style&&r.hr!==r[c[c.length-1].style]&&(c=c.concat({proposal:"",
+name:"",description:"---------------------------------",style:"hr",unselectable:!0}));c=c.concat(d)}return c},[])},_triggerListener:function(){if(this._styleAccessor){var a=this.textView.getCaretOffset(),b=null,c=[];if(this._charTriggersInstalled){var d=this.textView.getText(a-1,a);this._providerInfoArray.forEach(function(e){var f=e.charTriggers;if(f&&f.test(d)){var f=!1,g=e.excludedStyles;g&&(b||(b=this._styleAccessor.getStyles(a-1)),f=b.some(function(a){return g.test(a.style)}));f||c.push(e)}},
+this);c.length>0&&this.activate(c,!0)}}},_updateAutoTriggerListenerState:function(){if(!this._boundTriggerListener)this._boundTriggerListener=this._triggerListener.bind(this);if(this._triggerListenerInstalled){if(!this._autoTriggerEnabled||!this._charTriggersInstalled)this.textView.removeEventListener("Modify",this._boundTriggerListener),this._triggerListenerInstalled=!1}else if(this._autoTriggerEnabled&&this._charTriggersInstalled)this.textView.addEventListener("Modify",this._boundTriggerListener),
+this._triggerListenerInstalled=!0}};i.EventTarget.addMixin(l.prototype);o.prototype=new n.KeyMode;d.mixin(o.prototype,{createKeyBindings:function(){var a=m.KeyBinding,b=[];b.push({actionID:"contentAssistApply",keyBinding:new a(13)});b.push({actionID:"contentAssistCancel",keyBinding:new a(27)});b.push({actionID:"contentAssistNextProposal",keyBinding:new a(40)});b.push({actionID:"contentAssistPreviousProposal",keyBinding:new a(38)});b.push({actionID:"contentAssistNextPage",keyBinding:new a(34)});b.push({actionID:"contentAssistPreviousPage",
+keyBinding:new a(33)});b.push({actionID:"contentAssistHome",keyBinding:new a(h.KEY.HOME)});b.push({actionID:"contentAssistEnd",keyBinding:new a(h.KEY.END)});b.push({actionID:"contentAssistTab",keyBinding:new a(9)});return b},cancel:function(){this.getContentAssist().deactivate()},getContentAssist:function(){return this.contentAssist},getProposals:function(){return this.proposals},isActive:function(){return this.getContentAssist().isActive()},setActive:function(a){a?this.contentAssist.textView.addKeyMode(this):
+this.contentAssist.textView.removeKeyMode(this)},lineUp:function(a,b){return this.selectNew(a,b,!1)},lineDown:function(a,b){return this.selectNew(a,b,!0)},selectNew:function(a,b,c){if(c){if(void 0===a&&(a=this.selectedIndex+1),a>=this.proposals.length)if(b)return!0;else a=0}else if(void 0===a&&(a=this.selectedIndex-1),0>a)if(b)return!0;else a=this.proposals.length-1;for(var d=a;this.proposals[a]&&this.proposals[a].unselectable;){if(c){if(a++,a>=this.proposals.length)if(b)return!0;else a=0}else if(a--,
+0>a)if(b)return!0;else a=this.proposals.length-1;if(a===d){a=-1;break}}this.selectedIndex=a;this.widget&&this.widget.selectNode(a);return!0},pageUp:function(){if(this.widget){var a=this.widget.getTopIndex();a===this.selectedIndex&&(this.widget.scrollIndex(a,!1),a=this.widget.getTopIndex());return 0===a?this.lineDown(a,!0):this.lineUp(a,!0)}else return this.lineUp()},pageDown:function(){if(this.widget){var a=this.widget.getBottomIndex();a===this.selectedIndex&&(this.widget.scrollIndex(a,!0),a=this.widget.getBottomIndex());
+return this.lineDown(a,!0)}else return this.lineDown()},enter:function(){return this.contentAssist.apply(this.proposals[this.selectedIndex]||null)},tab:function(){return this.widget?(this.widget.parentNode.focus(),!0):!1}});q.prototype={onClick:function(a){if(!a)a=window.event;this.contentAssist.apply(this.getProposal(a.target||a.srcElement));this.textView.focus()},onScroll:function(){this.previousCloneNode&&!this.preserveCloneThroughScroll&&(this._removeCloneNode(),this.previousSelectedNode.classList.add(r.selected));
+this.preserveCloneThroughScroll=!1},createDiv:function(a,b,c){var d=b.ownerDocument,e=g.createElement(d,"div");e.id="contentoption"+c;e.setAttribute("role","option");e.className=r[a.style]?r[a.style]:r.dfault;a.style==="hr"?a=g.createElement(d,"hr"):(a=this._createDisplayNode(e,a,c),e.contentAssistProposalIndex=c);e.appendChild(a);b.appendChild(e)},createAccessible:function(){var a=this._contentAssistMode,b=this;this.parentNode.addEventListener("keydown",function(c){if(!c)c=window.event;c.preventDefault&&
+c.preventDefault();if(c.keyCode===h.KEY.ESCAPE)return a.cancel();else if(c.keyCode===h.KEY.UP)return a.lineUp();else if(c.keyCode===h.KEY.DOWN)return a.lineDown();else if(c.keyCode===h.KEY.ENTER)return a.enter();else if(c.keyCode===h.KEY.PAGEDOWN)return a.pageDown();else if(c.keyCode===h.KEY.PAGEUP)return a.pageUp();else if(c.keyCode===h.KEY.HOME)return b.scrollIndex(0,!0),a.lineDown(0);else if(c.keyCode===h.KEY.END)return a.lineUp(a.getProposals().length-1);return!1})},_createDisplayNode:function(a,
+b,c){var d=null,e=null;if(typeof b==="string")e=b;else if(b.description&&typeof b.description==="string")if(b.name&&typeof b.name==="string"){var f=this._createNameNode(b.name);f.contentAssistProposalIndex=c;d=document.createElement("span");d.appendChild(f);f=document.createTextNode(b.description);d.appendChild(f);a.setAttribute("title",b.name+b.description)}else e=b.description;else e=b.proposal;e&&(d=this._createNameNode(e),a.setAttribute("title",e));d.contentAssistProposalIndex=c;return d},_createNameNode:function(a){var b=
+document.createElement("span");b.classList.add("proposal-name");b.appendChild(document.createTextNode(a));return b},getProposal:function(a){var b=null,a=a.contentAssistProposalIndex;void 0!==a&&(b=this._contentAssistMode.getProposals()[a]||null);return b},getTopIndex:function(){for(var a=this.parentNode.childNodes,b=0;b<a.length;b++)if(a[b].offsetTop>=this.parentNode.scrollTop)return b;return 0},getBottomIndex:function(){for(var a=this.parentNode.childNodes,b=0;b<a.length;b++){var c=a[b];if(c.offsetTop+
+c.offsetHeight>this.parentNode.scrollTop+this.parentNode.clientHeight)return Math.max(0,b-1)}return a.length-1},scrollIndex:function(a,b){this.parentNode.childNodes[a].scrollIntoView(b);this.preserveCloneThroughScroll=!0},selectNode:function(a){var b=null;if(this.previousSelectedNode)this.previousSelectedNode.classList.remove(r.selected),this.previousSelectedNode=null,this.previousCloneNode&&this._removeCloneNode();if(-1!==a){b=this.parentNode.childNodes[a];b.classList.add(r.selected);this.parentNode.setAttribute("aria-activedescendant",
+b.id);b.focus();if(b.offsetTop<this.parentNode.scrollTop)b.scrollIntoView(!0),this.preserveCloneThroughScroll=!0;else if(b.offsetTop+b.offsetHeight>this.parentNode.scrollTop+this.parentNode.clientHeight)b.scrollIntoView(!1),this.preserveCloneThroughScroll=!0;var c=h.bounds(b.firstChild||b),d=h.bounds(this.parentNode),a=window.getComputedStyle(this.parentNode),e=window.getComputedStyle(b),e=parseInt(a.paddingLeft)+parseInt(a.paddingRight)+parseInt(e.paddingLeft)+parseInt(e.paddingRight);if(c.width>=
+d.width-e){e=parseInt(a.top);d=b.cloneNode(!0);d.classList.add("cloneProposal");d.style.top=e+b.offsetTop-this.parentNode.scrollTop+"px";d.style.left=a.left;d.setAttribute("id",d.id+"_clone");c=c.left+c.width-parseInt(document.documentElement.clientWidth);if(c>0)a=parseInt(a.left)-c,0>a&&(a=0),d.style.left=a+"px";a=document.createElement("div");a.id="clone_contentassist";a.classList.add("contentassist");a.classList.add("cloneWrapper");a.appendChild(d);a.onclick=this.parentNode.onclick;this.parentNode.parentNode.insertBefore(a,
+this.parentNode);var f=function(a){a.contentAssistProposalIndex=b.contentAssistProposalIndex;if(a.hasChildNodes())for(var c=0;c<a.childNodes.length;c++)f(a.childNodes[c])};f(a);b.classList.remove(r.selected);this.previousCloneNode=a}}this.previousSelectedNode=b},setContentAssistMode:function(a){this._contentAssistMode=a},show:function(){var a=this._contentAssistMode.getProposals();if(a.length===0)this.hide();else{this.parentNode.innerHTML="";for(var b=0;b<a.length;b++)this.createDiv(a[b],this.parentNode,
+b);this.position();this.parentNode.onclick=this.onClick.bind(this);this.isShowing=!0;if(!this.textViewListenerAdded)this.textView.addEventListener("MouseDown",this.textViewListener.onMouseDown),this.textViewListenerAdded=!0}},hide:function(){this.parentNode.ownerDocument.activeElement===this.parentNode&&this.textView.focus();this.parentNode.style.display="none";this.parentNode.onclick=null;this.isShowing=!1;if(this.textViewListenerAdded)this.textView.removeEventListener("MouseDown",this.textViewListener.onMouseDown),
+this.textViewListenerAdded=!1;if(this.previousSelectedNode)this.previousSelectedNode=null,this.previousCloneNode&&this._removeCloneNode()},position:function(){var a=this.contentAssist,b=this.textView;if(a.offset!==void 0){var a=a.offset,c=b.getModel();c.getBaseModel&&(a=c.mapOffset(a,!0))}else a=this.textView.getCaretOffset();a=b.getLocationAtOffset(a);a.y+=b.getLineHeight();this.textView.convert(a,"document","page");this.parentNode.style.position="fixed";this.parentNode.style.left=a.x+"px";this.parentNode.style.top=
+a.y+"px";this.parentNode.style.display="block";this.parentNode.scrollTop=0;b=this.parentNode.ownerDocument;c=b.documentElement.clientWidth;if(a.y+this.parentNode.offsetHeight>b.documentElement.clientHeight)this.parentNode.style.top=a.y-this.parentNode.offsetHeight-this.textView.getLineHeight()+"px";if(a.x+this.parentNode.offsetWidth>c)this.parentNode.style.left=c-this.parentNode.offsetWidth+"px"},_removeCloneNode:function(){this.parentNode.parentNode.contains(this.previousCloneNode)&&this.parentNode.parentNode.removeChild(this.previousCloneNode);
+this.previousCloneNode=null}};return{ContentAssist:l,ContentAssistMode:o,ContentAssistWidget:q}});
+define("orion/editor/stylers/lib/syntax",[],function(){return{id:"orion.lib",grammars:[{id:"orion.lib",patterns:[{include:"#brace_open"},{include:"#brace_close"},{include:"#bracket_open"},{include:"#bracket_close"},{include:"#parenthesis_open"},{include:"#parenthesis_close"},{include:"#number_decimal"},{include:"#number_hex"},{include:"#string_doubleQuote"},{include:"#string_singleQuote"}],repository:{brace_open:{match:"{",name:"punctuation.section.block.begin"},brace_close:{match:"}",name:"punctuation.section.block.end"},
+bracket_open:{match:"\\[",name:"punctuation.section.bracket.begin"},bracket_close:{match:"\\]",name:"punctuation.section.bracket.end"},parenthesis_open:{match:"\\(",name:"punctuation.section.parens.begin"},parenthesis_close:{match:"\\)",name:"punctuation.section.parens.end"},doc_block:{begin:"/\\*\\*",end:"\\*/",name:"comment.block.documentation",patterns:[{match:"@(?:(?!\\*/)\\S)*",name:"keyword.other.documentation.tag"},{match:"\\<\\S*\\>",name:"keyword.other.documentation.markup"},{match:"(\\b)(TODO)(\\b)(((?!\\*/).)*)",
+name:"meta.annotation.task.todo",captures:{2:{name:"keyword.other.documentation.task"},4:{name:"comment.block"}}}]},number_decimal:{match:"\\b-?(?:\\.\\d+|\\d+\\.?\\d*)(?:[eE][+-]?\\d+)?\\b",name:"constant.numeric.number"},number_hex:{match:"\\b0[xX][0-9A-Fa-f]+\\b",name:"constant.numeric.hex"},string_doubleQuote:{match:'"(?:\\\\.|[^"])*"?',name:"string.quoted.double"},string_singleQuote:{match:"'(?:\\\\.|[^'])*'?",name:"string.quoted.single"},todo_comment_singleLine:{match:"(\\b)(TODO)(\\b)(.*)",
+name:"meta.annotation.task.todo",captures:{2:{name:"keyword.other.documentation.task"},4:{name:"comment.line"}}}}},{id:"orion.c-like",patterns:[{include:"orion.lib"},{include:"#comment_singleLine"},{include:"#comment_block"}],repository:{comment_singleLine:{match:"//.*",name:"comment.line.double-slash",patterns:[{include:"orion.lib#todo_comment_singleLine"}]},comment_block:{begin:"/\\*",end:"\\*/",name:"comment.block",patterns:[{match:"(\\b)(TODO)(\\b)(((?!\\*/).)*)",name:"meta.annotation.task.todo",
+captures:{2:{name:"keyword.other.documentation.task"},4:{name:"comment.block"}}}]}}}],keywords:[]}});
+define("orion/editor/stylers/text_css/syntax",["orion/editor/stylers/lib/syntax"],function(k){var m="alignment-adjust,alignment-baseline,animation-delay,animation-direction,animation-duration,animation-iteration-count,animation-name,animation-play-state,animation-timing-function,animation,appearance,azimuth,backface-visibility,background-attachment,background-clip,background-color,background-image,background-origin,background-position,background-repeat,background-size,background,baseline-shift,binding,bleed,bookmark-label,bookmark-level,bookmark-state,bookmark-target,border-bottom-color,border-bottom-left-radius,border-bottom-right-radius,border-bottom-style,border-bottom-width,border-bottom,border-collapse,border-color,border-image-outset,border-image-repeat,border-image-slice,border-image-source,border-image-width,border-image,border-left-color,border-left-style,border-left-width,border-left,border-radius,border-right-color,border-right-style,border-right-width,border-right,border-spacing,border-style,border-top-color,border-top-left-radius,border-top-right-radius,border-top-style,border-top-width,border-top,border-width,border,bottom,box-align,box-decoration-break,box-direction,box-flex-group,box-flex,box-lines,box-ordinal-group,box-orient,box-pack,box-shadow,box-sizing,break-after,break-before,break-inside,caption-side,clear,clip,color-profile,color,column-count,column-fill,column-gap,column-rule-color,column-rule-style,column-rule-width,column-rule,column-span,column-width,columns,content,counter-increment,counter-reset,crop,cue-after,cue-before,cue,cursor,direction,display,dominant-baseline,drop-initial-after-adjust,drop-initial-after-align,drop-initial-before-adjust,drop-initial-before-align,drop-initial-size,drop-initial-value,elevation,empty-cells,fit-position,fit,flex-align,flex-flow,flex-inline-pack,flex-order,flex-pack,float-offset,float,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,font,grid-columns,grid-rows,hanging-punctuation,height,hyphenate-after,hyphenate-before,hyphenate-character,hyphenate-lines,hyphenate-resource,hyphens,icon,image-orientation,image-rendering,image-resolution,inline-box-align,left,letter-spacing,line-height,line-stacking-ruby,line-stacking-shift,line-stacking-strategy,line-stacking,list-style-image,list-style-position,list-style-type,list-style,margin-bottom,margin-left,margin-right,margin-top,margin,mark-after,mark-before,mark,marker-offset,marks,marquee-direction,marquee-loop,marquee-play-count,marquee-speed,marquee-style,max-height,max-width,min-height,min-width,move-to,nav-down,nav-index,nav-left,nav-right,nav-up,opacity,orphans,outline-color,outline-offset,outline-style,outline-width,outline,overflow-style,overflow-x,overflow-y,overflow,padding-bottom,padding-left,padding-right,padding-top,padding,page-break-after,page-break-before,page-break-inside,page-policy,page,pause-after,pause-before,pause,perspective-origin,perspective,phonemes,pitch-range,pitch,play-during,position,presentation-level,punctuation-trim,quotes,rendering-intent,resize,rest-after,rest-before,rest,richness,right,rotation-point,rotation,ruby-align,ruby-overhang,ruby-position,ruby-span,size,speak-header,speak-numeral,speak-punctuation,speak,speech-rate,stress,string-set,table-layout,target-name,target-new,target-position,target,text-align-last,text-align,text-decoration,text-emphasis,text-height,text-indent,text-justify,text-outline,text-shadow,text-transform,text-wrap,top,transform-origin,transform-style,transform,transition-delay,transition-duration,transition-property,transition-timing-function,transition,unicode-bidi,vertical-align,visibility,voice-balance,voice-duration,voice-family,voice-pitch-range,voice-pitch,voice-rate,voice-stress,voice-volume,volume,white-space-collapse,white-space,widows,width,word-break,word-spacing,word-wrap,z-index".split(","),k=
+k.grammars;k.push({id:"orion.css",contentTypes:["text/css"],patterns:[{include:"orion.lib"},{include:"orion.c-like#comment_block"},{match:"(?:-webkit-|-moz-|-ms-|\\b)(?:"+m.join("|")+")\\b",name:"keyword.control.css"},{match:"(?i)\\b-?(?:\\.\\d+|\\d+\\.?\\d*)(?:%|em|ex|ch|rem|vw|vh|vmin|vmax|in|cm|mm|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?\\b",name:"constant.numeric.value.css"},{begin:"(['\"])(?:\\\\.|[^\\\\\\1])*\\\\$",end:"^(?:$|(?:\\\\.|[^\\\\\\1])*(\\1|[^\\\\]$))",name:"string.quoted.multiline.css"}],
+repository:{number_hex:{match:"#[0-9A-Fa-f]+\\b",name:"constant.numeric.hex.css"}}});return{id:k[k.length-1].id,grammars:k,keywords:m}});
+define("orion/editor/cssContentAssist",["orion/editor/templates","orion/editor/stylers/text_css/syntax"],function(k,m){function n(a){return JSON.stringify(a).replace("}","\\}")}function i(){}for(var c={type:"link",values:"visible,hidden,scroll,auto,no-display,no-content".split(",")},d={type:"link",values:"solid,dashed,dotted,double,groove,ridge,inset,outset".split(",")},f={type:"link",values:[]},g=0;g<10;g++)f.values.push(g.toString());for(var h={type:"link",values:"black,white,red,green,blue,magenta,yellow,cyan,grey,darkred,darkgreen,darkblue,darkmagenta,darkcyan,darkyellow,darkgray,lightgray".split(",")},
+b=[{prefix:"rule",description:"rule - class selector rule",template:".${class} {\n\t${cursor}\n}"},{prefix:"rule",description:"rule - id selector rule",template:"#${id} {\n\t${cursor}\n}"},{prefix:"outline",description:"outline - outline style",template:"outline: ${color:"+n(h)+"} ${style:"+n(d)+"} ${width:"+n(f)+"}px;"},{prefix:"background-image",description:"background-image - image style",template:'background-image: url("${uri}");'},{prefix:"url",description:"url - url image",template:'url("${uri}");'},
+{prefix:"rgb",description:"rgb - rgb color",template:"rgb(${red},${green},${blue});"},{prefix:"@",description:"import - import style sheet",template:'@import "${uri}";'}],a=[{prop:"display",values:{type:"link",values:"none,block,box,flex,inline,inline-block,inline-flex,inline-table,list-item,table,table-caption,table-cell,table-column,table-column-group,table-footer-group,table-header-group,table-row,table-row-group,inherit".split(",")}},{prop:"overflow",values:c},{prop:"overflow-x",values:c},{prop:"overflow-y",
+values:c},{prop:"float",values:{type:"link",values:["left","right","none","inherit"]}},{prop:"position",values:{type:"link",values:["absolute","fixed","relative","static","inherit"]}},{prop:"cursor",values:{type:"link",values:"auto,crosshair,default,e-resize,help,move,n-resize,ne-resize,nw-resize,pointer,progress,s-resize,se-resize,sw-resize,text,w-resize,wait,inherit".split(",")}},{prop:"color",values:h},{prop:"border-top-color",values:h},{prop:"border-bottom-color",values:h},{prop:"border-right-color",
+values:h},{prop:"border-left-color",values:h},{prop:"background-color",values:h},{prop:"font-style",values:{type:"link",values:["italic","normal","oblique","inherit"]}},{prop:"font-weight",values:{type:"link",values:"bold,normal,bolder,lighter,100,200,300,400,500,600,700,800,900,inherit".split(",")}},{prop:"white-space",values:{type:"link",values:"pre,pre-line,pre-wrap,nowrap,normal,inherit".split(",")}},{prop:"word-wrap",values:{type:"link",values:["normal","break-word"]}},{prop:"visibility",values:{type:"link",
+values:["hidden","visible","collapse","inherit"]}}],g=0;g<a.length;g++)c=a[g],b.push({prefix:c.prop,description:c.prop+" - "+c.prop+" style",template:c.prop+": ${value:"+n(c.values)+"};"});a="width,height,top,bottom,left,right,min-width,min-height,max-width,max-height,margin,padding,padding-left,padding-right,padding-top,padding-bottom,margin-left,margin-top,margin-bottom,margin-right".split(",");for(g=0;g<a.length;g++)c=a[g],b.push({prefix:c,description:c+" - "+c+" pixel style",template:c+": ${value}px;"});
+a=["padding","margin"];for(g=0;g<a.length;g++)c=a[g],b.push({prefix:c,description:c+" - "+c+" top right bottom left style",template:c+": ${top}px ${left}px ${bottom}px ${right}px;"}),b.push({prefix:c,description:c+" - "+c+" top right,left bottom style",template:c+": ${top}px ${right_left}px ${bottom}px;"}),b.push({prefix:c,description:c+" - "+c+" top,bottom right,left style",template:c+": ${top_bottom}px ${right_left}px"});a=["border","border-top","border-bottom","border-left","border-right"];for(g=
+0;g<a.length;g++)c=a[g],b.push({prefix:c,description:c+" - "+c+" style",template:c+": ${width:"+n(f)+"}px ${style:"+n(d)+"} ${color:"+n(h)+"};"});i.prototype=new k.TemplateContentAssist(m.keywords,b);i.prototype.getPrefix=function(a,b){for(var c=b;c&&/[A-Za-z\-\@]/.test(a.charAt(c-1));)c--;return c?a.substring(c,b):""};return{CssContentAssistProvider:i}});
+define("orion/editor/htmlContentAssist",["orion/editor/templates"],function(k){function m(){}var n=new k.Template("","Simple HTML document",'<!DOCTYPE html>\n<html lang="en">\n\t<head>\n\t\t<meta charset=utf-8>\n\t\t<title>${title}</title>\n\t</head>\n\t<body>\n\t\t<h1>${header}</h1>\n\t\t<p>\n\t\t\t${cursor}\n\t\t</p>\n\t</body>\n</html>'),i=[{prefix:"<img",name:"<img>",description:" - HTML image element",template:'<img src="${cursor}" alt="${Image}"/>'},{prefix:"<a",name:"<a>",description:" - HTML anchor element",
+template:'<a href="${cursor}"></a>'},{prefix:"<ul",name:"<ul>",description:" - HTML unordered list",template:"<ul>\n\t<li>${cursor}</li>\n</ul>"},{prefix:"<ol",name:"<ol>",description:" - HTML ordered list",template:"<ol>\n\t<li>${cursor}</li>\n</ol>"},{prefix:"<dl",name:"<dl>",description:" - HTML definition list",template:"<dl>\n\t<dt>${cursor}</dt>\n\t<dd></dd>\n</dl>"},{prefix:"<table",name:"<table>",description:" - basic HTML table",template:"<table>\n\t<tr>\n\t\t<td>${cursor}</td>\n\t</tr>\n</table>"},
+{prefix:"<\!--",name:"<\!-- --\>",description:" - HTML comment",template:"<\!-- ${cursor} --\>"}],c,d,f,g,h="abbr,b,button,canvas,cite,command,dd,del,dfn,dt,em,embed,font,h1,h2,h3,h4,h5,h6,i,ins,kbd,label,li,mark,meter,object,option,output,progress,q,rp,rt,samp,small,strong,sub,sup,td,time,title,tt,u,var".split(",");for(g=0;g<h.length;g++)c=h[g],f="<"+c+"></"+c+">",d="<"+c+">${cursor}</"+c+">",i.push({prefix:"<"+c,description:f,template:d});h="address,article,aside,audio,bdo,blockquote,body,caption,code,colgroup,datalist,details,div,fieldset,figure,footer,form,head,header,hgroup,iframe,legend,map,menu,nav,noframes,noscript,optgroup,p,pre,ruby,script,section,select,span,style,tbody,textarea,tfoot,th,thead,tr,video".split(",");
+for(g=0;g<h.length;g++)c=h[g],f="<"+c+"></"+c+">",d="<"+c+">\n\t${cursor}\n</"+c+">",i.push({prefix:"<"+c,description:f,template:d});h="area,base,br,col,hr,input,link,meta,param,keygen,source".split(",");for(g=0;g<h.length;g++)c=h[g],d=f="<"+c+"/>",i.push({prefix:"<"+c,description:f,template:d});m.prototype=new k.TemplateContentAssist([],i);m.prototype.getPrefix=function(b,a){for(var c="",d=a;d&&/[A-Za-z0-9<!-]/.test(b.charAt(d-1));)if(d--,b.charAt(d)==="<"){c=b.substring(d,a);break}return c};m.prototype.computeProposals=
+function(b,a,c){return b.length===0?[n.getProposal("",a,c)]:k.TemplateContentAssist.prototype.computeProposals.call(this,b,a,c).sort(function(a,b){var c=a.prefix||a.proposal,d=b.prefix||b.proposal;if(c){if(!d)return 1}else return-1;return c.toLowerCase().localeCompare(d.toLowerCase())})};return{HTMLContentAssistProvider:m}});
+define("orion/editor/stylers/application_javascript/syntax",["orion/editor/stylers/lib/syntax"],function(k){var m="break,case,class,catch,continue,const,debugger,default,delete,do,else,enum,export,extends,false,finally,for,function,if,implements,import,in,instanceof,interface,let,new,null,package,private,protected,public,return,static,super,switch,this,throw,true,try,typeof,undefined,var,void,while,with,yield".split(","),k=k.grammars;k.push({id:"orion.js",contentTypes:["application/javascript"],patterns:[{include:"orion.lib#doc_block"},
+{include:"orion.c-like"},{match:"\\b(?:"+m.join("|")+")\\b",name:"keyword.control.js"},{begin:"(['\"])(?:\\\\.|[^\\\\\\1])*\\\\$",end:"^(?:$|(?:\\\\.|[^\\\\\\1])*(\\1|[^\\\\]$))",name:"string.quoted.multiline.js"}]});return{id:k[k.length-1].id,grammars:k,keywords:m}});
+define("orion/editor/jsTemplateContentAssist",["orion/editor/templates","orion/editor/stylers/application_javascript/syntax"],function(k,m){function n(){}var i=[{prefix:"if",name:"if",description:" - if statement",template:"if (${condition}) {\n\t${cursor}\n}"},{prefix:"if",name:"if",description:" - if else statement",template:"if (${condition}) {\n\t${cursor}\n} else {\n\t\n}"},{prefix:"for",name:"for",description:" - iterate over array",template:"for (var ${i}=0; ${i}<${array}.length; ${i}++) {\n\t${cursor}\n}"},
+{prefix:"for",name:"for",description:" - iterate over array with local var",template:"for (var ${i}=0; ${i}<${array}.length; ${i}++) {\n\tvar ${value} = ${array}[${i}];\n\t${cursor}\n}"},{prefix:"for",name:"for..in",description:" - iterate over properties of an object",template:"for (var ${property} in ${object}) {\n\tif (${object}.hasOwnProperty(${property})) {\n\t\t${cursor}\n\t}\n}"},{prefix:"while",name:"while",description:" - while loop with condition",template:"while (${condition}) {\n\t${cursor}\n}"},
+{prefix:"do",name:"do",description:" - do while loop with condition",template:"do {\n\t${cursor}\n} while (${condition});"},{prefix:"switch",name:"switch",description:" - switch case statement",template:"switch (${expression}) {\n\tcase ${value1}:\n\t\t${cursor}\n\t\tbreak;\n\tdefault:\n}"},{prefix:"case",name:"case",description:" - case statement",template:"case ${value}:\n\t${cursor}\n\tbreak;"},{prefix:"try",name:"try",description:" - try..catch statement",template:"try {\n\t${cursor}\n} catch (${err}) {\n}"},
+{prefix:"try",name:"try",description:" - try..catch statement with finally block",template:"try {\n\t${cursor}\n} catch (${err}) {\n} finally {\n}"},{prefix:"typeof",name:"typeof",description:" - typeof statement",template:'typeof ${object} === "${type:'+JSON.stringify({type:"link",values:"undefined,object,boolean,number,string,function,xml".split(",")}).replace("}","\\}")+'}"'},{prefix:"instanceof",name:"instanceof",description:" - instanceof statement",template:"${object} instanceof ${type}"},{prefix:"with",
+name:"with",description:" - with statement",template:"with (${object}) {\n\t${cursor}\n}"},{prefix:"function",name:"function",description:" - function declaration",template:"/**\n * @name ${name}\n * @param ${parameter}\n */\nfunction ${name} (${parameter}) {\n\t${cursor}\n}"},{prefix:"function",name:"function",description:" - function expression",template:"/**\n * @name ${name}\n * @function\n * @param ${parameter}\n */\n${name}: function(${parameter}) {\n\t${cursor}\n}"},{prefix:"define",name:"define",
+description:" - define function call",template:"/* global define */\ndefine('${name}',[\n'${import}'\n], function(${importname}) {\n\t${cursor}\n});"},{prefix:"nls",name:"nls",description:" - non NLS string",template:"${cursor} //$NON-NLS-${0}$"},{prefix:"log",name:"log",description:" - console log",template:"console.log(${object});"},{prefix:"mongodb",name:"mongodb",description:" - Node.js require statement for MongoDB",template:"var ${name} = require('mongodb');\n"},{prefix:"mongodb",name:"mongodb client",
+description:" - create a new MongoDB client",template:"var MongoClient = require('mongodb').MongoClient;\nvar Server = require('mongodb').Server;\n${cursor}"},{prefix:"mongodb",name:"mongodb open",description:" - create a new MongoDB client and open a connection",template:"var MongoClient = require('mongodb').MongoClient;\nvar Server = require('mongodb').Server;\nvar ${client} = new MongoClient(new Server(${host}, ${port}));\ntry {\n\t${client}.open(function(error, ${client}) {\n\t\tvar ${db} = ${client}.db(${name});\n\t\t${cursor}\n\t});\n} finally {\n\t${client}.close();\n};"},
+{prefix:"mongodb",name:"mongodb connect",description:" - connect to an existing MongoDB database",template:"var MongoClient = require('mongodb').MongoClient;\nMongoClient.connect(${url}, function(error, db) {\n\t${cursor}\n});\n"},{prefix:"mongodb",name:"mongodb connect (Cloud Foundry)",description:" - connect to an existing MongoDB database using Cloud Foundry",template:"if (${process}.env.VCAP_SERVICES) {\n\tvar env = JSON.parse(${process}.env.VCAP_SERVICES);\n\tvar mongo = env['${mongo-version}'][0].credentials;\n} else {\n\tvar mongo = {\n\t\tusername : 'username',\n\t\tpassword : 'password',\n\t\turl : 'mongodb://username:password@localhost:27017/database'\n\t};\n}\nvar MongoClient = require('mongodb').MongoClient;\nMongoClient.connect(mongo.url, function(error, db) {\n\t${cursor}\n});\n"},
+{prefix:"mongodb",name:"mongodb collection",description:" - create a MongoDB database collection",template:"${db}.collection(${id}, function(${error}, collection) {\n\t${cursor}\n});"},{prefix:"mongodb",name:"mongodb strict collection",description:" - create a MongoDB database strict collection",template:"${db}.collection(${id}, {strict:true}, function(${error}, collection) {\n\t${cursor}\n});"},{prefix:"redis",name:"redis",description:" - Node.js require statement for Redis",template:"var ${name} = require('redis');\n"},
+{prefix:"redis",name:"redis client",description:" - create a new Redis client",template:"var ${name} = require('redis');\nvar ${client} = ${name}.createClient(${port}, ${host}, ${options});\n"},{prefix:"redis",name:"redis connect",description:" - create a new Redis client and connect",template:"var ${name} = require('redis');\nvar ${client} = ${name}.createClient(${port}, ${host}, ${options});\ntry {\n\t${cursor}\n} finally {\n\t${client}.close();\n}\n"},{prefix:"redis",name:"redis set",description:" - create a new Redis client set call",
+template:"client.set(${key}, ${value});\n"},{prefix:"redis",name:"redis get",description:" - create a new Redis client get call",template:"client.get(${key}, function(${error}, ${reply}) {\n\t${cursor}\n});\n"},{prefix:"redis",name:"redis on",description:" - create a new Redis client event handler",template:"client.on(${event}, function(${arg}) {\n\t${cursor}});\n"},{prefix:"pg",name:"postgres",description:" - Node.js require statement for Postgres DB",template:"var pg = require('pg');\n"},{prefix:"pg",
+name:"postgres client",description:" - create a new Postgres DB client",template:"var pg = require('pg');\nvar url = \"postgres://postgres:${port}@${host}/${database}\";\nvar ${client} = new pg.Client(url);\n"},{prefix:"pg",name:"postgres connect",description:" - create a new Postgres DB client and connect",template:"var pg = require('pg');\nvar url = \"postgres://postgres:${port}@${host}/${database}\";\nvar ${client} = new pg.Client(url);\n${client}.connect(function(error) {\n\t${cursor}\n});\n"},
+{prefix:"pg",name:"postgres query",description:" - create a new Postgres DB query statement",template:"${client}.query(${sql}, function(error, result) {\n\t${cursor}\n});\n"},{prefix:"mysql",name:"mysql",description:" - Node.js require statement for MySQL DB",template:"var mysql = require('mysql');\n"},{prefix:"mysql",name:"mysql connection",description:" - create a new MySQL DB connection",template:"var mysql = require('mysql');\nvar ${connection} = mysql.createConnection({\n\thost : ${host},\n\tuser : ${username},\n\tpassword : ${password}\n});\ntry {\n\t${connection}.connect();\n\t${cursor}\n} finally {\n\t${connection}.end();\n}"},
+{prefix:"mysql",name:"mysql query",description:" - create a new MySQL DB query statement",template:"${connection}.query(${sql}, function(error, rows, fields) {\n\t${cursor}\n});\n"},{prefix:"express",name:"express",description:" - Node.js require statement for Express",template:"var ${name} = require('express');"},{prefix:"express",name:"express app",description:" - create a new Express app",template:"var express = require('express');\nvar ${app} = express();\n${cursor}\napp.listen(${timeout});\n"},
+{prefix:"express",name:"express configure",description:" - create an Express app configure statement",template:"app.configure(function() {\n\tapp.set(${id}, ${value});\n});"},{prefix:"express",name:"express specific configure",description:" - create a specific Express app configure statement",template:"app.configure(${name}, function() {\n\tapp.set(${id}, ${value});\n});"},{prefix:"express",name:"express app get",description:" - create a new Express app.get call",template:"var value = app.get(${id}, function(request, result){\n\t${cursor}\n});\n"},
+{prefix:"express",name:"express app set",description:" - create a new Express app set call",template:"app.set(${id}, ${value});\n"},{prefix:"express",name:"express app use",description:" - create a new Express app use statement",template:"app.use(${fnOrObject});\n"},{prefix:"express",name:"express app engine",description:" - create a new Express app engine statement",template:"app.engine(${fnOrObject});\n"},{prefix:"express",name:"express app param",description:" - create a new Express app param statement",
+template:"app.param(${id}, ${value});\n"},{prefix:"express",name:"express app error use",description:" - create a new Express app error handling use statement",template:"app.use(function(error, request, result, next) {\n\tresult.send(${code}, ${message});\n});\n"},{prefix:"amqp",name:"amqp",description:" - Node.js require statement for AMQP framework",template:"var amqp = require('amqp');\n"},{prefix:"amqp",name:"amqp connection",description:" - create a new AMQP connection ",template:"var amqp = require('amqp');\nvar ${connection} = amqp.createConnection({\n\thost: ${host},\n\tport: ${port},\n\tlogin: ${login},\n\tpassword: ${password}\n});\n"},
+{prefix:"amqp",name:"amqp on",description:" - create a new AMQP connection on statement",template:"${connection}.on(${event}, function() {\n\t${cursor}\n});\n"},{prefix:"amqp",name:"amqp queue",description:" - create a new AMQP connection queue statement",template:"${connection}.queue(${id}, function(queue) {\n\tqueue.bind('#'); //catch all messages\n\tqueue.subscribe(function (message, headers, deliveryInfo) {\n\t\t// Receive messages\n\t});\n\t${cursor}\n});\n"},{prefix:"amqp",name:"amqp exchange",
+description:" - create a new AMQP connection exchange",template:"var exchange = ${connection}.exchange(${id}, {type: 'topic'}, function(exchange) {\n\t${cursor}\n});\n"}];n.prototype=new k.TemplateContentAssist(m.keywords,i);n.prototype.isValid=function(c,d,f){c=d.charAt(f-c.length-1);return!c||":!@#$^&*.?<>".indexOf(c)===-1};return{JSTemplateContentAssistProvider:n}});
+define("orion/editor/AsyncStyler",["i18n!orion/editor/nls/messages","orion/editor/annotations"],function(k,m){function n(d){return d.getProperty("objectClass").indexOf(c)!==-1&&d.getProperty("type")==="highlighter"}function i(c,d,h){this.initialize(c,d,h);this.lineStyles=[]}var c="orion.edit.highlighter",d=c+" service must be an event emitter";m.AnnotationType.registerType("orion.annotation.highlightError",{title:k.syntaxError,html:"<div class='annotationHTML error'></div>",rangeStyle:{styleClass:"annotationRange error"}});
+i.prototype={initialize:function(d,g,h){this.textView=d;this.serviceRegistry=g;this.annotationModel=h;this.services=[];var b=this;this.listener={onModelChanging:function(a){b.onModelChanging(a)},onModelChanged:function(a){b.onModelChanged(a)},onDestroy:function(a){b.onDestroy(a)},onLineStyle:function(a){b.onLineStyle(a)},onStyleReady:function(a){b.onStyleReady(a)},onServiceAdded:function(a){b.onServiceAdded(a.serviceReference,b.serviceRegistry.getService(a.serviceReference))},onServiceRemoved:function(a){b.onServiceRemoved(a.serviceReference,
+b.serviceRegistry.getService(a.serviceReference))}};d.addEventListener("ModelChanging",this.listener.onModelChanging);d.addEventListener("ModelChanged",this.listener.onModelChanged);d.addEventListener("Destroy",this.listener.onDestroy);d.addEventListener("LineStyle",this.listener.onLineStyle);g.addEventListener("registered",this.listener.onServiceAdded);g.addEventListener("unregistering",this.listener.onServiceRemoved);d=g.getServiceReferences(c);for(h=0;h<d.length;h++){var a=d[h];n(a)&&this.addServiceListener(g.getService(a))}},
+onDestroy:function(){this.destroy()},destroy:function(){if(this.textView)this.textView.removeEventListener("ModelChanging",this.listener.onModelChanging),this.textView.removeEventListener("ModelChanged",this.listener.onModelChanged),this.textView.removeEventListener("Destroy",this.listener.onDestroy),this.textView.removeEventListener("LineStyle",this.listener.onLineStyle),this.textView=null;if(this.services){for(var c=0;c<this.services.length;c++)this.removeServiceListener(this.services[c]);this.services=
+null}if(this.serviceRegistry)this.serviceRegistry.removeEventListener("registered",this.listener.onServiceAdded),this.serviceRegistry.removeEventListener("unregistering",this.listener.onServiceRemoved),this.serviceRegistry=null;this.lineStyles=this.listener=null},onModelChanging:function(c){this.startLine=this.textView.getModel().getLineAtOffset(c.start)},onModelChanged:function(c){var d=this.startLine;(c.addedLineCount||c.removedLineCount)&&Array.prototype.splice.apply(this.lineStyles,[d,c.removedLineCount].concat(this._getEmptyStyle(c.addedLineCount)))},
+onStyleReady:function(c){var d=c.lineStyles||c.style,c=Number.MAX_VALUE,h=-1,b=this.textView.getModel(),a;for(a in d)Object.prototype.hasOwnProperty.call(d,a)&&(this.lineStyles[a]=d[a],c=Math.min(c,a),h=Math.max(h,a));c=Math.max(c,0);h=Math.min(h,b.getLineCount());if(d=this.annotationModel){for(var e=d.getAnnotations(b.getLineStart(c),b.getLineEnd(h)),i=[];e.hasNext();){var k=e.next();k.type==="orion.annotation.highlightError"&&i.push(k)}e=[];for(k=c;k<=h;k++){a=k;var q=this.lineStyles[a],q=q&&q.errors;
+a=b.getLineStart(a);if(q)for(var r=0;r<q.length;r++){var p=q[r];e.push(m.AnnotationType.createAnnotation("orion.annotation.highlightError",p.start+a,p.end+a))}}d.replaceAnnotations(i,e)}this.textView.redrawLines(c,h+1)},onLineStyle:function(c){function d(b,a){for(var c=b.length,f=[],g=0;g<c;g++){var h=b[g];f.push({start:h.start+a,end:h.end+a,style:h.style})}return f}var h=this.lineStyles[c.lineIndex];if(h)if(h.ranges)c.ranges=d(h.ranges,c.lineStart);else if(h.style)c.style=h.style},_getEmptyStyle:function(c){for(var d=
+[],h=0;h<c;h++)d.push(null);return d},setContentType:function(c){this.contentType=c;if(this.services)for(c=0;c<this.services.length;c++){var d=this.services[c];if(d.setContentType){var h=this.serviceRegistry.getService("orion.page.progress");h?h.progress(d.setContentType(this.contentType),"Styling content type: "+this.contentType.id?this.contentType.id:this.contentType):d.setContentType(this.contentType)}}},onServiceAdded:function(c,d){n(c)&&this.addServiceListener(d)},onServiceRemoved:function(c,
+d){this.services.indexOf(d)!==-1&&this.removeServiceListener(d)},addServiceListener:function(c){if(typeof c.addEventListener==="function"){if(c.addEventListener("orion.edit.highlighter.styleReady",this.listener.onStyleReady),this.services.push(c),c.setContentType&&this.contentType){var g=this.serviceRegistry.getService("orion.page.progress");g?g.progress(c.setContentType(this.contentType),"Styling content type: "+this.contentType.id?this.contentType.id:this.contentType):c.setContentType(this.contentType)}}else typeof console!==
+"undefined"&&console.log(Error(d))},removeServiceListener:function(c){typeof c.removeEventListener==="function"?(c.removeEventListener("orion.edit.highlighter.styleReady",this.listener.onStyleReady),c=this.services.indexOf(c),c!==-1&&this.services.splice(c,1)):typeof console!=="undefined"&&console.log(Error(d))}};return i});
+define("orion/editor/mirror",["i18n!orion/editor/nls/messages","orion/editor/eventTarget","orion/editor/annotations"],function(k,m,n){function i(b){this.string=b;this.tokenStart=this.pos=0}function c(){return{token:function(b){return b.skipToEnd()}}}function d(){this._modes={};this.mimeModes={};this.options={};this.StringStream=i;this.defineMode("null",c);this.defineMIME("text/plain","null")}function f(b){var a=[],c;for(c in b)Object.prototype.hasOwnProperty.call(b,c)&&a.push(c);return a}function g(b,
+a,c){c=c||{};this.model=b;this.codeMirror=a;this.isWhitespaceVisible=typeof c.whitespacesVisible==="undefined"?!1:c.whitespacesVisible;this.mode=null;this.isModeLoaded=!1;this.lines=[];this.dirtyLines=[];this.startLine=Number.MAX_VALUE;this.endLine=-1;this.timer=null;this.initialize(b)}function h(b,a,c){this.init(b,a,c)}i.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos===0},peek:function(){return this.string[this.pos]},next:function(){return this.string[this.pos++]},
+eat:function(b){var a=this.string[this.pos];return typeof a==="string"&&(a===b||b.test&&b.test(a)||typeof b==="function"&&b(a))?this.string[this.pos++]:void 0},eatWhile:function(b){for(var a=!1;this.eat(b)!==void 0;)a=!0;return a},eatSpace:function(){return this.eatWhile(/\s/)},skipToEnd:function(){this.pos=this.string.length},skipTo:function(b){b=this.string.indexOf(b,this.pos);return b!==-1?(this.pos=b,!0):!1},match:function(b,a,c){a=a===!0||typeof a==="undefined";if(typeof b==="string"){var d=
+c?this.string.toLowerCase():this.string,b=c?b.toLowerCase():b,c=d.indexOf(b,this.pos);if(c!==-1&&a)this.pos=c+b.length;return c!==-1}else return(b=this.string.substring(this.pos).match(b))&&a&&typeof b[0]==="string"&&(this.pos+=b.index+b[0].length),b},backUp:function(b){this.pos-=b},column:function(){for(var b=0,a=0;a<this.tokenStart;)b+=this.string[a++]==="\t"?4:1;return b},indentation:function(){for(var b=this.string.search(/\S/),a=0,c=0;c<b;)a+=this.string[c++]==="\t"?4:1;return a},current:function(){return this.string.substring(this.tokenStart,
+this.pos)},advance:function(){this.tokenStart=this.pos}};d.prototype={options:{},setOption:function(b,a){this.options[b]=a},getOption:function(b){return this.options[b]},copyState:function(b,a){if(typeof b.copyState==="function")return b.copyState(a);var c={},d;for(d in a){var f=a[d];c[d]=f instanceof Array?f.slice():f}return c},startState:function(b,a){return b.startState(a)},defineMode:function(b,a){this._modes[b]=a},defineMIME:function(b,a){this.mimeModes[b]=a},getMode:function(b,a){var c={},d;
+typeof a==="string"&&this.mimeModes[a]&&(a=this.mimeModes[a]);typeof a==="object"&&(c=a,d=this._modes[a.name]);d=d||this._modes[a];return typeof d!=="function"?(typeof console!=="undefined"&&console&&console.log("Mode not found: "+a),this.getMode(b,"null")):d(b,c)},listModes:function(){return f(this._modes)},listMIMEs:function(){return f(this.mimeModes)},_getModeName:function(b){b=this.mimeModes[b];if(typeof b==="object")b=b.name;return b}};g.prototype={initialize:function(){var b=this;this.listener=
+{onModelChanging:function(a){b._onModelChanging(a)},onModelChanged:function(a){b._onModelChanged(a)},onDestroy:function(a){b._onDestroy(a)}};this.model.addEventListener("Changing",this.listener.onModelChanging);this.model.addEventListener("Changed",this.listener.onModelChanged);this.model.addEventListener("Destroy",this.listener.onDestroy)},destroy:function(){this.model&&(this.model.removeEventListener("Changing",this.listener.onModelChanging),this.model.removeEventListener("Changed",this.listener.onModelChanged),
+this.model.removeEventListener("Destroy",this.listener.onDestroy));this.dirtyLines=this.lines=this.mode=this.codeMirror=this.model=null;clearTimeout(this.timer);this.timer=null},_onModelChanging:function(b){this.startLine=this.model.getLineAtOffset(b.start)},_onModelChanged:function(b){this._dbgEvent(b);var a=this.startLine;(b.removedLineCount||b.addedLineCount)&&Array.prototype.splice.apply(this.lines,[a+1,b.removedLineCount].concat(this._newLines(b.addedLineCount)));this.mode&&(b=Math.max(b.addedLineCount,
+b.removedLineCount),b=a+Math.min(b,500),this.highlight(a,b),this.highlightLater(b+1))},_onDestroy:function(){this.destroy()},setViewportIndex:function(b){this.viewportIndex=b},_dbgEvent:function(){},_dbgStyle:function(){},_newLines:function(b){for(var a=[],c=0;c<b;c++)a.push({style:null,eolState:null});return a},setMode:function(b,a){if(b)this.mode=this.codeMirror.getMode(this.codeMirror.options,b),this.lines=this._newLines(this.model.getLineCount()),a&&this.highlight()},highlight:function(b,a,c){if(this.mode){for(var d=
+this.model.getLineCount(),b=typeof b==="undefined"?0:b,a=typeof a==="undefined"?d-1:Math.min(a,d-1),d=this.mode,f=this.getState(b),g=b;g<=a;g++){var h=this.lines[g];this.highlightLine(g,h,f);h.eolState=this.codeMirror.copyState(d,f)}this._expandRange(b,a);if(!c)this.onHighlightDone()}},highlightLater:function(b){this.dirtyLines.push(b);var a=this;this.timer=setTimeout(function(){a._highlightJob()},50)},_highlightJob:function(){for(var b=+new Date+30,a=this.mode.compareStates,c=this.model.getLineCount();this.dirtyLines.length;){var d=
+this.viewportIndex,f=this.lines[d],d=f&&!f.eolState?d:this.dirtyLines.pop();if(d>=c)break;this._expandRange(d,d);for(var f=this._getResumeLineIndex(d),d=f+1,f=(f=f>=0&&this.lines[f].eolState)?this.codeMirror.copyState(this.mode,f):this.mode.startState(),g=0,h=d;h<c;h++){var i=this.lines[h],k=i.eolState,m=this.highlightLine(h,i,f);i.eolState=this.codeMirror.copyState(this.mode,f);m&&this._expandRange(d,h+1);var i=a&&k&&a(k,i.eolState),s=!a&&!m&&g++>3;if(i||s)break;else if(!k||m)g=0;k=h<c||this.dirtyLines.length;
+if(+new Date>b&&k){this.highlightLater(h+1);this.onHighlightDone();return}}}this.onHighlightDone()},onHighlightDone:function(){this.startLine!==Number.MAX_VALUE&&this.endLine!==-1&&this.dispatchEvent({type:"Highlight",start:this.startLine,end:this.endLine});this.startLine=Number.MAX_VALUE;this.endLine=-1},_getResumeLineIndex:function(b){for(var a=this.lines,c=b-1;c>=0;c--)if(a[c].eolState||b-c>40)return c;return-1},getState:function(b){var a=this.mode,c=this.lines,d,f;for(d=b-1;d>=0;d--)if(f=c[d],
+f.eolState||b-d>40)break;var g=d>=0&&c[d].eolState;if(g){g=this.codeMirror.copyState(a,g);for(d=Math.max(0,d);d<b-1;d++)f=c[d],this.highlightLine(d,f,g),f.eolState=this.codeMirror.copyState(a,g);return g}else return a.startState()},highlightLine:function(b,a,c){if(this.mode){var d=this.model;d.getLineStart(b)===d.getLineEnd(b)&&this.mode.blankLine&&this.mode.blankLine(c);for(var f=a.style||[],b=d.getLine(b),b=new i(b),d=!a.style,g=[],h=0;!b.eol();h++){var k=this.mode.token(b,c)||null,m=b.current();
+this._whitespaceStyle(k,m,b.tokenStart);k=[b.tokenStart,b.pos,k];m=f[h];g.push(k);d=d||!m||m[0]!==k[0]||m[1]!==k[1]||m[2]!==k[2];b.advance()}if(d=d||g.length!==f.length)a.style=g.length?g:null;return d}},_whitespaceStyle:function(b,a,c){if(!b&&this.isWhitespaceVisible&&/\s+/.test(a)){for(var b=[],d,f,g=0;g<a.length;g++){var h=a[g];h!==f&&(f&&b.push([c+d,c+g,f==="\t"?"punctuation separator tab":"punctuation separator space"]),d=g,f=h)}b.push([c+d,c+g,f==="\t"?"punctuation separator tab":"punctuation separator space"]);
+return b}return null},_expandRange:function(b,a){this.startLine=Math.min(this.startLine,b);this.endLine=Math.max(this.endLine,a)},toStyleRangesAndErrors:function(b,a){var c=b.style;if(!c)return null;for(var d=[],f=[],g=typeof a==="undefined"?0:this.model.getLineStart(a),h=0;h<c.length;h++){var i=c[h],k=!i[2]?null:i[2]==="punctuation separator tab"||i[2]==="punctuation separator space"?i[2]:"cm-"+i[2];k&&(i={start:g+i[0],end:g+i[1],style:{styleClass:k}},d.push(i),k==="cm-error"&&f.push(i))}return[d,
+f]},getLineStyle:function(b){return this.lines[b]},getLineStyles:function(){return this.lines}};m.EventTarget.addMixin(g.prototype);n.AnnotationType.registerType("orion.annotation.highlightError",{title:k.syntaxError,html:"<div class='annotationHTML error'></div>",rangeStyle:{styleClass:"annotationRange error"}});h.prototype={init:function(b,a,c){this.textView=b;this.annotationModel=c;this.modeApplier=new g(b.getModel(),a);var d=this;this.listener={onLineStyle:function(a){d.onLineStyle(a)},onDestroy:function(a){d.onDestroy(a)},
+onHighlight:function(a){d.onHighlight(a)}};b.addEventListener("LineStyle",this.listener.onLineStyle);b.addEventListener("Destroy",this.listener.onDestroy);this.modeApplier.addEventListener("Highlight",this.listener.onHighlight)},destroy:function(){this.modeApplier&&(this.modeApplier.removeEventListener("Highlight",this.listener.onHighlight),this.modeApplier.destroy());this.textView&&(this.textView.removeEventListener("LineStyle",this.listener.onLineStyle),this.textView.removeEventListener("Destroy",
+this.listener.onDestroy));this.listener=this.modeApplier=this.annotationModel=this.textView=null},setMode:function(b){this.modeApplier.setMode(b)},onLineStyle:function(b){var a=b.lineIndex,c=this.modeApplier,d=c.getLineStyle(a);if(!d||!d.eolState){var f=this.textView.getModel().getLineCount();c.highlight(a,Math.min(a+20,f-1),!0);d=c.getLineStyle(a)}f=this.textView.getModel();if(d){var g=c.toStyleRangesAndErrors(d,a);if(g&&(b.ranges=g[0],b=this.annotationModel)){c=[];d=[];if(g=g[1])for(var h=0;h<g.length;h++){var i=
+g[h];i.style.styleClass==="cm-error"&&d.push(n.AnnotationType.createAnnotation("orion.annotation.highlightError",i.start,i.end))}for(a=b.getAnnotations(f.getLineStart(a),f.getLineEnd(a));a.hasNext();)f=a.next(),f.type==="orion.annotation.highlightError"&&c.push(f);b.replaceAnnotations(c,d)}}},onHighlight:function(b){this.textView.redrawLines(b.start,b.end)},onDestroy:function(){this.destroy()}};return{Mirror:d,ModeApplier:g,CodeMirrorStyler:h}});
+define("orion/editor/textMateStyler",["orion/regex"],function(k){function m(c){var d;if(c instanceof Array){d=Array(c.length);for(var f=0;f<c.length;f++)d[f]=m(c[f])}else for(f in d={},c)if(Object.prototype.hasOwnProperty.call(c,f)){var g=c[f];d[f]=typeof g==="object"&&g!==null?m(g):g}return d}function n(c,d,f){this.initialize(c);this.grammar=m(d);this.externalGrammars=f?m(f):[];this._styles={};this._tree=null;this._allGrammars={};this.preprocess(this.grammar)}var i={unsupported:[{regex:/\(\?[ims\-]:/,
+func:function(){return"option on/off for subexp"}},{regex:/\(\?<([=!])/,func:function(c){return c[1]==="="?"lookbehind":"negative lookbehind"}},{regex:/\(\?>/,func:function(){return"atomic group"}}],toRegExp:function(c){function d(b,a){throw Error('Unsupported regex feature "'+b+'": "'+a[0]+'" at index: '+a.index+" in "+a.input);}var f="",g,c=i.processGlobalFlag("x",c,function(b){for(var a="",c=!1,d=b.length,f=0;f<d;){var g=b.charAt(f);if(!c&&g==="#")for(;f<d&&g!=="\r"&&g!=="\n";)g=b.charAt(++f);
+else if(!c&&/\s/.test(g))for(;f<d&&/\s/.test(g);)g=b.charAt(++f);else g==="\\"?(a+=g,/\s/.test(b.charAt(f+1))||(a+=b.charAt(f+1),f+=1)):(g==="["?c=!0:g==="]"&&(c=!1),a+=g),f+=1}return a}),c=i.processGlobalFlag("i",c,function(b){f+="i";return b});for(g=0;g<this.unsupported.length;g++){var h;(h=this.unsupported[g].regex.exec(c))&&d(this.unsupported[g].func(h),h)}return RegExp(c,f)},processGlobalFlag:function(c,d,f){function g(b,a){for(var c=0,d=b.length,f=-1,g=a;g<d&&f===-1;g++)switch(b.charAt(g)){case "\\":g++;
+break;case "(":c++;break;case ")":c--,c===0&&(f=g)}return f}var h="(?"+c+")",c="(?"+c+":";if(d.substring(0,h.length)===h)return f(d.substring(h.length));else if(d.substring(0,c.length)===c){h=g(d,0);if(h<d.length-1)throw Error("Only a "+c+") group that encloses the entire regex is supported in: "+d);return f(d.substring(c.length,h))}return d},hasBackReference:function(c){return/\\\d+/.test(c.source)},getSubstitutedRegex:function(c,d,f){for(var f=typeof f==="undefined"?!0:!1,c=c.source.split(/(\\\d+)/g),
+g=[],h=0;h<c.length;h++){var b=c[h],a=/\\(\d+)/.exec(b);a?(b=d[a[1]]||"",g.push(f?k.escape(b):b)):g.push(b)}return RegExp(g.join(""))},groupify:function(c,d){for(var f=c.source,g=f.length,h=[],b=0,a=[],e=1,i=1,k=[],m={},r={},p=0;p<g;p++){var n=h[h.length-1],v=f.charAt(p);switch(v){case "(":if(n===4)h.pop(),k.push(")"),a[a.length-1].end=p;var s=p+2<g?f.charAt(p+1)+""+f.charAt(p+2):null;if(s==="?:"||s==="?="||s==="?!"){var u;s==="?:"?u=1:(u=3,b++);h.push(u);a.push({start:p,end:-1,type:u});k.push(v);
+k.push(s);p+=s.length}else h.push(2),a.push({start:p,end:-1,type:2,oldNum:e,num:i}),k.push(v),b===0&&(r[i]=null),m[e]=i,e++,i++;break;case ")":n=h.pop();n===3&&b--;a[a.length-1].end=p;k.push(v);break;case "*":case "+":case "?":case "}":var j=v,w=f.charAt(p-1),s=p-1;if(v==="}"){for(u=p-1;f.charAt(u)!=="{"&&u>=0;u--);w=f.charAt(u-1);s=u-1;j=f.substring(u,p+1)}u=a[a.length-1];if(w===")"&&(u.type===2||u.type===4)){k.splice(u.start,0,"(");k.push(j);k.push(")");v={start:u.start,end:k.length-1,type:4,num:u.num};
+for(w=0;w<a.length;w++)if(n=a[w],(n.type===2||n.type===4)&&n.start>=u.start&&n.end<=s)if(n.start+=1,n.end+=1,n.num+=1,n.type===2)m[n.oldNum]=n.num;a.push(v);i++;break}default:v!=="|"&&n!==2&&n!==4&&b===0&&(h.push(4),a.push({start:p,end:-1,type:4,num:i}),k.push("("),r[i]=null,i++),k.push(v),v==="\\"&&(v=f.charAt(p+1),k.push(v),p+=1)}}for(;h.length;)h.pop(),k.push(")");var f=RegExp(k.join("")),g={},d=d||m,x;for(x in d)d.hasOwnProperty(x)&&(g[x]="\\"+d[x]);f=this.getSubstitutedRegex(f,g,!1);return[f,
+m,r]},complexCaptures:function(c){if(!c)return!1;for(var d in c)if(c.hasOwnProperty(d)&&d!=="0")return!0;return!1}};n.prototype={initialize:function(c){this.textView=c;this.textView.stylerOptions=this;var d=this;this._listener={onModelChanged:function(c){d.onModelChanged(c)},onDestroy:function(c){d.onDestroy(c)},onLineStyle:function(c){d.onLineStyle(c)},onStorage:function(c){d.onStorage(c)}};c.addEventListener("ModelChanged",this._listener.onModelChanged);c.addEventListener("Destroy",this._listener.onDestroy);
+c.addEventListener("LineStyle",this._listener.onLineStyle);c.redrawLines()},onDestroy:function(){this.destroy()},destroy:function(){if(this.textView)this.textView.removeEventListener("ModelChanged",this._listener.onModelChanged),this.textView.removeEventListener("Destroy",this._listener.onDestroy),this.textView.removeEventListener("LineStyle",this._listener.onLineStyle),this.textView=null;this._listener=this._tree=this._styles=this.grammar=null},preprocess:function(c){for(c=[c];c.length!==0;){var d=
+c.pop();if(!d._resolvedRule||!d._typedRule)if(d._resolvedRule=this._resolve(d),d._typedRule=this._createTypedRule(d),this.addStyles(d.name),this.addStyles(d.contentName),this.addStylesForCaptures(d.captures),this.addStylesForCaptures(d.beginCaptures),this.addStylesForCaptures(d.endCaptures),d._resolvedRule!==d&&c.push(d._resolvedRule),d.patterns)for(var f=0;f<d.patterns.length;f++)c.push(d.patterns[f])}},addStyles:function(c){if(c&&!this._styles[c]){this._styles[c]=[];for(var d=c.split("."),f=0;f<
+d.length;f++)this._styles[c].push(d.slice(0,f+1).join("-"))}},addStylesForCaptures:function(c){for(var d in c)c.hasOwnProperty(d)&&this.addStyles(c[d].name)},ContainerRule:function(){function c(c){this.rule=c;this.subrules=c.patterns}c.prototype.valueOf=function(){return"aa"};return c}(),BeginEndRule:function(){function c(c){this.rule=c;this.beginRegex=i.toRegExp(c.begin);this.endRegex=i.toRegExp(c.end);this.subrules=c.patterns||[];this.endRegexHasBackRef=i.hasBackReference(this.endRegex);var f=i.complexCaptures(c.captures),
+c=i.complexCaptures(c.beginCaptures)||i.complexCaptures(c.endCaptures);if(this.isComplex=f||c)f=i.groupify(this.beginRegex),this.beginRegex=f[0],this.beginOld2New=f[1],this.beginConsuming=f[2],f=i.groupify(this.endRegex,this.beginOld2New),this.endRegex=f[0],this.endOld2New=f[1],this.endConsuming=f[2]}c.prototype.valueOf=function(){return this.beginRegex};return c}(),MatchRule:function(){function c(c){this.rule=c;this.matchRegex=i.toRegExp(c.match);if(this.isComplex=i.complexCaptures(c.captures))c=
+i.groupify(this.matchRegex),this.matchRegex=c[0],this.matchOld2New=c[1],this.matchConsuming=c[2]}c.prototype.valueOf=function(){return this.matchRegex};return c}(),_createTypedRule:function(c){return c.match?new this.MatchRule(c):c.begin?new this.BeginEndRule(c):new this.ContainerRule(c)},_resolve:function(c){var d=c;if(c.include){if(c.begin||c.end||c.match)throw Error('Unexpected regex pattern in "include" rule '+c.include);c=c.include;if(c.charAt(0)==="#"){if(d=this.grammar.repository&&this.grammar.repository[c.substring(1)],
+!d)throw Error("Couldn't find included rule "+c+" in grammar repository");}else if(c==="$self")d=this.grammar;else if(c==="$base")throw Error('Include "$base" is not supported');else if(d=this._allGrammars[c],!d)for(var f=0;f<this.externalGrammars.length;f++){var g=this.externalGrammars[f];if(g.scopeName===c){this.preprocess(g);d=this._allGrammars[c]=g;break}}}return d},ContainerNode:function(){function c(c,f){this.parent=c;this.rule=f;this.children=[];this.end=this.start=null}c.prototype.addChild=
+function(c){this.children.push(c)};c.prototype.valueOf=function(){var c=this.rule;return"ContainerNode { "+(c.include||"")+" "+(c.name||"")+(c.comment||"")+"}"};return c}(),BeginEndNode:function(){function c(c,f,g){this.parent=c;this.rule=f;this.children=[];this.setStart(g);this.endMatch=this.end=null;this.endRegexSubstituted=f.endRegexHasBackRef?i.getSubstitutedRegex(f.endRegex,g):null}c.prototype.addChild=function(c){this.children.push(c)};c.prototype.getIndexInParent=function(){return this.parent?
+this.parent.children.indexOf(this):-1};c.prototype.setStart=function(c){this.start=c.index;this.beginMatch=c};c.prototype.setEnd=function(c){c&&typeof c==="object"?(this.endMatch=c,this.end=c.index+c[0].length):(this.endMatch=null,this.end=c)};c.prototype.shiftStart=function(c){this.start+=c;this.beginMatch.index+=c};c.prototype.shiftEnd=function(c){this.end+=c;this.endMatch&&(this.endMatch.index+=c)};c.prototype.valueOf=function(){return"{"+this.rule.beginRegex+" range="+this.start+".."+this.end+
+"}"};return c}(),push:function(c,d){if(d)for(var f=d.length;f>0;)c.push(d[--f])},exec:function(c,d,f){(d=c.exec(d))&&(d.index+=f);c.lastIndex=0;return d},afterMatch:function(c){return c.index+c[0].length},getEndMatch:function(c,d,f){if(c instanceof this.BeginEndNode){var g=c.rule,c=c.endRegexSubstituted||g.endRegex;return!c?null:this.exec(c,d,f)}return null},initialParse:function(){this.textView.getModel().getCharCount();this._tree=new this.ContainerNode(null,this.grammar._typedRule);this.parse(this._tree,
+!1,0)},onModelChanged:function(c){var d=c.addedCharCount,f=c.removedCharCount,c=c.start;if(this._tree){var g=this.textView.getModel(),h=g.getCharCount(),g=g.getLineEnd(g.getLineAtOffset(c)-1),b=this.getFirstDamaged(g,g),g=g===-1?0:g,d=b?this.parse(b,!0,g,c,d,f):h;this.textView.redrawRange(g,d)}else this.initialParse()},getFirstDamaged:function(c,d){if(c<0)return this._tree;for(var f=[this._tree],g=null;f.length;){var h=f.pop();if(!h.parent||this.isDamaged(h,c,d)){h instanceof this.BeginEndNode&&(g=
+h);for(var b=0;b<h.children.length;b++)f.push(h.children[b])}}return g||this._tree},isDamaged:function(c,d,f){return c.start<=f&&c.end>d},parse:function(c,d,f,g,h,b){var a=this.textView.getModel(),e=a.getLineStart(a.getLineCount()-1),i=a.getCharCount(),k=this.getInitialExpected(c,f),m=-1;if(d)c.repaired=!0,c.endNeedsUpdate=!0,m=(m=c.children[c.children.length-1])?a.getLineEnd(a.getLineAtOffset(m.end+(h-b))):-1,g=a.getLineEnd(a.getLineAtOffset(g+b)),m=Math.max(m,g);for(var m=m===-1?i:m,g=k,n=c,p=!1,
+t=f,v=-1;n&&(!d||t<m);){var s=this.getNextMatch(a,n,t);s||(t=t>=e?i:a.getLineStart(a.getLineAtOffset(t)+1));var u=s&&s.match,j=s&&s.rule,w=s&&s.isEnd;if(s&&s.isSub){if(t=this.afterMatch(u),j instanceof this.BeginEndRule)p=!0,d&&j===g.rule&&n===g.parent?(n=g,n.setStart(u),n.repaired=!0,n.endNeedsUpdate=!0,g=this.getNextExpected(g,"begin")):(d&&(this.prune(n,g),d=!1),u=new this.BeginEndNode(n,j,u),n.addChild(u),n=u)}else if(w||t===i){if(n instanceof this.BeginEndNode)u?(p=!0,v=Math.max(v,n.end),n.setEnd(u),
+t=this.afterMatch(u),d&&n===g&&n.parent===g.parent?(n.repaired=!0,delete n.endNeedsUpdate,g=this.getNextExpected(g,"end")):d&&(this.prune(n,g),d=!1)):(n.setEnd(i),delete n.endNeedsUpdate);n=n.parent}d&&t>=m&&!p&&(this.prune(c,k),d=!1)}this.removeUnrepairedChildren(c,d,f);this.cleanup(d,c,f,m,i,h,b);return d?Math.max(v,t):t},removeUnrepairedChildren:function(c,d,f){if(d){for(var d=c.children,g=-1,h=0;h<d.length;h++){var b=d[h];if(!b.repaired&&this.isDamaged(b,f,Number.MAX_VALUE)){g=h;break}}if(g!==
+-1)c.children.length=g}},cleanup:function(c,d,f,g,h,b,a){if(c){c=b-a;h=this.getIntersecting(g-c+1,h);d=this.getIntersecting(f,g);for(f=0;f<h.length;f++)g=h[f],!g.repaired&&g instanceof this.BeginEndNode&&(g.shiftEnd(c),g.shiftStart(c));for(f=0;f<d.length;f++)g=d[f],g.repaired&&g.endNeedsUpdate&&g.shiftEnd(c),delete g.endNeedsUpdate,delete g.repaired}else{d=this.getIntersecting(f,g);for(f=0;f<d.length;f++)delete d[f].repaired}},getNextMatch:function(c,d,f,g){var h=c.getLineAtOffset(f),h=c.getLineEnd(h),
+b=c.getText(f,h),a=[],e=[],c=[],h=[];for(this.push(a,d.rule.subrules);a.length;){var i=a.length?a.pop():null,i=i&&i._resolvedRule._typedRule;if(i instanceof this.ContainerRule&&e.indexOf(i)===-1)e.push(i),this.push(a,i.subrules);else if(!i||!g||i.matchRegex){var k=i&&this.exec(i.matchRegex||i.beginRegex,b,f);k&&(c.push(k),h.push(i))}}a=Number.MAX_VALUE;e=-1;for(i=0;i<c.length;i++)if(k=c[i],k.index<a)a=k.index,e=i;if(!g&&(f=this.getEndMatch(d,b,f)))if(g=d.rule.applyEndPatternLast,e===-1||f.index<a||
+!g&&f.index===a)return{isEnd:!0,rule:d.rule,match:f};return e===-1?null:{isSub:!0,rule:h[e],match:c[e]}},getInitialExpected:function(c,d){var f,g;if(c===this._tree)for(f=0;f<c.children.length;f++){if(g=c.children[f],g.start>=d)return g}else if(c instanceof this.BeginEndNode&&c.endMatch){var h=c.endMatch.index;for(f=0;f<c.children.length;f++)if(g=c.children[f],g.start>=d)break;if(g&&g.start<h)return g}return c},getNextExpected:function(c,d){if(d==="begin"){var f=c.children[0];return f?f:c}else if(d===
+"end"&&(f=c.parent)){var g=f.children[f.children.indexOf(c)+1];return g?g:f}return null},prune:function(c,d){if(d.parent===c)c.children.length=d.getIndexInParent();else if(c instanceof this.BeginEndNode)c.endMatch=null,c.end=null;if(c.parent)c.parent.children.length=c.getIndexInParent()+1},onLineStyle:function(c){this._tree||this.initialParse();var d=c.lineStart,f=this.textView.getModel(),g=f.getLineEnd(c.lineIndex),h=f.getLineEnd(f.getLineAtOffset(d)-1),h=this.getFirstDamaged(h,h),d=this.getLineScope(f,
+h,d,g);c.ranges=this.toStyleRanges(d);c.ranges.sort(function(b,a){return b.start-a.start})},getLineScope:function(c,d,f,g){for(var h=f,b=this.getInitialExpected(d,f),a=[],e=[];d&&h<g;){var i=this.getNextMatch(c,d,h);if(!i)break;var k=i&&i.match,m=i&&i.rule,n=i&&i.isSub,i=i&&i.isEnd;k.index!==h&&e.push({start:h,end:k.index,node:d});if(n)h=this.afterMatch(k),m instanceof this.BeginEndRule?(this.addBeginScope(a,k,m),d=b,b=this.getNextExpected(b,"begin")):this.addMatchScope(a,k,m);else if(i)h=this.afterMatch(k),
+this.addEndScope(a,k,m),b=this.getNextExpected(b,"end"),d=d.parent}h<g&&e.push({start:h,end:g,node:d});c=this.getInheritedLineScope(e,f,g);return a.concat(c)},getInheritedLineScope:function(c){for(var d=[],f=0;f<c.length;f++)for(var g=c[f],h=g.node;h;){var b=h.rule.rule,a=b.name;if(b=b.contentName||a){this.addScopeRange(d,g.start,g.end,b);break}h=h.parent}return d},addBeginScope:function(c,d,f){var g=f.rule;this.addCapturesScope(c,d,g.beginCaptures||g.captures,f.isComplex,f.beginOld2New,f.beginConsuming)},
+addEndScope:function(c,d,f){var g=f.rule;this.addCapturesScope(c,d,g.endCaptures||g.captures,f.isComplex,f.endOld2New,f.endConsuming)},addMatchScope:function(c,d,f){var g=f.rule,h=g.name;(g=g.captures)?this.addCapturesScope(c,d,g,f.isComplex,f.matchOld2New,f.matchConsuming):this.addScope(c,d,h)},addScope:function(c,d,f){f&&c.push({start:d.index,end:this.afterMatch(d),scope:f})},addScopeRange:function(c,d,f,g){g&&c.push({start:d,end:f,scope:g})},addCapturesScope:function(c,d,f,g,h,b){if(f)if(g){for(var g=
+{1:0},a=0,e=1;d[e]!==void 0;e++)b[e]!==void 0&&(a+=d[e].length),d[e+1]!==void 0&&(g[e+1]=a);b=d.index;for(a=1;f[a];a++){var e=f[a].name,i=h[a],k=b+g[i];typeof d[i]!=="undefined"&&this.addScopeRange(c,k,k+d[i].length,e)}}else this.addScope(c,d,f[0]&&f[0].name)},getIntersecting:function(c,d){for(var f=[],g=this._tree?[this._tree]:[];g.length;){var h=g.pop(),b=!1;h instanceof this.ContainerNode?b=!0:this.isDamaged(h,c,d)&&(b=!0,f.push(h));if(b)for(var b=h.children.length,a=0;a<b;a++)g.push(h.children[a])}return f.reverse()},
+toStyleRanges:function(c){for(var d=[],f=0;f<c.length;f++){var g=c[f],h=this._styles[g.scope];if(!h)throw Error("styles not found for "+g.scope);h=h.join(" ");d.push({start:g.start,end:g.end,style:{styleClass:h}})}return d}};return{RegexUtil:i,TextMateStyler:n}});
+define("orion/editor/htmlGrammar",[],function(){return{HtmlGrammar:function(){return{scopeName:"source.html",uuid:"3B5C76FB-EBB5-D930-F40C-047D082CE99B",patterns:[{begin:"<!(doctype|DOCTYPE)",end:">",contentName:"entity.name.tag.doctype.html",beginCaptures:{0:{name:"entity.name.tag.doctype.html"}},endCaptures:{0:{name:"entity.name.tag.doctype.html"}}},{begin:"<\!--",end:"--\>",beginCaptures:{0:{name:"punctuation.definition.comment.html"}},endCaptures:{0:{name:"punctuation.definition.comment.html"}},
+patterns:[{match:"--",name:"invalid.illegal.badcomment.html"}],contentName:"comment.block.html"},{match:"<[A-Za-z0-9_\\-:]+(?= ?)",name:"entity.name.tag.html"},{include:"#attrName"},{include:"#qString"},{include:"#qqString"},{include:"#entity"},{match:"</[A-Za-z0-9_\\-:]+>",name:"entity.name.tag.html"},{match:">",name:"entity.name.tag.html"}],repository:{attrName:{match:"[A-Za-z\\-:]+(?=\\s*=\\s*['\"])",name:"entity.other.attribute.name.html"},qqString:{match:'(")[^"]+(")',name:"string.quoted.double.html"},
+qString:{match:"(')[^']+(')",name:"string.quoted.single.html"},entity:{match:"&[A-Za-z0-9]+;",name:"constant.character.entity.html"}}}}}});
+define("orion/editor/textStyler",["orion/editor/annotations"],function(k){function m(a,b){this._unnamedCounter=0;this._patterns=[];this._rootId=b;a.forEach(function(a){this._addRepositoryPatterns(a.repository||{},a.id);this._addPatterns(a.patterns||[],a.id)}.bind(this))}function n(a,b,c,d,e){this.start=a.start;this.end=a.end;this.contentStart=a.contentStart;this.contentEnd=a.contentEnd;this.pattern=b;this._styler=c;this._parent=e;this._linePatterns=[];this._blockPatterns=[];this._enclosurePatterns=
+{};if(d)this._initPatterns(),this._subBlocks=t(d,d.getText(this.start,this.end),this,this.start)}function i(a){this._styler=a}function c(a,b,c,d){this.highlightCaretLine=this.whitespacesVisible=this.spacesVisible=this.tabsVisible=!1;this.detectTasks=this.foldingEnabled=!0;this.view=a;this.annotationModel=b;this.patternManager=new m(c,d);this._accessor=new i(this);this._bracketAnnotations=void 0;var e=this;this._listener={onChanged:function(a){e._onModelChanged(a)},onDestroy:function(a){e._onDestroy(a)},
+onLineStyle:function(a){e._onLineStyle(a)},onMouseDown:function(a){e._onMouseDown(a)},onSelection:function(a){e._onSelection(a)}};c=a.getModel();c.getBaseModel&&(c=c.getBaseModel());c.addEventListener("Changed",this._listener.onChanged);a.addEventListener("MouseDown",this._listener.onMouseDown);a.addEventListener("Selection",this._listener.onSelection);a.addEventListener("Destroy",this._listener.onDestroy);a.addEventListener("LineStyle",this._listener.onLineStyle);d=c.getCharCount();this._rootBlock=
+new n({start:0,contentStart:0,end:d,contentEnd:d},null,this,c);this._computeFolding(this._rootBlock.getBlocks());b&&this.detectTasks&&(d=[],v(this._rootBlock,c,d),b.replaceAnnotations([],d));a.redrawLines()}var d={styleClass:"meta annotation currentLine"},f=/$/,g=/\\(\d)/g,h=/(.*)(?:[\r\n]|$)/g,b={regex:/ /g,style:{styleClass:"punctuation separator space",unmergeable:!0}},a={regex:/\t/g,style:{styleClass:"punctuation separator tab",unmergeable:!0}},e=function(a,b,c,d){var e=c,f=a.lastIndex;h.lastIndex=
+c;var c=h.exec(b),g,i;a.lastIndex=0;if(c){for(i=c.index;0<=--i;)if(g=b.charAt(i),g==="\n"||g==="\r")break;g=b.substring(i+1,c.index+c[1].length);a.lastIndex=i=c.index-i-1}for(;c&&c.index<b.length;){var k;if(d){var l=a.lastIndex;if(a.test(g))a.lastIndex=l,k=a.exec(g)}else k=a.exec(g);if(k)return k.index+=e,k.index-=i,a.lastIndex=f,k;i=0;e+=c[0].length;if(c=h.exec(b))g=c[1],a.lastIndex=0}a.lastIndex=f;return null},l=function(a,b){var c=a.toString();g.lastIndex=0;if(!g.test(c))return a;g.lastIndex=0;
+for(var d=g.exec(c);d;)c=c.replace(d[0],b[d[1]]||""),g.lastIndex=0,d=g.exec(c);return RegExp(c.substring(1,c.length-2),"g")},o=function(a,b,c,d){if(b=e(a.pattern.regex?a.pattern.regex:a.pattern.regexBegin,b,d,!0)){a.result=b;for(d=0;d<c.length;d++)if(b.index<c[d].result.index||b.index===c[d].result.index&&a.pattern.pattern.index<c[d].pattern.pattern.index){c.splice(d,0,a);return}c.push(a)}},q=function(a,b,c,d){if(b[0])d.push({start:c,end:c+a[0].length,style:b[0].name});else for(var e=0,f=1;f<a.length;f++)if(a[f]){var g=
+b[f];if(g){var i=c+e;d.push({start:i,end:i+a[f].length,style:g.name})}e+=a[f].length}},r=function(a,b,c){var d=a.start;b.forEach(function(b){d<=b.start&&c.push({start:d,end:b.start,style:a.style});c.push(b);d=b.end});d<a.end&&c.push({start:d,end:a.end,style:a.style})},p=function(a,b,c,d,g){if(c=c.getLinePatterns()){var i=[];c.forEach(function(b){var c=b.regex||b.regexBegin;c.oldLastIndex=c.lastIndex;(c=e(c,a,0))&&i.push({result:c,pattern:b})});i.sort(function(a,b){return a.result.index<b.result.index?
+-1:a.result.index>b.result.index?1:a.pattern.pattern.index<b.pattern.pattern.index?-1:1});for(var h=0;i.length>0;){var k=i[0];i.splice(0,1);if(!(k.result.index<h)){var m=k.result.index,p,n=[];if(k.pattern.regex){h=k.result;p=m+h[0].length;p={start:b+m,end:b+p,style:k.pattern.pattern.name};if(!g){k.pattern.pattern.captures&&q(h,k.pattern.pattern.captures,b+m,n);n.sort(function(a,b){return a.start<b.start?-1:a.start>b.start?1:0});for(m=0;m<n.length-1;m++)if(n[m+1].start<n[m].end){var t={start:n[m+1].end,
+end:n[m].end,style:n[m].style};n[m].end=n[m+1].start;n.splice(m+2,0,t)}}r(p,n,d)}else{h=k.pattern.regexEnd;h=l(h,k.result);h=e(h,a,k.result.index+k.result[0].length);if(!h)f.lastIndex=0,h=f.exec(a);p=h.index+h[0].length;d.push({start:b+m,end:b+p,style:k.pattern.pattern.name})}h=h.index+h[0].length}o(k,a,i,h)}c.forEach(function(a){a=a.regex||a.regexBegin;a.lastIndex=a.oldLastIndex})}},t=function(a,b,c,d){var g=[];c.getBlockPatterns().forEach(function(a){var c=e(a.regexBegin||a.regex,b,0);c&&g.push({result:c,
+pattern:a})}.bind(this));if(!g.length)return g;g.sort(function(a,b){return a.result.index<b.result.index?-1:a.result.index>b.result.index?1:a.pattern.pattern.index<b.pattern.pattern.index?-1:1});for(var h=0,i=[];g.length>0;){var k=g[0];g.splice(0,1);if(!(k.result.index<h)){var m=a.getLineAtOffset(d+k.result.index),q=a.getLine(m),r=[];p(q,a.getLineStart(m),c,r);m=d+k.result.index;for(q=0;q<r.length;q++)if(r[q].start===m){var h=k.result.index,t=null,v=k.pattern.regexEnd;if(v){h+=k.result[0].length;
+for(var v=l(v,k.result),B=h;!t;){B=e(v,b,B);if(!B)f.lastIndex=0,B=f.exec(b);var E=[],G=new n({start:m,end:d+B.index+B[0].length,contentStart:d+h,contentEnd:d+B.index},k.pattern,c.getStyler(),a,c);p(b.substring(h,B.index+B[0].length),h,G,E);if(!E.length||E[E.length-1].end<=B.index)t=G;B=B.index+B[0].length}}else t=new n({start:m,end:m+k.result[0].length,contentStart:m,contentEnd:m+k.result[0].length},k.pattern,c.getStyler(),a,c);i.push(t);h=t.end-d;break}q===r.length&&(h=k.result.index+1)}o(k,b,g,
+h)}return i},v=function(a,b,c){if(a.getAnnotationModel()){var d=k.AnnotationType.ANNOTATION_TASK;if(a.getLinePatterns().length&&a.pattern&&a.pattern.pattern.name&&a.pattern.pattern.name.indexOf("comment")===0){var e=[];p(b.getText(a.contentStart,a.end),a.contentStart,a,e,!0);for(var f=0;f<e.length;f++)e[f].style==="meta.annotation.task.todo"&&c.push(k.AnnotationType.createAnnotation(d,e[f].start,e[f].end,b.getText(e[f].start,e[f].end)))}a.getBlocks().forEach(function(a){v(a,b,c)}.bind(this))}};m.prototype=
+{getPatterns:function(a){var b=[0],c={},d=RegExp("^"+(a?typeof a==="string"?a:a.qualifiedId:this._rootId)+"#[^#]+$"),e=[];this._patterns.forEach(function(a){if(d.test(a.qualifiedId))a.include?e.push(a):(a.index=b[0]++,c[a.id]=a)}.bind(this));e.forEach(function(a){this._processInclude(a,b,c)}.bind(this));var f=[];Object.keys(c).forEach(function(a){f.push(c[a])});return f},_addPatterns:function(a,b){a.forEach(function(a){this._addPattern(a,this._NO_ID+this._unnamedCounter++,b)}.bind(this))},_addRepositoryPatterns:function(a,
+b){Object.keys(a).forEach(function(c){this._addPattern(a[c],c,b)}.bind(this))},_addPattern:function(a,b,c){a.parentId=c;a.id=b;a.qualifiedId=a.parentId+"#"+a.id;this._patterns.push(a);a.patterns&&!a.include&&this._addPatterns(a.patterns,a.qualifiedId)},_processInclude:function(a,b,c){var d,e=a.include.indexOf("#");d=e===0?RegExp("^"+a.qualifiedId.substring(0,a.qualifiedId.indexOf("#"))+a.include+"$"):e===-1?RegExp("^"+a.include+"#"+this._NO_ID+"[^#]+$"):RegExp("^"+a.include+"$");var f=[];this._patterns.forEach(function(a){if(d.test(a.qualifiedId))if(a.include)f.push(a);
+else if(!c[a.id])a.index=b[0]++,c[a.id]=a}.bind(this));f.forEach(function(a){this._processInclude(a,b,c)}.bind(this))},_NO_ID:"NoID"};n.prototype={adjustEnd:function(a){this.end+=a;this.contentEnd+=a;this._subBlocks.forEach(function(b){b.adjustEnd(a)})},adjustStart:function(a){this.start+=a;this.contentStart+=a;this._subBlocks.forEach(function(b){b.adjustStart(a)})},computeStyle:function(a,b){if(!this.pattern||!(this.start<=b&&b<this.end))return null;var c={start:this.start,end:this.end,style:this.pattern.pattern.name};
+if(this.contentStart<=b&&b<this.contentEnd)return this.pattern.pattern.contentName?{start:this.contentStart,end:this.contentEnd,style:this.pattern.pattern.contentName}:c;var d,e,f,g;if(b<this.contentStart){e=this.pattern.pattern.beginCaptures||this.pattern.pattern.captures;if(!e)return c;d=this.pattern.regexBegin;f=a.getText(this.start,this.contentStart);g=this.start}else{e=this.pattern.pattern.endCaptures||this.pattern.pattern.captures;if(!e)return c;d=this.pattern.regexEnd;f=a.getText(this.contentEnd,
+this.end);g=this.contentEnd}d.lastIndex=0;if(f=d.exec(f)){d=[];q(f,e,g,d);for(e=0;e<d.length;e++)if(d[e].start<=b&&b<d[e].end)return d[e]}return c},getAnnotationModel:function(){return this._styler._getAnnotationModel()},getBlockPatterns:function(){return this._blockPatterns},getBlocks:function(){return this._subBlocks},getEnclosurePatterns:function(){return this._enclosurePatterns},getLinePatterns:function(){return this._linePatterns},getParent:function(){return this._parent},getPatternManager:function(){return this._styler._getPatternManager()},
+getStyler:function(){return this._styler},isRenderingWhitespace:function(){return this._styler._isRenderingWhitespace()},_initPatterns:function(){var a=function(a){var b=/^\(\?i\)\s*/.exec(a);b&&(a=a.substring(b[0].length));return a};this.getPatternManager().getPatterns(this.pattern?this.pattern.pattern:null).forEach(function(b){var c;if(b.match&&!b.begin&&!b.end){c="g";var d=a(b.match);d!==b.match&&(c+="i");c={regex:RegExp(d,c),pattern:b};this._linePatterns.push(c);if(b.patterns)this._blockPatterns.push(c);
+else if(b.name&&b.name.indexOf("punctuation.section")===0&&(b.name.indexOf(".begin")!==-1||b.name.indexOf(".end")!==-1))this._enclosurePatterns[b.name]=c}else if(!b.match&&b.begin&&b.end){c="g";d=a(b.begin);d!==b.begin&&(c+="i");var e="g",f=a(b.end);f!==b.end&&(e+="i");c={regexBegin:RegExp(d,c),regexEnd:RegExp(f,e),pattern:b};this._linePatterns.push(c);this._blockPatterns.push(c)}}.bind(this))}};i.prototype={getStyles:function(a){return this._styler.getStyles(a)}};c.prototype={destroy:function(){var a=
+this.view;if(a){var b=a.getModel();b.getBaseModel&&(b=b.getBaseModel());b.removeEventListener("Changed",this._listener.onChanged);a.removeEventListener("MouseDown",this._listener.onMouseDown);a.removeEventListener("Selection",this._listener.onSelection);a.removeEventListener("Destroy",this._listener.onDestroy);a.removeEventListener("LineStyle",this._listener.onLineStyle);this.view=null}},getStyleAccessor:function(){return this._accessor},getStyles:function(a){var b=[],c=this.view.getModel();c.getBaseModel&&
+(c=c.getBaseModel());var d=this._findBlock(this._rootBlock,a),e=c.getLineAtOffset(a),f=c.getLine(e),g=[];p(f,c.getLineStart(e),d,g);for(e=0;e<g.length;e++){if(a<g[e].start)break;if(g[e].start<=a&&a<g[e].end){b.push(g[e]);break}}for(;d;)(g=d.computeStyle(c,a))&&b.splice(0,0,g),d=d.getParent();return b},setHighlightCaretLine:function(a){this.highlightCaretLine=a},setWhitespacesVisible:function(a,b){if(this.whitespacesVisible!==a)this.whitespacesVisible=a,b&&this.view.redraw()},setTabsVisible:function(a){if(this.tabsVisible!==
+a)this.tabsVisible=a,this.setWhitespacesVisible(this.tabsVisible||this.spacesVisible,!1),this.view.redraw()},setSpacesVisible:function(a){if(this.spacesVisible!==a)this.spacesVisible=a,this.setWhitespacesVisible(this.tabsVisible||this.spacesVisible,!1),this.view.redraw()},setDetectHyperlinks:function(){},setFoldingEnabled:function(a){this.foldingEnabled=a},setDetectTasks:function(a){this.detectTasks=a},_binarySearch:function(a,b,c,d,e){var f;d===void 0&&(d=-1);if(e===void 0)e=a.length;for(;e-d>1;)if(f=
+Math.floor((e+d)/2),b<=a[f].start)e=f;else if(c&&b<a[f].end){e=f;break}else d=f;return e},_computeFolding:function(a){if(this.foldingEnabled){var b=this.view.getModel();if(b.getBaseModel){var c=this.annotationModel;if(c){c.removeAnnotations(k.AnnotationType.ANNOTATION_FOLDING);for(var d=[],e=b.getBaseModel(),f=0;f<a.length;f++){var g=a[f];(g=this._createFoldingAnnotation(b,e,g.start,g.end))&&d.push(g)}c.replaceAnnotations(null,d)}}}},_createFoldingAnnotation:function(a,b,c,d){var e=b.getLineAtOffset(c),
+b=b.getLineAtOffset(d);return e===b?null:new (k.AnnotationType.getType(k.AnnotationType.ANNOTATION_FOLDING))(c,d,a)},_findBlock:function(a,b){var c=a.getBlocks();if(!c.length)return a;var d=this._binarySearch(c,b,!0);return d<c.length&&c[d].start<=b&&b<c[d].end?this._findBlock(c[d],b):a},_findBrackets:function(a,b,c,d,e,f){for(var g=[],h=[],i=e,k=c.getBlocks(),l=this._binarySearch(k,e,!0);l<k.length;l++){if(k[l].start>=f)break;var m=k[l].start,n=k[l].end;i<m&&(p(d.substring(i-e,m-e),i,c,h),h.forEach(function(c){c.style.indexOf(a.pattern.name)===
+0?g.push(c.start+1):c.style.indexOf(b.pattern.name)===0&&g.push(-(c.start+1))}),h=[]);i=n}i<f&&(p(d.substring(i-e,f-e),i,c,h),h.forEach(function(c){c.style.indexOf(a.pattern.name)===0?g.push(c.start+1):c.style.indexOf(b.pattern.name)===0&&g.push(-(c.start+1))}));return g},_findMatchingBracket:function(a,b,c){for(var d=a.getLineAtOffset(c),f=a.getLineEnd(d),g=a.getText(c,f),h,i=b.getEnclosurePatterns(),k=Object.keys(i),l=0;l<k.length;l++){var m=i[k[l]],n=e(m.regex,g,0);if(n&&n.index===0){h=m;break}}if(!h)return-1;
+g=!1;h.pattern.name.indexOf(".begin")!==-1?(g=!0,l=h.pattern.name.replace(".begin",".end")):l=h.pattern.name.replace(".end",".begin");i=i[l];if(!i)return-1;k=a.getLine(d);m=a.getLineStart(d);f=this._findBrackets(h,i,b,k,m,f);for(l=0;l<f.length;l++)if(k=f[l]>=0?1:-1,f[l]*k-1===c){c=1;if(g){for(l++;l<f.length;l++)if(k=f[l]>=0?1:-1,c+=k,c===0)return f[l]*k-1;d+=1;for(l=a.getLineCount();d<l;){k=a.getLine(d);m=a.getLineStart(d);f=a.getLineEnd(d);f=this._findBrackets(h,i,b,k,m,f);for(g=0;g<f.length;g++)if(k=
+f[g]>=0?1:-1,c+=k,c===0)return f[g]*k-1;d++}}else{for(l--;l>=0;l--)if(k=f[l]>=0?1:-1,c+=k,c===0)return f[l]*k-1;for(d-=1;d>=0;){k=a.getLine(d);m=a.getLineStart(d);f=a.getLineEnd(d);f=this._findBrackets(h,i,b,k,m,f);for(l=f.length-1;l>=0;l--)if(k=f[l]>=0?1:-1,c+=k,c===0)return f[l]*k-1;d--}}break}return-1},_getAnnotationModel:function(){return this.annotationModel},_getLineStyle:function(a){if(this.highlightCaretLine){var b=this.view,c=b.getModel(),b=b.getSelection();if(b.start===b.end&&c.getLineAtOffset(b.start)===
+a)return d}return null},_getPatternManager:function(){return this.patternManager},_getStyles:function(a,b,c,d){b.getBaseModel&&(d=b.mapOffset(d));for(var f=d+c.length,g=[],h=d,i=a.getBlocks(),k=this._binarySearch(i,d,!0);k<i.length;k++){if(i[k].start>=f)break;var l=i[k].start,m=i[k].end;h<l&&p(c.substring(h-d,l-d),h,a,g);var n=Math.max(h,l);if(n===l&&i[k].pattern.regexBegin){var o=e(i[k].pattern.regexBegin,c.substring(n-d),0);if(o){var r=i[k].pattern.pattern.beginCaptures||i[k].pattern.pattern.captures;
+r?q(o,r,n,g):g.push({start:n,end:n+o[0].length,style:i[k].pattern.pattern.name});n+=o[0].length}}var l=Math.min(f,m),t=[];if(l===m&&i[k].pattern.regexEnd&&(h=c.substring(l-h-(i[k].end-i[k].contentEnd)),o=e(i[k].pattern.regexEnd,h,0)))(r=i[k].pattern.pattern.endCaptures||i[k].pattern.pattern.captures)?q(o,r,l-o[0].length,t):i[k].pattern.pattern.name&&t.push({start:l-o[0].length,end:l,style:i[k].pattern.pattern.name}),l-=o[0].length;var h=this._getStyles(i[k],b,c.substring(n-d,l-d),n),v=i[k].pattern.pattern.contentName||
+i[k].pattern.pattern.name;if(v){var H=n;h.forEach(function(a){a.start-H&&g.push({start:H,end:a.start,style:v});g.push(a);H=a.end});l-H&&g.push({start:H,end:l,style:v})}else g=g.concat(h);g=g.concat(t);h=m}h<f&&p(c.substring(h-d,f-d),h,a,g);if(b.getBaseModel)for(a=0;a<g.length;a++)c=g[a].end-g[a].start,g[a].start=b.mapOffset(g[a].start,!0),g[a].end=g[a].start+c;return g},_isRenderingWhitespace:function(){return this.whitespacesVisible&&(this.tabsVisible||this.spacesVisible)},_onDestroy:function(){this.destroy()},
+_onLineStyle:function(c){if(c.textView===this.view)c.style=this._getLineStyle(c.lineIndex);c.ranges=this._getStyles(this._rootBlock,c.textView.getModel(),c.lineText,c.lineStart);c.ranges.forEach(function(a){if(a.style)a.style={styleClass:a.style.replace(/\./g," ")}});this._isRenderingWhitespace()&&(this.spacesVisible&&this._spliceStyles(b,c.ranges,c.lineText,c.lineStart),this.tabsVisible&&this._spliceStyles(a,c.ranges,c.lineText,c.lineStart))},_onSelection:function(a){var b=a.oldValue,c=a.newValue,
+d=this.view,a=d.getModel(),e;if(this.highlightCaretLine){var f=a.getLineAtOffset(b.start);e=a.getLineAtOffset(c.start);var g=c.start===c.end,b=b.start===b.end;f===e&&b&&g||(b&&d.redrawLines(f,f+1),(f!==e||!b)&&g&&d.redrawLines(e,e+1))}if(this.annotationModel){var b=this._bracketAnnotations,h,i;if(c.start===c.end&&(i=d.getCaretOffset())>0)i-=1,a.getBaseModel&&(i=a.mapOffset(i),a=a.getBaseModel()),c=this._findBlock(this._rootBlock,i),a=this._findMatchingBracket(a,c,i),a!==-1&&(h=[k.AnnotationType.createAnnotation(k.AnnotationType.ANNOTATION_MATCHING_BRACKET,
+a,a+1),k.AnnotationType.createAnnotation(k.AnnotationType.ANNOTATION_CURRENT_BRACKET,i,i+1)]);this._bracketAnnotations=h;this.annotationModel.replaceAnnotations(b,h)}},_onMouseDown:function(a){if(a.clickCount===2){var b=this.view,c=b.getModel(),d=b.getOffsetAtLocation(a.x,a.y);if(d>0){var e=d-1,f=c;c.getBaseModel&&(e=c.mapOffset(e),f=c.getBaseModel());var g=this._findBlock(this._rootBlock,e),e=this._findMatchingBracket(f,g,e);e!==-1&&(a.preventDefault(),a=e,c.getBaseModel&&(a=c.mapOffset(a,!0)),d>
+a&&(d--,a++),b.setSelection(a,d))}}},_onModelChanged:function(a){var b=a.start,c=a.removedCharCount,a=a.addedCharCount-c,d=this.view,e=d.getModel(),f=e.getBaseModel?e.getBaseModel():e,c=b+c,g=f.getCharCount(),i=this._rootBlock.getBlocks(),h=i.length,l=f.getLineStart(f.getLineAtOffset(b)),m=this._binarySearch(i,l,!0),n=this._binarySearch(i,c,!1,m-1,h),o;m<h&&i[m].start<=l&&l<i[m].end?(o=i[m].start,o>b&&(o+=a)):o=m===h&&h>0&&g-a===i[h-1].end?i[h-1].start:l;var p;do n<h?(p=i[n].end,p>b&&(p+=a),n+=1):
+(n=h,p=g),l=f.getText(o,p),l=t(f,l,this._rootBlock,o);while(l.length&&i.length&&n<h&&l[l.length-1].pattern.pattern.id!==i[n-1].pattern.pattern.id);for(g=m;g<i.length;g++)h=i[g],h.start>b&&h.adjustStart(a),h.start>b&&h.adjustEnd(a);var q=n-m!==l.length;if(!q)for(g=0;g<l.length;g++){var h=i[m+g],r=l[g];if(h.start!==r.start||h.end!==r.end||h.type!==r.type){q=!0;break}}g=[m,n-m].concat(l);Array.prototype.splice.apply(i,g);q&&(g=o,h=p,e!==f&&(g=e.mapOffset(g,!0),h=e.mapOffset(h,!0)),d.redrawRange(g,h));
+if(this.annotationModel){d=[];i=[];m=[];o=this.annotationModel.getAnnotations(o,p);for(p=this.foldingEnabled&&f!==e;o.hasNext();)if(h=o.next(),p&&h.type===k.AnnotationType.ANNOTATION_FOLDING){m.push(h);for(g=0;g<l.length;g++)if(h.start===l[g].start&&h.end===l[g].end)break;g===l.length?(d.push(h),h.expand()):(g=h.start,n=h.end,g>b&&(g-=a),n>b&&(n-=a),g<=b&&b<n&&g<=c&&c<n&&(g=f.getLineAtOffset(h.start),n=f.getLineAtOffset(h.end),g!==n?h.expanded||h.expand():this.annotationModel.removeAnnotation(h)));
+for(g=0;g<l.length;g++){h=l[g];for(n=0;n<m.length;n++)if(m[n].start===h.start&&m[n].end===h.end)break;n===m.length&&(h=this._createFoldingAnnotation(e,f,h.start,h.end))&&i.push(h)}}else h.type===k.AnnotationType.ANNOTATION_TASK&&d.push(h);if(this.detectTasks)for(g=0;g<l.length;g++)v(l[g],f,i);this.annotationModel.replaceAnnotations(d,i)}},_spliceStyles:function(a,b,c,d){for(var e=a.regex,f=e.lastIndex=0,g=e.exec(c);g;){for(g=d+g.index;f<b.length;){if(g<b[f].end)break;f++}var h={start:g,end:g+1,style:a.style};
+if(f<b.length&&b[f].start<=g){var i={start:g+1,end:b[f].end,style:b[f].style};b[f].end=g;b.splice(f+1,0,i);b.splice(f+1,0,h);f+=2}else b.splice(f,0,h),f++;g=e.exec(c)}}};return{TextStyler:c}});
+define("orion/editor/stylers/text_x-php/syntax",["orion/editor/stylers/lib/syntax"],function(k){var m="abstract,and,array,as,break,callable,case,catch,class,clone,const,continue,declare,default,die,do,echo,else,elseif,empty,enddeclare,endfor,endforeach,endif,endswitch,endwhile,eval,exit,extends,false,FALSE,final,finally,for,foreach,function,global,goto,if,implements,include,include_once,insteadof,interface,instanceof,isset,list,namespace,new,null,NULL,or,parent,print,private,protected,public,require,require_once,return,self,static,switch,throw,trait,try,true,TRUE,unset,use,var,while,xor,yield,__halt_compiler,__CLASS__,__DIR__,__FILE__,__FUNCTION__,__LINE__,__METHOD__,__NAMESPACE__,__TRAIT__".split(","),k=
+k.grammars;k.push({id:"orion.php",contentTypes:["text/x-php"],patterns:[{include:"orion.lib#doc_block"},{include:"orion.c-like"},{match:"(?i)<\\?(?:=|php)?(?:\\s|$)",name:"entity.name.declaration.php"},{match:"<%=?(?:\\s|$)",name:"entity.name.declaration.php"},{match:"#.*",name:"comment.line.number-sign.php",patterns:[{include:"orion.lib#todo_comment_singleLine"}]},{begin:"<<<(\\w+)$",end:"^\\1;$",name:"string.unquoted.heredoc.php"},{begin:"<<<'(\\w+)'$",end:"^\\1;$",name:"string.unquoted.heredoc.nowdoc.php"},
+{match:"\\b0[bB][01]+\\b",name:"constant.numeric.binary.php"},{match:"\\b(?:"+m.join("|")+")\\b",name:"keyword.control.php"}]});return{id:"orion.php",grammars:k,keywords:m}});
+define("orion/editor/stylers/application_xml/syntax",["orion/editor/stylers/lib/syntax"],function(k){k=k.grammars;k.push({id:"orion.xml",contentTypes:["application/xml","application/xhtml+xml"],patterns:[{include:"#comment"},{include:"#xmlDeclaration"},{begin:"<!(?:doctype|DOCTYPE)",end:">",captures:{0:{name:"entity.name.tag.doctype.xml"}},patterns:[{include:"#comment"},{include:"orion.lib#string_doubleQuote"},{include:"orion.lib#string_singleQuote"}],name:"meta.tag.doctype.xml"},{begin:"</?[A-Za-z0-9]+",
+end:"/?>",captures:{0:{name:"entity.name.tag.xml"}},name:"meta.tag.xml",patterns:[{include:"#comment"},{include:"orion.lib#string_doubleQuote"},{include:"orion.lib#string_singleQuote"}]},{match:"<|>|&",name:"constant.character"}],repository:{comment:{begin:"<\!--",end:"--\>",name:"comment.block.xml",patterns:[{match:"(\\b)(TODO)(\\b)(((?!--\>).)*)",name:"meta.annotation.task.todo",captures:{2:{name:"keyword.other.documentation.task"},4:{name:"comment.line"}}}]},xmlDeclaration:{begin:"<\\?xml",
+end:"\\?>",captures:{0:{name:"entity.name.tag.declaration.xml"}},patterns:[{include:"#comment"},{include:"orion.lib#string_doubleQuote"},{include:"orion.lib#string_singleQuote"}],name:"meta.tag.declaration.xml"}}});return{id:k[k.length-1].id,grammars:k,keywords:[]}});
+define("orion/editor/stylers/text_html/syntax",["orion/editor/stylers/lib/syntax","orion/editor/stylers/application_javascript/syntax","orion/editor/stylers/text_css/syntax","orion/editor/stylers/text_x-php/syntax","orion/editor/stylers/application_xml/syntax"],function(k,m,n,i,c){k=k.grammars.concat(m.grammars).concat(n.grammars).concat(i.grammars).concat(c.grammars);k.push({id:"orion.html",contentTypes:["text/html"],patterns:[{include:"orion.xml"},{begin:"(?i)(<style)([^>]*)(>)",end:"(?i)(</style>)",
+captures:{1:{name:"entity.name.tag.html"},3:{name:"entity.name.tag.html"}},contentName:"source.css.embedded.html",patterns:[{include:"orion.css"}]},{begin:"(?i)<script\\s*>|<script\\s.*?(?:language\\s*=\\s*(['\"])javascript\\1|type\\s*=\\s*(['\"])(?:text|application)/(?:javascript|ecmascript)\\2).*?>",end:"(?i)<\/script>",captures:{0:{name:"entity.name.tag.html"}},contentName:"source.js.embedded.html",patterns:[{include:"orion.js"}]},{begin:"(?i)<script\\s.*?(?:language\\s*=\\s*(['\"])php\\1|type\\s*=\\s*(['\"])text/x-php\\2).*?>",
+end:"(?i)<\/script>",captures:{0:{name:"entity.name.tag.html"}},contentName:"source.php.embedded.html",patterns:[{include:"orion.php"}]},{begin:"(?i)<\\?(?:=|php)?(?:\\s|$)",end:"\\?>",captures:{0:{name:"entity.name.declaration.php"}},contentName:"source.php.embedded.html",patterns:[{include:"orion.php"}]},{begin:"<%=?(?:\\s|$)",end:"%>",captures:{0:{name:"entity.name.declaration.php"}},contentName:"source.php.embedded.html",patterns:[{include:"orion.php"}]}],repository:{xmlDeclaration:{}}});return{id:k[k.length-
+1].id,grammars:k,keywords:[]}});
+define("orion/editor/edit","require,orion/editor/shim,orion/editor/textView,orion/editor/textModel,orion/editor/textTheme,orion/editor/projectionTextModel,orion/editor/eventTarget,orion/keyBinding,orion/editor/rulers,orion/editor/annotations,orion/editor/tooltip,orion/editor/undoStack,orion/editor/textDND,orion/editor/editor,orion/editor/editorFeatures,orion/editor/contentAssist,orion/editor/cssContentAssist,orion/editor/htmlContentAssist,orion/editor/jsTemplateContentAssist,orion/editor/AsyncStyler,orion/editor/mirror,orion/editor/textMateStyler,orion/editor/htmlGrammar,orion/editor/textStyler,orion/editor/stylers/application_javascript/syntax,orion/editor/stylers/text_css/syntax,orion/editor/stylers/text_html/syntax".split(","),function(k,
+m,n,i,c,d,f,g,h,b,a,e,l,o,q,r,p,t,v,s,u,j,w,x,D,y,K){function O(a){var b=a.firstChild;if(b&&b.tagName==="TEXTAREA")return b.value;var c=a.ownerDocument,d=c.defaultView||c.parentWindow,e;if(!(e=!d.getSelection)){if(!(b=a.childNodes.length===1&&b.nodeType===Node.TEXT_NODE)){for(var f,b=a;b&&b!==c&&f!=="none";)f=d.getComputedStyle?d.getComputedStyle(b,null).getPropertyValue("display"):b.currentStyle.display,b=b.parentNode;b=f==="none"}e=b}if(e)return a.innerText||a.textContent;c=c.createRange();c.selectNode(a);
+a=d.getSelection();d=[];for(f=0;f<a.rangeCount;f++)d.push(a.getRangeAt(f));a.removeAllRanges();a.addRange(c);c=a.toString();a.removeAllRanges();for(f=0;f<d.length;f++)a.addRange(d[f]);return c}function P(a){if(a.substring(0,12)==="data-editor-")return a=a.substring(12),a=a.replace(/-([a-z])/ig,function(a,b){return b.toUpperCase()})}function M(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}function Q(a,b){var c={};M(c,b);for(var d,e=0,f=a.attributes,g=f.length;e<g;e++){d=f.item(e);var h=P(d.nodeName);
+if(h){d=d.nodeValue;if(d==="true"||d==="false")d=d==="true";c[h]=d}}return c}function R(a,b){if(a.getElementsByClassName)return a.getElementsByClassName(b);b=b.replace(/ *$/,"");return a.querySelectorAll?a.querySelectorAll((" "+b).replace(/ +/g,".")):null}function B(a){var b=a.document||document,e=a.parent;e||(e="editor");typeof e==="string"&&(e=b.getElementById(e));if(!e&&a.className&&(b=R(b,a.className))){a.className=void 0;if(b.length>1&&a.noFocus===void 0)a.noFocus=!0;for(var f=[],g=b.length-
+1;g>=0;g--)a.parent=b[g],f.push(B(a));return f}if(!e)throw"no parent";a=Q(e,a);if(typeof a.theme==="string"){var b=c.TextTheme.getTheme(a.theme),g=a.theme.lastIndexOf("/"),h=a.theme;g!==-1&&(h=h.substring(g+1));h.substring(h.length-4)===".css"&&(h=h.substring(0,h.length-4));b.setThemeClass(h,{href:a.theme});a.theme=b}var j;a.readonly||(f={createContentAssistMode:function(a){j=new r.ContentAssist(a.getTextView());a=new r.ContentAssistWidget(j);a=new r.ContentAssistMode(j,a);j.setMode(a);return a}});
+var l=new o.Editor({textViewFactory:function(){return new n.TextView({parent:e,model:new d.ProjectionTextModel(a.model?a.model:new i.TextModel("")),tabSize:a.tabSize?a.tabSize:4,readonly:a.readonly,fullSelection:a.fullSelection,tabMode:a.tabMode,expandTab:a.expandTab,singleMode:a.singleMode,themeClass:a.themeClass,theme:a.theme,wrapMode:a.wrapMode,wrappable:a.wrappable})},undoStackFactory:new q.UndoFactory,annotationFactory:new q.AnnotationFactory,lineNumberRulerFactory:new q.LineNumberRulerFactory,
+foldingRulerFactory:new q.FoldingRulerFactory,textDNDFactory:new q.TextDNDFactory,contentAssistFactory:f,keyBindingFactory:new q.KeyBindingsFactory,statusReporter:a.statusReporter,domNode:e});l.addEventListener("TextViewInstalled",function(){var b=l.getLineNumberRuler();b&&a.firstLineIndex!==void 0&&b.setFirstLine(a.firstLineIndex);if(b=l.getSourceCodeActions())b.setAutoPairParentheses(a.autoPairParentheses),b.setAutoPairBraces(a.autoPairBraces),b.setAutoPairSquareBrackets(a.autoPairSquareBrackets),
+b.setAutoPairAngleBrackets(a.autoPairAngleBrackets),b.setAutoPairQuotations(a.autoPairQuotations),b.setAutoCompleteComments(a.autoCompleteComments),b.setSmartIndentation(a.smartIndentation)});f=a.contents;f===void 0&&(f=O(e));f||(f="");l.installTextView();l.setLineNumberRulerVisible(a.showLinesRuler===void 0||a.showLinesRuler);l.setAnnotationRulerVisible(a.showAnnotationRuler===void 0||a.showFoldingRuler);l.setOverviewRulerVisible(a.showOverviewRuler===void 0||a.showOverviewRuler);l.setFoldingRulerVisible(a.showFoldingRuler===
+void 0||a.showFoldingRuler);l.setInput(a.title,null,f,!1,a.noFocus);({styler:null,highlight:function(b,c){this.styler&&this.styler.destroy&&this.styler.destroy();this.styler=null;b==="js"?b="application/javascript":b==="css"?b="text/css":b==="html"?b="text/html":b==="java"&&(b="text/x-java-source");var d=c.getTextView(),e=c.getAnnotationModel();b&&(b=b.replace(/[*|:/".<>?+]/g,"_"),k(["./stylers/"+b+"/syntax"],function(a){this.styler=new x.TextStyler(d,e,a.grammars,a.id)}));b==="text/css"&&c.setFoldingRulerVisible(a.showFoldingRuler===
+void 0||a.showFoldingRuler)}}).highlight(a.contentType||a.lang,l);if(j){var m=new p.CssContentAssistProvider,s=new t.HTMLContentAssistProvider,u=new v.JSTemplateContentAssistProvider;j.addEventListener("Activating",function(){/css$/.test(a.lang)?j.setProviders([m]):/js$/.test(a.lang)?j.setProviders([u]):/html$/.test(a.lang)&&j.setProviders([s])})}if(e.clientHeight<=50)f=l.getTextView().computeSize().height,e.style.height=f+"px";return l}var E=this.orion?this.orion.editor:void 0;if(E)for(var G=0;G<
+arguments.length;G++)M(E,arguments[G]);return B});var orion=this.orion||(this.orion={}),editor=orion.editor||(orion.editor={});editor.edit=require("orion/editor/edit");
\ No newline at end of file
diff --git a/dgbuilder/public/pw_maze_white.png b/dgbuilder/public/pw_maze_white.png
new file mode 100644
index 0000000..6646483
--- /dev/null
+++ b/dgbuilder/public/pw_maze_white.png
Binary files differ
diff --git a/dgbuilder/public/red/comms.js b/dgbuilder/public/red/comms.js
new file mode 100644
index 0000000..6491247
--- /dev/null
+++ b/dgbuilder/public/red/comms.js
@@ -0,0 +1,93 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+RED.comms = (function() {
+
+ var errornotification = null;
+ var subscriptions = {};
+ var ws;
+ function connectWS() {
+ var path = location.hostname+":"+location.port+document.location.pathname;
+ path = path+(path.slice(-1) == "/"?"":"/")+"comms";
+ path = "ws"+(document.location.protocol=="https:"?"s":"")+"://"+path;
+ ws = new WebSocket(path);
+ ws.onopen = function() {
+ if (errornotification) {
+ errornotification.close();
+ errornotification = null;
+ }
+ for (var t in subscriptions) {
+ if (subscriptions.hasOwnProperty(t)) {
+ ws.send(JSON.stringify({subscribe:t}));
+ }
+ }
+ }
+ ws.onmessage = function(event) {
+ var msg = JSON.parse(event.data);
+ if (msg.topic) {
+ for (var t in subscriptions) {
+ if (subscriptions.hasOwnProperty(t)) {
+ var re = new RegExp("^"+t.replace(/([\[\]\?\(\)\\\\$\^\*\.|])/g,"\\$1").replace(/\+/g,"[^/]+").replace(/\/#$/,"(\/.*)?")+"$");
+ if (re.test(msg.topic)) {
+ var subscribers = subscriptions[t];
+ if (subscribers) {
+ for (var i=0;i<subscribers.length;i++) {
+ subscribers[i](msg.topic,msg.data);
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ ws.onclose = function() {
+ if (errornotification == null) {
+ errornotification = RED.notify("<b>Error</b>: Lost connection to server","error",true);
+ }
+ setTimeout(connectWS,1000);
+ }
+ }
+
+ function subscribe(topic,callback) {
+ if (subscriptions[topic] == null) {
+ subscriptions[topic] = [];
+ }
+ subscriptions[topic].push(callback);
+ if (ws && ws.readyState == 1) {
+ ws.send(JSON.stringify({subscribe:topic}));
+ }
+ }
+
+ function unsubscribe(topic,callback) {
+ if (subscriptions.topic) {
+ for (var i=0;i<subscriptions.topic.length;i++) {
+ if (subscriptions.topic[i] === callback) {
+ subscriptions.topic.splice(i,1);
+ break;
+ }
+ }
+ if (subscriptions.topic.length === 0) {
+ delete subscriptions.topic;
+ }
+ }
+ }
+
+ return {
+ connect: connectWS,
+ subscribe: subscribe,
+ unsubscribe:unsubscribe
+ }
+})();
diff --git a/dgbuilder/public/red/history.js b/dgbuilder/public/red/history.js
new file mode 100644
index 0000000..3a6d551
--- /dev/null
+++ b/dgbuilder/public/red/history.js
@@ -0,0 +1,99 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+RED.history = (function() {
+ var undo_history = [];
+
+ return {
+ //TODO: this function is a placeholder until there is a 'save' event that can be listened to
+ markAllDirty: function() {
+ for (var i=0;i<undo_history.length;i++) {
+ undo_history[i].dirty = true;
+ }
+ },
+ depth: function() {
+ return undo_history.length;
+ },
+ push: function(ev) {
+ undo_history.push(ev);
+ },
+ pop: function() {
+ var ev = undo_history.pop();
+ var i;
+ if (ev) {
+ if (ev.t == 'add') {
+ if (ev.nodes) {
+ for (i=0;i<ev.nodes.length;i++) {
+ RED.nodes.remove(ev.nodes[i]);
+ }
+ }
+ if (ev.links) {
+ for (i=0;i<ev.links.length;i++) {
+ RED.nodes.removeLink(ev.links[i]);
+ }
+ }
+ if (ev.workspaces) {
+ for (i=0;i<ev.workspaces.length;i++) {
+ RED.nodes.removeWorkspace(ev.workspaces[i].id);
+ RED.view.removeWorkspace(ev.workspaces[i]);
+ }
+ }
+ } else if (ev.t == "delete") {
+ if (ev.workspaces) {
+ for (i=0;i<ev.workspaces.length;i++) {
+ RED.nodes.addWorkspace(ev.workspaces[i]);
+ RED.view.addWorkspace(ev.workspaces[i]);
+ }
+ }
+ if (ev.nodes) {
+ for (i=0;i<ev.nodes.length;i++) {
+ RED.nodes.add(ev.nodes[i]);
+ }
+ }
+ if (ev.links) {
+ for (i=0;i<ev.links.length;i++) {
+ RED.nodes.addLink(ev.links[i]);
+ }
+ }
+ } else if (ev.t == "move") {
+ for (i=0;i<ev.nodes.length;i++) {
+ var n = ev.nodes[i];
+ n.n.x = n.ox;
+ n.n.y = n.oy;
+ n.n.dirty = true;
+ }
+ } else if (ev.t == "edit") {
+ for (i in ev.changes) {
+ if (ev.changes.hasOwnProperty(i)) {
+ ev.node[i] = ev.changes[i];
+ }
+ }
+ RED.editor.updateNodeProperties(ev.node);
+ if (ev.links) {
+ for (i=0;i<ev.links.length;i++) {
+ RED.nodes.addLink(ev.links[i]);
+ }
+ }
+ RED.editor.validateNode(ev.node);
+ ev.node.dirty = true;
+ ev.node.changed = ev.changed;
+ }
+ RED.view.dirty(ev.dirty);
+ RED.view.redraw();
+ }
+ }
+ }
+
+})();
diff --git a/dgbuilder/public/red/main.js b/dgbuilder/public/red/main.js
new file mode 100644
index 0000000..77b5cdf
--- /dev/null
+++ b/dgbuilder/public/red/main.js
@@ -0,0 +1,1615 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+var RED = (function() {
+
+ function hideDropTarget() {
+ $("#dropTarget").hide();
+ RED.keyboard.remove(/* ESCAPE */ 27);
+ }
+
+ $('#chart').on("dragenter",function(event) {
+ if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) {
+ $("#dropTarget").css({display:'table'});
+ RED.keyboard.add(/* ESCAPE */ 27,hideDropTarget);
+ }
+ });
+
+ $('#dropTarget').on("dragover",function(event) {
+ if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) {
+ event.preventDefault();
+ }
+ })
+ .on("dragleave",function(event) {
+ hideDropTarget();
+ })
+ .on("drop",function(event) {
+ var data = event.originalEvent.dataTransfer.getData("text/plain");
+ hideDropTarget();
+ RED.view.importNodes(data);
+ event.preventDefault();
+ });
+
+
+ function save(force) {
+ if (RED.view.dirty()) {
+ //$("#debug-tab-clear").click(); // uncomment this to auto clear debug on deploy
+
+ if (!force) {
+ var invalid = false;
+ var unknownNodes = [];
+ RED.nodes.eachNode(function(node) {
+ invalid = invalid || !node.valid;
+ if (node.type === "unknown") {
+ if (unknownNodes.indexOf(node.name) == -1) {
+ unknownNodes.push(node.name);
+ }
+ invalid = true;
+ }
+ });
+ if (invalid) {
+ if (unknownNodes.length > 0) {
+ $( "#node-dialog-confirm-deploy-config" ).hide();
+ $( "#node-dialog-confirm-deploy-unknown" ).show();
+ var list = "<li>"+unknownNodes.join("</li><li>")+"</li>";
+ $( "#node-dialog-confirm-deploy-unknown-list" ).html(list);
+ } else {
+ $( "#node-dialog-confirm-deploy-config" ).show();
+ $( "#node-dialog-confirm-deploy-unknown" ).hide();
+ }
+ $( "#node-dialog-confirm-deploy" ).dialog( "open" );
+ return;
+ }
+ }
+ var nns = RED.nodes.createCompleteNodeSet();
+ /****************************************/
+ /*added new code to save the Tabs order */
+ /****************************************/
+ //console.log("nns before changes.");
+ //console.dir(nns);
+ var allTabsObj={};
+ var allTabsList=[];
+ var nnsTabIdsArr = [];
+ var guiTabIdsArr = [];
+ nns.forEach(function(n) {
+ if(n.type == 'tab'){
+ allTabsObj[n.id] = n;
+ allTabsList.push(n);
+ nnsTabIdsArr.push(n.id);
+ }
+ });
+ var idx =0;
+ $("#workspace-tabs li a").each(function(){
+ var href = $(this).prop("href");
+ var indexOfHash = href.indexOf("#");
+ var idVal = href.slice(indexOfHash+1);
+ guiTabIdsArr.push(idVal);
+ nns.splice(idx,1,allTabsObj[idVal]);;
+ idx++;
+ });
+ //console.log(nnsTabIdsArr.join(","));
+ //console.log(guiTabIdsArr.join(","));
+ //console.log("nns after changes.");
+ //console.dir(nns);
+ /****************************/
+ $("#btn-icn-deploy").removeClass('fa-download');
+ $("#btn-icn-deploy").addClass('spinner');
+ RED.view.dirty(false);
+
+ $.ajax({
+ url:"flows",
+ type: "POST",
+ data: JSON.stringify(nns),
+ contentType: "application/json; charset=utf-8"
+ }).done(function(data,textStatus,xhr) {
+ RED.notify("Successfully saved","success");
+ RED.nodes.eachNode(function(node) {
+ if (node.changed) {
+ node.dirty = true;
+ node.changed = false;
+ }
+ if(node.credentials) {
+ delete node.credentials;
+ }
+ });
+ RED.nodes.eachConfig(function (confNode) {
+ if (confNode.credentials) {
+ delete confNode.credentials;
+ }
+ });
+ // Once deployed, cannot undo back to a clean state
+ RED.history.markAllDirty();
+ RED.view.redraw();
+ }).fail(function(xhr,textStatus,err) {
+ RED.view.dirty(true);
+ if (xhr.responseText) {
+ RED.notify("<strong>Error</strong>: "+xhr.responseText,"error");
+ } else {
+ RED.notify("<strong>Error</strong>: no response from server","error");
+ }
+ }).always(function() {
+ $("#btn-icn-deploy").removeClass('spinner');
+ $("#btn-icn-deploy").addClass('fa-download');
+ });
+ }
+ }
+
+ $('#btn-deploy').click(function() { save(); });
+
+ $( "#node-dialog-confirm-deploy" ).dialog({
+ title: "Confirm deploy",
+ modal: true,
+ autoOpen: false,
+ width: 530,
+ height: 230,
+ buttons: [
+ {
+ text: "Confirm deploy",
+ click: function() {
+ save(true);
+ $( this ).dialog( "close" );
+ }
+ },
+ {
+ text: "Cancel",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ]
+ });
+
+ function loadSettings() {
+ $.get('settings', function(data) {
+ RED.settings = data;
+ console.log("Node-RED: "+data.version);
+ loadNodeList();
+ });
+ }
+
+ function loadNodeList() {
+ $.ajax({
+ headers: {
+ "Accept":"application/json"
+ },
+ cache: false,
+ url: 'nodes',
+ success: function(data) {
+ RED.nodes.setNodeList(data);
+ loadNodes();
+ }
+ });
+ }
+
+ function loadNodes() {
+ $.ajax({
+ headers: {
+ "Accept":"text/html"
+ },
+ cache: false,
+ url: 'nodes',
+ success: function(data) {
+ $("body").append(data);
+ $(".palette-spinner").hide();
+ $(".palette-scroll").show();
+ $("#palette-search").show();
+ loadFlows();
+ }
+ });
+ }
+
+ function loadFlows() {
+ $.ajax({
+ headers: {
+ "Accept":"application/json"
+ },
+ cache: false,
+ url: 'flows',
+ success: function(nodes) {
+ RED.nodes.import(nodes);
+ RED.view.dirty(false);
+ RED.view.redraw();
+ RED.comms.subscribe("status/#",function(topic,msg) {
+ var parts = topic.split("/");
+ var node = RED.nodes.node(parts[1]);
+ if (node) {
+ node.status = msg;
+ if (statusEnabled) {
+ node.dirty = true;
+ RED.view.redraw();
+ }
+ }
+ });
+ RED.comms.subscribe("node/#",function(topic,msg) {
+ var i,m;
+ var typeList;
+ var info;
+
+ if (topic == "node/added") {
+ var addedTypes = [];
+ for (i=0;i<msg.length;i++) {
+ m = msg[i];
+ var id = m.id;
+ RED.nodes.addNodeSet(m);
+ if (m.loaded) {
+ addedTypes = addedTypes.concat(m.types);
+ $.get('nodes/'+id, function(data) {
+ $("body").append(data);
+ });
+ }
+ }
+ if (addedTypes.length) {
+ typeList = "<ul><li>"+addedTypes.join("</li><li>")+"</li></ul>";
+ RED.notify("Node"+(addedTypes.length!=1 ? "s":"")+" added to palette:"+typeList,"success");
+ }
+ } else if (topic == "node/removed") {
+ for (i=0;i<msg.length;i++) {
+ m = msg[i];
+ info = RED.nodes.removeNodeSet(m.id);
+ if (info.added) {
+ typeList = "<ul><li>"+m.types.join("</li><li>")+"</li></ul>";
+ RED.notify("Node"+(m.types.length!=1 ? "s":"")+" removed from palette:"+typeList,"success");
+ }
+ }
+ } else if (topic == "node/enabled") {
+ if (msg.types) {
+ info = RED.nodes.getNodeSet(msg.id);
+ if (info.added) {
+ RED.nodes.enableNodeSet(msg.id);
+ typeList = "<ul><li>"+msg.types.join("</li><li>")+"</li></ul>";
+ RED.notify("Node"+(msg.types.length!=1 ? "s":"")+" enabled:"+typeList,"success");
+ } else {
+ $.get('nodes/'+msg.id, function(data) {
+ $("body").append(data);
+ typeList = "<ul><li>"+msg.types.join("</li><li>")+"</li></ul>";
+ RED.notify("Node"+(msg.types.length!=1 ? "s":"")+" added to palette:"+typeList,"success");
+ });
+ }
+ }
+ } else if (topic == "node/disabled") {
+ if (msg.types) {
+ RED.nodes.disableNodeSet(msg.id);
+ typeList = "<ul><li>"+msg.types.join("</li><li>")+"</li></ul>";
+ RED.notify("Node"+(msg.types.length!=1 ? "s":"")+" disabled:"+typeList,"success");
+ }
+ }
+ });
+ }
+ });
+ }
+
+ var statusEnabled = false;
+ function toggleStatus(state) {
+ statusEnabled = state;
+ RED.view.status(statusEnabled);
+ }
+
+ function performLoopDetection(state) {
+ loopDetectionEnabled = state;
+ console.log("loopDetectionEnabled:" + loopDetectionEnabled);
+ }
+
+ var dgNumberEnabled = false;
+ function toggleDgNumberDisplay(state) {
+ dgNumberEnabled = state;
+ RED.view.showNumbers(dgNumberEnabled);
+ }
+
+ var nodePaletteDisplay = false;
+ function toggleNodePaletteDisplay(state) {
+ nodePaletteDisplay = state;
+ RED.view.showNodePalette(nodePaletteDisplay);
+ }
+ function displayAllDGs(state) {
+ //defined showSLa() in dgstart.html
+ showSLA();
+ }
+
+
+ function showHelp() {
+
+ var dialog = $('#node-help');
+
+ //$("#node-help").draggable({
+ // handle: ".modal-header"
+ //});
+
+ dialog.on('show',function() {
+ RED.keyboard.disable();
+ });
+ dialog.on('hidden',function() {
+ RED.keyboard.enable();
+ });
+
+ dialog.modal();
+ }
+
+
+//Custom Functions Added here
+ function showCodeCloudFlows(){
+ codeCloudFlowFiles=[];
+ var divStyle="<style>#codecloud-data-container a { color: #067ab4; font-size: 0.75em;} #codecloud-data-container a:hover { text-decoration: underline; padding: -15px -15px -15px 15px; } .header { height: 40px; border-bottom: 1px solid #EEE; background-color: #ffffff; height: 40px; -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; } .footer { height: 40px; background-color: whiteSmoke; border-top: 1px solid #DDD; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }</style>";
+ $.get( "/getCodeCloudFlows")
+ .done(function( data ) {
+
+ var header="<div class='header'>List of DG Flows in Code Cloud</div><div><input id='flowFilterBoxId' type='text' onkeyup='filterFlows(this.value)'></div>";
+ var html= divStyle + header + "<div id='codecloud-data-container'>";
+ html+="<ul>";
+ if(data != null){
+ var files=data.files;
+ codeCloudFlowFiles=files;
+ //console.dir(files);
+ files.sort(function (a,b){
+ if(a > b){
+ return 1;
+ }else if(a < b){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ for(var i=0;files != null && i<files.length;i++){
+ html+="<li><a href=\"#\" onclick=\"getCommits('" + files[i] + "')\">" + files[i] + "</a></li>";
+ }
+ }
+ html+="</ul>";
+ html+="</div>";
+ $( "#codecloud-browser-dialog" ).dialog({
+ title: "Code Cloud DG Flow Browser",
+ modal: true,
+ autoOpen: true,
+ width: 830,
+ height: 630,
+ buttons: [
+ {
+ text: "Close",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ],
+ close: function(ev,ui){
+ $(this).dialog("destroy");
+ }
+ }).html(html);
+ $("#codecloud-browser-dialog").show();
+ })
+ .fail(function(err) {
+ RED.notify("Failed to get users.");
+ })
+ .always(function() {
+ });
+ }
+
+ /*
+ function listYangFiles(){
+ yangFilesList=[];
+ var divStyle="<style>#list-yang-data-container a { color: #067ab4; font-size: 0.75em;} #list-yang-data-container a:hover { text-decoration: underline; padding: -15px -15px -15px 15px; } .header { height: 40px; border-bottom: 1px solid #EEE; background-color: #ffffff; height: 40px; -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; } .footer { height: 40px; background-color: whiteSmoke; border-top: 1px solid #DDD; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }</style>";
+ $.get( "/getYangFiles")
+ .done(function( data ) {
+
+ var header="<div class='header'>List of Yang Files </div><div><input id='flowFilterBoxId' type='text' onkeyup='filterYangFiles(this.value)'></div>";
+ var html= divStyle + header + "<div id='list-yang-data-container'>";
+ html+="<ul>";
+ if(data != null){
+ var files=data.files;
+ yangFilesList=files;
+ //console.dir(files);
+ files.sort(function (a,b){
+ if(a > b){
+ return 1;
+ }else if(a < b){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ for(var i=0;files != null && i<files.length;i++){
+ html+="<li><a href=\"#\" onclick=\"getYangFile('" + files[i] + "')\">" + files[i] + "</a></li>";
+ }
+ }
+ html+="</ul>";
+ html+="</div>";
+ $( "#list-yang-browser-dialog" ).dialog({
+ title: "List Yang Files",
+ modal: true,
+ autoOpen: true,
+ width: 830,
+ height: 630,
+ buttons: [
+ {
+ text: "Close",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ],
+ close: function(ev,ui){
+ $(this).dialog("destroy");
+ }
+ }).html(html);
+ $("#list-yang-browser-dialog").show();
+ })
+ .fail(function(err) {
+ RED.notify("Failed to get yang files.");
+ })
+ .always(function() {
+ });
+ }
+ */
+
+ function listYangFiles(){
+ yangFilesList=[];
+
+ var divStyle="<style>#yang-files-data-container a { color: #067ab4; font-size: 0.75em;} #yang-files-data-container a:hover { text-decoration: underline; padding: -15px -15px -15px 15px; } .header { height: 40px; border-bottom: 1px solid #EEE; background-color: #ffffff; height: 40px; -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; } .footer { height: 40px; background-color: whiteSmoke; border-top: 1px solid #DDD; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; } table#yang-file-list-table { width:100%; } table#yang-file-list-table th,table#yang-file-list-table td { border: 1px solid black; border-collapse: collapse; } table#yang-file-list-table th,table#yang-file-list-table td { padding: 5px; text-align: left; } table#yang-file-list-table tr:nth-child(even) { background-color: #eee; } table#yang-file-list-table tr:nth-child(odd) { background-color:#fff; } table#yang-file-list-table th { background-color: #65a9d7; color: white; } table#yang-file-list-table a { color: #337ab7; } table#yang-file-list-table a:link { color: #65a9d7; } table#yang-file-list-table a:visited { color: #636; } table#yang-file-list-table a:hover { color: #3366CC; cursor: pointer } table#yang-file-list-table a:active { color: #65a9d7 }</style>";
+ $.get( "/getYangFiles")
+ .done(function( data ) {
+
+ var header="<div class='header'>List of Yang Files </div><div><input id='flowFilterBoxId' type='text' onkeyup='filterYangFiles(this.value)'></div>";
+ var html= divStyle + header + "<div id='yang-files-data-container'>";
+ html+="<table id='yang-file-list-table' border=1>";
+ html+="<tr>";
+ html+="<th>File</th>";
+ html+="<th>Delete</th>";
+ html+="</tr>";
+ if(data != null){
+ var files=data.files;
+ yangFilesList=files;
+ //console.dir(files);
+ files.sort(function (a,b){
+ if(a > b){
+ return 1;
+ }else if(a < b){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ for(var i=0;files != null && i<files.length;i++){
+ html+="<tr><td><a href=\"#\" onclick=\"getYangFile('" + files[i] + "')\">" + files[i] + "</a></td><td>" + "<input type='button' onclick='deleteYangFile(\"" + files[i] + "\")' value='Delete'></td></td></td></tr>";
+ }
+ }
+ html+="</table>";
+ html+="</div>";
+ $( "#list-yang-browser-dialog" ).dialog({
+ title: "List Yang Files",
+ modal: true,
+ autoOpen: true,
+ width: 830,
+ height: 630,
+ buttons: [
+ {
+ text: "Close",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ],
+ close: function(ev,ui){
+ $(this).dialog("destroy");
+ }
+ }).html(html);
+ $("#list-yang-browser-dialog").show();
+ })
+ .fail(function(err) {
+ RED.notify("Failed to get yang files.");
+ })
+ .always(function() {
+ });
+ }
+
+
+ function showGitPullDialog(){
+ $.get( "/getCurrentGitBranch")
+ .done(function( data ) {
+ if(data != null){
+ if(data.output == "GIT_LOCAL_REPOSITORY_NOT_SET" ){
+ RED.notify("Git Local Repository path is not set. Please set it by choosing Configuration from the menu.");
+ return;
+ }
+
+ var html= "<div id='gitcheckout-container'>";
+ html+="<table>";
+ html+="<tr>";
+ html+="<td>Branch</td>";
+ html+="<td>" + data.output + "</td>";
+ html+="</tr>";
+ html+="<tr>";
+ html+="<td><input id='gitPullBtnId' type='button' value='Pull' onclick='performGitPull()'></td>";
+ html+="<td> </td>"
+ html+="</tr>";
+ html+="<tr>";
+ //html+="<td colspan=3><textarea readonly='1' rows='5' cols='200' id='responseId'></textarea></td>";
+ html+="</tr>";
+ html+="</table>";
+ html+="<br><div id='responseId'></div>";
+ html+="</div>";
+ $( "#gitcommands-dialog" ).dialog({
+ title: "Git Pull",
+ modal: true,
+ autoOpen: true,
+ width: 630,
+ height: 500,
+ buttons: [
+ {
+ text: "Close",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ],
+ close: function(ev,ui){
+ $(this).dialog("destroy");
+ }
+ }).html(html);
+ $("#responseId").css({width:'550',height:'275px', border: '2px solid lightgrey',overflow:'scroll', padding: '20px' });
+ $("#responseId").hide();
+ $("#gitcommands-dialog").show();
+ }
+ })
+ .fail(function(err) {
+ RED.notify("Failed to get gitBranch.");
+ })
+ .always(function() {
+ });
+ }
+
+ function showGitStatusDialog(){
+ $.get( "/getCurrentGitBranch")
+ .done(function( data ) {
+ if(data != null){
+ if(data.output == "GIT_LOCAL_REPOSITORY_NOT_SET" ){
+ RED.notify("Git Local Repository path is not set. Please set it by choosing Configuration from the menu.");
+ return;
+ }
+
+ var html= "<div id='gitcheckout-container'>";
+ html+="<table>";
+ html+="<tr>";
+ html+="<td>Branch</td>";
+ html+="<td>" + data.output + "</td>";
+ html+="</tr>";
+ html+="<tr>";
+ html+="<td><input id='gitStatusBtnId' type='button' value='Status' onclick='performGitStatus()'></td>";
+ html+="<td> </td>"
+ html+="</tr>";
+ html+="<tr>";
+ //html+="<td colspan=3><textarea readonly='1' rows='5' cols='200' id='responseId'></textarea></td>";
+ html+="</tr>";
+ html+="</table>";
+ html+="<br><div id='responseId'></div>";
+ html+="</div>";
+ $( "#gitcommands-dialog" ).dialog({
+ title: "Git Status",
+ modal: true,
+ autoOpen: true,
+ width: 630,
+ height: 500,
+ buttons: [
+ {
+ text: "Close",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ],
+ close: function(ev,ui){
+ $(this).dialog("destroy");
+ }
+ }).html(html);
+ //$("#responseId").css({width:'600px',height:'100px','border-radius' : '25px', border: '2px solid lightgrey', padding: '20px' });
+ $("#responseId").css({width:'550px',height:'100px', border: '2px solid lightgrey',overflow:'scroll', padding: '20px' });
+ $("#responseId").hide();
+ $("#gitcommands-dialog").show();
+ }
+ })
+ .fail(function(err) {
+ RED.notify("Failed to get gitBranch.");
+ })
+ .always(function() {
+ });
+ }
+
+ function showGitCheckoutDialog(){
+ $.get( "/getCurrentGitBranch")
+ .done(function( data ) {
+ if(data != null){
+ if(data.output == "GIT_LOCAL_REPOSITORY_NOT_SET" ){
+ RED.notify("Git Local Repository path is not set. Please set it by choosing Configuration from the menu.");
+ return;
+ }
+
+ var html= "<div id='gitcheckout-container'>";
+ html+="<table>";
+ html+="<tr>";
+ html+="<td>Branch</td>";
+ html+="<td><input id='branchId' type='text' value='" + data.output + "'></td>";
+ html+="</tr>";
+ html+="<tr>";
+ html+="<td><input id='checkoutBtnId' type='button' value='Checkout' onclick='performGitCheckout()'></td>";
+ html+="<td> </td>"
+ html+="</tr>";
+ html+="<tr>";
+ //html+="<td colspan=3><textarea readonly='1' rows='5' cols='200' id='responseId'></textarea></td>";
+ html+="</tr>";
+ html+="</table>";
+ html+="<br><div id='responseId'></div>";
+ html+="</div>";
+ $( "#gitcommands-dialog" ).dialog({
+ title: "Git Checkout",
+ modal: true,
+ autoOpen: true,
+ width: 430,
+ height: 350,
+ buttons: [
+ {
+ text: "Close",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ],
+ close: function(ev,ui){
+ $(this).dialog("destroy");
+ }
+ }).html(html);
+ $("#responseId").css({width:'300',height:'100px', border: '2px solid lightgrey',overflow:'scroll', padding: '20px' });
+ $("#responseId").hide();
+ $("#gitcommands-dialog").show();
+ }
+ })
+ .fail(function(err) {
+ RED.notify("Failed to get gitBranch.");
+ })
+ .always(function() {
+ });
+ }
+
+ function showGitLocalFlows(){
+ giLocalFlowFiles=[];
+ var divStyle="<style>#gitlocal-data-container a { color: #067ab4; font-size: 0.75em;} #gitlocal-data-container a:hover { text-decoration: underline; padding: -15px -15px -15px 15px; } .header { height: 40px; border-bottom: 1px solid #EEE; background-color: #ffffff; height: 40px; -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; } .footer { height: 40px; background-color: whiteSmoke; border-top: 1px solid #DDD; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }</style>";
+ $.get( "/getGitLocalFlows")
+ .done(function( data ) {
+ if(data != null && data.files != null && data.files.length == 1){
+ if(data.files[0] == "GIT_LOCAL_REPOSITORY_NOT_SET" ){
+ RED.notify("Git Local Repository path is not set. Please set it by choosing Configuration from the menu.");
+ return;
+ }
+ }
+ //console.log("got response from server.");
+
+ var header="<div class='header'>List of DG Flows from Git Local Repository </div><div><input id='flowFilterBoxId' type='text' onkeyup='filterGitLocalFlows(this.value)'></div>";
+ var html= divStyle + header + "<div id='gitlocal-data-container'>";
+ html+="<ul>";
+ if(data != null){
+ var files=data.files;
+ gitLocalFlowFiles=files;
+ //console.dir(files);
+ files.sort(function (a,b){
+ if(a > b){
+ return 1;
+ }else if(a < b){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ for(var i=0;files != null && i<files.length;i++){
+ html+="<li><a href=\"#\" onclick=\"importGitLocalFlow('" + files[i] + "')\">" + files[i] + "</a></li>";
+ }
+ }
+ html+="</ul>";
+ html+="</div>";
+ $( "#gitlocal-browser-dialog" ).dialog({
+ title: "Git Local Repository DG Flow Browser",
+ modal: true,
+ autoOpen: true,
+ width: 830,
+ height: 630,
+ buttons: [
+ {
+ text: "Close",
+ click: function() {
+ $(this).dialog("close");
+ }
+ }
+ ]
+ }).html(html);
+ $("#gitlocal-browser-dialog").show();
+ /*
+ if ($("#gitlocal-browser-dialog").dialog( "isOpen" )===true) {
+ console.log("gitlocal dialog box is open");
+ //true
+ } else {
+ console.log("gitlocal dialog box is not open");
+ // $( "#gitlocal-browser-dialog" ).dialog("destroy").remove();
+ console.log($("#gitlocal-browser-dialog").dialog( "widget" ));
+ $("#gitlocal-browser-dialog").dialog( "open" );
+ if ($("#gitlocal-browser-dialog").dialog( "isOpen" )===true) {
+ console.log("gitlocal dialog box is now open");
+ }
+ $("#gitlocal-browser-dialog").show();
+ //false
+ }
+ */
+ })
+ .fail(function(err) {
+ RED.notify("Failed to get flows.");
+ })
+ .always(function() {
+ console.log("Done displaying");
+ });
+ }
+
+ function showFlowShareUsers(){
+ var divStyle="<style>#data-container a { color: #067ab4; font-size: 0.75em;} #data-container a:hover { text-decoration: underline; padding: -15px -15px -15px 15px; } .header { height: 40px; border-bottom: 1px solid #EEE; background-color: #ffffff; height: 40px; -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; } .footer { height: 40px; background-color: whiteSmoke; border-top: 1px solid #DDD; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }</style>";
+ $.get("/flowShareUsers")
+ .done(function (data){
+
+ var header="<div class='header'>List of Downloaded DG Flows</div>";
+ var html= divStyle + header + "<div id='data-container'>";
+ html+="<ul>";
+ if(data != null){
+ var users=data.flowShareUsers;
+ users.sort(function (a,b){
+ if(a.name > b.name){
+ return 1;
+ }else if(a.name < b.name){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ for(var i=0;users != null && i<users.length;i++){
+ html+="<li><a href=\"#\" onclick=\"showFlowFiles('" + users[i].rootDir + "')\">" + users[i].name + "</a></li>";
+ }
+ }
+ html+="</ul>";
+ html+="</div>";
+ $( "#dgflow-browser-dialog" ).dialog({
+ title: "Downloaded DG Flows Browser",
+ modal: true,
+ autoOpen: true,
+ width: 530,
+ height: 530,
+ buttons: [
+ {
+ text: "Close",
+ click: function() {
+ $( this ).dialog( "close" );
+ //$(this).dialog('destroy').remove();
+ }
+ }
+ ]
+ }).html(html);
+ $("#dgflow-browser-dialog").show();
+ /*
+ if ($("#dgflow-browser-dialog").dialog( "isOpen" )===true) {
+ console.log("dgflow dialog box is open");
+ //true
+ } else {
+ console.log("dgflow dialog box is not open");
+ $("#dgflow-browser-dialog").dialog( "open" );
+ $("#dgflow-browser-dialog").show();
+ //false
+ }
+ */
+ })
+ .fail(function(err) {
+ RED.notify("Failed to get users.");
+ })
+ .always(function() {
+ });
+ }
+
+/* function showFlowShareUsers(){
+ var divStyle="<style>#data-container a { color: #067ab4; font-size: 0.75em;} #data-container a:hover { text-decoration: underline; padding: -15px -15px -15px 15px; } .header { height: 40px; border-bottom: 1px solid #EEE; background-color: #ffffff; height: 40px; -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; } .footer { height: 40px; background-color: whiteSmoke; border-top: 1px solid #DDD; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }</style>";
+ $.get( "/flowShareUsers")
+ .done(function( data ) {
+
+ var header="<div class='header'>List of Downloaded DG Flows</div>";
+ var html= divStyle + header + "<div id='data-container'>";
+ html+="<ul>";
+ if(data != null){
+ var users=data.flowShareUsers;
+ users.sort(function (a,b){
+ if(a.name > b.name){
+ return 1;
+ }else if(a.name < b.name){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ for(var i=0;users != null && i<users.length;i++){
+ html+="<li><a href=\"#\" onclick=\"showFlowFiles('" + users[i].rootDir + "')\">" + users[i].name + "</a></li>";
+ }
+ }
+ html+="</ul>";
+ html+="</div>";
+ $( "#dgflow-browser-dialog" ).dialog({
+ title: "Downloaded DG Flows Browser",
+ modal: true,
+ autoOpen: true,
+ width: 530,
+ height: 530,
+ buttons: [
+ {
+ text: "Close",
+ click: function() {
+ //$( this ).dialog( "close" );
+ $(this).dialog('destroy').remove();
+ }
+ }
+ ]
+ }).html(html);
+ //$("#dgflow-browser-dialog").show();
+ $( "#dgflow-browser-dialog" ).dialog( "open" );
+ })
+ .fail(function(err) {
+ RED.notify("Failed to get users.");
+ })
+ .always(function() {
+ });
+ }
+ */
+
+
+function detectLoopInFlow(){
+ var errList = [];
+ var activeWorkspace=RED.view.getWorkspace();
+ var nSet=[];
+
+ RED.nodes.eachNode(function(n) {
+ if (n.z == activeWorkspace) {
+ nSet.push({n:n});
+ }
+ });
+
+ var nodeSet = RED.nodes.createExportableNodeSet(nSet);
+
+ var isLoopDetected = false;
+ var dgStartNode = getDgStartNode(nodeSet);
+ if(dgStartNode == null || dgStartNode == undefined) {
+ console.log("dgstart node not linked.");
+ return null;
+ }
+
+ var wires = dgStartNode.wires;
+ var nodesInPath = {};
+ var dgStartNodeId = dgStartNode.id;
+ if(wires != null && wires != undefined && wires[0] != undefined){
+ for(var k=0;k<wires[0].length;k++){
+ var val = wires[0][k];
+ nodesInPath[dgStartNodeId + "->" + val] = "";
+ }
+ }else{
+ nodesInPath[dgStartNodeId + "->" + ""] = "";
+ }
+
+ var loopDetectedObj = {};
+ /* the nodes will not be in order so will need to loop thru again */
+ for(var m=0;nodeSet != null && m<nodeSet.length;m++){
+ for(var i=0;nodeSet != null && i<nodeSet.length;i++){
+ var link=nodeSet[i].id;
+ //console.log("NAME:" + nodeSet[i].name + ":" + link);
+ if(link == dgStartNodeId) continue;
+ var wires = nodeSet[i].wires;
+ //console.log("link:" + link);
+ var delKeys = [];
+ if(wires != null && wires != undefined && wires[0] != undefined){
+ for(var k=0;k<wires[0].length;k++){
+ var val = (wires[0])[k];
+ var keys = Object.keys(nodesInPath);
+ //console.log("keys:" + keys);
+ for (var j=0;j<keys.length;j++){
+ //console.log("key:" + keys[j]);
+ //console.log("val:" + val);
+ var index = keys[j].indexOf("->" + link);
+ var lastIndex = keys[j].lastIndexOf("->");
+ if(index != -1 && index == lastIndex){
+ //delete nodesInPath[key];
+ var previousNodeId = keys[j].substr(lastIndex +2);
+ var indexOfArrow = -1;
+ if(previousNodeId != ""){
+ indexOfArrow = previousNodeId.indexOf("->");
+ }
+ if(previousNodeId != null && indexOfArrow != -1){
+ previousNodeId = previousNodeId.substr(0,indexOfArrow);
+ }
+ nodesInPath[keys[j] + "->" + val] = "";
+ //console.log("keys[j]:" + keys[j]);
+ delKeys.push(keys[j]);
+ var prevNodeIdIndex = keys[j].indexOf("->" + previousNodeId);
+ var priorOccurence = keys[j].indexOf(val + "->");
+ if(priorOccurence != -1 && priorOccurence<prevNodeIdIndex){
+ //console.log("previousNodeId:" + previousNodeId);
+ //console.log("val:" + val);
+ var n1 = getNode(nodeSet,previousNodeId);
+ var n2 = getNode(nodeSet,val);
+ //console.log("loop detected for node " + n1.name + " and " + n2.name);
+ loopDetectedObj[n1.name + "->" + n2.name] ="looped";
+ console.dir(loopDetectedObj);
+ errList.push("Loop detected between " + n1.name + " and " + n2.name);
+ isLoopDetected = true;
+ }
+ }
+ }
+ }
+ }
+ for(var l=0;delKeys != null && l<delKeys.length;l++){
+ delete nodesInPath[delKeys[l]];
+ }
+ }
+
+
+ }
+ /*
+ if(loopDetectedObj != null ){
+ var msg = "";
+ for(var key in loopDetectedObj){
+ if(loopDetectedObj.hasOwnProperty(key)) {
+ console.log("Loop detected " + key);
+ msg += "<strong>Loop detected for:" + key + "</strong><br>";
+ }
+ }
+ if(msg != ""){
+ isLoopDetected = true;
+ //RED.notify(msg);
+ }
+ }
+ */
+ //images/page-loading.gif
+ return errList;
+}
+
+function showLoopDetectionBox(){
+ $(function() {
+ var htmlStr="<div id='loop-box-div' style='width:375;height:225'><p>Loop detection in Progress ...</p><img src='images/page-loading.gif'></div>"
+ $("#loop-detection-dialog").dialog({
+ modal:true,
+ autoOpen :true,
+ title: "DG Flow Loop Detection",
+ width: 400,
+ height: 250,
+ minWidth : 400,
+ minHeight :200,
+ }).html(htmlStr);
+ if($("#loop-detection-dialog").dialog("isOpen") == true){
+ var errList = detectLoopInFlow();
+ var errList=[];
+ if(errList == null){
+ $("#loop-detection-dialog").dialog("close");
+ }
+ var msgHtml = "";
+ for(var i=0;errList != null && i<errList.length;i++){
+ msgHtml += "<p>" + errList[i] + "</p>";
+ }
+ if(msgHtml == ""){
+ $("loop-box-div").html("<p>SUCCESS. No Loop detected.</p>");
+ }else{
+ $("loop-box-div").html(msgHtml);
+ }
+ }
+ });
+
+}
+
+function showSelectedTabs(){
+ var tabSheets = [];
+ var beforeTabsOrder=[];
+ $(".red-ui-tabs li a").each(function(i){
+ var id=$(this).attr("href").replace('#','');
+ var title=$(this).attr("title");
+ var isVisible = $(this).parent().is(":visible");
+ if(title != 'info'){
+ tabSheets.push({"id" : id ,"title":title,"module":"NOT_SET","version" : "NOT_SET","rpc":"NOT_SET","isVisible":isVisible});
+ beforeTabsOrder.push(id);
+ }
+ });
+
+ RED.nodes.eachNode(function(n) {
+ if(n.type == 'service-logic'){
+ var id = n.z;
+ var module = n.module;
+ tabSheets.forEach(function(tab){
+ if(tab.id == id){
+ tab.module=module;
+ tab.version=n.version;
+ }
+ });
+ }else if(n.type == 'method'){
+ var id = n.z;
+ tabSheets.forEach(function(tab){
+ if(tab.id == id){
+ var rpc=getAttributeValue(n.xml,"rpc");
+ tab.rpc=rpc;
+ }
+ });
+ }
+ });
+ //console.dir(tabSheets);
+ var htmlStr = getHtmlStr(tabSheets);
+ $("#filter-tabs-dialog").dialog({
+ modal:true,
+ title: "DG Builder Tabs",
+ width: 1200,
+ height: 750,
+ minWidth : 600,
+ minHeight :450,
+ }).html(htmlStr);
+/* This code allows for the drag-drop of the rows in the table */
+ var fixHelperModified = function(e, tr) {
+ var $originals = tr.children();
+ var $helper = tr.clone();
+ $helper.children().each(function(index) {
+ $(this).width($originals.eq(index).width())
+ });
+ return $helper;
+ },
+ updateIndex = function(e, ui) {
+ var afterTabsOrder=[];
+ $('td.index', ui.item.parent()).each(function (i) {
+ $(this).html(i + 1);
+ });
+ //RE-ARRANGE the tabs
+ var ul = $("#workspace-tabs");
+ $("#ftab02 tr td:nth-child(1)").each(function(i){
+ var idStr = $(this).prop("id").replace("tab-td_","");
+ afterTabsOrder.push(idStr);
+ link = ul.find("a[href='#"+ idStr+"']");
+ li = link.parent();
+ //li.remove();
+ firstTab = $("#workspace-tabs li:first-child");
+ lastTab = $("#workspace-tabs li:last-child");
+ li.insertAfter(lastTab);
+ //console.log( idStr);
+ });
+ var beforeTabsStr = beforeTabsOrder.join(",");
+ var afterTabsStr = afterTabsOrder.join(",");
+ //console.log("beforeTabsStr:" +beforeTabsStr);
+ //console.log("afterTabsStr:" +afterTabsStr);
+ if(beforeTabsStr !== afterTabsStr){
+ //activate only when order has changed
+ //activate the deploy button
+ RED.view.dirty(true);
+ $("#btn-deploy").removeClass("disabled");
+ }
+ };
+
+ $("#ftab02 tbody").sortable({
+ helper: fixHelperModified,
+ stop: updateIndex
+ }).disableSelection();
+
+}
+
+function getHtmlStr(rows){
+ var styleStr = "<style> " +
+ "table#ftab02 { width:100%; } \n" +
+ "table#ftab02 th,table#ftab02 td { border: 1px solid black; border-collapse: collapse; } \n" +
+ /*"table, th, td { border: 1px solid #65a9d7; border-collapse: collapse; } \n" +*/
+ "table#ftab02 th,table#ftab02 td { padding: 5px; text-align: left; } \n" +
+ "table#ftab02 tr:nth-child(even) { background-color: #eee; }\n" +
+ "table#ftab02 tr:nth-child(odd) { background-color:#fff; }\n" +
+ "table#ftab02 th { background-color: #65a9d7; color: white; }\n" +
+ "table#ftab02 a { color: #337ab7; }\n" +
+ "table#ftab02 a:link { color: #65a9d7; }\n" +
+ "table#ftab02 a:visited { color: #636; }\n" +
+ "table#ftab02 a:hover { color: #3366CC; cursor: pointer }\n" +
+ "table#ftab02 a:active { color: #65a9d7 }\n" +
+ "</style>";
+ if(rows != null && rows != undefined){
+ //var alertDialog = '<div id="confdialog"></div>';
+ //htmlStr= alertDialog + "<div style='width:1050;height:650'>" + styleStr;
+ var alertDialog = '<div id="tabAlertDialog"></div>';
+ htmlStr= alertDialog + "<div id='tabs-div' style='width:1050;height:650'>" + styleStr;
+ htmlStr += "<table id='ftab02' >";
+ htmlStr += "<tr>";
+ htmlStr += "<th class='index'>No.</th>" ;
+ htmlStr += "<th>Tab Title</th>" ;
+ htmlStr += "<th>Module</th>" ;
+ htmlStr += "<th>RPC</th>" ;
+ htmlStr += "<th>Version</th>" ;
+ htmlStr += "<th>Rename</th>" ;
+ htmlStr += "<th>Delete</th>" ;
+ htmlStr += "</tr>";
+ htmlStr += "<tbody>";
+ if(rows != null && rows.length == 0){
+ htmlStr += "<tr>";
+ htmlStr += "<td><b>No rows found</b></td>";
+ htmlStr += "</tr></table></div>";
+ return htmlStr;
+ }
+ for(var i=0;i<rows.length;i++){
+ var row = rows[i];
+ var title = row.title;
+ var _module = row.module;
+ var version = row.version;
+ var rpc = row.rpc;
+ var idVal = row.id;
+ var isVisible = row.isVisible;
+ htmlStr += "<tr id='tab-tr_" + idVal + "'>";
+ //htmlStr += "<td id=" + "'tab-td_" + idVal + "' ><a href='javascript:activateClickedTab(\"" + idVal + "\")'>" + (i+1) + "</a></td>";
+ htmlStr += "<td class='index' id=" + "'tab-td_" + idVal + "' >" + (i+1) + "</td>";
+ htmlStr += "<td><a href='javascript:activateClickedTab(\"" + idVal + "\")'>" + title + "</a></td>";
+ htmlStr += "<td>" + _module + "</td>";
+ htmlStr += "<td>" + rpc + "</td>";
+ htmlStr += "<td>" + version + "</td>";
+ //htmlStr += "<td><a href='javascript:deleteOrRenameTab(\"" + idVal + "\")'>Delete/Rename</a></td>";
+ htmlStr += "<td><input type='button' onclick='renameSelectedTab(\"" + idVal + "\",\"" + title + "\",\"" + _module + "\",\"" + rpc + "\",\"" + version + "\")' value='Rename'></td>";
+ if(rows.length == 1){
+ htmlStr += "<td><input type='button' disabled='1' onclick='deleteSelectedTab(\"" + idVal + "\",\"" + title + "\",\"" + _module + "\",\"" + rpc + "\",\"" + version + "\")' value='Delete'></td>";
+ }else{
+ htmlStr += "<td><input type='button' onclick='deleteSelectedTab(\"" + idVal + "\",\"" + title + "\",\"" + _module + "\",\"" + rpc + "\",\"" + version + "\")' value='Delete'></td>";
+ }
+ /*
+ if(isVisible){
+ htmlStr += "<td><input type='checkbox' onclick=\"showOrHideTab(this,'" + idVal + "')\" checked='true'></td>";
+ }else{
+ htmlStr += "<td><input type='checkbox' onclick=\"showOrHideTab(this,'" + idVal + "')\"></td>";
+ }
+ */
+ htmlStr += "</tr>";
+ }
+ htmlStr += "</tbody>";
+ htmlStr += "</table>";
+ htmlStr += "</div>";
+ }
+ return htmlStr;
+}
+/*
+Added this logic because , when the configuration item is choosen in the menu the other dialog boxes were not poping up
+*/
+(function(){
+ //var msecs1= Date.now();
+ $( "#gitlocal-browser-dialog" ).dialog();
+ $( "#gitlocal-browser-dialog" ).dialog("close");
+ $( "#dgflow-browser-dialog" ).dialog();
+ $( "#dgflow-browser-dialog" ).dialog("close");
+ $( "#update-password-dialog" ).dialog();
+ $( "#update-password-dialog" ).dialog("close");
+ $( "#codecloud-browser-dialog" ).dialog();
+ $( "#codecloud-browser-dialog" ).dialog("close");
+ $( "#update-configuration-dialog" ).dialog();
+ $( "#update-configuration-dialog" ).dialog("close");
+ $( "#gitcommands-dialog" ).dialog();
+ $( "#gitcommands-dialog" ).dialog("close");
+ $("#filter-tabs-dialog").dialog();
+ $("#filter-tabs-dialog").dialog("close");
+ $("#loop-detection-dialog").dialog();
+ $("#loop-detection-dialog").dialog("close");
+ $("#dgstart-generate-xml-dialog").dialog();
+ $("#dgstart-generate-xml-dialog").dialog("close");
+ $("#xmldialog").dialog();
+ $("#xmldialog").dialog("close");
+ $("#upload-xml-status-dialog").dialog();
+ $("#upload-xml-status-dialog").dialog("close");
+ $("#flow-design-err-dialog").dialog();
+ $("#flow-design-err-dialog").dialog("close");
+ $("#sli-values-dialog").dialog();
+ $("#sli-values-dialog").dialog("close");
+ $("#comments-dialog").dialog();
+ $("#comments-dialog").dialog("close");
+ $("#show-errors-dialog").dialog();
+ $("#show-errors-dialog").dialog("close");
+ $("#dgnumber-find-dialog").dialog();
+ $("#dgnumber-find-dialog").dialog("close");
+ $("#search-text-dialog").dialog();
+ $("#search-text-dialog").dialog("close");
+ $("#yang-upload-dialog").dialog();
+ $("#yang-upload-dialog").dialog("close");
+ $("#yang-modules-browser-dialog").dialog();
+ $("#yang-modules-browser-dialog").dialog("close");
+ $("#list-yang-browser-dialog").dialog();
+ $("#list-yang-browser-dialog").dialog("close");
+ $("#request-input-dialog").dialog();
+ $("#request-input-dialog").dialog("close");
+ //var msecs2= Date.now();
+ //console.log("Time taken for dialog boxes:" + (msecs2 - msecs1));
+})();
+
+ function updateConfiguration(){
+ //console.log("in updateConfiguration");
+ $.get("/getCurrentSettings",function (data){
+ var dbHost = data.dbHost;
+ var dbPort = data.dbPort;
+ var dbName = data.dbName;
+ var dbUser = data.dbUser;
+ var dbPassword = data.dbPassword;
+ var gitLocalRepository = data.gitLocalRepository;
+ var performGitPull = data.performGitPull;
+
+ if(dbHost == undefined) dbHost="";
+ if(dbPort == undefined) dbPort="";
+ if(dbName == undefined) dbName="";
+ if(dbUser == undefined) dbUser="";
+ if(dbPassword == undefined) dbPassword="";
+ if(gitLocalRepository == undefined) gitLocalRepository="";
+ if(performGitPull == undefined || performGitPull == null) performGitPull="N";
+
+ var divStyle="border: 1px solid #a1a1a1; padding: 10px 40px; background: #dddddd; width: 500px; border-radius: 25px;";
+ //var divStyle="border: 2px solid #a1a1a1; padding: 10px 40px; background: #99CCFF; width: 400px; border-radius: 25px;";
+
+
+ var html = "<div>";
+ html += "<script>function changeType(obj,targetId){if( obj.checked== true){$('#' + targetId).prop('type','password');}else{$('#'+ targetId).prop('type','text');}} function changeTitle(){ document.getElementById(\"gitLocalRepository\").title=document.getElementById(\"gitLocalRepository\").value;}</script>";
+ html += "<div style='" + divStyle + "' >";
+ html += "<table border='0' cellpadding='5' >";
+ html += "<tr>";
+ html += "<td style='font-size:12px;align:center'><b>DB Host IP</b></td>";
+ html += "<td><input style='align:center;font-size:11px;font-weight:bold' id='dbhost' name='dbhost' type='text' value='" + dbHost + "'></td>";
+ html += "</tr>";
+ html += "<tr>";
+ html += "<td style='font-size:12px;align:center'><b>DB Port</b></td>";
+ html += "<td><input style='align:center;font-size:11px;font-weight:bold' id='dbport' name='dbport' type='text' value='" + dbPort + "'></td>";
+ html += "</tr>";
+ html += "<tr>";
+ html += "<td style='font-size:12px;align:center'><b>DB Name</b></td>";
+ html += "<td><input style='align:center;font-size:11px;font-weight:bold' id='dbname' name='dbname' type='text' value='" + dbName + "'></td>";
+ html += "</tr>";
+ html += "<tr>";
+ html += "<td style='font-size:12px;align:center'><b>DB UserName</b></td>";
+ html += "<td><input style='align:center;font-size:11px;font-weight:bold' id='dbuser' name='dbuser' type='password' value='" + dbUser + "'></td>";
+ html += "<td><input style='background:background:white;width:20px;height:20px' type='checkbox' checked value='1' onclick=\"changeType(this,'dbuser')\">Hide</td>";
+ html += "</tr>";
+ html += "<tr>";
+ html += "<td style='font-size:12px;align:center'><b>DB Password</b></td>";
+ html += "<td><input style='align:center;font-size:11px;font-weight:bold' id='dbpassword' name='dbpassword' type='password' value='" + dbPassword + "'></td>";
+ html += "<td><input style='background:background:white;width:20px;height:20px' type='checkbox' checked value='1' onclick=\"changeType(this,'dbpassword')\">Hide</td>";
+ html += "</tr>";
+ html += "</table>";
+ html += "</div>";
+ html += "<div style='fill:both;clear:both'></div><br>";
+
+ html += "<div style='" + divStyle + "' >";
+ html += "<table border='0' cellpadding='5' >";
+ html += "<tr>";
+ html += "<td style='font-size:12px;align:center'><b>Git Local Repository Path</b></td>";
+ html += "<td><textarea style='align:center;font-size:14px;' cols='50' rows='4' id='gitLocalRepository' name='gitLocalRepository' onkeyup='changeTitle()' title='" + gitLocalRepository + "'>" + gitLocalRepository + "</textarea></td>";
+ html += "</tr>";
+ html += "</table>";
+ html += "<table border='0' cellpadding='5' >";
+ html += "<tr>";
+ if(performGitPull == "N"){
+ html += "<td style='align:center;'><input style='color:blue;width:20px;height:20px;' id='performGitPull' type='checkbox' value='Y'>Perform Git Pull in Local Git Repository prior to import</td>";
+ }else{
+ html += "<td style='align:center;'><input style='color:blue;width:20px;height:20px;' id='performGitPull' type='checkbox' value='Y' checked>Perform Git Pull in Local Git Repository prior to import</td>";
+ }
+ html += "</tr>";
+ html += "</table>";
+ html += "</div>";
+ html += "</div>";
+ //console.log("html:" + html);
+ $( "#update-configuration-dialog" ).dialog({
+ title: "Configuration",
+ modal: true,
+ autoOpen: true,
+ width: 630,
+ height: 630,
+ buttons: [
+ {
+ text: "Save",
+ click: function() {
+ var newDBHost = $("#dbhost").val().trim();
+ var newDBPort = $("#dbport").val().trim();
+ var newDBName = $("#dbname").val().trim();
+ var newDBUser = $("#dbuser").val().trim();
+ var newDBPassword = $("#dbpassword").val().trim();
+ var newGitLocalRepository = $("#gitLocalRepository").val().trim();
+ var isPerformGitPullChecked = $('#performGitPull').is(':checked');
+ var newPerformGitPull = "N";
+ if(isPerformGitPullChecked){
+ newPerformGitPull = "Y";
+ }
+ if(newDBHost == ""){
+ RED.notify("Error: DB Host is required.");
+ $("#dbhost").focus();
+ return;
+ }else if(newDBPort == ""){
+ RED.notify("Error: DB Port is required.");
+ $("#dbport").focus();
+ return;
+ }else if(newDBName == ""){
+ RED.notify("Error: DB Name is required.");
+ $("#dbname").focus();
+ return;
+ }else if(newDBUser == ""){
+ RED.notify("Error: DB User is required.");
+ $("#dbuser").focus();
+ return;
+ }else if(newDBPassword == ""){
+ RED.notify("Error: DB Password is required.");
+ $("#dbpassword").focus();
+ return;
+ }else{
+ console.log("newGitLocalRepository:" + newGitLocalRepository);
+ var reqData= {"dbHost":newDBHost,
+ "dbPort" : newDBPort,
+ "dbName" : newDBName,
+ "dbUser" : newDBUser,
+ "dbPassword" : newDBPassword,
+ "gitLocalRepository" : newGitLocalRepository,
+ "performGitPull" : newPerformGitPull
+ };
+ $.post( "/updateConfiguration",reqData )
+ .done(function( data ) {
+ RED.notify("Configuration updated successfully");
+ //loadSettings();
+ //RED.comms.connect();
+ //$( "#update-configuration-dialog" ).dialog('close');
+ $("#update-configuration-dialog").dialog("close");
+ //location.reload();
+
+ })
+ .fail(function(err) {
+ console.log( "error" + err );
+ RED.notify("Failed to update the Configuration.");
+ })
+ .always(function() {
+ });
+ }
+ }
+ },
+ {
+ text: "Cancel",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ]
+ }).html(html);
+ //$("#update-configuration-dialog").show();
+ $("#gitLocalRepository").css({"width" : 300});
+
+ });
+ }
+
+ function updatePassword(){
+ var html="<div>";
+ html += "<div><span><b>New Password</b></span><br>";
+ html += "<input id='passwd1' name='passwd1' type='password' value=''>";
+ html += "</div>";
+ html += "<div><span><b>Confirm Password</b></span><br>";
+ html += "<input id='passwd2' name='passwd2' type='password' value=''>";
+ html += "</div>";
+ $( "#update-password-dialog" ).dialog({
+ title: "Update Password",
+ modal: true,
+ autoOpen: true,
+ width: 530,
+ height: 230,
+ buttons: [
+ {
+ text: "Update Password",
+ click: function() {
+ var passwd1 = $("#passwd1").val().trim();
+ var passwd2 = $("#passwd2").val().trim();
+ if((passwd1 != passwd2) || (passwd1 == "" || passwd2 == "")){
+ RED.notify("Error:Passwords entered must be same and must be populated.");
+ return;
+ }else{
+ var reqData= {"password":passwd1};
+ $.post( "/updatePassword",reqData )
+ .done(function( data ) {
+ RED.notify("Password updated successfully");
+ //loadSettings();
+ $( "#update-password-dialog" ).dialog('close');
+ })
+ .fail(function(err) {
+ console.log( "error" + err );
+ RED.notify("Failed to update the password.");
+ })
+ .always(function() {
+ });
+ }
+ }
+ },
+ {
+ text: "Cancel",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ]
+ }).html(html);
+ $("#update-password-dialog").show();
+
+ }
+
+ function showAvailableYangModules(){
+ availableYangModules=[];
+ var divStyle="<style>#yang-modules-data-container a { color: #067ab4; font-size: 0.75em;} #yang-modules-data-container a:hover { text-decoration: underline; padding: -15px -15px -15px 15px; } .header { height: 40px; border-bottom: 1px solid #EEE; background-color: #ffffff; height: 40px; -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; } .footer { height: 40px; background-color: whiteSmoke; border-top: 1px solid #DDD; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; } table#yang-list-table { width:100%; } table#yang-list-table th,table#yang-list-table td { border: 1px solid black; border-collapse: collapse; } table#yang-list-table th,table#yang-list-table td { padding: 5px; text-align: left; } table#yang-list-table tr:nth-child(even) { background-color: #eee; } table#yang-list-table tr:nth-child(odd) { background-color:#fff; } table#yang-list-table th { background-color: #65a9d7; color: white; } table#yang-list-table a { color: #337ab7; } table#yang-list-table a:link { color: #65a9d7; } table#yang-list-table a:visited { color: #636; } table#yang-list-table a:hover { color: #3366CC; cursor: pointer } table#yang-list-table a:active { color: #65a9d7 }</style>";
+ $.get( "/listAvailableModules")
+ .done(function( data ) {
+ var header="<div class='header'>List of Available Yang Modules</div>";
+ header += "<div><p><i>Check the modules that you want to load and click on the Load button.</i></p></div>";
+ //header += "<div><input id='yangModuleFilterBoxId' type='text' onkeyup='filterYangModules(this.value)'></div>";
+ var html= divStyle + header + "<div id='yang-modules-data-container'>";
+ html+="<table id='yang-list-table' border=1>";
+ html+="<tr>";
+ html+="<th>#</th>";
+ html+="<th>Load</th>";
+ html+="<th>Module</th>";
+ html+="</tr>";
+ if(data != null){
+ var files=data.files;
+ availableYangModules=files;
+ //console.dir(files);
+ files.sort(function (a,b){
+ if(a > b){
+ return 1;
+ }else if(a < b){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ var count=1;
+ for(var i=0;files != null && i<files.length;i++){
+ var val = files[i].replace(/:.*/,"");
+ if(files[i].indexOf(":checked") != -1){
+ html+="<tr><td>" + count + "</td><td><input type='checkbox' checked value='" + val + "'></td><td>" + val + "</td></tr>";
+ }else{
+ html+="<tr><td>" + count + "</td><td><input type='checkbox' value='" + val + "'></td><td>" + val + "</td></tr>";
+ }
+ count++;
+ }
+ }
+ html+="</table>";
+ html+="</div>";
+ $( "#yang-modules-browser-dialog" ).dialog({
+ title: "Available Yang Modules",
+ modal: true,
+ autoOpen: true,
+ width: 830,
+ height: 630,
+ buttons: [
+ {
+ text: "Load",
+ click: function() {
+ var allVals = [];
+ function getValuesForSelected() {
+ $('#yang-modules-data-container :checked').each(function() {
+ allVals.push($(this).val());
+ });
+ return allVals;
+ }
+ var selectedModules = getValuesForSelected().toString();
+ console.log(selectedModules);
+ $.ajax({
+ type: 'GET',
+ /*contentType: "application/x-www-form-urlencoded",*/
+ url: '/loadSelectedModules?selectedModules=' + selectedModules,
+ success: function(data) {
+ RED.notify("Modules Loaded successfully");
+ //emptying existing g;obal variables
+ sliValuesObj = {};
+ rpcValues = {};
+ reqInputValues = {};
+
+ if(data != undefined && data != null){
+ for(var i=0;i<data.sliValuesObj.length;i++){
+ var moduleName = data.sliValuesObj[i].moduleName;
+ sliValuesObj[moduleName] = data.sliValuesObj[i][moduleName + '_PROPS'];
+ rpcValues[moduleName] = data.sliValuesObj[i][ moduleName +'_RPCS'];
+ for(var k=0;rpcValues[moduleName] != undefined && k<rpcValues[moduleName].length;k++){
+ var rpcName = rpcValues[moduleName][k];
+ reqInputValues[moduleName + "_" + rpcName] = data.sliValuesObj[i][rpcName +"-input"];
+ //console.dir(reqInputValues);
+ }
+ }
+ }
+ $( "#yang-modules-browser-dialog" ).dialog('close');
+ console.log('success');
+ //console.log(JSON.stringify(data));
+ },
+ error: function(error) {
+ RED.notify("Failed to load modules.");
+ console.log("some error in fetching the notifications");
+ }
+ });
+ }
+ },
+ {
+ text: "Close",
+ click: function() {
+ $(this).dialog("close");
+ }
+ }
+ ]
+ }).html(html);
+ $("#yang-modules-browser-dialog").show();
+ })
+ .fail(function(err) {
+ RED.notify("Failed to get yang modules.");
+ })
+ .always(function() {
+ console.log("Done displaying");
+ });
+ }
+
+
+ $(function() {
+ RED.menu.init({id:"btn-sidemenu",
+ options: [
+ {id:"btn-sidebar",icon:"fa fa-columns",label:"Sidebar (Ctrl+Space)",toggle:true,onselect:RED.sidebar.toggleSidebar},
+ null,
+ {id:"btn-configure-upload",icon:"fa fa-book",label:"Configuration",toggle:false,onselect:updateConfiguration},
+ null,
+ {id:"btn-manage-tabs",icon:"fa fa-info",label:"Manage Tabs",toggle:false,onselect:showSelectedTabs},
+ null,
+ {id:"btn-find-dgnumber",icon:"fa fa-info",label:"Search Text (Ctrl+[)",toggle:false,onselect:RED.view.showSearchTextDialog},
+ null,
+ {id:"btn-find-dgnumber",icon:"fa fa-info",label:"Find Node (Ctrl+B)",toggle:false,onselect:RED.view.showDgNumberDialog},
+ null,
+ /*{id:"btn-loop-detection",icon:"fa fa-info",label:"Loop Detection",toggle:true,onselect:performLoopDetection},
+ null ,*/
+ {id:"btn-node-status",icon:"fa fa-info",label:"Node Status",toggle:true,onselect:toggleStatus},
+ null,
+ {id:"btn-node-dgnumber",icon:"fa fa-info",label:"Show Node Numbers",toggle:true,onselect:toggleDgNumberDisplay},
+ null,
+ {id:"btn-node-panel",icon:"fa fa-columns",label:"Node Palette (Ctrl+M)",toggle:true,onselect:toggleNodePaletteDisplay},
+ null,
+ {id:"btn-node-viewdgs",icon:"fa fa-info",label:"View All DG List",toggle:false,onselect:displayAllDGs},
+ null,
+ /*
+ {id:"btn-node-gitmenu",icon:"fa fa-info",label:"Git Commands",options: [
+ {id:"btn-node-gitcheckout",icon:"fa fa-info",label:"Git Checkout",onselect:showGitCheckoutDialog},
+ {id:"btn-node-gitpull",icon:"fa fa-info",label:"Git Pull",onselect:showGitPullDialog},
+ {id:"btn-node-gitstatus",icon:"fa fa-info",label:"Git Status",onselect:showGitStatusDialog}
+ ]},
+ null,
+ */
+ {id:"btn-import-menu",icon:"fa fa-sign-in",label:"Import...",options:[
+ /*{id:"btn-import-codecloud",icon:"fa fa-clipboard",label:"Code Cloud",onselect:showCodeCloudFlows},
+ */
+ {id:"btn-import-codecloud",icon:"fa fa-clipboard",label:"Git Local Repository",onselect:showGitLocalFlows},
+ {id:"btn-import-userflows",icon:"fa fa-clipboard",label:"Downloaded DG Flows...",onselect:showFlowShareUsers},
+ {id:"btn-import-clipboard",icon:"fa fa-clipboard",label:"Clipboard...",onselect:RED.view.showImportNodesDialog},
+ {id:"btn-import-library",icon:"fa fa-book",label:"Library",options:[]}
+ ]},
+ {id:"btn-export-menu",icon:"fa fa-sign-out",label:"Export...",disabled:true,options:[
+ {id:"btn-export-clipboard",icon:"fa fa-clipboard",label:"Clipboard...",disabled:true,onselect:RED.view.showExportNodesDialog},
+ {id:"btn-export-library",icon:"fa fa-book",label:"Library...",disabled:true,onselect:RED.view.showExportNodesLibraryDialog}
+ ]},
+ null,
+ {id:"btn-change-password",icon:"fa fa-columns",label:"Change Password",toggle:false,onselect:updatePassword},
+ null,
+ /*{id:"btn-config-nodes",icon:"fa fa-th-list",label:"Configuration nodes...",onselect:RED.sidebar.config.show},
+ null,*/
+ {id:"btn-workspace-menu",icon:"fa fa-th-large",label:"Workspaces",options:[
+ {id:"btn-workspace-add",icon:"fa fa-plus",label:"Add"},
+ {id:"btn-workspace-edit",icon:"fa fa-pencil",label:"Rename"},
+ {id:"btn-workspace-delete",icon:"fa fa-minus",label:"Delete"},
+ null
+ ]},
+ null,
+ {id:"btn-keyboard-shortcuts",icon:"fa fa-keyboard-o",label:"Keyboard Shortcuts",onselect:showHelp}
+ /*{id:"btn-help",icon:"fa fa-question",label:"Help...", href:"http://nodered.org/docs"}*/
+ ]
+ });
+
+ //Making default loop detection on and display check mark in the menu
+ //$("#btn-loop-detection").addClass("active");
+
+ RED.keyboard.add(/* ? */ 191,{shift:true},function(){showHelp();d3.event.preventDefault();});
+ loadSettings();
+ RED.comms.connect();
+ });
+
+ return {
+ };
+})();
diff --git a/dgbuilder/public/red/main.js.orig b/dgbuilder/public/red/main.js.orig
new file mode 100644
index 0000000..a47e995
--- /dev/null
+++ b/dgbuilder/public/red/main.js.orig
@@ -0,0 +1,323 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+var RED = (function() {
+
+ function hideDropTarget() {
+ $("#dropTarget").hide();
+ RED.keyboard.remove(/* ESCAPE */ 27);
+ }
+
+ $('#chart').on("dragenter",function(event) {
+ if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) {
+ $("#dropTarget").css({display:'table'});
+ RED.keyboard.add(/* ESCAPE */ 27,hideDropTarget);
+ }
+ });
+
+ $('#dropTarget').on("dragover",function(event) {
+ if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) {
+ event.preventDefault();
+ }
+ })
+ .on("dragleave",function(event) {
+ hideDropTarget();
+ })
+ .on("drop",function(event) {
+ var data = event.originalEvent.dataTransfer.getData("text/plain");
+ hideDropTarget();
+ RED.view.importNodes(data);
+ event.preventDefault();
+ });
+
+ function save(force) {
+ if (RED.view.dirty()) {
+ //$("#debug-tab-clear").click(); // uncomment this to auto clear debug on deploy
+
+ if (!force) {
+ var invalid = false;
+ var unknownNodes = [];
+ RED.nodes.eachNode(function(node) {
+ invalid = invalid || !node.valid;
+ if (node.type === "unknown") {
+ if (unknownNodes.indexOf(node.name) == -1) {
+ unknownNodes.push(node.name);
+ }
+ invalid = true;
+ }
+ });
+ if (invalid) {
+ if (unknownNodes.length > 0) {
+ $( "#node-dialog-confirm-deploy-config" ).hide();
+ $( "#node-dialog-confirm-deploy-unknown" ).show();
+ var list = "<li>"+unknownNodes.join("</li><li>")+"</li>";
+ $( "#node-dialog-confirm-deploy-unknown-list" ).html(list);
+ } else {
+ $( "#node-dialog-confirm-deploy-config" ).show();
+ $( "#node-dialog-confirm-deploy-unknown" ).hide();
+ }
+ $( "#node-dialog-confirm-deploy" ).dialog( "open" );
+ return;
+ }
+ }
+ var nns = RED.nodes.createCompleteNodeSet();
+
+ $("#btn-icn-deploy").removeClass('fa-download');
+ $("#btn-icn-deploy").addClass('spinner');
+ RED.view.dirty(false);
+
+ $.ajax({
+ url:"flows",
+ type: "POST",
+ data: JSON.stringify(nns),
+ contentType: "application/json; charset=utf-8"
+ }).done(function(data,textStatus,xhr) {
+ RED.notify("Successfully deployed","success");
+ RED.nodes.eachNode(function(node) {
+ if (node.changed) {
+ node.dirty = true;
+ node.changed = false;
+ }
+ if(node.credentials) {
+ delete node.credentials;
+ }
+ });
+ RED.nodes.eachConfig(function (confNode) {
+ if (confNode.credentials) {
+ delete confNode.credentials;
+ }
+ });
+ // Once deployed, cannot undo back to a clean state
+ RED.history.markAllDirty();
+ RED.view.redraw();
+ }).fail(function(xhr,textStatus,err) {
+ RED.view.dirty(true);
+ if (xhr.responseText) {
+ RED.notify("<strong>Error</strong>: "+xhr.responseText,"error");
+ } else {
+ RED.notify("<strong>Error</strong>: no response from server","error");
+ }
+ }).always(function() {
+ $("#btn-icn-deploy").removeClass('spinner');
+ $("#btn-icn-deploy").addClass('fa-download');
+ });
+ }
+ }
+
+ $('#btn-deploy').click(function() { save(); });
+
+ $( "#node-dialog-confirm-deploy" ).dialog({
+ title: "Confirm deploy",
+ modal: true,
+ autoOpen: false,
+ width: 530,
+ height: 230,
+ buttons: [
+ {
+ text: "Confirm deploy",
+ click: function() {
+ save(true);
+ $( this ).dialog( "close" );
+ }
+ },
+ {
+ text: "Cancel",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ]
+ });
+
+ function loadSettings() {
+ $.get('settings', function(data) {
+ RED.settings = data;
+ console.log("Node-RED: "+data.version);
+ loadNodeList();
+ });
+ }
+ function loadNodeList() {
+ $.ajax({
+ headers: {
+ "Accept":"application/json"
+ },
+ cache: false,
+ url: 'nodes',
+ success: function(data) {
+ RED.nodes.setNodeList(data);
+ loadNodes();
+ }
+ });
+ }
+
+ function loadNodes() {
+ $.ajax({
+ headers: {
+ "Accept":"text/html"
+ },
+ cache: false,
+ url: 'nodes',
+ success: function(data) {
+ $("body").append(data);
+ $(".palette-spinner").hide();
+ $(".palette-scroll").show();
+ $("#palette-search").show();
+ loadFlows();
+ }
+ });
+ }
+
+ function loadFlows() {
+ $.ajax({
+ headers: {
+ "Accept":"application/json"
+ },
+ cache: false,
+ url: 'flows',
+ success: function(nodes) {
+ RED.nodes.import(nodes);
+ RED.view.dirty(false);
+ RED.view.redraw();
+ RED.comms.subscribe("status/#",function(topic,msg) {
+ var parts = topic.split("/");
+ var node = RED.nodes.node(parts[1]);
+ if (node) {
+ node.status = msg;
+ if (statusEnabled) {
+ node.dirty = true;
+ RED.view.redraw();
+ }
+ }
+ });
+ RED.comms.subscribe("node/#",function(topic,msg) {
+ var i,m;
+ var typeList;
+ var info;
+
+ if (topic == "node/added") {
+ var addedTypes = [];
+ for (i=0;i<msg.length;i++) {
+ m = msg[i];
+ var id = m.id;
+ RED.nodes.addNodeSet(m);
+ if (m.loaded) {
+ addedTypes = addedTypes.concat(m.types);
+ $.get('nodes/'+id, function(data) {
+ $("body").append(data);
+ });
+ }
+ }
+ if (addedTypes.length) {
+ typeList = "<ul><li>"+addedTypes.join("</li><li>")+"</li></ul>";
+ RED.notify("Node"+(addedTypes.length!=1 ? "s":"")+" added to palette:"+typeList,"success");
+ }
+ } else if (topic == "node/removed") {
+ for (i=0;i<msg.length;i++) {
+ m = msg[i];
+ info = RED.nodes.removeNodeSet(m.id);
+ if (info.added) {
+ typeList = "<ul><li>"+m.types.join("</li><li>")+"</li></ul>";
+ RED.notify("Node"+(m.types.length!=1 ? "s":"")+" removed from palette:"+typeList,"success");
+ }
+ }
+ } else if (topic == "node/enabled") {
+ if (msg.types) {
+ info = RED.nodes.getNodeSet(msg.id);
+ if (info.added) {
+ RED.nodes.enableNodeSet(msg.id);
+ typeList = "<ul><li>"+msg.types.join("</li><li>")+"</li></ul>";
+ RED.notify("Node"+(msg.types.length!=1 ? "s":"")+" enabled:"+typeList,"success");
+ } else {
+ $.get('nodes/'+msg.id, function(data) {
+ $("body").append(data);
+ typeList = "<ul><li>"+msg.types.join("</li><li>")+"</li></ul>";
+ RED.notify("Node"+(msg.types.length!=1 ? "s":"")+" added to palette:"+typeList,"success");
+ });
+ }
+ }
+ } else if (topic == "node/disabled") {
+ if (msg.types) {
+ RED.nodes.disableNodeSet(msg.id);
+ typeList = "<ul><li>"+msg.types.join("</li><li>")+"</li></ul>";
+ RED.notify("Node"+(msg.types.length!=1 ? "s":"")+" disabled:"+typeList,"success");
+ }
+ }
+ });
+ }
+ });
+ }
+
+ var statusEnabled = false;
+ function toggleStatus(state) {
+ statusEnabled = state;
+ RED.view.status(statusEnabled);
+ }
+
+ function showHelp() {
+
+ var dialog = $('#node-help');
+
+ //$("#node-help").draggable({
+ // handle: ".modal-header"
+ //});
+
+ dialog.on('show',function() {
+ RED.keyboard.disable();
+ });
+ dialog.on('hidden',function() {
+ RED.keyboard.enable();
+ });
+
+ dialog.modal();
+ }
+
+ $(function() {
+ RED.menu.init({id:"btn-sidemenu",
+ options: [
+ {id:"btn-sidebar",icon:"fa fa-columns",label:"Sidebar",toggle:true,onselect:RED.sidebar.toggleSidebar},
+ null,
+ {id:"btn-node-status",icon:"fa fa-info",label:"Node Status",toggle:true,onselect:toggleStatus},
+ null,
+ {id:"btn-import-menu",icon:"fa fa-sign-in",label:"Import...",options:[
+ {id:"btn-import-clipboard",icon:"fa fa-clipboard",label:"Clipboard...",onselect:RED.view.showImportNodesDialog},
+ {id:"btn-import-library",icon:"fa fa-book",label:"Library",options:[]}
+ ]},
+ {id:"btn-export-menu",icon:"fa fa-sign-out",label:"Export...",disabled:true,options:[
+ {id:"btn-export-clipboard",icon:"fa fa-clipboard",label:"Clipboard...",disabled:true,onselect:RED.view.showExportNodesDialog},
+ {id:"btn-export-library",icon:"fa fa-book",label:"Library...",disabled:true,onselect:RED.view.showExportNodesLibraryDialog}
+ ]},
+ null,
+ {id:"btn-config-nodes",icon:"fa fa-th-list",label:"Configuration nodes...",onselect:RED.sidebar.config.show},
+ null,
+ {id:"btn-workspace-menu",icon:"fa fa-th-large",label:"Workspaces",options:[
+ {id:"btn-workspace-add",icon:"fa fa-plus",label:"Add"},
+ {id:"btn-workspace-edit",icon:"fa fa-pencil",label:"Rename"},
+ {id:"btn-workspace-delete",icon:"fa fa-minus",label:"Delete"},
+ null
+ ]},
+ null,
+ {id:"btn-keyboard-shortcuts",icon:"fa fa-keyboard-o",label:"Keyboard Shortcuts",onselect:showHelp},
+ {id:"btn-help",icon:"fa fa-question",label:"Help...", href:"http://nodered.org/docs"}
+ ]
+ });
+
+ RED.keyboard.add(/* ? */ 191,{shift:true},function(){showHelp();d3.event.preventDefault();});
+ loadSettings();
+ RED.comms.connect();
+ });
+
+ return {
+ };
+})();
diff --git a/dgbuilder/public/red/nodes.js b/dgbuilder/public/red/nodes.js
new file mode 100644
index 0000000..dc0827a
--- /dev/null
+++ b/dgbuilder/public/red/nodes.js
@@ -0,0 +1,553 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+RED.nodes = (function() {
+
+ var node_defs = {};
+ var nodes = [];
+ var configNodes = {};
+ var links = [];
+ var defaultWorkspace;
+ var workspaces = {};
+
+ var registry = (function() {
+ var nodeList = [];
+ var nodeSets = {};
+ var typeToId = {};
+ var nodeDefinitions = {};
+
+ var exports = {
+ getNodeList: function() {
+ return nodeList;
+ },
+ setNodeList: function(list) {
+ nodeList = [];
+ for(var i=0;i<list.length;i++) {
+ var ns = list[i];
+ exports.addNodeSet(ns);
+ }
+ },
+ addNodeSet: function(ns) {
+ ns.added = false;
+ nodeSets[ns.id] = ns;
+ for (var j=0;j<ns.types.length;j++) {
+ typeToId[ns.types[j]] = ns.id;
+ }
+ nodeList.push(ns);
+ },
+ removeNodeSet: function(id) {
+ var ns = nodeSets[id];
+ for (var j=0;j<ns.types.length;j++) {
+ if (ns.added) {
+ // TODO: too tightly coupled into palette UI
+ RED.palette.remove(ns.types[j]);
+ var def = nodeDefinitions[ns.types[j]];
+ if (def.onpaletteremove && typeof def.onpaletteremove === "function") {
+ def.onpaletteremove.call(def);
+ }
+ }
+ delete typeToId[ns.types[j]];
+ }
+ delete nodeSets[id];
+ for (var i=0;i<nodeList.length;i++) {
+ if (nodeList[i].id == id) {
+ nodeList.splice(i,1);
+ break;
+ }
+ }
+ return ns;
+ },
+ getNodeSet: function(id) {
+ return nodeSets[id];
+ },
+ enableNodeSet: function(id) {
+ var ns = nodeSets[id];
+ ns.enabled = true;
+ for (var j=0;j<ns.types.length;j++) {
+ // TODO: too tightly coupled into palette UI
+ RED.palette.show(ns.types[j]);
+ var def = nodeDefinitions[ns.types[j]];
+ if (def.onpaletteadd && typeof def.onpaletteadd === "function") {
+ def.onpaletteadd.call(def);
+ }
+ }
+ },
+ disableNodeSet: function(id) {
+ var ns = nodeSets[id];
+ ns.enabled = false;
+ for (var j=0;j<ns.types.length;j++) {
+ // TODO: too tightly coupled into palette UI
+ RED.palette.hide(ns.types[j]);
+ var def = nodeDefinitions[ns.types[j]];
+ if (def.onpaletteremove && typeof def.onpaletteremove === "function") {
+ def.onpaletteremove.call(def);
+ }
+ }
+ },
+ registerNodeType: function(nt,def) {
+ nodeDefinitions[nt] = def;
+ nodeSets[typeToId[nt]].added = true;
+ // TODO: too tightly coupled into palette UI
+ RED.palette.add(nt,def);
+ if (def.onpaletteadd && typeof def.onpaletteadd === "function") {
+ def.onpaletteadd.call(def);
+ }
+ },
+ getNodeType: function(nt) {
+ return nodeDefinitions[nt];
+ }
+ };
+ return exports;
+ })();
+
+ function getID() {
+ return (1+Math.random()*4294967295).toString(16);
+ }
+
+ function addNode(n) {
+ if (n._def.category == "config") {
+ configNodes[n.id] = n;
+ RED.sidebar.config.refresh();
+ } else {
+ n.dirty = true;
+ nodes.push(n);
+ var updatedConfigNode = false;
+ for (var d in n._def.defaults) {
+ if (n._def.defaults.hasOwnProperty(d)) {
+ var property = n._def.defaults[d];
+ if (property.type) {
+ var type = registry.getNodeType(property.type);
+ if (type && type.category == "config") {
+ var configNode = configNodes[n[d]];
+ if (configNode) {
+ updatedConfigNode = true;
+ configNode.users.push(n);
+ }
+ }
+ }
+ }
+ }
+ if (updatedConfigNode) {
+ RED.sidebar.config.refresh();
+ }
+ }
+ }
+ function addLink(l) {
+ links.push(l);
+ }
+ function addConfig(c) {
+ configNodes[c.id] = c;
+ }
+
+ function getNode(id) {
+ if (id in configNodes) {
+ return configNodes[id];
+ } else {
+ for (var n in nodes) {
+ if (nodes[n].id == id) {
+ return nodes[n];
+ }
+ }
+ }
+ return null;
+ }
+
+ function removeNode(id) {
+ var removedLinks = [];
+ if (id in configNodes) {
+ delete configNodes[id];
+ RED.sidebar.config.refresh();
+ } else {
+ var node = getNode(id);
+ if (node) {
+ nodes.splice(nodes.indexOf(node),1);
+ removedLinks = links.filter(function(l) { return (l.source === node) || (l.target === node); });
+ removedLinks.map(function(l) {links.splice(links.indexOf(l), 1); });
+ }
+ var updatedConfigNode = false;
+ for (var d in node._def.defaults) {
+ if (node._def.defaults.hasOwnProperty(d)) {
+ var property = node._def.defaults[d];
+ if (property.type) {
+ var type = registry.getNodeType(property.type);
+ if (type && type.category == "config") {
+ var configNode = configNodes[node[d]];
+ if (configNode) {
+ updatedConfigNode = true;
+ var users = configNode.users;
+ users.splice(users.indexOf(node),1);
+ }
+ }
+ }
+ }
+ }
+ if (updatedConfigNode) {
+ RED.sidebar.config.refresh();
+ }
+ }
+ return removedLinks;
+ }
+
+ function removeLink(l) {
+ var index = links.indexOf(l);
+ if (index != -1) {
+ links.splice(index,1);
+ }
+ }
+
+ function refreshValidation() {
+ for (var n=0;n<nodes.length;n++) {
+ RED.editor.validateNode(nodes[n]);
+ }
+ }
+
+ function addWorkspace(ws) {
+ workspaces[ws.id] = ws;
+ }
+ function getWorkspace(id) {
+ return workspaces[id];
+ }
+ function removeWorkspace(id) {
+ delete workspaces[id];
+ var removedNodes = [];
+ var removedLinks = [];
+ var n;
+ for (n=0;n<nodes.length;n++) {
+ var node = nodes[n];
+ if (node.z == id) {
+ removedNodes.push(node);
+ }
+ }
+ for (n=0;n<removedNodes.length;n++) {
+ var rmlinks = removeNode(removedNodes[n].id);
+ removedLinks = removedLinks.concat(rmlinks);
+ }
+ return {nodes:removedNodes,links:removedLinks};
+ }
+
+ function getAllFlowNodes(node) {
+ var visited = {};
+ visited[node.id] = true;
+ var nns = [node];
+ var stack = [node];
+ while(stack.length !== 0) {
+ var n = stack.shift();
+ var childLinks = links.filter(function(d) { return (d.source === n) || (d.target === n);});
+ for (var i=0;i<childLinks.length;i++) {
+ var child = (childLinks[i].source === n)?childLinks[i].target:childLinks[i].source;
+ if (!visited[child.id]) {
+ visited[child.id] = true;
+ nns.push(child);
+ stack.push(child);
+ }
+ }
+ }
+ return nns;
+ }
+
+ /**
+ * Converts a node to an exportable JSON Object
+ **/
+ function convertNode(n, exportCreds) {
+ exportCreds = exportCreds || false;
+ var node = {};
+ node.id = n.id;
+ node.type = n.type;
+ for (var d in n._def.defaults) {
+ if (n._def.defaults.hasOwnProperty(d)) {
+ node[d] = n[d];
+ }
+ }
+ if(exportCreds && n.credentials) {
+ node.credentials = {};
+ for (var cred in n._def.credentials) {
+ if (n._def.credentials.hasOwnProperty(cred)) {
+ if (n.credentials[cred] != null) {
+ node.credentials[cred] = n.credentials[cred];
+ }
+ }
+ }
+ }
+ if (n._def.category != "config") {
+ node.x = n.x;
+ node.y = n.y;
+ node.z = n.z;
+ node.wires = [];
+ for(var i=0;i<n.outputs;i++) {
+ node.wires.push([]);
+ }
+ var wires = links.filter(function(d){return d.source === n;});
+ for (var j=0;j<wires.length;j++) {
+ var w = wires[j];
+ node.wires[w.sourcePort].push(w.target.id);
+ }
+ }
+ return node;
+ }
+
+ /**
+ * Converts the current node selection to an exportable JSON Object
+ **/
+ function createExportableNodeSet(set) {
+ var nns = [];
+ var exportedConfigNodes = {};
+ for (var n=0;n<set.length;n++) {
+ var node = set[n].n;
+ var convertedNode = RED.nodes.convertNode(node);
+ for (var d in node._def.defaults) {
+ if (node._def.defaults[d].type && node[d] in configNodes) {
+ var confNode = configNodes[node[d]];
+ var exportable = registry.getNodeType(node._def.defaults[d].type).exportable;
+ if ((exportable == null || exportable)) {
+ if (!(node[d] in exportedConfigNodes)) {
+ exportedConfigNodes[node[d]] = true;
+ nns.unshift(RED.nodes.convertNode(confNode));
+ }
+ } else {
+ convertedNode[d] = "";
+ }
+ }
+ }
+
+ nns.push(convertedNode);
+ }
+ return nns;
+ }
+
+ //TODO: rename this (createCompleteNodeSet)
+ function createCompleteNodeSet() {
+ var nns = [];
+ var i;
+ for (i in workspaces) {
+ if (workspaces.hasOwnProperty(i)) {
+ nns.push(workspaces[i]);
+ }
+ }
+ for (i in configNodes) {
+ if (configNodes.hasOwnProperty(i)) {
+ nns.push(convertNode(configNodes[i], true));
+ }
+ }
+ for (i=0;i<nodes.length;i++) {
+ var node = nodes[i];
+ nns.push(convertNode(node, true));
+ }
+ return nns;
+ }
+
+ function importNodes(newNodesObj,createNewIds) {
+ try {
+ var i;
+ var n;
+ var newNodes;
+ if (typeof newNodesObj === "string") {
+ if (newNodesObj === "") {
+ return;
+ }
+ newNodes = JSON.parse(newNodesObj);
+ } else {
+ newNodes = newNodesObj;
+ }
+
+ if (!$.isArray(newNodes)) {
+ newNodes = [newNodes];
+ }
+ var unknownTypes = [];
+ for (i=0;i<newNodes.length;i++) {
+ n = newNodes[i];
+ // TODO: remove workspace in next release+1
+ if (n.type != "workspace" && n.type != "tab" && !registry.getNodeType(n.type)) {
+ // TODO: get this UI thing out of here! (see below as well)
+ n.name = n.type;
+ n.type = "unknown";
+ if (unknownTypes.indexOf(n.name)==-1) {
+ unknownTypes.push(n.name);
+ }
+ if (n.x == null && n.y == null) {
+ // config node - remove it
+ newNodes.splice(i,1);
+ i--;
+ }
+ }
+ }
+ if (unknownTypes.length > 0) {
+ var typeList = "<ul><li>"+unknownTypes.join("</li><li>")+"</li></ul>";
+ var type = "type"+(unknownTypes.length > 1?"s":"");
+ RED.notify("<strong>Imported unrecognised "+type+":</strong>"+typeList,"error",false,10000);
+ //"DO NOT DEPLOY while in this state.<br/>Either, add missing types to Node-RED, restart and then reload page,<br/>or delete unknown "+n.name+", rewire as required, and then deploy.","error");
+ }
+
+ var new_workspaces = [];
+ var workspace_map = {};
+
+ for (i=0;i<newNodes.length;i++) {
+ n = newNodes[i];
+ // TODO: remove workspace in next release+1
+ if (n.type === "workspace" || n.type === "tab") {
+ if (n.type === "workspace") {
+ n.type = "tab";
+ }
+ if (defaultWorkspace == null) {
+ defaultWorkspace = n;
+ }
+ if (createNewIds) {
+ var nid = getID();
+ workspace_map[n.id] = nid;
+ n.id = nid;
+ }
+ addWorkspace(n);
+ RED.view.addWorkspace(n);
+ new_workspaces.push(n);
+ }
+ }
+ if (defaultWorkspace == null) {
+ defaultWorkspace = { type:"tab", id:getID(), label:"Sheet 1" };
+ addWorkspace(defaultWorkspace);
+ RED.view.addWorkspace(defaultWorkspace);
+ new_workspaces.push(defaultWorkspace);
+ }
+
+ var node_map = {};
+ var new_nodes = [];
+ var new_links = [];
+
+ for (i=0;i<newNodes.length;i++) {
+ n = newNodes[i];
+ // TODO: remove workspace in next release+1
+ if (n.type !== "workspace" && n.type !== "tab") {
+ var def = registry.getNodeType(n.type);
+ if (def && def.category == "config") {
+ if (!RED.nodes.node(n.id)) {
+ var configNode = {id:n.id,type:n.type,users:[]};
+ for (var d in def.defaults) {
+ if (def.defaults.hasOwnProperty(d)) {
+ configNode[d] = n[d];
+ }
+ }
+ configNode.label = def.label;
+ configNode._def = def;
+ RED.nodes.add(configNode);
+ }
+ } else {
+ var node = {x:n.x,y:n.y,z:n.z,type:0,wires:n.wires,changed:false};
+ if (createNewIds) {
+ node.z = workspace_map[node.z];
+ if (!workspaces[node.z]) {
+ node.z = RED.view.getWorkspace();
+ }
+ node.id = getID();
+ } else {
+ node.id = n.id;
+ if (node.z == null || !workspaces[node.z]) {
+ node.z = RED.view.getWorkspace();
+ }
+ }
+ node.type = n.type;
+ node._def = def;
+ if (!node._def) {
+ node._def = {
+ color:"#fee",
+ defaults: {},
+ label: "unknown: "+n.type,
+ labelStyle: "node_label_italic",
+ outputs: n.outputs||n.wires.length
+ }
+ }
+ node.outputs = n.outputs||node._def.outputs;
+
+ for (var d2 in node._def.defaults) {
+ if (node._def.defaults.hasOwnProperty(d2)) {
+ node[d2] = n[d2];
+ }
+ }
+
+ addNode(node);
+ RED.editor.validateNode(node);
+ node_map[n.id] = node;
+ new_nodes.push(node);
+ }
+ }
+ }
+ for (i=0;i<new_nodes.length;i++) {
+ n = new_nodes[i];
+ for (var w1=0;w1<n.wires.length;w1++) {
+ var wires = (n.wires[w1] instanceof Array)?n.wires[w1]:[n.wires[w1]];
+ for (var w2=0;w2<wires.length;w2++) {
+ if (wires[w2] in node_map) {
+ var link = {source:n,sourcePort:w1,target:node_map[wires[w2]]};
+ addLink(link);
+ new_links.push(link);
+ }
+ }
+ }
+ delete n.wires;
+ }
+ return [new_nodes,new_links,new_workspaces];
+ } catch(error) {
+ //TODO: get this UI thing out of here! (see above as well)
+ RED.notify("<strong>Error</strong>: "+error,"error");
+ return null;
+ }
+
+ }
+
+ return {
+ registry:registry,
+ setNodeList: registry.setNodeList,
+
+ getNodeSet: registry.getNodeSet,
+ addNodeSet: registry.addNodeSet,
+ removeNodeSet: registry.removeNodeSet,
+ enableNodeSet: registry.enableNodeSet,
+ disableNodeSet: registry.disableNodeSet,
+
+ registerType: registry.registerNodeType,
+ getType: registry.getNodeType,
+ convertNode: convertNode,
+ add: addNode,
+ addLink: addLink,
+ remove: removeNode,
+ removeLink: removeLink,
+ addWorkspace: addWorkspace,
+ removeWorkspace: removeWorkspace,
+ workspace: getWorkspace,
+ eachNode: function(cb) {
+ for (var n=0;n<nodes.length;n++) {
+ cb(nodes[n]);
+ }
+ },
+ eachLink: function(cb) {
+ for (var l=0;l<links.length;l++) {
+ cb(links[l]);
+ }
+ },
+ eachConfig: function(cb) {
+ for (var id in configNodes) {
+ if (configNodes.hasOwnProperty(id)) {
+ cb(configNodes[id]);
+ }
+ }
+ },
+ node: getNode,
+ import: importNodes,
+ refreshValidation: refreshValidation,
+ getAllFlowNodes: getAllFlowNodes,
+ createExportableNodeSet: createExportableNodeSet,
+ createCompleteNodeSet: createCompleteNodeSet,
+ id: getID,
+ nodes: nodes, // TODO: exposed for d3 vis
+ links: links // TODO: exposed for d3 vis
+ };
+})();
diff --git a/dgbuilder/public/red/ui/editor.js b/dgbuilder/public/red/ui/editor.js
new file mode 100644
index 0000000..c5f7986
--- /dev/null
+++ b/dgbuilder/public/red/ui/editor.js
@@ -0,0 +1,665 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+RED.editor = (function() {
+ var editing_node = null;
+ // TODO: should IMPORT/EXPORT get their own dialogs?
+
+ function getCredentialsURL(nodeType, nodeID) {
+ var dashedType = nodeType.replace(/\s+/g, '-');
+ return 'credentials/' + dashedType + "/" + nodeID;
+ }
+
+ /**
+ * Validate a node
+ * @param node - the node being validated
+ * @returns {boolean} whether the node is valid. Sets node.dirty if needed
+ */
+ function validateNode(node) {
+ var oldValue = node.valid;
+ node.valid = validateNodeProperties(node, node._def.defaults, node);
+ if (node._def._creds) {
+ node.valid = node.valid && validateNodeProperties(node, node._def.credentials, node._def._creds);
+ }
+ if (oldValue != node.valid) {
+ node.dirty = true;
+ }
+ }
+
+ /**
+ * Validate a node's properties for the given set of property definitions
+ * @param node - the node being validated
+ * @param definition - the node property definitions (either def.defaults or def.creds)
+ * @param properties - the node property values to validate
+ * @returns {boolean} whether the node's properties are valid
+ */
+ function validateNodeProperties(node, definition, properties) {
+ var isValid = true;
+ for (var prop in definition) {
+ if (definition.hasOwnProperty(prop)) {
+ if (!validateNodeProperty(node, definition, prop, properties[prop])) {
+ isValid = false;
+ }
+ }
+ }
+ return isValid;
+ }
+
+ /**
+ * Validate a individual node property
+ * @param node - the node being validated
+ * @param definition - the node property definitions (either def.defaults or def.creds)
+ * @param property - the property name being validated
+ * @param value - the property value being validated
+ * @returns {boolean} whether the node proprty is valid
+ */
+ function validateNodeProperty(node,definition,property,value) {
+ var valid = true;
+ if ("required" in definition[property] && definition[property].required) {
+ valid = value !== "";
+ }
+ if (valid && "validate" in definition[property]) {
+ valid = definition[property].validate.call(node,value);
+ }
+ if (valid && definition[property].type && RED.nodes.getType(definition[property].type) && !("validate" in definition[property])) {
+ if (!value || value == "_ADD_") {
+ valid = false;
+ } else {
+ var v = RED.nodes.node(value).valid;
+ valid = (v==null || v);
+ }
+ }
+ return valid;
+ }
+
+ /**
+ * Called when the node's properties have changed.
+ * Marks the node as dirty and needing a size check.
+ * Removes any links to non-existant outputs.
+ * @param node - the node that has been updated
+ * @returns {array} the links that were removed due to this update
+ */
+ function updateNodeProperties(node) {
+ node.resize = true;
+ node.dirty = true;
+ var removedLinks = [];
+ if (node.outputs < node.ports.length) {
+ while (node.outputs < node.ports.length) {
+ node.ports.pop();
+ }
+ RED.nodes.eachLink(function(l) {
+ if (l.source === node && l.sourcePort >= node.outputs) {
+ removedLinks.push(l);
+ }
+ });
+ for (var l=0;l<removedLinks.length;l++) {
+ RED.nodes.removeLink(removedLinks[l]);
+ }
+ } else if (node.outputs > node.ports.length) {
+ while (node.outputs > node.ports.length) {
+ node.ports.push(node.ports.length);
+ }
+ }
+ return removedLinks;
+ }
+
+
+
+ $( "#dialog" ).dialog({
+ modal: true,
+ autoOpen: false,
+ closeOnEscape: false,
+ width: 500,
+ buttons: [
+ {
+ id: "node-dialog-ok",
+ text: "Ok",
+ click: function() {
+ if (editing_node) {
+ var changes = {};
+ var changed = false;
+ var wasDirty = RED.view.dirty();
+ var d;
+
+ if (editing_node._def.oneditsave) {
+ var oldValues = {};
+ for (d in editing_node._def.defaults) {
+ if (editing_node._def.defaults.hasOwnProperty(d)) {
+ if (typeof editing_node[d] === "string" || typeof editing_node[d] === "number") {
+ oldValues[d] = editing_node[d];
+ } else {
+ oldValues[d] = $.extend(true,{},{v:editing_node[d]}).v;
+ }
+ }
+ }
+ var rc = editing_node._def.oneditsave.call(editing_node);
+ if (rc === true) {
+ changed = true;
+ }
+
+ for (d in editing_node._def.defaults) {
+ if (editing_node._def.defaults.hasOwnProperty(d)) {
+ if (oldValues[d] === null || typeof oldValues[d] === "string" || typeof oldValues[d] === "number") {
+ if (oldValues[d] !== editing_node[d]) {
+ changes[d] = oldValues[d];
+ changed = true;
+ }
+ } else {
+ if (JSON.stringify(oldValues[d]) !== JSON.stringify(editing_node[d])) {
+ changes[d] = oldValues[d];
+ changed = true;
+ }
+ }
+ }
+ }
+
+
+ }
+
+ if (editing_node._def.defaults) {
+ for (d in editing_node._def.defaults) {
+ if (editing_node._def.defaults.hasOwnProperty(d)) {
+ var input = $("#node-input-"+d);
+ var newValue;
+ if (input.attr('type') === "checkbox") {
+ newValue = input.prop('checked');
+ } else {
+ newValue = input.val();
+ }
+ if (newValue != null) {
+ if (editing_node[d] != newValue) {
+ if (editing_node._def.defaults[d].type) {
+ if (newValue == "_ADD_") {
+ newValue = "";
+ }
+ // Change to a related config node
+ var configNode = RED.nodes.node(editing_node[d]);
+ if (configNode) {
+ var users = configNode.users;
+ users.splice(users.indexOf(editing_node),1);
+ }
+ configNode = RED.nodes.node(newValue);
+ if (configNode) {
+ configNode.users.push(editing_node);
+ }
+ }
+
+ changes[d] = editing_node[d];
+ editing_node[d] = newValue;
+ changed = true;
+ }
+ }
+ }
+ }
+ }
+ if (editing_node._def.credentials) {
+ var prefix = 'node-input';
+ var credDefinition = editing_node._def.credentials;
+ var credsChanged = updateNodeCredentials(editing_node,credDefinition,prefix);
+ changed = changed || credsChanged;
+ }
+
+
+ var removedLinks = updateNodeProperties(editing_node);
+ if (changed) {
+ var wasChanged = editing_node.changed;
+ editing_node.changed = true;
+ RED.view.dirty(true);
+ RED.history.push({t:'edit',node:editing_node,changes:changes,links:removedLinks,dirty:wasDirty,changed:wasChanged});
+ }
+ editing_node.dirty = true;
+ validateNode(editing_node);
+ RED.view.redraw();
+ } else if (RED.view.state() == RED.state.EXPORT) {
+ if (/library/.test($( "#dialog" ).dialog("option","title"))) {
+ //TODO: move this to RED.library
+ var flowName = $("#node-input-filename").val();
+ if (!/^\s*$/.test(flowName)) {
+ $.post('library/flows/'+flowName,$("#node-input-filename").attr('nodes'),function() {
+ RED.library.loadFlowLibrary();
+ RED.notify("Saved nodes","success");
+ });
+ }
+ }
+ } else if (RED.view.state() == RED.state.IMPORT) {
+ RED.view.importNodes($("#node-input-import").val());
+ }
+ $( this ).dialog( "close" );
+ }
+ },
+ {
+ id: "node-dialog-cancel",
+ text: "Cancel",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ],
+ resize: function(e,ui) {
+ if (editing_node) {
+ $(this).dialog('option',"sizeCache-"+editing_node.type,ui.size);
+ }
+ },
+ open: function(e) {
+ RED.keyboard.disable();
+ if (editing_node) {
+ var size = $(this).dialog('option','sizeCache-'+editing_node.type);
+ if (size) {
+ $(this).dialog('option','width',size.width);
+ $(this).dialog('option','height',size.height);
+ }
+ }
+ },
+ close: function(e) {
+ RED.keyboard.enable();
+
+ if (RED.view.state() != RED.state.IMPORT_DRAGGING) {
+ RED.view.state(RED.state.DEFAULT);
+ }
+ $( this ).dialog('option','height','auto');
+ $( this ).dialog('option','width','500');
+ if (editing_node) {
+ RED.sidebar.info.refresh(editing_node);
+ }
+ RED.sidebar.config.refresh();
+ editing_node = null;
+ }
+ });
+
+ /**
+ * Create a config-node select box for this property
+ * @param node - the node being edited
+ * @param property - the name of the field
+ * @param type - the type of the config-node
+ */
+ function prepareConfigNodeSelect(node,property,type) {
+ var input = $("#node-input-"+property);
+ var node_def = RED.nodes.getType(type);
+
+ input.replaceWith('<select style="width: 60%;" id="node-input-'+property+'"></select>');
+ updateConfigNodeSelect(property,type,node[property]);
+ var select = $("#node-input-"+property);
+ select.after(' <a id="node-input-lookup-'+property+'" class="btn"><i class="fa fa-pencil"></i></a>');
+ $('#node-input-lookup-'+property).click(function(e) {
+ showEditConfigNodeDialog(property,type,select.find(":selected").val());
+ e.preventDefault();
+ });
+ var label = "";
+ var configNode = RED.nodes.node(node[property]);
+ if (configNode && node_def.label) {
+ if (typeof node_def.label == "function") {
+ label = node_def.label.call(configNode);
+ } else {
+ label = node_def.label;
+ }
+ }
+ input.val(label);
+ }
+
+ /**
+ * Populate the editor dialog input field for this property
+ * @param node - the node being edited
+ * @param property - the name of the field
+ * @param prefix - the prefix to use in the input element ids (node-input|node-config-input)
+ */
+ function preparePropertyEditor(node,property,prefix) {
+ var input = $("#"+prefix+"-"+property);
+ if (input.attr('type') === "checkbox") {
+ input.prop('checked',node[property]);
+ } else {
+ var val = node[property];
+ if (val == null) {
+ val = "";
+ }
+ input.val(val);
+ }
+ }
+
+ /**
+ * Add an on-change handler to revalidate a node field
+ * @param node - the node being edited
+ * @param definition - the definition of the node
+ * @param property - the name of the field
+ * @param prefix - the prefix to use in the input element ids (node-input|node-config-input)
+ */
+ function attachPropertyChangeHandler(node,definition,property,prefix) {
+ $("#"+prefix+"-"+property).change(function() {
+ if (!validateNodeProperty(node, definition, property,this.value)) {
+ $(this).addClass("input-error");
+ } else {
+ $(this).removeClass("input-error");
+ }
+ });
+ }
+
+ /**
+ * Assign the value to each credential field
+ * @param node
+ * @param credDef
+ * @param credData
+ * @param prefix
+ */
+ function populateCredentialsInputs(node, credDef, credData, prefix) {
+ var cred;
+ for (cred in credDef) {
+ if (credDef.hasOwnProperty(cred)) {
+ if (credDef[cred].type == 'password') {
+ if (credData[cred]) {
+ $('#' + prefix + '-' + cred).val(credData[cred]);
+ } else if (credData['has_' + cred]) {
+ $('#' + prefix + '-' + cred).val('__PWRD__');
+ }
+ else {
+ $('#' + prefix + '-' + cred).val('');
+ }
+ } else {
+ preparePropertyEditor(credData, cred, prefix);
+ }
+ attachPropertyChangeHandler(node, credDef, cred, prefix);
+ }
+ }
+ for (cred in credDef) {
+ if (credDef.hasOwnProperty(cred)) {
+ $("#" + prefix + "-" + cred).change();
+ }
+ }
+ }
+
+ /**
+ * Update the node credentials from the edit form
+ * @param node - the node containing the credentials
+ * @param credDefinition - definition of the credentials
+ * @param prefix - prefix of the input fields
+ * @return {boolean} whether anything has changed
+ */
+ function updateNodeCredentials(node, credDefinition, prefix) {
+ var changed = false;
+ if(!node.credentials) {
+ node.credentials = {_:{}};
+ }
+
+ for (var cred in credDefinition) {
+ if (credDefinition.hasOwnProperty(cred)) {
+ var input = $("#" + prefix + '-' + cred);
+ var value = input.val();
+ if (credDefinition[cred].type == 'password') {
+ node.credentials['has_' + cred] = (value !== "");
+ if (value == '__PWRD__') {
+ continue;
+ }
+ changed = true;
+
+ }
+ node.credentials[cred] = value;
+ if (value != node.credentials._[cred]) {
+ changed = true;
+ }
+ }
+ }
+ return changed;
+ }
+
+ /**
+ * Prepare all of the editor dialog fields
+ * @param node - the node being edited
+ * @param definition - the node definition
+ * @param prefix - the prefix to use in the input element ids (node-input|node-config-input)
+ */
+ function prepareEditDialog(node,definition,prefix) {
+ for (var d in definition.defaults) {
+ if (definition.defaults.hasOwnProperty(d)) {
+ if (definition.defaults[d].type) {
+ prepareConfigNodeSelect(node,d,definition.defaults[d].type);
+ } else {
+ preparePropertyEditor(node,d,prefix);
+ }
+ attachPropertyChangeHandler(node,definition.defaults,d,prefix);
+ }
+ }
+ var completePrepare = function() {
+ if (definition.oneditprepare) {
+ definition.oneditprepare.call(node);
+ }
+ for (var d in definition.defaults) {
+ if (definition.defaults.hasOwnProperty(d)) {
+ $("#"+prefix+"-"+d).change();
+ }
+ }
+ }
+
+ if (definition.credentials) {
+ if (node.credentials) {
+ populateCredentialsInputs(node, definition.credentials, node.credentials, prefix);
+ completePrepare();
+ } else {
+ $.getJSON(getCredentialsURL(node.type, node.id), function (data) {
+ node.credentials = data;
+ node.credentials._ = $.extend(true,{},data);
+ populateCredentialsInputs(node, definition.credentials, node.credentials, prefix);
+ completePrepare();
+ });
+ }
+ } else {
+ completePrepare();
+ }
+ }
+
+ function showEditDialog(node) {
+ editing_node = node;
+ RED.view.state(RED.state.EDITING);
+ $("#dialog-form").html($("script[data-template-name='"+node.type+"']").html());
+ $('<input type="text" style="display: none;" />').appendTo("#dialog-form");
+ prepareEditDialog(node,node._def,"node-input");
+ $( "#dialog" ).dialog("option","title","Edit "+node.type+" node").dialog( "open" );
+ }
+
+ function showEditConfigNodeDialog(name,type,id) {
+ var adding = (id == "_ADD_");
+ var node_def = RED.nodes.getType(type);
+
+ var configNode = RED.nodes.node(id);
+ if (configNode == null) {
+ configNode = {
+ id: (1+Math.random()*4294967295).toString(16),
+ _def: node_def,
+ type: type
+ }
+ for (var d in node_def.defaults) {
+ if (node_def.defaults[d].value) {
+ configNode[d] = node_def.defaults[d].value;
+ }
+ }
+ }
+
+ $("#dialog-config-form").html($("script[data-template-name='"+type+"']").html());
+ prepareEditDialog(configNode,node_def,"node-config-input");
+
+ var buttons = $( "#node-config-dialog" ).dialog("option","buttons");
+ if (adding) {
+ if (buttons.length == 3) {
+ buttons = buttons.splice(1);
+ }
+ buttons[0].text = "Add";
+ $("#node-config-dialog-user-count").html("").hide();
+ } else {
+ if (buttons.length == 2) {
+ buttons.unshift({
+ class: 'leftButton',
+ text: "Delete",
+ click: function() {
+ var configProperty = $(this).dialog('option','node-property');
+ var configId = $(this).dialog('option','node-id');
+ var configType = $(this).dialog('option','node-type');
+ var configNode = RED.nodes.node(configId);
+ var configTypeDef = RED.nodes.getType(configType);
+
+ if (configTypeDef.ondelete) {
+ configTypeDef.ondelete.call(RED.nodes.node(configId));
+ }
+ RED.nodes.remove(configId);
+ for (var i=0;i<configNode.users.length;i++) {
+ var user = configNode.users[i];
+ for (var d in user._def.defaults) {
+ if (user._def.defaults.hasOwnProperty(d) && user[d] == configId) {
+ user[d] = "";
+ }
+ }
+ validateNode(user);
+ }
+ updateConfigNodeSelect(configProperty,configType,"");
+ RED.view.dirty(true);
+ $( this ).dialog( "close" );
+ RED.view.redraw();
+ }
+ });
+ }
+ buttons[1].text = "Update";
+ $("#node-config-dialog-user-count").html(configNode.users.length+" node"+(configNode.users.length==1?" uses":"s use")+" this config").show();
+ }
+ $( "#node-config-dialog" ).dialog("option","buttons",buttons);
+
+ $( "#node-config-dialog" )
+ .dialog("option","node-adding",adding)
+ .dialog("option","node-property",name)
+ .dialog("option","node-id",configNode.id)
+ .dialog("option","node-type",type)
+ .dialog("option","title",(adding?"Add new ":"Edit ")+type+" config node")
+ .dialog( "open" );
+ }
+
+ function updateConfigNodeSelect(name,type,value) {
+ var select = $("#node-input-"+name);
+ var node_def = RED.nodes.getType(type);
+ select.children().remove();
+ RED.nodes.eachConfig(function(config) {
+ if (config.type == type) {
+ var label = "";
+ if (typeof node_def.label == "function") {
+ label = node_def.label.call(config);
+ } else {
+ label = node_def.label;
+ }
+ select.append('<option value="'+config.id+'"'+(value==config.id?" selected":"")+'>'+label+'</option>');
+ }
+ });
+
+ select.append('<option value="_ADD_"'+(value===""?" selected":"")+'>Add new '+type+'...</option>');
+ window.setTimeout(function() { select.change();},50);
+ }
+
+ $( "#node-config-dialog" ).dialog({
+ modal: true,
+ autoOpen: false,
+ width: 500,
+ closeOnEscape: false,
+ buttons: [
+ {
+ id: "node-config-dialog-ok",
+ text: "Ok",
+ click: function() {
+ var configProperty = $(this).dialog('option','node-property');
+ var configId = $(this).dialog('option','node-id');
+ var configType = $(this).dialog('option','node-type');
+ var configAdding = $(this).dialog('option','node-adding');
+ var configTypeDef = RED.nodes.getType(configType);
+ var configNode;
+ var d;
+
+ if (configAdding) {
+ configNode = {type:configType,id:configId,users:[]};
+ for (d in configTypeDef.defaults) {
+ if (configTypeDef.defaults.hasOwnProperty(d)) {
+ configNode[d] = $("#node-config-input-"+d).val();
+ }
+ }
+ configNode.label = configTypeDef.label;
+ configNode._def = configTypeDef;
+ RED.nodes.add(configNode);
+ updateConfigNodeSelect(configProperty,configType,configNode.id);
+ } else {
+ configNode = RED.nodes.node(configId);
+ for (d in configTypeDef.defaults) {
+ if (configTypeDef.defaults.hasOwnProperty(d)) {
+ var input = $("#node-config-input-"+d);
+ if (input.attr('type') === "checkbox") {
+ configNode[d] = input.prop('checked');
+ } else {
+ configNode[d] = input.val();
+ }
+ }
+ }
+ updateConfigNodeSelect(configProperty,configType,configId);
+ }
+ if (configTypeDef.credentials) {
+ updateNodeCredentials(configNode,configTypeDef.credentials,"node-config-input");
+ }
+ if (configTypeDef.oneditsave) {
+ configTypeDef.oneditsave.call(RED.nodes.node(configId));
+ }
+ validateNode(configNode);
+
+ RED.view.dirty(true);
+ $(this).dialog("close");
+
+ }
+ },
+ {
+ id: "node-config-dialog-cancel",
+ text: "Cancel",
+ click: function() {
+ var configType = $(this).dialog('option','node-type');
+ var configId = $(this).dialog('option','node-id');
+ var configAdding = $(this).dialog('option','node-adding');
+ var configTypeDef = RED.nodes.getType(configType);
+
+ if (configTypeDef.oneditcancel) {
+ // TODO: what to pass as this to call
+ if (configTypeDef.oneditcancel) {
+ var cn = RED.nodes.node(configId);
+ if (cn) {
+ configTypeDef.oneditcancel.call(cn,false);
+ } else {
+ configTypeDef.oneditcancel.call({id:configId},true);
+ }
+ }
+ }
+ $( this ).dialog( "close" );
+ }
+ }
+ ],
+ resize: function(e,ui) {
+ },
+ open: function(e) {
+ if (RED.view.state() != RED.state.EDITING) {
+ RED.keyboard.disable();
+ }
+ },
+ close: function(e) {
+ $("#dialog-config-form").html("");
+ if (RED.view.state() != RED.state.EDITING) {
+ RED.keyboard.enable();
+ }
+ RED.sidebar.config.refresh();
+ }
+ });
+
+
+ return {
+ edit: showEditDialog,
+ editConfig: showEditConfigNodeDialog,
+ validateNode: validateNode,
+ updateNodeProperties: updateNodeProperties // TODO: only exposed for edit-undo
+ }
+})();
diff --git a/dgbuilder/public/red/ui/keyboard.js b/dgbuilder/public/red/ui/keyboard.js
new file mode 100644
index 0000000..3bc28c4
--- /dev/null
+++ b/dgbuilder/public/red/ui/keyboard.js
@@ -0,0 +1,68 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+RED.keyboard = (function() {
+
+ var active = true;
+ var handlers = {};
+
+ d3.select(window).on("keydown",function() {
+ if (!active) { return; }
+ var handler = handlers[d3.event.keyCode];
+ if (handler && handler.ondown) {
+ if (!handler.modifiers ||
+ ((!handler.modifiers.shift || d3.event.shiftKey) &&
+ (!handler.modifiers.ctrl || d3.event.ctrlKey ) &&
+ (!handler.modifiers.alt || d3.event.altKey ) )) {
+ handler.ondown();
+ }
+ }
+ });
+ d3.select(window).on("keyup",function() {
+ if (!active) { return; }
+ var handler = handlers[d3.event.keyCode];
+ if (handler && handler.onup) {
+ if (!handler.modifiers ||
+ ((!handler.modifiers.shift || d3.event.shiftKey) &&
+ (!handler.modifiers.ctrl || d3.event.ctrlKey ) &&
+ (!handler.modifiers.alt || d3.event.altKey ) )) {
+ handler.onup();
+ }
+ }
+ });
+ function addHandler(key,modifiers,ondown,onup) {
+ var mod = modifiers;
+ var cbdown = ondown;
+ var cbup = onup;
+
+ if (typeof modifiers == "function") {
+ mod = {};
+ cbdown = modifiers;
+ cbup = ondown;
+ }
+ handlers[key] = {modifiers:mod, ondown:cbdown, onup:cbup};
+ }
+ function removeHandler(key) {
+ delete handlers[key];
+ }
+
+ return {
+ add: addHandler,
+ remove: removeHandler,
+ disable: function(){ active = false;},
+ enable: function(){ active = true; }
+ }
+
+})();
diff --git a/dgbuilder/public/red/ui/library.js b/dgbuilder/public/red/ui/library.js
new file mode 100644
index 0000000..0c803bf
--- /dev/null
+++ b/dgbuilder/public/red/ui/library.js
@@ -0,0 +1,370 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+RED.library = (function() {
+
+
+ function loadFlowLibrary() {
+ $.getJSON("library/flows",function(data) {
+ //console.log(data);
+
+ var buildMenu = function(data,root) {
+ var i;
+ var li;
+ var a;
+ var ul = document.createElement("ul");
+ ul.id = "btn-import-library-submenu";
+ ul.className = "dropdown-menu";
+ if (data.d) {
+ for (i in data.d) {
+ if (data.d.hasOwnProperty(i)) {
+ li = document.createElement("li");
+ li.className = "dropdown-submenu pull-left";
+ a = document.createElement("a");
+ a.href="#";
+ a.innerHTML = i;
+ li.appendChild(a);
+ li.appendChild(buildMenu(data.d[i],root+(root!==""?"/":"")+i));
+ ul.appendChild(li);
+ }
+ }
+ }
+ if (data.f) {
+ for (i in data.f) {
+ if (data.f.hasOwnProperty(i)) {
+ li = document.createElement("li");
+ a = document.createElement("a");
+ a.href="#";
+ a.innerHTML = data.f[i];
+ a.flowName = root+(root!==""?"/":"")+data.f[i];
+ a.onclick = function() {
+ $.get('library/flows/'+this.flowName, function(data) {
+ RED.view.importNodes(data);
+ });
+ };
+ li.appendChild(a);
+ ul.appendChild(li);
+ }
+ }
+ }
+ return ul;
+ };
+ var menu = buildMenu(data,"");
+ //TODO: need an api in RED.menu for this
+ $("#btn-import-library-submenu").replaceWith(menu);
+ });
+ }
+ loadFlowLibrary();
+
+
+
+ function createUI(options) {
+ var libraryData = {};
+ var selectedLibraryItem = null;
+ var libraryEditor = null;
+
+ function buildFileListItem(item) {
+ var li = document.createElement("li");
+ li.onmouseover = function(e) { $(this).addClass("list-hover"); };
+ li.onmouseout = function(e) { $(this).removeClass("list-hover"); };
+ return li;
+ }
+
+ function buildFileList(root,data) {
+ var ul = document.createElement("ul");
+ var li;
+ for (var i=0;i<data.length;i++) {
+ var v = data[i];
+ if (typeof v === "string") {
+ // directory
+ li = buildFileListItem(v);
+ li.onclick = (function () {
+ var dirName = v;
+ return function(e) {
+ var bcli = $('<li class="active"><span class="divider">/</span> <a href="#">'+dirName+'</a></li>');
+ $("a",bcli).click(function(e) {
+ $(this).parent().nextAll().remove();
+ $.getJSON("library/"+options.url+root+dirName,function(data) {
+ $("#node-select-library").children().first().replaceWith(buildFileList(root+dirName+"/",data));
+ });
+ e.stopPropagation();
+ });
+ var bc = $("#node-dialog-library-breadcrumbs");
+ $(".active",bc).removeClass("active");
+ bc.append(bcli);
+ $.getJSON("library/"+options.url+root+dirName,function(data) {
+ $("#node-select-library").children().first().replaceWith(buildFileList(root+dirName+"/",data));
+ });
+ }
+ })();
+ li.innerHTML = '<i class="fa fa-folder"></i> '+v+"</i>";
+ ul.appendChild(li);
+ } else {
+ // file
+ li = buildFileListItem(v);
+ li.innerHTML = v.name;
+ li.onclick = (function() {
+ var item = v;
+ return function(e) {
+ $(".list-selected",ul).removeClass("list-selected");
+ $(this).addClass("list-selected");
+ $.get("library/"+options.url+root+item.fn, function(data) {
+ selectedLibraryItem = item;
+ libraryEditor.setText(data);
+ });
+ }
+ })();
+ ul.appendChild(li);
+ }
+ }
+ return ul;
+ }
+
+/*
+//Commented this portion as is not used by the DGBuilder application
+ $('#node-input-name').addClass('input-append-left').css("width","65%").after(
+ '<div class="btn-group" style="margin-left: 0px;">'+
+ '<button id="node-input-'+options.type+'-lookup" class="btn input-append-right" data-toggle="dropdown"><i class="fa fa-book"></i> <i class="fa fa-caret-down"></i></button>'+
+ '<ul class="dropdown-menu pull-right" role="menu">'+
+ '<li><a id="node-input-'+options.type+'-menu-open-library" tabindex="-1" href="#">Open Library...</a></li>'+
+ '<li><a id="node-input-'+options.type+'-menu-save-library" tabindex="-1" href="#">Save to Library...</a></li>'+
+ '</ul></div>'
+ );
+
+
+
+ $('#node-input-'+options.type+'-menu-open-library').click(function(e) {
+ $("#node-select-library").children().remove();
+ var bc = $("#node-dialog-library-breadcrumbs");
+ bc.children().first().nextAll().remove();
+ libraryEditor.setText('');
+
+ $.getJSON("library/"+options.url,function(data) {
+ $("#node-select-library").append(buildFileList("/",data));
+ $("#node-dialog-library-breadcrumbs a").click(function(e) {
+ $(this).parent().nextAll().remove();
+ $("#node-select-library").children().first().replaceWith(buildFileList("/",data));
+ e.stopPropagation();
+ });
+ $( "#node-dialog-library-lookup" ).dialog( "open" );
+ });
+
+ e.preventDefault();
+ });
+
+ $('#node-input-'+options.type+'-menu-save-library').click(function(e) {
+ //var found = false;
+ var name = $("#node-input-name").val().replace(/(^\s*)|(\s*$)/g,"");
+
+ //var buildPathList = function(data,root) {
+ // var paths = [];
+ // if (data.d) {
+ // for (var i in data.d) {
+ // var dn = root+(root==""?"":"/")+i;
+ // var d = {
+ // label:dn,
+ // files:[]
+ // };
+ // for (var f in data.d[i].f) {
+ // d.files.push(data.d[i].f[f].fn.split("/").slice(-1)[0]);
+ // }
+ // paths.push(d);
+ // paths = paths.concat(buildPathList(data.d[i],root+(root==""?"":"/")+i));
+ // }
+ // }
+ // return paths;
+ //};
+ $("#node-dialog-library-save-folder").attr("value","");
+
+ var filename = name.replace(/[^\w-]/g,"-");
+ if (filename === "") {
+ filename = "unnamed-"+options.type;
+ }
+ $("#node-dialog-library-save-filename").attr("value",filename+".js");
+
+ //var paths = buildPathList(libraryData,"");
+ //$("#node-dialog-library-save-folder").autocomplete({
+ // minLength: 0,
+ // source: paths,
+ // select: function( event, ui ) {
+ // $("#node-dialog-library-save-filename").autocomplete({
+ // minLength: 0,
+ // source: ui.item.files
+ // });
+ // }
+ //});
+
+ $( "#node-dialog-library-save" ).dialog( "open" );
+ e.preventDefault();
+ });
+ require(["orion/editor/edit"], function(edit) {
+ libraryEditor = edit({
+ parent:document.getElementById('node-select-library-text'),
+ lang:"js",
+ readonly: true
+ });
+ });
+
+
+ $( "#node-dialog-library-lookup" ).dialog({
+ title: options.type+" library",
+ modal: true,
+ autoOpen: false,
+ width: 800,
+ height: 450,
+ buttons: [
+ {
+ text: "Ok",
+ click: function() {
+ if (selectedLibraryItem) {
+ for (var i=0;i<options.fields.length;i++) {
+ var field = options.fields[i];
+ $("#node-input-"+field).val(selectedLibraryItem[field]);
+ }
+ options.editor.setText(libraryEditor.getText());
+ }
+ $( this ).dialog( "close" );
+ }
+ },
+ {
+ text: "Cancel",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ],
+ open: function(e) {
+ var form = $("form",this);
+ form.height(form.parent().height()-30);
+ $("#node-select-library-text").height("100%");
+ $(".form-row:last-child",form).children().height(form.height()-60);
+ },
+ resize: function(e) {
+ var form = $("form",this);
+ form.height(form.parent().height()-30);
+ $(".form-row:last-child",form).children().height(form.height()-60);
+ }
+ });
+
+ */
+ function saveToLibrary(overwrite) {
+ var name = $("#node-input-name").val().replace(/(^\s*)|(\s*$)/g,"");
+ if (name === "") {
+ name = "Unnamed "+options.type;
+ }
+ var filename = $("#node-dialog-library-save-filename").val().replace(/(^\s*)|(\s*$)/g,"");
+ var pathname = $("#node-dialog-library-save-folder").val().replace(/(^\s*)|(\s*$)/g,"");
+ if (filename === "" || !/.+\.js$/.test(filename)) {
+ RED.notify("Invalid filename","warning");
+ return;
+ }
+ var fullpath = pathname+(pathname===""?"":"/")+filename;
+ if (!overwrite) {
+ //var pathnameParts = pathname.split("/");
+ //var exists = false;
+ //var ds = libraryData;
+ //for (var pnp in pathnameParts) {
+ // if (ds.d && pathnameParts[pnp] in ds.d) {
+ // ds = ds.d[pathnameParts[pnp]];
+ // } else {
+ // ds = null;
+ // break;
+ // }
+ //}
+ //if (ds && ds.f) {
+ // for (var f in ds.f) {
+ // if (ds.f[f].fn == fullpath) {
+ // exists = true;
+ // break;
+ // }
+ // }
+ //}
+ //if (exists) {
+ // $("#node-dialog-library-save-type").html(options.type);
+ // $("#node-dialog-library-save-name").html(fullpath);
+ // $("#node-dialog-library-save-confirm").dialog( "open" );
+ // return;
+ //}
+ }
+ var queryArgs = [];
+ for (var i=0;i<options.fields.length;i++) {
+ var field = options.fields[i];
+ if (field == "name") {
+ queryArgs.push("name="+encodeURIComponent(name));
+ } else {
+ queryArgs.push(encodeURIComponent(field)+"="+encodeURIComponent($("#node-input-"+field).val()));
+ }
+ }
+ var queryString = queryArgs.join("&");
+
+ var text = options.editor.getText();
+ $.post("library/"+options.url+'/'+fullpath+"?"+queryString,text,function() {
+ RED.notify("Saved "+options.type,"success");
+ });
+ }
+ $( "#node-dialog-library-save-confirm" ).dialog({
+ title: "Save to library",
+ modal: true,
+ autoOpen: false,
+ width: 530,
+ height: 230,
+ buttons: [
+ {
+ text: "Ok",
+ click: function() {
+ saveToLibrary(true);
+ $( this ).dialog( "close" );
+ }
+ },
+ {
+ text: "Cancel",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ]
+ });
+ $( "#node-dialog-library-save" ).dialog({
+ title: "Save to library",
+ modal: true,
+ autoOpen: false,
+ width: 530,
+ height: 230,
+ buttons: [
+ {
+ text: "Ok",
+ click: function() {
+ saveToLibrary(false);
+ $( this ).dialog( "close" );
+ }
+ },
+ {
+ text: "Cancel",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ]
+ });
+
+ }
+
+ return {
+ create: createUI,
+ loadFlowLibrary: loadFlowLibrary
+ }
+})();
+
+
diff --git a/dgbuilder/public/red/ui/menu.js b/dgbuilder/public/red/ui/menu.js
new file mode 100644
index 0000000..07ea5fd
--- /dev/null
+++ b/dgbuilder/public/red/ui/menu.js
@@ -0,0 +1,122 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+
+
+RED.menu = (function() {
+
+ var menuItems = {};
+
+ function createMenuItem(opt) {
+ var item;
+ if (opt === null) {
+ item = $('<li class="divider"></li>');
+ } else {
+ item = $('<li></li>');
+ var link = $('<a '+(opt.id?'id="'+opt.id+'" ':'')+'tabindex="-1" href="#">'+
+ (opt.toggle?'<i class="fa fa-check pull-right"></i>':'')+
+ (opt.icon?'<i class="'+opt.icon+'"></i> ':'')+
+ opt.label+
+ '</a>').appendTo(item);
+
+ menuItems[opt.id] = opt;
+
+ if (opt.onselect) {
+ link.click(function() {
+ if ($(this).parent().hasClass("disabled")) {
+ return;
+ }
+ if (opt.toggle) {
+ setSelected(opt.id,!isSelected(opt.id));
+ } else {
+ opt.onselect.call(opt);
+ }
+ })
+ } else if (opt.href) {
+ link.attr("target","_blank").attr("href",opt.href);
+ }
+ if (opt.options) {
+ item.addClass("dropdown-submenu pull-left");
+ var submenu = $('<ul id="'+opt.id+'-submenu" class="dropdown-menu"></ul>').appendTo(item);
+
+ for (var i=0;i<opt.options.length;i++) {
+ createMenuItem(opt.options[i]).appendTo(submenu);
+ }
+ }
+ if (opt.disabled) {
+ item.addClass("disabled");
+ }
+ }
+
+
+ return item;
+
+ }
+ function createMenu(options) {
+
+ var button = $("#"+options.id);
+
+ var topMenu = $("<ul/>",{class:"dropdown-menu"}).insertAfter(button);
+
+ for (var i=0;i<options.options.length;i++) {
+ var opt = options.options[i];
+ createMenuItem(opt).appendTo(topMenu);
+ }
+ }
+
+ function isSelected(id) {
+ return $("#"+id).hasClass("active");
+ }
+ function setSelected(id,state) {
+ if (isSelected(id) == state) {
+ return;
+ }
+ var opt = menuItems[id];
+ if (state) {
+ $("#"+id).addClass("active");
+ } else {
+ $("#"+id).removeClass("active");
+ }
+ if (opt.onselect) {
+ opt.onselect.call(opt,state);
+ }
+ }
+
+ function setDisabled(id,state) {
+ if (state) {
+ $("#"+id).parent().addClass("disabled");
+ } else {
+ $("#"+id).parent().removeClass("disabled");
+ }
+ }
+
+ function addItem(id,opt) {
+ createMenuItem(opt).appendTo("#"+id+"-submenu");
+ }
+ function removeItem(id) {
+ $("#"+id).parent().remove();
+ }
+
+ return {
+ init: createMenu,
+ setSelected: setSelected,
+ isSelected: isSelected,
+ setDisabled: setDisabled,
+ addItem: addItem,
+ removeItem: removeItem
+ //TODO: add an api for replacing a submenu - see library.js:loadFlowLibrary
+ }
+})();
diff --git a/dgbuilder/public/red/ui/notifications.js b/dgbuilder/public/red/ui/notifications.js
new file mode 100644
index 0000000..c9436c6
--- /dev/null
+++ b/dgbuilder/public/red/ui/notifications.js
@@ -0,0 +1,59 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+RED.notify = (function() {
+ var currentNotifications = [];
+ var c = 0;
+ return function(msg,type,fixed,timeout) {
+ if (currentNotifications.length > 4) {
+ var ll = currentNotifications.length;
+ for (var i = 0;ll > 4 && i<currentNotifications.length;i+=1) {
+ var notifiction = currentNotifications[i];
+ if (!notifiction.fixed) {
+ window.clearTimeout(notifiction.timeoutid);
+ notifiction.close();
+ ll -= 1;
+ }
+ }
+ }
+ var n = document.createElement("div");
+ n.id="red-notification-"+c;
+ n.className = "alert";
+ n.fixed = fixed;
+ if (type) {
+ n.className = "alert alert-"+type;
+ }
+ n.style.display = "none";
+ n.innerHTML = msg;
+ $("#notifications").append(n);
+ $(n).slideDown(300);
+ n.close = (function() {
+ var nn = n;
+ return function() {
+ currentNotifications.splice(currentNotifications.indexOf(nn),1);
+ $(nn).slideUp(300, function() {
+ nn.parentNode.removeChild(nn);
+ });
+ };
+ })();
+ if (!fixed) {
+ n.timeoutid = window.setTimeout(n.close,timeout||3000);
+ }
+ currentNotifications.push(n);
+ c+=1;
+ return n;
+ }
+})();
+
diff --git a/dgbuilder/public/red/ui/palette.js b/dgbuilder/public/red/ui/palette.js
new file mode 100644
index 0000000..f0524e5
--- /dev/null
+++ b/dgbuilder/public/red/ui/palette.js
@@ -0,0 +1,230 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+RED.palette = (function() {
+
+ var exclusion = ['config','unknown','deprecated'];
+ //var core = ['input', 'output', 'function', 'social', 'storage', 'analysis', 'advanced'];
+ var core = ['DGEmain','DGEoutcome','DGEreturn','DGElogic'];
+ function createCategoryContainer(category){
+ var escapedCategory = category.replace(" ","_");
+ $("#palette-container").append('<div class="palette-category">'+
+ '<div id="header-'+category+'" class="palette-header"><i class="expanded fa fa-caret-down"></i><span>'+category.replace("_"," ")+'</span></div>'+
+ '<div class="palette-content" id="palette-base-category-'+category+'">'+
+ '<div id="palette-'+category+'-input"></div>'+
+ '<div id="palette-'+category+'-output"></div>'+
+ '<div id="palette-'+category+'-function"></div>'+
+ '</div>'+
+ '</div>');
+
+ $("#header-"+category).on('click', function(e) {
+ $(this).next().slideToggle();
+ $(this).children("i").toggleClass("expanded");
+ });
+ }
+
+ core.forEach(createCategoryContainer);
+
+ function addNodeType(nt,def) {
+
+ var nodeTypeId = nt.replace(" ","_");
+
+ if ($("#palette_node_"+nodeTypeId).length) {
+ return;
+ }
+
+ if (exclusion.indexOf(def.category)===-1) {
+
+ var category = def.category.replace(" ","_");
+ var rootCategory = category.split("-")[0];
+
+ var d = document.createElement("div");
+ d.id = "palette_node_"+nodeTypeId;
+ d.type = nt;
+
+ // calculate width of label text
+ $.fn.textWidth = function(text, font) {
+ if (!$.fn.textWidth.fakeEl) {
+ $.fn.textWidth.fakeEl = $('<span>').hide().appendTo(document.body);
+ }
+ $.fn.textWidth.fakeEl.text(text || this.val() || this.text()).css('font', font || this.css('font'));
+ return $.fn.textWidth.fakeEl.width();
+ };
+
+ var label;
+
+ if (typeof def.paletteLabel === "undefined") {
+ label = /^(.*?)([ -]in|[ -]out)?$/.exec(nt)[1];
+ } else {
+ label = (typeof def.paletteLabel === "function" ? def.paletteLabel.call(def) : def.paletteLabel)||"";
+ }
+
+ var pixels = $.fn.textWidth(label, '13px helvetica');
+ var nodeWidth = 90;
+ var labelWidth = nodeWidth - 10;
+ var numLines = Math.ceil(pixels / nodeWidth);
+ var multiLine = numLines > 1;
+
+ // styles matching with style.css
+ var nodeHeight = 25;
+ var lineHeight = 16;
+ var portHeight = 10;
+ var multiLineNodeHeight = lineHeight * numLines + (nodeHeight - lineHeight);
+
+ d.innerHTML = '<div class="palette_label"'+
+ (multiLine ? 'style="line-height: '+
+ lineHeight + 'px; margin-top: 5px"' : '')+
+ '>'+label+"</div>";
+ d.className="palette_node";
+ if (def.icon) {
+ d.style.backgroundImage = "url(icons/"+def.icon+")";
+ if (multiLine) {
+ d.style.backgroundSize = "18px 27px";
+ }
+ if (def.align == "right") {
+ d.style.backgroundPosition = "95% 50%";
+ } else if (def.inputs > 0) {
+ d.style.backgroundPosition = "10% 50%";
+ }
+ }
+
+ d.style.backgroundColor = def.color;
+ d.style.height = multiLineNodeHeight + "px";
+
+ if (def.outputs > 0) {
+ var portOut = document.createElement("div");
+ portOut.className = "palette_port palette_port_output";
+ if (multiLine) {
+ portOut.style.top = ((multiLineNodeHeight - portHeight) / 2) + "px";
+ }
+ d.appendChild(portOut);
+ }
+
+ if (def.inputs > 0) {
+ var portIn = document.createElement("div");
+ portIn.className = "palette_port";
+ if (multiLine) {
+ portIn.style.top = ((multiLineNodeHeight - portHeight) / 2) + "px";
+ }
+ d.appendChild(portIn);
+ }
+
+ if ($("#palette-base-category-"+rootCategory).length === 0) {
+ createCategoryContainer(rootCategory);
+ }
+
+ if ($("#palette-"+category).length === 0) {
+ $("#palette-base-category-"+rootCategory).append('<div id="palette-'+category+'"></div>');
+ }
+
+ $("#palette-"+category).append(d);
+ d.onmousedown = function(e) { e.preventDefault(); };
+
+ var popOverContent;
+ try {
+ popOverContent = $("<p><b>"+label+"</b></p>"+($("script[data-help-name|='"+nt+"']").html().trim()||"<p>no information available</p>")).slice(0,2);
+ } catch(err) {
+ // Malformed HTML may cause errors. TODO: need to understand what can break
+ console.log("Error generating pop-over label for '"+nt+"'.");
+ console.log(err.toString());
+ popOverContent = "<p><b>"+label+"</b></p><p>no information available</p>";
+ }
+ $(d).popover({
+ title:d.type,
+ placement:"right",
+ trigger: "hover",
+ delay: { show: 750, hide: 50 },
+ html: true,
+ container:'body',
+ content: popOverContent
+ });
+ $(d).click(function() {
+ var help = '<div class="node-help">'+($("script[data-help-name|='"+d.type+"']").html()||"")+"</div>";
+ $("#tab-info").html(help);
+ });
+ $(d).draggable({
+ helper: 'clone',
+ appendTo: 'body',
+ revert: true,
+ revertDuration: 50
+ });
+ }
+ }
+
+ function removeNodeType(nt) {
+ var nodeTypeId = nt.replace(" ","_");
+ $("#palette_node_"+nodeTypeId).remove();
+ }
+ function hideNodeType(nt) {
+ var nodeTypeId = nt.replace(" ","_");
+ $("#palette_node_"+nodeTypeId).hide();
+ }
+
+ function showNodeType(nt) {
+ var nodeTypeId = nt.replace(" ","_");
+ $("#palette_node_"+nodeTypeId).show();
+ }
+
+ function filterChange() {
+ var val = $("#palette-search-input").val();
+ if (val === "") {
+ $("#palette-search-clear").hide();
+ } else {
+ $("#palette-search-clear").show();
+ }
+
+ var re = new RegExp(val);
+ $(".palette_node").each(function(i,el) {
+ if (val === "" || re.test(el.id)) {
+ $(this).show();
+ } else {
+ $(this).hide();
+ }
+ });
+ }
+
+ $("#palette-search-input").focus(function(e) {
+ RED.keyboard.disable();
+ });
+ $("#palette-search-input").blur(function(e) {
+ RED.keyboard.enable();
+ });
+
+ $("#palette-search-clear").on("click",function(e) {
+ e.preventDefault();
+ $("#palette-search-input").val("");
+ filterChange();
+ $("#palette-search-input").focus();
+ });
+
+ $("#palette-search-input").val("");
+ $("#palette-search-input").on("keyup",function() {
+ filterChange();
+ });
+
+ $("#palette-search-input").on("focus",function() {
+ $("body").one("mousedown",function() {
+ $("#palette-search-input").blur();
+ });
+ });
+
+ return {
+ add:addNodeType,
+ remove:removeNodeType,
+ hide:hideNodeType,
+ show:showNodeType
+ };
+})();
diff --git a/dgbuilder/public/red/ui/sidebar.js b/dgbuilder/public/red/ui/sidebar.js
new file mode 100644
index 0000000..f55e516
--- /dev/null
+++ b/dgbuilder/public/red/ui/sidebar.js
@@ -0,0 +1,154 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+RED.sidebar = (function() {
+
+ //$('#sidebar').tabs();
+ var sidebar_tabs = RED.tabs.create({
+ id:"sidebar-tabs",
+ onchange:function(tab) {
+ $("#sidebar-content").children().hide();
+ $("#"+tab.id).show();
+ },
+ onremove: function(tab) {
+ $("#"+tab.id).remove();
+ }
+ });
+ function addTab(title,content,closeable) {
+ $("#sidebar-content").append(content);
+ $(content).hide();
+ sidebar_tabs.addTab({id:"tab-"+title,label:title,closeable:closeable});
+ //content.style.position = "absolute";
+ //$('#sidebar').tabs("refresh");
+ }
+
+ function removeTab(title) {
+ sidebar_tabs.removeTab("tab-"+title);
+ }
+
+ var sidebarSeparator = {};
+ $("#sidebar-separator").draggable({
+ axis: "x",
+ start:function(event,ui) {
+ sidebarSeparator.closing = false;
+ sidebarSeparator.opening = false;
+ var winWidth = $(window).width();
+ sidebarSeparator.start = ui.position.left;
+ sidebarSeparator.chartWidth = $("#workspace").width();
+ sidebarSeparator.chartRight = winWidth-$("#workspace").width()-$("#workspace").offset().left-2;
+
+
+ if (!RED.menu.isSelected("btn-sidebar")) {
+ sidebarSeparator.opening = true;
+ var newChartRight = 15;
+ $("#sidebar").addClass("closing");
+ $("#workspace").css("right",newChartRight);
+ $("#chart-zoom-controls").css("right",newChartRight+20);
+ $("#sidebar").width(0);
+ RED.menu.setSelected("btn-sidebar",true);
+ RED.view.resize();
+ }
+
+
+ sidebarSeparator.width = $("#sidebar").width();
+ },
+ drag: function(event,ui) {
+ var d = ui.position.left-sidebarSeparator.start;
+ var newSidebarWidth = sidebarSeparator.width-d;
+ if (sidebarSeparator.opening) {
+ newSidebarWidth -= 13;
+ }
+
+ if (newSidebarWidth > 150) {
+ if (sidebarSeparator.chartWidth+d < 200) {
+ ui.position.left = 200+sidebarSeparator.start-sidebarSeparator.chartWidth;
+ d = ui.position.left-sidebarSeparator.start;
+ newSidebarWidth = sidebarSeparator.width-d;
+ }
+ }
+
+ if (newSidebarWidth < 150) {
+ if (!sidebarSeparator.closing) {
+ $("#sidebar").addClass("closing");
+ sidebarSeparator.closing = true;
+ }
+ if (!sidebarSeparator.opening) {
+ newSidebarWidth = 150;
+ ui.position.left = sidebarSeparator.width-(150 - sidebarSeparator.start);
+ d = ui.position.left-sidebarSeparator.start;
+ }
+ } else if (newSidebarWidth > 150 && (sidebarSeparator.closing || sidebarSeparator.opening)) {
+ sidebarSeparator.closing = false;
+ $("#sidebar").removeClass("closing");
+ }
+
+ var newChartRight = sidebarSeparator.chartRight-d;
+ $("#workspace").css("right",newChartRight);
+ $("#chart-zoom-controls").css("right",newChartRight+20);
+ $("#sidebar").width(newSidebarWidth);
+
+ sidebar_tabs.resize();
+ RED.view.resize();
+
+ },
+ stop:function(event,ui) {
+ RED.view.resize();
+ if (sidebarSeparator.closing) {
+ $("#sidebar").removeClass("closing");
+ RED.menu.setSelected("btn-sidebar",false);
+ if ($("#sidebar").width() < 180) {
+ $("#sidebar").width(180);
+ $("#workspace").css("right",208);
+ $("#chart-zoom-controls").css("right",228);
+ }
+ }
+ $("#sidebar-separator").css("left","auto");
+ $("#sidebar-separator").css("right",($("#sidebar").width()+13)+"px");
+ }
+ });
+
+ function toggleSidebar(state) {
+ if (!state) {
+ $("#main-container").addClass("sidebar-closed");
+ } else {
+ $("#main-container").removeClass("sidebar-closed");
+ }
+ }
+
+ function showSidebar(id) {
+ RED.menu.setSelected("btn-sidebar",true);
+ sidebar_tabs.activateTab("tab-"+id);
+ }
+
+ function containsTab(id) {
+ return sidebar_tabs.contains("tab-"+id);
+ }
+
+
+ $(function() {
+ RED.keyboard.add(/* SPACE */ 32,{ctrl:true},function(){RED.menu.setSelected("btn-sidebar",!RED.menu.isSelected("btn-sidebar"));d3.event.preventDefault();});
+ showSidebar("info");
+ });
+
+
+ return {
+ addTab: addTab,
+ removeTab: removeTab,
+ show: showSidebar,
+ containsTab: containsTab,
+ toggleSidebar: toggleSidebar
+ }
+
+})();
diff --git a/dgbuilder/public/red/ui/state.js b/dgbuilder/public/red/ui/state.js
new file mode 100644
index 0000000..419b04b
--- /dev/null
+++ b/dgbuilder/public/red/ui/state.js
@@ -0,0 +1,26 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+RED.state = {
+ DEFAULT: 0,
+ MOVING: 1,
+ JOINING: 2,
+ MOVING_ACTIVE: 3,
+ ADDING: 4,
+ EDITING: 5,
+ EXPORT: 6,
+ IMPORT: 7,
+ IMPORT_DRAGGING: 8
+}
diff --git a/dgbuilder/public/red/ui/tab-config.js b/dgbuilder/public/red/ui/tab-config.js
new file mode 100644
index 0000000..6ef6ba0
--- /dev/null
+++ b/dgbuilder/public/red/ui/tab-config.js
@@ -0,0 +1,84 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+RED.sidebar.config = (function() {
+
+ var content = document.createElement("div");
+ content.id = "tab-config";
+ content.style.paddingTop = "4px";
+ content.style.paddingLeft = "4px";
+ content.style.paddingRight = "4px";
+
+ var list = $("<ul>",{class:"tab-config-list"}).appendTo(content);
+
+ function show() {
+ if (!RED.sidebar.containsTab("config")) {
+ RED.sidebar.addTab("config",content,true);
+ }
+ refresh();
+ RED.sidebar.show("config");
+ }
+
+ function refresh() {
+ list.empty();
+ RED.nodes.eachConfig(function(node) {
+ var li = list.find("#tab-config-list-type-"+node.type);
+ if (li.length === 0) {
+ li = $("<li>",{id:"tab-config-list-type-"+node.type}).appendTo(list);
+ $('<div class="tab-config-list-type">'+node.type+'</div>').appendTo(li);
+ }
+ var label = "";
+ if (typeof node._def.label == "function") {
+ label = node._def.label.call(node);
+ } else {
+ label = node._def.label;
+ }
+ label = label || " ";
+
+ var entry = $('<div class="tab-config-list-entry"></div>').appendTo(li);
+ entry.on('dblclick',function(e) {
+ RED.editor.editConfig("", node.type, node.id);
+ });
+
+ var userArray = node.users.map(function(n) { return n.id });
+ entry.on('mouseover',function(e) {
+ RED.nodes.eachNode(function(node) {
+ if( userArray.indexOf(node.id) != -1) {
+ node.highlighted = true;
+ node.dirty = true;
+ }
+ });
+ RED.view.redraw();
+ });
+
+ entry.on('mouseout',function(e) {
+ RED.nodes.eachNode(function(node) {
+ if(node.highlighted) {
+ node.highlighted = false;
+ node.dirty = true;
+ }
+ });
+ RED.view.redraw();
+ });
+
+ $('<div class="tab-config-list-label">'+label+'</div>').appendTo(entry);
+ $('<div class="tab-config-list-users">'+node.users.length+'</div>').appendTo(entry);
+ });
+ }
+ return {
+ show:show,
+ refresh:refresh
+ }
+})();
diff --git a/dgbuilder/public/red/ui/tab-info.js b/dgbuilder/public/red/ui/tab-info.js
new file mode 100644
index 0000000..bb8eb04
--- /dev/null
+++ b/dgbuilder/public/red/ui/tab-info.js
@@ -0,0 +1,90 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+RED.sidebar.info = (function() {
+
+ var content = document.createElement("div");
+ content.id = "tab-info";
+ content.style.paddingTop = "4px";
+ content.style.paddingLeft = "4px";
+ content.style.paddingRight = "4px";
+
+ RED.sidebar.addTab("info",content);
+
+ function jsonFilter(key,value) {
+ if (key === "") {
+ return value;
+ }
+ var t = typeof value;
+ if ($.isArray(value)) {
+ return "[array:"+value.length+"]";
+ } else if (t === "object") {
+ return "[object]"
+ } else if (t === "string") {
+ if (value.length > 30) {
+ return value.substring(0,30)+" ...";
+ }
+ }
+ return value;
+ }
+
+ function refresh(node) {
+ var table = '<table class="node-info"><tbody>';
+
+ table += '<tr class="blank"><td colspan="2">Node</td></tr>';
+ table += "<tr><td>Type</td><td> "+node.type+"</td></tr>";
+ table += "<tr><td>ID</td><td> "+node.id+"</td></tr>";
+ table += '<tr class="blank"><td colspan="2">Properties</td></tr>';
+ for (var n in node._def.defaults) {
+ if (node._def.defaults.hasOwnProperty(n)) {
+ var val = node[n]||"";
+ var type = typeof val;
+ if (type === "string") {
+ if (val.length > 30) {
+ val = val.substring(0,30)+" ...";
+ }
+ val = val.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
+ } else if (type === "number") {
+ val = val.toString();
+ } else if ($.isArray(val)) {
+ val = "[<br/>";
+ for (var i=0;i<Math.min(node[n].length,10);i++) {
+ var vv = JSON.stringify(node[n][i],jsonFilter," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
+ val += " "+i+": "+vv+"<br/>";
+ }
+ if (node[n].length > 10) {
+ val += " ... "+node[n].length+" items<br/>";
+ }
+ val += "]";
+ } else {
+ val = JSON.stringify(val,jsonFilter," ");
+ val = val.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
+ }
+
+ table += "<tr><td> "+n+"</td><td>"+val+"</td></tr>";
+ }
+ }
+ table += "</tbody></table><br/>";
+ table += '<div class="node-help">'+($("script[data-help-name|='"+node.type+"']").html()||"")+"</div>";
+ $("#tab-info").html(table);
+ }
+
+ return {
+ refresh:refresh,
+ clear: function() {
+ $("#tab-info").html("");
+ }
+ }
+})();
diff --git a/dgbuilder/public/red/ui/tabs.js b/dgbuilder/public/red/ui/tabs.js
new file mode 100644
index 0000000..aa20758
--- /dev/null
+++ b/dgbuilder/public/red/ui/tabs.js
@@ -0,0 +1,127 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+
+
+RED.tabs = (function() {
+
+
+ function createTabs(options) {
+ var tabs = {};
+
+ var ul = $("#"+options.id)
+ ul.addClass("red-ui-tabs");
+ ul.children().first().addClass("active");
+ ul.children().addClass("red-ui-tab");
+
+ function onTabClick() {
+ activateTab($(this));
+ return false;
+ }
+
+ function onTabDblClick() {
+ if (options.ondblclick) {
+ options.ondblclick(tabs[$(this).attr('href').slice(1)]);
+ }
+ return false;
+ }
+
+ function activateTab(link) {
+ if (typeof link === "string") {
+ link = ul.find("a[href='#"+link+"']");
+ }
+ if (!link.parent().hasClass("active")) {
+ ul.children().removeClass("active");
+ link.parent().addClass("active");
+ if (options.onchange) {
+ options.onchange(tabs[link.attr('href').slice(1)]);
+ }
+ }
+ }
+
+ function updateTabWidths() {
+ var tabs = ul.find("li.red-ui-tab");
+ var width = ul.width();
+ var tabCount = tabs.size();
+ var tabWidth = (width-6-(tabCount*7))/tabCount;
+ var pct = 100*tabWidth/width;
+ tabs.css({width:pct+"%"});
+ }
+
+ ul.find("li.red-ui-tab a").on("click",onTabClick).on("dblclick",onTabDblClick);
+ updateTabWidths();
+
+
+ function removeTab(id) {
+ var li = ul.find("a[href='#"+id+"']").parent();
+ if (li.hasClass("active")) {
+ var tab = li.prev();
+ if (tab.size() === 0) {
+ tab = li.next();
+ }
+ activateTab(tab.find("a"));
+ }
+ li.remove();
+ if (options.onremove) {
+ options.onremove(tabs[id]);
+ }
+ delete tabs[id];
+ updateTabWidths();
+ }
+
+ return {
+ addTab: function(tab) {
+ tabs[tab.id] = tab;
+ var li = $("<li/>",{class:"red-ui-tab"}).appendTo(ul);
+ var link = $("<a/>",{href:"#"+tab.id, class:"red-ui-tab-label"}).appendTo(li);
+ link.html(tab.label);
+
+ link.on("click",onTabClick);
+ link.on("dblclick",onTabDblClick);
+ if (tab.closeable) {
+ var closeLink = $("<a/>",{href:"#",class:"red-ui-tab-close"}).appendTo(li);
+ closeLink.html('<i class="fa fa-times" />');
+
+ closeLink.on("click",function(event) {
+ removeTab(tab.id);
+ });
+ }
+ updateTabWidths();
+ if (options.onadd) {
+ options.onadd(tab);
+ }
+ link.attr("title",tab.label);
+ if (ul.find("li.red-ui-tab").size() == 1) {
+ activateTab(link);
+ }
+ },
+ removeTab: removeTab,
+ activateTab: activateTab,
+ resize: updateTabWidths,
+ count: function() {
+ return ul.find("li.red-ui-tab").size();
+ },
+ contains: function(id) {
+ return ul.find("a[href='#"+id+"']").length > 0;
+ }
+
+ }
+ }
+
+ return {
+ create: createTabs
+ }
+})();
diff --git a/dgbuilder/public/red/ui/touch/radialMenu.js b/dgbuilder/public/red/ui/touch/radialMenu.js
new file mode 100644
index 0000000..ffb6a71
--- /dev/null
+++ b/dgbuilder/public/red/ui/touch/radialMenu.js
@@ -0,0 +1,184 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+RED.touch = RED.touch||{};
+RED.touch.radialMenu = (function() {
+
+
+ var touchMenu = null;
+ var isActive = false;
+ var isOutside = false;
+ var activeOption = null;
+
+
+ function createRadial(obj,pos,options) {
+ isActive = true;
+ try {
+ var w = $("body").width();
+ var h = $("body").height();
+
+ touchMenu = d3.select("body").append("div")
+ .style({
+ position:"absolute",
+ top: 0,
+ left:0,
+ bottom:0,
+ right:0,
+ "z-index": 1000
+ })
+ .on('touchstart',function() {
+ hide();
+ d3.event.preventDefault();
+ });
+
+
+
+
+ var menu = touchMenu.append("div")
+ .style({
+ position: "absolute",
+ top: (pos[1]-80)+"px",
+ left:(pos[0]-80)+"px",
+ "border-radius": "80px",
+ width: "160px",
+ height: "160px",
+ background: "rgba(255,255,255,0.6)",
+ border: "1px solid #666"
+ });
+
+ var menuOpts = [];
+ var createMenuOpt = function(x,y,opt) {
+ opt.el = menu.append("div")
+ .style({
+ position: "absolute",
+ top: (y+80-25)+"px",
+ left:(x+80-25)+"px",
+ "border-radius": "20px",
+ width: "50px",
+ height: "50px",
+ background: "#fff",
+ border: "2px solid #666",
+ "text-align": "center",
+ "line-height":"50px"
+ });
+
+ opt.el.html(opt.name);
+
+ if (opt.disabled) {
+ opt.el.style({"border-color":"#ccc",color:"#ccc"});
+ }
+ opt.x = x;
+ opt.y = y;
+ menuOpts.push(opt);
+
+ opt.el.on('touchstart',function() {
+ opt.el.style("background","#999");
+ d3.event.preventDefault();
+ d3.event.stopPropagation();
+ });
+ opt.el.on('touchend',function() {
+ hide();
+ opt.onselect();
+ d3.event.preventDefault();
+ d3.event.stopPropagation();
+ });
+ }
+
+ var n = options.length;
+ var dang = Math.max(Math.PI/(n-1),Math.PI/4);
+ var ang = Math.PI;
+ for (var i=0;i<n;i++) {
+ var x = Math.floor(Math.cos(ang)*80);
+ var y = Math.floor(Math.sin(ang)*80);
+ if (options[i].name) {
+ createMenuOpt(x,y,options[i]);
+ }
+ ang += dang;
+ }
+
+
+ var hide = function() {
+ isActive = false;
+ activeOption = null;
+ touchMenu.remove();
+ touchMenu = null;
+ }
+
+ obj.on('touchend.radial',function() {
+ obj.on('touchend.radial',null);
+ obj.on('touchmenu.radial',null);
+
+ if (activeOption) {
+ try {
+ activeOption.onselect();
+ } catch(err) {
+ RED._debug(err);
+ }
+ hide();
+ } else if (isOutside) {
+ hide();
+ }
+ });
+
+
+
+ obj.on('touchmove.radial',function() {
+ try {
+ var touch0 = d3.event.touches.item(0);
+ var p = [touch0.pageX - pos[0],touch0.pageY-pos[1]];
+ for (var i=0;i<menuOpts.length;i++) {
+ var opt = menuOpts[i];
+ if (!opt.disabled) {
+ if (p[0]>opt.x-30 && p[0]<opt.x+30 && p[1]>opt.y-30 && p[1]<opt.y+30) {
+ if (opt !== activeOption) {
+ opt.el.style("background","#999");
+ activeOption = opt;
+ }
+ } else if (opt === activeOption) {
+ opt.el.style("background","#fff");
+ activeOption = null;
+ } else {
+ opt.el.style("background","#fff");
+ }
+ }
+ }
+ if (!activeOption) {
+ var d = Math.abs((p[0]*p[0])+(p[1]*p[1]));
+ isOutside = (d > 80*80);
+ }
+
+ } catch(err) {
+ RED._debug(err);
+ }
+
+
+ });
+
+ } catch(err) {
+ RED._debug(err);
+ }
+ }
+
+
+ return {
+ show: createRadial,
+ active: function() {
+ return isActive;
+ }
+ }
+
+})();
+
diff --git a/dgbuilder/public/red/ui/view.js b/dgbuilder/public/red/ui/view.js
new file mode 100644
index 0000000..0109d1e
--- /dev/null
+++ b/dgbuilder/public/red/ui/view.js
@@ -0,0 +1,2053 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+
+RED.view = (function() {
+ /* increasing the width and height from 5000 to 7500*/
+ var space_width = 7500,
+ space_height = 7500,
+ lineCurveScale = 0.75,
+ scaleFactor = 1,
+ node_width = 100,
+ node_height = 30;
+
+ var touchLongPressTimeout = 1000,
+ startTouchDistance = 0,
+ startTouchCenter = [],
+ moveTouchCenter = [],
+ touchStartTime = 0;
+
+
+ var activeWorkspace = 0;
+ var workspaceScrollPositions = {};
+
+ var selected_link = null,
+ mousedown_link = null,
+ mousedown_node = null,
+ mousedown_port_type = null,
+ mousedown_port_index = 0,
+ mouseup_node = null,
+ mouse_offset = [0,0],
+ mouse_position = null,
+ mouse_mode = 0,
+ moving_set = [],
+ dirty = false,
+ lasso = null,
+ showStatus = false,
+ showNumbers = false,
+ showNodePalette = true,
+ lastClickNode = null,
+ dblClickPrimed = null,
+ clickTime = 0,
+ clickElapsed = 0;
+
+ var clipboard = "";
+
+ var status_colours = {
+ "red": "#c00",
+ "green": "#5a8",
+ "yellow": "#F9DF31",
+ "blue": "#53A3F3",
+ "grey": "#d3d3d3"
+ }
+
+ var outer = d3.select("#chart")
+ .append("svg:svg")
+ .attr("width", space_width)
+ .attr("height", space_height)
+ .attr("pointer-events", "all")
+ .style("cursor","crosshair");
+
+ var vis = outer
+ .append('svg:g')
+ .on("dblclick.zoom", null)
+ .append('svg:g')
+ .on("mousemove", canvasMouseMove)
+ .on("mousedown", canvasMouseDown)
+ .on("mouseup", canvasMouseUp)
+ .on("touchend", function() {
+ clearTimeout(touchStartTime);
+ touchStartTime = null;
+ if (RED.touch.radialMenu.active()) {
+ return;
+ }
+ if (lasso) {
+ outer_background.attr("fill","#fff");
+ }
+ canvasMouseUp.call(this);
+ })
+ .on("touchcancel", canvasMouseUp)
+ .on("touchstart", function() {
+ var touch0;
+ if (d3.event.touches.length>1) {
+ clearTimeout(touchStartTime);
+ touchStartTime = null;
+ d3.event.preventDefault();
+ touch0 = d3.event.touches.item(0);
+ var touch1 = d3.event.touches.item(1);
+ var a = touch0['pageY']-touch1['pageY'];
+ var b = touch0['pageX']-touch1['pageX'];
+
+ var offset = $("#chart").offset();
+ var scrollPos = [$("#chart").scrollLeft(),$("#chart").scrollTop()];
+ startTouchCenter = [
+ (touch1['pageX']+(b/2)-offset.left+scrollPos[0])/scaleFactor,
+ (touch1['pageY']+(a/2)-offset.top+scrollPos[1])/scaleFactor
+ ];
+ moveTouchCenter = [
+ touch1['pageX']+(b/2),
+ touch1['pageY']+(a/2)
+ ]
+ startTouchDistance = Math.sqrt((a*a)+(b*b));
+ } else {
+ var obj = d3.select(document.body);
+ touch0 = d3.event.touches.item(0);
+ var pos = [touch0.pageX,touch0.pageY];
+ startTouchCenter = [touch0.pageX,touch0.pageY];
+ startTouchDistance = 0;
+ var point = d3.touches(this)[0];
+ touchStartTime = setTimeout(function() {
+ touchStartTime = null;
+ showTouchMenu(obj,pos);
+ //lasso = vis.append('rect')
+ // .attr("ox",point[0])
+ // .attr("oy",point[1])
+ // .attr("rx",2)
+ // .attr("ry",2)
+ // .attr("x",point[0])
+ // .attr("y",point[1])
+ // .attr("width",0)
+ // .attr("height",0)
+ // .attr("class","lasso");
+ //outer_background.attr("fill","#e3e3f3");
+ },touchLongPressTimeout);
+ }
+ })
+ .on("touchmove", function(){
+ if (RED.touch.radialMenu.active()) {
+ d3.event.preventDefault();
+ return;
+ }
+ var touch0;
+ if (d3.event.touches.length<2) {
+ if (touchStartTime) {
+ touch0 = d3.event.touches.item(0);
+ var dx = (touch0.pageX-startTouchCenter[0]);
+ var dy = (touch0.pageY-startTouchCenter[1]);
+ var d = Math.abs(dx*dx+dy*dy);
+ if (d > 64) {
+ clearTimeout(touchStartTime);
+ touchStartTime = null;
+ }
+ } else if (lasso) {
+ d3.event.preventDefault();
+ }
+ canvasMouseMove.call(this);
+ } else {
+ touch0 = d3.event.touches.item(0);
+ var touch1 = d3.event.touches.item(1);
+ var a = touch0['pageY']-touch1['pageY'];
+ var b = touch0['pageX']-touch1['pageX'];
+ var offset = $("#chart").offset();
+ var scrollPos = [$("#chart").scrollLeft(),$("#chart").scrollTop()];
+ var moveTouchDistance = Math.sqrt((a*a)+(b*b));
+ var touchCenter = [
+ touch1['pageX']+(b/2),
+ touch1['pageY']+(a/2)
+ ];
+
+ if (!isNaN(moveTouchDistance)) {
+ oldScaleFactor = scaleFactor;
+ scaleFactor = Math.min(2,Math.max(0.3, scaleFactor + (Math.floor(((moveTouchDistance*100)-(startTouchDistance*100)))/10000)));
+
+ var deltaTouchCenter = [ // Try to pan whilst zooming - not 100%
+ startTouchCenter[0]*(scaleFactor-oldScaleFactor),//-(touchCenter[0]-moveTouchCenter[0]),
+ startTouchCenter[1]*(scaleFactor-oldScaleFactor) //-(touchCenter[1]-moveTouchCenter[1])
+ ];
+
+ startTouchDistance = moveTouchDistance;
+ moveTouchCenter = touchCenter;
+
+ $("#chart").scrollLeft(scrollPos[0]+deltaTouchCenter[0]);
+ $("#chart").scrollTop(scrollPos[1]+deltaTouchCenter[1]);
+ redraw();
+ }
+ }
+ });
+
+ var outer_background = vis.append('svg:rect')
+ .attr('width', space_width)
+ .attr('height', space_height)
+ .attr('fill','#fff');
+
+ //var gridScale = d3.scale.linear().range([0,2000]).domain([0,2000]);
+ //var grid = vis.append('g');
+ //
+ //grid.selectAll("line.horizontal").data(gridScale.ticks(100)).enter()
+ // .append("line")
+ // .attr(
+ // {
+ // "class":"horizontal",
+ // "x1" : 0,
+ // "x2" : 2000,
+ // "y1" : function(d){ return gridScale(d);},
+ // "y2" : function(d){ return gridScale(d);},
+ // "fill" : "none",
+ // "shape-rendering" : "crispEdges",
+ // "stroke" : "#eee",
+ // "stroke-width" : "1px"
+ // });
+ //grid.selectAll("line.vertical").data(gridScale.ticks(100)).enter()
+ // .append("line")
+ // .attr(
+ // {
+ // "class":"vertical",
+ // "y1" : 0,
+ // "y2" : 2000,
+ // "x1" : function(d){ return gridScale(d);},
+ // "x2" : function(d){ return gridScale(d);},
+ // "fill" : "none",
+ // "shape-rendering" : "crispEdges",
+ // "stroke" : "#eee",
+ // "stroke-width" : "1px"
+ // });
+
+
+ var drag_line = vis.append("svg:path").attr("class", "drag_line");
+
+ var workspace_tabs = RED.tabs.create({
+ id: "workspace-tabs",
+ onchange: function(tab) {
+ if (tab.type == "subflow") {
+ $("#workspace-toolbar").show();
+ } else {
+ $("#workspace-toolbar").hide();
+ }
+ var chart = $("#chart");
+ if (activeWorkspace !== 0) {
+ workspaceScrollPositions[activeWorkspace] = {
+ left:chart.scrollLeft(),
+ top:chart.scrollTop()
+ };
+ }
+ var scrollStartLeft = chart.scrollLeft();
+ var scrollStartTop = chart.scrollTop();
+
+ activeWorkspace = tab.id;
+ if (workspaceScrollPositions[activeWorkspace]) {
+ chart.scrollLeft(workspaceScrollPositions[activeWorkspace].left);
+ chart.scrollTop(workspaceScrollPositions[activeWorkspace].top);
+ } else {
+ chart.scrollLeft(0);
+ chart.scrollTop(0);
+ }
+ var scrollDeltaLeft = chart.scrollLeft() - scrollStartLeft;
+ var scrollDeltaTop = chart.scrollTop() - scrollStartTop;
+ if (mouse_position != null) {
+ mouse_position[0] += scrollDeltaLeft;
+ mouse_position[1] += scrollDeltaTop;
+ }
+
+ clearSelection();
+ RED.nodes.eachNode(function(n) {
+ n.dirty = true;
+ });
+ redraw();
+ },
+ ondblclick: function(tab) {
+ showRenameWorkspaceDialog(tab.id);
+ },
+ onadd: function(tab) {
+ RED.menu.addItem("btn-workspace-menu",{
+ id:"btn-workspace-menu-"+tab.id.replace(".","-"),
+ label:tab.label,
+ onselect:function() {
+ workspace_tabs.activateTab(tab.id);
+ }
+ });
+ RED.menu.setDisabled("btn-workspace-delete",workspace_tabs.count() == 1);
+ },
+ onremove: function(tab) {
+ RED.menu.setDisabled("btn-workspace-delete",workspace_tabs.count() == 1);
+ RED.menu.removeItem("btn-workspace-menu-"+tab.id.replace(".","-"));
+ }
+ });
+
+ var workspaceIndex = 0;
+
+ function addWorkspace() {
+ var tabId = RED.nodes.id();
+ do {
+ workspaceIndex += 1;
+ } while($("#workspace-tabs a[title='Sheet "+workspaceIndex+"']").size() !== 0);
+
+ var ws = {type:"tab",id:tabId,label:"Sheet "+workspaceIndex};
+ RED.nodes.addWorkspace(ws);
+ workspace_tabs.addTab(ws);
+ workspace_tabs.activateTab(tabId);
+ RED.history.push({t:'add',workspaces:[ws],dirty:dirty});
+ RED.view.dirty(true);
+ }
+ $(function() {
+ $('#btn-workspace-add-tab').on("click",addWorkspace);
+ $('#btn-workspace-add').on("click",addWorkspace);
+ $('#btn-workspace-edit').on("click",function() {
+ showRenameWorkspaceDialog(activeWorkspace);
+ });
+ $('#btn-workspace-delete').on("click",function() {
+ deleteWorkspace(activeWorkspace);
+ });
+ });
+
+ function deleteWorkspace(id) {
+ if (workspace_tabs.count() == 1) {
+ return;
+ }
+ var ws = RED.nodes.workspace(id);
+ $( "#node-dialog-delete-workspace" ).dialog('option','workspace',ws);
+ $( "#node-dialog-delete-workspace-name" ).text(ws.label);
+ $( "#node-dialog-delete-workspace" ).dialog('open');
+ }
+
+ function canvasMouseDown() {
+ if (!mousedown_node && !mousedown_link) {
+ selected_link = null;
+ updateSelection();
+ }
+ if (mouse_mode === 0) {
+ if (lasso) {
+ lasso.remove();
+ lasso = null;
+ }
+
+ if (!touchStartTime) {
+ var point = d3.mouse(this);
+ lasso = vis.append('rect')
+ .attr("ox",point[0])
+ .attr("oy",point[1])
+ .attr("rx",2)
+ .attr("ry",2)
+ .attr("x",point[0])
+ .attr("y",point[1])
+ .attr("width",0)
+ .attr("height",0)
+ .attr("class","lasso");
+ d3.event.preventDefault();
+ }
+ }
+ }
+
+ function canvasMouseMove() {
+ mouse_position = d3.touches(this)[0]||d3.mouse(this);
+
+ // Prevent touch scrolling...
+ //if (d3.touches(this)[0]) {
+ // d3.event.preventDefault();
+ //}
+
+ // TODO: auto scroll the container
+ //var point = d3.mouse(this);
+ //if (point[0]-container.scrollLeft < 30 && container.scrollLeft > 0) { container.scrollLeft -= 15; }
+ //console.log(d3.mouse(this),container.offsetWidth,container.offsetHeight,container.scrollLeft,container.scrollTop);
+
+ if (lasso) {
+ var ox = parseInt(lasso.attr("ox"));
+ var oy = parseInt(lasso.attr("oy"));
+ var x = parseInt(lasso.attr("x"));
+ var y = parseInt(lasso.attr("y"));
+ var w;
+ var h;
+ if (mouse_position[0] < ox) {
+ x = mouse_position[0];
+ w = ox-x;
+ } else {
+ w = mouse_position[0]-x;
+ }
+ if (mouse_position[1] < oy) {
+ y = mouse_position[1];
+ h = oy-y;
+ } else {
+ h = mouse_position[1]-y;
+ }
+ lasso
+ .attr("x",x)
+ .attr("y",y)
+ .attr("width",w)
+ .attr("height",h)
+ ;
+ return;
+ }
+
+ if (mouse_mode != RED.state.IMPORT_DRAGGING && !mousedown_node && selected_link == null) {
+ return;
+ }
+
+ var mousePos;
+ if (mouse_mode == RED.state.JOINING) {
+ // update drag line
+ drag_line.attr("class", "drag_line");
+ mousePos = mouse_position;
+ var numOutputs = (mousedown_port_type === 0)?(mousedown_node.outputs || 1):1;
+ var sourcePort = mousedown_port_index;
+ var portY = -((numOutputs-1)/2)*13 +13*sourcePort;
+
+ var sc = (mousedown_port_type === 0)?1:-1;
+
+ var dy = mousePos[1]-(mousedown_node.y+portY);
+ var dx = mousePos[0]-(mousedown_node.x+sc*mousedown_node.w/2);
+ var delta = Math.sqrt(dy*dy+dx*dx);
+ var scale = lineCurveScale;
+ var scaleY = 0;
+
+ if (delta < node_width) {
+ scale = 0.75-0.75*((node_width-delta)/node_width);
+ }
+ if (dx*sc < 0) {
+ scale += 2*(Math.min(5*node_width,Math.abs(dx))/(5*node_width));
+ if (Math.abs(dy) < 3*node_height) {
+ scaleY = ((dy>0)?0.5:-0.5)*(((3*node_height)-Math.abs(dy))/(3*node_height))*(Math.min(node_width,Math.abs(dx))/(node_width)) ;
+ }
+ }
+
+ drag_line.attr("d",
+ "M "+(mousedown_node.x+sc*mousedown_node.w/2)+" "+(mousedown_node.y+portY)+
+ " C "+(mousedown_node.x+sc*(mousedown_node.w/2+node_width*scale))+" "+(mousedown_node.y+portY+scaleY*node_height)+" "+
+ (mousePos[0]-sc*(scale)*node_width)+" "+(mousePos[1]-scaleY*node_height)+" "+
+ mousePos[0]+" "+mousePos[1]
+ );
+ d3.event.preventDefault();
+ } else if (mouse_mode == RED.state.MOVING) {
+ //console.log("node mouse moving");
+ mousePos = mouse_position;
+ var d = (mouse_offset[0]-mousePos[0])*(mouse_offset[0]-mousePos[0]) + (mouse_offset[1]-mousePos[1])*(mouse_offset[1]-mousePos[1]);
+ if (d > 2) {
+ mouse_mode = RED.state.MOVING_ACTIVE;
+ clickElapsed = 0;
+ }
+ } else if (mouse_mode == RED.state.MOVING_ACTIVE || mouse_mode == RED.state.IMPORT_DRAGGING) {
+ //console.log("node mouse moving active or IMPORT_DRAGGING");
+ mousePos = mouse_position;
+ var node;
+ var i;
+ var minX = 0;
+ var minY = 0;
+ for (var n = 0; n<moving_set.length; n++) {
+ node = moving_set[n];
+ if (d3.event.shiftKey) {
+ node.n.ox = node.n.x;
+ node.n.oy = node.n.y;
+ }
+ node.n.x = mousePos[0]+node.dx;
+ node.n.y = mousePos[1]+node.dy;
+ node.n.dirty = true;
+ minX = Math.min(node.n.x-node.n.w/2-5,minX);
+ minY = Math.min(node.n.y-node.n.h/2-5,minY);
+ }
+ if (minX !== 0 || minY !== 0) {
+ for (i = 0; i<moving_set.length; i++) {
+ node = moving_set[i];
+ node.n.x -= minX;
+ node.n.y -= minY;
+ }
+ }
+ if (d3.event.shiftKey && moving_set.length > 0) {
+ var gridOffset = [0,0];
+ node = moving_set[0];
+ gridOffset[0] = node.n.x-(20*Math.floor((node.n.x-node.n.w/2)/20)+node.n.w/2);
+ gridOffset[1] = node.n.y-(20*Math.floor(node.n.y/20));
+ if (gridOffset[0] !== 0 || gridOffset[1] !== 0) {
+ for (i = 0; i<moving_set.length; i++) {
+ node = moving_set[i];
+ node.n.x -= gridOffset[0];
+ node.n.y -= gridOffset[1];
+ if (node.n.x == node.n.ox && node.n.y == node.n.oy) {
+ node.dirty = false;
+ }
+ }
+ }
+ }
+ }
+ redraw();
+ }
+
+ function canvasMouseUp() {
+ if (mousedown_node && mouse_mode == RED.state.JOINING) {
+ drag_line.attr("class", "drag_line_hidden");
+ }
+ if (lasso) {
+ var x = parseInt(lasso.attr("x"));
+ var y = parseInt(lasso.attr("y"));
+ var x2 = x+parseInt(lasso.attr("width"));
+ var y2 = y+parseInt(lasso.attr("height"));
+ if (!d3.event.ctrlKey) {
+ clearSelection();
+ }
+ RED.nodes.eachNode(function(n) {
+ if (n.z == activeWorkspace && !n.selected) {
+ n.selected = (n.x > x && n.x < x2 && n.y > y && n.y < y2);
+ if (n.selected) {
+ n.dirty = true;
+ moving_set.push({n:n});
+ }
+ }
+ });
+ updateSelection();
+ lasso.remove();
+ lasso = null;
+ } else if (mouse_mode == RED.state.DEFAULT && mousedown_link == null && !d3.event.ctrlKey ) {
+ clearSelection();
+ updateSelection();
+ }
+ if (mouse_mode == RED.state.MOVING_ACTIVE) {
+ //console.log("node moved active.");
+ //CSS setting view dirty if the node was moved
+ //RED.view.dirty(true);
+ if (moving_set.length > 0) {
+ var ns = [];
+ for (var j=0;j<moving_set.length;j++) {
+ ns.push({n:moving_set[j].n,ox:moving_set[j].ox,oy:moving_set[j].oy});
+ }
+ RED.history.push({t:'move',nodes:ns,dirty:dirty});
+ }
+ }
+ if (mouse_mode == RED.state.MOVING || mouse_mode == RED.state.MOVING_ACTIVE) {
+ //console.log("node moving or MOVING_ACTIVE.");
+ for (var i=0;i<moving_set.length;i++) {
+ delete moving_set[i].ox;
+ delete moving_set[i].oy;
+ }
+ }
+ if (mouse_mode == RED.state.IMPORT_DRAGGING) {
+ RED.keyboard.remove(/* ESCAPE */ 27);
+ setDirty(true);
+ }
+ redraw();
+ // clear mouse event vars
+ resetMouseVars();
+ }
+
+ $('#btn-zoom-out').click(function() {zoomOut();});
+ $('#btn-zoom-zero').click(function() {zoomZero();});
+ $('#btn-zoom-in').click(function() {zoomIn();});
+ $("#chart").on('DOMMouseScroll mousewheel', function (evt) {
+ if ( evt.altKey ) {
+ evt.preventDefault();
+ evt.stopPropagation();
+ var move = -(evt.originalEvent.detail) || evt.originalEvent.wheelDelta;
+ if (move <= 0) { zoomOut(); }
+ else { zoomIn(); }
+ }
+ });
+ $("#chart").droppable({
+ accept:".palette_node",
+ drop: function( event, ui ) {
+ d3.event = event;
+ var selected_tool = ui.draggable[0].type;
+ var mousePos = d3.touches(this)[0]||d3.mouse(this);
+ mousePos[1] += this.scrollTop;
+ mousePos[0] += this.scrollLeft;
+ mousePos[1] /= scaleFactor;
+ mousePos[0] /= scaleFactor;
+
+ var nn = { id:(1+Math.random()*4294967295).toString(16),x: mousePos[0],y:mousePos[1],w:node_width,z:activeWorkspace};
+
+ nn.type = selected_tool;
+ nn._def = RED.nodes.getType(nn.type);
+ nn.outputs = nn._def.outputs;
+ nn.changed = true;
+
+ for (var d in nn._def.defaults) {
+ if (nn._def.defaults.hasOwnProperty(d)) {
+ nn[d] = nn._def.defaults[d].value;
+ }
+ }
+
+ if (nn._def.onadd) {
+ nn._def.onadd.call(nn);
+ }
+
+ nn.h = Math.max(node_height,(nn.outputs||0) * 15);
+ RED.history.push({t:'add',nodes:[nn.id],dirty:dirty});
+ RED.nodes.add(nn);
+ RED.editor.validateNode(nn);
+ setDirty(true);
+ // auto select dropped node - so info shows (if visible)
+ clearSelection();
+ nn.selected = true;
+ moving_set.push({n:nn});
+ updateSelection();
+ redraw();
+
+ if (nn._def.autoedit) {
+ RED.editor.edit(nn);
+ }
+ }
+ });
+
+ function zoomIn() {
+ if (scaleFactor < 2) {
+ scaleFactor += 0.1;
+ redraw();
+ }
+ }
+ function zoomOut() {
+ if (scaleFactor > 0.3) {
+ scaleFactor -= 0.1;
+ redraw();
+ }
+ }
+ function zoomZero() {
+ scaleFactor = 1;
+ redraw();
+ }
+
+ function selectAll() {
+ RED.nodes.eachNode(function(n) {
+ if (n.z == activeWorkspace) {
+ if (!n.selected) {
+ n.selected = true;
+ n.dirty = true;
+ moving_set.push({n:n});
+ }
+ }
+ });
+ selected_link = null;
+ updateSelection();
+ redraw();
+ }
+
+ function clearSelection() {
+ for (var i=0;i<moving_set.length;i++) {
+ var n = moving_set[i];
+ n.n.dirty = true;
+ n.n.selected = false;
+ }
+ moving_set = [];
+ selected_link = null;
+ }
+
+ function updateSelection() {
+ if (moving_set.length === 0) {
+ RED.menu.setDisabled("btn-export-menu",true);
+ RED.menu.setDisabled("btn-export-clipboard",true);
+ RED.menu.setDisabled("btn-export-library",true);
+ } else {
+ RED.menu.setDisabled("btn-export-menu",false);
+ RED.menu.setDisabled("btn-export-clipboard",false);
+ RED.menu.setDisabled("btn-export-library",false);
+ }
+ if (moving_set.length === 0 && selected_link == null) {
+ //RED.keyboard.remove(/* backspace */ 8);
+ RED.keyboard.remove(/* delete */ 46);
+ RED.keyboard.remove(/* c */ 67);
+ RED.keyboard.remove(/* x */ 88);
+ } else {
+ //RED.keyboard.add(/* backspace */ 8,function(){deleteSelection();d3.event.preventDefault();});
+ RED.keyboard.add(/* delete */ 46,function(){deleteSelection();d3.event.preventDefault();});
+ RED.keyboard.add(/* c */ 67,{ctrl:true},function(){copySelection();d3.event.preventDefault();});
+ RED.keyboard.add(/* x */ 88,{ctrl:true},function(){copySelection();deleteSelection();d3.event.preventDefault();});
+ }
+ if (moving_set.length === 0) {
+ RED.keyboard.remove(/* up */ 38);
+ RED.keyboard.remove(/* down */ 40);
+ RED.keyboard.remove(/* left */ 37);
+ RED.keyboard.remove(/* right*/ 39);
+ } else {
+ RED.keyboard.add(/* up */ 38, function() { if(d3.event.shiftKey){moveSelection( 0,-20)}else{moveSelection( 0,-1);}d3.event.preventDefault();},endKeyboardMove);
+ RED.keyboard.add(/* down */ 40, function() { if(d3.event.shiftKey){moveSelection( 0, 20)}else{moveSelection( 0, 1);}d3.event.preventDefault();},endKeyboardMove);
+ RED.keyboard.add(/* left */ 37, function() { if(d3.event.shiftKey){moveSelection(-20, 0)}else{moveSelection(-1, 0);}d3.event.preventDefault();},endKeyboardMove);
+ RED.keyboard.add(/* right*/ 39, function() { if(d3.event.shiftKey){moveSelection( 20, 0)}else{moveSelection( 1, 0);}d3.event.preventDefault();},endKeyboardMove);
+ }
+ if (moving_set.length == 1) {
+ RED.sidebar.info.refresh(moving_set[0].n);
+ } else {
+ RED.sidebar.info.clear();
+ }
+ }
+ function endKeyboardMove() {
+ //console.log("end keyboard move.");
+ //CSS setting view dirty if the node was moved
+ //RED.view.dirty(true);
+ var ns = [];
+ for (var i=0;i<moving_set.length;i++) {
+ ns.push({n:moving_set[i].n,ox:moving_set[i].ox,oy:moving_set[i].oy});
+ delete moving_set[i].ox;
+ delete moving_set[i].oy;
+ }
+ RED.history.push({t:'move',nodes:ns,dirty:dirty});
+ }
+ function moveSelection(dx,dy) {
+ var minX = 0;
+ var minY = 0;
+ var node;
+
+ for (var i=0;i<moving_set.length;i++) {
+ node = moving_set[i];
+ if (node.ox == null && node.oy == null) {
+ node.ox = node.n.x;
+ node.oy = node.n.y;
+ }
+ node.n.x += dx;
+ node.n.y += dy;
+ node.n.dirty = true;
+ minX = Math.min(node.n.x-node.n.w/2-5,minX);
+ minY = Math.min(node.n.y-node.n.h/2-5,minY);
+ }
+
+ if (minX !== 0 || minY !== 0) {
+ for (var n = 0; n<moving_set.length; n++) {
+ node = moving_set[n];
+ node.n.x -= minX;
+ node.n.y -= minY;
+ }
+ }
+
+ redraw();
+ }
+ function deleteSelection() {
+ var removedNodes = [];
+ var removedLinks = [];
+ var startDirty = dirty;
+ if (moving_set.length > 0) {
+ for (var i=0;i<moving_set.length;i++) {
+ var node = moving_set[i].n;
+ node.selected = false;
+ if (node.x < 0) {
+ node.x = 25
+ }
+ var rmlinks = RED.nodes.remove(node.id);
+ removedNodes.push(node);
+ removedLinks = removedLinks.concat(rmlinks);
+ }
+ moving_set = [];
+ setDirty(true);
+ }
+ if (selected_link) {
+ RED.nodes.removeLink(selected_link);
+ removedLinks.push(selected_link);
+ setDirty(true);
+ }
+ RED.history.push({t:'delete',nodes:removedNodes,links:removedLinks,dirty:startDirty});
+
+ selected_link = null;
+ updateSelection();
+ redraw();
+ }
+
+ function copySelection() {
+ if (moving_set.length > 0) {
+ var nns = [];
+ for (var n=0;n<moving_set.length;n++) {
+ var node = moving_set[n].n;
+ nns.push(RED.nodes.convertNode(node));
+ }
+ clipboard = JSON.stringify(nns);
+ RED.notify(moving_set.length+" node"+(moving_set.length>1?"s":"")+" copied");
+ }
+ }
+
+
+ function calculateTextWidth(str) {
+ var sp = document.createElement("span");
+ sp.className = "node_label";
+ sp.style.position = "absolute";
+ sp.style.top = "-1000px";
+ sp.innerHTML = (str||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
+ document.body.appendChild(sp);
+ var w = sp.offsetWidth;
+ document.body.removeChild(sp);
+ return 50+w;
+ }
+
+ function resetMouseVars() {
+ mousedown_node = null;
+ mouseup_node = null;
+ mousedown_link = null;
+ mouse_mode = 0;
+ mousedown_port_type = 0;
+ }
+
+ function portMouseDown(d,portType,portIndex) {
+ // disable zoom
+ //vis.call(d3.behavior.zoom().on("zoom"), null);
+ mousedown_node = d;
+ selected_link = null;
+ mouse_mode = RED.state.JOINING;
+ mousedown_port_type = portType;
+ mousedown_port_index = portIndex || 0;
+ document.body.style.cursor = "crosshair";
+ d3.event.preventDefault();
+ }
+
+ function portMouseUp(d,portType,portIndex) {
+ document.body.style.cursor = "";
+ if (mouse_mode == RED.state.JOINING && mousedown_node) {
+ if (typeof TouchEvent != "undefined" && d3.event instanceof TouchEvent) {
+ RED.nodes.eachNode(function(n) {
+ if (n.z == activeWorkspace) {
+ var hw = n.w/2;
+ var hh = n.h/2;
+ if (n.x-hw<mouse_position[0] && n.x+hw> mouse_position[0] &&
+ n.y-hh<mouse_position[1] && n.y+hh>mouse_position[1]) {
+ mouseup_node = n;
+ portType = mouseup_node._def.inputs>0?1:0;
+ portIndex = 0;
+ }
+ }
+ });
+ } else {
+ mouseup_node = d;
+ }
+ if (portType == mousedown_port_type || mouseup_node === mousedown_node) {
+ drag_line.attr("class", "drag_line_hidden");
+ resetMouseVars();
+ return;
+ }
+ var src,dst,src_port;
+ if (mousedown_port_type === 0) {
+ src = mousedown_node;
+ src_port = mousedown_port_index;
+ dst = mouseup_node;
+ } else if (mousedown_port_type == 1) {
+ src = mouseup_node;
+ dst = mousedown_node;
+ src_port = portIndex;
+ }
+
+ var existingLink = false;
+ RED.nodes.eachLink(function(d) {
+ existingLink = existingLink || (d.source === src && d.target === dst && d.sourcePort == src_port);
+ });
+ if (!existingLink) {
+ var link = {source: src, sourcePort:src_port, target: dst};
+ RED.nodes.addLink(link);
+ RED.history.push({t:'add',links:[link],dirty:dirty});
+ setDirty(true);
+ }
+ selected_link = null;
+ redraw();
+ }
+ }
+
+ function nodeMouseUp(d) {
+ if (dblClickPrimed && mousedown_node == d && clickElapsed > 0 && clickElapsed < 750) {
+ RED.editor.edit(d);
+ clickElapsed = 0;
+ d3.event.stopPropagation();
+ return;
+ }
+ portMouseUp(d, d._def.inputs > 0 ? 1 : 0, 0);
+ }
+
+ function nodeMouseDown(d) {
+ //var touch0 = d3.event;
+ //var pos = [touch0.pageX,touch0.pageY];
+ //RED.touch.radialMenu.show(d3.select(this),pos);
+ if (mouse_mode == RED.state.IMPORT_DRAGGING) {
+ RED.keyboard.remove(/* ESCAPE */ 27);
+ updateSelection();
+ setDirty(true);
+ redraw();
+ resetMouseVars();
+ d3.event.stopPropagation();
+ return;
+ }
+ mousedown_node = d;
+ var now = Date.now();
+ clickElapsed = now-clickTime;
+ clickTime = now;
+
+ dblClickPrimed = (lastClickNode == mousedown_node);
+ lastClickNode = mousedown_node;
+
+ var i;
+
+ if (d.selected && d3.event.ctrlKey) {
+ d.selected = false;
+ for (i=0;i<moving_set.length;i+=1) {
+ if (moving_set[i].n === d) {
+ moving_set.splice(i,1);
+ break;
+ }
+ }
+ } else {
+ if (d3.event.shiftKey) {
+ clearSelection();
+ var cnodes = RED.nodes.getAllFlowNodes(mousedown_node);
+ for (var n=0;n<cnodes.length;n++) {
+ cnodes[n].selected = true;
+ cnodes[n].dirty = true;
+ moving_set.push({n:cnodes[n]});
+ }
+ } else if (!d.selected) {
+ if (!d3.event.ctrlKey) {
+ clearSelection();
+ }
+ mousedown_node.selected = true;
+ moving_set.push({n:mousedown_node});
+ }
+ selected_link = null;
+ if (d3.event.button != 2) {
+ mouse_mode = RED.state.MOVING;
+ var mouse = d3.touches(this)[0]||d3.mouse(this);
+ mouse[0] += d.x-d.w/2;
+ mouse[1] += d.y-d.h/2;
+ for (i=0;i<moving_set.length;i++) {
+ moving_set[i].ox = moving_set[i].n.x;
+ moving_set[i].oy = moving_set[i].n.y;
+ moving_set[i].dx = moving_set[i].n.x-mouse[0];
+ moving_set[i].dy = moving_set[i].n.y-mouse[1];
+ }
+ mouse_offset = d3.mouse(document.body);
+ if (isNaN(mouse_offset[0])) {
+ mouse_offset = d3.touches(document.body)[0];
+ }
+ }
+ }
+ d.dirty = true;
+ updateSelection();
+ redraw();
+ d3.event.stopPropagation();
+ }
+
+ function nodeButtonClicked(d) {
+ if (d._def.button.toggle) {
+ d[d._def.button.toggle] = !d[d._def.button.toggle];
+ d.dirty = true;
+ }
+ if (d._def.button.onclick) {
+ d._def.button.onclick.call(d);
+ }
+ if (d.dirty) {
+ redraw();
+ }
+ d3.event.preventDefault();
+ }
+
+ function showTouchMenu(obj,pos) {
+ var mdn = mousedown_node;
+ var options = [];
+ options.push({name:"delete",disabled:(moving_set.length===0),onselect:function() {deleteSelection();}});
+ options.push({name:"cut",disabled:(moving_set.length===0),onselect:function() {copySelection();deleteSelection();}});
+ options.push({name:"copy",disabled:(moving_set.length===0),onselect:function() {copySelection();}});
+ options.push({name:"paste",disabled:(clipboard.length===0),onselect:function() {importNodes(clipboard,true);}});
+ options.push({name:"edit",disabled:(moving_set.length != 1),onselect:function() { RED.editor.edit(mdn);}});
+ options.push({name:"select",onselect:function() {selectAll();}});
+ options.push({name:"undo",disabled:(RED.history.depth() === 0),onselect:function() {RED.history.pop();}});
+
+ RED.touch.radialMenu.show(obj,pos,options);
+ resetMouseVars();
+ }
+ function redraw() {
+ vis.attr("transform","scale("+scaleFactor+")");
+ outer.attr("width", space_width*scaleFactor).attr("height", space_height*scaleFactor);
+
+ if (mouse_mode != RED.state.JOINING) {
+ // Don't bother redrawing nodes if we're drawing links
+
+ var node = vis.selectAll(".nodegroup").data(RED.nodes.nodes.filter(function(d) { return d.z == activeWorkspace }),function(d){return d.id});
+ node.exit().remove();
+
+ var nodeEnter = node.enter().insert("svg:g").attr("class", "node nodegroup");
+ nodeEnter.each(function(d,i) {
+ var node = d3.select(this);
+ node.attr("id",d.id);
+ var l = d._def.label;
+ l = (typeof l === "function" ? l.call(d) : l)||"";
+ d.w = Math.max(node_width,calculateTextWidth(l)+(d._def.inputs>0?7:0) );
+ d.h = Math.max(node_height,(d.outputs||0) * 15);
+
+ if (d._def.badge) {
+ var badge = node.append("svg:g").attr("class","node_badge_group");
+ var badgeRect = badge.append("rect").attr("class","node_badge").attr("rx",5).attr("ry",5).attr("width",40).attr("height",15);
+ badge.append("svg:text").attr("class","node_badge_label").attr("x",35).attr("y",11).attr('text-anchor','end').text(d._def.badge());
+ if (d._def.onbadgeclick) {
+ badgeRect.attr("cursor","pointer")
+ .on("click",function(d) { d._def.onbadgeclick.call(d);d3.event.preventDefault();});
+ }
+ }
+
+ if (d._def.button) {
+ var nodeButtonGroup = node.append('svg:g')
+ .attr("transform",function(d) { return "translate("+((d._def.align == "right") ? 94 : -25)+",2)"; })
+ .attr("class",function(d) { return "node_button "+((d._def.align == "right") ? "node_right_button" : "node_left_button"); });
+ nodeButtonGroup.append('rect')
+ .attr("rx",8)
+ .attr("ry",8)
+ .attr("width",32)
+ .attr("height",node_height-4)
+ .attr("fill","#eee");//function(d) { return d._def.color;})
+ nodeButtonGroup.append('rect')
+ .attr("x",function(d) { return d._def.align == "right"? 10:5})
+ .attr("y",4)
+ .attr("rx",5)
+ .attr("ry",5)
+ .attr("width",16)
+ .attr("height",node_height-12)
+ .attr("fill",function(d) { return d._def.color;})
+ .attr("cursor","pointer")
+ .on("mousedown",function(d) {if (!lasso) { d3.select(this).attr("fill-opacity",0.2);d3.event.preventDefault(); d3.event.stopPropagation();}})
+ .on("mouseup",function(d) {if (!lasso) { d3.select(this).attr("fill-opacity",0.4);d3.event.preventDefault();d3.event.stopPropagation();}})
+ .on("mouseover",function(d) {if (!lasso) { d3.select(this).attr("fill-opacity",0.4);}})
+ .on("mouseout",function(d) {if (!lasso) {
+ var op = 1;
+ if (d._def.button.toggle) {
+ op = d[d._def.button.toggle]?1:0.2;
+ }
+ d3.select(this).attr("fill-opacity",op);
+ }})
+ .on("click",nodeButtonClicked)
+ .on("touchstart",nodeButtonClicked)
+ }
+
+ var mainRect = node.append("rect")
+ .attr("class", "node")
+ .classed("node_unknown",function(d) { return d.type == "unknown"; })
+ .attr("rx", 6)
+ .attr("ry", 6)
+ .attr("fill",function(d) { return d._def.color;})
+ .on("mouseup",nodeMouseUp)
+ .on("mousedown",nodeMouseDown)
+ .on("touchstart",function(d) {
+ var obj = d3.select(this);
+ var touch0 = d3.event.touches.item(0);
+ var pos = [touch0.pageX,touch0.pageY];
+ startTouchCenter = [touch0.pageX,touch0.pageY];
+ startTouchDistance = 0;
+ touchStartTime = setTimeout(function() {
+ showTouchMenu(obj,pos);
+ },touchLongPressTimeout);
+ nodeMouseDown.call(this,d)
+ })
+ .on("touchend", function(d) {
+ clearTimeout(touchStartTime);
+ touchStartTime = null;
+ if (RED.touch.radialMenu.active()) {
+ d3.event.stopPropagation();
+ return;
+ }
+ nodeMouseUp.call(this,d);
+ })
+ .on("mouseover",function(d) {
+ if (mouse_mode === 0) {
+ var node = d3.select(this);
+ node.classed("node_hovered",true);
+ }
+ })
+ .on("mouseout",function(d) {
+ var node = d3.select(this);
+ node.classed("node_hovered",false);
+ });
+
+ //node.append("rect").attr("class", "node-gradient-top").attr("rx", 6).attr("ry", 6).attr("height",30).attr("stroke","none").attr("fill","url(#gradient-top)").style("pointer-events","none");
+ //node.append("rect").attr("class", "node-gradient-bottom").attr("rx", 6).attr("ry", 6).attr("height",30).attr("stroke","none").attr("fill","url(#gradient-bottom)").style("pointer-events","none");
+
+ if (d._def.icon) {
+
+ var icon_group = node.append("g")
+ .attr("class","node_icon_group")
+ .attr("x",0).attr("y",0);
+
+ var icon_shade = icon_group.append("rect")
+ .attr("x",0).attr("y",0)
+ .attr("class","node_icon_shade")
+ .attr("width","30")
+ .attr("stroke","none")
+ .attr("fill","#000")
+ .attr("fill-opacity","0.05")
+ .attr("height",function(d){return Math.min(50,d.h-4);});
+
+ var icon = icon_group.append("image")
+ .attr("xlink:href","icons/"+d._def.icon)
+ .attr("class","node_icon")
+ .attr("x",0)
+ .attr("width","30")
+ .attr("height","30");
+
+ var icon_shade_border = icon_group.append("path")
+ .attr("d",function(d) { return "M 30 1 l 0 "+(d.h-2)})
+ .attr("class","node_icon_shade_border")
+ .attr("stroke-opacity","0.1")
+ .attr("stroke","#000")
+ .attr("stroke-width","2");
+
+ if ("right" == d._def.align) {
+ icon_group.attr('class','node_icon_group node_icon_group_'+d._def.align);
+ icon_shade_border.attr("d",function(d) { return "M 0 1 l 0 "+(d.h-2)})
+ //icon.attr('class','node_icon node_icon_'+d._def.align);
+ //icon.attr('class','node_icon_shade node_icon_shade_'+d._def.align);
+ //icon.attr('class','node_icon_shade_border node_icon_shade_border_'+d._def.align);
+ }
+
+ //if (d._def.inputs > 0 && d._def.align == null) {
+ // icon_shade.attr("width",35);
+ // icon.attr("transform","translate(5,0)");
+ // icon_shade_border.attr("transform","translate(5,0)");
+ //}
+ //if (d._def.outputs > 0 && "right" == d._def.align) {
+ // icon_shade.attr("width",35); //icon.attr("x",5);
+ //}
+
+ var img = new Image();
+ img.src = "icons/"+d._def.icon;
+ img.onload = function() {
+ icon.attr("width",Math.min(img.width,30));
+ icon.attr("height",Math.min(img.height,30));
+ icon.attr("x",15-Math.min(img.width,30)/2);
+ //if ("right" == d._def.align) {
+ // icon.attr("x",function(d){return d.w-img.width-1-(d.outputs>0?5:0);});
+ // icon_shade.attr("x",function(d){return d.w-30});
+ // icon_shade_border.attr("d",function(d){return "M "+(d.w-30)+" 1 l 0 "+(d.h-2);});
+ //}
+ }
+
+ //icon.style("pointer-events","none");
+ icon_group.style("pointer-events","none");
+ }
+ var text = node.append('svg:text').attr('class','node_label').attr('x', 38).attr('dy', '.35em').attr('text-anchor','start');
+ if (d._def.align) {
+ text.attr('class','node_label node_label_'+d._def.align);
+ text.attr('text-anchor','end');
+ }
+
+ var status = node.append("svg:g").attr("class","node_status_group").style("display","none");
+
+ var statusRect = status.append("rect").attr("class","node_status")
+ .attr("x",6).attr("y",1).attr("width",9).attr("height",9)
+ .attr("rx",2).attr("ry",2).attr("stroke-width","3");
+
+ var statusLabel = status.append("svg:text")
+ .attr("class","node_status_label")
+ .attr('x',20).attr('y',9)
+ .style({
+ 'stroke-width': 0,
+ 'fill': '#888',
+ 'font-size':'9pt',
+ 'stroke':'#000',
+ 'text-anchor':'start'
+ });
+
+ var dgNumber = node.append("svg:g").attr("class","node_dgnumber_group").style("display","none");
+
+ /*var dgNumberRect = dgNumber.append("rect").attr("class","node_dgnumber")
+ .attr("x",6).attr("y",-49).attr("width",9).attr("height",9)
+ .attr("rx",2).attr("ry",2).attr("stroke-width","3");
+ */
+
+ var dgNumberLabel = dgNumber.append("svg:text")
+ .attr("class","node_dgnumber_label")
+ .attr('x',1).attr('y',-43)
+ .style({
+ 'stroke-width': 0,
+ /*'fill': '#2E4F83',*/
+ 'fill': 'blue',
+ 'font-size':'12pt',
+ 'stroke':'#000',
+ 'text-anchor':'start'
+ });
+
+ var dgNumberTitle = dgNumber.append("title")
+ .attr("class","node_dgnumber_title");
+
+ //node.append("circle").attr({"class":"centerDot","cx":0,"cy":0,"r":5});
+
+ if (d._def.inputs > 0) {
+ text.attr("x",38);
+ node.append("rect").attr("class","port port_input").attr("rx",3).attr("ry",3).attr("x",-5).attr("width",10).attr("height",10)
+ .on("mousedown",function(d){portMouseDown(d,1,0);})
+ .on("touchstart",function(d){portMouseDown(d,1,0);})
+ .on("mouseup",function(d){portMouseUp(d,1,0);} )
+ .on("touchend",function(d){portMouseUp(d,1,0);} )
+ .on("mouseover",function(d) { var port = d3.select(this); port.classed("port_hovered",(mouse_mode!=RED.state.JOINING || mousedown_port_type != 1 ));})
+ .on("mouseout",function(d) { var port = d3.select(this); port.classed("port_hovered",false);})
+ }
+
+ //node.append("path").attr("class","node_error").attr("d","M 3,-3 l 10,0 l -5,-8 z");
+ node.append("image").attr("class","node_error hidden").attr("xlink:href","icons/node-error.png").attr("x",0).attr("y",-6).attr("width",10).attr("height",9);
+ node.append("image").attr("class","node_changed hidden").attr("xlink:href","icons/node-changed.png").attr("x",12).attr("y",-6).attr("width",10).attr("height",10);
+ });
+
+ node.each(function(d,i) {
+ if (d.dirty) {
+ //if (d.x < -50) deleteSelection(); // Delete nodes if dragged back to palette
+ if (d.resize) {
+ var l = d._def.label;
+ l = (typeof l === "function" ? l.call(d) : l)||"";
+ d.w = Math.max(node_width,calculateTextWidth(l)+(d._def.inputs>0?7:0) );
+ d.h = Math.max(node_height,(d.outputs||0) * 15);
+ }
+ var thisNode = d3.select(this);
+ //thisNode.selectAll(".centerDot").attr({"cx":function(d) { return d.w/2;},"cy":function(d){return d.h/2}});
+ thisNode.attr("transform", function(d) { return "translate(" + (d.x-d.w/2) + "," + (d.y-d.h/2) + ")"; });
+ thisNode.selectAll(".node")
+ .attr("width",function(d){return d.w})
+ .attr("height",function(d){return d.h})
+ .classed("node_selected",function(d) { return d.selected; })
+ .classed("node_highlighted",function(d) { return d.highlighted; })
+ ;
+ //thisNode.selectAll(".node-gradient-top").attr("width",function(d){return d.w});
+ //thisNode.selectAll(".node-gradient-bottom").attr("width",function(d){return d.w}).attr("y",function(d){return d.h-30});
+
+ thisNode.selectAll(".node_icon_group_right").attr('transform', function(d){return "translate("+(d.w-30)+",0)"});
+ thisNode.selectAll(".node_label_right").attr('x', function(d){return d.w-38});
+ //thisNode.selectAll(".node_icon_right").attr("x",function(d){return d.w-d3.select(this).attr("width")-1-(d.outputs>0?5:0);});
+ //thisNode.selectAll(".node_icon_shade_right").attr("x",function(d){return d.w-30;});
+ //thisNode.selectAll(".node_icon_shade_border_right").attr("d",function(d){return "M "+(d.w-30)+" 1 l 0 "+(d.h-2)});
+
+
+ var numOutputs = d.outputs;
+ var y = (d.h/2)-((numOutputs-1)/2)*13;
+ d.ports = d.ports || d3.range(numOutputs);
+ d._ports = thisNode.selectAll(".port_output").data(d.ports);
+ d._ports.enter().append("rect").attr("class","port port_output").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10)
+ .on("mousedown",(function(){var node = d; return function(d,i){portMouseDown(node,0,i);}})() )
+ .on("touchstart",(function(){var node = d; return function(d,i){portMouseDown(node,0,i);}})() )
+ .on("mouseup",(function(){var node = d; return function(d,i){portMouseUp(node,0,i);}})() )
+ .on("touchend",(function(){var node = d; return function(d,i){portMouseUp(node,0,i);}})() )
+ .on("mouseover",function(d,i) { var port = d3.select(this); port.classed("port_hovered",(mouse_mode!=RED.state.JOINING || mousedown_port_type !== 0 ));})
+ .on("mouseout",function(d,i) { var port = d3.select(this); port.classed("port_hovered",false);});
+ d._ports.exit().remove();
+ if (d._ports) {
+ numOutputs = d.outputs || 1;
+ y = (d.h/2)-((numOutputs-1)/2)*13;
+ var x = d.w - 5;
+ d._ports.each(function(d,i) {
+ var port = d3.select(this);
+ port.attr("y",(y+13*i)-5).attr("x",x);
+ });
+ }
+ thisNode.selectAll('text.node_label').text(function(d,i){
+ if (d._def.label) {
+ if (typeof d._def.label == "function") {
+ return d._def.label.call(d);
+ } else {
+ return d._def.label;
+ }
+ }
+ return "";
+ })
+ .attr('y', function(d){return (d.h/2)-1;})
+ .attr('class',function(d){
+ return 'node_label'+
+ (d._def.align?' node_label_'+d._def.align:'')+
+ (d._def.labelStyle?' '+(typeof d._def.labelStyle == "function" ? d._def.labelStyle.call(d):d._def.labelStyle):'') ;
+ });
+ thisNode.selectAll(".node_tools").attr("x",function(d){return d.w-35;}).attr("y",function(d){return d.h-20;});
+
+ thisNode.selectAll(".node_changed")
+ .attr("x",function(d){return d.w-10})
+ .classed("hidden",function(d) { return !d.changed; });
+
+ thisNode.selectAll(".node_error")
+ .attr("x",function(d){return d.w-10-(d.changed?13:0)})
+ .classed("hidden",function(d) { return d.valid; });
+
+ thisNode.selectAll(".port_input").each(function(d,i) {
+ var port = d3.select(this);
+ port.attr("y",function(d){return (d.h/2)-5;})
+ });
+
+ thisNode.selectAll(".node_icon").attr("y",function(d){return (d.h-d3.select(this).attr("height"))/2;});
+ thisNode.selectAll(".node_icon_shade").attr("height",function(d){return d.h;});
+ thisNode.selectAll(".node_icon_shade_border").attr("d",function(d){ return "M "+(("right" == d._def.align) ?0:30)+" 1 l 0 "+(d.h-2)});
+
+
+ thisNode.selectAll('.node_right_button').attr("transform",function(d){
+ var x = d.w-6;
+ if (d._def.button.toggle && !d[d._def.button.toggle]) {
+ x = x - 8;
+ }
+ return "translate("+x+",2)";
+ });
+ thisNode.selectAll('.node_right_button rect').attr("fill-opacity",function(d){
+ if (d._def.button.toggle) {
+ return d[d._def.button.toggle]?1:0.2;
+ }
+ return 1;
+ });
+
+ //thisNode.selectAll('.node_right_button').attr("transform",function(d){return "translate("+(d.w - d._def.button.width.call(d))+","+0+")";}).attr("fill",function(d) {
+ // return typeof d._def.button.color === "function" ? d._def.button.color.call(d):(d._def.button.color != null ? d._def.button.color : d._def.color)
+ //});
+
+ thisNode.selectAll('.node_badge_group').attr("transform",function(d){return "translate("+(d.w-40)+","+(d.h+3)+")";});
+ thisNode.selectAll('text.node_badge_label').text(function(d,i) {
+ if (d._def.badge) {
+ if (typeof d._def.badge == "function") {
+ return d._def.badge.call(d);
+ } else {
+ return d._def.badge;
+ }
+ }
+ return "";
+ });
+ if (!showStatus || !d.status) {
+ thisNode.selectAll('.node_status_group').style("display","none");
+ } else {
+ thisNode.selectAll('.node_status_group').style("display","inline").attr("transform","translate(3,"+(d.h+3)+")");
+ var fill = status_colours[d.status.fill]; // Only allow our colours for now
+ if (d.status.shape == null && fill == null) {
+ thisNode.selectAll('.node_status').style("display","none");
+ } else {
+ var style;
+ if (d.status.shape == null || d.status.shape == "dot") {
+ style = {
+ display: "inline",
+ fill: fill,
+ stroke: fill
+ };
+ } else if (d.status.shape == "ring" ){
+ style = {
+ display: "inline",
+ fill: '#fff',
+ stroke: fill
+ }
+ }
+ thisNode.selectAll('.node_status').style(style);
+ }
+ if (d.status.text) {
+ thisNode.selectAll('.node_status_label').text(d.status.text);
+ } else {
+ thisNode.selectAll('.node_status_label').text("");
+ }
+ }
+ //console.dir("d value");
+ //console.dir(d);
+ if (showNumbers && d.dgnumber != null && d.dgnumber != undefined && d.dgnumber.length >0) {
+ thisNode.selectAll('.node_dgnumber_group').style("display","inline").attr("transform","translate(9,"+(d.h+9)+")");
+ thisNode.selectAll('.node_dgnumber_label').text(d.dgnumber.toString());
+ var dgnumberList = d.dgnumber;
+ var dgnum = "";
+ if(dgnumberList != null && dgnumberList.length >=1){
+ dgnum = dgnumberList[0];
+ thisNode.select('.node_dgnumber_label').text(dgnum);
+ //console.log(dgnumberList);
+ thisNode.select('.node_dgnumber_title').text(dgnumberList);
+ }
+ /*
+ if(d.dgnumber.length > 1){
+ thisNode.selectAll('.node_dgnumber_group').style("display","inline").attr("transform","translate(9,"+(d.h-15)+")");
+ thisNode.selectAll('.node_dgnumber_label').text(d.dgnumber.toString());
+ }else{
+ thisNode.selectAll('.node_dgnumber_group').style("display","inline").attr("transform","translate(9,"+(d.h+9)+")");
+ thisNode.selectAll('.node_dgnumber_label').text(d.dgnumber.toString());
+ }
+ */
+ } else {
+ //console.log("fhfjhfjh ");
+ thisNode.select('.node_dgnumber').style("display","none");
+ thisNode.select('.node_dgnumber_label').text("");
+ thisNode.select('.node_dgnumber_title').text("");
+ }
+
+ d.dirty = false;
+ }
+ });
+ }
+
+ var link = vis.selectAll(".link").data(RED.nodes.links.filter(function(d) { return d.source.z == activeWorkspace && d.target.z == activeWorkspace }),function(d) { return d.source.id+":"+d.sourcePort+":"+d.target.id;});
+
+ var linkEnter = link.enter().insert("g",".node").attr("class","link");
+
+ linkEnter.each(function(d,i) {
+ var l = d3.select(this);
+ l.append("svg:path").attr("class","link_background link_path")
+ .on("mousedown",function(d) {
+ mousedown_link = d;
+ clearSelection();
+ selected_link = mousedown_link;
+ updateSelection();
+ redraw();
+ d3.event.stopPropagation();
+ })
+ .on("touchstart",function(d) {
+ mousedown_link = d;
+ clearSelection();
+ selected_link = mousedown_link;
+ updateSelection();
+ redraw();
+ d3.event.stopPropagation();
+ });
+ l.append("svg:path").attr("class","link_outline link_path");
+ l.append("svg:path").attr("class","link_line link_path");
+ });
+
+ link.exit().remove();
+
+ var links = vis.selectAll(".link_path")
+ links.attr("d",function(d){
+ var numOutputs = d.source.outputs || 1;
+ var sourcePort = d.sourcePort || 0;
+ var y = -((numOutputs-1)/2)*13 +13*sourcePort;
+
+ var dy = d.target.y-(d.source.y+y);
+ var dx = (d.target.x-d.target.w/2)-(d.source.x+d.source.w/2);
+ var delta = Math.sqrt(dy*dy+dx*dx);
+ var scale = lineCurveScale;
+ var scaleY = 0;
+ if (delta < node_width) {
+ scale = 0.75-0.75*((node_width-delta)/node_width);
+ }
+
+ if (dx < 0) {
+ scale += 2*(Math.min(5*node_width,Math.abs(dx))/(5*node_width));
+ if (Math.abs(dy) < 3*node_height) {
+ scaleY = ((dy>0)?0.5:-0.5)*(((3*node_height)-Math.abs(dy))/(3*node_height))*(Math.min(node_width,Math.abs(dx))/(node_width)) ;
+ }
+ }
+
+ d.x1 = d.source.x+d.source.w/2;
+ d.y1 = d.source.y+y;
+ d.x2 = d.target.x-d.target.w/2;
+ d.y2 = d.target.y;
+
+ return "M "+(d.source.x+d.source.w/2)+" "+(d.source.y+y)+
+ " C "+(d.source.x+d.source.w/2+scale*node_width)+" "+(d.source.y+y+scaleY*node_height)+" "+
+ (d.target.x-d.target.w/2-scale*node_width)+" "+(d.target.y-scaleY*node_height)+" "+
+ (d.target.x-d.target.w/2)+" "+d.target.y;
+ })
+
+ link.classed("link_selected", function(d) { return d === selected_link || d.selected; });
+ link.classed("link_unknown",function(d) { return d.target.type == "unknown" || d.source.type == "unknown"});
+
+ if (d3.event) {
+ d3.event.preventDefault();
+ }
+ }
+
+ RED.keyboard.add(/* z */ 90,{ctrl:true},function(){RED.history.pop();});
+ RED.keyboard.add(/* a */ 65,{ctrl:true},function(){selectAll();d3.event.preventDefault();});
+ RED.keyboard.add(/* = */ 187,{ctrl:true},function(){zoomIn();d3.event.preventDefault();});
+ RED.keyboard.add(/* - */ 189,{ctrl:true},function(){zoomOut();d3.event.preventDefault();});
+ RED.keyboard.add(/* 0 */ 48,{ctrl:true},function(){zoomZero();d3.event.preventDefault();});
+ RED.keyboard.add(/* v */ 86,{ctrl:true},function(){importNodes(clipboard);d3.event.preventDefault();});
+ RED.keyboard.add(/* e */ 69,{ctrl:true},function(){showExportNodesDialog();d3.event.preventDefault();});
+ RED.keyboard.add(/* i */ 73,{ctrl:true},function(){showImportNodesDialog();d3.event.preventDefault();});
+ RED.keyboard.add(/* B */ 66,{ctrl:true},function(){RED.view.showDgNumberDialog();d3.event.preventDefault();});
+ RED.keyboard.add(/* [ */ 219,{ctrl:true},function(){RED.view.showSearchTextDialog();d3.event.preventDefault();});
+ RED.keyboard.add(/* O */ 79,{ctrl:true},function(){RED.view.showRequestTemplateDialog();d3.event.preventDefault();});
+
+
+ // TODO: 'dirty' should be a property of RED.nodes - with an event callback for ui hooks
+ function setDirty(d) {
+ dirty = d;
+ if (dirty) {
+ $("#btn-deploy").removeClass("disabled");
+ } else {
+ $("#btn-deploy").addClass("disabled");
+ }
+ }
+
+ /**
+ * Imports a new collection of nodes from a JSON String.
+ * - all get new IDs assigned
+ * - all 'selected'
+ * - attached to mouse for placing - 'IMPORT_DRAGGING'
+ */
+ function importNodes(newNodesStr,touchImport) {
+ try {
+ var result = RED.nodes.import(newNodesStr,true);
+ if (result) {
+ var new_nodes = result[0];
+ var new_links = result[1];
+ var new_workspaces = result[2];
+
+ var new_ms = new_nodes.filter(function(n) { return n.z == activeWorkspace }).map(function(n) { return {n:n};});
+ var new_node_ids = new_nodes.map(function(n){ return n.id; });
+
+ // TODO: pick a more sensible root node
+ if (new_ms.length > 0) {
+ var root_node = new_ms[0].n;
+ var dx = root_node.x;
+ var dy = root_node.y;
+
+ if (mouse_position == null) {
+ mouse_position = [0,0];
+ }
+
+ var minX = 0;
+ var minY = 0;
+ var i;
+ var node;
+
+ for (i=0;i<new_ms.length;i++) {
+ node = new_ms[i];
+ node.n.selected = true;
+ node.n.changed = true;
+ node.n.x -= dx - mouse_position[0];
+ node.n.y -= dy - mouse_position[1];
+ node.dx = node.n.x - mouse_position[0];
+ node.dy = node.n.y - mouse_position[1];
+ minX = Math.min(node.n.x-node_width/2-5,minX);
+ minY = Math.min(node.n.y-node_height/2-5,minY);
+ }
+ for (i=0;i<new_ms.length;i++) {
+ node = new_ms[i];
+ node.n.x -= minX;
+ node.n.y -= minY;
+ node.dx -= minX;
+ node.dy -= minY;
+ }
+ if (!touchImport) {
+ mouse_mode = RED.state.IMPORT_DRAGGING;
+ }
+
+ RED.keyboard.add(/* ESCAPE */ 27,function(){
+ RED.keyboard.remove(/* ESCAPE */ 27);
+ clearSelection();
+ RED.history.pop();
+ mouse_mode = 0;
+ });
+ clearSelection();
+ moving_set = new_ms;
+ }
+
+ RED.history.push({t:'add',nodes:new_node_ids,links:new_links,workspaces:new_workspaces,dirty:RED.view.dirty()});
+
+
+ redraw();
+ }
+ } catch(error) {
+ console.log(error.stack);
+ RED.notify("<strong>Error</strong>: "+error,"error");
+ }
+ }
+
+ function showExportNodesDialog() {
+ mouse_mode = RED.state.EXPORT;
+ var nns = RED.nodes.createExportableNodeSet(moving_set);
+ $("#dialog-form").html($("script[data-template-name='export-clipboard-dialog']").html());
+ $("#node-input-export").val(JSON.stringify(nns));
+ $("#node-input-export").focus(function() {
+ var textarea = $(this);
+ textarea.select();
+ textarea.mouseup(function() {
+ textarea.unbind("mouseup");
+ return false;
+ });
+ });
+ $( "#dialog" ).dialog("option","title","Export nodes to clipboard").dialog( "open" );
+ $("#node-input-export").focus();
+ }
+
+ function showExportNodesLibraryDialog() {
+ mouse_mode = RED.state.EXPORT;
+ var nns = RED.nodes.createExportableNodeSet(moving_set);
+ $("#dialog-form").html($("script[data-template-name='export-library-dialog']").html());
+ $("#node-input-filename").attr('nodes',JSON.stringify(nns));
+ $( "#dialog" ).dialog("option","title","Export nodes to library").dialog( "open" );
+ }
+
+ function showImportNodesDialog() {
+ mouse_mode = RED.state.IMPORT;
+ $("#dialog-form").html($("script[data-template-name='import-dialog']").html());
+ $("#node-input-import").val("");
+ $( "#dialog" ).dialog("option","title","Import nodes").dialog( "open" );
+ }
+
+ function showRenameWorkspaceDialog(id) {
+ var ws = RED.nodes.workspace(id);
+ $( "#node-dialog-rename-workspace" ).dialog("option","workspace",ws);
+
+ if (workspace_tabs.count() == 1) {
+ $( "#node-dialog-rename-workspace").next().find(".leftButton")
+ .prop('disabled',true)
+ .addClass("ui-state-disabled");
+ } else {
+ $( "#node-dialog-rename-workspace").next().find(".leftButton")
+ .prop('disabled',false)
+ .removeClass("ui-state-disabled");
+ }
+
+ $( "#node-input-workspace-name" ).val(ws.label);
+ $( "#node-dialog-rename-workspace" ).dialog("open");
+ }
+
+ $("#node-dialog-rename-workspace form" ).submit(function(e) { e.preventDefault();});
+ $( "#node-dialog-rename-workspace" ).dialog({
+ modal: true,
+ autoOpen: false,
+ width: 500,
+ title: "Rename sheet",
+ buttons: [
+ {
+ class: 'leftButton',
+ text: "Delete",
+ click: function() {
+ var workspace = $(this).dialog('option','workspace');
+ $( this ).dialog( "close" );
+ deleteWorkspace(workspace.id);
+ }
+ },
+ {
+ text: "Ok",
+ click: function() {
+ var workspace = $(this).dialog('option','workspace');
+ var label = $( "#node-input-workspace-name" ).val();
+ if (workspace.label != label) {
+ workspace.label = label;
+ var link = $("#workspace-tabs a[href='#"+workspace.id+"']");
+ link.attr("title",label);
+ link.text(label);
+ RED.view.dirty(true);
+ }
+ $( this ).dialog( "close" );
+ }
+ },
+ {
+ text: "Cancel",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ],
+ open: function(e) {
+ RED.keyboard.disable();
+ },
+ close: function(e) {
+ RED.keyboard.enable();
+ }
+ });
+ $( "#node-dialog-delete-workspace" ).dialog({
+ modal: true,
+ autoOpen: false,
+ width: 500,
+ title: "Confirm delete",
+ buttons: [
+ {
+ text: "Ok",
+ click: function() {
+ var workspace = $(this).dialog('option','workspace');
+ RED.view.removeWorkspace(workspace);
+ var historyEvent = RED.nodes.removeWorkspace(workspace.id);
+ historyEvent.t = 'delete';
+ historyEvent.dirty = dirty;
+ historyEvent.workspaces = [workspace];
+ RED.history.push(historyEvent);
+ RED.view.dirty(true);
+ $( this ).dialog( "close" );
+ }
+ },
+ {
+ text: "Cancel",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ],
+ open: function(e) {
+ RED.keyboard.disable();
+ },
+ close: function(e) {
+ RED.keyboard.enable();
+ }
+
+ });
+ return {
+ state:function(state) {
+ if (state == null) {
+ return mouse_mode
+ } else {
+ mouse_mode = state;
+ }
+ },
+ addWorkspace: function(ws) {
+ workspace_tabs.addTab(ws);
+ workspace_tabs.resize();
+ },
+ removeWorkspace: function(ws) {
+ workspace_tabs.removeTab(ws.id);
+ },
+ getWorkspace: function() {
+ return activeWorkspace;
+ },
+ showWorkspace: function(id) {
+ workspace_tabs.activateTab(id);
+ },
+ redraw:redraw,
+ dirty: function(d) {
+ if (d == null) {
+ return dirty;
+ } else {
+ setDirty(d);
+ }
+ },
+ importNodes: importNodes,
+ resize: function() {
+ workspace_tabs.resize();
+ },
+ status: function(s) {
+ validateEachNodeXml();
+ showStatus = s;
+ RED.nodes.eachNode(function(n) { n.dirty = true;});
+ //TODO: subscribe/unsubscribe here
+ redraw();
+ },
+ showYangUploadDialog:function showYangUploadDialog(){
+ $(function() {
+ var htmlStr= "<div id='yang-upload-div' style='width:375;height:225'>" +
+ '<form id="uploadForm" name="uploadForm" enctype="multipart/form-data" action="/api/uploadyang" method="post" >' +
+ "<input id='yang-file-id' name='yangFile' type='file' accept='.yang,.zip'><p style='font-size:0.7em'><i>For Module depending on multiple yang files, zip them and upload the zip file</i</p><br><br><br><br><br><p id='yang-upload-status'></p>" +
+ //'<input id="upload-yang-button-id" style="font-size:1em;font-weight:bold" type="button" value="Upload Yang" name="upload-yang-button">' +
+ "</form></div>";
+
+ $("#yang-upload-dialog").dialog({
+ modal:true,
+ autoOpen :false,
+ title: "Upload Yang",
+ width: 500,
+ height: 260,
+ minWidth : 300,
+ minHeight :260,
+ buttons :[
+ {
+ text: "Upload Yang",
+ click: function() {
+ if( document.getElementById("yang-file-id").files.length == 0 ){
+ $("#yang-upload-status").html("<span>No files selected.</span>");
+ return ;
+ }
+ $('#yang-upload-dialog').parent().find('.ui-dialog-buttonpane button:first').button("disable");
+ //$("#yang-upload-status").empty().text("File is uploading...");
+ $("#yang-upload-status").html("<span>Processing...Please wait</span><img src='images/page-loading.gif'>");
+ $.ajax({
+ url: "/api/uploadyang",
+ type: "POST",
+ data: new FormData(document.forms['uploadForm']),
+ contentType: false,
+ cache: false,
+ processData:false,
+ success: function(data) {
+ $("#yang-upload-status").html("");
+ $("#yang-upload-status").text(data.msg);
+ $('#yang-upload-dialog').parent().find('.ui-dialog-buttonpane button:first').button("enable");
+ /*
+ sliValuesObj = {};
+ rpcValues = {};
+ reqInputValues = {};
+ for(var i=0;i<data.sliValuesObj.length;i++){
+ var moduleName = data.sliValuesObj[i].moduleName;
+ sliValuesObj[moduleName] = data.sliValuesObj[i][moduleName + '_PROPS'];
+ rpcValues[moduleName] = data.sliValuesObj[i][ moduleName +'_RPCS'];
+ for(var k=0;rpcValues[moduleName] != undefined && k<rpcValues[moduleName].length;k++){
+ var rpcName = rpcValues[moduleName][k];
+ reqInputValues[moduleName + "_" + rpcName] = data.sliValuesObj[i][rpcName +"-input"];
+ }
+ }
+ */
+ //close the yang upload dialogog box and open the load dialogbox
+ $('#yang-upload-dialog').dialog("close");
+ $("#btn-available-yang-modules").trigger("click");
+ },
+ error:function (xhr, desc, err){
+ $("#yang-upload-status").html(err);
+ $('#yang-upload-dialog').parent().find('.ui-dialog-buttonpane button:first').button("enable");
+ }
+ });
+ }
+ },
+ {
+ text: "Close",
+ click: function() {
+ $("#yang-upload-dialog").dialog("close");
+ }
+ }
+ ]
+ }).dialog("open").html(htmlStr);
+ });
+ },
+ showDgNumberDialog: function showDgNumberDialog(){
+ $(function() {
+ var isLoopDetected = detectLoop();
+ console.log("isLoopDetected:" + isLoopDetected);
+ if(isLoopDetected){
+ return false;
+ }
+ updateDgNumbers();
+ var htmlStr="<div id='find-dgnumber-div' style='width:375;height:225'><label>DG Number</label><input id='dgnumber-val-id' type='text' value=''><p id='find-dgnumber-status' style='color:red'></p></div>";
+ $("#dgnumber-find-dialog").dialog({
+ modal:true,
+ autoOpen :false,
+ title: "Find Node By DGNumber",
+ width: 300,
+ height: 215,
+ minWidth : 300,
+ minHeight :215,
+ buttons :[
+ {
+ text: "Find",
+ click: function() {
+ var dgnumVal = $("#dgnumber-val-id").val();
+ $("#find-dgnumber-status").text("");
+ if(dgnumVal != undefined && dgnumVal != '' && dgnumVal != ''){
+ dgnumVal = dgnumVal.trim();
+ }else{
+ dgnumVal ="";
+ }
+
+ var dgNumberFound = false;
+ var node = vis.selectAll(".nodegroup").data(RED.nodes.nodes.filter(function(d) { return d.z == activeWorkspace }),function(d){return d.id});
+ node.each(function(d,i) {
+ var thisNode = d3.select(this);
+ var dgn = d.dgnumber;
+
+ if(dgn != undefined && typeof dgn == 'object'){
+ var found = false;
+ for(var k=0;k<dgn.length;k++){
+ if(dgn[k] == dgnumVal){
+ found = true;
+ break;
+ }
+ }
+ if(found){
+ //thisNode.select("rect").style({"stroke":"blue","stroke-width" :"3","stroke-dasharray":"5,1"});
+ //$("#" + d.id).find("rect").attr("class","node-found-selected");
+ //$("#" + d.id).find("rect").attr("class","node node_selected");
+ //thisNode.select("rect").attr("class","node node_selected");
+ thisNode.select("rect").attr("class","node node_found");
+ document.getElementById( d.id ).scrollIntoView();
+ $("#dgnumber-find-dialog").dialog("close");
+
+ //display the node edit dialogbox
+ RED.editor.edit(d);
+ dgNumberFound = true;
+ }else{
+ //thisNode.select("rect").style({"stroke":"#999","stroke-width" :"2","stroke-dasharray":"none"});
+ //$("#" + d.id ).find("rect").attr("class","node-found-clear");
+ thisNode.select("rect").attr("class","node");
+ //$("#" + d.id ).find("rect").attr("class","node");
+ //$("#find-dgnumber-status").text("DGNumber :" + dgnumVal + " Not found");
+
+ }
+ }
+ });
+ if(!dgNumberFound){
+ $("#find-dgnumber-status").text("DGNumber :" + dgnumVal + " Not found");
+ }
+ }
+ },
+ {
+ text: "Close",
+ click: function() {
+ $("#dgnumber-find-dialog").dialog("close");
+ }
+ }
+ ],
+ open:function(){
+ //Bind the Enter key to Find button
+ $('#dgnumber-find-dialog').keypress(function(e) {
+ if (e.keyCode == $.ui.keyCode.ENTER) {
+ $('#dgnumber-find-dialog').parent().find('.ui-dialog-buttonpane button:first').click();
+ return false;
+ }
+ });
+ $(function(){
+ //set focus on the input box
+ $("#dgnumber-val-id").focus();
+ });
+ }
+ }).dialog("open").html(htmlStr);
+ });
+ },
+ showSearchTextDialog: function showSearchTextDialog(){
+ $(function() {
+ var isLoopDetected = detectLoop();
+ console.log("isLoopDetected:" + isLoopDetected);
+ if(isLoopDetected){
+ return false;
+ }
+ updateDgNumbers();
+ //console.log("In the showSearchTextDialog.");
+ var htmlStr="<div id='search-text-div' style='width:675;height:525'><label>Search Text</label><input style='width:500px;' id='search-text-val-id' type='text' value=''><br><input id='ignore-case-id' type='checkbox' name='ignorecase' value='1' >Ignore Case<br><p id='search-text-status' style='color:red'></p></div>";
+ //console.log("setting up search-text-dialog.");
+ $("#search-text-dialog").dialog({
+ modal:true,
+ autoOpen :false,
+ title: "Search text in DG",
+ width: 600,
+ height: 515,
+ minWidth : 500,
+ minHeight :415,
+ buttons :[
+ {
+ text: "Search",
+ click: function() {
+
+ var node = vis.selectAll(".nodegroup").data(RED.nodes.nodes.filter(function(d) { return d.z == activeWorkspace }),function(d){return d.id});
+ var searchText = $("#search-text-val-id").val();
+ $("#search-text-status").text("");
+ if(searchText != undefined && searchText != '' && searchText != ''){
+ searchText = searchText.trim();
+ }else{
+ searchText ="";
+ node.each(function(d,i) {
+ var thisNode = d3.select(this);
+ thisNode.select("rect").attr("class","node");
+ });
+ return;
+ }
+
+ var foundSearchText = false;
+ var foundInDgNumArr = [];
+ //console.log("In search function");
+ node.each(function(d,i) {
+ var thisNode = d3.select(this);
+ var dgn = d.dgnumber;
+ var xml = d.xml;
+ var nName = d.name;
+
+ var ignoreCase = $('#ignore-case-id').prop('checked')
+ var options = 'g';
+ if(ignoreCase){
+ options='gi';
+ }
+ var searchPattern = new RegExp(searchText, options );
+ if(xml == undefined || xml == null){
+ xml = "";
+ }
+ if(nName == undefined || nName == null){
+ nName = "";
+ }
+ //console.log(searchPattern);
+ var count1 = (xml.match(searchPattern) || []).length;
+ //console.log(count1);
+ var count2 = (nName.match(searchPattern) || []).length;
+ //console.log(count2);
+
+ if(count1 >0 || count2 > 0){
+ thisNode.select("rect").attr("class","node text_found");
+ var dgn = d.dgnumber;
+
+ var dgNumber = dgn;
+ if(dgn != undefined && typeof dgn == 'object'){
+ console.log("DGNUMBERS:" + dgn);
+ dgNumber = dgn[0];
+ }
+ if(dgn != undefined ){
+ foundInDgNumArr.push(dgNumber);
+ }else{
+ foundInDgNumArr.push(d.type);
+ }
+ foundSearchText=true;
+ }else{
+ thisNode.select("rect").attr("class","node");
+ }
+ });
+ if(!foundSearchText){
+ $("#search-text-status").text("Search Text :" + searchText + " Not found");
+ }else{
+ //console.log("closing dialog");
+ //$("#search-text-dialog").dialog("close");
+ console.log(foundInDgNumArr);
+ $("#search-text-status").text("Found in DG numbers :" + foundInDgNumArr);
+ }
+ }
+ },
+ {
+ text: "Close",
+ click: function() {
+ //console.log("closing dialog");
+ $("#search-text-dialog").dialog("close");
+ }
+ }
+ ],
+ open:function(){
+ //console.log("called open.");
+ //Bind the Enter key to Find button
+ $('#search-text-dialog').keypress(function(e) {
+ if (e.keyCode == $.ui.keyCode.ENTER) {
+ $('#search-text-dialog').parent().find('.ui-dialog-buttonpane button:first').click();
+ return false;
+ }
+ });
+ $(function(){
+ //set focus on the input box
+ $("#search-text-id").focus();
+ });
+ //console.log("done open call.");
+ }
+ }).dialog('open').html(htmlStr);
+ });
+ },
+ showRequestTemplateDialog: function showRequestTemplateDialog(){
+ $(function() {
+ var currNodes = RED.nodes.nodes.filter(function(d) { return d.z == activeWorkspace })
+ var moduleName = "";
+ var rpcName = "";
+ if(currNodes != null && currNodes.length > 1){
+ currNodes.forEach(function(n){
+ if(n.type == 'service-logic'){
+ moduleName = getAttributeValue(n.xml,"module");
+ }else if(n.type == 'method'){
+ rpcName = getAttributeValue(n.xml,"rpc");
+ }
+ });
+ }
+ console.log("moduleName:" + moduleName);
+ console.log("rpcName:" + rpcName);
+ var inputValObj = reqInputValues[moduleName + "_" + rpcName];
+ var inputValStr = "Not found. Please make sure that the Module is loaded and the rpc has input.";
+ if(inputValObj != undefined && inputValObj != null){
+ inputValStr = "{\n\"input\" : " + JSON.stringify(inputValObj,null,4)+ "\n}";
+ }
+
+ //var htmlStr="<div id='request-template-div' style='width:875px;height:575px'><textarea style='width:875px;height:575px'>" + inputValStr + "</textarea></div>"
+ //var htmlStr="<div id='request-template-div' style='width:750px;height:550px;font-weight:bold;font-size:1em'><pre>" + inputValStr + "</pre></div>"
+ var htmlStr="<textarea readonly='1' id='request-template-textarea' style='width:750px;height:550px;font-weight:bold;font-size:1em'>" + inputValStr + "</textarea>"
+ $("#request-input-dialog").dialog({
+ dialogClass :"no-close",
+ modal:true,
+ autoOpen :false,
+ title: "Request Template for Module:" + moduleName + " RPC:" + rpcName,
+ width: 800,
+ height: "auto",
+ buttons :[
+ {
+ text: "Close",
+ click: function() {
+ $("#request-input-dialog").dialog("close");
+ }
+ }
+ ],
+ open:function(){
+ $('#request-input-dialog').css('overflow', 'hidden');
+ }
+ }).dialog("open").html(htmlStr);
+ });
+ },
+ showNumbers: function(s) {
+ console.log("showNumbers:" + s);
+ showNumbers = s;
+ RED.nodes.eachNode(function(n) { n.dirty = true;});
+ redraw();
+ },
+ showNodePalette: function(s) {
+ showNodePalette=s;
+ if(!s){
+ $("#main-container").addClass("palette-bar-closed");
+ //RED.menu.setSelected("btn-node-panel",true);
+ }else{
+ $("#main-container").removeClass("palette-bar-closed");
+ }
+ //console.log("showNodePalette:" + showNodePalette);
+ },
+
+ //TODO: should these move to an import/export module?
+ showImportNodesDialog: showImportNodesDialog,
+ showExportNodesDialog: showExportNodesDialog,
+ showExportNodesLibraryDialog: showExportNodesLibraryDialog
+ };
+})();
diff --git a/dgbuilder/public/red/ui/view.js.orig b/dgbuilder/public/red/ui/view.js.orig
new file mode 100644
index 0000000..73981fd
--- /dev/null
+++ b/dgbuilder/public/red/ui/view.js.orig
@@ -0,0 +1,1639 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+
+RED.view = (function() {
+ var space_width = 5000,
+ space_height = 5000,
+ lineCurveScale = 0.75,
+ scaleFactor = 1,
+ node_width = 100,
+ node_height = 30;
+
+ var touchLongPressTimeout = 1000,
+ startTouchDistance = 0,
+ startTouchCenter = [],
+ moveTouchCenter = [],
+ touchStartTime = 0;
+
+
+ var activeWorkspace = 0;
+ var workspaceScrollPositions = {};
+
+ var selected_link = null,
+ mousedown_link = null,
+ mousedown_node = null,
+ mousedown_port_type = null,
+ mousedown_port_index = 0,
+ mouseup_node = null,
+ mouse_offset = [0,0],
+ mouse_position = null,
+ mouse_mode = 0,
+ moving_set = [],
+ dirty = false,
+ lasso = null,
+ showStatus = false,
+ lastClickNode = null,
+ dblClickPrimed = null,
+ clickTime = 0,
+ clickElapsed = 0;
+
+ var clipboard = "";
+
+ var status_colours = {
+ "red": "#c00",
+ "green": "#5a8",
+ "yellow": "#F9DF31",
+ "blue": "#53A3F3",
+ "grey": "#d3d3d3"
+ }
+
+ var outer = d3.select("#chart")
+ .append("svg:svg")
+ .attr("width", space_width)
+ .attr("height", space_height)
+ .attr("pointer-events", "all")
+ .style("cursor","crosshair");
+
+ var vis = outer
+ .append('svg:g')
+ .on("dblclick.zoom", null)
+ .append('svg:g')
+ .on("mousemove", canvasMouseMove)
+ .on("mousedown", canvasMouseDown)
+ .on("mouseup", canvasMouseUp)
+ .on("touchend", function() {
+ clearTimeout(touchStartTime);
+ touchStartTime = null;
+ if (RED.touch.radialMenu.active()) {
+ return;
+ }
+ if (lasso) {
+ outer_background.attr("fill","#fff");
+ }
+ canvasMouseUp.call(this);
+ })
+ .on("touchcancel", canvasMouseUp)
+ .on("touchstart", function() {
+ var touch0;
+ if (d3.event.touches.length>1) {
+ clearTimeout(touchStartTime);
+ touchStartTime = null;
+ d3.event.preventDefault();
+ touch0 = d3.event.touches.item(0);
+ var touch1 = d3.event.touches.item(1);
+ var a = touch0['pageY']-touch1['pageY'];
+ var b = touch0['pageX']-touch1['pageX'];
+
+ var offset = $("#chart").offset();
+ var scrollPos = [$("#chart").scrollLeft(),$("#chart").scrollTop()];
+ startTouchCenter = [
+ (touch1['pageX']+(b/2)-offset.left+scrollPos[0])/scaleFactor,
+ (touch1['pageY']+(a/2)-offset.top+scrollPos[1])/scaleFactor
+ ];
+ moveTouchCenter = [
+ touch1['pageX']+(b/2),
+ touch1['pageY']+(a/2)
+ ]
+ startTouchDistance = Math.sqrt((a*a)+(b*b));
+ } else {
+ var obj = d3.select(document.body);
+ touch0 = d3.event.touches.item(0);
+ var pos = [touch0.pageX,touch0.pageY];
+ startTouchCenter = [touch0.pageX,touch0.pageY];
+ startTouchDistance = 0;
+ var point = d3.touches(this)[0];
+ touchStartTime = setTimeout(function() {
+ touchStartTime = null;
+ showTouchMenu(obj,pos);
+ //lasso = vis.append('rect')
+ // .attr("ox",point[0])
+ // .attr("oy",point[1])
+ // .attr("rx",2)
+ // .attr("ry",2)
+ // .attr("x",point[0])
+ // .attr("y",point[1])
+ // .attr("width",0)
+ // .attr("height",0)
+ // .attr("class","lasso");
+ //outer_background.attr("fill","#e3e3f3");
+ },touchLongPressTimeout);
+ }
+ })
+ .on("touchmove", function(){
+ if (RED.touch.radialMenu.active()) {
+ d3.event.preventDefault();
+ return;
+ }
+ var touch0;
+ if (d3.event.touches.length<2) {
+ if (touchStartTime) {
+ touch0 = d3.event.touches.item(0);
+ var dx = (touch0.pageX-startTouchCenter[0]);
+ var dy = (touch0.pageY-startTouchCenter[1]);
+ var d = Math.abs(dx*dx+dy*dy);
+ if (d > 64) {
+ clearTimeout(touchStartTime);
+ touchStartTime = null;
+ }
+ } else if (lasso) {
+ d3.event.preventDefault();
+ }
+ canvasMouseMove.call(this);
+ } else {
+ touch0 = d3.event.touches.item(0);
+ var touch1 = d3.event.touches.item(1);
+ var a = touch0['pageY']-touch1['pageY'];
+ var b = touch0['pageX']-touch1['pageX'];
+ var offset = $("#chart").offset();
+ var scrollPos = [$("#chart").scrollLeft(),$("#chart").scrollTop()];
+ var moveTouchDistance = Math.sqrt((a*a)+(b*b));
+ var touchCenter = [
+ touch1['pageX']+(b/2),
+ touch1['pageY']+(a/2)
+ ];
+
+ if (!isNaN(moveTouchDistance)) {
+ oldScaleFactor = scaleFactor;
+ scaleFactor = Math.min(2,Math.max(0.3, scaleFactor + (Math.floor(((moveTouchDistance*100)-(startTouchDistance*100)))/10000)));
+
+ var deltaTouchCenter = [ // Try to pan whilst zooming - not 100%
+ startTouchCenter[0]*(scaleFactor-oldScaleFactor),//-(touchCenter[0]-moveTouchCenter[0]),
+ startTouchCenter[1]*(scaleFactor-oldScaleFactor) //-(touchCenter[1]-moveTouchCenter[1])
+ ];
+
+ startTouchDistance = moveTouchDistance;
+ moveTouchCenter = touchCenter;
+
+ $("#chart").scrollLeft(scrollPos[0]+deltaTouchCenter[0]);
+ $("#chart").scrollTop(scrollPos[1]+deltaTouchCenter[1]);
+ redraw();
+ }
+ }
+ });
+
+ var outer_background = vis.append('svg:rect')
+ .attr('width', space_width)
+ .attr('height', space_height)
+ .attr('fill','#fff');
+
+ //var gridScale = d3.scale.linear().range([0,2000]).domain([0,2000]);
+ //var grid = vis.append('g');
+ //
+ //grid.selectAll("line.horizontal").data(gridScale.ticks(100)).enter()
+ // .append("line")
+ // .attr(
+ // {
+ // "class":"horizontal",
+ // "x1" : 0,
+ // "x2" : 2000,
+ // "y1" : function(d){ return gridScale(d);},
+ // "y2" : function(d){ return gridScale(d);},
+ // "fill" : "none",
+ // "shape-rendering" : "crispEdges",
+ // "stroke" : "#eee",
+ // "stroke-width" : "1px"
+ // });
+ //grid.selectAll("line.vertical").data(gridScale.ticks(100)).enter()
+ // .append("line")
+ // .attr(
+ // {
+ // "class":"vertical",
+ // "y1" : 0,
+ // "y2" : 2000,
+ // "x1" : function(d){ return gridScale(d);},
+ // "x2" : function(d){ return gridScale(d);},
+ // "fill" : "none",
+ // "shape-rendering" : "crispEdges",
+ // "stroke" : "#eee",
+ // "stroke-width" : "1px"
+ // });
+
+
+ var drag_line = vis.append("svg:path").attr("class", "drag_line");
+
+ var workspace_tabs = RED.tabs.create({
+ id: "workspace-tabs",
+ onchange: function(tab) {
+ if (tab.type == "subflow") {
+ $("#workspace-toolbar").show();
+ } else {
+ $("#workspace-toolbar").hide();
+ }
+ var chart = $("#chart");
+ if (activeWorkspace !== 0) {
+ workspaceScrollPositions[activeWorkspace] = {
+ left:chart.scrollLeft(),
+ top:chart.scrollTop()
+ };
+ }
+ var scrollStartLeft = chart.scrollLeft();
+ var scrollStartTop = chart.scrollTop();
+
+ activeWorkspace = tab.id;
+ if (workspaceScrollPositions[activeWorkspace]) {
+ chart.scrollLeft(workspaceScrollPositions[activeWorkspace].left);
+ chart.scrollTop(workspaceScrollPositions[activeWorkspace].top);
+ } else {
+ chart.scrollLeft(0);
+ chart.scrollTop(0);
+ }
+ var scrollDeltaLeft = chart.scrollLeft() - scrollStartLeft;
+ var scrollDeltaTop = chart.scrollTop() - scrollStartTop;
+ if (mouse_position != null) {
+ mouse_position[0] += scrollDeltaLeft;
+ mouse_position[1] += scrollDeltaTop;
+ }
+
+ clearSelection();
+ RED.nodes.eachNode(function(n) {
+ n.dirty = true;
+ });
+ redraw();
+ },
+ ondblclick: function(tab) {
+ showRenameWorkspaceDialog(tab.id);
+ },
+ onadd: function(tab) {
+ RED.menu.addItem("btn-workspace-menu",{
+ id:"btn-workspace-menu-"+tab.id.replace(".","-"),
+ label:tab.label,
+ onselect:function() {
+ workspace_tabs.activateTab(tab.id);
+ }
+ });
+ RED.menu.setDisabled("btn-workspace-delete",workspace_tabs.count() == 1);
+ },
+ onremove: function(tab) {
+ RED.menu.setDisabled("btn-workspace-delete",workspace_tabs.count() == 1);
+ RED.menu.removeItem("btn-workspace-menu-"+tab.id.replace(".","-"));
+ }
+ });
+
+ var workspaceIndex = 0;
+
+ function addWorkspace() {
+ var tabId = RED.nodes.id();
+ do {
+ workspaceIndex += 1;
+ } while($("#workspace-tabs a[title='Sheet "+workspaceIndex+"']").size() !== 0);
+
+ var ws = {type:"tab",id:tabId,label:"Sheet "+workspaceIndex};
+ RED.nodes.addWorkspace(ws);
+ workspace_tabs.addTab(ws);
+ workspace_tabs.activateTab(tabId);
+ RED.history.push({t:'add',workspaces:[ws],dirty:dirty});
+ RED.view.dirty(true);
+ }
+ $(function() {
+ $('#btn-workspace-add-tab').on("click",addWorkspace);
+ $('#btn-workspace-add').on("click",addWorkspace);
+ $('#btn-workspace-edit').on("click",function() {
+ showRenameWorkspaceDialog(activeWorkspace);
+ });
+ $('#btn-workspace-delete').on("click",function() {
+ deleteWorkspace(activeWorkspace);
+ });
+ });
+
+ function deleteWorkspace(id) {
+ if (workspace_tabs.count() == 1) {
+ return;
+ }
+ var ws = RED.nodes.workspace(id);
+ $( "#node-dialog-delete-workspace" ).dialog('option','workspace',ws);
+ $( "#node-dialog-delete-workspace-name" ).text(ws.label);
+ $( "#node-dialog-delete-workspace" ).dialog('open');
+ }
+
+ function canvasMouseDown() {
+ if (!mousedown_node && !mousedown_link) {
+ selected_link = null;
+ updateSelection();
+ }
+ if (mouse_mode === 0) {
+ if (lasso) {
+ lasso.remove();
+ lasso = null;
+ }
+
+ if (!touchStartTime) {
+ var point = d3.mouse(this);
+ lasso = vis.append('rect')
+ .attr("ox",point[0])
+ .attr("oy",point[1])
+ .attr("rx",2)
+ .attr("ry",2)
+ .attr("x",point[0])
+ .attr("y",point[1])
+ .attr("width",0)
+ .attr("height",0)
+ .attr("class","lasso");
+ d3.event.preventDefault();
+ }
+ }
+ }
+
+ function canvasMouseMove() {
+ mouse_position = d3.touches(this)[0]||d3.mouse(this);
+
+ // Prevent touch scrolling...
+ //if (d3.touches(this)[0]) {
+ // d3.event.preventDefault();
+ //}
+
+ // TODO: auto scroll the container
+ //var point = d3.mouse(this);
+ //if (point[0]-container.scrollLeft < 30 && container.scrollLeft > 0) { container.scrollLeft -= 15; }
+ //console.log(d3.mouse(this),container.offsetWidth,container.offsetHeight,container.scrollLeft,container.scrollTop);
+
+ if (lasso) {
+ var ox = parseInt(lasso.attr("ox"));
+ var oy = parseInt(lasso.attr("oy"));
+ var x = parseInt(lasso.attr("x"));
+ var y = parseInt(lasso.attr("y"));
+ var w;
+ var h;
+ if (mouse_position[0] < ox) {
+ x = mouse_position[0];
+ w = ox-x;
+ } else {
+ w = mouse_position[0]-x;
+ }
+ if (mouse_position[1] < oy) {
+ y = mouse_position[1];
+ h = oy-y;
+ } else {
+ h = mouse_position[1]-y;
+ }
+ lasso
+ .attr("x",x)
+ .attr("y",y)
+ .attr("width",w)
+ .attr("height",h)
+ ;
+ return;
+ }
+
+ if (mouse_mode != RED.state.IMPORT_DRAGGING && !mousedown_node && selected_link == null) {
+ return;
+ }
+
+ var mousePos;
+ if (mouse_mode == RED.state.JOINING) {
+ // update drag line
+ drag_line.attr("class", "drag_line");
+ mousePos = mouse_position;
+ var numOutputs = (mousedown_port_type === 0)?(mousedown_node.outputs || 1):1;
+ var sourcePort = mousedown_port_index;
+ var portY = -((numOutputs-1)/2)*13 +13*sourcePort;
+
+ var sc = (mousedown_port_type === 0)?1:-1;
+
+ var dy = mousePos[1]-(mousedown_node.y+portY);
+ var dx = mousePos[0]-(mousedown_node.x+sc*mousedown_node.w/2);
+ var delta = Math.sqrt(dy*dy+dx*dx);
+ var scale = lineCurveScale;
+ var scaleY = 0;
+
+ if (delta < node_width) {
+ scale = 0.75-0.75*((node_width-delta)/node_width);
+ }
+ if (dx*sc < 0) {
+ scale += 2*(Math.min(5*node_width,Math.abs(dx))/(5*node_width));
+ if (Math.abs(dy) < 3*node_height) {
+ scaleY = ((dy>0)?0.5:-0.5)*(((3*node_height)-Math.abs(dy))/(3*node_height))*(Math.min(node_width,Math.abs(dx))/(node_width)) ;
+ }
+ }
+
+ drag_line.attr("d",
+ "M "+(mousedown_node.x+sc*mousedown_node.w/2)+" "+(mousedown_node.y+portY)+
+ " C "+(mousedown_node.x+sc*(mousedown_node.w/2+node_width*scale))+" "+(mousedown_node.y+portY+scaleY*node_height)+" "+
+ (mousePos[0]-sc*(scale)*node_width)+" "+(mousePos[1]-scaleY*node_height)+" "+
+ mousePos[0]+" "+mousePos[1]
+ );
+ d3.event.preventDefault();
+ } else if (mouse_mode == RED.state.MOVING) {
+ mousePos = mouse_position;
+ var d = (mouse_offset[0]-mousePos[0])*(mouse_offset[0]-mousePos[0]) + (mouse_offset[1]-mousePos[1])*(mouse_offset[1]-mousePos[1]);
+ if (d > 2) {
+ mouse_mode = RED.state.MOVING_ACTIVE;
+ clickElapsed = 0;
+ }
+ } else if (mouse_mode == RED.state.MOVING_ACTIVE || mouse_mode == RED.state.IMPORT_DRAGGING) {
+ mousePos = mouse_position;
+ var node;
+ var i;
+ var minX = 0;
+ var minY = 0;
+ for (var n = 0; n<moving_set.length; n++) {
+ node = moving_set[n];
+ if (d3.event.shiftKey) {
+ node.n.ox = node.n.x;
+ node.n.oy = node.n.y;
+ }
+ node.n.x = mousePos[0]+node.dx;
+ node.n.y = mousePos[1]+node.dy;
+ node.n.dirty = true;
+ minX = Math.min(node.n.x-node.n.w/2-5,minX);
+ minY = Math.min(node.n.y-node.n.h/2-5,minY);
+ }
+ if (minX !== 0 || minY !== 0) {
+ for (i = 0; i<moving_set.length; i++) {
+ node = moving_set[i];
+ node.n.x -= minX;
+ node.n.y -= minY;
+ }
+ }
+ if (d3.event.shiftKey && moving_set.length > 0) {
+ var gridOffset = [0,0];
+ node = moving_set[0];
+ gridOffset[0] = node.n.x-(20*Math.floor((node.n.x-node.n.w/2)/20)+node.n.w/2);
+ gridOffset[1] = node.n.y-(20*Math.floor(node.n.y/20));
+ if (gridOffset[0] !== 0 || gridOffset[1] !== 0) {
+ for (i = 0; i<moving_set.length; i++) {
+ node = moving_set[i];
+ node.n.x -= gridOffset[0];
+ node.n.y -= gridOffset[1];
+ if (node.n.x == node.n.ox && node.n.y == node.n.oy) {
+ node.dirty = false;
+ }
+ }
+ }
+ }
+ }
+ redraw();
+ }
+
+ function canvasMouseUp() {
+ if (mousedown_node && mouse_mode == RED.state.JOINING) {
+ drag_line.attr("class", "drag_line_hidden");
+ }
+ if (lasso) {
+ var x = parseInt(lasso.attr("x"));
+ var y = parseInt(lasso.attr("y"));
+ var x2 = x+parseInt(lasso.attr("width"));
+ var y2 = y+parseInt(lasso.attr("height"));
+ if (!d3.event.ctrlKey) {
+ clearSelection();
+ }
+ RED.nodes.eachNode(function(n) {
+ if (n.z == activeWorkspace && !n.selected) {
+ n.selected = (n.x > x && n.x < x2 && n.y > y && n.y < y2);
+ if (n.selected) {
+ n.dirty = true;
+ moving_set.push({n:n});
+ }
+ }
+ });
+ updateSelection();
+ lasso.remove();
+ lasso = null;
+ } else if (mouse_mode == RED.state.DEFAULT && mousedown_link == null && !d3.event.ctrlKey ) {
+ clearSelection();
+ updateSelection();
+ }
+ if (mouse_mode == RED.state.MOVING_ACTIVE) {
+ if (moving_set.length > 0) {
+ var ns = [];
+ for (var j=0;j<moving_set.length;j++) {
+ ns.push({n:moving_set[j].n,ox:moving_set[j].ox,oy:moving_set[j].oy});
+ }
+ RED.history.push({t:'move',nodes:ns,dirty:dirty});
+ }
+ }
+ if (mouse_mode == RED.state.MOVING || mouse_mode == RED.state.MOVING_ACTIVE) {
+ for (var i=0;i<moving_set.length;i++) {
+ delete moving_set[i].ox;
+ delete moving_set[i].oy;
+ }
+ }
+ if (mouse_mode == RED.state.IMPORT_DRAGGING) {
+ RED.keyboard.remove(/* ESCAPE */ 27);
+ setDirty(true);
+ }
+ redraw();
+ // clear mouse event vars
+ resetMouseVars();
+ }
+
+ $('#btn-zoom-out').click(function() {zoomOut();});
+ $('#btn-zoom-zero').click(function() {zoomZero();});
+ $('#btn-zoom-in').click(function() {zoomIn();});
+ $("#chart").on('DOMMouseScroll mousewheel', function (evt) {
+ if ( evt.altKey ) {
+ evt.preventDefault();
+ evt.stopPropagation();
+ var move = -(evt.originalEvent.detail) || evt.originalEvent.wheelDelta;
+ if (move <= 0) { zoomOut(); }
+ else { zoomIn(); }
+ }
+ });
+ $("#chart").droppable({
+ accept:".palette_node",
+ drop: function( event, ui ) {
+ d3.event = event;
+ var selected_tool = ui.draggable[0].type;
+ var mousePos = d3.touches(this)[0]||d3.mouse(this);
+ mousePos[1] += this.scrollTop;
+ mousePos[0] += this.scrollLeft;
+ mousePos[1] /= scaleFactor;
+ mousePos[0] /= scaleFactor;
+
+ var nn = { id:(1+Math.random()*4294967295).toString(16),x: mousePos[0],y:mousePos[1],w:node_width,z:activeWorkspace};
+
+ nn.type = selected_tool;
+ nn._def = RED.nodes.getType(nn.type);
+ nn.outputs = nn._def.outputs;
+ nn.changed = true;
+
+ for (var d in nn._def.defaults) {
+ if (nn._def.defaults.hasOwnProperty(d)) {
+ nn[d] = nn._def.defaults[d].value;
+ }
+ }
+
+ if (nn._def.onadd) {
+ nn._def.onadd.call(nn);
+ }
+
+ nn.h = Math.max(node_height,(nn.outputs||0) * 15);
+ RED.history.push({t:'add',nodes:[nn.id],dirty:dirty});
+ RED.nodes.add(nn);
+ RED.editor.validateNode(nn);
+ setDirty(true);
+ // auto select dropped node - so info shows (if visible)
+ clearSelection();
+ nn.selected = true;
+ moving_set.push({n:nn});
+ updateSelection();
+ redraw();
+
+ if (nn._def.autoedit) {
+ RED.editor.edit(nn);
+ }
+ }
+ });
+
+ function zoomIn() {
+ if (scaleFactor < 2) {
+ scaleFactor += 0.1;
+ redraw();
+ }
+ }
+ function zoomOut() {
+ if (scaleFactor > 0.3) {
+ scaleFactor -= 0.1;
+ redraw();
+ }
+ }
+ function zoomZero() {
+ scaleFactor = 1;
+ redraw();
+ }
+
+ function selectAll() {
+ RED.nodes.eachNode(function(n) {
+ if (n.z == activeWorkspace) {
+ if (!n.selected) {
+ n.selected = true;
+ n.dirty = true;
+ moving_set.push({n:n});
+ }
+ }
+ });
+ selected_link = null;
+ updateSelection();
+ redraw();
+ }
+
+ function clearSelection() {
+ for (var i=0;i<moving_set.length;i++) {
+ var n = moving_set[i];
+ n.n.dirty = true;
+ n.n.selected = false;
+ }
+ moving_set = [];
+ selected_link = null;
+ }
+
+ function updateSelection() {
+ if (moving_set.length === 0) {
+ RED.menu.setDisabled("btn-export-menu",true);
+ RED.menu.setDisabled("btn-export-clipboard",true);
+ RED.menu.setDisabled("btn-export-library",true);
+ } else {
+ RED.menu.setDisabled("btn-export-menu",false);
+ RED.menu.setDisabled("btn-export-clipboard",false);
+ RED.menu.setDisabled("btn-export-library",false);
+ }
+ if (moving_set.length === 0 && selected_link == null) {
+ RED.keyboard.remove(/* backspace */ 8);
+ RED.keyboard.remove(/* delete */ 46);
+ RED.keyboard.remove(/* c */ 67);
+ RED.keyboard.remove(/* x */ 88);
+ } else {
+ RED.keyboard.add(/* backspace */ 8,function(){deleteSelection();d3.event.preventDefault();});
+ RED.keyboard.add(/* delete */ 46,function(){deleteSelection();d3.event.preventDefault();});
+ RED.keyboard.add(/* c */ 67,{ctrl:true},function(){copySelection();d3.event.preventDefault();});
+ RED.keyboard.add(/* x */ 88,{ctrl:true},function(){copySelection();deleteSelection();d3.event.preventDefault();});
+ }
+ if (moving_set.length === 0) {
+ RED.keyboard.remove(/* up */ 38);
+ RED.keyboard.remove(/* down */ 40);
+ RED.keyboard.remove(/* left */ 37);
+ RED.keyboard.remove(/* right*/ 39);
+ } else {
+ RED.keyboard.add(/* up */ 38, function() { if(d3.event.shiftKey){moveSelection( 0,-20)}else{moveSelection( 0,-1);}d3.event.preventDefault();},endKeyboardMove);
+ RED.keyboard.add(/* down */ 40, function() { if(d3.event.shiftKey){moveSelection( 0, 20)}else{moveSelection( 0, 1);}d3.event.preventDefault();},endKeyboardMove);
+ RED.keyboard.add(/* left */ 37, function() { if(d3.event.shiftKey){moveSelection(-20, 0)}else{moveSelection(-1, 0);}d3.event.preventDefault();},endKeyboardMove);
+ RED.keyboard.add(/* right*/ 39, function() { if(d3.event.shiftKey){moveSelection( 20, 0)}else{moveSelection( 1, 0);}d3.event.preventDefault();},endKeyboardMove);
+ }
+ if (moving_set.length == 1) {
+ RED.sidebar.info.refresh(moving_set[0].n);
+ } else {
+ RED.sidebar.info.clear();
+ }
+ }
+ function endKeyboardMove() {
+ var ns = [];
+ for (var i=0;i<moving_set.length;i++) {
+ ns.push({n:moving_set[i].n,ox:moving_set[i].ox,oy:moving_set[i].oy});
+ delete moving_set[i].ox;
+ delete moving_set[i].oy;
+ }
+ RED.history.push({t:'move',nodes:ns,dirty:dirty});
+ }
+ function moveSelection(dx,dy) {
+ var minX = 0;
+ var minY = 0;
+ var node;
+
+ for (var i=0;i<moving_set.length;i++) {
+ node = moving_set[i];
+ if (node.ox == null && node.oy == null) {
+ node.ox = node.n.x;
+ node.oy = node.n.y;
+ }
+ node.n.x += dx;
+ node.n.y += dy;
+ node.n.dirty = true;
+ minX = Math.min(node.n.x-node.n.w/2-5,minX);
+ minY = Math.min(node.n.y-node.n.h/2-5,minY);
+ }
+
+ if (minX !== 0 || minY !== 0) {
+ for (var n = 0; n<moving_set.length; n++) {
+ node = moving_set[n];
+ node.n.x -= minX;
+ node.n.y -= minY;
+ }
+ }
+
+ redraw();
+ }
+ function deleteSelection() {
+ var removedNodes = [];
+ var removedLinks = [];
+ var startDirty = dirty;
+ if (moving_set.length > 0) {
+ for (var i=0;i<moving_set.length;i++) {
+ var node = moving_set[i].n;
+ node.selected = false;
+ if (node.x < 0) {
+ node.x = 25
+ }
+ var rmlinks = RED.nodes.remove(node.id);
+ removedNodes.push(node);
+ removedLinks = removedLinks.concat(rmlinks);
+ }
+ moving_set = [];
+ setDirty(true);
+ }
+ if (selected_link) {
+ RED.nodes.removeLink(selected_link);
+ removedLinks.push(selected_link);
+ setDirty(true);
+ }
+ RED.history.push({t:'delete',nodes:removedNodes,links:removedLinks,dirty:startDirty});
+
+ selected_link = null;
+ updateSelection();
+ redraw();
+ }
+
+ function copySelection() {
+ if (moving_set.length > 0) {
+ var nns = [];
+ for (var n=0;n<moving_set.length;n++) {
+ var node = moving_set[n].n;
+ nns.push(RED.nodes.convertNode(node));
+ }
+ clipboard = JSON.stringify(nns);
+ RED.notify(moving_set.length+" node"+(moving_set.length>1?"s":"")+" copied");
+ }
+ }
+
+
+ function calculateTextWidth(str) {
+ var sp = document.createElement("span");
+ sp.className = "node_label";
+ sp.style.position = "absolute";
+ sp.style.top = "-1000px";
+ sp.innerHTML = (str||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
+ document.body.appendChild(sp);
+ var w = sp.offsetWidth;
+ document.body.removeChild(sp);
+ return 50+w;
+ }
+
+ function resetMouseVars() {
+ mousedown_node = null;
+ mouseup_node = null;
+ mousedown_link = null;
+ mouse_mode = 0;
+ mousedown_port_type = 0;
+ }
+
+ function portMouseDown(d,portType,portIndex) {
+ // disable zoom
+ //vis.call(d3.behavior.zoom().on("zoom"), null);
+ mousedown_node = d;
+ selected_link = null;
+ mouse_mode = RED.state.JOINING;
+ mousedown_port_type = portType;
+ mousedown_port_index = portIndex || 0;
+ document.body.style.cursor = "crosshair";
+ d3.event.preventDefault();
+ }
+
+ function portMouseUp(d,portType,portIndex) {
+ document.body.style.cursor = "";
+ if (mouse_mode == RED.state.JOINING && mousedown_node) {
+ if (typeof TouchEvent != "undefined" && d3.event instanceof TouchEvent) {
+ RED.nodes.eachNode(function(n) {
+ if (n.z == activeWorkspace) {
+ var hw = n.w/2;
+ var hh = n.h/2;
+ if (n.x-hw<mouse_position[0] && n.x+hw> mouse_position[0] &&
+ n.y-hh<mouse_position[1] && n.y+hh>mouse_position[1]) {
+ mouseup_node = n;
+ portType = mouseup_node._def.inputs>0?1:0;
+ portIndex = 0;
+ }
+ }
+ });
+ } else {
+ mouseup_node = d;
+ }
+ if (portType == mousedown_port_type || mouseup_node === mousedown_node) {
+ drag_line.attr("class", "drag_line_hidden");
+ resetMouseVars();
+ return;
+ }
+ var src,dst,src_port;
+ if (mousedown_port_type === 0) {
+ src = mousedown_node;
+ src_port = mousedown_port_index;
+ dst = mouseup_node;
+ } else if (mousedown_port_type == 1) {
+ src = mouseup_node;
+ dst = mousedown_node;
+ src_port = portIndex;
+ }
+
+ var existingLink = false;
+ RED.nodes.eachLink(function(d) {
+ existingLink = existingLink || (d.source === src && d.target === dst && d.sourcePort == src_port);
+ });
+ if (!existingLink) {
+ var link = {source: src, sourcePort:src_port, target: dst};
+ RED.nodes.addLink(link);
+ RED.history.push({t:'add',links:[link],dirty:dirty});
+ setDirty(true);
+ }
+ selected_link = null;
+ redraw();
+ }
+ }
+
+ function nodeMouseUp(d) {
+ if (dblClickPrimed && mousedown_node == d && clickElapsed > 0 && clickElapsed < 750) {
+ RED.editor.edit(d);
+ clickElapsed = 0;
+ d3.event.stopPropagation();
+ return;
+ }
+ portMouseUp(d, d._def.inputs > 0 ? 1 : 0, 0);
+ }
+
+ function nodeMouseDown(d) {
+ //var touch0 = d3.event;
+ //var pos = [touch0.pageX,touch0.pageY];
+ //RED.touch.radialMenu.show(d3.select(this),pos);
+ if (mouse_mode == RED.state.IMPORT_DRAGGING) {
+ RED.keyboard.remove(/* ESCAPE */ 27);
+ updateSelection();
+ setDirty(true);
+ redraw();
+ resetMouseVars();
+ d3.event.stopPropagation();
+ return;
+ }
+ mousedown_node = d;
+ var now = Date.now();
+ clickElapsed = now-clickTime;
+ clickTime = now;
+
+ dblClickPrimed = (lastClickNode == mousedown_node);
+ lastClickNode = mousedown_node;
+
+ var i;
+
+ if (d.selected && d3.event.ctrlKey) {
+ d.selected = false;
+ for (i=0;i<moving_set.length;i+=1) {
+ if (moving_set[i].n === d) {
+ moving_set.splice(i,1);
+ break;
+ }
+ }
+ } else {
+ if (d3.event.shiftKey) {
+ clearSelection();
+ var cnodes = RED.nodes.getAllFlowNodes(mousedown_node);
+ for (var n=0;n<cnodes.length;n++) {
+ cnodes[n].selected = true;
+ cnodes[n].dirty = true;
+ moving_set.push({n:cnodes[n]});
+ }
+ } else if (!d.selected) {
+ if (!d3.event.ctrlKey) {
+ clearSelection();
+ }
+ mousedown_node.selected = true;
+ moving_set.push({n:mousedown_node});
+ }
+ selected_link = null;
+ if (d3.event.button != 2) {
+ mouse_mode = RED.state.MOVING;
+ var mouse = d3.touches(this)[0]||d3.mouse(this);
+ mouse[0] += d.x-d.w/2;
+ mouse[1] += d.y-d.h/2;
+ for (i=0;i<moving_set.length;i++) {
+ moving_set[i].ox = moving_set[i].n.x;
+ moving_set[i].oy = moving_set[i].n.y;
+ moving_set[i].dx = moving_set[i].n.x-mouse[0];
+ moving_set[i].dy = moving_set[i].n.y-mouse[1];
+ }
+ mouse_offset = d3.mouse(document.body);
+ if (isNaN(mouse_offset[0])) {
+ mouse_offset = d3.touches(document.body)[0];
+ }
+ }
+ }
+ d.dirty = true;
+ updateSelection();
+ redraw();
+ d3.event.stopPropagation();
+ }
+
+ function nodeButtonClicked(d) {
+ if (d._def.button.toggle) {
+ d[d._def.button.toggle] = !d[d._def.button.toggle];
+ d.dirty = true;
+ }
+ if (d._def.button.onclick) {
+ d._def.button.onclick.call(d);
+ }
+ if (d.dirty) {
+ redraw();
+ }
+ d3.event.preventDefault();
+ }
+
+ function showTouchMenu(obj,pos) {
+ var mdn = mousedown_node;
+ var options = [];
+ options.push({name:"delete",disabled:(moving_set.length===0),onselect:function() {deleteSelection();}});
+ options.push({name:"cut",disabled:(moving_set.length===0),onselect:function() {copySelection();deleteSelection();}});
+ options.push({name:"copy",disabled:(moving_set.length===0),onselect:function() {copySelection();}});
+ options.push({name:"paste",disabled:(clipboard.length===0),onselect:function() {importNodes(clipboard,true);}});
+ options.push({name:"edit",disabled:(moving_set.length != 1),onselect:function() { RED.editor.edit(mdn);}});
+ options.push({name:"select",onselect:function() {selectAll();}});
+ options.push({name:"undo",disabled:(RED.history.depth() === 0),onselect:function() {RED.history.pop();}});
+
+ RED.touch.radialMenu.show(obj,pos,options);
+ resetMouseVars();
+ }
+ function redraw() {
+ vis.attr("transform","scale("+scaleFactor+")");
+ outer.attr("width", space_width*scaleFactor).attr("height", space_height*scaleFactor);
+
+ if (mouse_mode != RED.state.JOINING) {
+ // Don't bother redrawing nodes if we're drawing links
+
+ var node = vis.selectAll(".nodegroup").data(RED.nodes.nodes.filter(function(d) { return d.z == activeWorkspace }),function(d){return d.id});
+ node.exit().remove();
+
+ var nodeEnter = node.enter().insert("svg:g").attr("class", "node nodegroup");
+ nodeEnter.each(function(d,i) {
+ var node = d3.select(this);
+ node.attr("id",d.id);
+ var l = d._def.label;
+ l = (typeof l === "function" ? l.call(d) : l)||"";
+ d.w = Math.max(node_width,calculateTextWidth(l)+(d._def.inputs>0?7:0) );
+ d.h = Math.max(node_height,(d.outputs||0) * 15);
+
+ if (d._def.badge) {
+ var badge = node.append("svg:g").attr("class","node_badge_group");
+ var badgeRect = badge.append("rect").attr("class","node_badge").attr("rx",5).attr("ry",5).attr("width",40).attr("height",15);
+ badge.append("svg:text").attr("class","node_badge_label").attr("x",35).attr("y",11).attr('text-anchor','end').text(d._def.badge());
+ if (d._def.onbadgeclick) {
+ badgeRect.attr("cursor","pointer")
+ .on("click",function(d) { d._def.onbadgeclick.call(d);d3.event.preventDefault();});
+ }
+ }
+
+ if (d._def.button) {
+ var nodeButtonGroup = node.append('svg:g')
+ .attr("transform",function(d) { return "translate("+((d._def.align == "right") ? 94 : -25)+",2)"; })
+ .attr("class",function(d) { return "node_button "+((d._def.align == "right") ? "node_right_button" : "node_left_button"); });
+ nodeButtonGroup.append('rect')
+ .attr("rx",8)
+ .attr("ry",8)
+ .attr("width",32)
+ .attr("height",node_height-4)
+ .attr("fill","#eee");//function(d) { return d._def.color;})
+ nodeButtonGroup.append('rect')
+ .attr("x",function(d) { return d._def.align == "right"? 10:5})
+ .attr("y",4)
+ .attr("rx",5)
+ .attr("ry",5)
+ .attr("width",16)
+ .attr("height",node_height-12)
+ .attr("fill",function(d) { return d._def.color;})
+ .attr("cursor","pointer")
+ .on("mousedown",function(d) {if (!lasso) { d3.select(this).attr("fill-opacity",0.2);d3.event.preventDefault(); d3.event.stopPropagation();}})
+ .on("mouseup",function(d) {if (!lasso) { d3.select(this).attr("fill-opacity",0.4);d3.event.preventDefault();d3.event.stopPropagation();}})
+ .on("mouseover",function(d) {if (!lasso) { d3.select(this).attr("fill-opacity",0.4);}})
+ .on("mouseout",function(d) {if (!lasso) {
+ var op = 1;
+ if (d._def.button.toggle) {
+ op = d[d._def.button.toggle]?1:0.2;
+ }
+ d3.select(this).attr("fill-opacity",op);
+ }})
+ .on("click",nodeButtonClicked)
+ .on("touchstart",nodeButtonClicked)
+ }
+
+ var mainRect = node.append("rect")
+ .attr("class", "node")
+ .classed("node_unknown",function(d) { return d.type == "unknown"; })
+ .attr("rx", 6)
+ .attr("ry", 6)
+ .attr("fill",function(d) { return d._def.color;})
+ .on("mouseup",nodeMouseUp)
+ .on("mousedown",nodeMouseDown)
+ .on("touchstart",function(d) {
+ var obj = d3.select(this);
+ var touch0 = d3.event.touches.item(0);
+ var pos = [touch0.pageX,touch0.pageY];
+ startTouchCenter = [touch0.pageX,touch0.pageY];
+ startTouchDistance = 0;
+ touchStartTime = setTimeout(function() {
+ showTouchMenu(obj,pos);
+ },touchLongPressTimeout);
+ nodeMouseDown.call(this,d)
+ })
+ .on("touchend", function(d) {
+ clearTimeout(touchStartTime);
+ touchStartTime = null;
+ if (RED.touch.radialMenu.active()) {
+ d3.event.stopPropagation();
+ return;
+ }
+ nodeMouseUp.call(this,d);
+ })
+ .on("mouseover",function(d) {
+ if (mouse_mode === 0) {
+ var node = d3.select(this);
+ node.classed("node_hovered",true);
+ }
+ })
+ .on("mouseout",function(d) {
+ var node = d3.select(this);
+ node.classed("node_hovered",false);
+ });
+
+ //node.append("rect").attr("class", "node-gradient-top").attr("rx", 6).attr("ry", 6).attr("height",30).attr("stroke","none").attr("fill","url(#gradient-top)").style("pointer-events","none");
+ //node.append("rect").attr("class", "node-gradient-bottom").attr("rx", 6).attr("ry", 6).attr("height",30).attr("stroke","none").attr("fill","url(#gradient-bottom)").style("pointer-events","none");
+
+ if (d._def.icon) {
+
+ var icon_group = node.append("g")
+ .attr("class","node_icon_group")
+ .attr("x",0).attr("y",0);
+
+ var icon_shade = icon_group.append("rect")
+ .attr("x",0).attr("y",0)
+ .attr("class","node_icon_shade")
+ .attr("width","30")
+ .attr("stroke","none")
+ .attr("fill","#000")
+ .attr("fill-opacity","0.05")
+ .attr("height",function(d){return Math.min(50,d.h-4);});
+
+ var icon = icon_group.append("image")
+ .attr("xlink:href","icons/"+d._def.icon)
+ .attr("class","node_icon")
+ .attr("x",0)
+ .attr("width","30")
+ .attr("height","30");
+
+ var icon_shade_border = icon_group.append("path")
+ .attr("d",function(d) { return "M 30 1 l 0 "+(d.h-2)})
+ .attr("class","node_icon_shade_border")
+ .attr("stroke-opacity","0.1")
+ .attr("stroke","#000")
+ .attr("stroke-width","2");
+
+ if ("right" == d._def.align) {
+ icon_group.attr('class','node_icon_group node_icon_group_'+d._def.align);
+ icon_shade_border.attr("d",function(d) { return "M 0 1 l 0 "+(d.h-2)})
+ //icon.attr('class','node_icon node_icon_'+d._def.align);
+ //icon.attr('class','node_icon_shade node_icon_shade_'+d._def.align);
+ //icon.attr('class','node_icon_shade_border node_icon_shade_border_'+d._def.align);
+ }
+
+ //if (d._def.inputs > 0 && d._def.align == null) {
+ // icon_shade.attr("width",35);
+ // icon.attr("transform","translate(5,0)");
+ // icon_shade_border.attr("transform","translate(5,0)");
+ //}
+ //if (d._def.outputs > 0 && "right" == d._def.align) {
+ // icon_shade.attr("width",35); //icon.attr("x",5);
+ //}
+
+ var img = new Image();
+ img.src = "icons/"+d._def.icon;
+ img.onload = function() {
+ icon.attr("width",Math.min(img.width,30));
+ icon.attr("height",Math.min(img.height,30));
+ icon.attr("x",15-Math.min(img.width,30)/2);
+ //if ("right" == d._def.align) {
+ // icon.attr("x",function(d){return d.w-img.width-1-(d.outputs>0?5:0);});
+ // icon_shade.attr("x",function(d){return d.w-30});
+ // icon_shade_border.attr("d",function(d){return "M "+(d.w-30)+" 1 l 0 "+(d.h-2);});
+ //}
+ }
+
+ //icon.style("pointer-events","none");
+ icon_group.style("pointer-events","none");
+ }
+ var text = node.append('svg:text').attr('class','node_label').attr('x', 38).attr('dy', '.35em').attr('text-anchor','start');
+ if (d._def.align) {
+ text.attr('class','node_label node_label_'+d._def.align);
+ text.attr('text-anchor','end');
+ }
+
+ var status = node.append("svg:g").attr("class","node_status_group").style("display","none");
+
+ var statusRect = status.append("rect").attr("class","node_status")
+ .attr("x",6).attr("y",1).attr("width",9).attr("height",9)
+ .attr("rx",2).attr("ry",2).attr("stroke-width","3");
+
+ var statusLabel = status.append("svg:text")
+ .attr("class","node_status_label")
+ .attr('x',20).attr('y',9)
+ .style({
+ 'stroke-width': 0,
+ 'fill': '#888',
+ 'font-size':'9pt',
+ 'stroke':'#000',
+ 'text-anchor':'start'
+ });
+
+ //node.append("circle").attr({"class":"centerDot","cx":0,"cy":0,"r":5});
+
+ if (d._def.inputs > 0) {
+ text.attr("x",38);
+ node.append("rect").attr("class","port port_input").attr("rx",3).attr("ry",3).attr("x",-5).attr("width",10).attr("height",10)
+ .on("mousedown",function(d){portMouseDown(d,1,0);})
+ .on("touchstart",function(d){portMouseDown(d,1,0);})
+ .on("mouseup",function(d){portMouseUp(d,1,0);} )
+ .on("touchend",function(d){portMouseUp(d,1,0);} )
+ .on("mouseover",function(d) { var port = d3.select(this); port.classed("port_hovered",(mouse_mode!=RED.state.JOINING || mousedown_port_type != 1 ));})
+ .on("mouseout",function(d) { var port = d3.select(this); port.classed("port_hovered",false);})
+ }
+
+ //node.append("path").attr("class","node_error").attr("d","M 3,-3 l 10,0 l -5,-8 z");
+ node.append("image").attr("class","node_error hidden").attr("xlink:href","icons/node-error.png").attr("x",0).attr("y",-6).attr("width",10).attr("height",9);
+ node.append("image").attr("class","node_changed hidden").attr("xlink:href","icons/node-changed.png").attr("x",12).attr("y",-6).attr("width",10).attr("height",10);
+ });
+
+ node.each(function(d,i) {
+ if (d.dirty) {
+ //if (d.x < -50) deleteSelection(); // Delete nodes if dragged back to palette
+ if (d.resize) {
+ var l = d._def.label;
+ l = (typeof l === "function" ? l.call(d) : l)||"";
+ d.w = Math.max(node_width,calculateTextWidth(l)+(d._def.inputs>0?7:0) );
+ d.h = Math.max(node_height,(d.outputs||0) * 15);
+ }
+ var thisNode = d3.select(this);
+ //thisNode.selectAll(".centerDot").attr({"cx":function(d) { return d.w/2;},"cy":function(d){return d.h/2}});
+ thisNode.attr("transform", function(d) { return "translate(" + (d.x-d.w/2) + "," + (d.y-d.h/2) + ")"; });
+ thisNode.selectAll(".node")
+ .attr("width",function(d){return d.w})
+ .attr("height",function(d){return d.h})
+ .classed("node_selected",function(d) { return d.selected; })
+ .classed("node_highlighted",function(d) { return d.highlighted; })
+ ;
+ //thisNode.selectAll(".node-gradient-top").attr("width",function(d){return d.w});
+ //thisNode.selectAll(".node-gradient-bottom").attr("width",function(d){return d.w}).attr("y",function(d){return d.h-30});
+
+ thisNode.selectAll(".node_icon_group_right").attr('transform', function(d){return "translate("+(d.w-30)+",0)"});
+ thisNode.selectAll(".node_label_right").attr('x', function(d){return d.w-38});
+ //thisNode.selectAll(".node_icon_right").attr("x",function(d){return d.w-d3.select(this).attr("width")-1-(d.outputs>0?5:0);});
+ //thisNode.selectAll(".node_icon_shade_right").attr("x",function(d){return d.w-30;});
+ //thisNode.selectAll(".node_icon_shade_border_right").attr("d",function(d){return "M "+(d.w-30)+" 1 l 0 "+(d.h-2)});
+
+
+ var numOutputs = d.outputs;
+ var y = (d.h/2)-((numOutputs-1)/2)*13;
+ d.ports = d.ports || d3.range(numOutputs);
+ d._ports = thisNode.selectAll(".port_output").data(d.ports);
+ d._ports.enter().append("rect").attr("class","port port_output").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10)
+ .on("mousedown",(function(){var node = d; return function(d,i){portMouseDown(node,0,i);}})() )
+ .on("touchstart",(function(){var node = d; return function(d,i){portMouseDown(node,0,i);}})() )
+ .on("mouseup",(function(){var node = d; return function(d,i){portMouseUp(node,0,i);}})() )
+ .on("touchend",(function(){var node = d; return function(d,i){portMouseUp(node,0,i);}})() )
+ .on("mouseover",function(d,i) { var port = d3.select(this); port.classed("port_hovered",(mouse_mode!=RED.state.JOINING || mousedown_port_type !== 0 ));})
+ .on("mouseout",function(d,i) { var port = d3.select(this); port.classed("port_hovered",false);});
+ d._ports.exit().remove();
+ if (d._ports) {
+ numOutputs = d.outputs || 1;
+ y = (d.h/2)-((numOutputs-1)/2)*13;
+ var x = d.w - 5;
+ d._ports.each(function(d,i) {
+ var port = d3.select(this);
+ port.attr("y",(y+13*i)-5).attr("x",x);
+ });
+ }
+ thisNode.selectAll('text.node_label').text(function(d,i){
+ if (d._def.label) {
+ if (typeof d._def.label == "function") {
+ return d._def.label.call(d);
+ } else {
+ return d._def.label;
+ }
+ }
+ return "";
+ })
+ .attr('y', function(d){return (d.h/2)-1;})
+ .attr('class',function(d){
+ return 'node_label'+
+ (d._def.align?' node_label_'+d._def.align:'')+
+ (d._def.labelStyle?' '+(typeof d._def.labelStyle == "function" ? d._def.labelStyle.call(d):d._def.labelStyle):'') ;
+ });
+ thisNode.selectAll(".node_tools").attr("x",function(d){return d.w-35;}).attr("y",function(d){return d.h-20;});
+
+ thisNode.selectAll(".node_changed")
+ .attr("x",function(d){return d.w-10})
+ .classed("hidden",function(d) { return !d.changed; });
+
+ thisNode.selectAll(".node_error")
+ .attr("x",function(d){return d.w-10-(d.changed?13:0)})
+ .classed("hidden",function(d) { return d.valid; });
+
+ thisNode.selectAll(".port_input").each(function(d,i) {
+ var port = d3.select(this);
+ port.attr("y",function(d){return (d.h/2)-5;})
+ });
+
+ thisNode.selectAll(".node_icon").attr("y",function(d){return (d.h-d3.select(this).attr("height"))/2;});
+ thisNode.selectAll(".node_icon_shade").attr("height",function(d){return d.h;});
+ thisNode.selectAll(".node_icon_shade_border").attr("d",function(d){ return "M "+(("right" == d._def.align) ?0:30)+" 1 l 0 "+(d.h-2)});
+
+
+ thisNode.selectAll('.node_right_button').attr("transform",function(d){
+ var x = d.w-6;
+ if (d._def.button.toggle && !d[d._def.button.toggle]) {
+ x = x - 8;
+ }
+ return "translate("+x+",2)";
+ });
+ thisNode.selectAll('.node_right_button rect').attr("fill-opacity",function(d){
+ if (d._def.button.toggle) {
+ return d[d._def.button.toggle]?1:0.2;
+ }
+ return 1;
+ });
+
+ //thisNode.selectAll('.node_right_button').attr("transform",function(d){return "translate("+(d.w - d._def.button.width.call(d))+","+0+")";}).attr("fill",function(d) {
+ // return typeof d._def.button.color === "function" ? d._def.button.color.call(d):(d._def.button.color != null ? d._def.button.color : d._def.color)
+ //});
+
+ thisNode.selectAll('.node_badge_group').attr("transform",function(d){return "translate("+(d.w-40)+","+(d.h+3)+")";});
+ thisNode.selectAll('text.node_badge_label').text(function(d,i) {
+ if (d._def.badge) {
+ if (typeof d._def.badge == "function") {
+ return d._def.badge.call(d);
+ } else {
+ return d._def.badge;
+ }
+ }
+ return "";
+ });
+ if (!showStatus || !d.status) {
+ thisNode.selectAll('.node_status_group').style("display","none");
+ } else {
+ thisNode.selectAll('.node_status_group').style("display","inline").attr("transform","translate(3,"+(d.h+3)+")");
+ var fill = status_colours[d.status.fill]; // Only allow our colours for now
+ if (d.status.shape == null && fill == null) {
+ thisNode.selectAll('.node_status').style("display","none");
+ } else {
+ var style;
+ if (d.status.shape == null || d.status.shape == "dot") {
+ style = {
+ display: "inline",
+ fill: fill,
+ stroke: fill
+ };
+ } else if (d.status.shape == "ring" ){
+ style = {
+ display: "inline",
+ fill: '#fff',
+ stroke: fill
+ }
+ }
+ thisNode.selectAll('.node_status').style(style);
+ }
+ if (d.status.text) {
+ thisNode.selectAll('.node_status_label').text(d.status.text);
+ } else {
+ thisNode.selectAll('.node_status_label').text("");
+ }
+ }
+
+ d.dirty = false;
+ }
+ });
+ }
+
+ var link = vis.selectAll(".link").data(RED.nodes.links.filter(function(d) { return d.source.z == activeWorkspace && d.target.z == activeWorkspace }),function(d) { return d.source.id+":"+d.sourcePort+":"+d.target.id;});
+
+ var linkEnter = link.enter().insert("g",".node").attr("class","link");
+
+ linkEnter.each(function(d,i) {
+ var l = d3.select(this);
+ l.append("svg:path").attr("class","link_background link_path")
+ .on("mousedown",function(d) {
+ mousedown_link = d;
+ clearSelection();
+ selected_link = mousedown_link;
+ updateSelection();
+ redraw();
+ d3.event.stopPropagation();
+ })
+ .on("touchstart",function(d) {
+ mousedown_link = d;
+ clearSelection();
+ selected_link = mousedown_link;
+ updateSelection();
+ redraw();
+ d3.event.stopPropagation();
+ });
+ l.append("svg:path").attr("class","link_outline link_path");
+ l.append("svg:path").attr("class","link_line link_path");
+ });
+
+ link.exit().remove();
+
+ var links = vis.selectAll(".link_path")
+ links.attr("d",function(d){
+ var numOutputs = d.source.outputs || 1;
+ var sourcePort = d.sourcePort || 0;
+ var y = -((numOutputs-1)/2)*13 +13*sourcePort;
+
+ var dy = d.target.y-(d.source.y+y);
+ var dx = (d.target.x-d.target.w/2)-(d.source.x+d.source.w/2);
+ var delta = Math.sqrt(dy*dy+dx*dx);
+ var scale = lineCurveScale;
+ var scaleY = 0;
+ if (delta < node_width) {
+ scale = 0.75-0.75*((node_width-delta)/node_width);
+ }
+
+ if (dx < 0) {
+ scale += 2*(Math.min(5*node_width,Math.abs(dx))/(5*node_width));
+ if (Math.abs(dy) < 3*node_height) {
+ scaleY = ((dy>0)?0.5:-0.5)*(((3*node_height)-Math.abs(dy))/(3*node_height))*(Math.min(node_width,Math.abs(dx))/(node_width)) ;
+ }
+ }
+
+ d.x1 = d.source.x+d.source.w/2;
+ d.y1 = d.source.y+y;
+ d.x2 = d.target.x-d.target.w/2;
+ d.y2 = d.target.y;
+
+ return "M "+(d.source.x+d.source.w/2)+" "+(d.source.y+y)+
+ " C "+(d.source.x+d.source.w/2+scale*node_width)+" "+(d.source.y+y+scaleY*node_height)+" "+
+ (d.target.x-d.target.w/2-scale*node_width)+" "+(d.target.y-scaleY*node_height)+" "+
+ (d.target.x-d.target.w/2)+" "+d.target.y;
+ })
+
+ link.classed("link_selected", function(d) { return d === selected_link || d.selected; });
+ link.classed("link_unknown",function(d) { return d.target.type == "unknown" || d.source.type == "unknown"});
+
+ if (d3.event) {
+ d3.event.preventDefault();
+ }
+ }
+
+ RED.keyboard.add(/* z */ 90,{ctrl:true},function(){RED.history.pop();});
+ RED.keyboard.add(/* a */ 65,{ctrl:true},function(){selectAll();d3.event.preventDefault();});
+ RED.keyboard.add(/* = */ 187,{ctrl:true},function(){zoomIn();d3.event.preventDefault();});
+ RED.keyboard.add(/* - */ 189,{ctrl:true},function(){zoomOut();d3.event.preventDefault();});
+ RED.keyboard.add(/* 0 */ 48,{ctrl:true},function(){zoomZero();d3.event.preventDefault();});
+ RED.keyboard.add(/* v */ 86,{ctrl:true},function(){importNodes(clipboard);d3.event.preventDefault();});
+ RED.keyboard.add(/* e */ 69,{ctrl:true},function(){showExportNodesDialog();d3.event.preventDefault();});
+ RED.keyboard.add(/* i */ 73,{ctrl:true},function(){showImportNodesDialog();d3.event.preventDefault();});
+
+ // TODO: 'dirty' should be a property of RED.nodes - with an event callback for ui hooks
+ function setDirty(d) {
+ dirty = d;
+ if (dirty) {
+ $("#btn-deploy").removeClass("disabled");
+ } else {
+ $("#btn-deploy").addClass("disabled");
+ }
+ }
+
+ /**
+ * Imports a new collection of nodes from a JSON String.
+ * - all get new IDs assigned
+ * - all 'selected'
+ * - attached to mouse for placing - 'IMPORT_DRAGGING'
+ */
+ function importNodes(newNodesStr,touchImport) {
+ try {
+ var result = RED.nodes.import(newNodesStr,true);
+ if (result) {
+ var new_nodes = result[0];
+ var new_links = result[1];
+ var new_workspaces = result[2];
+
+ var new_ms = new_nodes.filter(function(n) { return n.z == activeWorkspace }).map(function(n) { return {n:n};});
+ var new_node_ids = new_nodes.map(function(n){ return n.id; });
+
+ // TODO: pick a more sensible root node
+ if (new_ms.length > 0) {
+ var root_node = new_ms[0].n;
+ var dx = root_node.x;
+ var dy = root_node.y;
+
+ if (mouse_position == null) {
+ mouse_position = [0,0];
+ }
+
+ var minX = 0;
+ var minY = 0;
+ var i;
+ var node;
+
+ for (i=0;i<new_ms.length;i++) {
+ node = new_ms[i];
+ node.n.selected = true;
+ node.n.changed = true;
+ node.n.x -= dx - mouse_position[0];
+ node.n.y -= dy - mouse_position[1];
+ node.dx = node.n.x - mouse_position[0];
+ node.dy = node.n.y - mouse_position[1];
+ minX = Math.min(node.n.x-node_width/2-5,minX);
+ minY = Math.min(node.n.y-node_height/2-5,minY);
+ }
+ for (i=0;i<new_ms.length;i++) {
+ node = new_ms[i];
+ node.n.x -= minX;
+ node.n.y -= minY;
+ node.dx -= minX;
+ node.dy -= minY;
+ }
+ if (!touchImport) {
+ mouse_mode = RED.state.IMPORT_DRAGGING;
+ }
+
+ RED.keyboard.add(/* ESCAPE */ 27,function(){
+ RED.keyboard.remove(/* ESCAPE */ 27);
+ clearSelection();
+ RED.history.pop();
+ mouse_mode = 0;
+ });
+ clearSelection();
+ moving_set = new_ms;
+ }
+
+ RED.history.push({t:'add',nodes:new_node_ids,links:new_links,workspaces:new_workspaces,dirty:RED.view.dirty()});
+
+
+ redraw();
+ }
+ } catch(error) {
+ console.log(error.stack);
+ RED.notify("<strong>Error</strong>: "+error,"error");
+ }
+ }
+
+ function showExportNodesDialog() {
+ mouse_mode = RED.state.EXPORT;
+ var nns = RED.nodes.createExportableNodeSet(moving_set);
+ $("#dialog-form").html($("script[data-template-name='export-clipboard-dialog']").html());
+ $("#node-input-export").val(JSON.stringify(nns));
+ $("#node-input-export").focus(function() {
+ var textarea = $(this);
+ textarea.select();
+ textarea.mouseup(function() {
+ textarea.unbind("mouseup");
+ return false;
+ });
+ });
+ $( "#dialog" ).dialog("option","title","Export nodes to clipboard").dialog( "open" );
+ $("#node-input-export").focus();
+ }
+
+ function showExportNodesLibraryDialog() {
+ mouse_mode = RED.state.EXPORT;
+ var nns = RED.nodes.createExportableNodeSet(moving_set);
+ $("#dialog-form").html($("script[data-template-name='export-library-dialog']").html());
+ $("#node-input-filename").attr('nodes',JSON.stringify(nns));
+ $( "#dialog" ).dialog("option","title","Export nodes to library").dialog( "open" );
+ }
+
+ function showImportNodesDialog() {
+ mouse_mode = RED.state.IMPORT;
+ $("#dialog-form").html($("script[data-template-name='import-dialog']").html());
+ $("#node-input-import").val("");
+ $( "#dialog" ).dialog("option","title","Import nodes").dialog( "open" );
+ }
+
+ function showRenameWorkspaceDialog(id) {
+ var ws = RED.nodes.workspace(id);
+ $( "#node-dialog-rename-workspace" ).dialog("option","workspace",ws);
+
+ if (workspace_tabs.count() == 1) {
+ $( "#node-dialog-rename-workspace").next().find(".leftButton")
+ .prop('disabled',true)
+ .addClass("ui-state-disabled");
+ } else {
+ $( "#node-dialog-rename-workspace").next().find(".leftButton")
+ .prop('disabled',false)
+ .removeClass("ui-state-disabled");
+ }
+
+ $( "#node-input-workspace-name" ).val(ws.label);
+ $( "#node-dialog-rename-workspace" ).dialog("open");
+ }
+
+ $("#node-dialog-rename-workspace form" ).submit(function(e) { e.preventDefault();});
+ $( "#node-dialog-rename-workspace" ).dialog({
+ modal: true,
+ autoOpen: false,
+ width: 500,
+ title: "Rename sheet",
+ buttons: [
+ {
+ class: 'leftButton',
+ text: "Delete",
+ click: function() {
+ var workspace = $(this).dialog('option','workspace');
+ $( this ).dialog( "close" );
+ deleteWorkspace(workspace.id);
+ }
+ },
+ {
+ text: "Ok",
+ click: function() {
+ var workspace = $(this).dialog('option','workspace');
+ var label = $( "#node-input-workspace-name" ).val();
+ if (workspace.label != label) {
+ workspace.label = label;
+ var link = $("#workspace-tabs a[href='#"+workspace.id+"']");
+ link.attr("title",label);
+ link.text(label);
+ RED.view.dirty(true);
+ }
+ $( this ).dialog( "close" );
+ }
+ },
+ {
+ text: "Cancel",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ],
+ open: function(e) {
+ RED.keyboard.disable();
+ },
+ close: function(e) {
+ RED.keyboard.enable();
+ }
+ });
+ $( "#node-dialog-delete-workspace" ).dialog({
+ modal: true,
+ autoOpen: false,
+ width: 500,
+ title: "Confirm delete",
+ buttons: [
+ {
+ text: "Ok",
+ click: function() {
+ var workspace = $(this).dialog('option','workspace');
+ RED.view.removeWorkspace(workspace);
+ var historyEvent = RED.nodes.removeWorkspace(workspace.id);
+ historyEvent.t = 'delete';
+ historyEvent.dirty = dirty;
+ historyEvent.workspaces = [workspace];
+ RED.history.push(historyEvent);
+ RED.view.dirty(true);
+ $( this ).dialog( "close" );
+ }
+ },
+ {
+ text: "Cancel",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ],
+ open: function(e) {
+ RED.keyboard.disable();
+ },
+ close: function(e) {
+ RED.keyboard.enable();
+ }
+
+ });
+
+ return {
+ state:function(state) {
+ if (state == null) {
+ return mouse_mode
+ } else {
+ mouse_mode = state;
+ }
+ },
+ addWorkspace: function(ws) {
+ workspace_tabs.addTab(ws);
+ workspace_tabs.resize();
+ },
+ removeWorkspace: function(ws) {
+ workspace_tabs.removeTab(ws.id);
+ },
+ getWorkspace: function() {
+ return activeWorkspace;
+ },
+ showWorkspace: function(id) {
+ workspace_tabs.activateTab(id);
+ },
+ redraw:redraw,
+ dirty: function(d) {
+ if (d == null) {
+ return dirty;
+ } else {
+ setDirty(d);
+ }
+ },
+ importNodes: importNodes,
+ resize: function() {
+ workspace_tabs.resize();
+ },
+ status: function(s) {
+ showStatus = s;
+ RED.nodes.eachNode(function(n) { n.dirty = true;});
+ //TODO: subscribe/unsubscribe here
+ redraw();
+ },
+
+ //TODO: should these move to an import/export module?
+ showImportNodesDialog: showImportNodesDialog,
+ showExportNodesDialog: showExportNodesDialog,
+ showExportNodesLibraryDialog: showExportNodesLibraryDialog
+ };
+})();
diff --git a/dgbuilder/public/red/validators.js b/dgbuilder/public/red/validators.js
new file mode 100644
index 0000000..5e74097
--- /dev/null
+++ b/dgbuilder/public/red/validators.js
@@ -0,0 +1,19 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+RED.validators = {
+ number: function(){return function(v) { return v!=='' && !isNaN(v);}},
+ regex: function(re){return function(v) { return re.test(v);}}
+};
diff --git a/dgbuilder/public/spin.svg b/dgbuilder/public/spin.svg
new file mode 100644
index 0000000..e609530
--- /dev/null
+++ b/dgbuilder/public/spin.svg
@@ -0,0 +1,41 @@
+<!--
+The MIT License (MIT)
+
+Copyright (c) 2014 Brent Jackson
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+https://github.com/jxnblk/loading
+-->
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="#999">
+ <path transform="translate(2)" d="M0 12 V20 H4 V12z">
+ <animate attributeName="d" values="M0 12 V20 H4 V12z; M0 4 V28 H4 V4z; M0 12 V20 H4 V12z; M0 12 V20 H4 V12z" dur="1.2s" repeatCount="indefinite" begin="0" keytimes="0;.2;.5;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.8 0.4 0.8" calcMode="spline" />
+ </path>
+ <path transform="translate(8)" d="M0 12 V20 H4 V12z">
+ <animate attributeName="d" values="M0 12 V20 H4 V12z; M0 4 V28 H4 V4z; M0 12 V20 H4 V12z; M0 12 V20 H4 V12z" dur="1.2s" repeatCount="indefinite" begin="0.2" keytimes="0;.2;.5;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.8 0.4 0.8" calcMode="spline" />
+ </path>
+ <path transform="translate(14)" d="M0 12 V20 H4 V12z">
+ <animate attributeName="d" values="M0 12 V20 H4 V12z; M0 4 V28 H4 V4z; M0 12 V20 H4 V12z; M0 12 V20 H4 V12z" dur="1.2s" repeatCount="indefinite" begin="0.4" keytimes="0;.2;.5;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.8 0.4 0.8" calcMode="spline" />
+ </path>
+ <path transform="translate(20)" d="M0 12 V20 H4 V12z">
+ <animate attributeName="d" values="M0 12 V20 H4 V12z; M0 4 V28 H4 V4z; M0 12 V20 H4 V12z; M0 12 V20 H4 V12z" dur="1.2s" repeatCount="indefinite" begin="0.6" keytimes="0;.2;.5;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.8 0.4 0.8" calcMode="spline" />
+ </path>
+ <path transform="translate(26)" d="M0 12 V20 H4 V12z">
+ <animate attributeName="d" values="M0 12 V20 H4 V12z; M0 4 V28 H4 V4z; M0 12 V20 H4 V12z; M0 12 V20 H4 V12z" dur="1.2s" repeatCount="indefinite" begin="0.8" keytimes="0;.2;.5;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.8 0.4 0.8" calcMode="spline" />
+ </path>
+</svg>
diff --git a/dgbuilder/public/style.css b/dgbuilder/public/style.css
new file mode 100644
index 0000000..3a1917b
--- /dev/null
+++ b/dgbuilder/public/style.css
@@ -0,0 +1,980 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+body {
+ font: 13px "Helvetica" !important;
+ padding-top: 100px;
+ background: url("pw_maze_white.png");
+}
+
+#header {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 40px;
+ background: #000;
+ box-sizing: border-box;
+ padding: 5px 0px 5px 20px;
+}
+
+#dropTarget {
+ position: absolute;
+ top: 0; bottom: 0;
+ left: 0; right: 0;
+ background: rgba(100,100,100,0.5);
+ display:table;
+ width: 100%;
+ height: 100%;
+ display: none;
+}
+#dropTarget div {
+ display: table-cell;
+ vertical-align: middle;
+ text-align: center;
+ font-size: 40px;
+ color: #fff;
+}
+#dropTarget div i {
+ font-size: 80px;
+}
+div.btn-group, a.btn {
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+span.logo {
+ pointer-events: none;
+ float: left;
+ font-size: 30px;
+ line-height: 30px;
+ text-decoration: none;
+ color: #ccc;
+}
+span.logo span {
+ vertical-align: middle;
+ font-size: 16px !important;
+}
+span.logo img {
+ height: 18px;
+}
+#header .button {
+ line-height: 22px;
+ display: inline-block;
+ font-size: 14px;
+ padding: 4px 12px;
+ text-decoration: none;
+ border-radius: 3px;
+ color: #ccc;
+ margin: auto 10px;
+ vertical-align: middle;
+}
+#header .button:not(.disabled):hover {
+ box-shadow: 0 0 2px #fff;
+}
+#btn-deploy:not(.disabled):hover {
+ background: #ca3f39;
+}
+
+#btn-deploy {
+ color: #fff !important;
+ background: #d24741;
+ box-shadow: 0 0 2px #fff;
+}
+#btn-deploy:not(.disabled):active {
+ background: #aa1f19 !important;
+ color: #ccc !important;
+ box-shadow: 0 0 2px #999;
+}
+#btn-deploy.disabled {
+ cursor: default;
+ background: #444 ;
+ color: #999 !important;
+}
+
+#btn-sidemenu {
+ font-size: 20px !important;
+}
+#btn-sidemenu:active, #btn-sidemenu.active {
+ background: #333 ;
+}
+#header .button:focus {
+ outline: none;
+}
+
+
+
+#workspace {
+ margin-left: 160px;
+ overflow: hidden;
+}
+
+#chart {
+ overflow: auto;
+ background: #e3e3e3;
+ position: absolute;
+ bottom:0px;
+ top: 30px;
+ left:0px;
+ right:0px;
+}
+
+#workspace-toolbar {
+ display: none;
+ position: absolute;
+ top: 30px;
+ left:0;
+ right: 18px;
+ padding: 5px;
+ background: #f3f3f3;
+}
+
+#chart-zoom-controls {
+ padding-top: 3px;
+ text-align: right;
+ float: right;
+}
+
+#palette {
+ background: #f3f3f3;
+ width: 140px;
+ text-align: center;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+.palette-scroll {
+ display: none;
+ position: absolute;
+ top: 0;
+ left:0;
+ right: 0;
+ bottom: 35px;
+ padding: 5px;
+ overflow-y: auto;
+ box-sizing:border-box;
+ -moz-box-sizing: border-box;
+}
+.palette-spinner {
+ padding-top: 40px;
+}
+#palette-search {
+ position: absolute;
+ display: none;
+ bottom: 0;
+ left:0;
+ right:0;
+ overflow: hidden;
+ background: #f3f3f3;
+ text-align: center;
+ height: 35px;
+ padding: 3px;
+ border-top: 1px solid #999;
+ box-sizing:border-box;
+ -moz-box-sizing: border-box;
+}
+#palette-search i.fa-search {
+ position: absolute;
+ pointer-events: none;
+ left: 4px;
+ top: 10px;
+}
+#palette-search i.fa-times {
+ position: absolute;
+ right: 6px;
+ top: 10px;
+}
+
+#palette-search-clear {
+ display: none;
+ color: #000;
+}
+
+#palette-search input {
+ border-radius: 0;
+ border: none;
+ width: 100%;
+ box-shadow: none;
+ -webkit-box-shadow: none;
+ padding: 3px 17px;
+ margin: 0px;
+ height: 30px;
+ box-sizing:border-box;
+ -moz-box-sizing: border-box;
+
+}
+#palette-search input:focus {
+ border: none;
+ box-shadow: none;
+ -webkit-box-shadow: none;
+}
+
+.palette-category {
+ border: 1px solid #999;
+ border-radius: 3px;
+ margin-bottom: 5px;
+}
+.palette-content {
+ background: #fff;
+ border-top: 1px solid #aaa;
+ padding-bottom: 3px;
+}
+
+.palette-header {
+ background: #f3f3f3;
+ border-radius: 3px;
+ cursor: pointer;
+ text-align: left;
+ padding: 1px;
+}
+.palette-header i {
+ margin: 3px 4px 3px 3px;
+ -webkit-transition: all 0.2s ease-in-out;
+ -moz-transition: all 0.2s ease-in-out;
+ -o-transition: all 0.2s ease-in-out;
+ -webkit-transform: rotate(-90deg);
+ -moz-transform: rotate(-90deg);
+ -o-transform: rotate(-90deg);
+}
+.palette-header i.expanded {
+ -webkit-transform: rotate(0deg);
+ -moz-transform: rotate(0deg);
+ -o-transform: rotate(0deg);
+}
+.palette-header span {
+ clear: both;
+}
+.palette_label {
+ line-height: 25px;
+ text-align: center;
+
+}
+.palette_node {
+ cursor:move;
+ font-size:13px;
+ background: #ddd;
+ margin: 10px auto;
+ height: 25px;
+ border-radius: 6px;
+ border: 2px solid #999;
+ background-position: 5% 50%;
+ background-repeat: no-repeat;
+ width: 90px;
+ background-size: contain;
+ position: relative;
+}
+.palette_node:hover {
+ border-color: #ff7f0e;
+ background-color: #eee;
+}
+.palette_port {
+ position: absolute;
+ top:8px;
+ left: -5px;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ background:#d9d9d9;
+ border-radius: 3px;
+ width: 10px;
+ height: 10px;
+ border: 1px solid #999;
+}
+.palette_port_output {
+ left:85px;
+}
+
+.palette_node:hover .palette_port {
+ border-color: #999;
+ background-color: #eee;
+}
+
+#sidebar {
+ background: #fff;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+}
+#sidebar.closing {
+ background: #eee;
+ border-color: #900;
+ border-style: dashed;
+}
+
+/* ---------- Layout ---------- */
+#main-container {
+ position: absolute;
+ top:50px; left:0; bottom: 0; right:0;
+ overflow:hidden;
+}
+#palette {
+ position: absolute;
+ top: 5px; left:10px; bottom: 10px;
+}
+#workspace {
+ position: absolute;
+ margin: 0;
+ top:5px; left:160px; bottom: 10px; right: 330px;
+}
+#chart-zoom-controls {
+ position: absolute;
+ bottom:30px; right: 350px;
+}
+#sidebar {
+ width: 305px;
+ position: absolute;
+ right: 10px; top: 5px; bottom:10px;
+}
+#sidebar-separator {
+ width: 15px;
+ background: url(grip.png) no-repeat 50% 50%;
+ position: absolute;
+ right: 316px; top: 5px; bottom:10px;
+ cursor: col-resize;
+}
+
+.sidebar-closed > #sidebar { display: none; }
+.sidebar-closed > #sidebar-separator { right: 0px !important; }
+.sidebar-closed > #workspace { right: 15px !important; }
+.sidebar-closed > #chart-zoom-controls { right: 35px !important; }
+
+.palette-bar-closed > #palette { display: none; }
+.palette-bar-closed > #workspace { margin-left: -140px !important; }
+/* ---------- end layout ---------- */
+
+.lasso {
+ stroke-width: 2px;
+ stroke: #ff7f0e;
+ fill: rgba(20,125,255,0.1);
+ stroke-dasharray: 10 5;
+}
+
+.group-box {
+ stroke-width: 1px;
+ stroke: #aaaaaa;
+ fill: rgba(208, 211, 238, 0.1);
+ stroke-dasharray: 3 3;
+}
+.group-box-active {
+ fill: #fff;
+ stroke: #ff7f0e;
+}
+
+.group_label {
+ stroke-width: 0;
+ fill: #999;
+ font-size: 11px;
+ pointer-events: none;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.pull-right {
+ margin-left: 20px;
+}
+
+#workspace, #palette, #sidebar {
+ border: 1px solid #000;
+ border-radius: 3px;
+}
+#sidebar-content {
+ font-size: 1.2em;
+ overflow-y: auto;
+ position: absolute;
+ top: 30px; left: 0px; right: 0; bottom: 1px;
+}
+
+.node_label_italic {
+ font-style: italic;
+}
+.node_label_unknown {
+ font-style: italic;
+ fill: #e00 !important;
+}
+.node_label_white {
+ fill: #eee !important;
+}
+.node_label {
+ stroke-width: 0;
+ fill: #333;
+ font-size: 14px;
+ pointer-events: none;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.function_label {
+ font-size: 12px;
+}
+.node {
+ stroke: #999;
+ cursor: move;
+ stroke-width: 2;
+}
+.node_unknown {
+ stroke-dasharray:10,4;
+ stroke: #f33;
+}
+.tool_arrow {
+ stroke-width: 1;
+ stroke: #999;
+ fill: #999;
+ cursor: pointer;
+}
+.node_tools {
+ fill: #ddd;
+ stroke: #999;
+ cursor: move;
+ stroke-width: 1;
+ cursor: pointer;
+}
+.node_tools_hovered {
+ stroke: #ff7f0e;
+ fill: #eee;
+}
+
+.node_button {
+ fill: inherit;
+
+}
+.port {
+ fill: #ddd;
+ cursor: crosshair;
+}
+.node_error {
+ stroke: #ff0000;
+ stroke-width: 2;
+ fill: #ff7f0e;
+}
+
+.node_badge {
+ stroke: rgb(93, 114, 145);
+ stroke-width: 1;
+ fill: rgb(190, 209, 255);
+}
+.node_badge_label {
+ stroke-width:0;
+ fill: #fff;
+ font-size: 11px;
+ pointer-events: none;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+
+}
+.node_invalid {
+ stroke: #ff0000;
+}
+.node_selected {
+ stroke: #ff7f0e;
+}
+.node_found {
+ stroke:blue;
+ /*
+ stroke-width :3;
+ stroke-dasharray:5,1;
+*/
+}
+.text_found {
+ stroke:green;
+ stroke-width :3;
+ stroke-dasharray:5,1;
+}
+.node_highlighted {
+ stroke: #dd1616;
+ stroke-width: 3;
+ stroke-dasharray: 10, 4;
+}
+.node_hovered {
+}
+
+.port_hovered {
+ stroke: #ff7f0e;
+ fill: #ff7f0e;
+}
+
+.drag_line {
+ stroke: #ff7f0e;
+ stroke-width: 5;
+ fill: none;
+ pointer-events: none;
+}
+
+.drag_line_hidden {
+ stroke: #ff7f0e;
+ stroke-width: 0;
+ pointer-events: none;
+ fill: none;
+}
+
+.link_line {
+ stroke: #7f7f7f;
+ stroke-width: 4;
+ fill: none;
+ pointer-events: none;
+}
+
+.link_outline {
+ stroke: #fff;
+ stroke-width: 6;
+ cursor: crosshair;
+ fill: none;
+ pointer-events: none;
+}
+.link_background {
+ stroke: #fff;
+ opacity: 0;
+ stroke-width: 25;
+ cursor: crosshair;
+ fill: none;
+}
+
+g.link_selected path.link_line {
+ stroke: #ff7f0e;
+}
+g.link_unknown path.link_line {
+ stroke: #f00;
+ stroke-width: 2;
+ stroke-dasharray: 10, 4;
+}
+
+#shade {
+ position: absolute;
+ top:0;
+ left:0;
+ width: 100%;
+ height: 100%;
+ background: rgba(0,0,0,0.5);
+ text-align: center;
+ display: none;
+}
+
+#dialog {
+}
+
+.container {
+}
+
+.notification {
+ position: absolute;
+}
+#notifications {
+ z-index: 10000;
+ width: 500px;
+ margin-left: -250px;
+ left: 50%;
+ position: absolute;
+ top: 1px;
+}
+#notifications .alert {
+ box-shadow: 0 0 1px 1px;
+ margin-bottom: 5px;
+}
+
+.form-row {
+ clear: both;
+ margin-bottom: 7px;
+}
+.form-row label {
+ display: inline-block;
+ width: 100px;
+}
+.form-row input {
+ width:70%;
+}
+
+input.input-append-left {
+ border-top-right-radius: 0px;
+ border-bottom-right-radius: 0px;
+}
+button.input-append-right {
+ border-top-left-radius: 0px !important;
+ border-bottom-left-radius: 0px !important;
+ border-top-right-radius: 4px !important;
+ border-bottom-right-radius: 4px !important;
+ margin-left: -1px !important;
+ padding-left: 4px !important;
+ padding-right: 4px !important;
+}
+
+.form-tips {
+ background: lightgoldenrodyellow;
+ font-size: 12px;
+ padding: 8px;
+ border-radius: 5px;
+ border: 1px solid #999;
+}
+.form-tips code {
+ border: none;
+ padding: auto;
+}
+
+.ui-tabs .ui-tabs-panel {
+ padding: 0px;
+}
+
+table.node-info {
+ margin: 5px;
+ width: 97%;
+}
+table.node-info tr {
+ border: 1px solid #ddd;
+}
+table.node-info tr.blank {
+ border: none;
+}
+table.node-info tr.blank td {
+ padding-top: 8px;
+ border: none;
+ font-weight: bold;
+ padding-left: 0px;
+}
+table.node-info td:first-child{
+ color: #000;
+ vertical-align: top;
+ width: 90px;
+ padding: 3px;
+ border-right: 1px solid #ddd;
+}
+table.node-info td:last-child{
+ padding-left: 5px;
+ color: #666;
+}
+
+div.node-info {
+ margin: 5px;
+}
+
+.input-error {
+ border-color: rgb(214, 97, 95) !important;
+}
+
+.hidden {
+ display: none;
+}
+/*
+.dropdown-menu {
+ font-size: 14px;
+ background: #000;
+}
+.dropdown-menu .divider {
+ background: #666;
+ border-bottom: #666;
+}
+.dropdown-menu>li>a {
+ color: #ddd;
+}
+.dropdown-submenu>ul {
+ border: 1px solid white;
+ border-radius: 6px !important;
+}
+.dropdown-menu li.disabled a {
+ color: #666;
+}
+.dropdown-menu li.disabled a:hover {
+ background: none;
+}
+*/
+.dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus, .dropdown-submenu:hover>a, .dropdown-submenu:focus>a {
+ background: #999;
+}
+
+.dropdown-menu * .fa-check {
+ display: none;
+ margin-right: -15px;
+ margin-top: 3px;
+}
+.dropdown-menu * a.active > .fa-check {
+ display: inline-block;
+}
+.dropdown-menu>li.disabled>a:hover>[class^="icon-"] {
+ background-image: url("bootstrap/img/glyphicons-halflings.png") !important;
+}
+/** Fix for unreachable dropdown menu **/
+.dropdown-menu {
+ width: 200px !important;
+}
+.dropdown-menu > li > a > i {
+ width: 10px;
+ text-align: center;
+ margin-left: -8px;
+}
+.dropdown-menu > li > a {
+ padding-left: 38px ;
+ text-indent: -8px ;
+ white-space: normal !important;
+}
+
+.popover-title { display: none; }
+
+.ui-autocomplete {
+ max-height: 250px;
+ overflow-x: hidden;
+ overflow-y: scroll;
+}
+
+.leftButton {
+ margin-right: 200px !important;
+}
+#node-help {
+ width: 700px;
+}
+#node-help * td {
+ padding: 0.8em 0.5em;
+}
+#node-help * tr > td:first-child+td+td {
+ padding-left: 5em;
+}
+
+.help-key {
+ border: 1px solid #ddd;
+ padding: 4px;
+ border-radius: 3px;
+ background: #f6f6f6;
+ font-family: Courier, monospace;
+ box-shadow: #999 1px 1px 1px;
+}
+
+#helpcontent {
+ padding: 20px;
+ border: 1px solid #ddd;
+ border-radius: 10px;
+
+ background: #fff;
+}
+#helpnavigation {
+ overflow: hidden;
+ border: 1px solid #ddd;
+ border-radius: 10px;
+ background: #fff;
+}
+#helpnavigation li a{
+ font-size: 1.2em;
+ padding: 10px;
+ border-bottom: 1px solid #ddd;
+}
+
+#node-select-library {
+ overflow: hidden;
+}
+#node-select-library ul {
+ list-style: none;
+ padding: 0px;
+ margin: 2px;
+}
+#node-select-library li {
+ cursor: pointer;
+}
+#node-select-library li.list-selected {
+ background: #eee;
+}
+#node-select-library li.list-hover {
+ background: #ffffd0;
+}
+.node-text-editor {
+ border:1px solid #ccc;
+ border-radius:5px;
+ overflow: hidden;
+}
+#workspace-tabs {
+ margin-right: 28px;
+}
+#workspace-add-tab {
+ position: absolute;
+ top: 0;
+ right: 0;
+ height: 29px;
+ width: 28px;
+ border-bottom: 1px solid #999;
+}
+#btn-workspace-add-tab {
+ display: inline-block;
+ width: 100%;
+ background: #e3e3e3;
+ height: 100%;
+ line-height: 30px;
+ text-align: center;
+ color: #000;
+}
+#btn-workspace-add-tab:hover {
+ background: #efefef;
+}
+
+ul.red-ui-tabs {
+ list-style-type: none;
+ padding:5px 2px 0px 5px;
+ margin: 0;
+ display: block;
+ height: 24px;
+ border-bottom: 1px solid #999;
+ background: #e3e3e3;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+ul.red-ui-tabs li {
+ border-top-left-radius: 5px;
+ border-top-right-radius: 5px;
+ display: inline-block;
+ border-left: 1px solid #999;
+ border-top: 1px solid #999;
+ border-right: 1px solid #999;
+ border-bottom: 1px solid #999;
+ background: #e3e3e3;
+ margin: 0 5px 0 0;
+ height: 23px;
+ line-height: 17px;
+ max-width: 150px;
+ width: 14%;
+ overflow: hidden;
+ white-space: nowrap;
+}
+
+ul.red-ui-tabs li a.red-ui-tab-label {
+ display: block;
+ padding: 3px 16px;
+ color: #666;
+}
+ul.red-ui-tabs li {
+ position: relative;
+}
+
+ul.red-ui-tabs li a.red-ui-tab-close {
+ background: rgba(227,227,227,0.8);
+ position: absolute;
+ right: 2px;
+ top: 2px;
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ text-align: center;
+ padding: 0px;
+ border-radius: 5px;
+ color: #666;
+}
+ul.red-ui-tabs li a.red-ui-tab-close:hover {
+ background: #bbb !important;
+}
+ul.red-ui-tabs li a:hover {
+ text-decoration: none;
+ background: #f0f0f0;
+}
+
+ul.red-ui-tabs li.active {
+ background: #fff;
+ border-bottom: 1px solid #fff;
+}
+ul.red-ui-tabs li.active a {
+ color: #333;
+}
+ul.red-ui-tabs li.active a.red-ui-tab-close {
+ background: rgba(255,255,255,0.8);
+}
+ul.red-ui-tabs li.active a.red-ui-tab-label:hover {
+ background: #fff;
+}
+ul.red-ui-tabs li.red-ui-add-tab {
+ width: 25px;
+ border-top-right-radius: 15px;
+ line-height: 22px;
+}
+ul.red-ui-tabs li.red-ui-add-tab a {
+ padding: 2px 4px;
+}
+
+ul.tab-config-list {
+ list-style-type: none;
+ padding: 3px;
+ margin: 0;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+ul.tab-config-list li {
+ max-width: 400px;
+ font-size: 13px;
+ background: #f3f3f3;
+ margin: 10px auto;
+ border-radius: 3px;
+ border: 1px solid #ccc;
+ padding: 3px 8px;
+}
+div.tab-config-list-type {
+}
+
+div.tab-config-list-entry {
+ position: relative;
+ margin: 4px 0;
+ padding: 8px 4px 8px 10px;
+ background: #fff;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ cursor: pointer;
+}
+div.tab-config-list-entry:hover {
+ background: #f6f6f6;
+}
+
+div.tab-config-list-label {
+}
+div.tab-config-list-users {
+ position: absolute;
+ right: 3px;
+ top: 3px;
+ bottom: 3px;
+ line-height: 27px;
+ font-size: 11px;
+ background: #f6f6f6;
+ float: right;
+ border: 1px solid #eee;
+ border-radius: 3px;
+ padding: 1px 5px;
+}
+
+i.spinner {
+ display: inline-block;
+ width: 14px;
+ height: 14px;
+ line-height: 14px;
+ vertical-align: text-top;
+ margin-top: 0px;
+ background: url(spin.svg) no-repeat 50% 50%;
+ background-size: contain
+}
+
+
+
diff --git a/dgbuilder/public/style.css.orig b/dgbuilder/public/style.css.orig
new file mode 100644
index 0000000..8c37abf
--- /dev/null
+++ b/dgbuilder/public/style.css.orig
@@ -0,0 +1,966 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+body {
+ font: 13px "Helvetica" !important;
+ padding-top: 100px;
+ background: url("pw_maze_white.png");
+}
+
+#header {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 40px;
+ background: #000;
+ box-sizing: border-box;
+ padding: 5px 0px 5px 20px;
+}
+
+#dropTarget {
+ position: absolute;
+ top: 0; bottom: 0;
+ left: 0; right: 0;
+ background: rgba(100,100,100,0.5);
+ display:table;
+ width: 100%;
+ height: 100%;
+ display: none;
+}
+#dropTarget div {
+ display: table-cell;
+ vertical-align: middle;
+ text-align: center;
+ font-size: 40px;
+ color: #fff;
+}
+#dropTarget div i {
+ font-size: 80px;
+}
+div.btn-group, a.btn {
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+span.logo {
+ pointer-events: none;
+ float: left;
+ font-size: 30px;
+ line-height: 30px;
+ text-decoration: none;
+ color: #ccc;
+}
+span.logo span {
+ vertical-align: middle;
+ font-size: 16px !important;
+}
+span.logo img {
+ height: 18px;
+}
+#header .button {
+ line-height: 22px;
+ display: inline-block;
+ font-size: 14px;
+ padding: 4px 12px;
+ text-decoration: none;
+ border-radius: 3px;
+ color: #ccc;
+ margin: auto 10px;
+ vertical-align: middle;
+}
+#header .button:not(.disabled):hover {
+ box-shadow: 0 0 2px #fff;
+}
+#btn-deploy:not(.disabled):hover {
+ background: #ca3f39;
+}
+
+#btn-deploy {
+ color: #fff !important;
+ background: #d24741;
+ box-shadow: 0 0 2px #fff;
+}
+#btn-deploy:not(.disabled):active {
+ background: #aa1f19 !important;
+ color: #ccc !important;
+ box-shadow: 0 0 2px #999;
+}
+#btn-deploy.disabled {
+ cursor: default;
+ background: #444 ;
+ color: #999 !important;
+}
+
+#btn-sidemenu {
+ font-size: 20px !important;
+}
+#btn-sidemenu:active, #btn-sidemenu.active {
+ background: #333 ;
+}
+#header .button:focus {
+ outline: none;
+}
+
+
+
+#workspace {
+ margin-left: 160px;
+ overflow: hidden;
+}
+
+#chart {
+ overflow: auto;
+ background: #e3e3e3;
+ position: absolute;
+ bottom:0px;
+ top: 30px;
+ left:0px;
+ right:0px;
+}
+
+#workspace-toolbar {
+ display: none;
+ position: absolute;
+ top: 30px;
+ left:0;
+ right: 18px;
+ padding: 5px;
+ background: #f3f3f3;
+}
+
+#chart-zoom-controls {
+ padding-top: 3px;
+ text-align: right;
+ float: right;
+}
+
+#palette {
+ background: #f3f3f3;
+ width: 140px;
+ text-align: center;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+.palette-scroll {
+ display: none;
+ position: absolute;
+ top: 0;
+ left:0;
+ right: 0;
+ bottom: 35px;
+ padding: 5px;
+ overflow-y: auto;
+ box-sizing:border-box;
+ -moz-box-sizing: border-box;
+}
+.palette-spinner {
+ padding-top: 40px;
+}
+#palette-search {
+ position: absolute;
+ display: none;
+ bottom: 0;
+ left:0;
+ right:0;
+ overflow: hidden;
+ background: #f3f3f3;
+ text-align: center;
+ height: 35px;
+ padding: 3px;
+ border-top: 1px solid #999;
+ box-sizing:border-box;
+ -moz-box-sizing: border-box;
+}
+#palette-search i.fa-search {
+ position: absolute;
+ pointer-events: none;
+ left: 4px;
+ top: 10px;
+}
+#palette-search i.fa-times {
+ position: absolute;
+ right: 6px;
+ top: 10px;
+}
+
+#palette-search-clear {
+ display: none;
+ color: #000;
+}
+
+#palette-search input {
+ border-radius: 0;
+ border: none;
+ width: 100%;
+ box-shadow: none;
+ -webkit-box-shadow: none;
+ padding: 3px 17px;
+ margin: 0px;
+ height: 30px;
+ box-sizing:border-box;
+ -moz-box-sizing: border-box;
+
+}
+#palette-search input:focus {
+ border: none;
+ box-shadow: none;
+ -webkit-box-shadow: none;
+}
+
+.palette-category {
+ border: 1px solid #999;
+ border-radius: 3px;
+ margin-bottom: 5px;
+}
+.palette-content {
+ background: #fff;
+ border-top: 1px solid #aaa;
+ padding-bottom: 3px;
+}
+
+.palette-header {
+ background: #f3f3f3;
+ border-radius: 3px;
+ cursor: pointer;
+ text-align: left;
+ padding: 1px;
+}
+.palette-header i {
+ margin: 3px 4px 3px 3px;
+ -webkit-transition: all 0.2s ease-in-out;
+ -moz-transition: all 0.2s ease-in-out;
+ -o-transition: all 0.2s ease-in-out;
+ -webkit-transform: rotate(-90deg);
+ -moz-transform: rotate(-90deg);
+ -o-transform: rotate(-90deg);
+}
+.palette-header i.expanded {
+ -webkit-transform: rotate(0deg);
+ -moz-transform: rotate(0deg);
+ -o-transform: rotate(0deg);
+}
+.palette-header span {
+ clear: both;
+}
+.palette_label {
+ line-height: 25px;
+ text-align: center;
+
+}
+.palette_node {
+ cursor:move;
+ font-size:13px;
+ background: #ddd;
+ margin: 10px auto;
+ height: 25px;
+ border-radius: 6px;
+ border: 2px solid #999;
+ background-position: 5% 50%;
+ background-repeat: no-repeat;
+ width: 90px;
+ background-size: contain;
+ position: relative;
+}
+.palette_node:hover {
+ border-color: #ff7f0e;
+ background-color: #eee;
+}
+.palette_port {
+ position: absolute;
+ top:8px;
+ left: -5px;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ background:#d9d9d9;
+ border-radius: 3px;
+ width: 10px;
+ height: 10px;
+ border: 1px solid #999;
+}
+.palette_port_output {
+ left:85px;
+}
+
+.palette_node:hover .palette_port {
+ border-color: #999;
+ background-color: #eee;
+}
+
+#sidebar {
+ background: #fff;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+}
+#sidebar.closing {
+ background: #eee;
+ border-color: #900;
+ border-style: dashed;
+}
+
+/* ---------- Layout ---------- */
+#main-container {
+ position: absolute;
+ top:50px; left:0; bottom: 0; right:0;
+ overflow:hidden;
+}
+#palette {
+ position: absolute;
+ top: 5px; left:10px; bottom: 10px;
+}
+#workspace {
+ position: absolute;
+ margin: 0;
+ top:5px; left:160px; bottom: 10px; right: 330px;
+}
+#chart-zoom-controls {
+ position: absolute;
+ bottom:30px; right: 350px;
+}
+#sidebar {
+ width: 305px;
+ position: absolute;
+ right: 10px; top: 5px; bottom:10px;
+}
+#sidebar-separator {
+ width: 15px;
+ background: url(grip.png) no-repeat 50% 50%;
+ position: absolute;
+ right: 316px; top: 5px; bottom:10px;
+ cursor: col-resize;
+}
+
+.sidebar-closed > #sidebar { display: none; }
+.sidebar-closed > #sidebar-separator { right: 0px !important; }
+.sidebar-closed > #workspace { right: 15px !important; }
+.sidebar-closed > #chart-zoom-controls { right: 35px !important; }
+
+/* ---------- end layout ---------- */
+
+.lasso {
+ stroke-width: 2px;
+ stroke: #ff7f0e;
+ fill: rgba(20,125,255,0.1);
+ stroke-dasharray: 10 5;
+}
+
+.group-box {
+ stroke-width: 1px;
+ stroke: #aaaaaa;
+ fill: rgba(208, 211, 238, 0.1);
+ stroke-dasharray: 3 3;
+}
+.group-box-active {
+ fill: #fff;
+ stroke: #ff7f0e;
+}
+
+.group_label {
+ stroke-width: 0;
+ fill: #999;
+ font-size: 11px;
+ pointer-events: none;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.pull-right {
+ margin-left: 20px;
+}
+
+#workspace, #palette, #sidebar {
+ border: 1px solid #000;
+ border-radius: 3px;
+}
+#sidebar-content {
+ font-size: 1.2em;
+ overflow-y: auto;
+ position: absolute;
+ top: 30px; left: 0px; right: 0; bottom: 1px;
+}
+
+.node_label_italic {
+ font-style: italic;
+}
+.node_label_unknown {
+ font-style: italic;
+ fill: #e00 !important;
+}
+.node_label_white {
+ fill: #eee !important;
+}
+.node_label {
+ stroke-width: 0;
+ fill: #333;
+ font-size: 14px;
+ pointer-events: none;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.function_label {
+ font-size: 12px;
+}
+.node {
+ stroke: #999;
+ cursor: move;
+ stroke-width: 2;
+}
+.node_unknown {
+ stroke-dasharray:10,4;
+ stroke: #f33;
+}
+.tool_arrow {
+ stroke-width: 1;
+ stroke: #999;
+ fill: #999;
+ cursor: pointer;
+}
+.node_tools {
+ fill: #ddd;
+ stroke: #999;
+ cursor: move;
+ stroke-width: 1;
+ cursor: pointer;
+}
+.node_tools_hovered {
+ stroke: #ff7f0e;
+ fill: #eee;
+}
+
+.node_button {
+ fill: inherit;
+
+}
+.port {
+ fill: #ddd;
+ cursor: crosshair;
+}
+.node_error {
+ stroke: #ff0000;
+ stroke-width: 2;
+ fill: #ff7f0e;
+}
+
+.node_badge {
+ stroke: rgb(93, 114, 145);
+ stroke-width: 1;
+ fill: rgb(190, 209, 255);
+}
+.node_badge_label {
+ stroke-width:0;
+ fill: #fff;
+ font-size: 11px;
+ pointer-events: none;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+
+}
+.node_invalid {
+ stroke: #ff0000;
+}
+.node_selected {
+ stroke: #ff7f0e;
+}
+.node_highlighted {
+ stroke: #dd1616;
+ stroke-width: 3;
+ stroke-dasharray: 10, 4;
+}
+.node_hovered {
+}
+
+.port_hovered {
+ stroke: #ff7f0e;
+ fill: #ff7f0e;
+}
+
+.drag_line {
+ stroke: #ff7f0e;
+ stroke-width: 5;
+ fill: none;
+ pointer-events: none;
+}
+
+.drag_line_hidden {
+ stroke: #ff7f0e;
+ stroke-width: 0;
+ pointer-events: none;
+ fill: none;
+}
+
+.link_line {
+ stroke: #7f7f7f;
+ stroke-width: 4;
+ fill: none;
+ pointer-events: none;
+}
+
+.link_outline {
+ stroke: #fff;
+ stroke-width: 6;
+ cursor: crosshair;
+ fill: none;
+ pointer-events: none;
+}
+.link_background {
+ stroke: #fff;
+ opacity: 0;
+ stroke-width: 25;
+ cursor: crosshair;
+ fill: none;
+}
+
+g.link_selected path.link_line {
+ stroke: #ff7f0e;
+}
+g.link_unknown path.link_line {
+ stroke: #f00;
+ stroke-width: 2;
+ stroke-dasharray: 10, 4;
+}
+
+#shade {
+ position: absolute;
+ top:0;
+ left:0;
+ width: 100%;
+ height: 100%;
+ background: rgba(0,0,0,0.5);
+ text-align: center;
+ display: none;
+}
+
+#dialog {
+}
+
+.container {
+}
+
+.notification {
+ position: absolute;
+}
+#notifications {
+ z-index: 10000;
+ width: 500px;
+ margin-left: -250px;
+ left: 50%;
+ position: absolute;
+ top: 1px;
+}
+#notifications .alert {
+ box-shadow: 0 0 1px 1px;
+ margin-bottom: 5px;
+}
+
+.form-row {
+ clear: both;
+ margin-bottom: 7px;
+}
+.form-row label {
+ display: inline-block;
+ width: 100px;
+}
+.form-row input {
+ width:70%;
+}
+
+input.input-append-left {
+ border-top-right-radius: 0px;
+ border-bottom-right-radius: 0px;
+}
+button.input-append-right {
+ border-top-left-radius: 0px !important;
+ border-bottom-left-radius: 0px !important;
+ border-top-right-radius: 4px !important;
+ border-bottom-right-radius: 4px !important;
+ margin-left: -1px !important;
+ padding-left: 4px !important;
+ padding-right: 4px !important;
+}
+
+.form-tips {
+ background: lightgoldenrodyellow;
+ font-size: 12px;
+ padding: 8px;
+ border-radius: 5px;
+ border: 1px solid #999;
+}
+.form-tips code {
+ border: none;
+ padding: auto;
+}
+
+.ui-tabs .ui-tabs-panel {
+ padding: 0px;
+}
+
+table.node-info {
+ margin: 5px;
+ width: 97%;
+}
+table.node-info tr {
+ border: 1px solid #ddd;
+}
+table.node-info tr.blank {
+ border: none;
+}
+table.node-info tr.blank td {
+ padding-top: 8px;
+ border: none;
+ font-weight: bold;
+ padding-left: 0px;
+}
+table.node-info td:first-child{
+ color: #000;
+ vertical-align: top;
+ width: 90px;
+ padding: 3px;
+ border-right: 1px solid #ddd;
+}
+table.node-info td:last-child{
+ padding-left: 5px;
+ color: #666;
+}
+
+div.node-info {
+ margin: 5px;
+}
+
+.input-error {
+ border-color: rgb(214, 97, 95) !important;
+}
+
+.hidden {
+ display: none;
+}
+/*
+.dropdown-menu {
+ font-size: 14px;
+ background: #000;
+}
+.dropdown-menu .divider {
+ background: #666;
+ border-bottom: #666;
+}
+.dropdown-menu>li>a {
+ color: #ddd;
+}
+.dropdown-submenu>ul {
+ border: 1px solid white;
+ border-radius: 6px !important;
+}
+.dropdown-menu li.disabled a {
+ color: #666;
+}
+.dropdown-menu li.disabled a:hover {
+ background: none;
+}
+*/
+.dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus, .dropdown-submenu:hover>a, .dropdown-submenu:focus>a {
+ background: #999;
+}
+
+.dropdown-menu * .fa-check {
+ display: none;
+ margin-right: -15px;
+ margin-top: 3px;
+}
+.dropdown-menu * a.active > .fa-check {
+ display: inline-block;
+}
+.dropdown-menu>li.disabled>a:hover>[class^="icon-"] {
+ background-image: url("bootstrap/img/glyphicons-halflings.png") !important;
+}
+/** Fix for unreachable dropdown menu **/
+.dropdown-menu {
+ width: 200px !important;
+}
+.dropdown-menu > li > a > i {
+ width: 10px;
+ text-align: center;
+ margin-left: -8px;
+}
+.dropdown-menu > li > a {
+ padding-left: 38px ;
+ text-indent: -8px ;
+ white-space: normal !important;
+}
+
+.popover-title { display: none; }
+
+.ui-autocomplete {
+ max-height: 250px;
+ overflow-x: hidden;
+ overflow-y: scroll;
+}
+
+.leftButton {
+ margin-right: 200px !important;
+}
+#node-help {
+ width: 700px;
+}
+#node-help * td {
+ padding: 0.8em 0.5em;
+}
+#node-help * tr > td:first-child+td+td {
+ padding-left: 5em;
+}
+
+.help-key {
+ border: 1px solid #ddd;
+ padding: 4px;
+ border-radius: 3px;
+ background: #f6f6f6;
+ font-family: Courier, monospace;
+ box-shadow: #999 1px 1px 1px;
+}
+
+#helpcontent {
+ padding: 20px;
+ border: 1px solid #ddd;
+ border-radius: 10px;
+
+ background: #fff;
+}
+#helpnavigation {
+ overflow: hidden;
+ border: 1px solid #ddd;
+ border-radius: 10px;
+ background: #fff;
+}
+#helpnavigation li a{
+ font-size: 1.2em;
+ padding: 10px;
+ border-bottom: 1px solid #ddd;
+}
+
+#node-select-library {
+ overflow: hidden;
+}
+#node-select-library ul {
+ list-style: none;
+ padding: 0px;
+ margin: 2px;
+}
+#node-select-library li {
+ cursor: pointer;
+}
+#node-select-library li.list-selected {
+ background: #eee;
+}
+#node-select-library li.list-hover {
+ background: #ffffd0;
+}
+.node-text-editor {
+ border:1px solid #ccc;
+ border-radius:5px;
+ overflow: hidden;
+}
+#workspace-tabs {
+ margin-right: 28px;
+}
+#workspace-add-tab {
+ position: absolute;
+ top: 0;
+ right: 0;
+ height: 29px;
+ width: 28px;
+ border-bottom: 1px solid #999;
+}
+#btn-workspace-add-tab {
+ display: inline-block;
+ width: 100%;
+ background: #e3e3e3;
+ height: 100%;
+ line-height: 30px;
+ text-align: center;
+ color: #000;
+}
+#btn-workspace-add-tab:hover {
+ background: #efefef;
+}
+
+ul.red-ui-tabs {
+ list-style-type: none;
+ padding:5px 2px 0px 5px;
+ margin: 0;
+ display: block;
+ height: 24px;
+ border-bottom: 1px solid #999;
+ background: #e3e3e3;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+ul.red-ui-tabs li {
+ border-top-left-radius: 5px;
+ border-top-right-radius: 5px;
+ display: inline-block;
+ border-left: 1px solid #999;
+ border-top: 1px solid #999;
+ border-right: 1px solid #999;
+ border-bottom: 1px solid #999;
+ background: #e3e3e3;
+ margin: 0 5px 0 0;
+ height: 23px;
+ line-height: 17px;
+ max-width: 150px;
+ width: 14%;
+ overflow: hidden;
+ white-space: nowrap;
+}
+
+ul.red-ui-tabs li a.red-ui-tab-label {
+ display: block;
+ padding: 3px 16px;
+ color: #666;
+}
+ul.red-ui-tabs li {
+ position: relative;
+}
+
+ul.red-ui-tabs li a.red-ui-tab-close {
+ background: rgba(227,227,227,0.8);
+ position: absolute;
+ right: 2px;
+ top: 2px;
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ text-align: center;
+ padding: 0px;
+ border-radius: 5px;
+ color: #666;
+}
+ul.red-ui-tabs li a.red-ui-tab-close:hover {
+ background: #bbb !important;
+}
+ul.red-ui-tabs li a:hover {
+ text-decoration: none;
+ background: #f0f0f0;
+}
+
+ul.red-ui-tabs li.active {
+ background: #fff;
+ border-bottom: 1px solid #fff;
+}
+ul.red-ui-tabs li.active a {
+ color: #333;
+}
+ul.red-ui-tabs li.active a.red-ui-tab-close {
+ background: rgba(255,255,255,0.8);
+}
+ul.red-ui-tabs li.active a.red-ui-tab-label:hover {
+ background: #fff;
+}
+ul.red-ui-tabs li.red-ui-add-tab {
+ width: 25px;
+ border-top-right-radius: 15px;
+ line-height: 22px;
+}
+ul.red-ui-tabs li.red-ui-add-tab a {
+ padding: 2px 4px;
+}
+
+ul.tab-config-list {
+ list-style-type: none;
+ padding: 3px;
+ margin: 0;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+ul.tab-config-list li {
+ max-width: 400px;
+ font-size: 13px;
+ background: #f3f3f3;
+ margin: 10px auto;
+ border-radius: 3px;
+ border: 1px solid #ccc;
+ padding: 3px 8px;
+}
+div.tab-config-list-type {
+}
+
+div.tab-config-list-entry {
+ position: relative;
+ margin: 4px 0;
+ padding: 8px 4px 8px 10px;
+ background: #fff;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ cursor: pointer;
+}
+div.tab-config-list-entry:hover {
+ background: #f6f6f6;
+}
+
+div.tab-config-list-label {
+}
+div.tab-config-list-users {
+ position: absolute;
+ right: 3px;
+ top: 3px;
+ bottom: 3px;
+ line-height: 27px;
+ font-size: 11px;
+ background: #f6f6f6;
+ float: right;
+ border: 1px solid #eee;
+ border-radius: 3px;
+ padding: 1px 5px;
+}
+
+i.spinner {
+ display: inline-block;
+ width: 14px;
+ height: 14px;
+ line-height: 14px;
+ vertical-align: text-top;
+ margin-top: 0px;
+ background: url(spin.svg) no-repeat 50% 50%;
+ background-size: contain
+}
+
+
+
diff --git a/dgbuilder/public/util/css/validateNodeXml.css b/dgbuilder/public/util/css/validateNodeXml.css
new file mode 100644
index 0000000..895ad7f
--- /dev/null
+++ b/dgbuilder/public/util/css/validateNodeXml.css
@@ -0,0 +1,86 @@
+#error-list-div{
+overflow:scroll;
+color:brown;
+width:480px;
+height:300px;
+}
+
+#node-validate-result a{
+ text-decoration: underline;
+ color:blue;
+ cursor:pointer;
+}
+
+table#errTable tr td:first-child {
+ border-left: 0px solid #e5e5e5;
+ text-align: center;
+}
+
+table#errTable tr td:last-child {
+ border-right: 0px solid #e5e5e5;
+}
+table#errTable tr:nth-of-type(odd) {
+ background-color: #FFF0F0;
+}
+
+table#errTable tr td {
+ border-width: 0px 0px 0px 0px;
+ border-style: solid;
+ border-color: #fff;
+ text-align: center;
+ font-size: 1.0em;
+}
+
+#sli-values-div{
+overflow:auto;
+color:blue;
+width:850px;
+height:600px;
+}
+
+#sli-values-div input[type="text"] {
+ padding: 1px;
+ border: solid 1px grey;
+ /*border: solid 1px #dcdcdc;*/
+ width:800px;
+ transition: box-shadow 0.3s, border 0.3s;
+ box-shadow: 0 0 5px 1px #969696;
+ cursor:pointer;
+}
+
+.valueBoxDiv {
+ border-width: 1px 2px 1px 1px;
+ border-style: solid;
+ /*border-color: #9999FF;*/
+ border-color: grey;
+ /*border-color: #fff;*/
+ font-size: 1.0em;
+ border-left: 1px solid #fff;
+ border-right: 1px solid #fff;
+ border-top: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ padding-left: 5px;
+ padding-right: 5px;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ /*background-color:#FFE6E6;*/
+ background-color:#fff;
+}
+
+/*#sli-values-div input[type="text"]:focus,
+
+#sli-values-div input[type="text"].focus {
+ border: solid 1px #707070;
+ box-shadow: 0 0 5px 1px #969696;
+}
+*/
+/*
+#getFixed {
+ color: #c00;
+ font: bold 15px arial;
+ padding: 10px;
+ margin: 10px;
+ border: 1px solid #c00;
+ width: 200px;
+}
+*/
diff --git a/dgbuilder/public/util/js/dgeToXml.js b/dgbuilder/public/util/js/dgeToXml.js
new file mode 100644
index 0000000..2bbb0c1
--- /dev/null
+++ b/dgbuilder/public/util/js/dgeToXml.js
@@ -0,0 +1,1328 @@
+function getDgStartNode(nodeList){
+ for(var i=0;i<nodeList.length;i++){
+ if(nodeList[i].type == 'dgstart' && nodeList[i].wires != null && nodeList[i].wires != undefined){
+ return nodeList[i];
+ }
+ }
+ RED.notify("DGSTART node not found.");
+ return null;
+}
+
+
+var loopDetectionEnabled = true;
+
+function detectLoopPrev(){
+ var activeWorkspace=RED.view.getWorkspace();
+ /*
+ RED.nodes.links.filter(function(d) {
+ if(d.source.z == activeWorkspace && d.target.z == activeWorkspace){
+ console.log(d.source.id+":"+d.sourcePort+":"+d.target.id);
+ }
+ });
+ */
+ //console.dir(RED.nodes.links);
+ var nSet=[];
+
+ RED.nodes.eachNode(function(n) {
+ if (n.z == activeWorkspace) {
+ nSet.push({'n':n});
+ }
+ });
+
+ var nodeSet = RED.nodes.createExportableNodeSet(nSet);
+ //console.dir(nodeSet);
+
+ //console.log("nodeSet length:" + nodeSet.length);
+
+ var isLoopDetected = false;
+ var dgStartNode = getDgStartNode(nodeSet);
+ if(dgStartNode == null || dgStartNode == undefined) {
+ console.log("dgstart node not linked.");
+ return true;
+ }
+
+ var wires = dgStartNode.wires;
+ var nodesInPath = {};
+ var dgStartNodeId = dgStartNode.id;
+ if(wires != null && wires != undefined && wires[0] != undefined){
+ for(var k=0;k<wires[0].length;k++){
+ var val = wires[0][k];
+ nodesInPath[dgStartNodeId + "->" + val] = "";
+ }
+ }else{
+ nodesInPath[dgStartNodeId + "->" + ""] = "";
+ }
+
+ //console.dir(nodesInPath);
+ var loopDetectedObj = {};
+ /* the nodes will not be order so will need to loop thru again */
+ for(var m=0;nodeSet != null && m<nodeSet.length;m++){
+ for(var i=0;nodeSet != null && i<nodeSet.length;i++){
+ var link=nodeSet[i].id;
+ //console.log("NAME:" + nodeSet[i].name + ":" + link);
+ if(link == dgStartNodeId) continue;
+ var wires = nodeSet[i].wires;
+ //console.log("link:" + link);
+ var delKeys = [];
+ if(wires != null && wires != undefined && wires[0] != undefined){
+ for(var k=0;k<wires[0].length;k++){
+ var val = (wires[0])[k];
+ var keys = Object.keys(nodesInPath);
+ //console.log("keys:" + keys);
+ for (var j=0;j<keys.length;j++){
+ //console.log("key:" + keys[j]);
+ //console.log("val:" + val);
+ var index = -1;
+ if(keys[j] != null){
+ index = keys[j].indexOf("->" + link);
+ }
+ var lastIndex = keys[j].lastIndexOf("->");
+ if(index != -1 && index == lastIndex){
+ //delete nodesInPath[key];
+ var previousNodeId = keys[j].substr(lastIndex +2);
+ var indexOfArrow = -1;
+ if(previousNodeId != ""){
+ indexOfArrow = previousNodeId.indexOf("->");
+ }
+ if(previousNodeId != null && indexOfArrow != -1){
+ previousNodeId = previousNodeId.substr(0,indexOfArrow);
+ }
+ nodesInPath[keys[j] + "->" + val] = "";
+ //console.log("keys[j]:" + keys[j]);
+ delKeys.push(keys[j]);
+ var prevNodeIdIndex = keys[j].indexOf("->" + previousNodeId);
+ var priorOccurence = keys[j].indexOf(val + "->");
+ if(priorOccurence != -1 && priorOccurence<prevNodeIdIndex){
+ //console.log("previousNodeId:" + previousNodeId);
+ //console.log("val:" + val);
+ var n1 = getNode(nodeSet,previousNodeId);
+ var n2 = getNode(nodeSet,val);
+ //console.log("loop detected for node " + n1.name + " and " + n2.name);
+ loopDetectedObj[n1.name + "->" + n2.name] ="looped";
+ //console.dir(loopDetectedObj);
+ isLoopDetected = true;
+ }
+ }
+ }
+ }
+ }
+ for(var l=0;delKeys != null && l<delKeys.length;l++){
+ delete nodesInPath[delKeys[l]];
+ }
+ }
+
+
+ }
+ if(loopDetectedObj != null ){
+ var msg = "";
+ for(var key in loopDetectedObj){
+ if(loopDetectedObj.hasOwnProperty(key)) {
+ console.log("Loop detected " + key);
+ msg += "<strong>Loop detected for:" + key + "</strong><br>";
+ }
+ }
+ if(msg != ""){
+ isLoopDetected = true;
+ RED.notify(msg);
+ }
+ }
+/*
+ for(var i=0;nodeSet != null && i<nodeSet.length;i++){
+ var foundCount=0;
+ var nodeId = nodeSet[i].id;
+ var nodeName = nodeSet[i].name;
+ for(var j=0;nodeSet != null && j<nodeSet.length;j++){
+ var node = nodeSet[j];
+ if(node.id == nodeId){
+ continue;
+ }
+ var wires = node.wires;
+ console.log(node.type + ":wires:" + wires);
+ for(var k=0;wires != null && wires != undefined && wires[0] != undefined && k<wires[0].length;k++){
+ var id = (wires[0])[k];
+ console.log(nodeName + ":" + nodeId + ":" + id);
+ if(id == nodeId ){
+ foundCount++;
+ if(foundCount>1){
+ console.log("Loop detected for node " + nodeName + "with node:" + node.name);
+ RED.notify("<strong>Flow error detected for node '" + nodeName + "' with node '" + node.name + "'</strong>");
+ //RED.nodes.eachLink(function(d){
+ // if(d.source.id == nodeSet[i] || d.target.id == nodeSet[j]){
+ // d.selected = true;
+ // }else if(d.source.id == nodeSet[j] || d.target.id == nodeSet[i]){
+ // d.selected = true;
+ // }
+ //});
+ //RED.view.redraw();
+ isLoopDetected = true;
+ return true;
+ }
+ }
+ }
+
+ }
+ }
+*/
+ //console.log("isLoopDetected:" + isLoopDetected);
+ return isLoopDetected;
+}
+
+function generateNodePath(nodeIdToNodeObj,nodeId,pathStr,nodesInPath,errList){
+ var node = nodeIdToNodeObj[nodeId];
+ var wires = node.wires;
+ if(wires != null && wires != undefined && wires[0] != undefined){
+ for(var k=0;k<wires[0].length;k++){
+ var val = wires[0][k];
+ if(pathStr.indexOf(val + "->") != -1){
+ //console.log("pathStr:" + pathStr);
+ var n1= nodeIdToNodeObj[nodeId].name;
+ var n2= nodeIdToNodeObj[val].name;
+ errList.push("Loop detected between nodes '" + n1 + "' and " + "'" + n2 + "'");
+ }else{
+ pathStr += "->" + val ;
+ generateNodePath(nodeIdToNodeObj,val,pathStr,nodesInPath,errList);
+ }
+ }
+ }else{
+ //pathStr += nodeId + "->" + "";
+ nodesInPath.push(pathStr);
+ }
+}
+
+function detectLoop(){
+ var activeWorkspace=RED.view.getWorkspace();
+ var nSet=[];
+ var nodeIdToNodeObj = {};
+ RED.nodes.eachNode(function(n) {
+ if (n.z == activeWorkspace) {
+ nSet.push({'n':n});
+ }
+ });
+
+ var nodeSet = RED.nodes.createExportableNodeSet(nSet);
+ nodeIdToNodeObj = getNodeIdToNodeMap(nodeSet);
+ var isLoopDetected = false;
+ //var dgStartNode = getDgStartNode(nodeSet);
+ var dgStartNode = nodeIdToNodeObj["dgstart"];
+ var errList = [];
+ var dgStartNodeId = dgStartNode.id;
+ var nodesInPathArr = [];
+ generateNodePath(nodeIdToNodeObj,dgStartNodeId,dgStartNodeId,nodesInPathArr,errList);
+ if(errList != null && errList != undefined && errList.length > 0){
+ isLoopDetected = true;
+ var htmlStr="<div id='loop-detect-err-list-div'><table id='loopErrListTable' border='1'><tr><th>Error List</th></tr>";
+ for(var j=0;errList != null && j<errList.length;j++){
+ var errSeq = j+1;
+ htmlStr += "<tr><td>" + errSeq + ")" + errList[j] + "</td></tr>";
+ }
+ htmlStr += "</table></div>";
+
+ $("#loop-detection-dialog").dialog({
+ autoOpen : false,
+ modal: true,
+ title: "DG Flow validation Error List ",
+ width: 500,
+ buttons: {
+ Close: function () {
+ $("#loop-detection-dialog").dialog("close");
+ }
+ }
+ }).dialog("open").html(htmlStr); // end dialog div
+ }
+ nodesInPathArr=null;
+ nodeSet ={};
+ nodeIdToNodeObj={};
+ return isLoopDetected;
+}
+
+
+var xmlNumberCnt = 0;
+function processForXmlNumbers(nodeSet,node){
+ if( node != null && node.type != 'dgstart'){
+ if(node.xmlnumber != null && node.xmlnumber){
+ node.xmlnumber.push(++xmlNumberCnt);
+ }else{
+ node.xmlnumber = [++xmlNumberCnt];
+ }
+ }
+
+ if(node != null && node.wires != null && node.wires.length>0){
+ var wiredNodes=node.wires[0];
+ var wiredNodesArr=[];
+ for(var k=0;wiredNodes != undefined && wiredNodes != null && k<wiredNodes.length;k++){
+ wiredNodesArr.push(getNode(nodeSet,wiredNodes[k]));
+ }
+
+ //use this sort to sort by y position
+ wiredNodesArr.sort(function(a, b){
+ return a.y-b.y;
+ });
+
+ for(var k=0;k<wiredNodesArr.length;k++){
+ var n = wiredNodesArr[k];
+ processForXmlNumbers(nodeSet,n);
+ }
+ }
+}
+
+function updateXmlNumbers(){
+ xmlNumberCnt = 0;
+ var nodeSet = getCurrentFlowNodeSet();
+ if(nodeSet == null && nodeSet.length >0){
+ nodeSet.forEach(function(n){
+ if(n.xmlnumber){
+ delete n.xmlnumber;
+ }
+ });
+ }
+ var dgStartNode = getDgStartNode(nodeSet);
+ processForXmlNumbers(nodeSet,dgStartNode);
+ var activeWorkspace=RED.view.getWorkspace();
+ RED.nodes.eachNode(function(n) {
+ //console.log("Node processed in eachNode");
+ if (n.z == activeWorkspace) {
+ if(n != null){
+ var updatedNode = getNode(nodeSet,n.id);
+ //console.log("updated Node processed in eachNode");
+ //console.dir(updatedNode);
+
+ if (n.id == updatedNode.id) {
+ n.xmlnumber = updatedNode.xmlnumber;
+ n.dirty = true;
+ }
+ }
+ }
+ });
+}
+
+function getOutcomeValue(node){
+ var xmlStr = "";
+ if(node != null && node.xml != undefined && node.xml !=""){
+ xmlStr = node.xml + "</outcome>";
+ }
+ var xmlDoc;
+ if (window.DOMParser){
+ try{
+ var parser=new DOMParser();
+ xmlDoc=parser.parseFromString(xmlStr,'text/xml');
+ //console.log("Not IE");
+ var n = xmlDoc.documentElement.nodeName;
+ if(n == "html"){
+ resp=false;
+ console.log("Error parsing");
+ return resp;
+ }
+ }catch(e){
+ console.log("xmlStr:" + xmlStr);
+ console.log("Error parsing" +e);
+ return null;
+ }
+ }else{
+ try{
+ //console.log("IE");
+ // code for IE
+ xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
+ xmlDoc.async=false;
+ xmlDoc.loadXMLString(xmlStr);
+ }catch(e){
+ console.log("xmlStr:" + xmlStr);
+ console.log("Error parsing" +e);
+ return null;
+ }
+ }
+ if(xmlDoc != null){
+ var xmlNode = xmlDoc.documentElement;
+ //console.dir(xmlNode);
+ var processedNode = xmlNode.nodeName;
+ //console.log("processedNode:" + processedNode);
+ var attrs = xmlNode.attributes;
+ for(var i=0;i<attrs.length;i++){
+ if(attrs[i].nodeName == "value"){
+ return attrs[i].value;
+ }
+ }
+ }
+ return null;
+}
+
+var dgNumberCnt = 0;
+function processForDgNumbers(nodeSet,node){
+ var outcomeTypes = [ "already-active", "failure", "not-found", "other", "outcomeFalse", "outcome", "outcomeTrue", "success" ];
+ if( node != null && node.type != 'dgstart' && node.type != 'service-logic' && node.type != 'method' ){
+ //console.log("child of " + parentNodeType + " :" + nodeType);
+ //check if NOT outcome node
+ if(outcomeTypes.indexOf(node.type) == -1){
+ if(node.type == "GenericXML"){
+ if(node.xml != undefined && node.xml != null && node.xml.indexOf("<outcome ") != -1){
+ //this GenericXML node is used for outcome , so need to skip
+ }else{
+ if(node.dgnumber != undefined && node.dgnumber != null && node.dgnumber){
+ node.dgnumber.push(++dgNumberCnt);
+ }else{
+ node.dgnumber = [++dgNumberCnt];
+ }
+ }
+
+ }else{
+ if(node.dgnumber != undefined && node.dgnumber != null && node.dgnumber){
+ node.dgnumber.push(++dgNumberCnt);
+ }else{
+ node.dgnumber = [++dgNumberCnt];
+ }
+ }
+ }
+ }
+
+ var hasOutcomeNodes = false;
+ if(node != null && node.wires != null && node.wires.length>0){
+ var wiredNodes=node.wires[0];
+ var wiredNodesArr=[];
+ for(var k=0;wiredNodes != undefined && wiredNodes != null && k<wiredNodes.length;k++){
+ var wiredNode = getNode(nodeSet,wiredNodes[k]);
+ //check if outcome node
+ if(outcomeTypes.indexOf(wiredNode.type) != -1){
+ hasOutcomeNodes = true;
+ }
+ if(wiredNode.type == "GenericXML"){
+ if( node.xml != undefined && node.xml != null && node.xml.indexOf("<outcome ") != -1){
+ //this GenericXML node is used for outcome
+ hasOutcomeNodes = true;
+ }
+ }
+ wiredNodesArr.push(wiredNode);
+
+ }
+
+ //use this sort to sort by y position
+ wiredNodesArr.sort(function(a, b){
+ return a.y-b.y;
+ });
+
+ /*
+ //USE THIS LOGIC TO SORT BY OUTCOME VALUE FOR SPECIFIC NODES
+ var parentNodeType = node.type;
+ if(hasOutcomeNodes && parentNodeType != 'switchNode' && parentNodeType != 'block' && parentNodeType != 'configure' ){
+ //use the value of outcome to sort the wired nodes
+ wiredNodesArr.sort(function(a, b){
+ var val1 = getOutcomeValue(a);
+ var val2 = getOutcomeValue(b);
+ //console.log("val1:" + val1);
+ //console.log("val2:" + val2);
+ if ( val1 < val2 ){
+ return -1;
+ }else if ( val1 > val2 ){
+ return 1;
+ }else{
+ return 0;
+ }
+ });
+ }else{
+ //use this sort to sort by y position
+ wiredNodesArr.sort(function(a, b){
+ return a.y-b.y;
+ });
+ }
+
+ */
+
+ for(var k=0;k<wiredNodesArr.length;k++){
+ var n = wiredNodesArr[k];
+ processForDgNumbers(nodeSet,n);
+ }
+ }
+}
+
+function updateDgNumbers(){
+ dgNumberCnt = 0;
+ var nodeSet = getCurrentFlowNodeSet();
+ if(nodeSet == null && nodeSet.length >0){
+ nodeSet.forEach(function(n){
+ if(n.dgnumber){
+ delete n.dgnumber;
+ }
+ });
+ }
+ var dgStartNode = getDgStartNode(nodeSet);
+ processForDgNumbers(nodeSet,dgStartNode);
+ var activeWorkspace=RED.view.getWorkspace();
+ RED.nodes.eachNode(function(n) {
+ //console.log("Node processed in eachNode");
+ if (n.z == activeWorkspace) {
+ if(n != null){
+ var updatedNode = getNode(nodeSet,n.id);
+ //console.log("updated Node processed in eachNode");
+ //console.dir(updatedNode);
+
+ if (n.id == updatedNode.id) {
+ //console.log(n.type + ":" + updatedNode.dgnumber);
+ n.dgnumber = updatedNode.dgnumber;
+ n.dirty = true;
+ }
+ }
+ }
+ });
+ return nodeSet;
+}
+
+function customValidation(currNodeSet){
+ //validation to make sure there a block node infront of mutiple dgelogic nodes
+ flowDesignErrors=[];
+ var dgStartCnt=0;
+ var serviceLogicCnt=0;
+ var methodCnt=0;
+ for(var i=0;currNodeSet != null && i<currNodeSet.length;i++){
+ var node = currNodeSet[i];
+ var parentNodeName = node.name;
+ var parentNodeType = node.type;
+ var dgNumber = node.dgnumber;
+ if(parentNodeType == 'dgstart'){
+ dgStartCnt++;
+ }
+ if(parentNodeType == 'service-logic'){
+ serviceLogicCnt++;
+ }
+ if(parentNodeType == 'method'){
+ methodCnt++;
+ }
+ if(parentNodeType == "GenericXML"){
+ if( node.xml != undefined && node.xml != null && node.xml.indexOf("<service-logic ") != -1 ){
+ //this GenericXML node is used for service-logic
+ serviceLogicCnt++;
+ }else if( node.xml != undefined && node.xml != null && node.xml.indexOf("<method ") != -1 ){
+ //this GenericXML node is used for method
+ methodCnt++;
+ }else if( node.xml != undefined && node.xml != null && node.xml.indexOf("<block") != -1 ){
+ //this GenericXML node is used for block
+ parentNodeType = "block";
+ }
+ }
+ if(node != null && node.wires != null && node.wires.length>0){
+ var wiredNodes=node.wires[0];
+ var wiredNodesArr=[];
+ for(var k=0;wiredNodes != undefined && wiredNodes != null && k<wiredNodes.length;k++){
+ wiredNodesArr.push(getNode(currNodeSet,wiredNodes[k]));
+ }
+ var countChildLogicNodes =0;
+ for(var k=0;k<wiredNodesArr.length;k++){
+ var n = wiredNodesArr[k];
+ var nodeType = n.type;
+ var outcomeTypes = [ "already-active", "failure", "not-found", "other", "outcomeFalse", "outcome", "outcomeTrue", "success" ];
+ var isOutcomeOrSetNode = false;
+ if(nodeType == "GenericXML"){
+ if( n.xml != undefined && n.xml != null && (n.xml.indexOf("<outcome ") != -1 || n.xml.indexOf("<set ") != -1)){
+ //this GenericXML node is used for outcome
+ isOutcomeOrSetNode = true;
+ }
+ }
+ //console.log("child of " + parentNodeType + " :" + nodeType);
+ if(outcomeTypes.indexOf(nodeType) > -1 ||nodeType == 'set' || isOutcomeOrSetNode){
+ //its a outcome or set node
+ }else{
+ countChildLogicNodes++;
+ }
+
+ //console.log("parentNodeType:" + parentNodeType);
+ if(countChildLogicNodes >1 && parentNodeType != 'block' ){
+ if(node.dgnumber != undefined && node.dgnumber){
+ flowDesignErrors.push("Warning:May need a block Node after Node. <br><span style='color:red'>Node Name:</span>" + node.name + "<br><span style='color:red'>DG Number:</span>" + node.dgnumber[0] );
+ }else{
+ flowDesignErrors.push("Warning:May need a block Node after Node <br><span style='color:red'>Node name:</span>" + parentNodeName);
+ }
+ break;
+ }
+ }
+ }
+ }
+ if(dgStartCnt > 1){
+ flowDesignErrors.push("Error:There should only be 1 dgstart Node in the current workspace.");
+ }
+
+ if(serviceLogicCnt > 1){
+ flowDesignErrors.push("Error:There should only be 1 service-logic Node in the current workspace.");
+ }
+
+ if(methodCnt > 1){
+ flowDesignErrors.push("Error:There should only be 1 method Node in the current workspace.");
+ }
+
+ if(flowDesignErrors != null && flowDesignErrors.length >0){
+ return false;
+ }
+ return true;
+}
+
+var flowDesignErrors = [];
+function showFlowDesignErrorBox(){
+ if(flowDesignErrors != null && flowDesignErrors.length >0){
+ var htmlStr="<div id='flowpath-err-list-div'><table id='fpeTable' border='1'><tr><th>Error List</th></tr>";
+ for(var j=0;flowDesignErrors != null && j<flowDesignErrors.length;j++){
+ var errSeq = j+1;
+ htmlStr += "<tr><td>" + errSeq + ")" + flowDesignErrors[j] + "</td></tr>";
+ }
+ htmlStr += "</table></div>";
+
+ //$('<div></div>').dialog({
+
+ $('#flow-design-err-dialog').dialog({
+ modal: true,
+ title: "Flow design Error List ",
+ width: 500,
+ /*open: function () {
+ $(this).html(htmlStr);
+ },*/
+ buttons: {
+ Close: function () {
+ $(this).dialog("close");
+ }
+ }
+ }).html(htmlStr); // end dialog div
+ }
+}
+
+
+function getCurrentFlowNodeSet(){
+ var nodeSet=[];
+ //console.dir(RED);
+ //RED.view.dirty();
+ //RED.view.redraw();
+ var activeWorkspace=RED.view.getWorkspace();
+ RED.nodes.eachNode(function(n) {
+ if (n.z == activeWorkspace) {
+ nodeSet.push({'n':n});
+ }
+ });
+
+ var exportableNodeSet = RED.nodes.createExportableNodeSet(nodeSet);
+ //console.dir(exportableNodeSet);
+ //console.log(JSON.stringify(exportableNodeSet));
+ return exportableNodeSet;
+}
+
+function getNode(nodeSet,id){
+ for(var i=0;i<nodeSet.length;i++){
+ if(nodeSet[i].id == id){
+ return nodeSet[i];
+ }
+ }
+ return null;
+}
+function getNodeIdToNodeMap(nodeSet){
+ var nodeIdToNodeMap ={};
+ for(var i=0;i<nodeSet.length;i++){
+ nodeIdToNodeMap[nodeSet[i].id] = nodeSet[i];
+ if(nodeSet[i].type == "dgstart"){
+ nodeIdToNodeMap["dgstart"] = nodeSet[i];
+ }
+ }
+ return nodeIdToNodeMap;
+}
+
+function validateEachNodeXml(){
+ var activeWorkspace=RED.view.getWorkspace();
+ RED.nodes.eachNode(function(n) {
+ if (n.z == activeWorkspace) {
+ var xml = n.xml;
+ if( xml != null && xml != ''){
+ var validationSuccess = validateXML(n.xml);
+ if(validationSuccess){
+ n.status = {fill:"green",shape:"dot",text:"OK"};
+ }else{
+ n.status = {fill:"red",shape:"dot",text:"ERROR"};
+ }
+ }
+ }
+ });
+}
+
+
+function getNodeToXml(inputNodeSet){
+ var exportableNodeSet;
+ //uses inputNodeSet if passed otherwise build the latest nodeSet
+
+ //$("#btn-deploy").removeClass("disabled");
+
+
+ function getNode(id){
+ for(var i=0;i<exportableNodeSet.length;i++){
+ if(exportableNodeSet[i].id == id){
+ return exportableNodeSet[i];
+ }
+ }
+ return null;
+ }
+
+ function getStartTag(node){
+ var startTag="";
+ var xmlStr="";
+ if(node != null && node.type != 'dgstart'){
+ xmlStr=node.xml;
+ var regex = /(<)([\w-]+)(.*)?/;
+ var match = regex.exec(xmlStr);
+ if(match != null){
+ if(match[1] != undefined && match[2] != undefined){
+ startTag = match[2];
+ }
+ }else{
+ console.log("startTag not found.");
+ }
+ }
+ return startTag;
+ }
+
+ if(inputNodeSet == null || inputNodeSet == undefined){
+ exportableNodeSet = getCurrentFlowNodeSet();
+ }else{
+ exportableNodeSet = JSON.parse(inputNodeSet);
+ }
+ var dgstartNode = getDgStartNode(exportableNodeSet);
+
+ var level=0;
+ var fullXmlStr="";
+
+ printXml(dgstartNode);
+
+
+ function printXml(node){
+ var xmlStr="";
+ var startTag = "";
+ if(node != null && node.type != 'dgstart'){
+ var comments=node.comments;
+ if(comments != null && comments != ""){
+ //if xml comments field already has the <!-- and --> remove them
+ comments=comments.replace("<!--","");
+ comments=comments.replace("-->","");
+ xmlStr="<!--" + comments + "-->";
+ }
+ xmlStr+=node.xml;
+ startTag = getStartTag(node);
+ fullXmlStr +=xmlStr;
+ /*
+ if(level > 0){
+ var spacing = Array(level).join(" ");
+ xmlStr=xmlStr.replace(/\n/g,spacing);
+ fullXmlStr +=xmlStr;
+
+ console.log(xmlStr);
+ }else{
+ fullXmlStr +=xmlStr;
+ console.log(xmlStr);
+ }
+ */
+ }
+
+ //console.log("startTag:" + startTag);
+
+ var wiredNodes = [];
+ var wiredNodesArr = [];
+ if(node != null && node.wires != null && node.wires[0] != null && node.wires[0] != undefined && node.wires[0].length >0 ){
+ wiredNodes=node.wires[0];
+ //console.log("Before sort");
+ for(var k=0;wiredNodes != undefined && wiredNodes != null && k<wiredNodes.length;k++){
+ wiredNodesArr.push(getNode(wiredNodes[k]));
+ }
+ //console.dir(wiredNodesArr);
+ //sort based on y position
+ wiredNodesArr.sort(function(a, b){
+ return a.y-b.y;
+ });
+ //console.log("After sort");
+ //console.dir(wiredNodesArr);
+ }
+
+ for(var k=0;wiredNodesArr != null && k<wiredNodesArr.length;k++){
+ level++;
+ var nd = wiredNodesArr[k];
+ printXml(nd);
+ }
+
+ //append end tag
+ if(startTag != ""){
+ fullXmlStr += "</" + startTag + ">";
+ /*
+ if(level >0){
+ var spacing = Array(level).join(" ");
+ fullXmlStr += spacing + "</" + startTag + ">";
+ console.log(spacing + "</" + startTag + ">");
+ }else{
+ fullXmlStr += "</" + startTag + ">";
+ console.log("</" + startTag + ">");
+ }
+ */
+ }
+
+ /*if(level>0){
+ level=level-1;
+ }
+ */
+ //console.log("endTag:" + startTag);
+ //console.log("xml:" + fullXmlStr);
+ }
+ //console.log("fullXmlStr:" + fullXmlStr);
+ return fullXmlStr;
+}
+
+function showFlow(filePath){
+var jqxhr = $.post( "/getSharedFlow",{"filePath":filePath})
+ .done(function(data) {
+ $( "#dgflow-browser-dialog").dialog("close");
+ var migratedNodes = migrateNodes(data);
+ //RED.view.importNodes(data)
+ RED.view.importNodes(JSON.stringify(migratedNodes));
+ //console.log( "import done");
+ })
+ .fail(function() {
+ RED.notify("Could not import user flow .");
+ $( "#dgflow-browser-dialog").dialog("close");
+ console.log( "error occured importing flow.");
+ })
+ .always(function() {
+ //console.log( "complete" );
+ });
+}
+
+function showFlowXml(filePath){
+var jqxhr = $.post( "/getSharedFlow",{"filePath":filePath})
+ .done(function(data) {
+ //console.dir(data);
+ var xmlStr=getNodeToXml(data);
+ showImportedXml(xmlStr,this);
+ })
+ .fail(function() {
+ RED.notify("Could not convert to XML.");
+ $( "#dgflow-browser-dialog").dialog("close");
+ console.log( "error occured importing flow.");
+ })
+ .always(function() {
+ //console.log( "complete" );
+ });
+}
+
+function showFlowFiles(userName){
+ //var divStyle="color:#07c; margin-bottom: 1.2em; font-size: 16px;";
+ //var divStyle="<style>#data-container a { color: #067ab4; font-size: 0.75em;} #data-container a:hover { text-decoration: underline; padding: -15px -15px -15px 15px; } </style>";
+ var divStyle="<style>#data-container a { color: #067ab4; font-size: 0.75em;} #data-container a:hover { text-decoration: underline; padding: -15px -15px -15px 15px; } .header { height: 40px; border-bottom: 1px solid #EEE; background-color: #ffffff; height: 40px; -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; } .footer { height: 40px; background-color: whiteSmoke; border-top: 1px solid #DDD; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }</style>";
+
+ var htmlStr=divStyle + "<div class='header'>List of Flow files of User " + userName + "</div><div id='data-container'><ul>" ;
+ $.post( "/getFiles/" + userName)
+ .done(function( data ) {
+ //console.dir(data);
+ //console.log("found " + data.length + " files");
+ if(data != null && data.length != undefined && data.length != 0){
+ if(data != null && data.length>0){
+ for(var k=0;k<data.length;k++){
+ htmlStr += "<li><a href=\"#\" onclick=\"showFlow('" +data[k].filePath + "')\">" + data[k].name + "</a></li>";
+ /*
+ //Use this code to display the View Xml Link
+ htmlStr += "<li><a href=\"#\" onclick=\"showFlow('" +data[k].filePath + "')\">" + data[k].name + "</a><span style=\"margin-left:15px;color:blue\"><a href=\#\" onclick=\"showFlowXml('" +data[k].filePath + "')\">[View Xml]</a></span></li>";
+ */
+ }
+ htmlStr+="</ul></div>";
+ }
+ $( "#dgflow-browser-dialog").html(htmlStr);
+ }else{
+ //console.log("no flow files found for user " + userName);
+ var noFlowFilesHtml = divStyle + "<div id='data-container'><p>No downloaded Flow files found in " + userName + " directory</p><a href='#' onclick='javascript:closeAndShowFlowShareUsers()'>Back to List.</a></div>";
+ $( "#dgflow-browser-dialog").html(noFlowFilesHtml);
+ }
+ })
+ .fail(function(err) {
+ console.log( "error" + err );
+ })
+ .always(function() {
+ //console.log("done");
+ });
+
+}
+
+ function closeAndShowFlowShareUsers(){
+ $("#dgflow-browser-dialog").dialog( "close" );
+ var divStyle="<style>#data-container a { color: #067ab4; font-size: 0.75em;} #data-container a:hover { text-decoration: underline; padding: -15px -15px -15px 15px; } .header { height: 40px; border-bottom: 1px solid #EEE; background-color: #ffffff; height: 40px; -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; } .footer { height: 40px; background-color: whiteSmoke; border-top: 1px solid #DDD; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }</style>";
+ $.get( "/flowShareUsers")
+ .done(function( data ) {
+
+ var header="<div class='header'>List of downloaded DG Flows </div>";
+ var html= divStyle + header + "<div id='data-container'>";
+ html+="<ul>";
+ if(data != null){
+ var users=data.flowShareUsers;
+ users.sort(function (a,b){
+ if(a.name > b.name){
+ return 1;
+ }else if(a.name < b.name){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ for(var i=0;users != null && i<users.length;i++){
+ html+="<li><a href=\"#\" onclick=\"showFlowFiles('" + users[i].rootDir + "')\">" + users[i].name + "</a></li>";
+ }
+ }
+ html+="</ul>";
+ html+="</div>";
+ $( "#dgflow-browser-dialog" ).dialog({
+ title: "Dowloaded DG Flow Browser",
+ modal: true,
+ autoOpen: true,
+ width: 530,
+ height: 530,
+ buttons: [
+ {
+ text: "Close",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ]
+ }).html(html);
+ $("#dgflow-browser-dialog").show();
+ })
+ .fail(function(err) {
+ RED.notify("Failed to get users.");
+ })
+ .always(function() {
+ });
+ }
+
+function showImportedXml(xmlStr,dialogBox){
+ var formattedXml=vkbeautify.xml(xmlStr);
+ var that = dialogBox;
+ require(["orion/editor/edit"], function(edit) {
+ that.editor = edit({
+ parent:document.getElementById('dgflow-browser-dialog'),
+ lang:"html",
+ readonly:true,
+ contents: formattedXml
+ });
+ RED.library.create({
+ url:"functions", // where to get the data from
+ type:"function", // the type of object the library is for
+ editor:that.editor, // the field name the main text body goes to
+ fields:['name','outputs']
+ });
+ });
+}
+
+function getTag(xmlStr){
+ var tag= null ;
+ if(xmlStr != null){
+ xmlStr = xmlStr.trim();
+ }
+ try{
+ var regex = new RegExp("(<)([^ >]+)");
+ var match = regex.exec(xmlStr);
+ if(match != null){
+ if(match[1] != undefined && match[2] != undefined){
+ tag = match[2];
+ }
+ }
+ }catch(e){
+ console.log(e);
+ }
+ return tag;
+
+}
+
+function getAttributeValue(xmlStr,attribute){
+
+ var attrVal=null;
+ try{
+ var myRe = new RegExp(attribute + "[\s+]?=[\s+]?['\"]([^'\"]+)['\"]","m");
+ var myArray = myRe.exec(xmlStr);
+ if(myArray != null && myArray[1] != null){
+ attrVal=myArray[1];
+ }
+ }catch(err){
+ console.log(err);
+ }
+ return attrVal;
+}
+
+function showOrHideTab(checkbox,idVal){
+
+ var activeWorkspace=RED.view.getWorkspace();
+ var table = $("#ftab02");
+ $('td input:checkbox',table).each(function(i){
+ console.log(this.checked);
+ });
+ //console.dir($('td input:checkbox',table).prop('checked',this.checked));
+
+ $(".red-ui-tabs li a").each(function(i){
+ var id=$(this).attr("href").replace('#','');
+ if(id == idVal){
+ $(this).parent().toggle();
+ var isVisible = $(this).parent().is(":visible");
+ if(isVisible){
+ checkbox.checked = true;
+ }else{
+ checkbox.checked = false;
+ }
+ if(activeWorkspace == id){
+ //$("#chart").hide();
+ //var li = ul.find("a[href='#"+id+"']").parent();
+ var li = $(this).parent();
+ if (li.hasClass("active")) {
+ li.removeClass("active");
+ if(li.parent().children().size() != 0){
+ }
+ console.log("has Class active");
+ var tab = li.prev();
+ if (tab.size() === 0) {
+ console.log("li prev size 0");
+ tab = li.next();
+ }
+ if(tab.is(":visible")){
+ console.log("added active");
+ tab.addClass("active");
+ tab.click();
+ //tab.trigger("click");
+ }
+ //console.dir(tab);
+ //tab.parent().addClass("active");
+ //tab.click();
+ }
+ }else{
+ console.log("added active id" +id);
+ if(isVisible){
+ var li = $(this).parent();
+ li.addClass("active");
+ li.click();
+ //console.dir(li);
+ }else{
+ var li = $(this).parent();
+ li.removeClass("active");
+ }
+ }
+ }
+ });
+/*
+ $(".red-ui-tabs li a").each(function(i){
+ var id=$(this).attr("href").replace('#','');
+ if(id != idVal){
+ $(this).trigger("click");
+ if(activeWorkspace == idVal){
+ $("#chart").show();
+ }
+ return false;
+ }
+ });
+*/
+}
+
+function performGitCheckout(){
+ $("#responseId").text("");
+ if(!event) event = window.event;
+ var target = $(event.target);
+ target.val("Processing");
+ target.css({ "background-image": "url('images/page-loading.gif')" });
+ target.css({ "background-repeat": "no-repeat" });
+ target.css({ "background-size": "25px 25px" });
+
+ var branch = document.getElementById("branchId").value.trim();
+ var statusObj = document.getElementById("responseId");
+ if(branch == null || branch == ''){
+ statusObj.innerText = "Branch is required.";
+ return;
+ }
+ var urlVal = "/gitcheckout?branch=" + branch;
+ $.get(urlVal)
+ .done(function( data ) {
+ var output = data.output;
+ if(output != null){
+ output=output.replace(/\n/g,"<br>");
+ statusObj.innerHTML = output;
+ }
+ })
+ .fail(function(err) {
+ statusObj.innerText = "Failed to do git checkout.";
+ })
+ .always(function() {
+ $("#responseId").show();
+ target.val("Checkout");
+ target.css({ "background-image": "none" });
+ });
+}
+
+function performGitPull(){
+ $("#responseId").text("");
+ if(!event) event = window.event;
+ var target = $(event.target);
+ target.val("Processing");
+ target.css({ "background-image": "url('images/page-loading.gif')" });
+ target.css({ "background-repeat": "no-repeat" });
+ target.css({ "background-size": "25px 25px" });
+
+ var statusObj = document.getElementById("responseId");
+ var urlVal = "/gitpull";
+ $.get(urlVal)
+ .done(function( data ) {
+ var output = data.output;
+ if(output != null){
+ output=output.replace(/\n/g,"<br>");
+ statusObj.innerHTML = output;
+ }
+ })
+ .fail(function(err) {
+ statusObj.innerText = "Failed to do git pull.";
+ })
+ .always(function() {
+ $("#responseId").show();
+ target.val("Pull");
+ target.css({ "background-image": "none" });
+ });
+}
+
+
+function activateClickedTab(idVal) {
+
+ $("#filter-tabs-dialog").dialog( "close" );
+ var ul = $("#workspace-tabs");
+ ul.children().each(function(){
+ var li = $(this);
+ var link =li.find("a");
+ var href = link.prop("href");
+ var hrefId = href.split("#");
+ if(hrefId[1] == idVal){
+ link.trigger("click");
+ }
+ });
+}
+
+function deleteOrRenameTab(idVal) {
+ $("#filter-tabs-dialog").dialog( "close" );
+ var ul = $("#workspace-tabs");
+ ul.children().each(function(){
+ var li = $(this);
+ var link =li.find("a");
+ var href = link.prop("href");
+ var hrefId = href.split("#");
+ if(hrefId[1] == idVal){
+ link.trigger("click");
+ link.trigger("dblclick");
+ }
+ });
+}
+
+function deleteSelectedTab(idVal,title,_module,rpc,version){
+ var dgInfo = "<div><table width='100%' border='1'><tr style='background-color:#65a9d7;color:white;' ><th>Tab Title</th><th>Module</th><th>RPC</th><th>Version</th></tr><tr style='background-color:white'><td>" + title + "</td><td>" + _module +"</td><td>" + rpc + "</td><td>" +version + "</td></tr></table></div><br>";
+ var alertMsg = dgInfo + "<p>Are you sure you want to Delete this Tab ?</p>";
+
+$( "#tabAlertDialog" ).dialog({
+ dialogClass: "no-close",
+ modal:true,
+ draggable : true,
+ /*dialogClass: "alert",*/
+ title: "Confirm Tab sheet Delete",
+ width: 600,
+ buttons: [
+ {
+ text: "Delete",
+ class:"alertDialogButton",
+ click: function() {
+ var ws = RED.nodes.workspace(idVal);
+ RED.view.removeWorkspace(ws);
+ var historyEvent = RED.nodes.removeWorkspace(idVal);
+ historyEvent.t = 'delete';
+ historyEvent.dirty = true;
+ historyEvent.workspaces = [ws];
+ RED.history.push(historyEvent);
+ RED.view.dirty(true);
+ $( this ).dialog( "close" );
+ $("#filter-tabs-dialog").dialog( "close" );
+ $("#btn-manage-tabs").trigger("click");
+ }
+ },
+ {
+ text: "Cancel",
+ class:"alertDialogButton",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ]
+}).html(alertMsg);
+}
+
+function renameSelectedTab(idVal,title,_module,rpc,version){
+ var dgInfo = "<div><table width='100%' border='1'><tr style='background-color:#65a9d7;color:white;' ><th>Tab Title</th><th>Module</th><th>RPC</th><th>Version</th></tr><tr style='background-color:white'><td><input id='tab-name-" + idVal + "' type='text' value='" + title + "'></td><td>" + _module +"</td><td>" + rpc + "</td><td>" +version + "</td></tr></table></div><br>";
+ var alertMsg = dgInfo + "<p>Change the title and click Rename.</p>";
+
+$( "#tabAlertDialog" ).dialog({
+ dialogClass: "no-close",
+ modal:true,
+ draggable : true,
+ /*dialogClass: "alert",*/
+ title: "Rename Tab sheet",
+ width: 600,
+ buttons: [
+ {
+ text: "Rename",
+ class:"alertDialogButton",
+ click: function() {
+ var ws = RED.nodes.workspace(idVal);
+ var label = document.getElementById("tab-name-" + idVal).value;
+ //console.log("label:" +label);
+ //console.log("ws.label:" + ws.label);
+ if (ws.label != label) {
+ ws.label = label;
+ var link = $("#workspace-tabs a[href='#"+idVal+"']");
+ link.attr("title",label);
+ link.text(label);
+ RED.view.dirty(true);
+ }
+ $("#tabAlertDialog").dialog('destroy').remove();
+ //$(this).dialog( "close" );
+ $("#filter-tabs-dialog").dialog( "close" );
+ $("#btn-manage-tabs").trigger("click");
+ }
+ },
+ {
+ text: "Cancel",
+ class:"alertDialogButton",
+ click: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ ]
+}).html(alertMsg);
+}
+
+function performGitStatus(){
+ $("#responseId").text("");
+ if(!event) event = window.event;
+ var target = $(event.target);
+ target.val("Processing");
+ target.css({ "background-image": "url('images/page-loading.gif')" });
+ target.css({ "background-repeat": "no-repeat" });
+ target.css({ "background-size": "25px 25px" });
+
+ var statusObj = document.getElementById("responseId");
+ var urlVal = "/gitstatus";
+ $.get(urlVal)
+ .done(function( data ) {
+ var output = data.output;
+ if(output != null){
+ output=output.replace(/\n/g,"<br>");
+ statusObj.innerHTML = output;
+ }
+ //statusObj.innerText = data.output;
+ })
+ .fail(function(err) {
+ statusObj.innerText = "Failed to do git status.";
+ })
+ .always(function() {
+ $("#responseId").show();
+ target.val("Status");
+ target.css({ "background-image": "none" });
+ });
+}
+
+function migrateNodes(jsonStr){
+ var nodes = JSON.parse(jsonStr);
+ nodes.forEach( function(node) {
+ if( node.xml != undefined && node.xml != null && node.xml.indexOf("<service-logic") != -1){
+ //console.log(node.xml);
+ var module="";
+ var version="";
+ module=getAttributeValue(node.xml,"module");
+ /*
+ var myRe = new RegExp("module=\"(.*)\" ", "m");
+ var myArray = myRe.exec(node.xml);
+ if(myArray != null && myArray[1] != null){
+ module=myArray[1];
+ }
+ myRe = new RegExp("version=\"(.*)\">", "m");
+ myArray = myRe.exec(node.xml);
+ if(myArray != null && myArray[1] != null){
+ version=myArray[1];
+ //console.dir(myArray);
+ }
+ */
+ version=getAttributeValue(node.xml,"version");
+ node.type="service-logic";
+ //node.category="DGEmain";
+ node.module=module;
+ node.version=version;
+ if(module != null && version != null){
+ node.name=module+ " " + version;
+ }
+ console.log("module=" + module);
+ console.log("version=" + version);
+ }else if( node.xml != undefined && node.xml != null && node.xml.indexOf("<method") != -1){
+ var rpc=getAttributeValue(node.xml,"rpc");
+ node.type="method";
+ if(rpc != null){
+ node.name=rpc;
+ }
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<outcome") != -1){
+ var uxml = node.xml.toUpperCase();
+ if(uxml.indexOf("FAILURE") != -1){
+ node.type="failure";
+ }else if(uxml.indexOf("SUCCESS") != -1){
+ node.type="success";
+ }else if(uxml.indexOf("TRUE") != -1){
+ node.type="outcomeTrue";
+ }else if(uxml.indexOf("FALSE") != -1){
+ node.type="outcomeFalse";
+ }else if(uxml.indexOf("ALREADY-ACTIVE") != -1){
+ node.type="already-active";
+ }else if(uxml.indexOf("NOT-FOUND") != -1){
+ node.type="not-found";
+ }else{
+ node.type="other";
+ }
+ }else if( node.xml != undefined &&node.xml != null && node.xml.indexOf("<return") != -1){
+ var uxml = node.xml.toUpperCase();
+ if(uxml.indexOf("FAILURE") != -1){
+ node.type="returnFailure";
+ }else if(uxml.indexOf("SUCCESS") != -1){
+ node.type="returnSuccess";
+ }
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<exists") != -1){
+ node.type="exists";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<block") != -1){
+ node.type="block";
+ var atomic=getAttributeValue(node.xml,"atomic");
+
+ if(atomic=='true'){
+ node.atomic="true";
+ node.name="block : atomic";
+ }else{
+ node.atomic="false";
+ node.name="block";
+ }
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<save") != -1){
+ node.type="save";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<switch") != -1){
+ node.type="switchNode";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<record") != -1){
+ node.type="record";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<call") != -1){
+ node.type="call";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<release") != -1){
+ node.type="release";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<set") != -1){
+ node.type="set";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<for") != -1){
+ node.type="for";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<is-available") != -1){
+ node.type="is-available";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<reserve") != -1){
+ node.type="reserve";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<get-resource") != -1){
+ node.type="get-resource";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<configure") != -1){
+ node.type="configure";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<delete") != -1){
+ node.type="delete";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<execute") != -1){
+ node.type="execute";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<notify") != -1){
+ node.type="notify";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<update") != -1){
+ node.type="update";
+ }
+ //console.dir(node);
+ });
+ return nodes;
+}
diff --git a/dgbuilder/public/util/js/dgeToXml.js.imp b/dgbuilder/public/util/js/dgeToXml.js.imp
new file mode 100644
index 0000000..199b1c6
--- /dev/null
+++ b/dgbuilder/public/util/js/dgeToXml.js.imp
@@ -0,0 +1,147 @@
+function getNodeToXml(){
+ var nodeSet=[];
+ var activeWorkspace=RED.view.getWorkspace();
+ RED.nodes.eachNode(function(n) {
+ if (n.z == activeWorkspace) {
+ nodeSet.push({n:n});
+ }
+ });
+
+ var exportableNodeSet = RED.nodes.createExportableNodeSet(nodeSet);
+ console.dir(exportableNodeSet);
+ console.log(JSON.stringify(exportableNodeSet));
+
+ function getDgStartNode(nodeList){
+ for(var i=0;i<nodeList.length;i++){
+ if(nodeList[i].type == 'dgstart'){
+ return nodeList[i];
+ }
+ }
+ return null;
+ }
+ function getNode(id){
+ for(var i=0;i<exportableNodeSet.length;i++){
+ if(exportableNodeSet[i].id == id){
+ return exportableNodeSet[i];
+ }
+ }
+ return null;
+ }
+
+ function getStartTag(node){
+ var startTag="";
+ var xmlStr="";
+ if(node != null && node.type != 'dgstart'){
+ xmlStr=node.xml;
+ var regex = /(<)([\w-]+)(.*)?/;
+ var match = regex.exec(xmlStr);
+ if(match != null){
+ if(match[1] != undefined && match[2] != undefined){
+ startTag = match[2];
+ }
+ }else{
+ console.log("startTag not found.");
+ }
+ }
+ return startTag;
+ }
+
+ var dgstartNode = getDgStartNode(exportableNodeSet);
+
+ var level=0;
+ var fullXmlStr="";
+
+ printXml(dgstartNode);
+
+
+ function printXml(node){
+ var xmlStr="";
+ var startTag = "";
+ if(node != null && node.type != 'dgstart'){
+ xmlStr=node.xml;
+ startTag = getStartTag(node);
+ if(level > 0){
+ var spacing = Array(level).join(" ");
+ xmlStr=xmlStr.replace(/\n/g,spacing);
+ fullXmlStr +=xmlStr;
+
+ console.log(xmlStr);
+ }else{
+ fullXmlStr +=xmlStr;
+ console.log(xmlStr);
+ }
+ }
+
+ //console.log("startTag:" + startTag);
+
+ var wiredNodes = [];
+ if(node != null && node.wires != null && node.wires[0] != null && node.wires[0] != undefined && node.wires[0].length >0 ){
+ wiredNodes=node.wires[0];
+ //sort based on y position
+ wiredNodes.sort(function(a, b){
+ return a.y-b.y;
+ });
+ }
+
+ for(var k=0;wiredNodes != null && k<wiredNodes.length;k++){
+ level++;
+ var nd = getNode(wiredNodes[k]);
+ printXml(nd);
+ }
+
+ //append end tag
+ if(startTag != ""){
+ if(level >0){
+ var spacing = Array(level).join(" ");
+ fullXmlStr += spacing + "</" + startTag + ">";
+ console.log(spacing + "</" + startTag + ">");
+ }else{
+ fullXmlStr += "</" + startTag + ">";
+ console.log("</" + startTag + ">");
+ }
+ }
+
+ if(level>0){
+ level=level-1;
+ }
+ console.log("endTag:" + startTag);
+ //console.log("xml:" + fullXmlStr);
+ }
+ console.log("fullXmlStr:" + fullXmlStr);
+
+ /*
+ for (var link in allLinks){
+ var nd = RED.nodes.node(link);
+ console.dir(nd);
+ var obj = RED.nodes.getNodeSet(RED.view.getWorkspace());
+ console.dir(obj);
+ }
+ */
+
+
+ //console.dir(RED.nodes.getAllFlowNodes());
+ //console.dir(RED.nodes.getType());
+ /*
+ console.dir(RED.nodes.nodes);
+ RED.nodes.nodes.forEach(function (node){
+ console.dir(node);
+ });
+ */
+
+ /*var map = {68: false, 69: false, 86: false};
+ $("#node-input-validate").keydown(function(e) {
+ if (e.keyCode in map) {
+ map[e.keyCode] = true;
+ if (map[68] && map[69] && map[86]) {
+ // FIRE EVENT
+ return "abcd";
+ }
+ }
+ }).keyup(function(e) {
+ if (e.keyCode in map) {
+ map[e.keyCode] = false;
+ }
+ });
+ */
+ return fullXmlStr;
+}
diff --git a/dgbuilder/public/util/js/jsonTool.js b/dgbuilder/public/util/js/jsonTool.js
new file mode 100644
index 0000000..f4d0de3
--- /dev/null
+++ b/dgbuilder/public/util/js/jsonTool.js
@@ -0,0 +1,67 @@
+var obj={};
+function dotToJson(str,value,obj){
+ //var objArr = path.split("."), part;
+ var objArr = str.split(".");
+ var prevStr;
+ var currObj;
+ var prevObj;
+ console.log(str);
+ for(var i=0;i<objArr.length -1;i++){
+ var subStr= objArr[i] ;
+ //console.log("subStr:" + subStr);
+ if(i==0 && obj[subStr] == undefined ){
+ obj[subStr] = {};
+ currObj= obj[subStr];
+ }else if(i==0 && obj[subStr] != undefined ){
+ currObj=obj[subStr];
+ //console.log("in gkjgjkg");
+ }else{
+ if(i == 1){
+ prevObj=obj[prevStr];
+ if(prevObj[subStr] == undefined){
+ prevObj[subStr] = {};
+ currObj = prevObj[subStr];
+ }else{
+ currObj = prevObj[subStr];
+ }
+ }else{
+ if(prevObj[subStr] == undefined){
+ prevObj[subStr] = {};
+ currObj = prevObj[subStr];
+ }else{
+ currObj = prevObj[subStr];
+ }
+ }
+ //console.dir(currObj);
+ }
+ prevStr=subStr;
+ if(i <objArr.length-2){
+ prevObj=currObj;
+ }
+ }
+ var lastStr = objArr[objArr.length-1];
+ currObj[lastStr] = value;
+ //prevObj[lastStr] = value;
+ //console.dir(currObj);
+ return obj;
+}
+n=dotToJson('abcfdfghdghdghdghdhdhd.efhfjhfjhfjhfjhfjhfjhfbg.hfjhfjhfjhfjhfjhfjh.l',"1234",obj);
+//console.dir(n);
+JSON.stringify(n,undefined,2);
+m=dotToJson('abc.ebg.h.n',"5678",n);
+console.dir(m);
+function printObj(obj){
+for( j in obj){
+ console.log(j + ":" + obj[j]);
+ if(typeof obj[j] == "object" ){
+ printObj(obj[j]);
+ }
+
+}
+}
+printObj(m);
+a=JSON.parse(JSON.stringify(m,null,2));
+console.dir(a);
+
+
+//console.log (stringToObj('abc.ebg.h',"",{}));
diff --git a/dgbuilder/public/util/js/migrateFlow.js b/dgbuilder/public/util/js/migrateFlow.js
new file mode 100644
index 0000000..399db60
--- /dev/null
+++ b/dgbuilder/public/util/js/migrateFlow.js
@@ -0,0 +1,184 @@
+fs=require('fs');
+_=require('lodash');
+//extras=require("/home/users/schinthakayala/nodered/sheshi/dgxml/extras");
+//puts=extras.puts;
+var path = require('path');
+var appDir = path.dirname(require.main.filename);
+
+var dgjson = [];
+var level = 0;
+
+function getJSON() {
+var filename = process.argv[2];
+ console.log("reading json from flows file" + filename);
+ //flowsJson=fs.readFileSync(appDir + "/flows_ss4nj01dev01.localdomain.json").toString();
+ flowsJson=fs.readFileSync(filename).toString();
+ // Let's make a backup while we're here...
+ ts=Date.now().toString();
+ flows=JSON.parse(flowsJson);
+ //console.log("returning flows");
+ return(flows);
+}
+
+function getStartTag(xmlStr){
+ var startTag= null ;
+ if(xmlStr != null){
+ xmlStr = xmlStr.trim();
+ }
+ try{
+ var regex = new RegExp("(<)([^ >]+)");
+ var match = regex.exec(xmlStr);
+ if(match != null){
+ if(match[1] != undefined && match[2] != undefined){
+ startTag = match[2];
+ }
+ }
+ }catch(e){
+ console.log(e);
+ }
+ return startTag;
+
+}
+
+function getAttributeValue(xmlStr,attribute){
+ var attrVal=null;
+ try{
+ var myRe = new RegExp(attribute + "=['\"](.*)['\"] ","m");
+ var myArray = myRe.exec(xmlStr);
+ if(myArray != null && myArray[1] != null){
+ attrVal=myArray[1];
+ }
+ }catch(err){
+ console.log(err);
+ }
+ return attrVal;
+}
+
+function processNodes(){
+ var nodes = getJSON();
+ //console.dir(nodes);
+
+ nodes.forEach( function(node) {
+ if( node.xml != null && node.xml.indexOf("<service-logic") != -1){
+ //console.log(node.xml);
+ var module="";
+ var version="";
+ module=getAttributeValue(node.xml,"module");
+ /*
+ var myRe = new RegExp("module=\"(.*)\" ", "m");
+ var myArray = myRe.exec(node.xml);
+ if(myArray != null && myArray[1] != null){
+ module=myArray[1];
+ }
+ myRe = new RegExp("version=\"(.*)\">", "m");
+ myArray = myRe.exec(node.xml);
+ if(myArray != null && myArray[1] != null){
+ version=myArray[1];
+ //console.dir(myArray);
+ }
+ */
+ version=getAttributeValue(node.xml,"version");
+ node.type="service-logic";
+ //node.category="DGEmain";
+ node.module=module;
+ node.version=version;
+ if(module != null && version != null){
+ node.name=module+ "_" + version;
+ }
+ console.log("module=" + module);
+ console.log("version=" + version);
+ }else if( node.xml != null && node.xml.indexOf("<method") != -1){
+ var rpc=getAttributeValue(node.xml,"rpc");
+ node.type="method";
+ if(rpc != null){
+ node.name=rpc;
+ }
+ }else if( node.xml != null && node.xml.indexOf("<outcome") != -1){
+ var uxml = node.xml.toUpperCase();
+ if(uxml.indexOf("FAILURE") != -1){
+ node.type="failure";
+ }else if(uxml.indexOf("SUCCESS") != -1){
+ node.type="success";
+ }else if(uxml.indexOf("TRUE") != -1){
+ node.type="outcomeTrue";
+ }else if(uxml.indexOf("FALSE") != -1){
+ node.type="outcomeFalse";
+ }else if(uxml.indexOf("ALREADY-ACTIVE") != -1){
+ node.type="already-active";
+ }else if(uxml.indexOf("NOT-FOUND") != -1){
+ node.type="not-found";
+ }else{
+ node.type="other";
+ }
+ }else if( node.xml != null && node.xml.indexOf("<return") != -1){
+ var uxml = node.xml.toUpperCase();
+ if(uxml.indexOf("FAILURE") != -1){
+ node.type="returnFailure";
+ }else if(uxml.indexOf("SUCCESS") != -1){
+ node.type="returnSuccess";
+ }
+ }else if( node.xml != null && node.xml.indexOf("<exists") != -1){
+ node.type="exists";
+ }else if( node.xml != null && node.xml.indexOf("<block") != -1){
+ node.type="block";
+ var atomic=getAttributeValue(node.xml,"atomic");
+
+ if(atomic=='true'){
+ node.atomic="true";
+ node.name="block : atomic";
+ }else{
+ node.atomic="false";
+ node.name="block";
+ }
+ }else if( node.xml != null && node.xml.indexOf("<save") != -1){
+ node.type="save";
+ }else if( node.xml != null && node.xml.indexOf("<switch") != -1){
+ node.type="switchNode";
+ }else if( node.xml != null && node.xml.indexOf("<record") != -1){
+ node.type="record";
+ }else if( node.xml != null && node.xml.indexOf("<call") != -1){
+ node.type="call";
+ }else if( node.xml != null && node.xml.indexOf("<release") != -1){
+ node.type="release";
+ }else if( node.xml != null && node.xml.indexOf("<set") != -1){
+ node.type="set";
+ }else if( node.xml != null && node.xml.indexOf("<for") != -1){
+ node.type="for";
+ }else if( node.xml != null && node.xml.indexOf("<is-available") != -1){
+ node.type="is-available";
+ }else if( node.xml != null && node.xml.indexOf("<reserve") != -1){
+ node.type="reserve";
+ }else if( node.xml != null && node.xml.indexOf("<get-resource") != -1){
+ node.type="get-resource";
+ }else if( node.xml != null && node.xml.indexOf("<configure") != -1){
+ node.type="configure";
+ }else if( node.xml != null && node.xml.indexOf("<delete") != -1){
+ node.type="delete";
+ }else if( node.xml != null && node.xml.indexOf("<execute") != -1){
+ node.type="execute";
+ }
+ //console.dir(node);
+ });
+/*
+ var moduleName = "service-logic";
+ var methodName = "method";
+ for(var i=0;nodes != null && i<nodes.length;i++){
+ if(nodes[i].type == "service-logic"){
+ moduleName = nodes[i].name;
+ }
+ if(nodes[i].type == "method"){
+ methodName = nodes[i].name;
+ }
+ }
+ var fName = moduleName + "_" + methodName + ".json";
+ fName = fName.replace(/\s/g, "_");
+
+ var newFilename = process.argv[3];
+ var filename = newFilename + "/" + fName;
+ console.log("filename" + filename);
+ fs.writeFileSync(filename, JSON.stringify(nodes,null,4));
+ */
+}
+
+
+processNodes();
diff --git a/dgbuilder/public/util/js/sliValues.js b/dgbuilder/public/util/js/sliValues.js
new file mode 100644
index 0000000..eae1060
--- /dev/null
+++ b/dgbuilder/public/util/js/sliValues.js
@@ -0,0 +1,763 @@
+var global_editor ;
+function addParam(idVal){
+ //console.log(val);
+ //console.log(global_editor.getText());
+ if(global_added_obj["a" + idVal] != undefined && global_added_obj["a" + idVal] != null){
+ global_added_obj["a" + idVal]= global_added_obj["a" + idVal]+1;
+ $("#addCnt" + + idVal).text("added " + global_added_obj["a" + idVal] + " times");
+ }else{
+ global_added_obj["a" + idVal]= 1;
+ $("#addCnt" + + idVal).text("added " + global_added_obj["a" + idVal] + " time");
+ }
+ var nameVal = document.getElementById("a" + idVal).value;
+ var valueBoxVal = document.getElementById("valbox" + idVal).value;
+ //$("#btn" + idVal).val('Added');
+ //$("#btn" + idVal).attr('disabled','disabled');
+ //console.dir(nameVal);
+ //console.dir(valueBoxVal);
+
+
+ var paramElement = "<parameter name='" + nameVal + "' value='" + valueBoxVal + "'/>\n";
+ global_editor.setText(global_editor.getText() + paramElement);
+}
+
+var g_currValuesObj={};
+
+function filterValues(filterVal){
+ global_added_obj={};
+ var matchedCnt =0;
+ var valuesObj = g_currValuesObj;
+ var newValuesObj ={};
+ var searchValues =[];
+ if(filterVal != null && filterVal != undefined){
+ filterVal=filterVal.trim();
+ }
+ searchValues = filterVal.split(/ /);
+ //console.log("filterVal:" + filterVal);
+ if(searchValues != null && searchValues != undefined){
+ for (var key in valuesObj) {
+ if (valuesObj.hasOwnProperty(key)) {
+ var newArrObj = [];
+ if(Array.isArray(valuesObj[key])){
+ var arrObj=valuesObj[key];
+ var cnt=1;
+ for(var i=0;i<arrObj.length;i++){
+ var foundCount = 0;
+ for(var k=0;k<searchValues.length;k++){
+ if(arrObj[i].indexOf(searchValues[k]) != -1){
+ foundCount++;
+ }
+ }
+ if(foundCount == searchValues.length){
+ matchedCnt++;
+ newArrObj.push(arrObj[i]);
+ }
+ }
+ newValuesObj[key] = newArrObj;
+ }
+ }
+ }
+ $("#matchedCntId").html(matchedCnt);
+ }else{
+ newValuesObj = valuesObj;
+ }
+ var valuesHtml=buildValuesHtml(newValuesObj);
+ valuesHtml+="</div>";
+ $("#sli-values-div").html(valuesHtml);
+}
+
+function buildValuesHtml(valuesObj){
+ var idCounter=0;
+ var htmlVal = "";
+
+ for (var key in valuesObj) {
+ if (valuesObj.hasOwnProperty(key)) {
+ var v = "<div style='font-weight:bold;font-size:1.0em;'><label>" + key + "<b/label>";
+ if(Array.isArray(valuesObj[key])){
+ var arrObj=valuesObj[key];
+ var cnt=1;
+ for(var i=0;i<arrObj.length;i++){
+ var idVal = idCounter++;
+ var addBtn = "<input id='btn" + idVal + "' type='button' style='background-color:#D6EBFF;' value='Add as Parameter'" + "onclick='addParam(\"" + idVal + "\")'><div style='float:right' id='addCnt" + idVal + "'></div>";
+ var variableBox = "";
+ var valBox = "<input id='valbox" + idVal + "' type='text' style='width:500px;height:30px;' value=''>";
+ if(arrObj[i] != undefined && arrObj[i].length <150){
+ //v += "<div style='width:1150px;background:aliceblue;border-color:aliceblue' class='valueBoxDiv' id='valueBoxDiv" + idVal + "'>" + "<input style='width:1125px;background:rgb(223, 191, 191);color:rgb(32, 45, 87);' type='text' readonly='1' id='a" + idVal + "' onclick='selectText(\"" + idVal+"\",\"" + key + "\")' value='" +arrObj[i] + "' title='" + arrObj[i] + "' >" ;
+ v += "<div style='width:1150px;background:aliceblue;border-color:aliceblue' class='valueBoxDiv' id='valueBoxDiv" + idVal + "'>" + "<input style='width:1125px;background:aliceblue;color:rgb(32, 45, 87);' type='text' readonly='1' id='a" + idVal + "' onclick='selectText(\"" + idVal+"\",\"" + key + "\")' value='" +arrObj[i] + "' title='" + arrObj[i] + "' >" ;
+ variableBox = "<input style='width:1125px' id='variableBox" + idVal + "' type='text' value='`$" + arrObj[i] + "`'>";
+ }else{
+ v+= "<div style='width:1150px;background:aliceblue;border-color:aliceblue' class='valueBoxDiv' id='valueBoxDiv" + idVal + "'>" + "<textarea style='width:1125px;background:aliceblue;color:rgb(32, 45, 87);' readonly='1' id='a" + idVal + "' onclick='selectText(\"" + idVal+"\",\"" + key + "\")' title='" + arrObj[i] + "' >" + arrObj[i] + "</textarea>";
+ variableBox = "<textarea style='width:1125px' id='variableBox" + idVal + "' >`$" + arrObj[i] + "`'</textarea>";
+ }
+ v += "<div id='valAddDiv" + idVal + "' style='display:none;'>" + valBox + " " + addBtn + "</div>" +
+ "<div id='variableBoxDiv" + idVal + "' style='display:none;color:rgb(32, 45, 87);'>Display as a variable<br>" + variableBox + "</div>" + "</div>";
+ cnt++;
+ }
+ htmlVal+= v + "</div>";
+ }
+ }
+ }
+ return htmlVal;
+}
+
+function getModuleName(){
+ var activeWorkspace=RED.view.getWorkspace();
+ var moduleName="";
+ RED.nodes.eachNode(function(n) {
+ if (n.z == activeWorkspace) {
+ if(n.type == 'service-logic'){
+ //console.log("getModuleName():<" + n.module + ">");
+ moduleName=n.module;
+ }
+ }
+ });
+ return moduleName;
+}
+var global_added_obj={};
+var displayingRpcs = false;
+function showRpcsValuesBox(editor,valuesObj){
+ displayingRpcs = true;
+ showValuesBox(editor,valuesObj);
+}
+
+function showValuesBox(editor,valuesObj){
+ var moduleName = getModuleName();
+ var obj = valuesObj[moduleName];
+ //console.dir(valuesObj);
+ //console.dir(obj);
+ var moduleObj ={};
+ if(obj == undefined){
+ moduleObj[moduleName] = ["No SLI values setup for this module " + moduleName + ".Upload the yang file for this module or if already uploaded ,load it from the Available Modules from the Menu."];
+ }else{
+ moduleObj[moduleName] = obj;
+ }
+ showValuesBoxForModule(editor,moduleObj,moduleName);
+}
+
+function showValuesBoxForModule(editor,valuesObj,moduleName){
+ global_editor=editor;
+ g_currValuesObj = valuesObj;
+ //console.log(editor.getText());
+ //populate the valid SLI values
+ var valuesHtml="<style>.color-dialog {background:aliceblue;border-color:lightgrey;border-width:3px;border-style:solid; }</style><div style='float:left;width:1200px;background:aliceblue'><input style='width:1125px' id='filter-id' type='text' value='' placeholder='To filter the values type words seperated by space in this box' onkeyup='filterValues(this.value)'></div><div style='float:left;color:green;font-size:0.8em' id='matchedCntId'></div><div style='clear:both'></div><div id='sli-values-div' style='width:1200px;'>" ;
+ valuesHtml+=buildValuesHtml(valuesObj);
+ valuesHtml+="</div>";
+ global_added_obj={};
+
+
+ var title = "SLI Values for Module " + moduleName;
+ if(displayingRpcs){
+ title = "RPCs for Module " + moduleName;
+ }
+ $('#sli-values-dialog').dialog({
+ modal: false,
+ title: title,
+ width: 1200,
+ height: 500,
+ dialogClass: 'color-dialog',
+ open: function () {
+ $("#sli-values-dialog").dialog("widget").find(".ui-dialog-buttonpane").css({'background': 'aliceblue'});
+ $(this).html(valuesHtml);
+ },
+ buttons: {
+ Close: function () {
+ displayingRpcs = false;
+ //$(this).dialog("close");
+ $(this).dialog("destroy");
+ }
+ },
+ close: function(ev,ui){
+ displayingRpcs = false;
+ $(this).dialog("destroy");
+ }
+ }); // end dialog div
+}
+
+function showCommentsBox(){
+ var comments = $("#node-input-comments").val();
+ var commentsBoxHtml="<div><textarea style='font-size:18px;height:150px;width:390px;' id='taCommentId'>" + comments + "</textarea></div>" ;
+
+ var nodeName=$("#node-input-name").val();
+ $('#comments-dialog').dialog({
+ modal: true,
+ title: "Add comments for Node " + nodeName,
+ width: 450,
+ height: 300,
+ /*
+ open: function () {
+ $(this).html(commentsBoxHtml);
+ },
+ */
+ buttons: {
+ "Save Comments": function () {
+ var v=$("#taCommentId").val();
+ if(v != null){
+ v = v.trim();
+ if(v != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }else{
+ $("#node-input-btnComments").html("<b>Add Comments</b>");
+ }
+ }
+ //console.log("value from text area" + v);
+ $("#node-input-comments").val(v);
+ $(this).dialog("close");
+ //$(this).dialog("destroy");
+ },
+ Cancel: function () {
+ var v=$("#taCommentId").val();
+ if(v != null){
+ v = v.trim();
+ if(v != ''){
+ $("#node-input-btnComments").html("<span style='color:blue;'><b>View Comments</b></span>");
+ }else{
+ $("#node-input-btnComments").html("<b>Add Comments</b>");
+ }
+ }
+ $(this).dialog("close");
+ //$(this).dialog("destroy");
+ }
+ },
+ close: function(ev,ui){
+ //console.log("closing..");
+ $(this).dialog("destroy");
+ }
+ }).html(commentsBoxHtml);
+
+ //console.log("done");
+/*
+ function functionDialogResize(ev,ui) {
+ console.log("ui.size.height:" + ui.size.height);
+ $(this).css("height",(ui.size.height-275)+"px");
+ };
+
+ $( this ).on("dialogresize", functionDialogResize);
+
+
+ $( this ).one("dialogopen", function(ev) {
+ var size = $( "#sliValDiv" ).dialog('option','sizeCache-function');
+ if (size) {
+ functionDialogResize(null,{size:size});
+ }
+ });
+*/
+
+}
+
+function selectText(objId,groupVal){
+ //console.log(objId + groupVal);
+ //console.log(objId + groupVal);
+ $(document).ready(function(){
+ //console.log("doc ready");
+ //console.dir($('#valAddDiv' + objId));
+ if ($('#valAddDiv' + objId).is(":visible")) {
+ $("#variableBoxDiv" + objId ).hide("slow");
+ //$("#a" + objId ).css({"background": "rgb(223, 191, 191)",
+ // "color": "rgb(32, 45, 87)"});
+ $("#a" + objId ).css({"background": "aliceblue",
+ "color": "rgb(32, 45, 87)"});
+ /*"color": "rgb(32, 45, 87)"});*/
+ $("#valAddDiv" + objId ).hide("slow");
+ $("#valueBoxDiv" +objId).css({"border-color": "aliceblue",
+ "border-width":"1px",
+ "background-color":"aliceblue",
+ "border-style":"solid"});
+ //$("#valAddDiv" + objId ).fadeOut("slow");
+ } else{
+ $("#variableBoxDiv" + objId ).show("slow");
+ $("#valAddDiv" + objId).show("slow");
+ /*$("#valueBoxDiv" +objId).css({"border-color": "rgb(75, 111, 147)",
+ "border-width":"5px",
+ "background-color": "rgb(223, 191, 191)",
+ "border-style":"solid",
+ "border-bottom": "5px solid rgb(75, 111, 147)"});
+ */
+ $("#valueBoxDiv" +objId).css({"border-color": "rgb(75, 111, 147)",
+ "border-width":"3px",
+ "background-color": "aliceblue",
+ "border-style":"solid",
+ "border-bottom": "3px solid rgb(75, 111, 147)"});
+ /*$("#a" + objId ).css({"background": "rgb(223, 191, 191)",
+ "color": "rgb(75, 111, 147)"});
+ */
+ $("#a" + objId ).css({"background": "aliceblue",
+ "color": "rgb(75, 111, 147)"});
+ }
+ $("#a" + objId).select();
+ });
+ //console.log("group-heading" + objId);
+// var obj= document.getElementById("group-heading" + objId);
+// obj.innerText = groupVal;
+// obj.style.color = "blue";
+// console.dir(obj);
+}
+
+function hidePrevGroup(objId){
+// console.log("mouseout" );
+// var obj= document.getElementById("group-heading" + objId);
+// obj.innerText = "";
+}
+/*
+function fixDiv() {
+ var $cache = $('#getFixed');
+ if ($(window).scrollTop() > 100)
+ $cache.css({
+ 'position': 'fixed',
+ 'top': '10px'
+ });
+ else
+ $cache.css({
+ 'position': 'relative',
+ 'top': 'auto'
+ });
+ }
+
+$(window).scroll(fixDiv);
+
+function isScrolledIntoView(elem)
+{
+ var $elem = $(elem);
+ var $window = $(window);
+
+ var docViewTop = $window.scrollTop();
+ var docViewBottom = docViewTop + $window.height();
+
+ var elemTop = $elem.offset().top;
+ var elemBottom = elemTop + $elem.height();
+
+ return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
+}
+*/
+
+function getCommits(filePath){
+var urlPath="/getCommitsInfo";
+$.get(urlPath,{"filePath" : filePath })
+ .done(function( data ) {
+ if(data != undefined && data != null){
+ //console.log(data.stdout);
+ var jsonObj = JSON.parse(data.stdout);
+ var codeCloudFilesHtmlStr = $( "#codecloud-browser-dialog" ).html();
+ var htmlStr = getCCFileHtmlStr(filePath,jsonObj,codeCloudFilesHtmlStr);
+ $( "#codecloud-browser-dialog" ).html(htmlStr);
+ /*
+ for(var i=0;i<jsonObj.length;i++){
+ console.log("commit:" + jsonObj[i].commit);
+ console.log("date:" + jsonObj[i].date);
+ console.log("author:" + jsonObj[i].author);
+ console.log("comment:" + jsonObj[i].comment);
+ }
+ */
+ }
+ })
+ .fail(function(err) {
+ })
+ .always(function() {
+ });
+}
+
+
+function getCCFileHtmlStr(filePath,rows,codeCloudFilesHtmlStr){
+ var styleStr = "<style> " +
+ "table#cct01 { width:100%; } \n" +
+ "table#cct01 th,table#cct01 td { border: 1px solid black; border-collapse: collapse; } \n" +
+ "table#cct01 th,table#cct01 td { padding: 5px; text-align: left; } \n" +
+ "table#cct01 tr:nth-child(even) { background-color: #eee; }\n" +
+ "table#cct01 tr:nth-child(odd) { background-color:#fff; }\n" +
+ "table#cct01 th { background-color: #65a9d7; color: white; }\n" +
+ "table#cct01 a { color: #337ab7; }\n" +
+ "table#cct01 a:link { color: #65a9d7; }\n" +
+ "table#cct01 a:visited { color: #636; }\n" +
+ "table#cct01 a:hover { color: #3366CC; cursor: pointer }\n" +
+ "table#cct01 a:active { color: #65a9d7 }\n" +
+ "table#cct01 caption { display: table-caption; text-align: center; background: #eee; font-weight: bold; font-size: 1.1em; border: 1px solid black; }\n" +
+ "</style>";
+ var htmlStr="";
+ //console.dir(rows);
+ if(rows != null && rows.length >0){
+ var alertDialog = '<div id="ccAlertdialog"></div>';
+ htmlStr= alertDialog + "<div style='width:1050;height:650'>" + styleStr;
+ htmlStr += "<table id='cct01' >";
+ htmlStr += "<caption id='ccCaptionId'>" + filePath + "</caption>";
+ htmlStr += "<tr>";
+ htmlStr += "<th>Commit ID</th>" ;
+ htmlStr += "<th>Date</th>" ;
+ htmlStr += "<th>Author</th>" ;
+ htmlStr += "<th>Comment</th>" ;
+ htmlStr += "</tr>";
+ if(rows != null && rows.length == 0){
+ htmlStr += "<tr>";
+ htmlStr += "<td><b>No rows found</b></td>";
+ htmlStr += "</tr></table></div>";
+ return htmlStr;
+ }
+ for(var i=0;i<rows.length;i++){
+ var row = rows[i];
+ var _commitId = row.commit;
+ var dt = row.date;
+ var author = row.author;
+ var comment = row.comment;
+ htmlStr += "<tr>";
+ htmlStr += "<td><a onclick=\"javascript:importCCFlow('" + _commitId + "','" + filePath + "')\">" + _commitId + "</a></td>";
+ htmlStr += "<td>" + dt + "</td>";
+ htmlStr += "<td>" + author + "</td>";
+ htmlStr += "<td>" + comment + "</td>";
+ htmlStr += "</tr>";
+ }
+ htmlStr += "</table>";
+ htmlStr += "</div>";
+ }
+ //console.log(htmlStr);
+ return htmlStr;
+}
+
+
+var gitLocalFlowFiles=[];
+function filterGitLocalFlows(filterVal){
+
+ var matchedCnt =0;
+ var valuesObj = gitLocalFlowFiles;
+ //console.dir(codeCloudFlowFiles);
+ var updatedValuesObj =[];
+ var searchValues =[];
+ if(filterVal != null && filterVal != undefined){
+ filterVal=filterVal.trim();
+ }
+ searchValues = filterVal.split(/ /);
+ //console.log("filterVal:" + filterVal);
+ //console.dir(searchValues);
+ if(searchValues != null && searchValues != undefined){
+ var foundCount = 0;
+ for(var k=0;k<searchValues.length;k++){
+ if(foundCount >0){
+ valuesObj=updatedValuesObj;
+ }
+ updatedValuesObj=[];
+ for(var i=0;i<valuesObj.length;i++){
+ var patt = new RegExp(searchValues[k],"gi");
+ if(patt.test(valuesObj[i])){
+ foundCount++;
+ updatedValuesObj.push(valuesObj[i]);
+ }
+ }
+ }
+ }else{
+ updatedValuesObj = valuesObj;
+ }
+ //console.dir(updatedValuesObj);
+ var html="<ul>";
+ if(updatedValuesObj != null){
+ var files=updatedValuesObj;
+ //console.dir(files);
+ files.sort(function (a,b){
+ if(a > b){
+ return 1;
+ }else if(a < b){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ for(var i=0;files != null && i<files.length;i++){
+ html+="<li><a href=\"#\" onclick=\"importGitLocalFlow('" + files[i] + "')\">" + files[i] + "</a></li>";
+ }
+ }
+ html+="</ul>";
+ html+="</div>";
+ $( "#gitlocal-data-container" ).html(html);
+}
+
+var codeCloudFlowFiles=[];
+function filterFlows(filterVal){
+
+ var matchedCnt =0;
+ var valuesObj = codeCloudFlowFiles;
+ //console.dir(codeCloudFlowFiles);
+ var updatedValuesObj =[];
+ var searchValues =[];
+ if(filterVal != null && filterVal != undefined){
+ filterVal=filterVal.trim();
+ }
+ searchValues = filterVal.split(/ /);
+ //console.log("filterVal:" + filterVal);
+ //console.dir(searchValues);
+ if(searchValues != null && searchValues != undefined){
+ var foundCount = 0;
+ for(var k=0;k<searchValues.length;k++){
+ for(var i=0;i<valuesObj.length;i++){
+ var patt = new RegExp(searchValues[k],"gi");
+ if(patt.test(valuesObj[i])){
+ foundCount++;
+ updatedValuesObj.push(valuesObj[i]);
+ }
+ }
+ }
+ }else{
+ updatedValuesObj = valuesObj;
+ }
+ //console.dir(updatedValuesObj);
+ var html="<ul>";
+ if(updatedValuesObj != null){
+ var files=updatedValuesObj;
+ //console.dir(files);
+ files.sort(function (a,b){
+ if(a > b){
+ return 1;
+ }else if(a < b){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ for(var i=0;files != null && i<files.length;i++){
+ html+="<li><a href=\"#\" onclick=\"getCommits('" + files[i] + "')\">" + files[i] + "</a></li>";
+ }
+ }
+ html+="</ul>";
+ html+="</div>";
+ $( "#codecloud-data-container" ).html(html);
+}
+
+var yangFilesList=[];
+/*
+function filterYangFiles(filterVal){
+
+ var matchedCnt =0;
+ var valuesObj = yangFilesList;
+ var updatedValuesObj =[];
+ var searchValues =[];
+ if(filterVal != null && filterVal != undefined){
+ filterVal=filterVal.trim();
+ }
+ searchValues = filterVal.split(/ /);
+ if(searchValues != null && searchValues != undefined){
+ var foundCount = 0;
+ for(var k=0;k<searchValues.length;k++){
+ for(var i=0;i<valuesObj.length;i++){
+ var patt = new RegExp(searchValues[k],"gi");
+ if(patt.test(valuesObj[i])){
+ foundCount++;
+ updatedValuesObj.push(valuesObj[i]);
+ }
+ }
+ }
+ }else{
+ updatedValuesObj = valuesObj;
+ }
+ //console.dir(updatedValuesObj);
+ var html="<ul>";
+ if(updatedValuesObj != null){
+ var files=updatedValuesObj;
+ //console.dir(files);
+ files.sort(function (a,b){
+ if(a > b){
+ return 1;
+ }else if(a < b){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ for(var i=0;files != null && i<files.length;i++){
+ html+="<li><a href=\"#\" onclick=\"getYangFile('" + files[i] + "')\">" + files[i] + "</a></li>";
+ }
+ }
+ html+="</ul>";
+ html+="</div>";
+ $( "#list-yang-data-container" ).html(html);
+}
+*/
+
+function filterYangFiles(filterVal){
+ var matchedCnt =0;
+ var valuesObj = yangFilesList;
+ var updatedValuesObj =[];
+ var searchValues =[];
+ if(filterVal != null && filterVal != undefined){
+ filterVal=filterVal.trim();
+ }
+ searchValues = filterVal.split(/ /);
+ if(searchValues != null && searchValues != undefined){
+ var foundCount = 0;
+ for(var k=0;k<searchValues.length;k++){
+ for(var i=0;i<valuesObj.length;i++){
+ var patt = new RegExp(searchValues[k],"gi");
+ if(patt.test(valuesObj[i])){
+ foundCount++;
+ updatedValuesObj.push(valuesObj[i]);
+ }
+ }
+ }
+ }else{
+ updatedValuesObj = valuesObj;
+ }
+ //console.dir(updatedValuesObj);
+ var html="<table id='yang-file-list-table' border=1>";
+ html+="<tr>";
+ html+="<th>File</th>";
+ html+="<th>Delete</th>";
+ html+="</tr>";
+
+ if(updatedValuesObj != null){
+ var files=updatedValuesObj;
+ //console.dir(files);
+ files.sort(function (a,b){
+ if(a > b){
+ return 1;
+ }else if(a < b){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ for(var i=0;files != null && i<files.length;i++){
+ html+="<tr><td><a href=\"#\" onclick=\"getYangFile('" + files[i] + "')\">" + files[i] + "</a></td><td>" + "<input type='button' onclick='deleteYangFile(\"" + files[i] + "\")' value='Delete'></td></td></td></tr>";
+ }
+ }
+ html+="</table>";
+ html+="</div>";
+
+ $( "#yang-files-data-container" ).html(html);
+}
+
+function getYangFile(fileName){
+ $("#dwnldYangFormId").remove();
+ //using form to submit
+ var form = $('<form id="dwnldYangFormId" method="POST" action="/downloadYang"></form>');
+ form.append('<input type="hidden" name="fileName" value="' + fileName + '"/>');
+ form.appendTo('body');
+ $("#dwnldYangFormId").submit();
+
+}
+function deleteYangFile(fileName){
+ var reqData= {"fileName":fileName};
+ $.post( "/deleteYangFile",reqData )
+ .done(function( data ) {
+ })
+ .fail(function(err) {
+ console.log( "error" + err );
+ })
+ .always(function() {
+ $("#list-yang-browser-dialog").dialog("close");
+ $("#btn-list-yang-files").trigger("click");
+ });
+}
+
+function importCCFlow(commitId,filePath){
+var urlPath="/importCodeCloudFlow";
+$.get(urlPath,{"commitId" : commitId,"filePath" : filePath })
+ .done(function( data ) {
+ if(data != undefined && data != null){
+ //console.log(data.stdout);
+ var jsonObj = JSON.parse(data.stdout);
+ $( "#codecloud-browser-dialog" ).dialog("close");
+ RED.view.importNodes(JSON.stringify(jsonObj));
+ }
+ })
+ .fail(function(err) {
+ RED.notify("Could not import flow from code cloud.");
+ $( "#codecloud-browser-dialog").dialog("close");
+ console.log( "error occured importing flow.");
+ })
+ .always(function() {
+ });
+}
+
+function importGitLocalFlow(filePath){
+var urlPath="/importGitLocalFlow";
+$.get(urlPath,{"filePath" : filePath })
+ .done(function( data ) {
+ if(data != undefined && data != null){
+ //console.log(data.stdout);
+ var jsonObj;
+ try{
+ jsonObj = JSON.parse(data.stdout);
+ $( "#gitlocal-browser-dialog" ).dialog("close");
+ RED.view.importNodes(JSON.stringify(jsonObj));
+ }catch(err){
+ RED.notify("Could not import flow from Local Git Repository.");
+ $( "#gitlocal-browser-dialog").dialog("close");
+ console.log( "error occured importing flow." + err);
+ }
+ }else{
+ RED.notify("Could not import flow from Local Git Repository.");
+ $( "#gitlocal-browser-dialog").dialog("close");
+ console.log( "error occured importing flow." + err);
+ }
+ })
+ .fail(function(err) {
+ RED.notify("Could not import flow from Local Git Repository.");
+ $( "#gitlocal-browser-dialog").dialog("close");
+ console.log( "error occured importing flow.");
+ })
+ .always(function() {
+ });
+}
+
+var availableYangModules=[];
+function filterYangModules(filterVal){
+
+ var matchedCnt =0;
+ var valuesObj = availableYangModules ;
+ //console.dir(codeCloudFlowFiles);
+ var updatedValuesObj =[];
+ var searchValues =[];
+ if(filterVal != null && filterVal != undefined){
+ filterVal=filterVal.trim();
+ }
+ searchValues = filterVal.split(/ /);
+ //console.log("filterVal:" + filterVal);
+ //console.dir(searchValues);
+ if(searchValues != null && searchValues != undefined){
+ var foundCount = 0;
+ for(var k=0;k<searchValues.length;k++){
+ if(foundCount >0){
+ valuesObj=updatedValuesObj;
+ }
+ updatedValuesObj=[];
+ for(var i=0;i<valuesObj.length;i++){
+ var patt = new RegExp(searchValues[k],"gi");
+ if(patt.test(valuesObj[i])){
+ foundCount++;
+ updatedValuesObj.push(valuesObj[i]);
+ }
+ }
+ }
+ }else{
+ updatedValuesObj = valuesObj;
+ }
+ //console.dir(updatedValuesObj);
+ var html="";
+ html+="<table border=1>";
+ html+="<tr>";
+ html+="<th>#</th>";
+ html+="<th>Load</th>";
+ html+="<th>Module</th>";
+ html+="</tr>";
+
+ if(updatedValuesObj != null){
+ var files=updatedValuesObj;
+ //console.dir(files);
+ files.sort(function (a,b){
+ if(a > b){
+ return 1;
+ }else if(a < b){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ var count=1;
+ for(var i=0;files != null && i<files.length;i++){
+ var val = files[i].replace(/:.*/,"");
+ if(files[i].indexOf(":checked") != -1){
+ html+="<tr><td>" + count + "</td><td><input type='checkbox' checked value='" + val + "'></td><td>" + val + "</td></tr>";
+ }else{
+ html+="<tr><td>" + count + "</td><td><input type='checkbox' value='" + val + "'></td><td>" + val + "</td></tr>";
+ }
+ count++;
+ }
+ }
+ html+="</table>";
+ html+="</div>";
+ $( "#yang-modules-data-container" ).html(html);
+}
diff --git a/dgbuilder/public/util/js/validateNodeXml.js b/dgbuilder/public/util/js/validateNodeXml.js
new file mode 100644
index 0000000..2291d86
--- /dev/null
+++ b/dgbuilder/public/util/js/validateNodeXml.js
@@ -0,0 +1,325 @@
+function resetStatus(){
+ showMsg("","green");
+}
+
+function showMsg(msg,color){
+ $("#node-validate-result").html(msg);
+ $("#node-validate-result")
+ .css('color', '')
+ .css('color', color);
+}
+
+function getAttributeValue(xmlStr,attribute){
+
+ var attrVal=null;
+ try{
+ if(xmlStr != null){
+ var myRe = new RegExp(attribute + "[\s+]?=[\s+]?['\"]([^'\"]+)['\"]","m");
+ var myArray = myRe.exec(xmlStr);
+ if(myArray != null && myArray[1] != null){
+ attrVal=myArray[1];
+ }
+ }
+ }catch(err){
+ console.log(err);
+ }
+ return attrVal;
+}
+
+
+var resp = true;
+var processedNode = "";
+var errList=[];
+var elementCount=0;
+function processNode(xmlNode){
+ if(xmlNode == null) return;
+ if(xmlNode.nodeName != "parsererror" && xmlNode.nodeName != "#text"){
+ processedNode = xmlNode.nodeName;
+ }
+ //console.log("processedNode:" + processedNode);
+ switch(xmlNode.nodeType){
+ case 1:
+ elementCount++;
+ //ELEMENT_NODE
+ //console.log(xmlNode.nodeName);
+ //console.dir(xmlNode.nodeName);
+ if(xmlNode.nodeName == "parsererror"){
+ //var nearNode = xmlNode.previousSibling != null ?xmlNode.previousSibling.nodeName : xmlNode.parentNode.nodeName;
+ console.log("Error parsing xml after node " + processedNode);
+ var msg = "error parsing XML after element <" + processedNode + "> Element#" + elementCount;
+ errList.push(msg);
+ resp = false;
+ return;
+ }
+ processedNode = xmlNode.nodeName;
+ var attrs = xmlNode.attributes;
+ for(var i=0;i<attrs.length;i++){
+ //console.log("Attribute:" + attrs[i].nodeName);
+ //console.log("Value:" + attrs[i].value);
+ if(attrs[i].nodeName != "value" && attrs[i].value == ""){
+ var msg="";
+ /*
+ var prevSibling = xmlNode.previousSibling;
+ if(prevSibling != null && prevSibling != undefined){
+ msg = "element <" + xmlNode.nodeName + "> attribute '" + attrs[i].nodeName + "' is not set. Element#" + elementCount;
+ }else{
+ msg = "element <" + xmlNode.nodeName + "> attribute '" + attrs[i].nodeName + "' is not set. Element#" + elementCount;
+ }
+ */
+ msg = "element <" + xmlNode.nodeName + "> attribute '" + attrs[i].nodeName + "' is not set. Element#" + elementCount;
+ errList.push(msg);
+ //console.log("element <" + xmlNode.nodeName + "> attribute '" + attrs[i].nodeName + "' is not set.Element#" + elementCount);
+ resp = false;
+ }
+ }
+ var childNodes = xmlNode.childNodes;
+ for(var k=0;k<childNodes.length;k++){
+ processNode(childNodes[k]);
+ }
+ break;
+ case 2:
+ //ATTRIBUTE_NODE
+ //console.log(xmlNode.nodeName);
+ break;
+ case 3:
+ //TEXT_NODE
+ //console.log(xmlNode.nodeValue);
+ break;
+ case 4:
+ //CDATA_SECTION_NODE
+ console.log("CDATA_SECTION_NODE");
+ break;
+ case 5:
+ //ENTITY_REFERENCE_NODE
+ console.log("ENTITY_REFERENCE_NODE");
+ break;
+ case 6:
+ //ENTITY_NODE
+ console.log("ENTITY_NODE");
+ break;
+ case 7:
+ //PROCESSING_INSTRUCTION_NODE
+ console.log("PROCESSING_INSTRUCTION_NODE");
+ break;
+ case 8:
+ //COMMENT_NODE
+ console.log("COMMENT_NODE");
+ break;
+ case 9:
+ //DOCUMENT_NODE
+ console.log("DOCUMENT_NODE");
+ break;
+ case 10:
+ //DOCUMENT_TYPE_NODE
+ console.log("DOCUMENT_TYPE_NODE");
+ break;
+ case 11:
+ //DOCUMENT_TYPE_NODE
+ console.log("DOCUMENT_FRAGMENT_NODE");
+ break;
+ case 12:
+ //NOTATION_NODE
+ console.log("DOCUMENT_FRAGMENT_NODE");
+ break;
+ }
+}
+
+function validateFinalXML(xmlStr){
+
+ //console.dir(RED);
+ processedNode="";
+ resp=true;
+ errList=[];
+ elementCount=0;
+ //console.log("In validateXML xmlStr:" + xmlStr);
+ if(xmlStr == null || xmlStr == "") return true;
+ xmlStr = xmlStr.trim();
+ try{
+ var xmlDoc;
+ if (window.DOMParser){
+ try{
+ var parser=new DOMParser();
+ xmlDoc=parser.parseFromString(xmlStr,'text/xml');
+ //console.log("Not IE");
+ var n = xmlDoc.documentElement.nodeName;
+ if(n == "html"){
+ resp=false;
+ console.log("Error parsing");
+ return resp;
+ }
+ }catch(e){
+ console.log("Error parsing" +e);
+ return false;
+ }
+ }else{
+ try{
+ //console.log("IE");
+ // code for IE
+ xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
+ xmlDoc.async=false;
+ xmlDoc.loadXMLString(xmlStr);
+ }catch(e){
+ console.log("Error parsing" +e);
+ return false;
+ }
+ }
+
+ //console.dir(xmlDoc);
+ processNode(xmlDoc.documentElement);
+
+ if(resp){
+ console.log("Validation Successful");
+ RED.notify("<strong>XML validation</strong>: SUCCESS","success");
+ }else{
+ console.log("Errors found. ");
+ RED.notify("<strong>XML validation</strong>: FAILED","error");
+ }
+ }catch(e){
+ console.log("error:" +e);
+ RED.notify("<strong>XML validation</strong>: FAILED","error");
+ resp=false;
+ return resp;
+ }
+ return resp;
+}
+
+function validateXML(xmlStr){
+
+ //console.dir(RED);
+ processedNode="";
+ resp=true;
+ errList=[];
+ elementCount=0;
+ //console.log("In validateXML xmlStr:" + xmlStr);
+ //var xmlStr = $("#node-input-xml-editor").text();
+ if(xmlStr == null || xmlStr == undefined){
+ xmlStr = $("#node-input-xml-editor").text();
+ }
+ if(xmlStr == undefined) return false;
+ //console.dir($("#node-input-xml-editor"));
+ //console.log("xmlStr:" + xmlStr);
+ xmlStr = xmlStr.trim();
+ var startTag ;
+ var endTag ;
+ try{
+ var re = /^[0-9]+/;
+ xmlStr = xmlStr.replace(re,'');
+ var regex = /(<)([\w-]+)(.*)?/;
+ var match = regex.exec(xmlStr);
+ if(match != null){
+ if(match[1] != undefined && match[2] != undefined){
+ startTag = match[2];
+ }
+ }else{
+ resp=false;
+ showMsg("startTag not found.","red");
+ return resp;
+ }
+ }catch(e){
+ console.log(e);
+ return false;
+ }
+ //console.log(xmlStr);
+ if(xmlStr == ""){
+ resp=false;
+ showMsg("XML not found","red");
+ return resp;
+ }
+ endTag = "</" + startTag + ">";
+
+ if(xmlStr.indexOf(endTag) != -1){
+ resp=false;
+ showMsg("Error: End tag </" + startTag + "> must not be included.","red");
+ console.log("End tag " + endTag + " must not be included.");
+ return resp;
+ }
+ try{
+ //var xmlTopStr = "<?xml version='1.0' encoding='UTF-8'?>\n" ;
+ //xmlStr = xmlTopStr + xmlStr;
+ //xmlStr = xmlStr.replace(/'/g,"\"");
+ xmlStr+= "\n" + endTag;
+ xmlStr = xmlStr.trim();
+ //console.log("xmlStr:" + xmlStr);
+ var xmlDoc;
+ if (window.DOMParser){
+ try{
+ var parser=new DOMParser();
+ xmlDoc=parser.parseFromString(xmlStr,'text/xml');
+ //console.log("Not IE");
+ var n = xmlDoc.documentElement.nodeName;
+ if(n == "html"){
+ resp=false;
+ showMsg("Error parsing","red");
+ console.log("Error parsing");
+ return resp;
+ }
+ }catch(e){
+ console.log("Error parsing" +e);
+ return false;
+ }
+ }else{
+ try{
+ //console.log("IE");
+ // code for IE
+ xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
+ xmlDoc.async=false;
+ xmlDoc.loadXMLString(xmlStr);
+ }catch(e){
+ console.log("Error parsing" +e);
+ return false;
+ }
+ }
+
+ //console.dir(xmlDoc);
+ processNode(xmlDoc.documentElement);
+ if(resp){
+ showMsg("Validation Successful","green");
+ }else{
+ showMsg("Errors found. <a onclick='javascript:showErrors()'>show errors</a>","red");
+ console.log("Errors found. ");
+ }
+ }catch(e){
+ console.log("error:" +e);
+ showMsg(e,"red");
+ resp=false;
+ return resp;
+ }
+ return resp;
+}
+
+function showErrors() {
+ //var sourceField = event != null ?event.srcElement:event.target;
+ //console.dir(sourceField);
+ //sourceField.style.backgroundColor="skyblue";
+ //var leftVal = event.target.offsetLeft ;
+ //alert(topVal + ":" + leftVal);
+ /*left:leftVal,*/
+ //var pos = event.target;
+ //var topVal = event.target.offsetTop + topPosition ;
+ //var topVal = event.target.offsetTop +75;
+ var htmlStr="<div id='error-list-div'><table id='errTable' border='1'><tr><th>Error List</th></tr>";
+ for(var i=0;errList != null && i<errList.length;i++){
+ var errSeq = i+1;
+ htmlStr += "<tr><td>" + errSeq + ")" + errList[i] + "</td></tr>";
+ }
+ htmlStr += "</table></div>";
+ //var prevHtml = $("#tab-info").html();
+ //htmlStr += "<input type='button' value='Hide Errors' onclick=\"closeShowErrors('" + prevHtml + "')\" >";
+ //$('#show-errors-div').html(htmlStr);
+ //$("#tab-info").html(prevHtml + htmlStr);
+
+ //$('<div></div>').dialog({
+ $('#show-errors-dialog').dialog({
+ modal: true,
+ title: "XML Error List ",
+ width: 500,
+ open: function () {
+ $(this).html(htmlStr);
+ },
+ buttons: {
+ Close: function () {
+ $(this).dialog("close");
+ }
+ }
+ }); // end dialog div
+}
diff --git a/dgbuilder/public/util/js/vkbeautify.0.99.00.beta.js b/dgbuilder/public/util/js/vkbeautify.0.99.00.beta.js
new file mode 100644
index 0000000..13cee3a
--- /dev/null
+++ b/dgbuilder/public/util/js/vkbeautify.0.99.00.beta.js
@@ -0,0 +1,358 @@
+/**
+* vkBeautify - javascript plugin to pretty-print or minify text in XML, JSON, CSS and SQL formats.
+*
+* Version - 0.99.00.beta
+* Copyright (c) 2012 Vadim Kiryukhin
+* vkiryukhin @ gmail.com
+* http://www.eslinstructor.net/vkbeautify/
+*
+* Dual licensed under the MIT and GPL licenses:
+* http://www.opensource.org/licenses/mit-license.php
+* http://www.gnu.org/licenses/gpl.html
+*
+* Pretty print
+*
+* vkbeautify.xml(text [,indent_pattern]);
+* vkbeautify.json(text [,indent_pattern]);
+* vkbeautify.css(text [,indent_pattern]);
+* vkbeautify.sql(text [,indent_pattern]);
+*
+* @text - String; text to beatufy;
+* @indent_pattern - Integer | String;
+* Integer: number of white spaces;
+* String: character string to visualize indentation ( can also be a set of white spaces )
+* Minify
+*
+* vkbeautify.xmlmin(text [,preserve_comments]);
+* vkbeautify.jsonmin(text);
+* vkbeautify.cssmin(text [,preserve_comments]);
+* vkbeautify.sqlmin(text);
+*
+* @text - String; text to minify;
+* @preserve_comments - Bool; [optional];
+* Set this flag to true to prevent removing comments from @text ( minxml and mincss functions only. )
+*
+* Examples:
+* vkbeautify.xml(text); // pretty print XML
+* vkbeautify.json(text, 4 ); // pretty print JSON
+* vkbeautify.css(text, '. . . .'); // pretty print CSS
+* vkbeautify.sql(text, '----'); // pretty print SQL
+*
+* vkbeautify.xmlmin(text, true);// minify XML, preserve comments
+* vkbeautify.jsonmin(text);// minify JSON
+* vkbeautify.cssmin(text);// minify CSS, remove comments ( default )
+* vkbeautify.sqlmin(text);// minify SQL
+*
+*/
+
+(function() {
+
+function createShiftArr(step) {
+
+ var space = ' ';
+
+ if ( isNaN(parseInt(step)) ) { // argument is string
+ space = step;
+ } else { // argument is integer
+ switch(step) {
+ case 1: space = ' '; break;
+ case 2: space = ' '; break;
+ case 3: space = ' '; break;
+ case 4: space = ' '; break;
+ case 5: space = ' '; break;
+ case 6: space = ' '; break;
+ case 7: space = ' '; break;
+ case 8: space = ' '; break;
+ case 9: space = ' '; break;
+ case 10: space = ' '; break;
+ case 11: space = ' '; break;
+ case 12: space = ' '; break;
+ }
+ }
+
+ var shift = ['\n']; // array of shifts
+ for(ix=0;ix<100;ix++){
+ shift.push(shift[ix]+space);
+ }
+ return shift;
+}
+
+function vkbeautify(){
+ this.step = ' '; // 4 spaces
+ this.shift = createShiftArr(this.step);
+};
+
+vkbeautify.prototype.xml = function(text,step) {
+
+ var ar = text.replace(/>\s{0,}</g,"><")
+ .replace(/</g,"~::~<")
+ .replace(/\s*xmlns\:/g,"~::~xmlns:")
+ .replace(/\s*xmlns\=/g,"~::~xmlns=")
+ .split('~::~'),
+ len = ar.length,
+ inComment = false,
+ deep = 0,
+ str = '',
+ ix = 0,
+ shift = step ? createShiftArr(step) : this.shift;
+
+ for(ix=0;ix<len;ix++) {
+ // start comment or <![CDATA[...]]> or <!DOCTYPE //
+ if(ar[ix].search(/<!/) > -1) {
+ str += shift[deep]+ar[ix];
+ inComment = true;
+ // end comment or <![CDATA[...]]> //
+ if(ar[ix].search(/-->/) > -1 || ar[ix].search(/\]>/) > -1 || ar[ix].search(/!DOCTYPE/) > -1 ) {
+ inComment = false;
+ }
+ } else
+ // end comment or <![CDATA[...]]> //
+ if(ar[ix].search(/-->/) > -1 || ar[ix].search(/\]>/) > -1) {
+ str += ar[ix];
+ inComment = false;
+ } else
+ // <elm></elm> //
+ if( /^<\w/.exec(ar[ix-1]) && /^<\/\w/.exec(ar[ix]) &&
+ /^<[\w:\-\.\,]+/.exec(ar[ix-1]) == /^<\/[\w:\-\.\,]+/.exec(ar[ix])[0].replace('/','')) {
+ str += ar[ix];
+ if(!inComment) deep--;
+ } else
+ // <elm> //
+ if(ar[ix].search(/<\w/) > -1 && ar[ix].search(/<\//) == -1 && ar[ix].search(/\/>/) == -1 ) {
+ str = !inComment ? str += shift[deep++]+ar[ix] : str += ar[ix];
+ } else
+ // <elm>...</elm> //
+ if(ar[ix].search(/<\w/) > -1 && ar[ix].search(/<\//) > -1) {
+ str = !inComment ? str += shift[deep]+ar[ix] : str += ar[ix];
+ } else
+ // </elm> //
+ if(ar[ix].search(/<\//) > -1) {
+ str = !inComment ? str += shift[--deep]+ar[ix] : str += ar[ix];
+ } else
+ // <elm/> //
+ if(ar[ix].search(/\/>/) > -1 ) {
+ str = !inComment ? str += shift[deep]+ar[ix] : str += ar[ix];
+ } else
+ // <? xml ... ?> //
+ if(ar[ix].search(/<\?/) > -1) {
+ str += shift[deep]+ar[ix];
+ } else
+ // xmlns //
+ if( ar[ix].search(/xmlns\:/) > -1 || ar[ix].search(/xmlns\=/) > -1) {
+ str += shift[deep]+ar[ix];
+ }
+
+ else {
+ str += ar[ix];
+ }
+ }
+
+ return (str[0] == '\n') ? str.slice(1) : str;
+}
+
+vkbeautify.prototype.json = function(text,step) {
+
+ var step = step ? step : this.step;
+
+ if (typeof JSON === 'undefined' ) return text;
+
+ if ( typeof text === "string" ) return JSON.stringify(JSON.parse(text), null, step);
+ if ( typeof text === "object" ) return JSON.stringify(text, null, step);
+
+ return text; // text is not string nor object
+}
+
+vkbeautify.prototype.css = function(text, step) {
+
+ var ar = text.replace(/\s{1,}/g,' ')
+ .replace(/\{/g,"{~::~")
+ .replace(/\}/g,"~::~}~::~")
+ .replace(/\;/g,";~::~")
+ .replace(/\/\*/g,"~::~/*")
+ .replace(/\*\//g,"*/~::~")
+ .replace(/~::~\s{0,}~::~/g,"~::~")
+ .split('~::~'),
+ len = ar.length,
+ deep = 0,
+ str = '',
+ ix = 0,
+ shift = step ? createShiftArr(step) : this.shift;
+
+ for(ix=0;ix<len;ix++) {
+
+ if( /\{/.exec(ar[ix])) {
+ str += shift[deep++]+ar[ix];
+ } else
+ if( /\}/.exec(ar[ix])) {
+ str += shift[--deep]+ar[ix];
+ } else
+ if( /\*\\/.exec(ar[ix])) {
+ str += shift[deep]+ar[ix];
+ }
+ else {
+ str += shift[deep]+ar[ix];
+ }
+ }
+ return str.replace(/^\n{1,}/,'');
+}
+
+//----------------------------------------------------------------------------
+
+function isSubquery(str, parenthesisLevel) {
+ return parenthesisLevel - (str.replace(/\(/g,'').length - str.replace(/\)/g,'').length )
+}
+
+function split_sql(str, tab) {
+
+ return str.replace(/\s{1,}/g," ")
+
+ .replace(/ AND /ig,"~::~"+tab+tab+"AND ")
+ .replace(/ BETWEEN /ig,"~::~"+tab+"BETWEEN ")
+ .replace(/ CASE /ig,"~::~"+tab+"CASE ")
+ .replace(/ ELSE /ig,"~::~"+tab+"ELSE ")
+ .replace(/ END /ig,"~::~"+tab+"END ")
+ .replace(/ FROM /ig,"~::~FROM ")
+ .replace(/ GROUP\s{1,}BY/ig,"~::~GROUP BY ")
+ .replace(/ HAVING /ig,"~::~HAVING ")
+ //.replace(/ SET /ig," SET~::~")
+ .replace(/ IN /ig," IN ")
+
+ .replace(/ JOIN /ig,"~::~JOIN ")
+ .replace(/ CROSS~::~{1,}JOIN /ig,"~::~CROSS JOIN ")
+ .replace(/ INNER~::~{1,}JOIN /ig,"~::~INNER JOIN ")
+ .replace(/ LEFT~::~{1,}JOIN /ig,"~::~LEFT JOIN ")
+ .replace(/ RIGHT~::~{1,}JOIN /ig,"~::~RIGHT JOIN ")
+
+ .replace(/ ON /ig,"~::~"+tab+"ON ")
+ .replace(/ OR /ig,"~::~"+tab+tab+"OR ")
+ .replace(/ ORDER\s{1,}BY/ig,"~::~ORDER BY ")
+ .replace(/ OVER /ig,"~::~"+tab+"OVER ")
+
+ .replace(/\(\s{0,}SELECT /ig,"~::~(SELECT ")
+ .replace(/\)\s{0,}SELECT /ig,")~::~SELECT ")
+
+ .replace(/ THEN /ig," THEN~::~"+tab+"")
+ .replace(/ UNION /ig,"~::~UNION~::~")
+ .replace(/ USING /ig,"~::~USING ")
+ .replace(/ WHEN /ig,"~::~"+tab+"WHEN ")
+ .replace(/ WHERE /ig,"~::~WHERE ")
+ .replace(/ WITH /ig,"~::~WITH ")
+
+ //.replace(/\,\s{0,}\(/ig,",~::~( ")
+ //.replace(/\,/ig,",~::~"+tab+tab+"")
+
+ .replace(/ ALL /ig," ALL ")
+ .replace(/ AS /ig," AS ")
+ .replace(/ ASC /ig," ASC ")
+ .replace(/ DESC /ig," DESC ")
+ .replace(/ DISTINCT /ig," DISTINCT ")
+ .replace(/ EXISTS /ig," EXISTS ")
+ .replace(/ NOT /ig," NOT ")
+ .replace(/ NULL /ig," NULL ")
+ .replace(/ LIKE /ig," LIKE ")
+ .replace(/\s{0,}SELECT /ig,"SELECT ")
+ .replace(/\s{0,}UPDATE /ig,"UPDATE ")
+ .replace(/ SET /ig," SET ")
+
+ .replace(/~::~{1,}/g,"~::~")
+ .split('~::~');
+}
+
+vkbeautify.prototype.sql = function(text,step) {
+
+ var ar_by_quote = text.replace(/\s{1,}/g," ")
+ .replace(/\'/ig,"~::~\'")
+ .split('~::~'),
+ len = ar_by_quote.length,
+ ar = [],
+ deep = 0,
+ tab = this.step,//+this.step,
+ inComment = true,
+ inQuote = false,
+ parenthesisLevel = 0,
+ str = '',
+ ix = 0,
+ shift = step ? createShiftArr(step) : this.shift;;
+
+ for(ix=0;ix<len;ix++) {
+ if(ix%2) {
+ ar = ar.concat(ar_by_quote[ix]);
+ } else {
+ ar = ar.concat(split_sql(ar_by_quote[ix], tab) );
+ }
+ }
+
+ len = ar.length;
+ for(ix=0;ix<len;ix++) {
+
+ parenthesisLevel = isSubquery(ar[ix], parenthesisLevel);
+
+ if( /\s{0,}\s{0,}SELECT\s{0,}/.exec(ar[ix])) {
+ ar[ix] = ar[ix].replace(/\,/g,",\n"+tab+tab+"")
+ }
+
+ if( /\s{0,}\s{0,}SET\s{0,}/.exec(ar[ix])) {
+ ar[ix] = ar[ix].replace(/\,/g,",\n"+tab+tab+"")
+ }
+
+ if( /\s{0,}\(\s{0,}SELECT\s{0,}/.exec(ar[ix])) {
+ deep++;
+ str += shift[deep]+ar[ix];
+ } else
+ if( /\'/.exec(ar[ix]) ) {
+ if(parenthesisLevel<1 && deep) {
+ deep--;
+ }
+ str += ar[ix];
+ }
+ else {
+ str += shift[deep]+ar[ix];
+ if(parenthesisLevel<1 && deep) {
+ deep--;
+ }
+ }
+ var junk = 0;
+ }
+
+ str = str.replace(/^\n{1,}/,'').replace(/\n{1,}/g,"\n");
+ return str;
+}
+
+
+vkbeautify.prototype.xmlmin = function(text, preserveComments) {
+
+ var str = preserveComments ? text
+ : text.replace(/\<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)\>/g,"")
+ .replace(/[ \r\n\t]{1,}xmlns/g, ' xmlns');
+ return str.replace(/>\s{0,}</g,"><");
+}
+
+vkbeautify.prototype.jsonmin = function(text) {
+
+ if (typeof JSON === 'undefined' ) return text;
+
+ return JSON.stringify(JSON.parse(text), null, 0);
+
+}
+
+vkbeautify.prototype.cssmin = function(text, preserveComments) {
+
+ var str = preserveComments ? text
+ : text.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g,"") ;
+
+ return str.replace(/\s{1,}/g,' ')
+ .replace(/\{\s{1,}/g,"{")
+ .replace(/\}\s{1,}/g,"}")
+ .replace(/\;\s{1,}/g,";")
+ .replace(/\/\*\s{1,}/g,"/*")
+ .replace(/\*\/\s{1,}/g,"*/");
+}
+
+vkbeautify.prototype.sqlmin = function(text) {
+ return text.replace(/\s{1,}/g," ").replace(/\s{1,}\(/,"(").replace(/\s{1,}\)/,")");
+}
+
+window.vkbeautify = new vkbeautify();
+
+})();
+
diff --git a/dgbuilder/red.js b/dgbuilder/red.js
new file mode 100644
index 0000000..14f6d38
--- /dev/null
+++ b/dgbuilder/red.js
@@ -0,0 +1,224 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+var http = require('http');
+var https = require('https');
+var util = require("util");
+var express = require("express");
+var crypto = require("crypto");
+var nopt = require("nopt");
+var path = require("path");
+var RED = require("./red/red.js");
+
+var server;
+var app = express();
+
+var settingsFile = "./settings";
+var flowFile;
+
+var knownOpts = {
+ "settings":[path],
+ "v": Boolean,
+ "help": Boolean
+};
+var shortHands = {
+ "s":["--settings"],
+ "?":["--help"]
+};
+nopt.invalidHandler = function(k,v,t) {
+ // TODO: console.log(k,v,t);
+}
+
+var parsedArgs = nopt(knownOpts,shortHands,process.argv,2)
+
+if (parsedArgs.help) {
+ console.log("Node-RED v"+RED.version());
+ console.log("Usage: node red.js [-v] [-?] [--settings settings.js] [flows.json]");
+ console.log("");
+ console.log("Options:");
+ console.log(" -s, --settings FILE use specified settings file");
+ console.log(" -v enable verbose output");
+ console.log(" -?, --help show usage");
+ console.log("");
+ console.log("Documentation can be found at http://nodered.org");
+ process.exit();
+}
+if (parsedArgs.argv.remain.length > 0) {
+ flowFile = parsedArgs.argv.remain[0];
+}
+
+if (parsedArgs.settings) {
+ settingsFile = parsedArgs.settings;
+}
+try {
+ var settings = require(settingsFile);
+} catch(err) {
+ if (err.code == 'MODULE_NOT_FOUND') {
+ console.log("Unable to load settings file "+settingsFile);
+ } else {
+ console.log(err);
+ }
+ process.exit();
+}
+
+if (parsedArgs.v) {
+ settings.verbose = true;
+}
+
+if (settings.https) {
+ server = https.createServer(settings.https,function(req,res){app(req,res);});
+} else {
+ server = http.createServer(function(req,res){app(req,res);});
+}
+server.setMaxListeners(0);
+
+function formatRoot(root) {
+ if (root[0] != "/") {
+ root = "/" + root;
+ }
+ if (root.slice(-1) != "/") {
+ root = root + "/";
+ }
+ return root;
+}
+
+if (settings.httpRoot === false) {
+ settings.httpAdminRoot = false;
+ settings.httpNodeRoot = false;
+} else {
+ settings.httpRoot = settings.httpRoot||"/";
+ settings.disableEditor = settings.disableEditor||false;
+}
+
+if (settings.httpAdminRoot !== false) {
+ settings.httpAdminRoot = formatRoot(settings.httpAdminRoot || settings.httpRoot || "/");
+ settings.httpAdminAuth = settings.httpAdminAuth || settings.httpAuth;
+} else {
+ settings.disableEditor = true;
+}
+
+if (settings.httpNodeRoot !== false) {
+ settings.httpNodeRoot = formatRoot(settings.httpNodeRoot || settings.httpRoot || "/");
+ settings.httpNodeAuth = settings.httpNodeAuth || settings.httpAuth;
+}
+
+settings.uiPort = settings.uiPort||1880;
+settings.uiHost = settings.uiHost||"0.0.0.0";
+var appDir = path.dirname(require.main.filename);
+if (settings.flowFile != null && settings.flowFile.indexOf(appDir) != -1){
+ settings.flowFile = flowFile || settings.flowFile;
+}else{
+ settings.flowFile = flowFile || appDir + "/" + settings.flowFile;
+}
+
+RED.init(server,settings);
+
+if (settings.httpAdminRoot !== false && settings.httpAdminAuth) {
+ app.use(settings.httpAdminRoot,
+ express.basicAuth(function(user, pass) {
+ return user === settings.httpAdminAuth.user && crypto.createHash('md5').update(pass,'utf8').digest('hex') === settings.httpAdminAuth.pass;
+ })
+ );
+}
+if (settings.httpNodeRoot !== false && settings.httpNodeAuth) {
+ app.use(settings.httpNodeRoot,
+ express.basicAuth(function(user, pass) {
+ return user === settings.httpNodeAuth.user && crypto.createHash('md5').update(pass,'utf8').digest('hex') === settings.httpNodeAuth.pass;
+ })
+ );
+}
+if (settings.httpAdminRoot !== false) {
+ app.use(settings.httpAdminRoot,RED.httpAdmin);
+}
+if (settings.httpNodeRoot !== false) {
+ app.use(settings.httpNodeRoot,RED.httpNode);
+}
+
+if (settings.httpStatic) {
+ settings.httpStaticAuth = settings.httpStaticAuth || settings.httpAuth;
+ if (settings.httpStaticAuth) {
+ app.use("/",
+ express.basicAuth(function(user, pass) {
+ return user === settings.httpStaticAuth.user && crypto.createHash('md5').update(pass,'utf8').digest('hex') === settings.httpStaticAuth.pass;
+ })
+ );
+ }
+ app.use("/",express.static(settings.httpStatic));
+}
+
+function getListenPath() {
+ var listenPath = 'http'+(settings.https?'s':'')+'://'+
+ (settings.uiHost == '0.0.0.0'?'127.0.0.1':settings.uiHost)+
+ ':'+settings.uiPort;
+ if (settings.httpAdminRoot !== false) {
+ listenPath += settings.httpAdminRoot;
+ } else if (settings.httpStatic) {
+ listenPath += "/";
+ }
+ return listenPath;
+}
+
+RED.start().then(function() {
+ if (settings.httpAdminRoot !== false || settings.httpNodeRoot !== false || settings.httpStatic) {
+ server.on('error', function(err) {
+ if (err.errno === "EADDRINUSE") {
+ util.log('[red] Unable to listen on '+getListenPath());
+ util.log('[red] Error: port in use');
+ } else {
+ util.log('[red] Uncaught Exception:');
+ if (err.stack) {
+ util.log(err.stack);
+ } else {
+ util.log(err);
+ }
+ }
+ process.exit(1);
+ });
+ server.listen(settings.uiPort,settings.uiHost,function() {
+ if (settings.httpAdminRoot === false) {
+ util.log('[red] Admin UI disabled');
+ }
+ process.title = 'node-red';
+ util.log('[red] Server now running at '+getListenPath());
+ });
+ } else {
+ util.log('[red] Running in headless mode');
+ }
+}).otherwise(function(err) {
+ util.log("[red] Failed to start server:");
+ if (err.stack) {
+ util.log(err.stack);
+ } else {
+ util.log(err);
+ }
+});
+
+
+process.on('uncaughtException',function(err) {
+ util.log('[red] Uncaught Exception:');
+ if (err.stack) {
+ util.log(err.stack);
+ } else {
+ util.log(err);
+ }
+ process.exit(1);
+});
+
+process.on('SIGINT', function () {
+ RED.stop();
+ // TODO: need to allow nodes to close asynchronously before terminating the
+ // process - ie, promises
+ process.exit();
+});
diff --git a/dgbuilder/red/cli/lib/config.js b/dgbuilder/red/cli/lib/config.js
new file mode 100644
index 0000000..3cd5244
--- /dev/null
+++ b/dgbuilder/red/cli/lib/config.js
@@ -0,0 +1,53 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var path = require("path");
+var fs = require("fs");
+
+var userHome = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE;
+
+var configDir = path.join(userHome,".nodered");
+var configFile = path.join(configDir,"config.json");
+
+var config;
+
+function load() {
+ if (config == null) {
+ try {
+ config = JSON.parse(fs.readFileSync(configFile));
+ } catch(err) {
+ config = {};
+ }
+ }
+}
+
+function save() {
+ try {
+ fs.mkdirSync(configDir);
+ } catch(err) {
+ if (err.code != "EEXIST") {
+ throw err;
+ }
+ }
+ fs.writeFileSync(configFile,JSON.stringify(config,null,4));
+}
+module.exports = {
+ unload: function() {
+ config = null;
+ }
+};
+module.exports.__defineGetter__('target',function() { load(); return config.target|| "http://localhost:1880" });
+module.exports.__defineSetter__('target',function(v) { load(); config.target = v; save();});
diff --git a/dgbuilder/red/cli/lib/request.js b/dgbuilder/red/cli/lib/request.js
new file mode 100644
index 0000000..fbbe3dc
--- /dev/null
+++ b/dgbuilder/red/cli/lib/request.js
@@ -0,0 +1,51 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var when = require("when");
+var request = require("request");
+var config = require("./config");
+
+module.exports = function(path, options) {
+ var basePath = config.target;
+ return when.promise(function(resolve,reject) {
+ options.headers = options.headers||{};
+ options.headers['Accept'] = 'application/json';
+ if (options.method == 'PUT' || options.method == "POST") {
+ options.headers['content-type'] = 'application/json';
+ }
+ options.url = basePath+path;
+
+ // Pull out the request function so we can stub it in the tests
+ var requestFunc = request.get;
+
+ if (options.method == 'PUT') {
+ requestFunc = request.put;
+ } else if (options.method == 'POST') {
+ requestFunc = request.post;
+ } else if (options.method == 'DELETE') {
+ requestFunc = request.del;
+ }
+ requestFunc(options, function(error,response,body) {
+ if (!error && response.statusCode == 200) {
+ resolve(JSON.parse(body));
+ } else if (error) {
+ reject(error.toString());
+ } else {
+ reject(response.statusCode+": "+body)
+ }
+ });
+ });
+}
diff --git a/dgbuilder/red/cli/nr-cli.js b/dgbuilder/red/cli/nr-cli.js
new file mode 100755
index 0000000..6d62f05
--- /dev/null
+++ b/dgbuilder/red/cli/nr-cli.js
@@ -0,0 +1,151 @@
+#!/usr/bin/env node
+;(function() {
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var util = require("util");
+var request = require("request");
+var colors = require('colors');
+var apiRequest = require("./lib/request");
+var config = require("./lib/config");
+
+var commands = {
+ "target": function() {
+ var target = process.argv[3];
+ if (target) {
+ if (!/^https?:\/\/.+/.test(target)) {
+ console.warn("Invalid target url");
+ return;
+ }
+ if (target.slice(-1) == "/") {
+ target = target.slice(0,target.length-1);
+ }
+ var oldTarget = config.target;
+ config.target = target;
+ } else {
+ console.log("Target: ".yellow+config.target);
+ }
+
+ },
+ "nodes": function() {
+ apiRequest('/nodes',{}).then(logNodeList).otherwise(logFailure);
+ },
+ "node": function() {
+ apiRequest('/nodes/'+process.argv[3],{}).then(logNodeList).otherwise(logFailure);
+ },
+ "enable-node": function() {
+ apiRequest('/nodes/'+process.argv[3],{
+ method: "PUT",
+ body: JSON.stringify({enabled:true})
+ }).then(logNodeList).otherwise(logFailure);
+ },
+ "disable-node": function() {
+ apiRequest('/nodes/'+process.argv[3],{
+ method: "PUT",
+ body: JSON.stringify({enabled:false})
+ }).then(logNodeList).otherwise(logFailure);
+ },
+ "install": function() {
+ apiRequest('/nodes',{
+ method: "POST",
+ body: JSON.stringify({module:process.argv[3]})
+ }).then(logNodeList).otherwise(logFailure);
+ },
+ "remove": function() {
+ apiRequest('/nodes/'+process.argv[3],{
+ method: "DELETE"
+ }).then(logNodeList).otherwise(logFailure);
+ },
+ "search": function() {
+ var options = {
+ method: "GET",
+ url: 'https://registry.npmjs.org/-/_view/byKeyword?startkey=["node-red"]&endkey=["node-red",{}]&group_level=3' ,
+ headers: {
+ 'Accept': 'application/json',
+ }
+ };
+ request(options, function (error, response, body) {
+ if (!error && response.statusCode == 200) {
+ var info = (JSON.parse(body)).rows;
+ var filter = null;
+ if (process.argv[3]) {
+ filter = new RegExp(process.argv[3]);
+ }
+ for (var i=0;i<info.length;i++) {
+ var n = info[i];
+ if (!filter || filter.test(n.key[1]) || filter.test(n.key[2])) {
+ console.log(n.key[1] + (" - "+ n.key[2]).grey);
+ }
+ }
+ } else if (error) {
+ console.log(error.toString().red);
+ } else {
+ console.log((response.statusCode+": "+body).red);
+ }
+ });
+ }
+}
+
+function logNodeList(nodes) {
+ if (!util.isArray(nodes)) {
+ nodes = [nodes];
+ }
+ for (var i=0;i<nodes.length;i++) {
+ var n = nodes[i];
+ console.log(formatNodeInfo(n))
+ }
+}
+
+function logFailure(msg) {
+ console.log(msg.red);
+}
+
+function formatBoolean(v,c) {
+ if (v) {
+ return ("["+c+"]");
+ } else {
+ return ("[ ]");
+ }
+}
+
+function formatNodeInfo(n) {
+ var inError = n.hasOwnProperty("err");
+
+ var str = formatBoolean(n.enabled,"X")+formatBoolean(n.loaded,"L")+" ";
+ str += n.id;
+ if (n.enabled && n.loaded) {
+ str = str.green;
+ } else if (n.enabled && n.err) {
+ str = str.red;
+ } else {
+ str = str.yellow;
+ }
+ if (n.module) {
+ str += " ["+n.module+"]";
+ }
+ str += " "+n.types.join(", ");
+ if (n.err) {
+ str+=" "+n.err.red;
+ }
+ return str;
+}
+
+if (commands[process.argv[2]]) {
+ commands[process.argv[2]].call();
+}
+
+
+})();
diff --git a/dgbuilder/red/comms.js b/dgbuilder/red/comms.js
new file mode 100644
index 0000000..5828c99
--- /dev/null
+++ b/dgbuilder/red/comms.js
@@ -0,0 +1,132 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var ws = require("ws");
+var util = require("util");
+
+var server;
+var settings;
+
+var wsServer;
+var activeConnections = [];
+
+var retained = {};
+
+var heartbeatTimer;
+var lastSentTime;
+
+
+function init(_server,_settings) {
+ server = _server;
+ settings = _settings;
+}
+
+function start() {
+
+ if (!settings.disableEditor) {
+ var webSocketKeepAliveTime = settings.webSocketKeepAliveTime || 15000;
+ var path = settings.httpAdminRoot || "/";
+ path = path + (path.slice(-1) == "/" ? "":"/") + "comms";
+ wsServer = new ws.Server({server:server,path:path});
+
+ wsServer.on('connection',function(ws) {
+ activeConnections.push(ws);
+ ws.on('close',function() {
+ for (var i=0;i<activeConnections.length;i++) {
+ if (activeConnections[i] === ws) {
+ activeConnections.splice(i,1);
+ break;
+ }
+ }
+ });
+ ws.on('message', function(data,flags) {
+ var msg = null;
+ try {
+ msg = JSON.parse(data);
+ } catch(err) {
+ util.log("[red:comms] received malformed message : "+err.toString());
+ return;
+ }
+ if (msg.subscribe) {
+ handleRemoteSubscription(ws,msg.subscribe);
+ }
+ });
+ ws.on('error', function(err) {
+ util.log("[red:comms] error : "+err.toString());
+ });
+ });
+
+ wsServer.on('error', function(err) {
+ util.log("[red:comms] server error : "+err.toString());
+ });
+
+ lastSentTime = Date.now();
+
+ heartbeatTimer = setInterval(function() {
+ var now = Date.now();
+ if (now-lastSentTime > webSocketKeepAliveTime) {
+ publish("hb",lastSentTime);
+ }
+ }, webSocketKeepAliveTime);
+ }
+}
+
+function stop() {
+ if (heartbeatTimer) {
+ clearInterval(heartbeatTimer);
+ }
+ if (wsServer) {
+ wsServer.close();
+ }
+}
+
+function publish(topic,data,retain) {
+ if (retain) {
+ retained[topic] = data;
+ } else {
+ delete retained[topic];
+ }
+ lastSentTime = Date.now();
+ activeConnections.forEach(function(conn) {
+ publishTo(conn,topic,data);
+ });
+}
+
+function publishTo(ws,topic,data) {
+ var msg = JSON.stringify({topic:topic,data:data});
+ try {
+ ws.send(msg);
+ } catch(err) {
+ util.log("[red:comms] send error : "+err.toString());
+ }
+}
+
+function handleRemoteSubscription(ws,topic) {
+ var re = new RegExp("^"+topic.replace(/([\[\]\?\(\)\\\\$\^\*\.|])/g,"\\$1").replace(/\+/g,"[^/]+").replace(/\/#$/,"(\/.*)?")+"$");
+ for (var t in retained) {
+ if (re.test(t)) {
+ publishTo(ws,t,retained[t]);
+ }
+ }
+}
+
+
+module.exports = {
+ init:init,
+ start:start,
+ stop:stop,
+ publish:publish,
+}
diff --git a/dgbuilder/red/events.js b/dgbuilder/red/events.js
new file mode 100644
index 0000000..8959049
--- /dev/null
+++ b/dgbuilder/red/events.js
@@ -0,0 +1,19 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+var events = require("events");
+
+module.exports = new events.EventEmitter();
diff --git a/dgbuilder/red/library.js b/dgbuilder/red/library.js
new file mode 100644
index 0000000..cc4199f
--- /dev/null
+++ b/dgbuilder/red/library.js
@@ -0,0 +1,117 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+var util = require("util");
+
+var redApp = null;
+var storage = null;
+
+function init() {
+ redApp = require("./server").app;
+ storage = require("./storage");
+
+ // -------- Flow Library --------
+ redApp.post(new RegExp("/library/flows\/(.*)"), function(req,res) {
+ var fullBody = '';
+ req.on('data', function(chunk) {
+ fullBody += chunk.toString();
+ });
+ req.on('end', function() {
+ storage.saveFlow(req.params[0],fullBody).then(function() {
+ res.send(204);
+ }).otherwise(function(err) {
+ util.log("[red] Error loading flow '"+req.params[0]+"' : "+err);
+ if (err.message.indexOf('forbidden') === 0) {
+ res.send(403);
+ return;
+ }
+ res.send(500);
+ });
+ });
+ });
+
+ redApp.get("/library/flows",function(req,res) {
+ storage.getAllFlows().then(function(flows) {
+ res.json(flows);
+ });
+ });
+
+ redApp.get(new RegExp("/library/flows\/(.*)"), function(req,res) {
+ storage.getFlow(req.params[0]).then(function(data) {
+ res.set('Content-Type', 'application/json');
+ res.send(data);
+ }).otherwise(function(err) {
+ if (err) {
+ util.log("[red] Error loading flow '"+req.params[0]+"' : "+err);
+ if (err.message.indexOf('forbidden') === 0) {
+ res.send(403);
+ return;
+ }
+ }
+ res.send(404);
+ });
+ });
+
+ // ------------------------------
+}
+
+function createLibrary(type) {
+
+ redApp.get(new RegExp("/library/"+type+"($|\/(.*))"),function(req,res) {
+ var path = req.params[1]||"";
+ storage.getLibraryEntry(type,path).then(function(result) {
+ if (typeof result === "string") {
+ res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.write(result);
+ res.end();
+ } else {
+ res.json(result);
+ }
+ }).otherwise(function(err) {
+ if (err) {
+ util.log("[red] Error loading library entry '"+path+"' : "+err);
+ if (err.message.indexOf('forbidden') === 0) {
+ res.send(403);
+ return;
+ }
+ }
+ res.send(404);
+ });
+ });
+
+ redApp.post(new RegExp("/library/"+type+"\/(.*)"),function(req,res) {
+ var path = req.params[0];
+ var fullBody = '';
+ req.on('data', function(chunk) {
+ fullBody += chunk.toString();
+ });
+ req.on('end', function() {
+ storage.saveLibraryEntry(type,path,req.query,fullBody).then(function() {
+ res.send(204);
+ }).otherwise(function(err) {
+ util.log("[red] Error saving library entry '"+path+"' : "+err);
+ if (err.message.indexOf('forbidden') === 0) {
+ res.send(403);
+ return;
+ }
+ res.send(500);
+ });
+ });
+ });
+}
+
+module.exports.init = init;
+module.exports.register = createLibrary;
diff --git a/dgbuilder/red/log.js b/dgbuilder/red/log.js
new file mode 100644
index 0000000..236e6df
--- /dev/null
+++ b/dgbuilder/red/log.js
@@ -0,0 +1,39 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var util = require("util");
+var EventEmitter = require("events").EventEmitter;
+
+var logHandlers = [];
+
+var ConsoleLogHandler = new EventEmitter();
+ConsoleLogHandler.on("log",function(msg) {
+ util.log("["+msg.level+"] ["+msg.type+":"+(msg.name||msg.id)+"] "+msg.msg);
+});
+
+var log = module.exports = {
+ addHandler: function(func) {
+ logHandlers.push(func);
+ },
+
+ log: function(msg) {
+ logHandlers.forEach(function(handler) {
+ handler.emit("log",msg);
+ });
+ }
+}
+
+log.addHandler(ConsoleLogHandler);
diff --git a/dgbuilder/red/nodes/Node.js b/dgbuilder/red/nodes/Node.js
new file mode 100644
index 0000000..0e6fc52
--- /dev/null
+++ b/dgbuilder/red/nodes/Node.js
@@ -0,0 +1,147 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var util = require("util");
+var EventEmitter = require("events").EventEmitter;
+var clone = require("clone");
+var when = require("when");
+
+var flows = require("./flows");
+var comms = require("../comms");
+
+function Node(n) {
+ this.id = n.id;
+ flows.add(this);
+ this.type = n.type;
+ if (n.name) {
+ this.name = n.name;
+ }
+ this.wires = n.wires||[];
+}
+
+util.inherits(Node,EventEmitter);
+
+Node.prototype._on = Node.prototype.on;
+
+Node.prototype.on = function(event,callback) {
+ var node = this;
+ if (event == "close") {
+ if (callback.length == 1) {
+ this.close = function() {
+ return when.promise(function(resolve) {
+ callback.call(node,function() {
+ resolve();
+ });
+ });
+ }
+ } else {
+ this.close = callback;
+ }
+ } else {
+ this._on(event,callback);
+ }
+}
+
+Node.prototype.close = function() {
+}
+
+Node.prototype.send = function(msg) {
+ // instanceof doesn't work for some reason here
+ if (msg == null) {
+ return;
+ } else if (!util.isArray(msg)) {
+ msg = [msg];
+ }
+ for (var i=0;i<this.wires.length;i++) {
+ var wires = this.wires[i];
+ if (i < msg.length) {
+ if (msg[i] != null) {
+ var msgs = msg[i];
+ if (!util.isArray(msg[i])) {
+ msgs = [msg[i]];
+ }
+ //if (wires.length == 1) {
+ // // Single recipient, don't need to clone the message
+ // var node = flows.get(wires[0]);
+ // if (node) {
+ // for (var k in msgs) {
+ // var mm = msgs[k];
+ // node.receive(mm);
+ // }
+ // }
+ //} else {
+ // Multiple recipients, must send message copies
+ for (var j=0;j<wires.length;j++) {
+ var node = flows.get(wires[j]);
+ if (node) {
+ for (var k=0;k<msgs.length;k++) {
+ var mm = msgs[k];
+ // Temporary fix for #97
+ // TODO: remove this http-node-specific fix somehow
+ var req = mm.req;
+ var res = mm.res;
+ delete mm.req;
+ delete mm.res;
+ var m = clone(mm);
+ if (req) {
+ m.req = req;
+ mm.req = req;
+ }
+ if (res) {
+ m.res = res;
+ mm.res = res;
+ }
+ node.receive(m);
+ }
+ }
+ }
+ //}
+ }
+ }
+ }
+}
+
+Node.prototype.receive = function(msg) {
+ this.emit("input",msg);
+}
+
+function log_helper(self, level, msg) {
+ var o = {level:level, id:self.id, type:self.type, msg:msg};
+ if (self.name) {
+ o.name = self.name;
+ }
+ self.emit("log",o);
+}
+
+Node.prototype.log = function(msg) {
+ log_helper(this, 'log', msg);
+}
+
+Node.prototype.warn = function(msg) {
+ log_helper(this, 'warn', msg);
+}
+
+Node.prototype.error = function(msg) {
+ log_helper(this, 'error', msg);
+}
+
+/**
+ * status: { fill:"red|green", shape:"dot|ring", text:"blah" }
+ */
+Node.prototype.status = function(status) {
+ comms.publish("status/"+this.id,status,true);
+}
+module.exports = Node;
diff --git a/dgbuilder/red/nodes/credentials.js b/dgbuilder/red/nodes/credentials.js
new file mode 100644
index 0000000..22e78d8
--- /dev/null
+++ b/dgbuilder/red/nodes/credentials.js
@@ -0,0 +1,208 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var util = require("util");
+var when = require("when");
+
+var credentialCache = {};
+var storage = null;
+var credentialsDef = {};
+var redApp = null;
+
+/**
+ * Adds an HTTP endpoint to allow look up of credentials for a given node id.
+ */
+function registerEndpoint(type) {
+ redApp.get('/credentials/' + type + '/:id', function (req, res) {
+ // TODO: This could be a generic endpoint with the type value
+ // parameterised.
+ //
+ // TODO: It should verify the given node id is of the type specified -
+ // but that would add a dependency from this module to the
+ // registry module that knows about node types.
+ var nodeType = type;
+ var nodeID = req.params.id;
+
+ var credentials = credentialCache[nodeID];
+ if (credentials === undefined) {
+ res.json({});
+ return;
+ }
+ var definition = credentialsDef[nodeType];
+
+ var sendCredentials = {};
+ for (var cred in definition) {
+ if (definition.hasOwnProperty(cred)) {
+ if (definition[cred].type == "password") {
+ var key = 'has_' + cred;
+ sendCredentials[key] = credentials[cred] != null && credentials[cred] !== '';
+ continue;
+ }
+ sendCredentials[cred] = credentials[cred] || '';
+ }
+ }
+ res.json(sendCredentials);
+
+ });
+}
+
+
+module.exports = {
+ init: function (_storage) {
+ storage = _storage;
+ // TODO: this should get passed in init function call rather than
+ // required directly.
+ redApp = require("../server").app;
+ },
+
+ /**
+ * Loads the credentials from storage.
+ */
+ load: function () {
+ return storage.getCredentials().then(function (creds) {
+ credentialCache = creds;
+ }).otherwise(function (err) {
+ util.log("[red] Error loading credentials : " + err);
+ });
+ },
+
+ /**
+ * Adds a set of credentials for the given node id.
+ * @param id the node id for the credentials
+ * @param creds an object of credential key/value pairs
+ * @return a promise for the saving of credentials to storage
+ */
+ add: function (id, creds) {
+ credentialCache[id] = creds;
+ return storage.saveCredentials(credentialCache);
+ },
+
+ /**
+ * Gets the credentials for the given node id.
+ * @param id the node id for the credentials
+ * @return the credentials
+ */
+ get: function (id) {
+ return credentialCache[id];
+ },
+
+ /**
+ * Deletes the credentials for the given node id.
+ * @param id the node id for the credentials
+ * @return a promise for the saving of credentials to storage
+ */
+ delete: function (id) {
+ delete credentialCache[id];
+ storage.saveCredentials(credentialCache);
+ },
+
+ /**
+ * Deletes any credentials for nodes that no longer exist
+ * @param getNode a function that can return a node for a given id
+ * @return a promise for the saving of credentials to storage
+ */
+ clean: function (getNode) {
+ var deletedCredentials = false;
+ for (var c in credentialCache) {
+ if (credentialCache.hasOwnProperty(c)) {
+ var n = getNode(c);
+ if (!n) {
+ deletedCredentials = true;
+ delete credentialCache[c];
+ }
+ }
+ }
+ if (deletedCredentials) {
+ return storage.saveCredentials(credentialCache);
+ } else {
+ return when.resolve();
+ }
+ },
+
+ /**
+ * Registers a node credential definition.
+ * @param type the node type
+ * @param definition the credential definition
+ */
+ register: function (type, definition) {
+ var dashedType = type.replace(/\s+/g, '-');
+ credentialsDef[dashedType] = definition;
+ registerEndpoint(dashedType);
+ },
+
+ /**
+ * Extracts and stores any credential updates in the provided node.
+ * The provided node may have a .credentials property that contains
+ * new credentials for the node.
+ * This function loops through the credentials in the definition for
+ * the node-type and applies any of the updates provided in the node.
+ *
+ * This function does not save the credentials to disk as it is expected
+ * to be called multiple times when a new flow is deployed.
+ *
+ * @param node the node to extract credentials from
+ */
+ extract: function(node) {
+ var nodeID = node.id;
+ var nodeType = node.type;
+ var newCreds = node.credentials;
+ if (newCreds) {
+ var savedCredentials = credentialCache[nodeID] || {};
+
+ var dashedType = nodeType.replace(/\s+/g, '-');
+ var definition = credentialsDef[dashedType];
+
+ if (!definition) {
+ util.log('Credential Type ' + nodeType + ' is not registered.');
+ return;
+ }
+
+ for (var cred in definition) {
+ if (definition.hasOwnProperty(cred)) {
+ if (newCreds[cred] === undefined) {
+ continue;
+ }
+ if (definition[cred].type == "password" && newCreds[cred] == '__PWRD__') {
+ continue;
+ }
+ if (0 === newCreds[cred].length || /^\s*$/.test(newCreds[cred])) {
+ delete savedCredentials[cred];
+ continue;
+ }
+ savedCredentials[cred] = newCreds[cred];
+ }
+ }
+ credentialCache[nodeID] = savedCredentials;
+ }
+ },
+
+ /**
+ * Saves the credentials to storage
+ * @return a promise for the saving of credentials to storage
+ */
+ save: function () {
+ return storage.saveCredentials(credentialCache);
+ },
+
+ /**
+ * Gets the credential definition for the given node type
+ * @param type the node type
+ * @return the credential definition
+ */
+ getDefinition: function (type) {
+ return credentialsDef[type];
+ }
+}
diff --git a/dgbuilder/red/nodes/flows.js b/dgbuilder/red/nodes/flows.js
new file mode 100644
index 0000000..b0b5d51
--- /dev/null
+++ b/dgbuilder/red/nodes/flows.js
@@ -0,0 +1,220 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var util = require("util");
+var when = require("when");
+
+var typeRegistry = require("./registry");
+var credentials = require("./credentials");
+var log = require("../log");
+var events = require("../events");
+
+var storage = null;
+
+var nodes = {};
+var activeConfig = [];
+var missingTypes = [];
+
+events.on('type-registered',function(type) {
+ if (missingTypes.length > 0) {
+ var i = missingTypes.indexOf(type);
+ if (i != -1) {
+ missingTypes.splice(i,1);
+ util.log("[red] Missing type registered: "+type);
+ if (missingTypes.length === 0) {
+ parseConfig();
+ }
+ }
+ }
+});
+
+/**
+ * Parses the current activeConfig and creates the required node instances
+ */
+function parseConfig() {
+ var i;
+ var nt;
+ missingTypes = [];
+
+ // Scan the configuration for any unknown node types
+ for (i=0;i<activeConfig.length;i++) {
+ var type = activeConfig[i].type;
+ // TODO: remove workspace in next release+1
+ if (type != "workspace" && type != "tab") {
+ nt = typeRegistry.get(type);
+ if (!nt && missingTypes.indexOf(type) == -1) {
+ missingTypes.push(type);
+ }
+ }
+ }
+ // Abort if there are any missing types
+ if (missingTypes.length > 0) {
+ util.log("[red] Waiting for missing types to be registered:");
+ for (i=0;i<missingTypes.length;i++) {
+ util.log("[red] - "+missingTypes[i]);
+ }
+ return;
+ }
+
+ util.log("[red] Starting flows");
+ events.emit("nodes-starting");
+
+ // Instantiate each node in the flow
+ for (i=0;i<activeConfig.length;i++) {
+ var nn = null;
+ // TODO: remove workspace in next release+1
+ if (activeConfig[i].type != "workspace" && activeConfig[i].type != "tab") {
+ nt = typeRegistry.get(activeConfig[i].type);
+ if (nt) {
+ try {
+ nn = new nt(activeConfig[i]);
+ }
+ catch (err) {
+ util.log("[red] "+activeConfig[i].type+" : "+err);
+ }
+ }
+ // console.log(nn);
+ if (nn === null) {
+ util.log("[red] unknown type: "+activeConfig[i].type);
+ }
+ }
+ }
+ // Clean up any orphaned credentials
+ credentials.clean(flowNodes.get);
+ events.emit("nodes-started");
+}
+
+/**
+ * Stops the current activeConfig
+ */
+function stopFlows() {
+ if (activeConfig&&activeConfig.length > 0) {
+ util.log("[red] Stopping flows");
+ }
+ return flowNodes.clear();
+}
+
+var flowNodes = module.exports = {
+ init: function(_storage) {
+ storage = _storage;
+ },
+
+ /**
+ * Load the current activeConfig from storage and start it running
+ * @return a promise for the loading of the config
+ */
+ load: function() {
+ return storage.getFlows().then(function(flows) {
+ return credentials.load().then(function() {
+ activeConfig = flows;
+ if (activeConfig && activeConfig.length > 0) {
+ parseConfig();
+ }
+ });
+ }).otherwise(function(err) {
+ util.log("[red] Error loading flows : "+err);
+ });
+ },
+
+ /**
+ * Add a node to the current active set
+ * @param n the node to add
+ */
+ add: function(n) {
+ nodes[n.id] = n;
+ n.on("log",log.log);
+ },
+
+ /**
+ * Get a node
+ * @param i the node id
+ * @return the node
+ */
+ get: function(i) {
+ return nodes[i];
+ },
+
+ /**
+ * Stops all active nodes and clears the active set
+ * @return a promise for the stopping of all active nodes
+ */
+ clear: function() {
+ return when.promise(function(resolve) {
+ events.emit("nodes-stopping");
+ var promises = [];
+ for (var n in nodes) {
+ if (nodes.hasOwnProperty(n)) {
+ try {
+ var p = nodes[n].close();
+ if (p) {
+ promises.push(p);
+ }
+ } catch(err) {
+ nodes[n].error(err);
+ }
+ }
+ }
+ when.settle(promises).then(function() {
+ events.emit("nodes-stopped");
+ nodes = {};
+ resolve();
+ });
+ });
+ },
+
+ /**
+ * Provides an iterator over the active set of nodes
+ * @param cb a function to be called for each node in the active set
+ */
+ each: function(cb) {
+ for (var n in nodes) {
+ if (nodes.hasOwnProperty(n)) {
+ cb(nodes[n]);
+ }
+ }
+ },
+
+ /**
+ * @return the active configuration
+ */
+ getFlows: function() {
+ return activeConfig;
+ },
+
+ /**
+ * Sets the current active config.
+ * @param config the configuration to enable
+ * @return a promise for the starting of the new flow
+ */
+ setFlows: function (config) {
+ // Extract any credential updates
+ for (var i=0; i<config.length; i++) {
+ var node = config[i];
+ if (node.credentials) {
+ credentials.extract(node);
+ delete node.credentials;
+ }
+ }
+ return credentials.save()
+ .then(function() { return storage.saveFlows(config);})
+ .then(function() { return stopFlows();})
+ .then(function () {
+ activeConfig = config;
+ parseConfig();
+ });
+ },
+ stopFlows: stopFlows
+};
diff --git a/dgbuilder/red/nodes/index.js b/dgbuilder/red/nodes/index.js
new file mode 100644
index 0000000..3d5ad71
--- /dev/null
+++ b/dgbuilder/red/nodes/index.js
@@ -0,0 +1,134 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+var registry = require("./registry");
+var credentials = require("./credentials");
+var flows = require("./flows");
+var Node = require("./Node");
+
+/**
+ * Registers a node constructor
+ * @param type - the string type name
+ * @param constructor - the constructor function for this node type
+ * @param opts - optional additional options for the node
+ */
+function registerType(type,constructor,opts) {
+ if (opts && opts.credentials) {
+ credentials.register(type,opts.credentials);
+ }
+ registry.registerType(type,constructor);
+}
+
+/**
+ * Called from a Node's constructor function, invokes the super-class
+ * constructor and attaches any credentials to the node.
+ * @param node the node object being created
+ * @param def the instance definition for the node
+ */
+function createNode(node,def) {
+ Node.call(node,def);
+ var creds = credentials.get(node.id);
+ if (creds) {
+ node.credentials = creds;
+ }
+}
+
+function init(_settings,storage) {
+ credentials.init(storage);
+ flows.init(storage);
+ registry.init(_settings);
+}
+
+function checkTypeInUse(id) {
+ var nodeInfo = registry.getNodeInfo(id);
+ if (!nodeInfo) {
+ throw new Error("Unrecognised id: "+info);
+ }
+ var inUse = {};
+ flows.each(function(n) {
+ inUse[n.type] = (inUse[n.type]||0)+1;
+ });
+ var nodesInUse = [];
+ nodeInfo.types.forEach(function(t) {
+ if (inUse[t]) {
+ nodesInUse.push(t);
+ }
+ });
+ if (nodesInUse.length > 0) {
+ var msg = nodesInUse.join(", ");
+ throw new Error("Type in use: "+msg);
+ }
+}
+
+function removeNode(id) {
+ checkTypeInUse(id);
+ return registry.removeNode(id);
+}
+
+function removeModule(module) {
+ var info = registry.getNodeModuleInfo(module);
+ for (var i=0;i<info.nodes.length;i++) {
+ checkTypeInUse(info.nodes[i]);
+ }
+ return registry.removeModule(module);
+}
+
+
+function disableNode(id) {
+ checkTypeInUse(id);
+ return registry.disableNode(id);
+}
+
+module.exports = {
+ // Lifecycle
+ init: init,
+ load: registry.load,
+
+ // Node registry
+ createNode: createNode,
+ getNode: flows.get,
+
+ addNode: registry.addNode,
+ removeNode: removeNode,
+
+ addModule: registry.addModule,
+ removeModule: removeModule,
+
+ enableNode: registry.enableNode,
+ disableNode: disableNode,
+
+ // Node type registry
+ registerType: registerType,
+ getType: registry.get,
+ getNodeInfo: registry.getNodeInfo,
+ getNodeModuleInfo: registry.getNodeModuleInfo,
+ getNodeList: registry.getNodeList,
+ getNodeConfigs: registry.getNodeConfigs,
+ getNodeConfig: registry.getNodeConfig,
+ clearRegistry: registry.clear,
+ cleanNodeList: registry.cleanNodeList,
+
+ // Flow handling
+ loadFlows: flows.load,
+ stopFlows: flows.stopFlows,
+ setFlows: flows.setFlows,
+ getFlows: flows.getFlows,
+
+ // Credentials
+ addCredentials: credentials.add,
+ getCredentials: credentials.get,
+ deleteCredentials: credentials.delete
+}
+
diff --git a/dgbuilder/red/nodes/registry.js b/dgbuilder/red/nodes/registry.js
new file mode 100644
index 0000000..f2073af
--- /dev/null
+++ b/dgbuilder/red/nodes/registry.js
@@ -0,0 +1,693 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var util = require("util");
+var when = require("when");
+var whenNode = require('when/node');
+var fs = require("fs");
+var path = require("path");
+var crypto = require("crypto");
+var UglifyJS = require("uglify-js");
+
+var events = require("../events");
+
+var Node;
+var settings;
+
+function filterNodeInfo(n) {
+ var r = {
+ id: n.id,
+ name: n.name,
+ types: n.types,
+ enabled: n.enabled
+ }
+ if (n.hasOwnProperty("loaded")) {
+ r.loaded = n.loaded;
+ }
+ if (n.hasOwnProperty("module")) {
+ r.module = n.module;
+ }
+ if (n.hasOwnProperty("err")) {
+ r.err = n.err.toString();
+ }
+ return r;
+}
+
+var registry = (function() {
+ var nodeConfigCache = null;
+ var nodeConfigs = {};
+ var nodeList = [];
+ var nodeConstructors = {};
+ var nodeTypeToId = {};
+ var nodeModules = {};
+
+ function saveNodeList() {
+ var nodeList = {};
+
+ for (var i in nodeConfigs) {
+ if (nodeConfigs.hasOwnProperty(i)) {
+ var nodeConfig = nodeConfigs[i];
+ var n = filterNodeInfo(nodeConfig);
+ n.file = nodeConfig.file;
+ delete n.loaded;
+ delete n.err;
+ delete n.file;
+ delete n.id;
+ nodeList[i] = n;
+ }
+ }
+ if (settings.available()) {
+ return settings.set("nodes",nodeList);
+ } else {
+ return when.reject("Settings unavailable");
+ }
+ }
+
+ return {
+ init: function() {
+ if (settings.available()) {
+ nodeConfigs = settings.get("nodes")||{};
+ // Restore the node id property to individual entries
+ for (var id in nodeConfigs) {
+ if (nodeConfigs.hasOwnProperty(id)) {
+ nodeConfigs[id].id = id;
+ }
+ }
+ } else {
+ nodeConfigs = {};
+ }
+ nodeModules = {};
+ nodeTypeToId = {};
+ nodeConstructors = {};
+ nodeList = [];
+ nodeConfigCache = null;
+ },
+
+ addNodeSet: function(id,set) {
+ if (!set.err) {
+ set.types.forEach(function(t) {
+ nodeTypeToId[t] = id;
+ });
+ }
+
+ if (set.module) {
+ nodeModules[set.module] = nodeModules[set.module]||{nodes:[]};
+ nodeModules[set.module].nodes.push(id);
+ }
+
+ nodeConfigs[id] = set;
+ nodeList.push(id);
+ nodeConfigCache = null;
+ },
+ removeNode: function(id) {
+ var config = nodeConfigs[id];
+ if (!config) {
+ throw new Error("Unrecognised id: "+id);
+ }
+ delete nodeConfigs[id];
+ var i = nodeList.indexOf(id);
+ if (i > -1) {
+ nodeList.splice(i,1);
+ }
+ config.types.forEach(function(t) {
+ delete nodeConstructors[t];
+ delete nodeTypeToId[t];
+ });
+ config.enabled = false;
+ config.loaded = false;
+ nodeConfigCache = null;
+ return filterNodeInfo(config);
+ },
+ removeModule: function(module) {
+ if (!settings.available()) {
+ throw new Error("Settings unavailable");
+ }
+ var nodes = nodeModules[module];
+ if (!nodes) {
+ throw new Error("Unrecognised module: "+module);
+ }
+ var infoList = [];
+ for (var i=0;i<nodes.nodes.length;i++) {
+ infoList.push(registry.removeNode(nodes.nodes[i]));
+ }
+ delete nodeModules[module];
+ saveNodeList();
+ return infoList;
+ },
+ getNodeInfo: function(typeOrId) {
+ if (nodeTypeToId[typeOrId]) {
+ return filterNodeInfo(nodeConfigs[nodeTypeToId[typeOrId]]);
+ } else if (nodeConfigs[typeOrId]) {
+ return filterNodeInfo(nodeConfigs[typeOrId]);
+ }
+ return null;
+ },
+ getNodeList: function() {
+ var list = [];
+ for (var id in nodeConfigs) {
+ if (nodeConfigs.hasOwnProperty(id)) {
+ list.push(filterNodeInfo(nodeConfigs[id]))
+ }
+ }
+ return list;
+ },
+ registerNodeConstructor: function(type,constructor) {
+ if (nodeConstructors[type]) {
+ throw new Error(type+" already registered");
+ }
+ //TODO: Ensure type is known - but doing so will break some tests
+ // that don't have a way to register a node template ahead
+ // of registering the constructor
+ util.inherits(constructor,Node);
+ nodeConstructors[type] = constructor;
+ events.emit("type-registered",type);
+ },
+
+
+ /**
+ * Gets all of the node template configs
+ * @return all of the node templates in a single string
+ */
+ getAllNodeConfigs: function() {
+ if (!nodeConfigCache) {
+ var result = "";
+ var script = "";
+ for (var i=0;i<nodeList.length;i++) {
+ var config = nodeConfigs[nodeList[i]];
+ if (config.enabled && !config.err) {
+ result += config.config;
+ script += config.script;
+ }
+ }
+ if (script.length > 0) {
+ result += '<script type="text/javascript">';
+ result += UglifyJS.minify(script, {fromString: true}).code;
+ result += '</script>';
+ }
+ nodeConfigCache = result;
+ }
+ return nodeConfigCache;
+ },
+
+ getNodeConfig: function(id) {
+ var config = nodeConfigs[id];
+ if (config) {
+ var result = config.config;
+ if (config.script) {
+ result += '<script type="text/javascript">'+config.script+'</script>';
+ }
+ return result;
+ } else {
+ return null;
+ }
+ },
+
+ getNodeConstructor: function(type) {
+ var config = nodeConfigs[nodeTypeToId[type]];
+ if (!config || (config.enabled && !config.err)) {
+ return nodeConstructors[type];
+ }
+ return null;
+ },
+
+ clear: function() {
+ nodeConfigCache = null;
+ nodeConfigs = {};
+ nodeList = [];
+ nodeConstructors = {};
+ nodeTypeToId = {};
+ },
+
+ getTypeId: function(type) {
+ return nodeTypeToId[type];
+ },
+
+ getModuleInfo: function(type) {
+ return nodeModules[type];
+ },
+
+ enableNodeSet: function(id) {
+ if (!settings.available()) {
+ throw new Error("Settings unavailable");
+ }
+ var config = nodeConfigs[id];
+ if (config) {
+ delete config.err;
+ config.enabled = true;
+ if (!config.loaded) {
+ // TODO: honour the promise this returns
+ loadNodeModule(config);
+ }
+ nodeConfigCache = null;
+ saveNodeList();
+ } else {
+ throw new Error("Unrecognised id: "+id);
+ }
+ return filterNodeInfo(config);
+ },
+
+ disableNodeSet: function(id) {
+ if (!settings.available()) {
+ throw new Error("Settings unavailable");
+ }
+ var config = nodeConfigs[id];
+ if (config) {
+ // TODO: persist setting
+ config.enabled = false;
+ nodeConfigCache = null;
+ saveNodeList();
+ } else {
+ throw new Error("Unrecognised id: "+id);
+ }
+ return filterNodeInfo(config);
+ },
+
+ saveNodeList: saveNodeList,
+
+ cleanNodeList: function() {
+ var removed = false;
+ for (var id in nodeConfigs) {
+ if (nodeConfigs.hasOwnProperty(id)) {
+ if (nodeConfigs[id].module && !nodeModules[nodeConfigs[id].module]) {
+ registry.removeNode(id);
+ removed = true;
+ }
+ }
+ }
+ if (removed) {
+ saveNodeList();
+ }
+ }
+ }
+})();
+
+
+
+function init(_settings) {
+ Node = require("./Node");
+ settings = _settings;
+ registry.init();
+}
+
+/**
+ * Synchronously walks the directory looking for node files.
+ * Emits 'node-icon-dir' events for an icon dirs found
+ * @param dir the directory to search
+ * @return an array of fully-qualified paths to .js files
+ */
+function getNodeFiles(dir) {
+ var result = [];
+ var files = [];
+ try {
+ files = fs.readdirSync(dir);
+ } catch(err) {
+ return result;
+ }
+ files.sort();
+ files.forEach(function(fn) {
+ var stats = fs.statSync(path.join(dir,fn));
+ if (stats.isFile()) {
+ if (/\.js$/.test(fn)) {
+ var valid = true;
+ if (settings.nodesExcludes) {
+ for (var i=0;i<settings.nodesExcludes.length;i++) {
+ if (settings.nodesExcludes[i] == fn) {
+ valid = false;
+ break;
+ }
+ }
+ }
+ valid = valid && fs.existsSync(path.join(dir,fn.replace(/\.js$/,".html")))
+
+ if (valid) {
+ result.push(path.join(dir,fn));
+ }
+ }
+ } else if (stats.isDirectory()) {
+ // Ignore /.dirs/, /lib/ /node_modules/
+ if (!/^(\..*|lib|icons|node_modules|test)$/.test(fn)) {
+ result = result.concat(getNodeFiles(path.join(dir,fn)));
+ } else if (fn === "icons") {
+ events.emit("node-icon-dir",path.join(dir,fn));
+ }
+ }
+ });
+ return result;
+}
+
+/**
+ * Scans the node_modules path for nodes
+ * @param moduleName the name of the module to be found
+ * @return a list of node modules: {dir,package}
+ */
+function scanTreeForNodesModules(moduleName) {
+ var dir = __dirname+"/../../nodes";
+ var results = [];
+ var up = path.resolve(path.join(dir,".."));
+ while (up !== dir) {
+ var pm = path.join(dir,"node_modules");
+ try {
+ var files = fs.readdirSync(pm);
+ for (var i=0;i<files.length;i++) {
+ var fn = files[i];
+ if (!registry.getModuleInfo(fn)) {
+ if (!moduleName || fn == moduleName) {
+ var pkgfn = path.join(pm,fn,"package.json");
+ try {
+ var pkg = require(pkgfn);
+ if (pkg['node-red']) {
+ var moduleDir = path.join(pm,fn);
+ results.push({dir:moduleDir,package:pkg});
+ }
+ } catch(err) {
+ if (err.code != "MODULE_NOT_FOUND") {
+ // TODO: handle unexpected error
+ }
+ }
+ if (fn == moduleName) {
+ break;
+ }
+ }
+ }
+ }
+ } catch(err) {
+ }
+
+ dir = up;
+ up = path.resolve(path.join(dir,".."));
+ }
+ return results;
+}
+
+/**
+ * Loads the nodes provided in an npm package.
+ * @param moduleDir the root directory of the package
+ * @param pkg the module's package.json object
+ */
+function loadNodesFromModule(moduleDir,pkg) {
+ var nodes = pkg['node-red'].nodes||{};
+ var results = [];
+ var iconDirs = [];
+ for (var n in nodes) {
+ if (nodes.hasOwnProperty(n)) {
+ var file = path.join(moduleDir,nodes[n]);
+ try {
+ results.push(loadNodeConfig(file,pkg.name,n));
+ } catch(err) {
+ }
+ var iconDir = path.join(moduleDir,path.dirname(nodes[n]),"icons");
+ if (iconDirs.indexOf(iconDir) == -1) {
+ if (fs.existsSync(iconDir)) {
+ events.emit("node-icon-dir",iconDir);
+ iconDirs.push(iconDir);
+ }
+ }
+ }
+ }
+ return results;
+}
+
+
+/**
+ * Loads a node's configuration
+ * @param file the fully qualified path of the node's .js file
+ * @param name the name of the node
+ * @return the node object
+ * {
+ * id: a unqiue id for the node file
+ * name: the name of the node file, or label from the npm module
+ * file: the fully qualified path to the node's .js file
+ * template: the fully qualified path to the node's .html file
+ * config: the non-script parts of the node's .html file
+ * script: the script part of the node's .html file
+ * types: an array of node type names in this file
+ * }
+ */
+function loadNodeConfig(file,module,name) {
+ var id = crypto.createHash('sha1').update(file).digest("hex");
+ if (module && name) {
+ var newid = crypto.createHash('sha1').update(module+":"+name).digest("hex");
+ var existingInfo = registry.getNodeInfo(id);
+ if (existingInfo) {
+ // For a brief period, id for modules were calculated incorrectly.
+ // To prevent false-duplicates, this removes the old id entry
+ registry.removeNode(id);
+ registry.saveNodeList();
+ }
+ id = newid;
+
+ }
+ var info = registry.getNodeInfo(id);
+
+ var isEnabled = true;
+
+ if (info) {
+ if (info.hasOwnProperty("loaded")) {
+ throw new Error(file+" already loaded");
+ }
+ isEnabled = info.enabled;
+ }
+
+ var node = {
+ id: id,
+ file: file,
+ template: file.replace(/\.js$/,".html"),
+ enabled: isEnabled,
+ loaded:false
+ }
+
+ if (module) {
+ node.name = module+":"+name;
+ node.module = module;
+ } else {
+ node.name = path.basename(file)
+ }
+ try {
+ var content = fs.readFileSync(node.template,'utf8');
+
+ var types = [];
+
+ var regExp = /<script ([^>]*)data-template-name=['"]([^'"]*)['"]/gi;
+ var match = null;
+
+ while((match = regExp.exec(content)) !== null) {
+ types.push(match[2]);
+ }
+ node.types = types;
+ node.config = content;
+
+ // TODO: parse out the javascript portion of the template
+ node.script = "";
+
+ for (var i=0;i<node.types.length;i++) {
+ if (registry.getTypeId(node.types[i])) {
+ node.err = node.types[i]+" already registered";
+ break;
+ }
+ }
+ } catch(err) {
+ node.types = [];
+ if (err.code === 'ENOENT') {
+ node.err = "Error: "+file+" does not exist";
+ } else {
+ node.err = err.toString();
+ }
+ }
+ registry.addNodeSet(id,node);
+ return node;
+}
+
+/**
+ * Loads all palette nodes
+ * @param defaultNodesDir optional parameter, when set, it overrides the default
+ * location of nodeFiles - used by the tests
+ * @return a promise that resolves on completion of loading
+ */
+function load(defaultNodesDir,disableNodePathScan) {
+ return when.promise(function(resolve,reject) {
+ // Find all of the nodes to load
+ var nodeFiles;
+ if(defaultNodesDir) {
+ nodeFiles = getNodeFiles(path.resolve(defaultNodesDir));
+ } else {
+ nodeFiles = getNodeFiles(__dirname+"/../../nodes");
+ }
+
+ if (settings.nodesDir) {
+ var dir = settings.nodesDir;
+ if (typeof settings.nodesDir == "string") {
+ dir = [dir];
+ }
+ for (var i=0;i<dir.length;i++) {
+ nodeFiles = nodeFiles.concat(getNodeFiles(dir[i]));
+ }
+ }
+ var nodes = [];
+ nodeFiles.forEach(function(file) {
+ try {
+ nodes.push(loadNodeConfig(file));
+ } catch(err) {
+ //
+ }
+ });
+
+ // TODO: disabling npm module loading if defaultNodesDir set
+ // This indicates a test is being run - don't want to pick up
+ // unexpected nodes.
+ // Urgh.
+ if (!disableNodePathScan) {
+ // Find all of the modules containing nodes
+ var moduleFiles = scanTreeForNodesModules();
+ moduleFiles.forEach(function(moduleFile) {
+ nodes = nodes.concat(loadNodesFromModule(moduleFile.dir,moduleFile.package));
+ });
+ }
+ var promises = [];
+ nodes.forEach(function(node) {
+ if (!node.err) {
+ promises.push(loadNodeModule(node));
+ }
+ });
+
+ //resolve([]);
+ when.settle(promises).then(function(results) {
+ // Trigger a load of the configs to get it precached
+ registry.getAllNodeConfigs();
+
+ if (settings.available()) {
+ resolve(registry.saveNodeList());
+ } else {
+ resolve();
+ }
+ });
+ });
+}
+
+/**
+ * Loads the specified node into the runtime
+ * @param node a node info object - see loadNodeConfig
+ * @return a promise that resolves to an update node info object. The object
+ * has the following properties added:
+ * err: any error encountered whilst loading the node
+ *
+ */
+function loadNodeModule(node) {
+ var nodeDir = path.dirname(node.file);
+ var nodeFn = path.basename(node.file);
+ if (!node.enabled) {
+ return when.resolve(node);
+ }
+ try {
+ var loadPromise = null;
+ var r = require(node.file);
+ if (typeof r === "function") {
+ var promise = r(require('../red'));
+ if (promise != null && typeof promise.then === "function") {
+ loadPromise = promise.then(function() {
+ node.enabled = true;
+ node.loaded = true;
+ return node;
+ }).otherwise(function(err) {
+ node.err = err;
+ return node;
+ });
+ }
+ }
+ if (loadPromise == null) {
+ node.enabled = true;
+ node.loaded = true;
+ loadPromise = when.resolve(node);
+ }
+ return loadPromise;
+ } catch(err) {
+ node.err = err;
+ return when.resolve(node);
+ }
+}
+
+function loadNodeList(nodes) {
+ var promises = [];
+ nodes.forEach(function(node) {
+ if (!node.err) {
+ promises.push(loadNodeModule(node));
+ } else {
+ promises.push(node);
+ }
+ });
+
+ return when.settle(promises).then(function(results) {
+ return registry.saveNodeList().then(function() {
+ var list = results.map(function(r) {
+ return filterNodeInfo(r.value);
+ });
+ return list;
+ });
+ });
+}
+
+function addNode(file) {
+ if (!settings.available()) {
+ throw new Error("Settings unavailable");
+ }
+ var nodes = [];
+ try {
+ nodes.push(loadNodeConfig(file));
+ } catch(err) {
+ return when.reject(err);
+ }
+ return loadNodeList(nodes);
+}
+
+function addModule(module) {
+ if (!settings.available()) {
+ throw new Error("Settings unavailable");
+ }
+ var nodes = [];
+ if (registry.getModuleInfo(module)) {
+ return when.reject(new Error("Module already loaded"));
+ }
+ var moduleFiles = scanTreeForNodesModules(module);
+ if (moduleFiles.length === 0) {
+ var err = new Error("Cannot find module '" + module + "'");
+ err.code = 'MODULE_NOT_FOUND';
+ return when.reject(err);
+ }
+ moduleFiles.forEach(function(moduleFile) {
+ nodes = nodes.concat(loadNodesFromModule(moduleFile.dir,moduleFile.package));
+ });
+ return loadNodeList(nodes);
+}
+
+module.exports = {
+ init:init,
+ load:load,
+ clear: registry.clear,
+ registerType: registry.registerNodeConstructor,
+ get: registry.getNodeConstructor,
+ getNodeInfo: registry.getNodeInfo,
+ getNodeModuleInfo: registry.getModuleInfo,
+ getNodeList: registry.getNodeList,
+ getNodeConfigs: registry.getAllNodeConfigs,
+ getNodeConfig: registry.getNodeConfig,
+ addNode: addNode,
+ removeNode: registry.removeNode,
+ enableNode: registry.enableNodeSet,
+ disableNode: registry.disableNodeSet,
+
+ addModule: addModule,
+ removeModule: registry.removeModule,
+ cleanNodeList: registry.cleanNodeList
+}
diff --git a/dgbuilder/red/red.js b/dgbuilder/red/red.js
new file mode 100644
index 0000000..2735e0d
--- /dev/null
+++ b/dgbuilder/red/red.js
@@ -0,0 +1,68 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+var server = require("./server");
+var nodes = require("./nodes");
+var library = require("./library");
+var comms = require("./comms");
+var log = require("./log");
+var util = require("./util");
+var fs = require("fs");
+var settings = require("./settings");
+var credentials = require("./nodes/credentials");
+
+var path = require('path');
+
+process.env.NODE_RED_HOME = process.env.NODE_RED_HOME || path.resolve(__dirname+"/..");
+
+var events = require("events");
+
+var RED = {
+
+ init: function(httpServer,userSettings) {
+ userSettings.version = this.version();
+ settings.init(userSettings);
+ server.init(httpServer,settings);
+ library.init();
+ return server.app;
+ },
+
+ start: server.start,
+ stop: server.stop,
+ nodes: nodes,
+ library: library,
+ credentials: credentials,
+ events: events,
+ log: log,
+ comms: comms,
+ settings:settings,
+ util: util,
+ version: function () {
+ var p = require(path.join(process.env.NODE_RED_HOME,"package.json"));
+ if (fs.existsSync(path.join(process.env.NODE_RED_HOME,".git"))) {
+ return p.version+".git";
+ } else {
+ return p.version;
+ }
+ }
+};
+
+RED.__defineGetter__("app", function() { console.log("Deprecated use of RED.app - use RED.httpAdmin instead"); return server.app });
+RED.__defineGetter__("httpAdmin", function() { return server.app });
+RED.__defineGetter__("httpNode", function() { return server.nodeApp });
+RED.__defineGetter__("server", function() { return server.server });
+
+module.exports = RED;
diff --git a/dgbuilder/red/server.js b/dgbuilder/red/server.js
new file mode 100644
index 0000000..01a769e
--- /dev/null
+++ b/dgbuilder/red/server.js
@@ -0,0 +1,1317 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+
+var express = require('express');
+var util = require('util');
+var multer = require('multer');
+var when = require('when');
+var exec = require('child_process').exec;
+
+var createUI = require("./ui");
+var redNodes = require("./nodes");
+var comms = require("./comms");
+var storage = require("./storage");
+var fs=require('fs');
+var path = require("path");
+var app = null;
+var nodeApp = null;
+var server = null;
+var settings = null;
+
+var flowShareUsers = require("../flowShareUsers");
+
+//console.dir(flowShareUsers);
+
+function createServer(_server,_settings) {
+ server = _server;
+ settings = _settings;
+
+ comms.init(_server,_settings);
+
+ nodeApp = express();
+ app = express();
+
+ if (settings.httpAdminRoot !== false) {
+
+
+ if (!settings.disableEditor) {
+ createUI(settings,app);
+ }
+
+ var slaActions = require("./sla");
+
+ app.get("/flows",function(req,res) {
+ res.json(redNodes.getFlows());
+ });
+
+ app.get("/loadJSFiles",function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var generatedJSDir=appDir + "/generatedJS";
+ var glob = require("glob")
+ glob(generatedJSDir + "/**/*.js", null, function (er, files) {
+ // files is an array of filenames.
+ // If the `nonull` option is set, and nothing
+ // was found, then files is ["**/*.js"]
+ // er is an error object or null.
+ //console.dir(files);
+ var sliValuesObj =[];
+ for(var i=0;files!= null && i<files.length;i++){
+ var f = files[i].replace( new RegExp(generatedJSDir + "/", "g" ), "" );
+ console.log("loading file " + f);
+ try{
+ sliValuesObj.push(require(files[i]));
+ //console.dir(sliValuesObj);
+ }catch(err){
+ console.log("Error:Could not load file " + files[i]);
+ }
+ }
+ res.json({"sliValuesObj" : sliValuesObj});
+ });
+ });
+
+ app.get("/loadSelectedModules",function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + settings.userDir;
+ var generatedJSDir=appDir + "/generatedJS";
+ //console.dir(req);
+ var selectedModulesStr = req.query.selectedModules;
+ var selectedModules = [];
+ if(selectedModulesStr != undefined && selectedModulesStr != null){
+ selectedModules = selectedModulesStr.split(",");
+ }
+ console.log(selectedModules);
+ var loaded_modules = {"selected_modules" :selectedModules};
+ var file = userDir + "/selected_modules";
+ var content = "module.exports=\n" + JSON.stringify(loaded_modules);
+ try{
+ fs.writeFileSync(file, content, 'utf8');
+ }catch(err){
+ console.log("could not write to file " + file);
+ }
+ var sliValuesObj =[];
+ for(var i=0;selectedModules!= null && i<selectedModules.length;i++){
+ var f = generatedJSDir + "/" + selectedModules[i] + "_inputs.js";
+ try{
+ delete require.cache[require.resolve(f)]
+ require.resolve();
+ }catch(err){
+ console.log("error deleting loaded module " + f + " from cache");
+ }
+ //console.log("loading file " + f);
+ try{
+ sliValuesObj.push(require(f));
+ }catch(err){
+ console.log("Error:Could not load file " + f);
+ }
+ }
+ //console.dir(sliValuesObj);
+ res.json({"sliValuesObj" : sliValuesObj});
+ });
+
+ app.get("/initialLoadSelectedModules",function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + settings.userDir;
+ var generatedJSDir=appDir + "/generatedJS";
+ var file = userDir + "/selected_modules";
+ var sliValuesObj =[];
+ var selected_modules = [];
+ var selectedModules;
+ try{
+ selectedModules = require(file);
+ selected_modules=selectedModules["selected_modules"];
+ //console.log("selected_modules are ");
+ //console.dir(selected_modules);
+ }catch(err){
+ console.log("Could not load the file " + file);
+ }
+ for(var i=0;selected_modules!= null && i<selected_modules.length;i++){
+ var f = generatedJSDir + "/" + selected_modules[i] + "_inputs.js";
+ console.log("loading file " + f);
+ try{
+ sliValuesObj.push(require(f));
+ }catch(err){
+ console.log("Error:Could not load file " + f);
+ }
+ }
+ res.json({"sliValuesObj" : sliValuesObj});
+ });
+
+ app.get("/listAvailableModules",function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + settings.userDir;
+ var generatedJSDir=appDir + "/generatedJS";
+ var glob = require("glob")
+ var file = userDir + "/selected_modules";
+ var selected_modules = [];
+ var selectedModules;
+ try{
+ delete require.cache[require.resolve(file)]
+ require.resolve();
+ }catch(err){
+ console.log("error deleting loaded module " + file + " from cache");
+ }
+ try{
+ selectedModules = require(file);
+ selected_modules=selectedModules["selected_modules"];
+ console.log("selected_modules are ");
+ //console.dir(selected_modules);
+ }catch(err){
+ console.log("Could not load the file " + file);
+ }
+ glob(generatedJSDir + "/**/*.js", null, function (er, files) {
+ var filesList =[];
+ for(var i=0;files!= null && i<files.length;i++){
+ var f = files[i].replace( new RegExp(generatedJSDir + "/", "g" ), "" );
+ f = f.replace("_inputs.js","");
+ if(selected_modules != undefined && selected_modules != null && selected_modules.indexOf(f) != -1){
+ filesList.push(f + ":checked");
+ }else{
+ filesList.push(f + ":unchecked");
+ }
+ }
+ res.json({"files" : filesList});
+ });
+ });
+
+ app.get("/listSLA",function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + settings.userDir;
+ var settingsFile = userDir + "/customSettings.js";
+ var jsonObj = require(settingsFile);
+ slaActions.listSLA(jsonObj,req,res);
+ });
+
+ app.get("/listCurrentDGs",function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + settings.userDir;
+ var settingsFile = userDir + "/customSettings.js";
+ var jsonObj = require(settingsFile);
+ slaActions.listCurrentDGs(jsonObj,req,res);
+ });
+
+ app.get("/activateDG",function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + settings.userDir;
+ var settingsFile = userDir + "/customSettings.js";
+ var jsonObj = require(settingsFile);
+ slaActions.activateDG(jsonObj,req,res);
+ });
+
+ app.get("/deActivateDG",function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + settings.userDir;
+ var settingsFile = userDir + "/customSettings.js";
+ var jsonObj = require(settingsFile);
+ slaActions.deActivateDG(jsonObj,req,res);
+ });
+
+ app.get("/deleteDG",function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + settings.userDir;
+ var settingsFile = userDir + "/customSettings.js";
+ var jsonObj = require(settingsFile);
+ slaActions.deleteDG(jsonObj,req,res);
+ });
+
+ app.get("/getCurrentSettings",function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + settings.userDir;
+ //console.log("userDir:" + userDir);
+ var settingsFile = userDir + "/customSettings.js";
+ var jsonObj = require(settingsFile);
+ res.json(jsonObj);
+ });
+
+ app.get("/getCommitsInfo", function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + settings.userDir;
+ //console.dir(req);
+ var filePath = req.query.filePath;
+ var fullFilePath = userDir + "/codecloud/" + filePath ;
+ //console.log("fullFilePath:" + fullFilePath);
+ var exec = require('child_process').exec;
+ var commandToExec = appDir + "/git_scripts/gitlog " + fullFilePath ;
+ console.log("commandToExec:" + commandToExec);
+ var child = exec(commandToExec ,function (error,stdout,stderr){
+ if(error){
+ console.log("Error occured:" + error);
+ if(stderr){
+ //console.log("stderr:" + stderr);
+ res.send(500,{'error':error,'stderr':stderr});
+ }else{
+ res.send(500,{'error':error});
+ }
+ //console.log("stdout :" + stdout);
+ }else{
+ if(stderr){
+ console.log("stderr:" + stderr);
+ }
+ if(stdout){
+ //console.log("output:" + stdout);
+ res.send(200,{'stdout':stdout,'stderr':stderr});
+ }
+ }
+ });
+ });
+
+ app.get("/importCodeCloudFlow",
+ function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + settings.userDir;
+ //console.dir(req);
+ var commitId = req.query.commitId;
+ var filePath = req.query.filePath;
+ var fullFilePath = userDir + "/codecloud/" + filePath ;
+ //console.log("fullFilePath:" + fullFilePath);
+ var exec = require('child_process').exec;
+ var commandToExec = appDir + "/git_scripts/gitckout " + commitId + " " + fullFilePath ;
+ console.log("commandToExec:" + commandToExec);
+ var child = exec(commandToExec ,{maxBuffer: 1024 * 1024 * 16}, function (error,stdout,stderr){
+ if(error){
+ console.log("Error occured:" + error);
+ if(stderr){
+ //console.log("stderr:" + stderr);
+ res.send(500,{'error':error,'stderr':stderr});
+ }else{
+ res.send(500,{'error':error});
+ }
+ }else{
+ if(stderr){
+ console.log("stderr:" + stderr);
+ }
+ if(stdout){
+ //console.log("output:" + stdout);
+ res.send(200,{'stdout':stdout,'stderr':stderr});
+ }
+ }
+ });
+ });
+
+ app.get("/importGitLocalFlow",
+ function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var gitLocalRepository = settings.gitLocalRepository;
+ //console.dir(req);
+ var filePath = req.query.filePath;
+ var fullFilePath = gitLocalRepository +"/" + filePath ;
+ //console.log("fullFilePath:" + fullFilePath);
+ var exec = require('child_process').exec;
+ var commandToExec = "cat " + fullFilePath ;
+ console.log("commandToExec:" + commandToExec);
+ var child = exec(commandToExec ,{maxBuffer: 1024 * 1024 * 16}, function (error,stdout,stderr){
+ if(error){
+ console.log("Error occured:" + error);
+ if(stderr){
+ //console.log("stderr:" + stderr);
+ res.send(500,{'error':error,'stderr':stderr});
+ }else{
+ res.send(500,{'error':error});
+ }
+ }else{
+ if(stderr){
+ console.log("stderr:" + stderr);
+ }
+ if(stdout){
+ //console.log("output:" + stdout);
+ res.send(200,{'stdout':stdout,'stderr':stderr});
+ }
+ }
+ });
+ });
+
+
+ app.get("/gitcheckout", function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var gitLocalRepository = settings.gitLocalRepository;
+ //console.dir(req);
+ var branch = req.query.branch;
+ //console.log("fullFilePath:" + fullFilePath);
+ var exec = require('child_process').exec;
+ var commandToExec = appDir + "/git_scripts/gitcheckout " + gitLocalRepository + " " + branch ;
+ console.log("commandToExec:" + commandToExec);
+ var child = exec(commandToExec ,function (error,stdout,stderr){
+ if(error){
+ console.log("Error occured:" + error);
+ if(stderr){
+ console.log("stderr:" + stderr);
+ res.json({"output":stderr});
+ }else{
+ res.json({"output":error});
+ }
+ }else{
+ if(stderr){
+ console.log("stderr:" + stderr);
+ }
+ if(stdout){
+ res.json({"output": stderr + " " + stdout});
+ }
+ }
+ });
+ });
+
+ app.get("/gitpull", function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var gitLocalRepository = settings.gitLocalRepository;
+ //console.dir(req);
+ var branch = req.query.branch;
+ //console.log("fullFilePath:" + fullFilePath);
+ var exec = require('child_process').exec;
+ var commandToExec = appDir + "/git_scripts/gitpull " + gitLocalRepository ;
+ console.log("commandToExec:" + commandToExec);
+ var child = exec(commandToExec ,function (error,stdout,stderr){
+ if(error){
+ console.log("Error occured:" + error);
+ if(stderr){
+ console.log("stderr:" + stderr);
+ res.json({"output":stderr});
+ }else{
+ res.json({"output":error});
+ }
+ }else{
+ if(stderr){
+ console.log("stderr:" + stderr);
+ }
+ if(stdout){
+ res.json({"output": stderr + " " + stdout});
+ }
+ }
+ });
+ });
+
+ app.get("/gitstatus", function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var gitLocalRepository = settings.gitLocalRepository;
+ //console.dir(req);
+ var branch = req.query.branch;
+ //console.log("fullFilePath:" + fullFilePath);
+ var exec = require('child_process').exec;
+ var commandToExec = appDir + "/git_scripts/gitstatus " + gitLocalRepository ;
+ console.log("commandToExec:" + commandToExec);
+ var child = exec(commandToExec ,function (error,stdout,stderr){
+ if(error){
+ console.log("Error occured:" + error);
+ if(stderr){
+ console.log("stderr:" + stderr);
+ res.json({"output":stderr});
+ }else{
+ res.json({"output":error});
+ }
+ }else{
+ if(stderr){
+ console.log("stderr:" + stderr);
+ }
+ if(stdout){
+ res.json({"output": stderr + " " + stdout});
+ }
+ }
+ });
+ });
+
+ app.post("/getSharedFlow",
+ express.json(),
+ function(req,res) {
+ var qs = require('querystring');
+ var body = '';
+ req.on('data', function (data) {
+ body += data;
+ });
+ req.on('end', function () {
+ var post = qs.parse(body);
+ //console.log("body:" + body);
+ fs.readFile(post.filePath, 'utf8', function (err,data) {
+ if (err) {
+ return console.log(err);
+ }
+ res.json(data);
+ //console.log(data);
+ });
+ //res.sendFile(body.filePath);
+ });
+ });
+
+ app.post("/downloadYang",
+ express.json(),
+ function(req,res) {
+ var qs = require('querystring');
+ var body = '';
+ req.on('data', function (data) {
+ body += data;
+ });
+ req.on('end', function () {
+ var post = qs.parse(body);
+ var fileName = post.fileName;
+ var appDir = path.dirname(require.main.filename);
+ var yangDir = appDir + "/yangFiles" ;
+ var fullPathToFile = yangDir + "/" + fileName;
+ res.setHeader('Content-disposition', 'attachment; filename=' + fileName);
+ res.setHeader('Content-type', 'application/yang');
+ res.download(fullPathToFile);
+ });
+ });
+
+ function writeToFile(fullPathToFileName,str){
+ try{
+ fs.writeFileSync(fullPathToFileName,str);
+ }catch(e){
+ console.log("Error:" + e);
+ }
+ }
+ function getCurrentDate(){
+ var d = new Date();
+ var mm = d.getMonth() + 1;
+ var dd = d.getDate();
+ var yyyy = d.getYear() + 1900;
+ var hr = d.getHours();
+ var min = d.getMinutes();
+ var sec = d.getSeconds();
+ if(mm<10) mm = "0" + mm;
+ if(dd<10) dd = "0" + dd;
+ if(hr<10) hr = "0" + hr;
+ if(min<10) min = "0" + min;
+ if(sec<10) sec = "0" + sec;
+ var formatedValue = mm + "-" + dd + "-" + yyyy + "_" + hr + "" + min + "" + sec;
+ return formatedValue;
+ }
+
+
+ app.post("/downloadXml",
+ express.json({'limit':'16mb'}),
+ function(req,res) {
+ //console.log("Received request and processing:" + new Date());
+ var qs = require('querystring');
+ var body = '';
+ //var msecs1= Date.now();
+ req.on('data', function (data) {
+ body += data;
+ });
+ req.on('end', function () {
+ var appDir = path.dirname(require.main.filename);
+ var xmlDir = appDir + "/" + settings.xmlPath;
+ //var msecs2= Date.now();
+ //console.log("Time taken to get request body:" + (msecs2 - msecs1));
+ var msecs3= Date.now();
+ var post = qs.parse(body);
+ var msecs4= Date.now();
+ //console.log("Time taken to parse body:" + (msecs4 - msecs3));
+ var xml = post['flowXml'];
+ //var pd = require('pretty-data').pd;
+ //var formatted_xml = pd.xml(xml);
+ var moduleName = post['moduleName'];
+ var methodName = post['methodName'];
+ if(moduleName == "" || methodName == ""){
+ res.send({"ERROR":"ServiceLogic Module Name and method name are required."});
+ }else{
+ //var formatted_date = getCurrentDate();
+ //var fileNameForServer=moduleName + "_" +methodName+ "_" + formatted_date + ".xml";
+ //var fileName=moduleName + "_method_" +methodName+ ".xml";
+ var fileName=moduleName + "_" +methodName+ ".xml";
+ var file = xmlDir + "/" + fileName;
+
+ //var msecs2= Date.now();
+ writeToFile(file,xml);
+ //var msecs3= Date.now();
+ //console.log("Time taken to write File:" + (msecs3 - msecs2));
+ res.setHeader('Content-disposition', 'attachment; filename=' + fileName);
+ res.setHeader('Content-type', 'text/xml');
+ res.end(xml);
+ //console.log("Response sent:" + new Date());
+ }
+ });
+ });
+
+ app.post("/downloadJson",
+ express.json({'limit':'16mb'}),
+ function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var sharedDir = appDir + "/" + settings.sharedDir;
+ var qs = require('querystring');
+ var body = '';
+ req.on('data', function (data) {
+ body += data;
+ });
+ req.on('end', function () {
+ var post = qs.parse(body);
+ var jsonStr = post['flowJson'];
+ var moduleName = post['moduleName'];
+ var methodName = post['methodName'];
+ //console.log("jsonStr:" + jsonStr);
+ if(moduleName == "" || methodName == ""){
+ res.send({"ERROR":"ServiceLogic Module Name and method name are required."});
+ }else{
+ var formatted_date = getCurrentDate();
+ //console.log("moduleName:" + moduleName);
+ //console.log("methodName:" + methodName);
+
+ //var fileName=moduleName + "_method_" +methodName + ".json";
+ //var renameOldfileTo=moduleName + "_method_" +methodName+ "_" + formatted_date + ".json";
+ var fileName=moduleName + "_" +methodName + ".json";
+ var renameOldfileTo=moduleName + "_" +methodName+ "_" + formatted_date + ".json";
+ var file = sharedDir + "/" + fileName;
+ //console.log("fileName:" + fileName);
+ var renameFilePath = sharedDir + "/backups/" + renameOldfileTo;
+ //console.log("localfile:" + localfile);
+ fs.rename(file,renameFilePath, function (err) {
+ if(err){
+ console.log('Error :' + err);
+ }
+ //write the newer version
+ writeToFile(file,jsonStr);
+ res.setHeader('Content-disposition', 'attachment; filename=' + fileName);
+ res.setHeader('Content-type', 'application/json');
+ //res.download(file);
+ res.end(jsonStr);
+ });
+ }
+ });
+ });
+
+ app.post("/flows",
+ express.json({'limit':'16mb'}),
+ function(req,res) {
+ //console.log("Processing Request");
+ var flows = req.body;
+ redNodes.setFlows(flows).then(function() {
+ res.send(204);
+ }).otherwise(function(err) {
+ util.log("[red] Error saving flows : "+err);
+ res.send(500,err.message);
+ });
+ },
+ function(error,req,res,next) {
+ res.send(400,"Invalid Flow. Error " + error);
+ }
+ );
+
+ app.get("/nodes",function(req,res) {
+ if (req.get("accept") == "application/json") {
+ res.json(redNodes.getNodeList());
+ } else {
+ res.send(redNodes.getNodeConfigs());
+ }
+ });
+
+ app.post("/nodes",
+ express.json(),
+ function(req,res) {
+ if (!settings.available()) {
+ res.send(400,new Error("Settings unavailable").toString());
+ return;
+ }
+ var node = req.body;
+ var promise;
+ if (node.file) {
+ promise = redNodes.addNode(node.file).then(reportAddedModules);
+ } else if (node.module) {
+ var module = redNodes.getNodeModuleInfo(node.module);
+ if (module) {
+ res.send(400,"Module already loaded");
+ return;
+ }
+ promise = installModule(node.module);
+ } else {
+ res.send(400,"Invalid request");
+ return;
+ }
+ promise.then(function(info) {
+ res.json(info);
+ }).otherwise(function(err) {
+ if (err.code === 404) {
+ res.send(404);
+ } else {
+ res.send(400,err.toString());
+ }
+ });
+ },
+ function(err,req,res,next) {
+ console.log(err.toString());
+ res.send(400,err);
+ }
+ );
+
+ app.delete("/nodes/:id",
+ function(req,res) {
+ if (!settings.available()) {
+ res.send(400,new Error("Settings unavailable").toString());
+ return;
+ }
+ var id = req.params.id;
+ var removedNodes = [];
+ try {
+ var node = redNodes.getNodeInfo(id);
+ var promise = null;
+ if (!node) {
+ var module = redNodes.getNodeModuleInfo(id);
+ if (!module) {
+ res.send(404);
+ return;
+ } else {
+ promise = uninstallModule(id);
+ }
+ } else {
+ promise = when.resolve([redNodes.removeNode(id)]).then(reportRemovedModules);
+ }
+
+ promise.then(function(removedNodes) {
+ res.json(removedNodes);
+ }).otherwise(function(err) {
+ console.log(err.stack);
+ res.send(400,err.toString());
+ });
+ } catch(err) {
+ res.send(400,err.toString());
+ }
+ },
+ function(err,req,res,next) {
+ res.send(400,err);
+ }
+ );
+
+ app.get("/nodes/:id", function(req,res) {
+ var id = req.params.id;
+ var result = null;
+ if (req.get("accept") == "application/json") {
+ result = redNodes.getNodeInfo(id);
+ } else {
+ result = redNodes.getNodeConfig(id);
+ }
+ if (result) {
+ res.send(result);
+ } else {
+ res.send(404);
+ }
+ });
+
+ app.put("/nodes/:id",
+ express.json(),
+ function(req,res) {
+ if (!settings.available()) {
+ res.send(400,new Error("Settings unavailable").toString());
+ return;
+ }
+ var body = req.body;
+ if (!body.hasOwnProperty("enabled")) {
+ res.send(400,"Invalid request");
+ return;
+ }
+ try {
+ var info;
+ var id = req.params.id;
+ var node = redNodes.getNodeInfo(id);
+ if (!node) {
+ res.send(404);
+ } else if (!node.err && node.enabled === body.enabled) {
+ res.json(node);
+ } else {
+ if (body.enabled) {
+ info = redNodes.enableNode(id);
+ } else {
+ info = redNodes.disableNode(id);
+ }
+ if (info.enabled == body.enabled && !info.err) {
+ comms.publish("node/"+(body.enabled?"enabled":"disabled"),info,false);
+ util.log("[red] "+(body.enabled?"Enabled":"Disabled")+" node types:");
+ for (var i=0;i<info.types.length;i++) {
+ util.log("[red] - "+info.types[i]);
+ }
+ } else if (body.enabled && info.err) {
+ util.log("[red] Failed to enable node:");
+ util.log("[red] - "+info.name+" : "+info.err);
+ }
+ res.json(info);
+ }
+ } catch(err) {
+ res.send(400,err.toString());
+ }
+ }
+ );
+ app.get("/getCodeCloudFlows",function(req,res) {
+ var userDir=settings.userDir;
+ var codeCloudDir=userDir + "/codecloud";
+ var glob = require("glob")
+ glob(codeCloudDir + "/**/*.json", null, function (er, files) {
+ // files is an array of filenames.
+ // If the `nonull` option is set, and nothing
+ // was found, then files is ["**/*.js"]
+ // er is an error object or null.
+ //console.dir(files);
+ var filesList =[];
+ for(var i=0;files!= null && i<files.length;i++){
+ var f = files[i].replace( new RegExp(codeCloudDir + "/", "g" ), "" );
+ filesList.push(f);
+
+ }
+ res.json({"files" : filesList});
+ });
+ });
+
+ app.get("/getCurrentGitBranch",function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var userDir=settings.userDir;
+ var settingsFile = appDir + "/" + userDir + "/customSettings.js";
+ //console.log("settingsFile:" + settingsFile);
+ var jsonObj = require(settingsFile);
+ var gitLocalRepository=jsonObj.gitLocalRepository;
+ if(gitLocalRepository == undefined || gitLocalRepository == null || gitLocalRepository == ''){
+ res.json({"output" : "GIT_LOCAL_REPOSITORY_NOT_SET"});
+ return;
+ }
+ var exec = require('child_process').exec;
+ var commandToExec = appDir + "/git_scripts/gitcurbranch " + gitLocalRepository ;
+ console.log("commandToExec:" + commandToExec);
+ var child = exec(commandToExec ,function (error,stdout,stderr){
+ if(error){
+ console.log("Error occured:" + error);
+ if(stderr){
+ console.log("stderr:" + stderr);
+ res.json({"output":stderr});
+ }else{
+ res.json({"output":error});
+ }
+ }else{
+ if(stderr){
+ console.log("stderr:" + stderr);
+ }
+ if(stdout){
+ res.json({"output":stdout});
+ }
+ }
+ });
+
+ });
+
+ app.get("/getGitLocalFlows",function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var userDir=settings.userDir;
+ var settingsFile = appDir + "/" + userDir + "/customSettings.js";
+ //console.log("settingsFile:" + settingsFile);
+ var jsonObj = require(settingsFile);
+ var performGitPull = jsonObj.performGitPull;
+ if(performGitPull == undefined || performGitPull == null) {
+ performGitPull="N";
+ }
+ var gitLocalRepository=jsonObj.gitLocalRepository;
+ if(gitLocalRepository == undefined || gitLocalRepository == null || gitLocalRepository == ''){
+ res.json({"files" : ["GIT_LOCAL_REPOSITORY_NOT_SET"]});
+ return;
+
+ }
+
+ if(performGitPull == "Y"){
+ var exec = require('child_process').exec;
+ var commandToExec = appDir + "/git_scripts/gitpull " + gitLocalRepository ;
+ console.log("commandToExec:" + commandToExec);
+ var child = exec(commandToExec ,function (error,stdout,stderr){
+ if(error){
+ console.log("Error occured:" + error);
+ if(stderr){
+ console.log("stderr:" + stderr);
+ res.json({"files":[]});
+ }else{
+ res.json({"files":[]});
+ }
+ }else{
+ if(stderr){
+ console.log("stderr:" + stderr);
+ }
+ if(stdout){
+ var glob = require("glob")
+ glob(gitLocalRepository + "/**/*.json", null, function (er, files) {
+ // files is an array of filenames.
+ // If the `nonull` option is set, and nothing
+ // was found, then files is ["**/*.js"]
+ // er is an error object or null.
+ //console.dir(files);
+ var filesList =[];
+ for(var i=0;files!= null && i<files.length;i++){
+ var f = files[i].replace( new RegExp(gitLocalRepository + "/", "g" ), "" );
+ filesList.push(f);
+
+ }
+ res.json({"files" : filesList});
+ });
+ }
+ }
+ });
+ }else{//git pull not requested
+ var glob = require("glob")
+ glob(gitLocalRepository + "/**/*.json", null, function (er, files) {
+ // files is an array of filenames.
+ // If the `nonull` option is set, and nothing
+ // was found, then files is ["**/*.js"]
+ // er is an error object or null.
+ //console.dir(files);
+ var filesList =[];
+ for(var i=0;files!= null && i<files.length;i++){
+ var f = files[i].replace( new RegExp(gitLocalRepository + "/", "g" ), "" );
+ filesList.push(f);
+
+ }
+ res.json({"files" : filesList});
+ });
+ }
+
+ });
+
+ app.get("/flowShareUsers",function(req,res) {
+ res.json(flowShareUsers);
+ });
+ app.get("/getRelease",function(req,res) {
+ var userDir = settings.userDir;
+ //var release = userDir.replace(/releases/g,"release");
+ res.json({"release" : userDir});
+ });
+ app.post("/getFiles/:id",function(req,res) {
+ var id = req.params.id;
+ //console.log("id:" + id);
+ var userDir=settings.userDir;
+ var flowDir= userDir + "/../" + id + "/flows/shared";
+ //console.log("flowDir:" + flowDir);
+ fs.readdir(flowDir,function(err, files){
+ if(err){
+ res.json({"files": []});
+ }else{
+ var onlyFilesArr =[];
+ if(files != null && files.length>0){
+ files.sort(function(a,b){
+ //console.log("file1:" + a);
+ //console.log("file2:" + b);
+ var fileStat1=fs.statSync(flowDir+ "/" + a);
+ var fileStat2=fs.statSync(flowDir+ "/" + b);
+ if(fileStat1.mtime > fileStat2.mtime){
+ return 1;
+ }else if(fileStat1.mtime < fileStat2.mtime){
+ return -1;
+ }else{
+ return 0;
+ }
+ });
+ for(var i=0;i<files.length;i++){
+ var fileStat=fs.statSync(flowDir+ "/" + files[i]);
+ if(fileStat.isFile()){
+ onlyFilesArr.push({"filePath":flowDir+ "/" + files[i],"name":files[i]});
+ }
+ }
+ res.json(onlyFilesArr);
+ }else{
+ res.json({"files": []});
+ }
+ }
+ });
+ });
+
+ app.post("/updateConfiguration",
+ express.json(),
+ function(req,res) {
+ var qs = require('querystring');
+ //console.log("Received the request:");
+ var body ="";
+ req.on('data', function (data) {
+ body += data;
+ });
+ req.on('end',function(){
+ var post = qs.parse(body);
+ var dbHost = post["dbHost"];
+ var dbPort = post["dbPort"];
+ var dbName = post["dbName"];
+ var dbUser = post["dbUser"];
+ var dbPassword = post["dbPassword"];
+ var gitLocalRepository = post["gitLocalRepository"];
+ var performGitPull = post["performGitPull"];
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + settings.userDir;
+ console.log("userDir:" + userDir);
+ try{
+ var settingsFile = userDir + "/customSettings.js";
+ var jsonObj = require(settingsFile);
+ jsonObj.flowFile = jsonObj.flowFile.replace(appDir + "/",'');
+ jsonObj.dbHost = dbHost;
+ jsonObj.dbPort = dbPort;
+ jsonObj.dbName = dbName;
+ jsonObj.dbUser = dbUser;
+ jsonObj.dbPassword = dbPassword;
+ jsonObj.gitLocalRepository = gitLocalRepository;
+ jsonObj.performGitPull = performGitPull;
+ var updatedSettings = jsonObj;
+
+ var settingsStr= "module.exports=" + JSON.stringify(updatedSettings,null,4);
+ //console.log("settingsStr:" + settingsStr);
+ fs.writeFileSync(settingsFile,settingsStr);
+ var svcLogicPropStr = "" ;
+ svcLogicPropStr += "org.openecomp.sdnc.sli.dbtype=jdbc" + "\n";
+ svcLogicPropStr += "org.openecomp.sdnc.sli.jdbc.url=jdbc:mysql://" + dbHost + ":" + dbPort + "/" + dbName + "\n";
+ svcLogicPropStr += "org.openecomp.sdnc.sli.jdbc.database=" + dbName + "\n";
+ svcLogicPropStr += "org.openecomp.sdnc.sli.jdbc.user=" + dbUser + "\n";
+ svcLogicPropStr += "org.openecomp.sdnc.sli.jdbc.password=" + dbPassword;
+
+ //create svclogic.properties file in the conf dir
+ var svcPropFile = userDir + "/conf/svclogic.properties";
+ fs.writeFileSync(svcPropFile,svcLogicPropStr);
+
+ res.send({"status": "success"});
+ }catch(e){
+ console.log("Error:" + e);
+ res.send({"status": "error"});
+ }
+ });
+ }
+ );
+
+ app.post("/deleteYangFile",
+ express.json(),
+ function(req,res) {
+ var qs = require('querystring');
+ //console.log("Received the request:");
+ var body ="";
+ req.on('data', function (data) {
+ body += data;
+ });
+ req.on('end',function(){
+ var post = qs.parse(body);
+ //console.dir(body);
+ var fileName = post["fileName"];
+ var appDir = path.dirname(require.main.filename);
+ var yangFilePath = appDir + "/yangFiles/" + fileName;
+ try{
+ fs.unlinkSync(yangFilePath);
+ res.send({"status" :"SUCCESS"});
+ }catch(err){
+ console.log("error" + err);
+ res.send({"status" :"ERROR"});
+ }
+ //console.log("prevPassword:" + settings.httpAuth.pass );
+ });
+ }
+ );
+
+ app.post("/updatePassword",
+ express.json(),
+ function(req,res) {
+ var qs = require('querystring');
+ //console.log("Received the request:");
+ var body ="";
+ req.on('data', function (data) {
+ body += data;
+ });
+ req.on('end',function(){
+ var post = qs.parse(body);
+ //console.dir(body);
+ var password = post["password"];
+ //console.log("prevPassword:" + settings.httpAuth.pass );
+ //console.log("New password:" + password);
+ var crypto = require("crypto");
+ var cryptPasswd = crypto.createHash('md5').update(password,'utf8').digest('hex')
+ var appDir = path.dirname(require.main.filename);
+ var userDir = appDir + "/" + settings.userDir;
+ //console.log("userDir:" + userDir);
+ /*var newSettings = settings;
+ newSettings.httpAuth.pass = cryptPasswd;
+ var updatedSettings = JSON.stringify(settings,null,4);
+ var settingsStr = "module.exports=" + updatedSettings;
+ console.log(updatedSettings);
+ */
+ try{
+ var settingsFile = userDir + "/customSettings.js";
+ //console.log("settingsFile:" + settingsFile);
+ //var buf = fs.readFileSync(settingsFile, "utf8");
+ var jsonObj = require(settingsFile);
+ //console.log("jsonObj:" + JSON.stringify(jsonObj));
+ jsonObj.httpAuth.pass = cryptPasswd;
+ jsonObj.httpAdminAuth.pass = cryptPasswd;
+ jsonObj.httpNodeAuth.pass = cryptPasswd;
+ jsonObj.flowFile = jsonObj.flowFile.replace(appDir + "/",'');
+ var updatedSettings = jsonObj;
+ /*
+ delete updatedSettings.httpRoot;
+ delete updatedSettings.disableEditor;
+ delete updatedSettings.httpAdminRoot;
+ delete updatedSettings.httpAdminAuth;
+ delete updatedSettings.httpNodeRoot;
+ delete updatedSettings.httpNodeAuth;
+ delete updatedSettings.uiHost;
+ delete updatedSettings.version;
+ */
+ var settingsStr= "module.exports=" + JSON.stringify(updatedSettings,null,4);
+ //console.log("settingsStr:" + settingsStr);
+ fs.writeFileSync(settingsFile,settingsStr);
+ settings.httpAuth.pass = cryptPasswd;
+ res.send({"status": "success"});
+ }catch(e){
+ console.log("Error:" + e);
+ res.send({"status": "error"});
+ }
+ });
+ }
+ );
+
+ var appDir = path.dirname(require.main.filename);
+ var yangDir = appDir + "/yangFiles" ;
+ var diskStorage = multer.diskStorage({
+ destination: function (req, file, callback) {
+ callback(null, yangDir);
+ },
+ filename: function (req, file, callback) {
+ //callback(null, file.fieldname + '-' + Date.now());
+ callback(null, file.originalname);
+ }
+ });
+ var upload = multer({ storage : diskStorage}).single('yangFile');
+
+ app.post('/api/uploadyang',function(req,res){
+ upload(req,res,function(err) {
+ if(err) {
+ console.log(err);
+ return res.end("Error uploading file." + err);
+ }
+ //console.dir(req);
+ var fileName = req.file.originalname;
+ var yangFileFullPath = appDir + "/yangFiles/" + fileName;
+ console.log("yangFileFullPath:" + yangFileFullPath);
+ var commandToExec ="";
+ if(fileName != null){
+ var matchedArr = fileName.match(/.zip$/);
+ if(matchedArr != null && matchedArr.length >0){
+ console.log("uploaded zip file" + fileName);
+ commandToExec = appDir + "/tools/generate_props_from_yangs_zip.sh " + yangFileFullPath ;
+ }else{
+ commandToExec = appDir + "/tools/generate_props_from_yang.sh " + yangFileFullPath ;
+ console.log("uploaded file" + fileName);
+ }
+ }
+ var exec = require('child_process').exec;
+ console.log("commandToExec:" + commandToExec);
+ var child = exec(commandToExec ,function (error,stdout,stderr){
+ if(error){
+ console.log("Error occured:" + error);
+ var msg = "File " + fileName + " could not be processed successfully.";
+ if(stderr){
+ console.log("stderr:" + stderr);
+ res.json({"sliValuesObj" : [],"message":msg});
+ }else{
+ res.json({"sliValuesObj" : [],"message":msg});
+ }
+ }else{
+ if(stderr){
+ console.log("stderr:" + stderr);
+ }
+ if(stdout){
+ console.log("stdout:" + stdout);
+ }
+ var msg = "File " + fileName + " processed successfully.";
+ var generatedJSDir=appDir + "/generatedJS";
+ var sliValuesObj =[];
+ //var glob = require("glob");
+ //glob(generatedJSDir + "/**/*.js", null, function (er, files) {
+ /*
+ var sliValuesObj =[];
+ for(var i=0;files!= null && i<files.length;i++){
+ var f = files[i].replace( new RegExp(generatedJSDir + "/", "g" ), "" );
+ console.log("loading file " + f);
+ try{
+ sliValuesObj.push(require(files[i]));
+ //console.dir(sliValuesObj);
+ }catch(err){
+ console.log("Error:Could not load file " + files[i]);
+ }
+ }
+ res.json({"sliValuesObj" : sliValuesObj,"message":msg});
+ });
+ */
+ res.json({"sliValuesObj" : sliValuesObj,"message":msg});
+ }
+ });
+ });
+ });
+ app.get("/getYangFiles",function(req,res) {
+ var appDir = path.dirname(require.main.filename);
+ var yangFilesDir=appDir + "/yangFiles";
+ var glob = require("glob")
+ glob(yangFilesDir + "/**/*.yang", null, function (er, files) {
+ var filesList =[];
+ for(var i=0;files!= null && i<files.length;i++){
+ var f = files[i].replace( new RegExp(yangFilesDir + "/", "g" ), "" );
+ filesList.push(f);
+
+ }
+ res.json({"files" : filesList});
+ });
+ });
+ }
+}
+
+function reportAddedModules(info) {
+ comms.publish("node/added",info,false);
+ if (info.length > 0) {
+ util.log("[red] Added node types:");
+ for (var i=0;i<info.length;i++) {
+ for (var j=0;j<info[i].types.length;j++) {
+ util.log("[red] - "+
+ (info[i].module?info[i].module+":":"")+
+ info[i].types[j]+
+ (info[i].err?" : "+info[i].err:"")
+ );
+ }
+ }
+ }
+ return info;
+}
+
+function reportRemovedModules(removedNodes) {
+ comms.publish("node/removed",removedNodes,false);
+ util.log("[red] Removed node types:");
+ for (var j=0;j<removedNodes.length;j++) {
+ for (var i=0;i<removedNodes[j].types.length;i++) {
+ util.log("[red] - "+(removedNodes[i].module?removedNodes[i].module+":":"")+removedNodes[j].types[i]);
+ }
+ }
+ return removedNodes;
+}
+
+function installModule(module) {
+ //TODO: ensure module is 'safe'
+ return when.promise(function(resolve,reject) {
+ if (/[\s;]/.test(module)) {
+ reject(new Error("Invalid module name"));
+ return;
+ }
+ util.log("[red] Installing module: "+module);
+ var child = exec('npm install --production '+module, function(err, stdin, stdout) {
+ if (err) {
+ var lookFor404 = new RegExp(" 404 .*"+module+"$","m");
+ if (lookFor404.test(stdout)) {
+ util.log("[red] Installation of module "+module+" failed: module not found");
+ var e = new Error();
+ e.code = 404;
+ reject(e);
+ } else {
+ util.log("[red] Installation of module "+module+" failed:");
+ util.log("------------------------------------------");
+ console.log(err.toString());
+ util.log("------------------------------------------");
+ reject(new Error("Install failed"));
+ }
+ } else {
+ util.log("[red] Installed module: "+module);
+ resolve(redNodes.addModule(module).then(reportAddedModules));
+ }
+ });
+ });
+}
+
+function uninstallModule(module) {
+ var list = redNodes.removeModule(module);
+ return when.promise(function(resolve,reject) {
+ if (/[\s;]/.test(module)) {
+ reject(new Error("Invalid module name"));
+ return;
+ }
+ util.log("[red] Removing module: "+module);
+ var child = exec('npm remove '+module, function(err, stdin, stdout) {
+ if (err) {
+ util.log("[red] Removal of module "+module+" failed:");
+ util.log("------------------------------------------");
+ console.log(err.toString());
+ util.log("------------------------------------------");
+ reject(new Error("Removal failed"));
+ } else {
+ util.log("[red] Removed module: "+module);
+ reportRemovedModules(list);
+ resolve(list);
+ }
+ });
+ });
+}
+
+function start() {
+ var defer = when.defer();
+
+ storage.init(settings).then(function() {
+ settings.load(storage).then(function() {
+ console.log("\nWelcome to Node-RED\n===================\n");
+ if (settings.version) {
+ util.log("[red] Version: "+settings.version);
+ }
+ util.log("[red] Loading palette nodes");
+ redNodes.init(settings,storage);
+ redNodes.load().then(function() {
+ var i;
+ var nodes = redNodes.getNodeList();
+ var nodeErrors = nodes.filter(function(n) { return n.err!=null;});
+ var nodeMissing = nodes.filter(function(n) { return n.module && n.enabled && !n.loaded && !n.err;});
+ if (nodeErrors.length > 0) {
+ util.log("------------------------------------------");
+ if (settings.verbose) {
+ for (i=0;i<nodeErrors.length;i+=1) {
+ util.log("["+nodeErrors[i].name+"] "+nodeErrors[i].err);
+ }
+ } else {
+ util.log("[red] Failed to register "+nodeErrors.length+" node type"+(nodeErrors.length==1?"":"s"));
+ util.log("[red] Run with -v for details");
+ }
+ util.log("------------------------------------------");
+ }
+ if (nodeMissing.length > 0) {
+ util.log("[red] Missing node modules:");
+ var missingModules = {};
+ for (i=0;i<nodeMissing.length;i++) {
+ var missing = nodeMissing[i];
+ missingModules[missing.module] = (missingModules[missing.module]||[]).concat(missing.types);
+ }
+ var promises = [];
+ for (i in missingModules) {
+ if (missingModules.hasOwnProperty(i)) {
+ util.log("[red] - "+i+": "+missingModules[i].join(", "));
+ if (settings.autoInstallModules) {
+ installModule(i).otherwise(function(err) {
+ // Error already reported. Need the otherwise handler
+ // to stop the error propagating any further
+ });
+ }
+ }
+ }
+ if (!settings.autoInstallModules) {
+ util.log("[red] Removing modules from config");
+ redNodes.cleanNodeList();
+ }
+ }
+ defer.resolve();
+
+ redNodes.loadFlows();
+ }).otherwise(function(err) {
+ console.log(err);
+ });
+ comms.start();
+ });
+ }).otherwise(function(err) {
+ defer.reject(err);
+ });
+
+ return defer.promise;
+}
+
+function stop() {
+ redNodes.stopFlows();
+ comms.stop();
+}
+
+module.exports = {
+ init: createServer,
+ start: start,
+ stop: stop
+}
+
+module.exports.__defineGetter__("app", function() { return app });
+module.exports.__defineGetter__("nodeApp", function() { return nodeApp });
+module.exports.__defineGetter__("server", function() { return server });
diff --git a/dgbuilder/red/settings.js b/dgbuilder/red/settings.js
new file mode 100644
index 0000000..4994953
--- /dev/null
+++ b/dgbuilder/red/settings.js
@@ -0,0 +1,84 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var when = require("when");
+
+var assert = require("assert");
+
+var userSettings = null;
+var globalSettings = null;
+var storage = null;
+
+var persistentSettings = {
+ init: function(settings) {
+ userSettings = settings;
+
+ for (var i in settings) {
+ if (settings.hasOwnProperty(i)) {
+ (function() {
+ var j = i;
+ persistentSettings.__defineGetter__(j,function() { return userSettings[j]; });
+ persistentSettings.__defineSetter__(j,function() { throw new Error("Property '"+i+"' is read-only"); });
+ })();
+ }
+ }
+ globalSettings = null;
+ },
+ load: function(_storage) {
+ storage = _storage;
+ return storage.getSettings().then(function(_settings) {
+ globalSettings = _settings;
+ });
+ },
+ get: function(prop) {
+ if (userSettings.hasOwnProperty(prop)) {
+ return userSettings[prop];
+ }
+ if (globalSettings === null) {
+ throw new Error("Settings not available");
+ }
+ return globalSettings[prop];
+ },
+
+ set: function(prop,value) {
+ if (userSettings.hasOwnProperty(prop)) {
+ throw new Error("Property '"+prop+"' is read-only");
+ }
+ if (globalSettings === null) {
+ throw new Error("Settings not available");
+ }
+ var current = globalSettings[prop];
+ globalSettings[prop] = value;
+ try {
+ assert.deepEqual(current,value);
+ return when.resolve();
+ } catch(err) {
+ return storage.saveSettings(globalSettings);
+ }
+ },
+
+ available: function() {
+ return (globalSettings !== null);
+ },
+
+ reset: function() {
+ userSettings = null;
+ globalSettings = null;
+ storage = null;
+ }
+}
+
+module.exports = persistentSettings;
diff --git a/dgbuilder/red/sla.js b/dgbuilder/red/sla.js
new file mode 100644
index 0000000..1729ecb
--- /dev/null
+++ b/dgbuilder/red/sla.js
@@ -0,0 +1,249 @@
+exports.listSLA = function(settings,req,res) {
+try{
+ var mysql = require('mysql');
+
+ //console.dir(settings);
+
+ var connection = mysql.createConnection(
+ {
+ host : settings.dbHost,
+ port : settings.dbPort,
+ user : settings.dbUser,
+ password : settings.dbPassword,
+ database : settings.dbName
+ });
+
+ var rows=[];
+
+ var sqlQuery = "SELECT module,rpc,version,mode,active FROM SVC_LOGIC";
+ //console.log("sqlQuery:" + sqlQuery);
+ connection.query(sqlQuery, function(err, rows) {
+ if(!err) {
+ if ( rows.length > 0 )
+ {
+ res.send({ 'rows': rows,'dbHost':settings.dbHost } );
+ }else{
+ res.send({'rows': [],'dbHost':settings.dbHost});
+ }
+ } else {
+ console.log("error:" + err);
+ res.send({error: "Connection to DB failed.",'dbHost':settings.dbHost});
+ }
+ //console.dir(rows);
+ connection.end();
+ }); //end query
+}catch(error){
+ console.log(error);
+ res.send({'error': "Connection to DB failed.",'dbHost':settings.dbHost});
+}
+}
+
+exports.listCurrentDGs = function(settings,req,res) {
+ var _module = req.query.module;
+ var rpc = req.query.rpc;
+ console.log("_module:" + _module);
+ console.log("rpc:" + rpc);
+try{
+ var mysql = require('mysql');
+
+ //console.dir(settings);
+
+ var connection = mysql.createConnection(
+ {
+ host : settings.dbHost,
+ port : settings.dbPort,
+ user : settings.dbUser,
+ password : settings.dbPassword,
+ database : settings.dbName
+ });
+
+ var rows=[];
+
+ var sqlQuery = "SELECT module,rpc,version,mode,active FROM SVC_LOGIC where module ='" + _module + "' and rpc ='" + rpc + "'";
+ console.log("sqlQuery:" + sqlQuery);
+ connection.query(sqlQuery, function(err, rows) {
+ if(!err) {
+ if ( rows.length > 0 )
+ {
+ res.send({ 'rows': rows,'dbHost':settings.dbHost } );
+ }else{
+ res.send({'rows': [],'dbHost':settings.dbHost});
+ }
+ } else {
+ console.log("error:" + err);
+ res.send({error: "Connection to DB failed.",'dbHost':settings.dbHost});
+ }
+ //console.dir(rows);
+ connection.end();
+ }); //end query
+}catch(error){
+ console.log(error);
+ res.send({'error': "Connection to DB failed.",'dbHost':settings.dbHost});
+}
+}
+
+exports.activateDG = function(settings,req,res){
+ var _module = req.query.module;
+ var rpc = req.query.rpc;
+ var version = req.query.version;
+ var mode = req.query.mode;
+ var displayOnlyCurrent = req.query.displayOnlyCurrent;
+
+try{
+ var mysql = require('mysql');
+
+ var connection = mysql.createConnection(
+ {
+ host : settings.dbHost,
+ port : settings.dbPort,
+ user : settings.dbUser,
+ password : settings.dbPassword,
+ database : settings.dbName
+ });
+
+ var rows=[];
+
+ var updateStmt = "UPDATE SVC_LOGIC SET active=\'Y\' WHERE module=\'"
+ + _module + "' AND rpc=\'"
+ + rpc + "' AND version=\'"
+ + version + "' AND mode=\'"
+ + mode + "'";
+
+ connection.query(updateStmt, function(err, result) {
+ var nextUpdateStmt = "UPDATE SVC_LOGIC SET active=\'N\' WHERE module=\'"
+ + _module + "' AND rpc=\'"
+ + rpc + "' AND version !=\'"
+ + version + "'";
+ connection.query(nextUpdateStmt, function(err, result) {
+ var query = "SELECT module,rpc,version,mode,active FROM SVC_LOGIC";
+ if(displayOnlyCurrent == 'true'){
+ query = "SELECT module,rpc,version,mode,active FROM SVC_LOGIC WHERE module=\'"
+ + _module + "' and rpc=\'" + rpc + "'";
+ }
+ connection.query(query, function(err, rows) {
+ if(!err) {
+ if ( rows.length > 0 )
+ {
+ res.send({ 'rows': rows,'dbHost':settings.dbHost } );
+ }else{
+ res.send({'rows': [],'dbHost':settings.dbHost});
+ }
+ } else {
+ res.send({'error': "Connection to DB failed.",'dbHost':settings.dbHost});
+ }
+ connection.end();
+ }); //end query
+ }); //end query
+ }); //end query
+}catch(error){
+ res.send({'error': "Connection to DB failed.",'dbHost':settings.dbHost});
+}
+}
+
+
+exports.deActivateDG = function(settings,req,res){
+
+ var _module = req.query.module;
+ var rpc = req.query.rpc;
+ var version = req.query.version;
+ var mode = req.query.mode;
+ var displayOnlyCurrent = req.query.displayOnlyCurrent;
+
+try{
+ var mysql = require('mysql');
+
+ var connection = mysql.createConnection(
+ {
+ host : settings.dbHost,
+ port : settings.dbPort,
+ user : settings.dbUser,
+ password : settings.dbPassword,
+ database : settings.dbName
+ });
+
+ var rows=[];
+
+ var updateStmt = "UPDATE SVC_LOGIC SET active=\'N\' WHERE module=\'"
+ + _module + "' AND rpc=\'"
+ + rpc + "' AND version=\'"
+ + version + "' AND mode=\'"
+ + mode + "'";
+
+ connection.query(updateStmt, function(err, result) {
+ var query = "SELECT module,rpc,version,mode,active FROM SVC_LOGIC";
+ if(displayOnlyCurrent == 'true'){
+ query = "SELECT module,rpc,version,mode,active FROM SVC_LOGIC WHERE module=\'"
+ + _module + "' and rpc=\'" + rpc + "'";
+ }
+ connection.query(query, function(err, rows) {
+ if(!err) {
+ if ( rows.length > 0 )
+ {
+ res.send({ 'rows': rows,'dbHost':settings.dbHost } );
+ }else{
+ res.send({'rows': [],'dbHost':settings.dbHost});
+ }
+ } else {
+ res.send({'error': "Connection to DB failed.",'dbHost':settings.dbHost});
+ }
+ connection.end();
+ }); //end query
+ }); //end query
+}catch(error){
+ res.send({'error': "Connection to DB failed.",'dbHost':settings.dbHost});
+}
+}
+
+exports.deleteDG = function(settings,req,res){
+
+ var _module = req.query.module;
+ var rpc = req.query.rpc;
+ var version = req.query.version;
+ var mode = req.query.mode;
+ var displayOnlyCurrent = req.query.displayOnlyCurrent;
+
+try{
+ var mysql = require('mysql');
+
+ var connection = mysql.createConnection(
+ {
+ host : settings.dbHost,
+ port : settings.dbPort,
+ user : settings.dbUser,
+ password : settings.dbPassword,
+ database : settings.dbName
+ });
+
+ var rows=[];
+
+ var deleteStmt = "DELETE FROM SVC_LOGIC WHERE module=\'"
+ + _module + "' AND rpc=\'"
+ + rpc + "' AND version=\'"
+ + version + "' AND mode=\'"
+ + mode + "'";
+ console.log(deleteStmt);
+
+ connection.query(deleteStmt, function(err, result) {
+ var query = "SELECT module,rpc,version,mode,active FROM SVC_LOGIC";
+ if(displayOnlyCurrent == 'true'){
+ query = "SELECT module,rpc,version,mode,active FROM SVC_LOGIC WHERE module=\'"
+ + _module + "' and rpc=\'" + rpc + "'";
+ }
+ connection.query(query, function(err, rows) {
+ if(!err) {
+ if ( rows.length > 0 )
+ {
+ res.send({ 'rows': rows,'dbHost':settings.dbHost } );
+ }else{
+ res.send({'rows': [],'dbHost':settings.dbHost});
+ }
+ } else {
+ res.send({'error': "Connection to DB failed.",'dbHost':settings.dbHost});
+ }
+ connection.end();
+ }); //end query
+ }); //end query
+}catch(error){
+ res.send({'error': "Connection to DB failed.",'dbHost':settings.dbHost});
+}
+}
diff --git a/dgbuilder/red/storage/index.js b/dgbuilder/red/storage/index.js
new file mode 100644
index 0000000..ba93962
--- /dev/null
+++ b/dgbuilder/red/storage/index.js
@@ -0,0 +1,107 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var when = require('when');
+
+var storageModule;
+var settingsAvailable;
+
+function moduleSelector(aSettings) {
+ var toReturn;
+ if (aSettings.storageModule) {
+ if (typeof aSettings.storageModule === "string") {
+ // TODO: allow storage modules to be specified by absolute path
+ toReturn = require("./"+aSettings.storageModule);
+ } else {
+ toReturn = aSettings.storageModule;
+ }
+ } else {
+ toReturn = require("./localfilesystem");
+ }
+ return toReturn;
+}
+
+function is_malicious(path) {
+ return path.indexOf('../') != -1 || path.indexOf('..\\') != -1;
+}
+
+var storageModuleInterface = {
+ init: function(settings) {
+ try {
+ storageModule = moduleSelector(settings);
+ settingsAvailable = storageModule.hasOwnProperty("getSettings") && storageModule.hasOwnProperty("saveSettings");
+ } catch (e) {
+ return when.reject(e);
+ }
+ return storageModule.init(settings);
+ },
+ getFlows: function() {
+ return storageModule.getFlows();
+ },
+ saveFlows: function(flows) {
+ return storageModule.saveFlows(flows);
+ },
+ getCredentials: function() {
+ return storageModule.getCredentials();
+ },
+ saveCredentials: function(credentials) {
+ return storageModule.saveCredentials(credentials);
+ },
+ getSettings: function() {
+ if (settingsAvailable) {
+ return storageModule.getSettings();
+ } else {
+ return when.resolve(null);
+ }
+ },
+ saveSettings: function(settings) {
+ if (settingsAvailable) {
+ return storageModule.saveSettings(settings);
+ } else {
+ return when.resolve();
+ }
+ },
+ /* Library Functions */
+ getAllFlows: function() {
+ return storageModule.getAllFlows();
+ },
+ getFlow: function(fn) {
+ if (is_malicious(fn)) {
+ return when.reject(new Error('forbidden flow name'));
+ }
+ return storageModule.getFlow(fn);
+ },
+ saveFlow: function(fn, data) {
+ if (is_malicious(fn)) {
+ return when.reject(new Error('forbidden flow name'));
+ }
+ return storageModule.saveFlow(fn, data);
+ },
+ getLibraryEntry: function(type, path) {
+ if (is_malicious(path)) {
+ return when.reject(new Error('forbidden flow name'));
+ }
+ return storageModule.getLibraryEntry(type, path);
+ },
+ saveLibraryEntry: function(type, path, meta, body) {
+ if (is_malicious(path)) {
+ return when.reject(new Error('forbidden flow name'));
+ }
+ return storageModule.saveLibraryEntry(type, path, meta, body);
+ }
+}
+
+module.exports = storageModuleInterface;
diff --git a/dgbuilder/red/storage/localfilesystem.js b/dgbuilder/red/storage/localfilesystem.js
new file mode 100644
index 0000000..4825533
--- /dev/null
+++ b/dgbuilder/red/storage/localfilesystem.js
@@ -0,0 +1,309 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var fs = require('fs');
+var when = require('when');
+var nodeFn = require('when/node/function');
+var keys = require('when/keys');
+var util = require('util');
+var fspath = require("path");
+var mkdirp = require("mkdirp");
+
+var promiseDir = nodeFn.lift(mkdirp);
+
+var settings;
+var flowsFile;
+var flowsFullPath;
+var flowsPrev;
+var credentialsFile;
+var oldCredentialsFile;
+var userDir;
+var libDir;
+var libFlowsDir;
+var globalSettingsFile;
+
+function listFiles(dir) {
+ var dirs = {};
+ var files = [];
+ var dirCount = 0;
+ return nodeFn.call(fs.readdir, dir).then(function (contents) {
+ contents.sort().forEach(function(fn) {
+ var stats = fs.lstatSync(dir+"/"+fn);
+ if (stats.isDirectory()) {
+ dirCount += 1;
+ dirs[fn] = listFiles(dir+"/"+fn)
+ } else {
+ files.push(fn.split(".")[0]);
+ }
+ })
+ var result = {};
+ if (dirCount > 0) { result.d = keys.all(dirs); }
+ if (files.length > 0) { result.f = when.resolve(files); }
+ return keys.all(result);
+ })
+}
+
+function getFileMeta(root,path) {
+ var fn = fspath.join(root,path);
+ var fd = fs.openSync(fn,"r");
+ var size = fs.fstatSync(fd).size;
+ var meta = {};
+ var read = 0;
+ var length = 10;
+ var remaining = "";
+ var buffer = Buffer(length);
+ while(read < size) {
+ read+=fs.readSync(fd,buffer,0,length);
+ var data = remaining+buffer.toString();
+ var parts = data.split("\n");
+ remaining = parts.splice(-1);
+ for (var i=0;i<parts.length;i+=1) {
+ var match = /^\/\/ (\w+): (.*)/.exec(parts[i]);
+ if (match) {
+ meta[match[1]] = match[2];
+ } else {
+ read = size;
+ break;
+ }
+ }
+ }
+ fs.closeSync(fd);
+ return meta;
+}
+
+function getFileBody(root,path) {
+ var body = "";
+ var fn = fspath.join(root,path);
+ var fd = fs.openSync(fn,"r");
+ var size = fs.fstatSync(fd).size;
+ var scanning = true;
+ var read = 0;
+ var length = 50;
+ var remaining = "";
+ var buffer = Buffer(length);
+ while(read < size) {
+ var thisRead = fs.readSync(fd,buffer,0,length);
+ read += thisRead;
+ if (scanning) {
+ var data = remaining+buffer.slice(0,thisRead).toString();
+ var parts = data.split("\n");
+ remaining = parts.splice(-1)[0];
+ for (var i=0;i<parts.length;i+=1) {
+ if (! /^\/\/ \w+: /.test(parts[i])) {
+ scanning = false;
+ body += parts[i]+"\n";
+ }
+ }
+ if (! /^\/\/ \w+: /.test(remaining)) {
+ scanning = false;
+ }
+ if (!scanning) {
+ body += remaining;
+ }
+ } else {
+ body += buffer.slice(0,thisRead).toString();
+ }
+ }
+ fs.closeSync(fd);
+ return body;
+}
+
+var localfilesystem = {
+ init: function(_settings) {
+ settings = _settings;
+ userDir = settings.userDir || process.env.NODE_RED_HOME;
+
+ if (settings.flowFile) {
+ flowsFile = settings.flowFile;
+ flowsFullPath = flowsFile;
+ } else {
+ flowsFile = 'flows_'+require('os').hostname()+'.json';
+ flowsFullPath = fspath.join(userDir,flowsFile);
+ }
+ var fsext = fspath.extname(flowsFile);
+ credentialsFile = fspath.join(userDir,fspath.basename(flowsFile,fsext)+"_cred"+fsext);
+ oldCredentialsFile = fspath.join(userDir,"credentials.json");
+ flowsPrev = fspath.join(userDir,"flows.backup");
+
+ libDir = fspath.join(userDir,"lib");
+ libFlowsDir = fspath.join(libDir,"flows");
+
+
+ globalSettingsFile = fspath.join(userDir,".config.json");
+
+ return promiseDir(libFlowsDir);
+ },
+
+ getFlows: function() {
+ var defer = when.defer();
+ fs.exists(flowsFullPath, function(exists) {
+ if (exists) {
+ util.log("[red] Loading flows : "+flowsFile);
+ defer.resolve(nodeFn.call(fs.readFile,flowsFullPath,'utf8').then(function(data) {
+ return JSON.parse(data);
+ }));
+ } else {
+ util.log("[red] Flows file not found : "+flowsFile );
+ defer.resolve([]);
+ }
+ });
+ return defer.promise;
+ },
+
+ saveFlows: function(flows) {
+ if (fs.existsSync(flowsFullPath)) {
+ fs.renameSync(flowsFullPath,flowsPrev);
+ }
+
+ var flowData;
+
+ if (settings.flowFilePretty) {
+ flowData = JSON.stringify(flows,null,4);
+ } else {
+ flowData = JSON.stringify(flows);
+ }
+ console.log("Writing to file:" + flowsFullPath);
+ return nodeFn.call(fs.writeFile, flowsFullPath, flowData);
+ },
+
+ getCredentials: function() {
+ var defer = when.defer();
+ fs.exists(credentialsFile, function(exists) {
+ if (exists) {
+ defer.resolve(nodeFn.call(fs.readFile, credentialsFile, 'utf8').then(function(data) {
+ return JSON.parse(data)
+ }));
+ } else {
+ fs.exists(oldCredentialsFile, function(exists) {
+ if (exists) {
+ defer.resolve(nodeFn.call(fs.readFile, oldCredentialsFile, 'utf8').then(function(data) {
+ return JSON.parse(data)
+ }));
+ } else {
+ defer.resolve({});
+ }
+ });
+ }
+ });
+ return defer.promise;
+ },
+
+ saveCredentials: function(credentials) {
+ var credentialData;
+ if (settings.flowFilePretty) {
+ credentialData = JSON.stringify(credentials,null,4);
+ } else {
+ credentialData = JSON.stringify(credentials);
+ }
+
+ return nodeFn.call(fs.writeFile, credentialsFile, credentialData)
+ },
+
+ getSettings: function() {
+ if (fs.existsSync(globalSettingsFile)) {
+ return nodeFn.call(fs.readFile,globalSettingsFile,'utf8').then(function(data) {
+ if (data) {
+ try {
+ return JSON.parse(data);
+ } catch(err) {
+ util.log("[red] Corrupted config detected - resetting");
+ return {};
+ }
+ } else {
+ return {};
+ }
+ });
+ }
+ return when.resolve({});
+ },
+ saveSettings: function(settings) {
+ return nodeFn.call(fs.writeFile,globalSettingsFile,JSON.stringify(settings,null,1),'utf8');
+ },
+
+
+ getAllFlows: function() {
+ return listFiles(libFlowsDir);
+ },
+
+ getFlow: function(fn) {
+ var defer = when.defer();
+ var file = fspath.join(libFlowsDir,fn+".json");
+ fs.exists(file, function(exists) {
+ if (exists) {
+ defer.resolve(nodeFn.call(fs.readFile,file,'utf8'));
+ } else {
+ defer.reject();
+ }
+ });
+ return defer.promise;
+ },
+
+ saveFlow: function(fn,data) {
+ var file = fspath.join(libFlowsDir,fn+".json");
+ return promiseDir(fspath.dirname(file)).then(function () {
+ return nodeFn.call(fs.writeFile, file, data);
+ });
+ },
+
+ getLibraryEntry: function(type,path) {
+ var root = fspath.join(libDir,type);
+ var rootPath = fspath.join(libDir,type,path);
+ return promiseDir(root).then(function () {
+ return nodeFn.call(fs.lstat, rootPath).then(function(stats) {
+ if (stats.isFile()) {
+ return getFileBody(root,path);
+ }
+ if (path.substr(-1) == '/') {
+ path = path.substr(0,path.length-1);
+ }
+ return nodeFn.call(fs.readdir, rootPath).then(function(fns) {
+ var dirs = [];
+ var files = [];
+ fns.sort().filter(function(fn) {
+ var fullPath = fspath.join(path,fn);
+ var absoluteFullPath = fspath.join(root,fullPath);
+ if (fn[0] != ".") {
+ var stats = fs.lstatSync(absoluteFullPath);
+ if (stats.isDirectory()) {
+ dirs.push(fn);
+ } else {
+ var meta = getFileMeta(root,fullPath);
+ meta.fn = fn;
+ files.push(meta);
+ }
+ }
+ });
+ return dirs.concat(files);
+ });
+ });
+ });
+ },
+
+ saveLibraryEntry: function(type,path,meta,body) {
+ var fn = fspath.join(libDir, type, path);
+ var headers = "";
+ for (var i in meta) {
+ if (meta.hasOwnProperty(i)) {
+ headers += "// "+i+": "+meta[i]+"\n";
+ }
+ }
+ return promiseDir(fspath.dirname(fn)).then(function () {
+ nodeFn.call(fs.writeFile, fn, headers+body);
+ });
+ }
+};
+
+module.exports = localfilesystem;
diff --git a/dgbuilder/red/ui.js b/dgbuilder/red/ui.js
new file mode 100644
index 0000000..16580bf
--- /dev/null
+++ b/dgbuilder/red/ui.js
@@ -0,0 +1,77 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+var express = require('express');
+var fs = require("fs");
+var events = require("./events");
+var path = require("path");
+
+var icon_paths = [path.resolve(__dirname + '/../public/icons')];
+
+var settings; // settings has to be global, otherwise variable not in scope for express
+
+events.on("node-icon-dir",function(dir) {
+ icon_paths.push(path.resolve(dir));
+});
+
+
+function setupUI(_settings,app) {
+
+ settings = _settings;
+
+ // Need to ensure the url ends with a '/' so the static serving works
+ // with relative paths
+ app.get("/",function(req,res) {
+ if (req.originalUrl.slice(-1) != "/") {
+ res.redirect(req.originalUrl+"/");
+ } else {
+ req.next();
+ }
+ });
+
+ var iconCache = {};
+ //TODO: create a default icon
+ var defaultIcon = path.resolve(__dirname + '/../public/icons/arrow-in.png');
+
+ app.get("/icons/:icon",function(req,res) {
+ if (iconCache[req.params.icon]) {
+ res.sendfile(iconCache[req.params.icon]); // if not found, express prints this to the console and serves 404
+ } else {
+ for (var p=0;p<icon_paths.length;p++) {
+ var iconPath = path.join(icon_paths[p],req.params.icon);
+ if (fs.existsSync(iconPath)) {
+ res.sendfile(iconPath);
+ iconCache[req.params.icon] = iconPath;
+ return;
+ }
+ }
+ res.sendfile(defaultIcon);
+ }
+ });
+
+ app.get("/settings", function(req,res) {
+ var safeSettings = {
+ httpNodeRoot: settings.httpNodeRoot,
+ version: settings.version
+ };
+ res.json(safeSettings);
+ });
+
+ app.use("/",express.static(__dirname + '/../public'));
+
+ return app;
+}
+
+module.exports = setupUI;
diff --git a/dgbuilder/red/util.js b/dgbuilder/red/util.js
new file mode 100644
index 0000000..7ca72b0
--- /dev/null
+++ b/dgbuilder/red/util.js
@@ -0,0 +1,43 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+function ensureString(o) {
+ if (Buffer.isBuffer(o)) {
+ return o.toString();
+ } else if (typeof o === "object") {
+ return JSON.stringify(o);
+ } else if (typeof o === "string") {
+ return o;
+ }
+ return ""+o;
+}
+
+function ensureBuffer(o) {
+ if (Buffer.isBuffer(o)) {
+ return o;
+ } else if (typeof o === "object") {
+ o = JSON.stringify(o);
+ } else if (typeof o !== "string") {
+ o = ""+o;
+ }
+ return new Buffer(o);
+}
+
+module.exports = {
+ ensureString: ensureString,
+ ensureBuffer: ensureBuffer,
+};
+
diff --git a/dgbuilder/releases/sdnc1.0/.config.json b/dgbuilder/releases/sdnc1.0/.config.json
new file mode 100644
index 0000000..d5f86c2
--- /dev/null
+++ b/dgbuilder/releases/sdnc1.0/.config.json
@@ -0,0 +1,228 @@
+{
+ "nodes": {
+ "f01e121fdcca44f4f1d1135f3e68095e1376b7eb": {
+ "name": "block.js",
+ "types": [
+ "block"
+ ],
+ "enabled": true
+ },
+ "717b8f34cf67474d1af03fdd6822bc9ef2e67bc2": {
+ "name": "call.js",
+ "types": [
+ "call"
+ ],
+ "enabled": true
+ },
+ "206bda0ae2599ad0cc8ce121fe7b70b84bf8a366": {
+ "name": "configure.js",
+ "types": [
+ "configure"
+ ],
+ "enabled": true
+ },
+ "4698a1beb7105851d2867245198c6b14f67f3e84": {
+ "name": "delete.js",
+ "types": [
+ "delete"
+ ],
+ "enabled": true
+ },
+ "dea017092a5d56efb769026110177045d8ea3430": {
+ "name": "execute.js",
+ "types": [
+ "execute"
+ ],
+ "enabled": true
+ },
+ "2e1ff0459a9f2572f6d441ee4ffc966835a36e04": {
+ "name": "exists.js",
+ "types": [
+ "exists"
+ ],
+ "enabled": true
+ },
+ "6ecaadc772558adea9aad9d440ee272a92b432f4": {
+ "name": "forNode.js",
+ "types": [
+ "for"
+ ],
+ "enabled": true
+ },
+ "a08ac375f31fb15f59a0df05c496ddd740aa6472": {
+ "name": "get-resource.js",
+ "types": [
+ "get-resource"
+ ],
+ "enabled": true
+ },
+ "39cc8c5b404aa076e5456d62de989bcdd2731f9a": {
+ "name": "is-available.js",
+ "types": [
+ "is-available"
+ ],
+ "enabled": true
+ },
+ "9bea307fd340b01a62086abf3a3940ac77730568": {
+ "name": "notify.js",
+ "types": [
+ "notify"
+ ],
+ "enabled": true
+ },
+ "276c320cd57c858be6dac2c636877648a35aa04c": {
+ "name": "record.js",
+ "types": [
+ "record"
+ ],
+ "enabled": true
+ },
+ "b36c73e0a1c43560d7b29a8959198fe431020ad9": {
+ "name": "release.js",
+ "types": [
+ "release"
+ ],
+ "enabled": true
+ },
+ "dfc45ebbf76658d3e8e73dbfb8bf962057ca2a57": {
+ "name": "reserve.js",
+ "types": [
+ "reserve"
+ ],
+ "enabled": true
+ },
+ "06a4ee60c18fddc68d290826daa18a9991b92919": {
+ "name": "save.js",
+ "types": [
+ "save"
+ ],
+ "enabled": true
+ },
+ "f99370311d57128b2bd1f408365e982c0dbafc46": {
+ "name": "set.js",
+ "types": [
+ "set"
+ ],
+ "enabled": true
+ },
+ "ab2b190a8e0c91eb36aed4f7fe25aef0c1019e9d": {
+ "name": "switchNode.js",
+ "types": [
+ "switchNode"
+ ],
+ "enabled": true
+ },
+ "d14d57596f9c543889e37fd44b83ae179224ec28": {
+ "name": "update.js",
+ "types": [
+ "update"
+ ],
+ "enabled": true
+ },
+ "28591694ec8869525734ef3e60ea13603d3a61f2": {
+ "name": "GenericXML.js",
+ "types": [
+ "GenericXML"
+ ],
+ "enabled": true
+ },
+ "055a038d5bf33e3aaeff6d83be1d0e0f9feaacb5": {
+ "name": "comment.js",
+ "types": [
+ "comment"
+ ],
+ "enabled": true
+ },
+ "2f1e87ae27d50973e857fa71e67eb717e65f2019": {
+ "name": "dgstart.js",
+ "types": [
+ "dgstart"
+ ],
+ "enabled": true
+ },
+ "c10b21de58bf98f978d17a2d0c16e8038d339fc3": {
+ "name": "method.js",
+ "types": [
+ "method"
+ ],
+ "enabled": true
+ },
+ "3b5f11ac0d6283221bc08ebf11d64fa17c15d4cb": {
+ "name": "serviceLogic.js",
+ "types": [
+ "service-logic"
+ ],
+ "enabled": true
+ },
+ "91e5dfbc8a58ff4f4c75c88f68209fe74172a79a": {
+ "name": "already-active.js",
+ "types": [
+ "already-active"
+ ],
+ "enabled": true
+ },
+ "2356e6f2b50eefaf1def0d8dd86f95227f5f3142": {
+ "name": "failure.js",
+ "types": [
+ "failure"
+ ],
+ "enabled": true
+ },
+ "d43be73f359a928c57a7cffcd5f37a7b9740d921": {
+ "name": "not-found.js",
+ "types": [
+ "not-found"
+ ],
+ "enabled": true
+ },
+ "bbc41e923705ff934c652daa85ea6599000e317b": {
+ "name": "other.js",
+ "types": [
+ "other"
+ ],
+ "enabled": true
+ },
+ "5490a91f90dcf4d1857910debbad5dfbfdc015f3": {
+ "name": "outcome.js",
+ "types": [
+ "outcome"
+ ],
+ "enabled": true
+ },
+ "608774ad827770597de4c27f9da3d202ad510409": {
+ "name": "outcomeFalse.js",
+ "types": [
+ "outcomeFalse"
+ ],
+ "enabled": true
+ },
+ "f8eb7854fe489265a7d484611791e750e96e0f4a": {
+ "name": "outcomeTrue.js",
+ "types": [
+ "outcomeTrue"
+ ],
+ "enabled": true
+ },
+ "cfb4ea42aa90d421129ff3275427599a438d3e61": {
+ "name": "success.js",
+ "types": [
+ "success"
+ ],
+ "enabled": true
+ },
+ "cdf3ac03ebc8419da64f2f3dc792c72660cdf41b": {
+ "name": "returnFailure.js",
+ "types": [
+ "returnFailure"
+ ],
+ "enabled": true
+ },
+ "8656992c3f5ffa48e7ea12a14fa33cfa87e0be4f": {
+ "name": "returnSuccess.js",
+ "types": [
+ "returnSuccess"
+ ],
+ "enabled": true
+ }
+ }
+}
\ No newline at end of file
diff --git a/dgbuilder/releases/sdnc1.0/codecloud/.gitignore b/dgbuilder/releases/sdnc1.0/codecloud/.gitignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dgbuilder/releases/sdnc1.0/codecloud/.gitignore
diff --git a/dgbuilder/releases/sdnc1.0/conf/svclogic.properties b/dgbuilder/releases/sdnc1.0/conf/svclogic.properties
new file mode 100644
index 0000000..fb93dce
--- /dev/null
+++ b/dgbuilder/releases/sdnc1.0/conf/svclogic.properties
@@ -0,0 +1,5 @@
+org.openecomp.sdnc.sli.dbtype=jdbc
+org.openecomp.sdnc.sli.jdbc.url=jdbc:mysql://localhost:3306/sdnctl
+org.openecomp.sdnc.sli.jdbc.database=sdnctl
+org.openecomp.sdnc.sli.jdbc.user=sdnctl
+org.openecomp.sdnc.sli.jdbc.password=gamma
\ No newline at end of file
diff --git a/dgbuilder/releases/sdnc1.0/customSettings.js b/dgbuilder/releases/sdnc1.0/customSettings.js
new file mode 100644
index 0000000..e418616
--- /dev/null
+++ b/dgbuilder/releases/sdnc1.0/customSettings.js
@@ -0,0 +1,38 @@
+module.exports={
+ "name": "Release sdnc1.0",
+ "emailAddress": "dguser@openecomp.org",
+ "uiPort": 3100,
+ "mqttReconnectTime": 15000,
+ "serialReconnectTime": 15000,
+ "debugMaxLength": 1000,
+ "htmlPath": "releases/sdnc1.0/html/",
+ "xmlPath": "releases/sdnc1.0/xml/",
+ "flowFile": "releases/sdnc1.0/flows/flows.json",
+ "sharedDir": "releases/sdnc1.0/flows/shared",
+ "userDir": "releases/sdnc1.0",
+ "httpAuth": {
+ "user": "dguser",
+ "pass": "cc03e747a6afbbcbf8be7668acfebee5"
+ },
+ "dbHost": "dbhost",
+ "dbPort": "3306",
+ "dbName": "sdnctl",
+ "dbUser": "sdnctl",
+ "dbPassword": "gamma",
+ "gitLocalRepository": "",
+ "httpRoot": "/",
+ "disableEditor": false,
+ "httpAdminRoot": "/",
+ "httpAdminAuth": {
+ "user": "dguser",
+ "pass": "cc03e747a6afbbcbf8be7668acfebee5"
+ },
+ "httpNodeRoot": "/",
+ "httpNodeAuth": {
+ "user": "dguser",
+ "pass": "cc03e747a6afbbcbf8be7668acfebee5"
+ },
+ "uiHost": "0.0.0.0",
+ "version": "0.9.1",
+ "performGitPull": "N"
+}
diff --git a/dgbuilder/releases/sdnc1.0/flows/shared/.gitignore b/dgbuilder/releases/sdnc1.0/flows/shared/.gitignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dgbuilder/releases/sdnc1.0/flows/shared/.gitignore
diff --git a/dgbuilder/releases/sdnc1.0/html/.gitignore b/dgbuilder/releases/sdnc1.0/html/.gitignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dgbuilder/releases/sdnc1.0/html/.gitignore
diff --git a/dgbuilder/releases/sdnc1.0/lib/flows/.gitignore b/dgbuilder/releases/sdnc1.0/lib/flows/.gitignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dgbuilder/releases/sdnc1.0/lib/flows/.gitignore
diff --git a/dgbuilder/releases/sdnc1.0/logs/.gitignore b/dgbuilder/releases/sdnc1.0/logs/.gitignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dgbuilder/releases/sdnc1.0/logs/.gitignore
diff --git a/dgbuilder/releases/sdnc1.0/logs/process_pid b/dgbuilder/releases/sdnc1.0/logs/process_pid
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/dgbuilder/releases/sdnc1.0/logs/process_pid
@@ -0,0 +1 @@
+
diff --git a/dgbuilder/releases/sdnc1.0/xml/.gitignore b/dgbuilder/releases/sdnc1.0/xml/.gitignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dgbuilder/releases/sdnc1.0/xml/.gitignore
diff --git a/dgbuilder/settings.js.orig b/dgbuilder/settings.js.orig
new file mode 100644
index 0000000..3466b04
--- /dev/null
+++ b/dgbuilder/settings.js.orig
@@ -0,0 +1,128 @@
+/**
+ * Copyright 2013 IBM Corp.
+ *
+ * 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.
+ **/
+module.exports = {
+ // the tcp port that the Node-RED web server is listening on
+ uiPort: 1880,
+
+ // By default, the Node-RED UI accepts connections on all IPv4 interfaces.
+ // The following property can be used to listen on a specific interface. For
+ // example, the following would only allow connections from the local machine.
+ //uiHost: "127.0.0.1",
+
+ // Retry time in milliseconds for MQTT connections
+ mqttReconnectTime: 15000,
+
+ // Retry time in milliseconds for Serial port connections
+ serialReconnectTime: 15000,
+
+ // Retry time in milliseconds for TCP socket connections
+ //socketReconnectTime: 10000,
+
+ // Timeout in milliseconds for TCP server socket connections
+ // defaults to no timeout
+ //socketTimeout: 120000,
+
+ // Maximum number of lines in debug window before pruning
+ debugMaxLength: 1000,
+
+ // The file containing the flows. If not set, it defaults to flows_<hostname>.json
+ //flowFile: 'flows.json',
+
+ // To enabled pretty-printing of the flow within the flow file, set the following
+ // property to true:
+ //flowFilePretty: true,
+
+ // By default, all user data is stored in the Node-RED install directory. To
+ // use a different location, the following property can be used
+ //userDir: '/home/nol/.node-red/',
+
+ // Node-RED scans the `nodes` directory in the install directory to find nodes.
+ // The following property can be used to specify an additional directory to scan.
+ //nodesDir: '/home/nol/.node-red/nodes',
+
+ // By default, the Node-RED UI is available at http://localhost:1880/
+ // The following property can be used to specifiy a different root path.
+ // If set to false, this is disabled.
+ //httpAdminRoot: '/admin',
+
+ // You can protect the user interface with a userid and password by using the following property.
+ // The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
+ //httpAdminAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
+
+ // Some nodes, such as HTTP In, can be used to listen for incoming http requests.
+ // By default, these are served relative to '/'. The following property
+ // can be used to specifiy a different root path. If set to false, this is
+ // disabled.
+ //httpNodeRoot: '/nodes',
+
+ // To password protect the node-defined HTTP endpoints, the following property
+ // can be used.
+ // The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
+ //httpNodeAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
+
+ // When httpAdminRoot is used to move the UI to a different root path, the
+ // following property can be used to identify a directory of static content
+ // that should be served at http://localhost:1880/.
+ //httpStatic: '/home/nol/node-red-dashboard/',
+
+ // To password protect the static content, the following property can be used.
+ // The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
+ //httpStaticAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
+
+ // The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot',
+ // to apply the same root to both parts.
+ //httpRoot: '/red',
+
+ // The following property can be used in place of 'httpAdminAuth' and 'httpNodeAuth',
+ // to apply the same authentication to both parts.
+ //httpAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
+
+ // The following property can be used to disable the editor. The admin API
+ // is not affected by this option. To disable both the editor and the admin
+ // API, use either the httpRoot or httpAdminRoot properties
+ //disableEditor: false,
+
+ // The following property can be used to enable HTTPS
+ // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
+ // for details on its contents.
+ //https: {
+ // key: fs.readFileSync('privatekey.pem'),
+ // cert: fs.readFileSync('certificate.pem')
+ //},
+
+ // The following property can be used to configure cross-origin resource sharing
+ // in the HTTP nodes.
+ // See https://github.com/troygoode/node-cors#configuration-options for
+ // details on its contents. The following is a basic permissive set of options:
+ //httpNodeCors: {
+ // origin: "*",
+ // methods: "GET,PUT,POST,DELETE"
+ //},
+
+ // Anything in this hash is globally available to all functions.
+ // It is accessed as context.global.
+ // eg:
+ // functionGlobalContext: { os:require('os') }
+ // can be accessed in a function block as:
+ // context.global.os
+
+ functionGlobalContext: {
+ // os:require('os'),
+ // bonescript:require('bonescript'),
+ // arduino:require('duino')
+ }
+
+}
diff --git a/dgbuilder/show_status b/dgbuilder/show_status
new file mode 100755
index 0000000..8c7c37b
--- /dev/null
+++ b/dgbuilder/show_status
@@ -0,0 +1,53 @@
+tbold=$(tput setf 3)
+bold=$(tput setf 2)
+bold1=$(tput setf 2)
+offbold=$(tput rmso;tput sgr0)
+
+function pad {
+ #echo "1 is $1 2 is $2"
+ if [ "$1" == "" ]
+ then
+ $1 = "";
+ fi
+ let count=0
+ curr_len=`expr length "$1"`
+ let space_length=$2-$curr_len
+ spaces=""
+ while [ $count -lt $space_length ]
+ do
+ spaces="$spaces "
+ let count=$count+1
+ done
+ echo "$1$spaces"
+}
+
+function isRunning {
+ echo $(curl -I "$1" 2>/dev/null|head -1|tail -1|awk '{print $2}')
+}
+dirName=$(pwd)
+options=($(ls -l $dirName/releases|grep ^d|awk '{print $NF}'|sort))
+ echo "$(pad RELEASE 15)$(pad URL 30)$(pad Status 10)"
+ echo "$(pad '----' 15)$(pad '---' 30)$(pad '------' 10)"
+ for opt in "${options[@]}"
+ do
+
+ releaseDir="$opt"
+ if [ -e "./releases/${opt}/customSettings.js" ]
+ then
+ pid=$(cat ./releases/$releaseDir/logs/process_pid 2>/dev/null)
+ port=$(cat ./releases/$releaseDir/customSettings.js 2>/dev/null|grep uiPort|sed -e 's/[, ]//g'|cut -d: -f2)
+ resp1=$(isRunning "http://localhost:$port")
+ if [ "$resp1" == "401" ]
+ then
+ echo "$(pad $releaseDir 15)$(pad http://localhost:$port 30)${bold}$(pad running 10)${offbold}"
+ else
+ processId=$(netstat -upltn 2>/dev/null|grep $port|awk '{print $NF}'|sed -e 's%/node-red%%g')
+ if [ "$processId" == "" ]
+ then
+ echo "$(pad $releaseDir 15)$(pad http://localhost:$port 30)${bold}$(pad stopped 10)${offbold}"
+ else
+ echo "$(pad $releaseDir 15)$(pad http://localhost:$port 30)${bold}$(pad running 10)${offbold}"
+ fi
+ fi
+ fi
+ done
diff --git a/dgbuilder/start b/dgbuilder/start
new file mode 100755
index 0000000..4d3f9f5
--- /dev/null
+++ b/dgbuilder/start
@@ -0,0 +1,71 @@
+releaseDir="$1"
+if [ "$#" != "1" ]
+then
+ echo "Usage: $0 releaseDirName"
+ exit
+fi
+echo "ReleaseDir:$releaseDir"
+export PROJECT_HOME=`pwd`
+tbold=$(tput setf 3)
+bold=$(tput setf 2)
+bold1=$(tput setf 2)
+offbold=$(tput rmso;tput sgr0)
+
+function pad {
+ #echo "1 is $1 2 is $2"
+ if [ "$1" == "" ]
+ then
+ $1 = "";
+ fi
+ let count=0
+ curr_len=`expr length "$1"`
+ let space_length=$2-$curr_len
+ spaces=""
+ while [ $count -lt $space_length ]
+ do
+ spaces="$spaces "
+ let count=$count+1
+ done
+ echo "$1$spaces"
+}
+
+function isRunning {
+ echo $(curl -I "$1" 2>/dev/null|head -1|tail -1|awk '{print $2}')
+}
+
+if [ -e "releases/${releaseDir}/customSettings.js" ]
+then
+ pid=$(cat releases/$releaseDir/logs/process_pid 2>/dev/null)
+ port=$(cat releases/$releaseDir/customSettings.js|grep uiPort|sed -e 's/[, ]//g'|cut -d: -f2 )
+ count=$(ps -p$pid 2>/dev/null|grep -v PID|wc -l)
+ if [ "$count" != "0" ]
+ then
+ echo "For Release \"$releaseDir\" - http://localhost:$port"
+ echo "********ALREADY RUNNING PID:$pid *******"
+ else
+ pid_listening_on_port=$(netstat -upltn 2>/dev/null|grep -w $port|awk '{print $NF}'|cut -d'/' -f1)
+ if [ "$pid_listening_on_port" != "" ]
+ then
+ if [ "$pid_listening_on_port" != "$pid" ]
+ then
+ echo "port $port is already in use by other process"
+ ps -p $pid_listening_on_port
+ else
+ echo "Process is already running.";
+ fi
+ exit;
+ fi
+ node red.js --settings releases/${releaseDir}/customSettings.js
+ process_pid="$!"
+ echo $process_pid >releases/$releaseDir/logs/process_pid
+ port=$(cat releases/${releaseDir}/customSettings.js|grep uiPort|sed -e 's/[, ]//g'|cut -d: -f2)
+ echo "For Release \"$releaseDir\" ${urlIp}:$port --- STARTED PID:$process_pid"
+ if [ "${releaseDir}" != "" ]
+ then
+ sleep 3
+ ./show_status|grep -w ${releaseDir}
+ fi
+ fi
+else
+ echo "Directory ${releaseDir} is not setup. Use the createReleaseDir.sh script to setup the directory."
+fi
diff --git a/dgbuilder/stop b/dgbuilder/stop
new file mode 100755
index 0000000..9d0591a
--- /dev/null
+++ b/dgbuilder/stop
@@ -0,0 +1,51 @@
+tbold=$(tput setf 3)
+bold=$(tput setf 2)
+bold1=$(tput setf 2)
+offbold=$(tput rmso;tput sgr0)
+
+function pad {
+ #echo "1 is $1 2 is $2"
+ if [ "$1" == "" ]
+ then
+ $1 = "";
+ fi
+ let count=0
+ curr_len=`expr length "$1"`
+ let space_length=$2-$curr_len
+ spaces=""
+ while [ $count -lt $space_length ]
+ do
+ spaces="$spaces "
+ let count=$count+1
+ done
+ echo "$1$spaces"
+}
+releaseDir=""
+if [ "$#" == "1" ]
+then
+ releaseDir="$1"
+fi
+
+if [ -e "releases/${releaseDir}/customSettings.js" ]
+then
+ port=$(cat releases/${releaseDir}/customSettings.js|grep uiPort|sed -e 's/[, ]//g'|cut -d: -f2)
+ kill $(cat releases/${releaseDir}/logs/process_pid 2>/dev/null) >/dev/null 2>&1
+ if [ "$?" != "0" ]
+ then
+ #kill only if its a node-red process
+ processPid=$(netstat -upltn 2>/dev/null|grep -w $port|awk '{print $NF}'|sed -e 's%/node-red%%g')
+ kill $processPid 2>/dev/null
+ echo "http://localhost:$port ---- STOPPED"
+ ./show_status|grep -w "${releaseDir}"
+ else
+ echo "http://localhost:$port ---- STOPPED"
+ ./show_status|grep -w "${releaseDir}"
+ fi
+else
+ if [ "$releaseDir" != "" ]
+ then
+ echo "Release Directory ${releaseDir} not setup.";
+ else
+ echo "Usage:$0 releaseDirName"
+ fi
+fi
diff --git a/dgbuilder/svclogic/copy_xml.sh b/dgbuilder/svclogic/copy_xml.sh
new file mode 100755
index 0000000..8b2cc4e
--- /dev/null
+++ b/dgbuilder/svclogic/copy_xml.sh
@@ -0,0 +1,4 @@
+dt=$(date +'%m%d%Y_%H%M%S')
+mv ~/dg_xml/dg.xml ~/dg_xml/dg_${dt}.xml
+cp $(ls -ltr /home/users/schinthakayala/nodered/production/flowDesigner/users/sheshi/xml/*.xml|tail -1|awk '{print $NF}') ~/dg_xml/dg.xml
+echo "copied the latest DG"
diff --git a/dgbuilder/svclogic/dg.xml b/dgbuilder/svclogic/dg.xml
new file mode 100644
index 0000000..e8e101e
--- /dev/null
+++ b/dgbuilder/svclogic/dg.xml
@@ -0,0 +1,2 @@
+<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='ModuleName' version='1.0.0'><method rpc='rpcName' mode='sync'>
+</method></service-logic>
diff --git a/dgbuilder/svclogic/lib/antlr4-4.5.1.jar b/dgbuilder/svclogic/lib/antlr4-4.5.1.jar
new file mode 100644
index 0000000..81039db
--- /dev/null
+++ b/dgbuilder/svclogic/lib/antlr4-4.5.1.jar
Binary files differ
diff --git a/dgbuilder/svclogic/lib/commons-lang3-3.1.jar b/dgbuilder/svclogic/lib/commons-lang3-3.1.jar
new file mode 100644
index 0000000..a85e539
--- /dev/null
+++ b/dgbuilder/svclogic/lib/commons-lang3-3.1.jar
Binary files differ
diff --git a/dgbuilder/svclogic/lib/mysql-connector-java-5.1.31.jar b/dgbuilder/svclogic/lib/mysql-connector-java-5.1.31.jar
new file mode 100644
index 0000000..26864e4
--- /dev/null
+++ b/dgbuilder/svclogic/lib/mysql-connector-java-5.1.31.jar
Binary files differ
diff --git a/dgbuilder/svclogic/lib/slf4j-api-1.6.1.jar b/dgbuilder/svclogic/lib/slf4j-api-1.6.1.jar
new file mode 100644
index 0000000..f1f4fdd
--- /dev/null
+++ b/dgbuilder/svclogic/lib/slf4j-api-1.6.1.jar
Binary files differ
diff --git a/dgbuilder/svclogic/lib/slf4j-simple-1.7.5.jar b/dgbuilder/svclogic/lib/slf4j-simple-1.7.5.jar
new file mode 100644
index 0000000..eca11dd
--- /dev/null
+++ b/dgbuilder/svclogic/lib/slf4j-simple-1.7.5.jar
Binary files differ
diff --git a/dgbuilder/svclogic/lib/sli-common.jar b/dgbuilder/svclogic/lib/sli-common.jar
new file mode 100644
index 0000000..beacbe7
--- /dev/null
+++ b/dgbuilder/svclogic/lib/sli-common.jar
Binary files differ
diff --git a/dgbuilder/svclogic/load_dg b/dgbuilder/svclogic/load_dg
new file mode 100755
index 0000000..e13745b
--- /dev/null
+++ b/dgbuilder/svclogic/load_dg
@@ -0,0 +1 @@
+/home/users/schinthakayala/dg_xml/svclogic.sh load /home/users/schinthakayala/dg_xml/dg.xml /home/users/schinthakayala/dg_xml/svclogic.properties
diff --git a/dgbuilder/svclogic/svclogic.properties b/dgbuilder/svclogic/svclogic.properties
new file mode 100644
index 0000000..69ffd84
--- /dev/null
+++ b/dgbuilder/svclogic/svclogic.properties
@@ -0,0 +1,5 @@
+org.openecomp.sdnc.sli.dbtype = jdbc
+org.openecomp.sdnc.sli.jdbc.url = jdbc:mysql://dbhost:3306/sdnctl
+org.openecomp.sdnc.sli.jdbc.database = sdnctl
+org.openecomp.sdnc.sli.jdbc.user = sdnctl
+org.openecomp.sdnc.sli.jdbc.password = gamma
diff --git a/dgbuilder/svclogic/svclogic.sh b/dgbuilder/svclogic/svclogic.sh
new file mode 100755
index 0000000..b54e521
--- /dev/null
+++ b/dgbuilder/svclogic/svclogic.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+#echo "PROJECT_HOME:$PROJECT_HOME"
+
+MYSQL_JDBC_DRIVER=${MYSQL_JDBC_DRIVER:-$PROJECT_HOME/svclogic/lib/mysql-connector-java-5.1.31.jar}
+JARDIR="$PROJECT_HOME/svclogic/lib"
+#JARDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+CLASSPATH=$CLASSPATH:$MYSQL_JDBC_DRIVER
+for jar in $JARDIR/*.jar
+do
+ CLASSPATH=$CLASSPATH:${jar}
+done
+#echo "CLASSPATH is ${CLASSPATH}"
+java -cp ${CLASSPATH}:${MYSQL_JDBC_DRIVER}:${SLI_COMMON_JAR} org.openecomp.sdnc.sli.SvcLogicParser $*
diff --git a/dgbuilder/test/_spec.js b/dgbuilder/test/_spec.js
new file mode 100644
index 0000000..9eb7e07
--- /dev/null
+++ b/dgbuilder/test/_spec.js
@@ -0,0 +1,93 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+/**
+ * This test simply checks that for every .js file there exists
+ * a *_spec.js file under ./test correspondingly.
+ */
+
+/**
+ * Currently we're only checking the core components under ./red
+ * TODO: Increase the scope of this check
+ */
+
+var fs = require("fs");
+var should = require("should");
+var path = require('path');
+
+// Directories to check with .js files and _spec.js files respectively
+var jsdir = path.resolve(__dirname, "../red");
+var testdir = path.resolve(__dirname, "red");
+
+var fs = require('fs');
+var walkDirectory = function(dir, topdir, done) {
+ fs.readdir(dir, function(err, list) {
+ var error;
+ var errReturned = false;
+ if (err) {
+ return done(err);
+ }
+
+ var i = 0;
+ (function next() {
+ var file = list[i++];
+
+ // return error if there are no more files to check and error has not been previously returned to avoid multiple calls to done()
+ if (!file) {
+ if (!errReturned) {
+ errReturned = true;
+ return done(error);
+ }
+ } else {
+ file = path.resolve(dir, file);
+ fs.stat(file, function(err, stat) {
+ if (stat && stat.isDirectory()) {
+ walkDirectory(file, false, function(err) {
+ if (!error) {
+ error = err;
+ }
+ next();
+ });
+ } else {
+ if (path.extname(file) === ".js") {
+ var testFile = file.replace(jsdir, testdir).replace(".js", "_spec.js");
+ fs.exists(testFile, function (exists) {
+ try {
+ exists.should.equal(true, testFile + " does not exist");
+ } catch (err) {
+ if (!topdir) {
+ return done(err);
+ } else {
+ error = err;
+ return;
+ }
+ }
+ });
+ }
+ next();
+ }
+ });
+ }
+ })();
+ });
+};
+
+describe('_spec.js', function() {
+ this.timeout(50000); // we might not finish within the Mocha default timeout limit, project will also grow
+ it('is checking if all .js files have a corresponding _spec.js test file.', function(done) {
+ walkDirectory(jsdir, true, done);
+ });
+});
diff --git a/dgbuilder/test/nodes/core/core/20-inject_spec.js b/dgbuilder/test/nodes/core/core/20-inject_spec.js
new file mode 100644
index 0000000..aeeac9d
--- /dev/null
+++ b/dgbuilder/test/nodes/core/core/20-inject_spec.js
@@ -0,0 +1,118 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var injectNode = require("../../../../nodes/core/core/20-inject.js");
+var helper = require("../../helper.js");
+
+describe('inject node', function() {
+
+ before(function(done) {
+ helper.startServer(done);
+ });
+
+ afterEach(function() {
+ helper.unload();
+ });
+
+ it('should inject once', function(done) {
+
+ helper.load(injectNode, [{id:"n1", type:"inject",
+ payload:"payload", topic: "t1",
+ once: true, wires:[["n2"]] },
+ {id:"n2", type:"helper"}],
+ function() {
+ var n2 = helper.getNode("n2");
+ n2.on("input", function(msg) {
+ msg.should.have.property('topic', 't1');
+ msg.should.have.property('payload', 'payload');
+ done();
+ });
+ });
+ });
+
+ it('should inject repeatedly', function(done) {
+
+ helper.load(injectNode, [{id:"n1", type:"inject",
+ payload:"payload", topic: "t2",
+ repeat: 0.2, wires:[["n2"]] },
+ {id:"n2", type:"helper"}],
+ function() {
+ var n2 = helper.getNode("n2");
+ var count = 0;
+ n2.on("input", function(msg) {
+ msg.should.have.property('topic', 't2');
+ msg.should.have.property('payload', 'payload');
+ count += 1;
+ if (count > 2) {
+ helper.clearFlows().then(function() {
+ done();
+ });
+ }
+ });
+ });
+ });
+
+ it('should inject with cron', function(done) {
+ helper.load(injectNode, [{id:"n1", type:"inject",
+ payloadType:"date", topic: "t3",
+ crontab: "* * * * * *", wires:[["n3"]] },
+ {id:"n3", type:"helper"}],
+ function() {
+ var n3 = helper.getNode("n3");
+ n3.on("input", function(msg) {
+ msg.should.have.property('topic', 't3');
+ msg.should.have.property('payload').be.a.Number;
+ helper.clearFlows().then(function() {
+ done();
+ });
+ });
+ });
+ });
+
+ describe('post', function() {
+ it('should inject message', function(done) {
+ helper.load(injectNode,
+ [{id:"n1", type:"inject",
+ payloadType:"some type", topic: "t4",
+ wires:[["n4"]] },
+ { id:"n4", type:"helper"}], function() {
+ var n4 = helper.getNode("n4");
+ n4.on("input", function(msg) {
+ msg.should.have.property('topic', 't4');
+ msg.should.have.property('payload', '');
+ helper.clearFlows().then(function() {
+ done();
+ });
+ });
+ helper.request()
+ .post('/inject/n1')
+ .expect(200).end(function(err) {
+ if (err) {
+ return helper.clearFlows()
+ .then(function () {
+ done(err);
+ });
+ }
+ });
+ });
+ });
+
+ it('should fail for invalid node', function(done) {
+ helper.request().post('/inject/invalid').expect(404).end(done);
+ });
+ });
+});
diff --git a/dgbuilder/test/nodes/core/core/58-debug_spec.js b/dgbuilder/test/nodes/core/core/58-debug_spec.js
new file mode 100644
index 0000000..f83fc2c
--- /dev/null
+++ b/dgbuilder/test/nodes/core/core/58-debug_spec.js
@@ -0,0 +1,298 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var debugNode = require("../../../../nodes/core/core/58-debug.js");
+var helper = require("../../helper.js");
+var WebSocket = require('ws');
+
+describe('debug node', function() {
+
+ before(function(done) {
+ helper.startServer(done);
+ });
+
+ afterEach(function() {
+ helper.unload();
+ });
+
+
+ it('should be loaded', function(done) {
+ var flow = [{id:"n1", type:"debug", name: "Debug" }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ n1.should.have.property('name', 'Debug');
+ done();
+ });
+ });
+
+ it('should publish on input', function(done) {
+ var flow = [{id:"n1", type:"debug", name: "Debug" }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ websocket_test(function() {
+ n1.emit("input", {payload:"test"});
+ }, function(msg) {
+ JSON.parse(msg).should.eql({
+ topic:"debug",data:{id:"n1",name:"Debug",msg:"test"}
+ });
+ }, done);
+ });
+ });
+
+ it('should publish to console', function(done) {
+ var flow = [{id:"n1", type:"debug", console: "true" }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var count = 0;
+ n1.on('log', function(msg) {
+ msg.should.eql({level:'log',id:'n1',type:'debug',msg:'test'});
+ count++;
+ if (count == 2) {
+ done();
+ }
+ });
+ websocket_test(function() {
+ n1.emit("input", {payload:"test"});
+ }, function(msg) {
+ JSON.parse(msg).should.eql({
+ topic:"debug",data:{id:"n1",msg:"test"}
+ });
+ count++;
+ }, function() {
+ if (count == 2) {
+ done();
+ }
+ });
+ });
+ });
+
+ it('should publish complete message', function(done) {
+ var flow = [{id:"n1", type:"debug", complete: "true" }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ websocket_test(function() {
+ n1.emit("input", {payload:"test"});
+ }, function(msg) {
+ JSON.parse(msg).should.eql({
+ topic:"debug",
+ data:{id:"n1",msg:'(Object) {\n "payload": "test"\n}'}
+ });
+ }, done);
+ });
+ });
+
+ it('should publish an Error', function(done) {
+ var flow = [{id:"n1", type:"debug" }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ websocket_test(function() {
+ n1.emit("input", {payload: new Error("oops")});
+ }, function(msg) {
+ JSON.parse(msg).should.eql({
+ topic:"debug",data:{id:"n1",msg:"Error: oops"}
+ });
+ }, done);
+ });
+ });
+
+ it('should publish a boolean', function(done) {
+ var flow = [{id:"n1", type:"debug" }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ websocket_test(function() {
+ n1.emit("input", {payload: true});
+ }, function(msg) {
+ JSON.parse(msg).should.eql({
+ topic:"debug",data:{id:"n1",msg: '(boolean) true'}
+ });
+ }, done);
+ });
+ });
+
+ it('should publish with no payload', function(done) {
+ var flow = [{id:"n1", type:"debug" }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ websocket_test(function() {
+ n1.emit("input", {});
+ }, function(msg) {
+ JSON.parse(msg).should.eql({
+ topic:"debug",data:{id:"n1",msg: '(undefined)'}
+ });
+ }, done);
+ });
+ });
+
+ it('should publish an object', function(done) {
+ var flow = [{id:"n1", type:"debug" }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ websocket_test(function() {
+ n1.emit("input", {payload: {type:'foo'}});
+ }, function(msg) {
+ JSON.parse(msg).should.eql({
+ topic:"debug",
+ data:{id:"n1",msg:'(Object) {\n "type": "foo"\n}'}
+ });
+ }, done);
+ });
+ });
+
+ it('should publish an array', function(done) {
+ var flow = [{id:"n1", type:"debug" }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ websocket_test(function() {
+ n1.emit("input", {payload: [0,1,2,3]});
+ }, function(msg) {
+ JSON.parse(msg).should.eql({
+ topic:"debug",
+ data:{id:"n1",msg: '(Array) [\n 0,\n 1,\n 2,\n 3\n]'}
+ });
+ }, done);
+ });
+ });
+
+ it('should publish an object with circular references', function(done) {
+ var flow = [{id:"n1", type:"debug" }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ websocket_test(function() {
+ var o = { name: 'bar' };
+ o.o = o;
+ n1.emit("input", {payload: o});
+ }, function(msg) {
+ JSON.parse(msg).should.eql({
+ topic:"debug",
+ data:{
+ id:"n1",
+ msg:'(Object) {\n "name": "bar",\n "o": "[circular]"\n}'
+ }
+ });
+ }, done);
+ });
+ });
+
+ it('should truncated a long message', function(done) {
+ var flow = [{id:"n1", type:"debug" }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ websocket_test(function() {
+ n1.emit("input", {payload: Array(1002).join("X")});
+ }, function(msg) {
+ JSON.parse(msg).should.eql({
+ topic:"debug",
+ data:{
+ id:"n1",
+ msg: Array(1001).join("X")+' ....'
+ }
+ });
+ }, done);
+ });
+ });
+
+ it('should convert Buffer to hex', function(done) {
+ var flow = [{id:"n1", type:"debug" }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ websocket_test(function() {
+ n1.emit("input", {payload: new Buffer('HELLO', 'utf8')});
+ }, function(msg) {
+ JSON.parse(msg).should.eql({
+ topic:"debug",
+ data:{
+ id:"n1",
+ msg: '(Buffer) 48454c4c4f',
+ }
+ });
+ }, done);
+ });
+ });
+
+ it('should publish when active', function(done) {
+ var flow = [{id:"n1", type:"debug", active: false }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ websocket_test(function() {
+ n1.emit("input", {payload:"message 1"});
+ helper.request()
+ .post('/debug/n1/enable')
+ .expect(200).end(function(err) {
+ if (err) { return done(err); }
+ n1.emit("input", {payload:"message 2"});
+ });
+ }, function(msg) {
+ JSON.parse(msg).should.eql({
+ topic:"debug",data:{id:"n1",msg:"message 2"}
+ });
+ }, done);
+ });
+ });
+
+ it('should not publish when inactive', function(done) {
+ var flow = [{id:"n1", type:"debug", active: true }];
+ helper.load(debugNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ websocket_test(function(close) {
+ helper.request()
+ .post('/debug/n1/disable')
+ .expect(201).end(function(err) {
+ if (err) {
+ close();
+ return done(err);
+ }
+ n1.emit("input", {payload:"message"});
+ setTimeout(function() {
+ close();
+ done();
+ }, 200);
+ });
+ }, function(msg) {
+ should.fail(null,null,"unexpected message");
+ }, function() {});
+ });
+ });
+
+ describe('post', function() {
+ it('should return 404 on invalid state', function(done) {
+ var flow = [{id:"n1", type:"debug", active: true }];
+ helper.load(debugNode, flow, function() {
+ helper.request()
+ .post('/debug/n1/foobar')
+ .expect(404).end(done);
+ });
+ });
+
+ it('should return 404 on invalid node', function(done) {
+ helper.request()
+ .post('/debug/n99/enable')
+ .expect(404).end(done);
+ });
+ });
+
+});
+
+function websocket_test(open_callback, message_callback, done_callback) {
+ var ws = new WebSocket(helper.url() + "/comms");
+ var close_callback = function() { ws.close(); };
+ ws.on('open', function() { open_callback(close_callback); });
+ ws.on('message', function(msg) {
+ message_callback(msg, close_callback);
+ ws.close();
+ done_callback();
+ });
+}
diff --git a/dgbuilder/test/nodes/core/core/80-function_spec.js b/dgbuilder/test/nodes/core/core/80-function_spec.js
new file mode 100644
index 0000000..9efd93a
--- /dev/null
+++ b/dgbuilder/test/nodes/core/core/80-function_spec.js
@@ -0,0 +1,149 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var functionNode = require("../../../../nodes/core/core/80-function.js");
+var helper = require("../../helper.js");
+
+describe('function node', function() {
+
+ before(function(done) {
+ helper.startServer(done);
+ });
+
+ afterEach(function() {
+ helper.unload();
+ });
+
+ it('should be loaded', function(done) {
+ var flow = [{id:"n1", type:"function", name: "function" }];
+ helper.load(functionNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ n1.should.have.property('name', 'function');
+ done();
+ });
+ });
+
+ it('should send returned message', function(done) {
+ var flow = [{id:"n1",type:"function",wires:[["n2"]],func:"return msg;"},
+ {id:"n2", type:"helper"}];
+ helper.load(functionNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n2.on("input", function(msg) {
+ msg.should.have.property('topic', 'bar');
+ msg.should.have.property('payload', 'foo');
+ done();
+ });
+ n1.receive({payload:"foo",topic: "bar"});
+ });
+ });
+
+ it('should pass through _topic', function(done) {
+ var flow = [{id:"n1",type:"function",wires:[["n2"]],func:"return msg;"},
+ {id:"n2", type:"helper"}];
+ helper.load(functionNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n2.on("input", function(msg) {
+ msg.should.have.property('topic', 'bar');
+ msg.should.have.property('payload', 'foo');
+ msg.should.have.property('_topic', 'baz');
+ done();
+ });
+ n1.receive({payload:"foo",topic: "bar", _topic: "baz"});
+ });
+ });
+
+ it('should send to multiple outputs', function(done) {
+ var flow = [{id:"n1",type:"function",wires:[["n2"],["n3"]],
+ func:"return [{payload: '1'},{payload: '2'}];"},
+ {id:"n2", type:"helper"}, {id:"n3", type:"helper"} ];
+ helper.load(functionNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ var n3 = helper.getNode("n3");
+ var count = 0;
+ n2.on("input", function(msg) {
+ should(msg).have.property('payload', '1');
+ count++;
+ if (count == 2) {
+ done();
+ }
+ });
+ n3.on("input", function(msg) {
+ should(msg).have.property('payload', '2');
+ count++;
+ if (count == 2) {
+ done();
+ }
+ });
+ n1.receive({payload:"foo",topic: "bar"});
+ });
+ });
+
+ it('should send to multiple messages', function(done) {
+ var flow = [{id:"n1",type:"function",wires:[["n2"]],
+ func:"return [[{payload: 1},{payload: 2}]];"},
+ {id:"n2", type:"helper"} ];
+ helper.load(functionNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ var count = 0;
+ n2.on("input", function(msg) {
+ count++;
+ should(msg).have.property('payload', count);
+ should(msg).have.property('_topic', 'baz');
+ if (count == 2) {
+ done();
+ }
+ });
+ n1.receive({payload:"foo", topic: "bar", _topic:"baz"});
+ });
+ });
+
+ it('should allow input to be discarded by returning null', function(done) {
+ var flow = [{id:"n1",type:"function",wires:[["n2"]],func:"return null"},
+ {id:"n2", type:"helper"}];
+ helper.load(functionNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ setTimeout(function() {
+ done();
+ }, 200);
+ n2.on("input", function(msg) {
+ should.fail(null,null,"unexpected message");
+ });
+ n1.receive({payload:"foo",topic: "bar"});
+ });
+ });
+
+ it('should handle and log script error', function(done) {
+ var flow = [{id:"n1",type:"function",wires:[["n2"]],func:"retunr"}];
+ helper.load(functionNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ n1.on("log", function(msg) {
+ msg.should.have.property('level', 'error');
+ msg.should.have.property('id', 'n1');
+ msg.should.have.property('type', 'function');
+ msg.should.have.property('msg', 'ReferenceError: retunr is not defined');
+ done();
+ });
+ n1.receive({payload:"foo",topic: "bar"});
+ });
+ });
+
+});
diff --git a/dgbuilder/test/nodes/core/core/80-template_spec.js b/dgbuilder/test/nodes/core/core/80-template_spec.js
new file mode 100644
index 0000000..a89afa3
--- /dev/null
+++ b/dgbuilder/test/nodes/core/core/80-template_spec.js
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var templateNode = require("../../../../nodes/core/core/80-template.js");
+var helper = require("../../helper.js");
+
+describe('template node', function() {
+
+ before(function(done) {
+ helper.startServer(done);
+ });
+
+ afterEach(function() {
+ helper.unload();
+ });
+
+
+ it('should modify payload', function(done) {
+ var flow = [{id:"n1", type:"template", field: "payload", template: "payload={{payload}}",wires:[["n2"]]},{id:"n2",type:"helper"}];
+ helper.load(templateNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n2.on("input", function(msg) {
+ msg.should.have.property('topic', 'bar');
+ msg.should.have.property('payload', 'payload=foo');
+ done();
+ });
+ n1.receive({payload:"foo",topic: "bar"});
+ });
+ });
+
+});
diff --git a/dgbuilder/test/nodes/core/core/89-delay_spec.js b/dgbuilder/test/nodes/core/core/89-delay_spec.js
new file mode 100644
index 0000000..22c3173
--- /dev/null
+++ b/dgbuilder/test/nodes/core/core/89-delay_spec.js
@@ -0,0 +1,420 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+
+var delayNode = require("../../../../nodes/core/core/89-delay.js");
+var helper = require("../../helper.js");
+
+var GRACE_PERCENTAGE=10;
+
+var nanosToSeconds = 1000000000;
+var millisToSeconds = 1000;
+
+var secondsToMinutes = 60;
+var secondsToHours = 3600;
+var secondsToDays = 86400;
+
+
+describe('delayNode', function() {
+
+ beforeEach(function(done) {
+ helper.startServer(done);
+ });
+
+ afterEach(function(done) {
+ helper.unload();
+ helper.stopServer(done);
+ });
+
+ it('should be loaded', function(done) {
+ var flow = [{"id":"delayNode1","type":"delay","name":"delayNode","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"wires":[[]]}];
+ helper.load(delayNode, flow, function() {
+ var delayNode1 = helper.getNode("delayNode1");
+ delayNode1.should.have.property('name', 'delayNode');
+ done();
+ });
+ });
+
+ var TimeUnitEnum = {
+ MILLIS : "milliseconds",
+ SECONDS : "seconds",
+ MINUTES : "minutes",
+ HOURS : "hours",
+ DAYS : "days"
+ }
+
+ /**
+ * Tells whether two numeric values are close enough to each other
+ * @param actualValue - the value we're testing
+ * @param expectedValue - the value we're matching the test value against
+ * @param tolerancePercent - the percentage of tolerated deviation (0 means equals)
+ */
+ function closeEnough(actualValue, expectedValue, tolerancePercent) {
+ var toReturn;
+ var toleranceFraction = expectedValue * (tolerancePercent/100);
+ var minExpected = expectedValue - toleranceFraction;
+ var maxExpected = expectedValue + toleranceFraction;
+
+ if(actualValue >= minExpected && actualValue <= maxExpected) {
+ toReturn = true;
+ } else {
+ toReturn = false;
+ }
+ return toReturn;
+ }
+
+ /**
+ * Runs a delay test
+ * @param aTimeout - the timeout quantity
+ * @param aTimeoutUnit - the unit of the timeout: milliseconds, seconds, minutes, hours, days
+ */
+ function genericDelayTest(aTimeout, aTimeoutUnit, done) {
+ var flow = [{"id":"delayNode1","type":"delay","name":"delayNode","pauseType":"delay","timeout":aTimeout,"timeoutUnits":aTimeoutUnit,"rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(delayNode, flow, function() {
+ var delayNode1 = helper.getNode("delayNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ try {
+ var endTime = process.hrtime(startTime);
+ var runtimeNanos = ( (endTime[0] * nanosToSeconds) + endTime[1] );
+ var runtimeSeconds = runtimeNanos / nanosToSeconds;
+ var aTimeoutUnifiedToSeconds;
+
+ // calculating the timeout in seconds
+ if(aTimeoutUnit == TimeUnitEnum.MILLIS) {
+ aTimeoutUnifiedToSeconds = aTimeout / millisToSeconds;
+ } else if(aTimeoutUnit == TimeUnitEnum.SECONDS) {
+ aTimeoutUnifiedToSeconds = aTimeout;
+ } else if(aTimeoutUnit == TimeUnitEnum.MINUTES) {
+ aTimeoutUnifiedToSeconds = aTimeout * secondsToMinutes;
+ } else if(aTimeoutUnit == TimeUnitEnum.HOURS) {
+ aTimeoutUnifiedToSeconds = aTimeout * secondsToHours;
+ } else if(aTimeoutUnit == TimeUnitEnum.DAYS) {
+ aTimeoutUnifiedToSeconds = aTimeout * secondsToDays;
+ }
+
+ if(closeEnough(runtimeSeconds, aTimeoutUnifiedToSeconds, GRACE_PERCENTAGE)) {
+ done();
+ } else {
+ try {
+ should.fail(null, null, "Delayed runtime seconds " + runtimeSeconds + " was not close enough to exlected timeout seconds: " + aTimeoutUnifiedToSeconds);
+ } catch (err) {
+ done(err);
+ }
+ }
+ } catch(err) {
+ done(err);
+ }
+ });
+ var startTime = process.hrtime();
+ delayNode1.receive({payload:"delayMe"});
+ });
+ }
+
+ /**
+ * We send a message, take a timestamp then when the message is received by the helper node, we take another timestamp.
+ * Then check if the message has been delayed by the expected amount.
+ */
+ it('delays the message in seconds', function(done) {
+ genericDelayTest(0.5, "seconds", done);
+ });
+
+ it('delays the message in milliseconds', function(done) {
+ genericDelayTest(500, "milliseconds", done);
+ });
+
+ it('delays the message in minutes', function(done) { // this is also 0.5 seconds
+ genericDelayTest(0.00833, "minutes", done);
+ });
+
+ it('delays the message in hours', function(done) { // this is also 0.5 seconds
+ genericDelayTest(0.0001388, "hours", done);
+ });
+
+ it('delays the message in days', function(done) { // this is also 0.5 seconds
+ genericDelayTest(0.000005787, "days", done);
+ });
+
+ /**
+ * Runs a rate limit test - only testing seconds!
+ * @param aLimit - the message limit count
+ * @param runtimeInMillis - when to terminate run and count messages received
+ */
+ function genericRateLimitSECONDSTest(aLimit, runtimeInMillis, done) {
+ var flow = [{"id":"delayNode1","type":"delay","name":"delayNode","pauseType":"rate","timeout":5,"timeoutUnits":"seconds","rate":aLimit,"rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(delayNode, flow, function() {
+ var delayNode1 = helper.getNode("delayNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ var receivedMessagesStack = [];
+ var rate = 1000/aLimit;
+
+ var receiveTimestamp;
+
+ helperNode1.on("input", function(msg) {
+ if(receiveTimestamp) {
+ var elapse = process.hrtime(receiveTimestamp);
+ var receiveInterval = (elapse[0] * 1000) + ((elapse[1] / nanosToSeconds) * 1000);
+ receiveInterval.should.be.above(rate * 0.9);
+ }
+ receiveTimestamp = process.hrtime();
+ receivedMessagesStack.push(msg);
+ });
+
+ var possibleMaxMessageCount = Math.ceil(aLimit * (runtimeInMillis / 1000) + aLimit); // +aLimit as at the start of the 2nd period, we're allowing the 3rd burst
+
+ var i = 0;
+ for(; i < possibleMaxMessageCount + 1; i++) {
+ delayNode1.receive({payload:i});
+ }
+
+ setTimeout(function() {
+ try {
+ receivedMessagesStack.length.should.be.lessThan(possibleMaxMessageCount);
+ for(var j = 0; j < receivedMessagesStack.length; j++) {
+ if(receivedMessagesStack[j].payload === j) {
+ if(j === (receivedMessagesStack.length -1)) { // last message, all matched so far
+ done();
+ }
+ } else {
+ should.fail(null, null, "Received messages were not received in order. Message was " + receivedMessagesStack[i].payload + " on count " + i);
+ }
+ }
+ } catch (err) {
+ done(err);
+ }
+ }, runtimeInMillis);
+ });
+ }
+
+ it('limits the message rate to 1 per second', function(done) {
+ genericRateLimitSECONDSTest(1, 1500, done);
+ });
+
+ it('limits the message rate to 2 per second, 2 seconds', function(done) {
+ this.timeout(6000);
+ genericRateLimitSECONDSTest(2, 2100, done);
+ });
+
+ /**
+ * Runs a rate limit test with drop support - only testing seconds!
+ * @param aLimit - the message limit count
+ * @param runtimeInMillis - when to terminate run and count messages received
+ */
+ function dropRateLimitSECONDSTest(aLimit, runtimeInMillis, done) {
+ var flow = [{"id":"delayNode1","type":"delay","name":"delayNode","pauseType":"rate","timeout":5,"timeoutUnits":"seconds","rate":aLimit,"rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(delayNode, flow, function() {
+ var delayNode1 = helper.getNode("delayNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ var receivedMessagesStack = [];
+
+ var rate = 1000/aLimit;
+
+ var receiveTimestamp;
+
+ helperNode1.on("input", function(msg) {
+ if(receiveTimestamp) {
+ var elapse = process.hrtime(receiveTimestamp);
+ var receiveInterval = (elapse[0] * 1000) + ((elapse[1] / nanosToSeconds) * 1000);
+ receiveInterval.should.be.above(rate * 0.9);
+ }
+ receiveTimestamp = process.hrtime();
+ receivedMessagesStack.push(msg);
+ });
+
+ var possibleMaxMessageCount = Math.ceil(aLimit * (runtimeInMillis / 1000) + aLimit); // +aLimit as at the start of the 2nd period, we're allowing the 3rd burst
+
+ var i = 0;
+ delayNode1.receive({payload:i});
+ i++;
+ for(; i < possibleMaxMessageCount + 1; i++) {
+ setTimeout(function() {
+ delayNode1.receive({payload:i});
+ }, 2 * ((rate * i) / possibleMaxMessageCount) );
+ }
+
+ //we need to send a message delayed so that it doesn't get dropped
+ setTimeout(function() {
+ delayNode1.receive({payload:++i});
+ }, runtimeInMillis - 300); // should give enough time to squeeze another message in
+
+ setTimeout(function() {
+ try {
+ receivedMessagesStack.length.should.be.lessThan(possibleMaxMessageCount + 1);
+ receivedMessagesStack.length.should.be.greaterThan(2); // ensure that we receive more than 1st and last message
+ receivedMessagesStack[0].payload.should.be.exactly(0); // means we received the last message injected just before test termination
+ var foundAtLeastOneDrop = false;
+ for(var i = 0; i < receivedMessagesStack.length; i++) {
+ if(i > 0) {
+ if(receivedMessagesStack[i].payload - receivedMessagesStack[i - 1].payload > 1) {
+ foundAtLeastOneDrop = true;
+ }
+ }
+ }
+ foundAtLeastOneDrop.should.be.true;
+ done();
+ } catch (err) {
+ done(err);
+ }
+ }, runtimeInMillis);
+ });
+ }
+
+ it('limits the message rate to 1 per second, 4 seconds, with drop', function(done) {
+ this.timeout(6000);
+ dropRateLimitSECONDSTest(1, 4000, done);
+ });
+
+ it('limits the message rate to 2 per second, 5 seconds, with drop', function(done) {
+ this.timeout(6000);
+ dropRateLimitSECONDSTest(2, 5000, done);
+ });
+
+ /**
+ * Returns true if the actualTimeout is gracefully in between the timeoutFrom and timeoutTo
+ * values. Gracefully means that inBetween could actually mean smaller/greater values
+ * than the timeout range so long as it's within an actual grace percentage.
+ * @param timeoutFrom - The expected timeout range (low number)
+ * @param timeoutTo - The expected timeout range (high number)
+ * @param actualTimeout - The actual measured timeout value of test
+ * @param allowedGracePercent - The percentage of grace allowed
+ */
+ function inBetweenDelays(timeoutFrom, timeoutTo, actualTimeout, allowedGracePercent) {
+ if(closeEnough(actualTimeout, timeoutFrom, allowedGracePercent)) {
+ return true;
+ } else if(closeEnough(actualTimeout, timeoutTo, allowedGracePercent)) {
+ return true;
+ } else if(timeoutFrom < actualTimeout && timeoutTo > actualTimeout) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Runs a RANDOM DELAY test, checks if the delay is in between the given timeout values
+ * @param aTimeoutFrom - the timeout quantity which is the minimal acceptable wait period
+ * @param aTimeoutTo - the timeout quantity which is the maximum acceptable wait period
+ * @param aTimeoutUnit - the unit of the timeout: milliseconds, seconds, minutes, hours, days
+ */
+ function randomDelayTest(aTimeoutFrom, aTimeoutTo, aTimeoutUnit, done) {
+ var flow = [{"id":"delayNode1","type":"delay","name":"delayNode","pauseType":"random","timeout":5,"timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":aTimeoutFrom,"randomLast":aTimeoutTo,"randomUnits":aTimeoutUnit,"drop":false,"wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(delayNode, flow, function() {
+ var delayNode1 = helper.getNode("delayNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ try {
+ var endTime = process.hrtime(startTime);
+ var runtimeNanos = ( (endTime[0] * nanosToSeconds) + endTime[1] );
+ var runtimeSeconds = runtimeNanos / nanosToSeconds;
+ var aTimeoutFromUnifiedToSeconds;
+ var aTimeoutToUnifiedToSeconds;
+
+ // calculating the timeout in seconds
+ if(aTimeoutUnit == TimeUnitEnum.MILLIS) {
+ aTimeoutFromUnifiedToSeconds = aTimeoutFrom / millisToSeconds;
+ aTimeoutToUnifiedToSeconds = aTimeoutTo / millisToSeconds;
+ } else if(aTimeoutUnit == TimeUnitEnum.SECONDS) {
+ aTimeoutFromUnifiedToSeconds = aTimeoutFrom;
+ aTimeoutToUnifiedToSeconds = aTimeoutTo;
+ } else if(aTimeoutUnit == TimeUnitEnum.MINUTES) {
+ aTimeoutFromUnifiedToSeconds = aTimeoutFrom * secondsToMinutes;
+ aTimeoutToUnifiedToSeconds = aTimeoutTo * secondsToMinutes;
+ } else if(aTimeoutUnit == TimeUnitEnum.HOURS) {
+ aTimeoutFromUnifiedToSeconds = aTimeoutFrom * secondsToHours;
+ aTimeoutToUnifiedToSeconds = aTimeoutTo * secondsToHours;
+ } else if(aTimeoutUnit == TimeUnitEnum.DAYS) {
+ aTimeoutFromUnifiedToSeconds = aTimeoutFrom * secondsToDays;
+ aTimeoutToUnifiedToSeconds = aTimeoutTo * secondsToDays;
+ }
+
+ if(inBetweenDelays(aTimeoutFromUnifiedToSeconds, aTimeoutToUnifiedToSeconds, runtimeSeconds, GRACE_PERCENTAGE)) {
+ done();
+ } else {
+ try {
+ should.fail(null, null, "Delayed runtime seconds " + runtimeSeconds + " was not \"in between enough\" enough to expected values of: " + aTimeoutFromUnifiedToSeconds + " and " + aTimeoutToUnifiedToSeconds);
+ } catch (err) {
+ done(err);
+ }
+ }
+ } catch(err) {
+ done(err);
+ }
+ });
+ var startTime = process.hrtime();
+ delayNode1.receive({payload:"delayMe"});
+ });
+ }
+
+ it('randomly delays the message in seconds', function(done) {
+ randomDelayTest(0.4, 0.8, "seconds", done);
+ });
+
+ it(' randomly delays the message in milliseconds', function(done) {
+ randomDelayTest(400, 800, "milliseconds", done);
+ });
+
+ it('randomly delays the message in minutes', function(done) {
+ randomDelayTest(0.0066, 0.0133, "minutes", done);
+ });
+
+ it('delays the message in hours', function(done) {
+ randomDelayTest(0.000111111, 0.000222222, "hours", done);
+ });
+
+ it('delays the message in days', function(done) {
+ randomDelayTest(0.0000046296, 0.0000092593, "days", done);
+ });
+
+ it('handles bursts using a buffer', function(done) {
+ this.timeout(6000);
+
+ var flow = [{"id":"delayNode1","type":"delay","name":"delayNode","pauseType":"rate","timeout":5,"timeoutUnits":"seconds","rate":1000,"rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(delayNode, flow, function() {
+ var delayNode1 = helper.getNode("delayNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+
+ var sinon = require('sinon');
+
+ var receivedWarning = false;
+ var messageBurstSize = 1500;
+
+ // we ensure that we note that a warning is received for buffer growth
+ sinon.stub(delayNode1, 'warn', function(warning){
+ if(warning.indexOf("buffer exceeded 1000 messages" > -1)) {
+ receivedWarning = true;
+ }
+ });
+
+ // we ensure that the warning is received for buffer size and that we get the last message
+ helperNode1.on("input", function(msg) {
+ if(msg.payload === (messageBurstSize - 1) && receivedWarning === true) {
+ done(); // it will timeout if we don't receive the last message
+ }
+ });
+ // send 1500 messages as quickly as possible
+ for(var i = 0; i < messageBurstSize; i++) {
+ delayNode1.receive({payload:i});
+ }
+ });
+ });
+
+});
diff --git a/dgbuilder/test/nodes/core/core/90-comment_spec.js b/dgbuilder/test/nodes/core/core/90-comment_spec.js
new file mode 100644
index 0000000..54563e9
--- /dev/null
+++ b/dgbuilder/test/nodes/core/core/90-comment_spec.js
@@ -0,0 +1,36 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var commentNode = require("../../../../nodes/core/core/90-comment.js");
+var helper = require("../../helper.js");
+
+describe('comment node', function() {
+
+ afterEach(function() {
+ helper.unload();
+ });
+
+ it('should be loaded', function(done) {
+ var flow = [{id:"n1", type:"comment", name: "comment" }];
+ helper.load(commentNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ n1.should.have.property('name', 'comment');
+ done();
+ });
+ });
+
+});
diff --git a/dgbuilder/test/nodes/core/logic/10-switch_spec.js b/dgbuilder/test/nodes/core/logic/10-switch_spec.js
new file mode 100644
index 0000000..d5a4280
--- /dev/null
+++ b/dgbuilder/test/nodes/core/logic/10-switch_spec.js
@@ -0,0 +1,367 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+
+var switchNode = require("../../../../nodes/core/logic/10-switch.js");
+var helper = require("../../helper.js");
+
+describe('SwitchNode', function() {
+
+ beforeEach(function(done) {
+ helper.startServer(done);
+ });
+
+ afterEach(function(done) {
+ helper.unload();
+ helper.stopServer(done);
+ });
+
+ it('should be loaded', function(done) {
+ var flow = [{"id":"switchNode1","type":"switch","name":"switchNode","property":"payload","rules":[{"t":"eq","v":""}],"checkall":"true","outputs":1,"wires":[[]]}];
+ helper.load(switchNode, flow, function() {
+ var switchNode1 = helper.getNode("switchNode1");
+ switchNode1.should.have.property('name', 'switchNode');
+ done();
+ });
+ });
+
+ /**
+ * Test a switch node where one argument is consumed by the rule (such as greater than).
+ * @param rule - the switch rule (see 10-switc.js) string we're using
+ * @param ruleWith - whatever the rule should be executed with (say greater than 5)
+ * @param aCheckall - whether the switch flow should have the checkall flag set to true/false
+ * @param shouldReceive - whether the helper node should receive a payload
+ * @param sendPayload - the payload message we're sending
+ * @param done - callback when done
+ */
+ function genericSwitchTest(rule, ruleWith, aCheckall, shouldReceive, sendPayload, done) {
+ var flow = [{id:"switchNode1",type:"switch",name:"switchNode",property:"payload",rules:[{"t":rule,"v":ruleWith}],checkall:aCheckall,outputs:1,wires:[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ customFlowSwitchTest(flow, shouldReceive, sendPayload, done);
+ }
+
+ /**
+ * Test a switch node where NO arguments are consumed by the rule (such as TRUE/FALSE)
+ * @param rule - the switch rule (see 10-switc.js) string we're using
+ * @param aCheckall - whether the switch flow should have the checkall flag set to true/false
+ * @param shouldReceive - whether the helper node should receive a payload
+ * @param sendPayload - the payload message we're sending
+ * @param done - callback when done
+ */
+ function singularSwitchTest(rule, aCheckall, shouldReceive, sendPayload, done) {
+ var flow = [{id:"switchNode1",type:"switch",name:"switchNode",property:"payload",rules:[{"t":rule}],checkall:aCheckall,outputs:1,wires:[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ customFlowSwitchTest(flow, shouldReceive, sendPayload, done);
+ }
+
+ /**
+ * Test a switch node where two arguments are consumed by the rule (such as between).
+ * @param rule - the switch rule (see 10-switc.js) string we're using
+ * @param ruleWith - whatever the rule should be executed with (say between 5...)
+ * @param ruleWith2 - whatever the rule should be executed with (say ...and 5)
+ * @param aCheckall - whether the switch flow should have the checkall flag set to true/false
+ * @param shouldReceive - whether the helper node should receive a payload
+ * @param sendPayload - the payload message we're sending
+ * @param done - callback when done
+ */
+ function twoFieldSwitchTest(rule, ruleWith, ruleWith2, aCheckall, shouldReceive, sendPayload, done) {
+ var flow = [{id:"switchNode1",type:"switch",name:"switchNode",property:"payload",rules:[{"t":rule,"v":ruleWith,"v2":ruleWith2}],checkall:aCheckall,outputs:1,wires:[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ customFlowSwitchTest(flow, shouldReceive, sendPayload, done);
+ }
+
+ /**
+ * Execute a switch test. Can specify whether the should node is expected to send a payload onwards to the helper node.
+ * The flow and the payload can be customised
+ * @param flow - the custom flow to be tested => must contain a switch node (switchNode1) wiring a helper node (helperNode1)
+ * @param shouldReceive - whether the helper node should receive a payload
+ * @param sendPayload - the payload message we're sending
+ * @param done - callback when done
+ */
+ function customFlowSwitchTest(flow, shouldReceive, sendPayload, done) {
+ helper.load(switchNode, flow, function() {
+ var switchNode1 = helper.getNode("switchNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ try {
+ if(shouldReceive === true) {
+ msg.payload.should.equal(sendPayload);
+ done();
+ } else {
+ should.fail(null, null, "We should never get an input!");
+ }
+ } catch(err) {
+ done(err);
+ }
+ });
+ switchNode1.receive({payload:sendPayload});
+ if(shouldReceive === false) {
+ setTimeout(function() {
+ done();
+ }, 200);
+ }
+ });
+ }
+
+ it('should check if payload equals given value', function(done) {
+ genericSwitchTest("eq", "Hello", true, true, "Hello", done);
+ });
+
+ it('should return nothing when the payload doesn\'t equal to desired string', function(done) {
+ genericSwitchTest("eq", "Hello", true, false, "Hello!", done);
+ });
+
+ it('should check if payload NOT equals given value', function(done) {
+ genericSwitchTest("neq", "Hello", true, true, "HEllO", done);
+ });
+
+ it('should return nothing when the payload does equal to desired string', function(done) {
+ genericSwitchTest("neq", "Hello", true, false, "Hello", done);
+ });
+
+ it('should check if payload equals given numeric value', function(done) {
+ genericSwitchTest("eq", 3, true, true, 3, done);
+ });
+
+ it('should return nothing when the payload doesn\'t equal to desired numeric value', function(done) {
+ genericSwitchTest("eq", 2, true, false, 4, done);
+ });
+
+ it('should check if payload NOT equals given numeric value', function(done) {
+ genericSwitchTest("neq", 55667744, true, true, -1234, done);
+ });
+
+ it('should return nothing when the payload does equal to desired numeric value', function(done) {
+ genericSwitchTest("neq", 10, true, false, 10, done);
+ });
+
+ it('should check if payload is less than given value', function(done) {
+ genericSwitchTest("lt", 3, true, true, 2, done);
+ });
+
+ it('should return nothing when the payload is not less than desired string', function(done) {
+ genericSwitchTest("lt", 3, true, false, 4, done);
+ });
+
+ it('should check if payload less than equals given value', function(done) {
+ genericSwitchTest("lte", 3, true, true, 3, done);
+ });
+
+ it('should check if payload is greater than given value', function(done) {
+ genericSwitchTest("gt", 3, true, true, 6, done);
+ });
+
+ it('should return nothing when the payload is not greater than desired string', function(done) {
+ genericSwitchTest("gt", 3, true, false, -1, done);
+ });
+
+ it('should check if payload is greater than/equals given value', function(done) {
+ genericSwitchTest("gte", 3, true, true, 3, done);
+ });
+
+ it('should return nothing when the payload is not greater than desired string', function(done) {
+ genericSwitchTest("gt", 3, true, false, -1, done);
+ });
+
+ it('should check if payload is greater than/equals given value', function(done) {
+ genericSwitchTest("gte", 3, true, true, 3, done);
+ });
+
+ it('should check if payload is between given values', function(done) {
+ twoFieldSwitchTest("btwn", 3, 5, true, true, 4, done);
+ });
+
+ it('should check if payload is not between given values', function(done) {
+ twoFieldSwitchTest("btwn", 3, 5, true, false, 12, done);
+ });
+
+ it('should check if payload contains given value', function(done) {
+ genericSwitchTest("cont", "Hello", true, true, "Hello World!", done);
+ });
+
+ it('should return nothing when the payload doesn\'t contain desired string', function(done) {
+ genericSwitchTest("cont", "Hello", true, false, "This is not a greeting!", done);
+ });
+
+ it('should match regex', function(done) {
+ genericSwitchTest("regex", "[abc]+", true, true, "abbabac", done);
+ });
+
+ it('should return nothing when the payload doesn\'t match regex', function(done) {
+ genericSwitchTest("regex", "\\d+", true, false, "This is not a digit", done);
+ });
+
+ it('should return nothing when the payload doesn\'t contain desired string', function(done) {
+ genericSwitchTest("cont", "Hello", true, false, "This is not a greeting!", done);
+ });
+
+ it('should check if input is true', function(done) {
+ singularSwitchTest(true, true, true, true, done);
+ });
+
+ it('sends nothing when input is false and checking for true', function(done) {
+ singularSwitchTest(true, true, false, false, done);
+ });
+
+ it('should check if input is indeed false', function(done) {
+ singularSwitchTest(false, true, true, false, done);
+ });
+
+ it('sends nothing when input is false and checking for true', function(done) {
+ singularSwitchTest(false, true, false, true, done);
+ });
+
+ it('should check if input is indeed null', function(done) {
+ var flow = [{id:"switchNode1",type:"switch",name:"switchNode",property:"payload",rules:[{"t":"null"}],checkall:true,outputs:1,wires:[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+
+
+ helper.load(switchNode, flow, function() {
+ var switchNode1 = helper.getNode("switchNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ if(msg.payload) {
+ try {
+ should.fail(null, null, "msg.payload should be undefined!");
+ } catch (err) {
+ done(err);
+ }
+ } else {
+ done();
+ }
+ });
+ switchNode1.receive({payload:undefined});
+ });
+ });
+
+ it('should check if input is indeed not null', function(done) {
+ var flow = [{id:"switchNode1",type:"switch",name:"switchNode",property:"payload",rules:[{"t":"nnull"}],checkall:false,outputs:1,wires:[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+
+
+ helper.load(switchNode, flow, function() {
+ var switchNode1 = helper.getNode("switchNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ if(msg.payload) {
+ done();
+ } else {
+ try {
+ msg.payload.should.equal("Anything here");
+ } catch (err) {
+ done(err);
+ }
+ }
+ });
+ switchNode1.receive({payload:"Anything here"});
+ });
+ });
+
+ it('sends a message when the "else/otherwise" statement is selected' , function(done) {
+ singularSwitchTest("else", true, true, 123456, done);
+ });
+
+ it('handles more than one switch statement' , function(done) {
+ var flow = [{id:"switchNode1",type:"switch",name:"switchNode",property:"payload",rules:[{"t":"eq","v":"Hello"},{"t":"cont","v":"ello"}, {"t":"else"}],checkall:true,outputs:3,wires:[["helperNode1"], ["helperNode2"], ["helperNode3"]]},
+ {id:"helperNode1", type:"helper", wires:[]},
+ {id:"helperNode2", type:"helper", wires:[]},
+ {id:"helperNode3", type:"helper", wires:[]}];
+
+
+ helper.load(switchNode, flow, function() {
+ var switchNode1 = helper.getNode("switchNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ var helperNode2 = helper.getNode("helperNode2");
+ var helperNode3 = helper.getNode("helperNode3");
+
+ var nodeHitCount = 0;
+ helperNode1.on("input", function(msg) {
+ try {
+ msg.payload.should.equal("Hello");
+ nodeHitCount++;
+ } catch (err) {
+ done(err);
+ }
+ });
+ helperNode2.on("input", function(msg) {
+ try {
+ msg.payload.should.equal("Hello");
+ nodeHitCount++;
+ if(nodeHitCount == 2) {
+ done();
+ } else {
+ try {
+ should.fail(null, null, "Both statements should be triggered!");
+ } catch (err) {
+ done(err);
+ }
+ }
+ } catch (err) {
+ done(err);
+ }
+ });
+ helperNode3.on("input", function(msg) {
+ try {
+ should.fail(null, null, "The otherwise/else statement should not be triggered here!");
+ } catch (err) {
+ done(err);
+ }
+ });
+ switchNode1.receive({payload:"Hello"});
+ });
+ });
+
+ it('stops after first statement' , function(done) {
+ var flow = [{id:"switchNode1",type:"switch",name:"switchNode",property:"payload",rules:[{"t":"eq","v":"Hello"},{"t":"cont","v":"ello"}, {"t":"else"}],checkall:"false",outputs:3,wires:[["helperNode1"], ["helperNode2"], ["helperNode3"]]},
+ {id:"helperNode1", type:"helper", wires:[]},
+ {id:"helperNode2", type:"helper", wires:[]},
+ {id:"helperNode3", type:"helper", wires:[]}];
+
+
+ helper.load(switchNode, flow, function() {
+ var switchNode1 = helper.getNode("switchNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ var helperNode2 = helper.getNode("helperNode2");
+ var helperNode3 = helper.getNode("helperNode3");
+
+ helperNode1.on("input", function(msg) {
+ try {
+ msg.payload.should.equal("Hello");
+ done();
+ } catch (err) {
+ done(err);
+ }
+ });
+ helperNode2.on("input", function(msg) {
+ try {
+ should.fail(null, null, "The otherwise/else statement should not be triggered here!");
+ } catch (err) {
+ done(err);
+ }
+ });
+ helperNode3.on("input", function(msg) {
+ try {
+ should.fail(null, null, "The otherwise/else statement should not be triggered here!");
+ } catch (err) {
+ done(err);
+ }
+ });
+ switchNode1.receive({payload:"Hello"});
+ });
+ });
+
+});
diff --git a/dgbuilder/test/nodes/core/logic/15-change_spec.js b/dgbuilder/test/nodes/core/logic/15-change_spec.js
new file mode 100644
index 0000000..5072dfc
--- /dev/null
+++ b/dgbuilder/test/nodes/core/logic/15-change_spec.js
@@ -0,0 +1,194 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+
+var changeNode = require("../../../../nodes/core/logic/15-change.js");
+var helper = require("../../helper.js");
+
+describe('ChangeNode', function() {
+
+ beforeEach(function(done) {
+ helper.startServer(done);
+ });
+
+ afterEach(function(done) {
+ helper.unload();
+ helper.stopServer(done);
+ });
+
+ it('should be loaded', function(done) {
+ var flow = [{"id":"changeNode1","type":"change","action":"replace","property":"payload","from":"","to":"","reg":false,"name":"changeNode","wires":[[]]}];
+ helper.load(changeNode, flow, function() {
+ var changeNode1 = helper.getNode("changeNode1");
+ changeNode1.should.have.property('name', 'changeNode');
+ done();
+ });
+ });
+
+ it('sets the value of the message property', function(done) {
+ var flow = [{"id":"changeNode1","type":"change","action":"replace","property":"payload","from":"","to":"changed","reg":false,"name":"changeNode","wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(changeNode, flow, function() {
+ var changeNode1 = helper.getNode("changeNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ try {
+ msg.payload.should.equal("changed");
+ done();
+ } catch(err) {
+ done(err);
+ }
+ });
+ changeNode1.receive({payload:"changeMe"});
+ });
+ });
+
+ it('changes the value of the message property', function(done) {
+ var flow = [{"id":"changeNode1","type":"change","action":"change","property":"payload","from":"Hello","to":"Goodbye","reg":false,"name":"changeNode","wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(changeNode, flow, function() {
+ var changeNode1 = helper.getNode("changeNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ try {
+ msg.payload.should.equal("Goodbye World!");
+ done();
+ } catch(err) {
+ done(err);
+ }
+ });
+ changeNode1.receive({payload:"Hello World!"});
+ });
+ });
+
+ it('changes the value of the message property based on a regex', function(done) {
+ var flow = [{"id":"changeNode1","type":"change","action":"change","property":"payload","from":"\\d+","to":"NUMBER","reg":true,"name":"changeNode","wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(changeNode, flow, function() {
+ var changeNode1 = helper.getNode("changeNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ try {
+ msg.payload.should.equal("Replace all numbers NUMBER and NUMBER");
+ done();
+ } catch(err) {
+ done(err);
+ }
+ });
+ changeNode1.receive({payload:"Replace all numbers 12 and 14"});
+ });
+ });
+
+ it('supports regex groups', function(done) {
+ var flow = [{"id":"changeNode1","type":"change","action":"change","property":"payload","from":"(Hello)","to":"$1-$1-$1","reg":true,"name":"changeNode","wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(changeNode, flow, function() {
+ var changeNode1 = helper.getNode("changeNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ try {
+ msg.payload.should.equal("Hello-Hello-Hello World");
+ done();
+ } catch(err) {
+ done(err);
+ }
+ });
+ changeNode1.receive({payload:"Hello World"});
+ });
+ });
+
+ it('Reports invalid regex', function(done) {
+
+ var sinon = require('sinon');
+
+ var flow = [{"id":"changeNode1","type":"change","action":"change","property":"payload","from":"\\+**+","to":"NUMBER","reg":true,"name":"changeNode","wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(changeNode, flow, function() {
+ var changeNode1 = helper.getNode("changeNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+
+ sinon.stub(changeNode1, 'error', function(error) {
+ if(error.indexOf("regular expression" > -1)) {
+ done();
+ } else {
+ try {
+ should.fail(null, null, "An error should be reported for an invalid regex");
+ } catch (err) {
+ done(err);
+ }
+ }
+ });
+ changeNode1.receive({payload:"This is irrelevant"});
+ });
+ });
+
+ it('deletes the value of the message property', function(done) {
+ var flow = [{"id":"changeNode1","type":"change","action":"delete","property":"payload","from":"","to":"","reg":false,"name":"changeNode","wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(changeNode, flow, function() {
+ var changeNode1 = helper.getNode("changeNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ try {
+ msg.should.not.have.property('payload');
+ done();
+ } catch(err) {
+ done(err);
+ }
+ });
+ changeNode1.receive({payload:"This won't get through!"});
+ });
+ });
+
+// TODO confirm the behaviour of the change node later,apparently calling eval such that makeNew( msg, node.property.split("."), eval(node.to) ); is incorrect
+// it('changes the property name of the message object', function(done) {
+// var flow = [{"id":"changeNode1","type":"change","action":"replace","property":"payload","from":"","to":"msg.otherProp=10","reg":false,"name":"changeNode","wires":[["helperNode1"]]},
+// {id:"helperNode1", type:"helper", wires:[]}];
+// helper.load(changeNode, flow, function() {
+// var changeNode1 = helper.getNode("changeNode1");
+// var helperNode1 = helper.getNode("helperNode1");
+// helperNode1.on("input", function(msg) {
+// try {
+// msg.otherProp.should.equal(10);
+// done();
+// } catch(err) {
+// done(err);
+// }
+// });
+// changeNode1.receive({payload:"changeMe"});
+// });
+// });
+
+ it('splits dot delimited properties into objects', function(done) {
+ var flow = [{"id":"changeNode1","type":"change","action":"replace","property":"pay.load","from":"","to":"10","reg":false,"name":"changeNode","wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(changeNode, flow, function() {
+ var changeNode1 = helper.getNode("changeNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ try {
+ msg.pay.load.should.equal("10");
+ done();
+ } catch(err) {
+ done(err);
+ }
+ });
+ changeNode1.receive({"pay.load":"changeMe"});
+ });
+ });
+});
+
diff --git a/dgbuilder/test/nodes/core/logic/16-range_spec.js b/dgbuilder/test/nodes/core/logic/16-range_spec.js
new file mode 100644
index 0000000..abb6c64
--- /dev/null
+++ b/dgbuilder/test/nodes/core/logic/16-range_spec.js
@@ -0,0 +1,131 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+
+var rangeNode = require("../../../../nodes/core/logic/16-range.js");
+var helper = require("../../helper.js");
+
+describe('RangeNode', function() {
+
+ beforeEach(function(done) {
+ helper.startServer(done);
+ });
+
+ afterEach(function(done) {
+ helper.unload();
+ helper.stopServer(done);
+ });
+
+ it('should be loaded', function(done) {
+ var flow = [{"id":"rangeNode1","type":"range","minin":"0","maxin":"99","minout":"100","maxout":"199","action":"range","round":true,"name":"rangeNode","wires":[[]]}];
+ helper.load(rangeNode, flow, function() {
+ var rangeNode1 = helper.getNode("rangeNode1");
+ rangeNode1.should.have.property('name', 'rangeNode');
+ done();
+ });
+ });
+
+ /**
+ * Run a generic range test
+ * @param action - scale/clamp (range limit)/roll (modulo): what action to choose
+ * @param minin - map from minimum value
+ * @param maxin - map from maximum value
+ * @param minout - map to minimum value
+ * @param maxout - map to maximum value
+ * @param round - whether to round the result to the nearest integer
+ * @param aPayload - what payload to send to the range node
+ * @param expectedResult - what result we're expecting
+ * @param done - the callback to call when test done
+ */
+ function genericRangeTest(action, minin, maxin, minout, maxout, round, aPayload, expectedResult, done) {
+ var flow = [{"id":"rangeNode1","type":"range","minin":minin,"maxin":maxin,"minout":minout,"maxout":maxout,"action":action,"round":round,"name":"rangeNode","wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(rangeNode, flow, function() {
+ var rangeNode1 = helper.getNode("rangeNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ try {
+ msg.payload.should.equal(expectedResult);
+ done();
+ } catch(err) {
+ done(err);
+ }
+ });
+ rangeNode1.receive({payload:aPayload});
+ });
+ }
+
+ it('ranges numbers up tenfold', function(done) {
+ genericRangeTest("scale", 0, 100, 0, 1000, false, 50, 500, done);
+ });
+
+ it('ranges numbers down such as centimetres to metres', function(done) {
+ genericRangeTest("scale", 0, 100, 0, 1, false, 55, 0.55, done);
+ });
+
+ it('wraps numbers down say for degree/rotation reading 1/2', function(done) {
+ genericRangeTest("roll", 0, 10, 0, 360, true, 15, 180, done); // 1/2 around wrap => "one and a half turns"
+ });
+
+ it('wraps numbers around say for degree/rotation reading 1/3', function(done) {
+ genericRangeTest("roll", 0, 10, 0, 360, true, 13.3333, 120, done); // 1/3 around wrap => "one and a third turns"
+ });
+
+ it('wraps numbers around say for degree/rotation reading 1/4', function(done) {
+ genericRangeTest("roll", 0, 10, 0, 360, true, 12.5, 90, done); // 1/4 around wrap => "one and a quarter turns"
+ });
+
+ it('wraps numbers around say for degree/rotation reading 1/4', function(done) {
+ genericRangeTest("roll", 0, 10, 0, 360, true, 12.5, 90, done); // 1/4 around wrap => "one and a quarter turns"
+ });
+
+ it('wraps numbers down say for degree/rotation reading 1/4', function(done) {
+ genericRangeTest("roll", 0, 10, 0, 360, true, -12.5, 270, done); // 1/4 backwards wrap => "one and a quarter turns backwards"
+ });
+
+ it('clamps numbers within a range - over max', function(done) {
+ genericRangeTest("clamp", 0, 10, 0, 1000, false, 111, 1000, done);
+ });
+
+ it('clamps numbers within a range - below min', function(done) {
+ genericRangeTest("clamp", 0, 10, 0, 1000, false, -1, 0, done);
+ });
+
+ it('reports if input is not a number', function(done) {
+ var flow = [{"id":"rangeNode1","type":"range","minin":0,"maxin":0,"minout":0,"maxout":0,"action":"scale","round":true,"name":"rangeNode","wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(rangeNode, flow, function() {
+ var rangeNode1 = helper.getNode("rangeNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+
+ var sinon = require('sinon');
+ sinon.stub(rangeNode1, 'log', function(log) {
+ if(log.indexOf("Not a number") > -1) {
+ done();
+ } else {
+ try {
+ should.fail(null, null, "Non-number inputs should be reported!");
+ } catch (err) {
+ done(err);
+ }
+ }
+ });
+
+ rangeNode1.receive({payload:"NOT A NUMBER"});
+ });
+ });
+});
diff --git a/dgbuilder/test/nodes/core/parsers/70-HTML_spec.js b/dgbuilder/test/nodes/core/parsers/70-HTML_spec.js
new file mode 100644
index 0000000..e7e4cbb
--- /dev/null
+++ b/dgbuilder/test/nodes/core/parsers/70-HTML_spec.js
@@ -0,0 +1,211 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var sinon = require("sinon");
+var path = require("path");
+var fs = require('fs-extra');
+
+var htmlNode = require("../../../../nodes/core/parsers/70-HTML.js");
+var helper = require("../../helper.js");
+
+describe('html node', function() {
+
+ var resourcesDir = __dirname+ path.sep + ".." + path.sep + ".." + path.sep + ".." + path.sep + "resources" + path.sep;
+ var file = path.join(resourcesDir, "70-HTML-test-file.html");
+
+ before(function(done) {
+ helper.startServer(done);
+ });
+
+ beforeEach(function() {
+ fs.existsSync(file).should.be.true;
+ });
+
+ afterEach(function() {
+ helper.unload();
+ });
+
+ it('should be loaded', function(done) {
+ var flow = [{id:"htmlNode1", type:"html", name: "htmlNode" }];
+ helper.load(htmlNode, flow, function() {
+ var htmlNode1 = helper.getNode("htmlNode1");
+ htmlNode1.should.have.property('name', 'htmlNode');
+ done();
+ });
+ });
+
+ it('should retrieve header contents as default', function(done) {
+ fs.readFile(file, 'utf8', function(err, data) {
+ var flow = [{id:"n1",type:"html",wires:[["n2"]],func:"return msg;"},
+ {id:"n2", type:"helper"}];
+
+ helper.load(htmlNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n2.on("input", function(msg) {
+ msg.should.have.property('topic', 'bar');
+ should.equal(msg.payload, 'This is a test page for node 70-HTML');
+ done();
+ });
+ n1.receive({payload:data,topic: "bar"});
+ });
+ });
+ });
+
+ it('should retrieve paragraph contents when specified', function(done) {
+ fs.readFile(file, 'utf8', function(err, data) {
+ var flow = [{id:"n1",type:"html",wires:[["n2"]],ret:"text",tag:"p"},
+ {id:"n2", type:"helper"}];
+
+ helper.load(htmlNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n2.on("input", function(msg) {
+ msg.should.have.property('topic', 'bar');
+ should.equal(msg.payload, 'There\'s nothing to read here.');
+ done();
+ });
+ n1.receive({payload:data,topic: "bar"});
+ });
+ });
+ });
+
+ it('should retrieve list contents as an array of html as default', function(done) {
+ fs.readFile(file, 'utf8', function(err, data) {
+ var flow = [{id:"n1",type:"html",wires:[["n2"]],tag:"ol"},
+ {id:"n2", type:"helper"}];
+
+ helper.load(htmlNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n2.on("input", function(msg) {
+ msg.should.have.property('topic', 'bar');
+ msg.payload[0].indexOf("<li>Blue</li>").should.be.above(-1);
+ msg.payload[0].indexOf("<li>Red</li>").should.be.above(-1);
+ done();
+ });
+ n1.receive({payload:data,topic: "bar"});
+ });
+ });
+ });
+
+ it('should retrieve list contents as an array of text', function(done) {
+ fs.readFile(file, 'utf8', function(err, data) {
+ var flow = [{id:"n1",type:"html",wires:[["n2"]],tag:"ol",ret:"text"},
+ {id:"n2", type:"helper"}];
+
+ helper.load(htmlNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n2.on("input", function(msg) {
+ msg.should.have.property('topic', 'bar');
+ msg.payload.should.be.instanceof(Array).and.have.lengthOf(1);
+ msg.payload[0].indexOf("Blue").should.be.above(-1);
+ msg.payload[0].indexOf("Red").should.be.above(-1);
+ done();
+ });
+ n1.receive({payload:data,topic: "bar"});
+ });
+ });
+ });
+
+ it('should log on error', function(done) {
+ fs.readFile(file,function(err, data) {
+ var flow = [{id:"n1",type:"html",wires:[["n2"]],tag:"p"},
+ {id:"n2", type:"helper"}];
+
+ helper.load(htmlNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n1.on("log", function(msg) {
+ msg.should.have.property('msg');
+ msg.msg.indexOf("Error:").should.be.above(-1);
+ msg.msg.should.startWith("Error:");
+ done();
+ });
+ n1.receive({payload:null,topic: "bar"});
+ });
+ });
+ });
+
+ describe('multiple messages', function(){
+ var cnt = 0;
+
+ afterEach(function() {
+ cnt.should.be.exactly(2);
+ cnt = 0;
+ });
+
+ it('should retrieve list contents as html as default with output as multiple msgs ', function(done) {
+ fs.readFile(file, 'utf8', function(err, data) {
+ var flow = [{id:"n1",type:"html",wires:[["n2"]],tag:"ul",as:"multi"},
+ {id:"n2", type:"helper"}];
+
+ helper.load(htmlNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n2.on("input", function(msg) {
+ cnt++;
+ msg.should.have.property('topic', 'bar');
+ if (cnt !== 1 && cnt !== 2) {
+ return false;
+ }
+ if (cnt === 1) {
+ msg.payload.indexOf("<li>Apple</li>").should.be.above(-1);
+ msg.payload.indexOf("<li>Pear</li>").should.be.above(-1);
+ } else if (cnt === 2) {
+ msg.payload.indexOf("<li>Potato</li>").should.be.above(-1);
+ msg.payload.indexOf("<li>Parsnip</li>").should.be.above(-1);
+ done();
+ }
+ });
+ n1.receive({payload:data,topic: "bar"});
+ });
+ });
+ });
+
+ it('should retrieve list contents as text with output as multiple msgs ', function(done) {
+ fs.readFile(file, 'utf8', function(err, data) {
+ var flow = [{id:"n1",type:"html",wires:[["n2"]],tag:"ul",ret:"text",as:"multi"},
+ {id:"n2", type:"helper"}];
+
+ helper.load(htmlNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n2.on("input", function(msg) {
+ cnt++;
+ msg.should.have.property('topic', 'bar');
+ if (cnt !== 1 && cnt !== 2) {
+ return false;
+ }
+ if (cnt === 1) {
+ msg.payload.indexOf("Apple").should.be.above(-1);
+ msg.payload.indexOf("Pear").should.be.above(-1);
+ } else if (cnt === 2) {
+ msg.payload.indexOf("Potato").should.be.above(-1);
+ msg.payload.indexOf("Parsnip").should.be.above(-1);
+ done();
+ }
+ });
+ n1.receive({payload:data,topic: "bar"});
+ });
+ });
+ });
+
+ });
+
+});
diff --git a/dgbuilder/test/nodes/core/parsers/70-JSON_spec.js b/dgbuilder/test/nodes/core/parsers/70-JSON_spec.js
new file mode 100644
index 0000000..b2ebe71
--- /dev/null
+++ b/dgbuilder/test/nodes/core/parsers/70-JSON_spec.js
@@ -0,0 +1,104 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var jsonNode = require("../../../../nodes/core/parsers/70-JSON.js");
+var helper = require("../../helper.js");
+
+describe('JSON node', function() {
+
+ before(function(done) {
+ helper.startServer(done);
+ });
+
+ afterEach(function() {
+ helper.unload();
+ });
+
+ it('should be loaded', function(done) {
+ var flow = [{id:"jsonNode1", type:"json", name: "jsonNode" }];
+ helper.load(jsonNode, flow, function() {
+ var jsonNode1 = helper.getNode("jsonNode1");
+ jsonNode1.should.have.property('name', 'jsonNode');
+ done();
+ });
+ });
+
+ it('should convert a valid json string to a javascript object', function(done) {
+ var flow = [{id:"jn1",type:"json",wires:[["jn2"]],func:"return msg;"},
+ {id:"jn2", type:"helper"}];
+ helper.load(jsonNode, flow, function() {
+ var jn1 = helper.getNode("jn1");
+ var jn2 = helper.getNode("jn2");
+ jn2.on("input", function(msg) {
+ msg.should.have.property('topic', 'bar');
+ msg.payload.should.have.property('employees');
+ msg.payload.employees[0].should.have.property('firstName', 'John');
+ msg.payload.employees[0].should.have.property('lastName', 'Smith');
+ done();
+ });
+ var jsonString = '{"employees":[{"firstName":"John", "lastName":"Smith"}]}';
+ jn1.receive({payload:jsonString,topic: "bar"});
+ });
+ });
+
+ it('should convert a javascript object to a json string', function(done) {
+ var flow = [{id:"jn1",type:"json",wires:[["jn2"]],func:"return msg;"},
+ {id:"jn2", type:"helper"}];
+ helper.load(jsonNode, flow, function() {
+ var jn1 = helper.getNode("jn1");
+ var jn2 = helper.getNode("jn2");
+ jn2.on("input", function(msg) {
+ msg.should.have.property('topic', 'bar');
+ should.equal(msg.payload, '{"employees":[{"firstName":"John","lastName":"Smith"}]}');
+ done();
+ });
+ var obj = {employees:[{firstName:"John", lastName:"Smith"}]};
+ jn1.receive({payload:obj,topic: "bar"});
+ });
+ });
+
+ it('should log an error if asked to parse an invalid json string', function(done) {
+ var flow = [{id:"jn1",type:"json",wires:[["jn2"]],func:"return msg;"},
+ {id:"jn2", type:"helper"}];
+ helper.load(jsonNode, flow, function() {
+ var jn1 = helper.getNode("jn1");
+ var jn2 = helper.getNode("jn2");
+ jn1.on("log", function(msg) {
+ msg.should.have.property('msg');
+ should.deepEqual("SyntaxError: Unexpected token o"+ "\nfoo", msg.msg);
+ done();
+ });
+ jn1.receive({payload:'foo',topic: "bar"});
+ });
+ });
+
+ it('should log an error if asked to parse something thats not json or js', function(done) {
+ var flow = [{id:"jn1",type:"json",wires:[["jn2"]],func:"return msg;"},
+ {id:"jn2", type:"helper"}];
+ helper.load(jsonNode, flow, function() {
+ var jn1 = helper.getNode("jn1");
+ var jn2 = helper.getNode("jn2");
+ jn1.on("log", function(msg) {
+ msg.should.have.property('msg');
+ should.deepEqual("dropped: 1", msg.msg);
+ done();
+ });
+ jn1.receive({payload:1,topic: "bar"});
+ });
+ });
+
+});
diff --git a/dgbuilder/test/nodes/core/parsers/70-XML_spec.js b/dgbuilder/test/nodes/core/parsers/70-XML_spec.js
new file mode 100644
index 0000000..8bf269d
--- /dev/null
+++ b/dgbuilder/test/nodes/core/parsers/70-XML_spec.js
@@ -0,0 +1,107 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var xmlNode = require("../../../../nodes/core/parsers/70-XML.js");
+var helper = require("../../helper.js");
+
+describe('XML node', function() {
+
+ before(function(done) {
+ helper.startServer(done);
+ });
+
+ afterEach(function() {
+ helper.unload();
+ });
+
+ it('should be loaded', function(done) {
+ var flow = [{id:"xmlNode1", type:"xml", name: "xmlNode" }];
+ helper.load(xmlNode, flow, function() {
+ var xmlNode1 = helper.getNode("xmlNode1");
+ xmlNode1.should.have.property('name', 'xmlNode');
+ done();
+ });
+ });
+
+ it('should convert a valid xml string to a javascript object', function(done) {
+ var flow = [{id:"n1",type:"xml",wires:[["n2"]],func:"return msg;"},
+ {id:"n2", type:"helper"}];
+ helper.load(xmlNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n2.on("input", function(msg) {
+ msg.should.have.property('topic', 'bar');
+ msg.payload.should.have.property('employees');
+ msg.payload.employees.should.have.property('firstName');
+ should.equal(msg.payload.employees.firstName[0], 'John');
+ msg.payload.employees.should.have.property('lastName');
+ should.equal(msg.payload.employees.lastName[0], 'Smith');
+ done();
+ });
+ var string = '<employees><firstName>John</firstName><lastName>Smith</lastName></employees>';
+ n1.receive({payload:string,topic: "bar"});
+ });
+ });
+
+ it('should convert a javascript object to an xml string', function(done) {
+ var flow = [{id:"n1",type:"xml",wires:[["n2"]],func:"return msg;"},
+ {id:"n2", type:"helper"}];
+ helper.load(xmlNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n2.on("input", function(msg) {
+ msg.should.have.property('topic', 'bar');
+ console.log(msg.payload);
+ var index = msg.payload.indexOf('<employees><firstName>John</firstName><lastName>Smith</lastName></employees>');
+ index.should.be.above(-1);
+ done();
+ });
+ var obj = {"employees":{"firstName":["John"],"lastName":["Smith"] }};
+ n1.receive({payload:obj,topic: "bar"});
+ });
+ });
+
+ it('should log an error if asked to parse an invalid xml string', function(done) {
+ var flow = [{id:"n1",type:"xml",wires:[["n2"]],func:"return msg;"},
+ {id:"n2", type:"helper"}];
+ helper.load(xmlNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n1.on("log", function(msg) {
+ should.deepEqual("error", msg.level);
+ done();
+ });
+ n1.receive({payload:'<not valid xml>',topic: "bar"});
+ });
+ });
+
+ it('should log an error if asked to parse something thats not xml or js', function(done) {
+ var flow = [{id:"n1",type:"xml",wires:[["n2"]],func:"return msg;"},
+ {id:"n2", type:"helper"}];
+ helper.load(xmlNode, flow, function() {
+ var n1 = helper.getNode("n1");
+ var n2 = helper.getNode("n2");
+ n1.on("log", function(msg) {
+ msg.should.have.property('msg');
+ should.deepEqual("This node only handles xml strings or js objects.", msg.msg);
+ done();
+ });
+ n1.receive({payload:1,topic: "bar"});
+ });
+ });
+
+});
diff --git a/dgbuilder/test/nodes/core/storage/28-tail_spec.js b/dgbuilder/test/nodes/core/storage/28-tail_spec.js
new file mode 100644
index 0000000..0612457
--- /dev/null
+++ b/dgbuilder/test/nodes/core/storage/28-tail_spec.js
@@ -0,0 +1,165 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var path = require('path');
+var fs = require('fs-extra');
+var mkdirp = require('mkdirp');
+
+var tailNode = require("../../../../nodes/core/storage/28-tail.js");
+var helper = require("../../helper.js");
+
+describe('TailNode', function() {
+
+ var resourcesDir = path.join(__dirname,"..","..","..","resources");
+ var fileToTail = path.join(resourcesDir,"28-tail-test-file.txt");
+
+ beforeEach(function(done) {
+ fs.writeFileSync(fileToTail, "Tail message line 1\nTail message line 2\n");
+ helper.startServer(done);
+ });
+
+ afterEach(function(done) {
+ helper.unload().then(function() {
+ fs.unlinkSync(fileToTail);
+ helper.stopServer(done);
+ });
+ });
+
+ it('should be loaded', function(done) {
+ var flow = [{id:"tailNode1", type:"tail", name: "tailNode", "split":true, "filename":fileToTail}];
+ helper.load(tailNode, flow, function() {
+ var tailNode1 = helper.getNode("tailNode1");
+ tailNode1.should.have.property('name', 'tailNode');
+ done();
+ });
+ });
+
+ it('tail should tail a file', function(done) {
+ var flow = [{id:"tailNode1", type:"tail", name: "tailNode", "split":true, "filename":fileToTail, "wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(tailNode, flow, function() {
+ var tailNode1 = helper.getNode("tailNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ var inputCounter = 0;
+ helperNode1.on("input", function(msg) {
+ //console.log(msg);
+ msg.should.have.property('topic', fileToTail);
+ msg.payload.should.equal("Tail message line " + (++inputCounter + 2));
+ if (inputCounter === 2) {
+ done();
+ }
+ });
+ setTimeout( function() {
+ fs.appendFileSync(fileToTail, "Tail message line 3\n");
+ fs.appendFileSync(fileToTail, "Tail message line 4\n");
+ },100);
+ });
+ });
+
+ it('tail should work in non-split mode', function(done) {
+ var flow = [{id:"tailNode1", type:"tail", name: "tailNode", "split":false, "filename":fileToTail, "wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(tailNode, flow, function() {
+ var tailNode1 = helper.getNode("tailNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ //console.log(msg);
+ msg.should.have.property('topic', fileToTail);
+ msg.payload.should.equal("Tail message line 5\nTail message line 6\n");
+ done();
+ });
+ setTimeout( function() {
+ fs.appendFileSync(fileToTail, "Tail message line 5\nTail message line 6\n");
+ },150);
+ });
+ });
+
+ it('tail should handle a non-existent file', function(done) {
+ fs.unlinkSync(fileToTail);
+ var flow = [{id:"tailNode1", type:"tail", name: "tailNode", "split":true, "filename":fileToTail, "wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(tailNode, flow, function() {
+ var tailNode1 = helper.getNode("tailNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ helperNode1.on("input", function(msg) {
+ msg.should.have.property('topic', fileToTail);
+ msg.payload.should.equal("Tail message line");
+ done();
+ });
+ setTimeout( function() {
+ fs.writeFileSync(fileToTail, "Tail message line\n");
+ },150);
+ });
+ });
+ /*
+ it('tail should handle file truncation', function(done) {
+ var flow = [{id:"tailNode1", type:"tail", name: "tailNode", "split":true, "filename":fileToTail, "wires":[["helperNode1"]]},
+ {id:"helperNode1", type:"helper", wires:[]}];
+ helper.load(tailNode, flow, function() {
+ var tailNode1 = helper.getNode("tailNode1");
+ var helperNode1 = helper.getNode("helperNode1");
+ var inputCounter = 0;
+ var warned = false;
+ tailNode1.on("log", function(msg) {
+ if (msg.level == "warn") { warned = true; }
+ });
+ helperNode1.on("input", function(msg) {
+ console.log("inputCounter =",inputCounter);
+ console.log(msg);
+ msg.should.have.property('topic', fileToTail);
+ inputCounter++;
+ if (inputCounter === 1) {
+ warned.should.be.false;
+ msg.payload.should.equal("Tail message line append");
+ } else if (inputCounter === 2) {
+ msg.payload.should.equal("Tail message line truncate");
+ } else {
+ msg.payload.should.equal("Tail message line append "+inputCounter);
+ }
+
+ if (inputCounter === 5) {
+ setTimeout(function() {
+ warned.should.be.true;
+ done();
+ },100);
+ }
+ });
+ var actions = [
+ function() { fs.appendFileSync(fileToTail, "Tail message line append\n");},
+ function() { fs.writeFileSync(fileToTail, "Tail message line truncate\n");},
+ function() { fs.appendFileSync(fileToTail, "Tail message line append 3\n");},
+ function() { fs.appendFileSync(fileToTail, "Tail message line append 4\n");},
+ function() { fs.appendFileSync(fileToTail, "Tail message line append 5\n");}
+ ];
+
+ function processAction() {
+ var action = actions.shift();
+ action();
+ if (actions.length > 0) {
+ setTimeout(function() {
+ processAction();
+ },250);
+ }
+ }
+ setTimeout( function() {
+ processAction();
+ },150);
+ });
+ });
+ */
+
+});
diff --git a/dgbuilder/test/nodes/helper.js b/dgbuilder/test/nodes/helper.js
new file mode 100644
index 0000000..9b371ca
--- /dev/null
+++ b/dgbuilder/test/nodes/helper.js
@@ -0,0 +1,128 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var when = require("when");
+var request = require('supertest');
+var nock;
+if (!process.version.match(/^v0\.[0-9]\./)) {
+ // only set nock for node >= 0.10
+ try {
+ nock = require('nock');
+ } catch (err) {
+ // nevermind, will skip nock tests
+ nock = null;
+ }
+}
+var RED = require("../../red/red.js");
+var redNodes = require("../../red/nodes");
+var flows = require("../../red/nodes/flows");
+var credentials = require("../../red/nodes/credentials");
+var comms = require("../../red/comms.js");
+
+var http = require('http');
+var express = require('express');
+var app = express();
+
+var address = '127.0.0.1';
+var listenPort = 0; // use ephemeral port
+var port;
+var url;
+
+var server;
+
+function helperNode(n) {
+ RED.nodes.createNode(this, n);
+}
+
+module.exports = {
+ load: function(testNode, testFlows, testCredentials, cb) {
+ if (typeof testCredentials === 'function') {
+ cb = testCredentials;
+ testCredentials = {};
+ }
+
+ var storage = {
+ getFlows: function() {
+ var defer = when.defer();
+ defer.resolve(testFlows);
+ return defer.promise;
+ },
+ getCredentials: function() {
+ var defer = when.defer();
+ defer.resolve(testCredentials);
+ return defer.promise;
+ },
+ saveCredentials: function() {
+ // do nothing
+ },
+ };
+ var settings = {
+ available: function() { return false; }
+ };
+
+ redNodes.init(settings, storage);
+ credentials.init(storage);
+ RED.nodes.registerType("helper", helperNode);
+ testNode(RED);
+ flows.load().then(function() {
+ should.deepEqual(testFlows, flows.getFlows());
+ cb();
+ });
+ },
+ unload: function() {
+ // TODO: any other state to remove between tests?
+ redNodes.clearRegistry();
+ return flows.stopFlows();
+ },
+
+ getNode: function(id) {
+ return flows.get(id);
+ },
+
+ credentials: credentials,
+
+ clearFlows: function() {
+ return flows.clear();
+ },
+
+ request: function() {
+ return request(RED.httpAdmin);
+ },
+
+ startServer: function(done) {
+ server = http.createServer(function(req,res){app(req,res);});
+ RED.init(server, {});
+ server.listen(listenPort, address);
+ server.on('listening', function() {
+ port = server.address().port;
+ url = 'http://' + address + ':' + port;
+ comms.start();
+ done();
+ });
+ },
+ //TODO consider saving TCP handshake/server reinit on start/stop/start sequences
+ stopServer: function(done) {
+ if(server) {
+ server.close(done);
+ }
+ },
+
+ url: function() { return url; },
+
+ nock: nock,
+
+};
diff --git a/dgbuilder/test/red/cli/lib/config_spec.js b/dgbuilder/test/red/cli/lib/config_spec.js
new file mode 100644
index 0000000..68e960a
--- /dev/null
+++ b/dgbuilder/test/red/cli/lib/config_spec.js
@@ -0,0 +1,53 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var sinon = require("sinon");
+var fs = require("fs");
+
+var config = require("../../../../red/cli/lib/config");
+
+describe("cli config", function() {
+ afterEach(function() {
+ config.unload();
+ });
+ it('loads preferences when target referenced', sinon.test(function() {
+ this.stub(fs,"readFileSync",function() {
+ return '{"target":"http://example.com:1880"}'
+ });
+ config.target.should.eql("http://example.com:1880");
+ }));
+ it('provide default value for target', sinon.test(function() {
+ this.stub(fs,"readFileSync",function() {
+ return '{}'
+ });
+ config.target.should.eql("http://localhost:1880");
+ }));
+ it('saves preferences when target set', sinon.test(function() {
+ this.stub(fs,"readFileSync",function() {
+ return '{"target":"http://another.example.com:1880"}'
+ });
+ this.stub(fs,"writeFileSync",function() {});
+
+ config.target.should.eql("http://another.example.com:1880");
+ config.target = "http://final.example.com:1880";
+
+ fs.readFileSync.calledOnce.should.be.true;
+ fs.writeFileSync.calledOnce.should.be.true;
+
+ }));
+
+});
\ No newline at end of file
diff --git a/dgbuilder/test/red/cli/lib/request_spec.js b/dgbuilder/test/red/cli/lib/request_spec.js
new file mode 100644
index 0000000..7d2b5ac
--- /dev/null
+++ b/dgbuilder/test/red/cli/lib/request_spec.js
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var sinon = require("sinon");
+var fs = require("fs");
+var request = require("request");
+
+var apiRequest = require("../../../../red/cli/lib/request");
+var config = require("../../../../red/cli/lib/config");
+
+describe("cli request", function() {
+ var sandbox = sinon.sandbox.create();
+ before(function() {
+ sandbox.stub(fs,"readFileSync",function() {
+ return '{"target":"http://example.com:1880"}'
+ });
+ });
+ after(function() {
+ sandbox.restore();
+ });
+
+ it('returns the json response to a get', sinon.test(function(done) {
+ this.stub(request, 'get').yields(null, {statusCode:200}, JSON.stringify({a: "b"}));
+
+ apiRequest("/foo",{}).then(function(res) {
+ res.should.eql({a:"b"});
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }));
+});
\ No newline at end of file
diff --git a/dgbuilder/test/red/cli/nr-cli_spec.js b/dgbuilder/test/red/cli/nr-cli_spec.js
new file mode 100644
index 0000000..59a5c64
--- /dev/null
+++ b/dgbuilder/test/red/cli/nr-cli_spec.js
@@ -0,0 +1,15 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
\ No newline at end of file
diff --git a/dgbuilder/test/red/comms_spec.js b/dgbuilder/test/red/comms_spec.js
new file mode 100644
index 0000000..dce4d83
--- /dev/null
+++ b/dgbuilder/test/red/comms_spec.js
@@ -0,0 +1,189 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var http = require('http');
+var express = require('express');
+var app = express();
+var WebSocket = require('ws');
+
+var comms = require("../../red/comms.js");
+var address = '127.0.0.1';
+var listenPort = 0; // use ephemeral port
+
+describe("comms", function() {
+ describe("with default keepalive", function() {
+ var server;
+ var url;
+ var port;
+ before(function(done) {
+ server = http.createServer(function(req,res){app(req,res)});
+ comms.init(server, {});
+ server.listen(listenPort, address);
+ server.on('listening', function() {
+ port = server.address().port;
+ url = 'http://' + address + ':' + port + '/comms';
+ comms.start();
+ done();
+ });
+ });
+
+ after(function() {
+ comms.stop();
+ });
+
+ it('accepts connection', function(done) {
+ var ws = new WebSocket(url);
+ ws.on('open', function() {
+ ws.close();
+ done();
+ });
+ });
+
+ it('publishes message after subscription', function(done) {
+ var ws = new WebSocket(url);
+ ws.on('open', function() {
+ ws.send('{"subscribe":"topic1"}');
+ comms.publish('topic1', 'foo');
+ });
+ ws.on('message', function(msg) {
+ msg.should.equal('{"topic":"topic1","data":"foo"}');
+ ws.close();
+ done();
+ });
+ });
+
+ it('publishes retained message for subscription', function(done) {
+ comms.publish('topic2', 'bar', true);
+ var ws = new WebSocket(url);
+ ws.on('open', function() {
+ ws.send('{"subscribe":"topic2"}');
+ });
+ ws.on('message', function(msg) {
+ msg.should.equal('{"topic":"topic2","data":"bar"}');
+ ws.close();
+ done();
+ });
+ });
+
+ it('retained message is deleted by non-retained message', function(done) {
+ comms.publish('topic3', 'retained', true);
+ comms.publish('topic3', 'non-retained');
+ var ws = new WebSocket(url);
+ ws.on('open', function() {
+ ws.send('{"subscribe":"topic3"}');
+ comms.publish('topic3', 'new');
+ });
+ ws.on('message', function(msg) {
+ msg.should.equal('{"topic":"topic3","data":"new"}');
+ ws.close();
+ done();
+ });
+ });
+
+ it('malformed messages are ignored',function(done) {
+ var ws = new WebSocket(url);
+ ws.on('open', function() {
+ ws.send('not json');
+ ws.send('[]');
+ ws.send('{"subscribe":"topic3"}');
+ comms.publish('topic3', 'correct');
+ });
+ ws.on('message', function(msg) {
+ msg.should.equal('{"topic":"topic3","data":"correct"}');
+ ws.close();
+ done();
+ });
+ });
+
+ // The following test currently fails due to minimum viable
+ // implementation. More test should be written to test topic
+ // matching once this one is passing
+
+ if (0) {
+ it('receives message on correct topic', function(done) {
+ var ws = new WebSocket(url);
+ ws.on('open', function() {
+ ws.send('{"subscribe":"topic4"}');
+ comms.publish('topic5', 'foo');
+ comms.publish('topic4', 'bar');
+ });
+ ws.on('message', function(msg) {
+ msg.should.equal('{"topic":"topic4","data":"bar"}');
+ ws.close();
+ done();
+ });
+ });
+ }
+ });
+
+ describe("keep alives", function() {
+ var server;
+ var url;
+ var port;
+ before(function(done) {
+ server = http.createServer(function(req,res){app(req,res)});
+ comms.init(server, {webSocketKeepAliveTime: 100});
+ server.listen(listenPort, address);
+ server.on('listening', function() {
+ port = server.address().port;
+ url = 'http://' + address + ':' + port + '/comms';
+ comms.start();
+ done();
+ });
+ });
+ after(function() {
+ comms.stop();
+ });
+ it('are sent', function(done) {
+ var ws = new WebSocket(url);
+ var count = 0;
+ ws.on('message', function(data) {
+ var msg = JSON.parse(data);
+ msg.should.have.property('topic','hb');
+ msg.should.have.property('data').be.a.Number;
+ count++;
+ if (count == 3) {
+ ws.close();
+ done();
+ }
+ });
+ });
+ it('are not sent if other messages are sent', function(done) {
+ var ws = new WebSocket(url);
+ var count = 0;
+ var interval;
+ ws.on('open', function() {
+ ws.send('{"subscribe":"foo"}');
+ interval = setInterval(function() {
+ comms.publish('foo', 'bar');
+ }, 50);
+ });
+ ws.on('message', function(data) {
+ var msg = JSON.parse(data);
+ msg.should.have.property('topic', 'foo');
+ msg.should.have.property('data', 'bar');
+ count++;
+ if (count == 5) {
+ clearInterval(interval);
+ ws.close();
+ done();
+ }
+ });
+ });
+ });
+
+});
diff --git a/dgbuilder/test/red/events_spec.js b/dgbuilder/test/red/events_spec.js
new file mode 100644
index 0000000..2475926
--- /dev/null
+++ b/dgbuilder/test/red/events_spec.js
@@ -0,0 +1,22 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+var should = require("should");
+
+describe("red/events", function() {
+ it('can be required without errors', function() {
+ require("../../red/events");
+ });
+});
diff --git a/dgbuilder/test/red/library_spec.js b/dgbuilder/test/red/library_spec.js
new file mode 100644
index 0000000..5225528
--- /dev/null
+++ b/dgbuilder/test/red/library_spec.js
@@ -0,0 +1,237 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var sinon = require('sinon');
+var request = require('supertest');
+var http = require('http');
+var express = require('express');
+
+var fs = require('fs-extra');
+var path = require('path');
+var when = require('when');
+
+var app = express();
+var RED = require("../../red/red.js");
+var server = require("../../red/server.js");
+var nodes = require("../../red/nodes");
+
+describe("library", function() {
+ var userDir = path.join(__dirname,".testUserHome");
+ before(function(done) {
+ fs.remove(userDir,function(err) {
+ fs.mkdir(userDir,function() {
+ sinon.stub(nodes, 'load', function() {
+ return when.promise(function(resolve,reject){
+ resolve([]);
+ });
+ });
+ RED.init(http.createServer(function(req,res){app(req,res)}),
+ {userDir: userDir});
+ server.start().then(function () { done(); });
+ });
+ });
+ });
+
+ after(function(done) {
+ fs.remove(userDir,done);
+ server.stop();
+ nodes.load.restore();
+ });
+
+ afterEach(function(done) {
+ fs.remove(userDir,function(err) {
+ fs.mkdir(userDir,done);
+ });
+ });
+
+ describe("flows", function() {
+ it('returns empty result', function(done) {
+ request(RED.httpAdmin)
+ .get('/library/flows')
+ .expect(200)
+ .end(function(err,res) {
+ if (err) {
+ throw err;
+ }
+ res.body.should.not.have.property('f');
+ done();
+ });
+ });
+
+ it('returns 404 for non-existent entry', function(done) {
+ request(RED.httpAdmin)
+ .get('/library/flows/foo')
+ .expect(404)
+ .end(done);
+ });
+
+ it('can store and retrieve item', function(done) {
+ var flow = '[]';
+ request(RED.httpAdmin)
+ .post('/library/flows/foo')
+ .set('Content-Type', 'text/plain')
+ .send(flow)
+ .expect(204).end(function (err, res) {
+ if (err) {
+ throw err;
+ }
+ request(RED.httpAdmin)
+ .get('/library/flows/foo')
+ .expect(200)
+ .end(function(err,res) {
+ if (err) {
+ throw err;
+ }
+ res.text.should.equal(flow);
+ done();
+ });
+ });
+ });
+
+ it('lists a stored item', function(done) {
+ request(RED.httpAdmin)
+ .post('/library/flows/bar')
+ .expect(204)
+ .end(function () {
+ request(RED.httpAdmin)
+ .get('/library/flows')
+ .expect(200)
+ .end(function(err,res) {
+ if (err) {
+ throw err;
+ }
+ res.body.should.have.property('f');
+ should.deepEqual(res.body.f,['bar']);
+ done();
+ });
+ });
+ });
+
+ it('returns 403 for malicious access attempt', function(done) {
+ // without the userDir override the malicious url would be
+ // http://127.0.0.1:1880/library/flows/../../package to
+ // obtain package.json from the node-red root.
+ request(RED.httpAdmin)
+ .get('/library/flows/../../../../../package')
+ .expect(403)
+ .end(done);
+ });
+
+ it('returns 403 for malicious access attempt', function(done) {
+ // without the userDir override the malicious url would be
+ // http://127.0.0.1:1880/library/flows/../../package to
+ // obtain package.json from the node-red root.
+ request(RED.httpAdmin)
+ .post('/library/flows/../../../../../package')
+ .expect(403)
+ .end(done);
+ });
+
+ });
+
+ describe("type", function() {
+ before(function() {
+ RED.library.register('test');
+ });
+
+ it('returns empty result', function(done) {
+ request(RED.httpAdmin)
+ .get('/library/test')
+ .expect(200)
+ .end(function(err,res) {
+ if (err) {
+ throw err;
+ }
+ res.body.should.not.have.property('f');
+ done();
+ });
+ });
+
+ it('returns 404 for non-existent entry', function(done) {
+ request(RED.httpAdmin)
+ .get('/library/test/foo')
+ .expect(404)
+ .end(done);
+ });
+
+ it('can store and retrieve item', function(done) {
+ var flow = '[]';
+ request(RED.httpAdmin)
+ .post('/library/test/foo')
+ .set('Content-Type', 'text/plain')
+ .send(flow)
+ .expect(204).end(function (err, res) {
+ if (err) {
+ throw err;
+ }
+ request(RED.httpAdmin)
+ .get('/library/test/foo')
+ .expect(200)
+ .end(function(err,res) {
+ if (err) {
+ throw err;
+ }
+ res.text.should.equal(flow);
+ done();
+ });
+ });
+ });
+
+ it('lists a stored item', function(done) {
+ request(RED.httpAdmin)
+ .post('/library/test/bar')
+ .expect(204)
+ .end(function () {
+ request(RED.httpAdmin)
+ .get('/library/test')
+ .expect(200)
+ .end(function(err,res) {
+ if (err) {
+ throw err;
+ }
+ should.deepEqual(res.body,[{ fn: 'bar'}]);
+ done();
+ });
+ });
+ });
+
+
+ it('returns 403 for malicious access attempt', function(done) {
+ request(RED.httpAdmin)
+ .get('/library/test/../../../../../../../../../../etc/passwd')
+ .expect(403)
+ .end(done);
+ });
+
+ it('returns 403 for malicious access attempt', function(done) {
+ request(RED.httpAdmin)
+ .get('/library/test/..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\etc\\passwd')
+ .expect(403)
+ .end(done);
+ });
+
+ it('returns 403 for malicious access attempt', function(done) {
+ request(RED.httpAdmin)
+ .post('/library/test/../../../../../../../../../../etc/passwd')
+ .set('Content-Type', 'text/plain')
+ .send('root:x:0:0:root:/root:/usr/bin/tclsh')
+ .expect(403)
+ .end(done);
+ });
+
+ });
+});
diff --git a/dgbuilder/test/red/log_spec.js b/dgbuilder/test/red/log_spec.js
new file mode 100644
index 0000000..0fb0aaf
--- /dev/null
+++ b/dgbuilder/test/red/log_spec.js
@@ -0,0 +1,22 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+var should = require("should");
+
+describe("red/log", function() {
+ it('can be required without errors', function() {
+ require("../../red/log");
+ });
+});
diff --git a/dgbuilder/test/red/nodes/Node_spec.js b/dgbuilder/test/red/nodes/Node_spec.js
new file mode 100644
index 0000000..6ac54bd
--- /dev/null
+++ b/dgbuilder/test/red/nodes/Node_spec.js
@@ -0,0 +1,297 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var sinon = require('sinon');
+var RedNode = require("../../../red/nodes/Node");
+var comms = require('../../../red/comms');
+
+describe('Node', function() {
+ describe('#constructor',function() {
+ it('is called with an id and a type',function() {
+ var n = new RedNode({id:'123',type:'abc'});
+ n.should.have.property('id','123');
+ n.should.have.property('type','abc');
+ n.should.not.have.property('name');
+ n.wires.should.be.empty;
+ });
+
+ it('is called with an id, a type and a name',function() {
+ var n = new RedNode({id:'123',type:'abc',name:'barney'});
+ n.should.have.property('id','123');
+ n.should.have.property('type','abc');
+ n.should.have.property('name','barney');
+ n.wires.should.be.empty;
+ });
+
+ it('is called with an id, a type and some wires',function() {
+ var n = new RedNode({id:'123',type:'abc',wires:['123','456']});
+ n.should.have.property('id','123');
+ n.should.have.property('type','abc');
+ n.should.not.have.property('name');
+ n.wires.should.have.length(2);
+ });
+
+ });
+
+ describe('#close', function() {
+ it('emits close event when closed',function(done) {
+ var n = new RedNode({id:'123',type:'abc'});
+ n.on('close',function() {
+ done();
+ });
+ var p = n.close();
+ should.not.exist(p);
+ });
+
+ it('returns a promise when provided a callback with a done parameter',function(testdone) {
+ var n = new RedNode({id:'123',type:'abc'});
+ n.on('close',function(done) {
+ setTimeout(function() {
+ done();
+ },200);
+ });
+ var p = n.close();
+ should.exist(p);
+ p.then(function() {
+ testdone();
+ });
+ });
+ });
+
+
+ describe('#receive', function() {
+ it('emits input event when called', function(done) {
+ var n = new RedNode({id:'123',type:'abc'});
+ var message = {payload:"hello world"};
+ n.on('input',function(msg) {
+ should.deepEqual(msg,message);
+ done();
+ });
+ n.receive(message);
+ });
+ });
+
+ describe('#send', function() {
+
+ it('emits a single message', function(done) {
+ var n1 = new RedNode({id:'n1',type:'abc',wires:[['n2']]});
+ var n2 = new RedNode({id:'n2',type:'abc'});
+ var message = {payload:"hello world"};
+
+ n2.on('input',function(msg) {
+ // msg equals message, but is a new copy
+ should.deepEqual(msg,message);
+ should.notStrictEqual(msg,message);
+ done();
+ });
+
+ n1.send(message);
+ });
+
+ it('emits multiple messages on a single output', function(done) {
+ var n1 = new RedNode({id:'n1',type:'abc',wires:[['n2']]});
+ var n2 = new RedNode({id:'n2',type:'abc'});
+
+ var messages = [
+ {payload:"hello world"},
+ {payload:"hello world again"}
+ ];
+
+ var rcvdCount = 0;
+
+ n2.on('input',function(msg) {
+ should.deepEqual(msg,messages[rcvdCount]);
+ should.notStrictEqual(msg,messages[rcvdCount]);
+ rcvdCount += 1;
+ if (rcvdCount == 2) {
+ done();
+ }
+ });
+ n1.send([messages]);
+ });
+
+ it('emits messages to multiple outputs', function(done) {
+ var n1 = new RedNode({id:'n1',type:'abc',wires:[['n2'],['n3'],['n4','n5']]});
+ var n2 = new RedNode({id:'n2',type:'abc'});
+ var n3 = new RedNode({id:'n3',type:'abc'});
+ var n4 = new RedNode({id:'n4',type:'abc'});
+ var n5 = new RedNode({id:'n5',type:'abc'});
+
+ var messages = [
+ {payload:"hello world"},
+ null,
+ {payload:"hello world again"}
+ ];
+
+ var rcvdCount = 0;
+
+ n2.on('input',function(msg) {
+ should.deepEqual(msg,messages[0]);
+ should.notStrictEqual(msg,messages[0]);
+ rcvdCount += 1;
+ if (rcvdCount == 3) {
+ done();
+ }
+ });
+
+ n3.on('input',function(msg) {
+ should.fail(null,null,"unexpected message");
+ });
+
+ n4.on('input',function(msg) {
+ should.deepEqual(msg,messages[2]);
+ should.notStrictEqual(msg,messages[2]);
+ rcvdCount += 1;
+ if (rcvdCount == 3) {
+ done();
+ }
+ });
+
+ n5.on('input',function(msg) {
+ should.deepEqual(msg,messages[2]);
+ should.notStrictEqual(msg,messages[2]);
+ rcvdCount += 1;
+ if (rcvdCount == 3) {
+ done();
+ }
+ });
+
+ n1.send(messages);
+ });
+
+ it('emits no messages', function(done) {
+ var n1 = new RedNode({id:'n1',type:'abc',wires:[['n2']]});
+ var n2 = new RedNode({id:'n2',type:'abc'});
+
+ n2.on('input',function(msg) {
+ should.fail(null,null,"unexpected message");
+ });
+
+ setTimeout(function() {
+ done();
+ }, 200);
+
+ n1.send();
+ });
+
+ it('emits messages ignoring non-existent nodes', function(done) {
+ var n1 = new RedNode({id:'n1',type:'abc',wires:[['n9'],['n2']]});
+ var n2 = new RedNode({id:'n2',type:'abc'});
+
+ var messages = [
+ {payload:"hello world"},
+ {payload:"hello world again"}
+ ];
+
+ n2.on('input',function(msg) {
+ should.deepEqual(msg,messages[1]);
+ should.notStrictEqual(msg,messages[1]);
+ done();
+ });
+
+ n1.send(messages);
+ });
+
+ it('emits messages without cloning req or res', function(done) {
+ var n1 = new RedNode({id:'n1',type:'abc',wires:[['n2']]});
+ var n2 = new RedNode({id:'n2',type:'abc'});
+
+ var req = {};
+ var res = {};
+ var cloned = {};
+ var message = {payload: "foo", cloned: cloned, req: req, res: res};
+
+ n2.on('input',function(msg) {
+ should.deepEqual(msg, message);
+ msg.cloned.should.not.be.exactly(message.cloned);
+ msg.req.should.be.exactly(message.req);
+ msg.res.should.be.exactly(message.res);
+ done();
+ });
+
+ n1.send(message);
+ });
+
+ });
+
+ describe('#log', function() {
+ it('emits a log message', function(done) {
+ var n = new RedNode({id:'123',type:'abc'});
+ n.on('log',function(obj) {
+ should.deepEqual({level:"log", id:n.id,
+ type:n.type, msg:"a log message"}, obj);
+ done();
+ });
+ n.log("a log message");
+ });
+ });
+
+ describe('#log', function() {
+ it('emits a log message with a name', function(done) {
+ var n = new RedNode({id:'123', type:'abc', name:"barney"});
+ n.on('log',function(obj) {
+ should.deepEqual({level:"log", id:n.id, name: "barney",
+ type:n.type, msg:"a log message"}, obj);
+ done();
+ });
+ n.log("a log message");
+ });
+ });
+
+ describe('#warn', function() {
+ it('emits a warning', function(done) {
+ var n = new RedNode({id:'123',type:'abc'});
+ n.on('log',function(obj) {
+ should.deepEqual({level:"warn", id:n.id,
+ type:n.type, msg:"a warning"}, obj);
+ done();
+ });
+ n.warn("a warning");
+ });
+ });
+
+ describe('#error', function() {
+ it('emits an error message', function(done) {
+ var n = new RedNode({id:'123',type:'abc'});
+ n.on('log',function(obj) {
+ should.deepEqual({level:"error", id:n.id,
+ type:n.type, msg:"an error message"}, obj);
+ done();
+ });
+ n.error("an error message");
+ });
+ });
+
+ describe('#status', function() {
+ after(function() {
+ comms.publish.restore();
+ });
+ it('publishes status', function(done) {
+ var n = new RedNode({id:'123',type:'abc'});
+ var status = {fill:"green",shape:"dot",text:"connected"};
+ sinon.stub(comms, 'publish', function(topic, message, retain) {
+ topic.should.equal('status/123');
+ message.should.equal(status);
+ retain.should.be.true;
+ done();
+ });
+
+ n.status(status);
+ });
+ });
+
+});
diff --git a/dgbuilder/test/red/nodes/credentials_spec.js b/dgbuilder/test/red/nodes/credentials_spec.js
new file mode 100644
index 0000000..3d10461
--- /dev/null
+++ b/dgbuilder/test/red/nodes/credentials_spec.js
@@ -0,0 +1,497 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var sinon = require("sinon");
+var when = require("when");
+var util = require("util");
+
+var index = require("../../../red/nodes/index");
+var credentials = require("../../../red/nodes/credentials");
+
+describe('Credentials', function() {
+
+ afterEach(function() {
+ index.clearRegistry();
+ });
+
+ it('loads from storage',function(done) {
+
+ var storage = {
+ getCredentials: function() {
+ return when.promise(function(resolve,reject) {
+ resolve({"a":{"b":1,"c":2}});
+ });
+ }
+ };
+
+ credentials.init(storage);
+
+ credentials.load().then(function() {
+
+ credentials.get("a").should.have.property('b',1);
+ credentials.get("a").should.have.property('c',2);
+
+ done();
+ });
+ });
+
+
+ it('saves to storage', function(done) {
+ var storage = {
+ getCredentials: function() {
+ return when.promise(function(resolve,reject) {
+ resolve({"a":{"b":1,"c":2}});
+ });
+ },
+ saveCredentials: function(creds) {
+ return when(true);
+ }
+ };
+ sinon.spy(storage,"saveCredentials");
+ credentials.init(storage);
+ credentials.load().then(function() {
+ should.not.exist(credentials.get("b"))
+ credentials.add('b',{"d":3});
+ storage.saveCredentials.callCount.should.be.exactly(1);
+ credentials.get("b").should.have.property('d',3);
+ storage.saveCredentials.restore();
+ done();
+ });
+ });
+
+ it('deletes from storage', function(done) {
+ var storage = {
+ getCredentials: function() {
+ return when.promise(function(resolve,reject) {
+ resolve({"a":{"b":1,"c":2}});
+ });
+ },
+ saveCredentials: function(creds) {
+ return when(true);
+ }
+ };
+ sinon.spy(storage,"saveCredentials");
+ credentials.init(storage);
+ credentials.load().then(function() {
+ should.exist(credentials.get("a"))
+ credentials.delete('a');
+ storage.saveCredentials.callCount.should.be.exactly(1);
+ should.not.exist(credentials.get("a"));
+ storage.saveCredentials.restore();
+ done();
+ });
+
+ });
+
+ it('clean up from storage', function(done) {
+ var storage = {
+ getCredentials: function() {
+ return when.promise(function(resolve,reject) {
+ resolve({"a":{"b":1,"c":2}});
+ });
+ },
+ saveCredentials: function(creds) {
+ return when(true);
+ }
+ };
+ sinon.spy(storage,"saveCredentials");
+ credentials.init(storage);
+ credentials.load().then(function() {
+ should.exist(credentials.get("a"));
+ credentials.clean(function() {
+ return false;
+ });
+ storage.saveCredentials.callCount.should.be.exactly(1);
+ should.not.exist(credentials.get("a"));
+ storage.saveCredentials.restore();
+ done();
+ });
+ });
+
+ it('handle error loading from storage', function(done) {
+ var storage = {
+ getCredentials: function() {
+ return when.promise(function(resolve,reject) {
+ reject("test forcing failure");
+ });
+ },
+ saveCredentials: function(creds) {
+ return when(true);
+ }
+ };
+ var logmsg = 'no errors yet';
+ sinon.stub(util, 'log', function(msg) {
+ logmsg = msg;
+ });
+
+ credentials.init(storage);
+ credentials.load().then(function() {
+ should.equal('[red] Error loading credentials : test forcing failure', logmsg);
+ util.log.restore();
+ done();
+ }).otherwise(function(err){
+ util.log.restore();
+ done(err);
+ });
+ });
+
+ it('credential type is not registered when extract', function(done) {
+ var testFlows = [{"type":"test","id":"tab1","label":"Sheet 1"}];
+ var storage = {
+ getFlows: function() {
+ var defer = when.defer();
+ defer.resolve(testFlows);
+ return defer.promise;
+ },
+ getCredentials: function() {
+ return when.promise(function(resolve,reject) {
+ resolve({"tab1":{"b":1,"c":2}});
+ });
+ },
+ saveFlows: function(conf) {
+ var defer = when.defer();
+ defer.resolve();
+ should.deepEqual(testFlows, conf);
+ return defer.promise;
+ },
+ saveCredentials: function(creds) {
+ return when(true);
+ },
+ getSettings: function() {
+ return when({});
+ },
+ saveSettings: function(s) {
+ return when();
+ }
+ };
+ function TestNode(n) {
+ index.createNode(this, n);
+
+ this.id = 'tab1';
+ this.type = 'test';
+ this.name = 'barney';
+ var node = this;
+
+ this.on("log", function() {
+ // do nothing
+ });
+ }
+ var logmsg = 'nothing logged yet';
+ sinon.stub(util, 'log', function(msg) {
+ logmsg = msg;
+ });
+ var settings = {
+ available: function() { return false;}
+ }
+ index.init(settings, storage);
+ index.registerType('test', TestNode);
+ index.loadFlows().then(function() {
+ var testnode = new TestNode({id:'tab1',type:'test',name:'barney'});
+ credentials.extract(testnode);
+ should.equal(logmsg, 'Credential Type test is not registered.');
+ util.log.restore();
+ done();
+ }).otherwise(function(err){
+ util.log.restore();
+ done(err);
+ });
+ });
+
+ describe('extract and store credential updates in the provided node', function() {
+ var path = require('path');
+ var fs = require('fs-extra');
+ var http = require('http');
+ var express = require('express');
+ var server = require("../../../red/server");
+ var localfilesystem = require("../../../red/storage/localfilesystem");
+ var app = express();
+ var RED = require("../../../red/red.js");
+
+ var userDir = path.join(__dirname,".testUserHome");
+ before(function(done) {
+ fs.remove(userDir,function(err) {
+ fs.mkdir(userDir,function() {
+ sinon.stub(index, 'load', function() {
+ return when.promise(function(resolve,reject){
+ resolve([]);
+ });
+ });
+ sinon.stub(localfilesystem, 'getCredentials', function() {
+ return when.promise(function(resolve,reject) {
+ resolve({"tab1":{"foo": 2, "pswd":'sticks'}});
+ });
+ }) ;
+ RED.init(http.createServer(function(req,res){app(req,res)}),
+ {userDir: userDir});
+ server.start().then(function () {
+ done();
+ });
+ });
+ });
+ });
+
+ after(function(done) {
+ fs.remove(userDir,done);
+ server.stop();
+ index.load.restore();
+ localfilesystem.getCredentials.restore();
+ });
+
+ function TestNode(n) {
+ index.createNode(this, n);
+ var node = this;
+ this.on("log", function() {
+ // do nothing
+ });
+ }
+
+ it(': credential updated with good value', function(done) {
+ index.registerType('test', TestNode, {
+ credentials: {
+ foo: {type:"test"}
+ }
+ });
+ index.loadFlows().then(function() {
+ var testnode = new TestNode({id:'tab1',type:'test',name:'barney'});
+ credentials.extract(testnode);
+ should.exist(credentials.get('tab1'));
+ credentials.get('tab1').should.have.property('foo',2);
+
+ // set credentials to be an updated value and checking this is extracted properly
+ testnode.credentials = {"foo": 3};
+ credentials.extract(testnode);
+ should.exist(credentials.get('tab1'));
+ credentials.get('tab1').should.not.have.property('foo',2);
+ credentials.get('tab1').should.have.property('foo',3);
+ done();
+ }).otherwise(function(err){
+ done(err);
+ });
+ });
+
+ it(': credential updated with empty value', function(done) {
+ index.registerType('test', TestNode, {
+ credentials: {
+ foo: {type:"test"}
+ }
+ });
+ index.loadFlows().then(function() {
+ var testnode = new TestNode({id:'tab1',type:'test',name:'barney'});
+ // setting value of "foo" credential to be empty removes foo as a property
+ testnode.credentials = {"foo": ''};
+ credentials.extract(testnode);
+ should.exist(credentials.get('tab1'));
+ credentials.get('tab1').should.not.have.property('foo',2);
+ credentials.get('tab1').should.not.have.property('foo');
+ done();
+ }).otherwise(function(err){
+ done(err);
+ });
+ });
+
+ it(': undefined credential updated', function(done) {
+ index.registerType('test', TestNode, {
+ credentials: {
+ foo: {type:"test"}
+ }
+ });
+ index.loadFlows().then(function() {
+ var testnode = new TestNode({id:'tab1',type:'test',name:'barney'});
+ // setting value of an undefined credential should not change anything
+ testnode.credentials = {"bar": 4};
+ credentials.extract(testnode);
+ should.exist(credentials.get('tab1'));
+ credentials.get('tab1').should.have.property('foo',2);
+ credentials.get('tab1').should.not.have.property('bar');
+ done();
+ }).otherwise(function(err){
+ done(err);
+ });
+ });
+
+ it(': password credential updated', function(done) {
+ index.registerType('password', TestNode, {
+ credentials: {
+ pswd: {type:"password"}
+ }
+ });
+ index.loadFlows().then(function() {
+ var testnode = new TestNode({id:'tab1',type:'password',name:'barney'});
+ // setting value of password credential should update password
+ testnode.credentials = {"pswd": 'fiddle'};
+ credentials.extract(testnode);
+ should.exist(credentials.get('tab1'));
+ credentials.get('tab1').should.have.property('pswd','fiddle');
+ credentials.get('tab1').should.not.have.property('pswd','sticks');
+ done();
+ }).otherwise(function(err){
+ done(err);
+ });
+ });
+
+ it(': password credential not updated', function(done) {
+ index.registerType('password', TestNode, {
+ credentials: {
+ pswd: {type:"password"}
+ }
+ });
+ index.loadFlows().then(function() {
+ var testnode = new TestNode({id:'tab1',type:'password',name:'barney'});
+ // setting value of password credential should update password
+ testnode.credentials = {"pswd": '__PWRD__'};
+ credentials.extract(testnode);
+ should.exist(credentials.get('tab1'));
+ credentials.get('tab1').should.have.property('pswd','sticks');
+ credentials.get('tab1').should.not.have.property('pswd','__PWRD__');
+ done();
+ }).otherwise(function(err){
+ done(err);
+ });
+ });
+
+ })
+
+ describe('registerEndpoint', function() {
+ var path = require('path');
+ var fs = require('fs-extra');
+ var http = require('http');
+ var express = require('express');
+ var request = require('supertest');
+
+ var server = require("../../../red/server");
+ var localfilesystem = require("../../../red/storage/localfilesystem");
+ var app = express();
+ var RED = require("../../../red/red.js");
+
+ var userDir = path.join(__dirname,".testUserHome");
+ before(function(done) {
+ fs.remove(userDir,function(err) {
+ fs.mkdir(userDir,function() {
+ sinon.stub(index, 'load', function() {
+ return when.promise(function(resolve,reject){
+ resolve([]);
+ });
+ });
+ sinon.stub(localfilesystem, 'getCredentials', function() {
+ return when.promise(function(resolve,reject) {
+ resolve({"tab1":{"foo": 2, "pswd":'sticks'}});
+ });
+ }) ;
+ RED.init(http.createServer(function(req,res){app(req,res)}),
+ {userDir: userDir});
+ server.start().then(function () {
+ done();
+ });
+ });
+ });
+ });
+
+ after(function(done) {
+ fs.remove(userDir,done);
+ server.stop();
+ index.load.restore();
+ localfilesystem.getCredentials.restore();
+ });
+
+ function TestNode(n) {
+ index.createNode(this, n);
+ var node = this;
+ this.on("log", function() {
+ // do nothing
+ });
+ }
+
+ it(': valid credential type', function(done) {
+ index.registerType('test', TestNode, {
+ credentials: {
+ foo: {type:"test"}
+ }
+ });
+ index.loadFlows().then(function() {
+ var testnode = new TestNode({id:'tab1',type:'foo',name:'barney'});
+ request(RED.httpAdmin).get('/credentials/test/tab1').expect(200).end(function(err,res) {
+ if (err) {
+ done(err);
+ }
+ res.body.should.have.property('foo', 2);
+ done();
+ });
+ }).otherwise(function(err){
+ done(err);
+ });
+ });
+
+ it(': password credential type', function(done) {
+ index.registerType('password', TestNode, {
+ credentials: {
+ pswd: {type:"password"}
+ }
+ });
+ index.loadFlows().then(function() {
+ var testnode = new TestNode({id:'tab1',type:'pswd',name:'barney'});
+ request(RED.httpAdmin).get('/credentials/password/tab1').expect(200).end(function(err,res) {
+ if (err) {
+ done(err);
+ }
+ res.body.should.have.property('has_pswd', true);
+ res.body.should.not.have.property('pswd');
+ done();
+ });
+ }).otherwise(function(err){
+ done(err);
+ });
+ });
+
+ it(': returns 404 for undefined credential type', function(done) {
+ index.registerType('test', TestNode, {
+ credentials: {
+ foo: {type:"test"}
+ }
+ });
+ index.loadFlows().then(function() {
+ var testnode = new TestNode({id:'tab1',type:'foo',name:'barney'});
+ request(RED.httpAdmin).get('/credentials/unknownType/tab1').expect(404).end(done);
+ }).otherwise(function(err){
+ done(err);
+ });
+ });
+
+ it(': undefined nodeID', function(done) {
+ index.registerType('test', TestNode, {
+ credentials: {
+ foo: {type:"test"}
+ }
+ });
+ index.loadFlows().then(function() {
+ var testnode = new TestNode({id:'tab1',type:'foo',name:'barney'});
+ request(RED.httpAdmin).get('/credentials/test/unknownNode').expect(200).end(function(err,res) {
+ if (err) {
+ done(err);
+ }
+ var b = res.body;
+ res.body.should.not.have.property('foo');
+ done();
+ });
+ }).otherwise(function(err){
+ done(err);
+ });
+ });
+
+ })
+
+})
+
diff --git a/dgbuilder/test/red/nodes/flows_spec.js b/dgbuilder/test/red/nodes/flows_spec.js
new file mode 100644
index 0000000..091bf40
--- /dev/null
+++ b/dgbuilder/test/red/nodes/flows_spec.js
@@ -0,0 +1,134 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var sinon = require("sinon");
+var when = require("when");
+var flows = require("../../../red/nodes/flows");
+var RedNode = require("../../../red/nodes/Node");
+var RED = require("../../../red/nodes");
+var events = require("../../../red/events");
+var typeRegistry = require("../../../red/nodes/registry");
+
+
+var settings = {
+ available: function() { return false; }
+}
+
+function loadFlows(testFlows, cb) {
+ var storage = {
+ getFlows: function() {
+ return when.resolve(testFlows);
+ },
+ getCredentials: function() {
+ return when.resolve({});
+ }
+ };
+ RED.init(settings, storage);
+ flows.load().then(function() {
+ should.deepEqual(testFlows, flows.getFlows());
+ cb();
+ });
+}
+
+describe('flows', function() {
+
+ describe('#add',function() {
+ it('should be called by node constructor',function(done) {
+ var n = new RedNode({id:'123',type:'abc'});
+ should.deepEqual(n, flows.get("123"));
+ flows.clear().then(function() {
+ done();
+ });
+ });
+ });
+
+ describe('#each',function() {
+ it('should "visit" all nodes',function(done) {
+ var nodes = [
+ new RedNode({id:'n0'}),
+ new RedNode({id:'n1'})
+ ];
+ var count = 0;
+ flows.each(function(node) {
+ should.deepEqual(nodes[count], node);
+ count += 1;
+ if (count == 2) {
+ done();
+ }
+ });
+ });
+ });
+
+ describe('#load',function() {
+ it('should load nothing when storage is empty',function(done) {
+ loadFlows([], done);
+ });
+
+ it('should load and start an empty tab flow',function(done) {
+ loadFlows([{"type":"tab","id":"tab1","label":"Sheet 1"}], function() {});
+ events.once('nodes-started', function() { done(); });
+ });
+
+ it('should load and start a registered node type', function(done) {
+ RED.registerType('debug', function() {});
+ var typeRegistryGet = sinon.stub(typeRegistry,"get",function(nt) {
+ return function() {};
+ });
+ loadFlows([{"id":"n1","type":"debug"}], function() { });
+ events.once('nodes-started', function() {
+ typeRegistryGet.restore();
+ done();
+ });
+ });
+
+ it('should load and start when node type is registered', function(done) {
+ var typeRegistryGet = sinon.stub(typeRegistry,"get");
+ typeRegistryGet.onCall(0).returns(null);
+ typeRegistryGet.returns(function(){});
+
+ loadFlows([{"id":"n2","type":"inject"}], function() {
+ events.emit('type-registered','inject');
+ });
+ events.once('nodes-started', function() {
+ typeRegistryGet.restore();
+ done();
+ });
+ });
+ });
+
+ describe('#setFlows',function() {
+ it('should save and start an empty tab flow',function(done) {
+ var saved = 0;
+ var testFlows = [{"type":"tab","id":"tab1","label":"Sheet 1"}];
+ var storage = {
+ saveFlows: function(conf) {
+ var defer = when.defer();
+ defer.resolve();
+ should.deepEqual(testFlows, conf);
+ return defer.promise;
+ },
+ saveCredentials: function (creds) {
+ return when(true);
+ }
+ };
+ RED.init(settings, storage);
+ flows.setFlows(testFlows);
+ events.once('nodes-started', function() { done(); });
+ });
+ });
+
+});
diff --git a/dgbuilder/test/red/nodes/index_spec.js b/dgbuilder/test/red/nodes/index_spec.js
new file mode 100644
index 0000000..dcb866e
--- /dev/null
+++ b/dgbuilder/test/red/nodes/index_spec.js
@@ -0,0 +1,255 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var fs = require('fs-extra');
+var path = require('path');
+var when = require("when");
+var sinon = require('sinon');
+
+var index = require("../../../red/nodes/index");
+
+describe("red/nodes/index", function() {
+
+ afterEach(function() {
+ index.clearRegistry();
+ });
+
+ var testFlows = [{"type":"test","id":"tab1","label":"Sheet 1"}];
+ var storage = {
+ getFlows: function() {
+ return when(testFlows);
+ },
+ getCredentials: function() {
+ return when({"tab1":{"b":1,"c":2}});
+ },
+ saveFlows: function(conf) {
+ should.deepEqual(testFlows, conf);
+ return when();
+ },
+ saveCredentials: function(creds) {
+ return when(true);
+ }
+ };
+
+ var settings = {
+ available: function() { return false }
+ };
+
+ function TestNode(n) {
+ index.createNode(this, n);
+ var node = this;
+ this.on("log", function() {
+ // do nothing
+ });
+ }
+
+ it('nodes are initialised with credentials',function(done) {
+
+ index.init(settings, storage);
+ index.registerType('test', TestNode);
+ index.loadFlows().then(function() {
+ var testnode = new TestNode({id:'tab1',type:'test',name:'barney'});
+ testnode.credentials.should.have.property('b',1);
+ testnode.credentials.should.have.property('c',2);
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+
+ });
+
+ it('flows should be initialised',function(done) {
+ index.init(settings, storage);
+ index.loadFlows().then(function() {
+ should.deepEqual(testFlows, index.getFlows());
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+
+ });
+
+ describe("registerType should register credentials definition", function() {
+ var http = require('http');
+ var express = require('express');
+ var app = express();
+ var server = require("../../../red/server");
+ var credentials = require("../../../red/nodes/credentials");
+ var localfilesystem = require("../../../red/storage/localfilesystem");
+ var RED = require("../../../red/red.js");
+
+ var userDir = path.join(__dirname,".testUserHome");
+ before(function(done) {
+ fs.remove(userDir,function(err) {
+ fs.mkdir(userDir,function() {
+ sinon.stub(index, 'load', function() {
+ return when.promise(function(resolve,reject){
+ resolve([]);
+ });
+ });
+ sinon.stub(localfilesystem, 'getCredentials', function() {
+ return when.promise(function(resolve,reject) {
+ resolve({"tab1":{"b":1,"c":2}});
+ });
+ }) ;
+ RED.init(http.createServer(function(req,res){app(req,res)}),
+ {userDir: userDir});
+ server.start().then(function () {
+ done();
+ });
+ });
+ });
+ });
+
+ after(function(done) {
+ fs.remove(userDir,done);
+ server.stop();
+ index.load.restore();
+ localfilesystem.getCredentials.restore();
+ });
+
+ it(': definition defined',function(done) {
+ index.registerType('test', TestNode, {
+ credentials: {
+ foo: {type:"test"}
+ }
+ });
+ var testnode = new TestNode({id:'tab1',type:'test',name:'barney'});
+ credentials.getDefinition("test").should.have.property('foo');
+ done();
+ });
+
+ });
+
+ describe('allows nodes to be added/remove/enabled/disabled from the registry', function() {
+ var registry = require("../../../red/nodes/registry");
+ var randomNodeInfo = {id:"5678",types:["random"]};
+
+ before(function() {
+ sinon.stub(registry,"getNodeInfo",function(id) {
+ if (id == "test") {
+ return {id:"1234",types:["test"]};
+ } else if (id == "doesnotexist") {
+ return null;
+ } else {
+ return randomNodeInfo;
+ }
+ });
+ sinon.stub(registry,"removeNode",function(id) {
+ return randomNodeInfo;
+ });
+ sinon.stub(registry,"disableNode",function(id) {
+ return randomNodeInfo;
+ });
+ });
+ after(function() {
+ registry.getNodeInfo.restore();
+ registry.removeNode.restore();
+ registry.disableNode.restore();
+ });
+
+ it(': allows an unused node type to be removed',function(done) {
+ index.init(settings, storage);
+ index.registerType('test', TestNode);
+ index.loadFlows().then(function() {
+ var info = index.removeNode("5678");
+ registry.removeNode.calledOnce.should.be.true;
+ registry.removeNode.calledWith("5678").should.be.true;
+ info.should.eql(randomNodeInfo);
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it(': allows an unused node type to be disabled',function(done) {
+ index.init(settings, storage);
+ index.registerType('test', TestNode);
+ index.loadFlows().then(function() {
+ var info = index.disableNode("5678");
+ registry.disableNode.calledOnce.should.be.true;
+ registry.disableNode.calledWith("5678").should.be.true;
+ info.should.eql(randomNodeInfo);
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it(': prevents removing a node type that is in use',function(done) {
+ index.init(settings, storage);
+ index.registerType('test', TestNode);
+ index.loadFlows().then(function() {
+ /*jshint immed: false */
+ (function() {
+ index.removeNode("test");
+ }).should.throw();
+
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it(': prevents disabling a node type that is in use',function(done) {
+ index.init(settings, storage);
+ index.registerType('test', TestNode);
+ index.loadFlows().then(function() {
+ /*jshint immed: false */
+ (function() {
+ index.disabledNode("test");
+ }).should.throw();
+
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it(': prevents removing a node type that is unknown',function(done) {
+ index.init(settings, storage);
+ index.registerType('test', TestNode);
+ index.loadFlows().then(function() {
+ /*jshint immed: false */
+ (function() {
+ index.removeNode("doesnotexist");
+ }).should.throw();
+
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+ it(': prevents disabling a node type that is unknown',function(done) {
+ index.init(settings, storage);
+ index.registerType('test', TestNode);
+ index.loadFlows().then(function() {
+ /*jshint immed: false */
+ (function() {
+ index.disableNode("doesnotexist");
+ }).should.throw();
+
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ });
+
+
+});
diff --git a/dgbuilder/test/red/nodes/registry_spec.js b/dgbuilder/test/red/nodes/registry_spec.js
new file mode 100644
index 0000000..81c1a2c
--- /dev/null
+++ b/dgbuilder/test/red/nodes/registry_spec.js
@@ -0,0 +1,808 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var sinon = require("sinon");
+var path = require("path");
+var when = require("when");
+
+var RedNodes = require("../../../red/nodes");
+var RedNode = require("../../../red/nodes/Node");
+var typeRegistry = require("../../../red/nodes/registry");
+var events = require("../../../red/events");
+
+afterEach(function() {
+ typeRegistry.clear();
+});
+
+describe('NodeRegistry', function() {
+
+ var resourcesDir = __dirname+ path.sep + "resources" + path.sep;
+
+ function stubSettings(s,available) {
+ s.available = function() {return available;}
+ s.set = function(s,v) { return when.resolve()},
+ s.get = function(s) { return null;}
+ return s
+ }
+ var settings = stubSettings({},false);
+ var settingsWithStorage = stubSettings({},true);
+
+ it('automatically registers new nodes',function() {
+ var testNode = RedNodes.getNode('123');
+ should.not.exist(n);
+ var n = new RedNode({id:'123',type:'abc'});
+
+ var newNode = RedNodes.getNode('123');
+
+ should.strictEqual(n,newNode);
+ });
+
+ it('handles nodes that export a function', function(done) {
+ typeRegistry.init(settings);
+ typeRegistry.load(resourcesDir + "TestNode1",true).then(function() {
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(1);
+ list[0].should.have.property("id");
+ list[0].should.have.property("name","TestNode1.js");
+ list[0].should.have.property("types",["test-node-1"]);
+ list[0].should.have.property("enabled",true);
+ list[0].should.not.have.property("err");
+
+ var nodeConstructor = typeRegistry.get("test-node-1");
+ nodeConstructor.should.be.type("function");
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+
+ });
+
+
+ it('handles nodes that export a function returning a resolving promise', function(done) {
+ typeRegistry.init(settings);
+ typeRegistry.load(resourcesDir + "TestNode2",true).then(function() {
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(1);
+ list[0].should.have.property("id");
+ list[0].should.have.property("name","TestNode2.js");
+ list[0].should.have.property("types",["test-node-2"]);
+ list[0].should.have.property("enabled",true);
+ list[0].should.not.have.property("err");
+ var nodeConstructor = typeRegistry.get("test-node-2");
+ nodeConstructor.should.be.type("function");
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+
+ });
+
+ it('handles nodes that export a function returning a rejecting promise', function(done) {
+ typeRegistry.init(settings);
+ typeRegistry.load(resourcesDir + "TestNode3",true).then(function() {
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(1);
+ list[0].should.have.property("id");
+ list[0].should.have.property("name","TestNode3.js");
+ list[0].should.have.property("types",["test-node-3"]);
+ list[0].should.have.property("enabled",true);
+ list[0].should.have.property("err","fail");
+
+ var nodeConstructor = typeRegistry.get("test-node-3");
+ (nodeConstructor === null).should.be.true;
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+
+ });
+
+ it('handles files containing multiple nodes', function(done) {
+ typeRegistry.init(settings);
+ typeRegistry.load(resourcesDir + "MultipleNodes1",true).then(function() {
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(1);
+ list[0].should.have.property("id");
+ list[0].should.have.property("name","MultipleNodes1.js");
+ list[0].should.have.property("types",["test-node-multiple-1a","test-node-multiple-1b"]);
+ list[0].should.have.property("enabled",true);
+ list[0].should.not.have.property("err");
+
+ var nodeConstructor = typeRegistry.get("test-node-multiple-1a");
+ nodeConstructor.should.be.type("function");
+
+ nodeConstructor = typeRegistry.get("test-node-multiple-1b");
+ nodeConstructor.should.be.type("function");
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+ it('handles nested directories', function(done) {
+ typeRegistry.init(settings);
+ typeRegistry.load(resourcesDir + "NestedDirectoryNode",true).then(function() {
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(1);
+ list[0].should.have.property("id");
+ list[0].should.have.property("name","NestedNode.js");
+ list[0].should.have.property("types",["nested-node-1"]);
+ list[0].should.have.property("enabled",true);
+ list[0].should.not.have.property("err");
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+ it('emits type-registered and node-icon-dir events', function(done) {
+ var eventEmitSpy = sinon.spy(events,"emit");
+ typeRegistry.init(settings);
+ typeRegistry.load(resourcesDir + "NestedDirectoryNode",true).then(function() {
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(1);
+ list[0].should.have.property("name","NestedNode.js");
+ list[0].should.have.property("types",["nested-node-1"]);
+ list[0].should.have.property("enabled",true);
+ list[0].should.not.have.property("err");
+
+ eventEmitSpy.callCount.should.equal(2);
+
+ eventEmitSpy.firstCall.args[0].should.be.equal("node-icon-dir");
+ eventEmitSpy.firstCall.args[1].should.be.equal(
+ resourcesDir + "NestedDirectoryNode" + path.sep + "NestedNode" + path.sep + "icons");
+
+ eventEmitSpy.secondCall.args[0].should.be.equal("type-registered");
+ eventEmitSpy.secondCall.args[1].should.be.equal("nested-node-1");
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ }).finally(function() {
+ eventEmitSpy.restore();
+ });
+ });
+
+ it('rejects a duplicate node type registration', function(done) {
+
+ typeRegistry.init(stubSettings({
+ nodesDir:[resourcesDir + "TestNode1",resourcesDir + "DuplicateTestNode"]
+ },false));
+ typeRegistry.load("wontexist",true).then(function() {
+ var list = typeRegistry.getNodeList();
+
+ list.should.be.an.Array.and.have.lengthOf(2);
+ list[0].should.have.property("id");
+ list[0].should.have.property("name","TestNode1.js");
+ list[0].should.have.property("types",["test-node-1"]);
+ list[0].should.have.property("enabled",true);
+ list[0].should.not.have.property("err");
+
+ list[1].should.have.property("id");
+ list[1].id.should.not.equal(list[0].id);
+
+ list[1].should.have.property("name","TestNode1.js");
+ list[1].should.have.property("types",["test-node-1"]);
+ list[1].should.have.property("enabled",true);
+ list[1].should.have.property("err");
+ /already registered/.test(list[1].err).should.be.true;
+
+ var nodeConstructor = typeRegistry.get("test-node-1");
+ // Verify the duplicate node hasn't replaced the original one
+ nodeConstructor.name.should.be.equal("TestNode");
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+ it('handles nodesDir as a string', function(done) {
+
+ typeRegistry.init(stubSettings({
+ nodesDir :resourcesDir + "TestNode1"
+ },false));
+ typeRegistry.load("wontexist",true).then(function(){
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(1);
+ list[0].should.have.property("types",["test-node-1"]);
+ done();
+ }).catch(function(e) {
+ done("Loading of non-existing nodesDir should succeed");
+ });
+
+ });
+
+ it('handles invalid nodesDir',function(done) {
+
+ typeRegistry.init(stubSettings({
+ nodesDir : "wontexist"
+ },false));
+ typeRegistry.load("wontexist",true).then(function(){
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.be.empty;
+ done();
+ }).catch(function(e) {
+ done("Loading of non-existing nodesDir should succeed");
+ });
+ });
+
+ it('returns nothing for an unregistered type config', function() {
+ typeRegistry.init(settings);
+ typeRegistry.load("wontexist",true).then(function(){
+ var config = typeRegistry.getNodeConfig("imaginary-shark");
+ (config === null).should.be.true;
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+ it('excludes node files listed in nodesExcludes',function(done) {
+ typeRegistry.init(stubSettings({
+ nodesExcludes: [ "TestNode1.js" ],
+ nodesDir:[resourcesDir + "TestNode1",resourcesDir + "TestNode2"]
+ },false));
+ typeRegistry.load("wontexist",true).then(function() {
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(1);
+ list[0].should.have.property("types",["test-node-2"]);
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+ it('returns the node configurations', function(done) {
+ typeRegistry.init(stubSettings({
+ nodesDir:[resourcesDir + "TestNode1",resourcesDir + "TestNode2"]
+ },false));
+ typeRegistry.load("wontexist",true).then(function() {
+ var list = typeRegistry.getNodeList();
+
+ var nodeConfigs = typeRegistry.getNodeConfigs();
+
+ // TODO: this is brittle...
+ nodeConfigs.should.equal("<script type=\"text/x-red\" data-template-name=\"test-node-1\"></script>\n<script type=\"text/x-red\" data-help-name=\"test-node-1\"></script>\n<script type=\"text/javascript\">RED.nodes.registerType('test-node-1',{});</script>\n<style></style>\n<p>this should be filtered out</p>\n<script type=\"text/x-red\" data-template-name=\"test-node-2\"></script>\n<script type=\"text/x-red\" data-help-name=\"test-node-2\"></script>\n<script type=\"text/javascript\">RED.nodes.registerType('test-node-2',{});</script>\n<style></style>\n");
+
+ var nodeId = list[0].id;
+ var nodeConfig = typeRegistry.getNodeConfig(nodeId);
+ nodeConfig.should.equal("<script type=\"text/x-red\" data-template-name=\"test-node-1\"></script>\n<script type=\"text/x-red\" data-help-name=\"test-node-1\"></script>\n<script type=\"text/javascript\">RED.nodes.registerType('test-node-1',{});</script>\n<style></style>\n<p>this should be filtered out</p>\n");
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+ it('stores the node list', function(done) {
+ var settings = {
+ nodesDir:[resourcesDir + "TestNode1",resourcesDir + "TestNode2",resourcesDir + "TestNode3"],
+ available: function() { return true; },
+ set: function(s,v) {return when.resolve();},
+ get: function(s) { return null;}
+ }
+ var settingsSave = sinon.spy(settings,"set");
+ typeRegistry.init(settings);
+ typeRegistry.load("wontexist",true).then(function() {
+ var list = typeRegistry.getNodeList();
+ list.should.be.Array.and.have.length(3);
+
+ settingsSave.callCount.should.equal(1);
+ settingsSave.firstCall.args[0].should.be.equal("nodes");
+ var savedList = settingsSave.firstCall.args[1];
+
+ savedList[list[0].id].name == list[0].name;
+ savedList[list[1].id].name == list[1].name;
+ savedList[list[2].id].name == list[2].name;
+
+ savedList[list[0].id].should.not.have.property("err");
+ savedList[list[1].id].should.not.have.property("err");
+ savedList[list[2].id].should.not.have.property("err");
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ }).finally(function() {
+ settingsSave.restore();
+ });
+
+ });
+
+ it('allows nodes to be added by filename', function(done) {
+ var settings = {
+ available: function() { return true; },
+ set: function(s,v) {return when.resolve();},
+ get: function(s) { return null;}
+ }
+ typeRegistry.init(settings);
+ typeRegistry.load("wontexist",true).then(function(){
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.be.empty;
+
+ typeRegistry.addNode(resourcesDir + "TestNode1/TestNode1.js").then(function(node) {
+ list = typeRegistry.getNodeList();
+ list[0].should.have.property("id");
+ list[0].should.have.property("name","TestNode1.js");
+ list[0].should.have.property("types",["test-node-1"]);
+ list[0].should.have.property("enabled",true);
+ list[0].should.not.have.property("err");
+
+ node.should.be.an.Array.and.have.lengthOf(1);
+ node.should.eql(list);
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+ it('fails to add non-existent filename', function(done) {
+ typeRegistry.init(settingsWithStorage);
+ typeRegistry.load("wontexist",true).then(function(){
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.be.empty;
+ typeRegistry.addNode(resourcesDir + "DoesNotExist/DoesNotExist.js").then(function(nodes) {
+ nodes.should.be.an.Array.and.have.lengthOf(1);
+ nodes[0].should.have.property("id");
+ nodes[0].should.have.property("types",[]);
+ nodes[0].should.have.property("err");
+ done();
+ }).otherwise(function(e) {
+ done(e);
+ });
+
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+ it('returns node info by type or id', function(done) {
+ typeRegistry.init(settings);
+ typeRegistry.load(resourcesDir + "TestNode1",true).then(function() {
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(1);
+
+ var id = list[0].id;
+ var type = list[0].types[0];
+
+ list[0].should.have.property("id");
+ list[0].should.have.property("name","TestNode1.js");
+ list[0].should.have.property("types",["test-node-1"]);
+ list[0].should.have.property("enabled",true);
+ list[0].should.not.have.property("err");
+
+ var info = typeRegistry.getNodeInfo(id);
+ list[0].should.eql(info);
+
+ var info2 = typeRegistry.getNodeInfo(type);
+ list[0].should.eql(info2);
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+
+ });
+
+
+ it('rejects adding duplicate nodes', function(done) {
+ typeRegistry.init(settingsWithStorage);
+ typeRegistry.load(resourcesDir + "TestNode1",true).then(function(){
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(1);
+
+ typeRegistry.addNode({file:resourcesDir + "TestNode1" + path.sep + "TestNode1.js"}).then(function(node) {
+ done(new Error("duplicate node loaded"));
+ }).otherwise(function(e) {
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(1);
+ done();
+ });
+
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+ it('removes nodes from the registry', function(done) {
+ typeRegistry.init(settingsWithStorage);
+ typeRegistry.load(resourcesDir + "TestNode1",true).then(function() {
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(1);
+ list[0].should.have.property("id");
+ list[0].should.have.property("name","TestNode1.js");
+ list[0].should.have.property("types",["test-node-1"]);
+ list[0].should.have.property("enabled",true);
+ list[0].should.have.property("loaded",true);
+
+ typeRegistry.getNodeConfigs().length.should.be.greaterThan(0);
+
+ var info = typeRegistry.removeNode(list[0].id);
+
+ info.should.have.property("id",list[0].id);
+ info.should.have.property("enabled",false);
+ info.should.have.property("loaded",false);
+
+ typeRegistry.getNodeList().should.be.an.Array.and.be.empty;
+ typeRegistry.getNodeConfigs().length.should.equal(0);
+
+ var nodeConstructor = typeRegistry.get("test-node-1");
+ (typeof nodeConstructor).should.be.equal("undefined");
+
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+ it('rejects removing unknown nodes from the registry', function(done) {
+ typeRegistry.init(settings);
+ typeRegistry.load("wontexist",true).then(function() {
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.be.empty;
+
+
+ /*jshint immed: false */
+ (function() {
+ typeRegistry.removeNode("1234");
+ }).should.throw();
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+ it('scans the node_modules path for node files', function(done) {
+ var fs = require("fs");
+ var path = require("path");
+
+ var eventEmitSpy = sinon.spy(events,"emit");
+ var pathJoin = (function() {
+ var _join = path.join;
+ return sinon.stub(path,"join",function() {
+ if (arguments.length == 3 && arguments[2] == "package.json") {
+ return _join(resourcesDir,"TestNodeModule" + path.sep + "node_modules" + path.sep,arguments[1],arguments[2]);
+ }
+ if (arguments.length == 2 && arguments[1] == "TestNodeModule") {
+ return _join(resourcesDir,"TestNodeModule" + path.sep + "node_modules" + path.sep,arguments[1]);
+ }
+ return _join.apply(this,arguments);
+ });
+ })();
+
+ var readdirSync = (function() {
+ var originalReaddirSync = fs.readdirSync;
+ var callCount = 0;
+ return sinon.stub(fs,"readdirSync",function(dir) {
+ var result = [];
+ if (callCount == 1) {
+ result = originalReaddirSync(resourcesDir + "TestNodeModule" + path.sep + "node_modules");
+ }
+ callCount++;
+ return result;
+ });
+ })();
+
+ typeRegistry.init(settings);
+ typeRegistry.load("wontexist",false).then(function(){
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(2);
+ list[0].should.have.property("id");
+ list[0].should.have.property("name","TestNodeModule:TestNodeMod1");
+ list[0].should.have.property("types",["test-node-mod-1"]);
+ list[0].should.have.property("enabled",true);
+ list[0].should.not.have.property("err");
+
+ list[1].should.have.property("id");
+ list[1].should.have.property("name","TestNodeModule:TestNodeMod2");
+ list[1].should.have.property("types",["test-node-mod-2"]);
+ list[1].should.have.property("enabled",true);
+ list[1].should.have.property("err");
+
+
+ eventEmitSpy.callCount.should.equal(2);
+
+ eventEmitSpy.firstCall.args[0].should.be.equal("node-icon-dir");
+ eventEmitSpy.firstCall.args[1].should.be.equal(
+ resourcesDir + "TestNodeModule" + path.sep+ "node_modules" + path.sep + "TestNodeModule" + path.sep + "icons");
+
+ eventEmitSpy.secondCall.args[0].should.be.equal("type-registered");
+ eventEmitSpy.secondCall.args[1].should.be.equal("test-node-mod-1");
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ }).finally(function() {
+ readdirSync.restore();
+ pathJoin.restore();
+ eventEmitSpy.restore();
+ });
+ });
+
+ it('allows nodes to be added by module name', function(done) {
+ var fs = require("fs");
+ var path = require("path");
+
+ var pathJoin = (function() {
+ var _join = path.join;
+ return sinon.stub(path,"join",function() {
+ if (arguments.length == 3 && arguments[2] == "package.json") {
+ return _join(resourcesDir,"TestNodeModule" + path.sep + "node_modules" + path.sep,arguments[1],arguments[2]);
+ }
+ if (arguments.length == 2 && arguments[1] == "TestNodeModule") {
+ return _join(resourcesDir,"TestNodeModule" + path.sep + "node_modules" + path.sep,arguments[1]);
+ }
+ return _join.apply(this,arguments);
+ });
+ })();
+
+ var readdirSync = (function() {
+ var originalReaddirSync = fs.readdirSync;
+ var callCount = 0;
+ return sinon.stub(fs,"readdirSync",function(dir) {
+ var result = [];
+ if (callCount == 1) {
+ result = originalReaddirSync(resourcesDir + "TestNodeModule" + path.sep + "node_modules");
+ }
+ callCount++;
+ return result;
+ });
+ })();
+ typeRegistry.init(settingsWithStorage);
+ typeRegistry.load("wontexist",true).then(function(){
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.be.empty;
+
+ typeRegistry.addModule("TestNodeModule").then(function(node) {
+ list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(2);
+ list[0].should.have.property("id");
+ list[0].should.have.property("name","TestNodeModule:TestNodeMod1");
+ list[0].should.have.property("types",["test-node-mod-1"]);
+ list[0].should.have.property("enabled",true);
+ list[0].should.not.have.property("err");
+
+ list[1].should.have.property("id");
+ list[1].should.have.property("name","TestNodeModule:TestNodeMod2");
+ list[1].should.have.property("types",["test-node-mod-2"]);
+ list[1].should.have.property("enabled",true);
+ list[1].should.have.property("err");
+
+ node.should.eql(list);
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+
+ }).catch(function(e) {
+ done(e);
+ }).finally(function() {
+ readdirSync.restore();
+ pathJoin.restore();
+ });
+ });
+
+
+ it('rejects adding duplicate node modules', function(done) {
+ var fs = require("fs");
+ var path = require("path");
+
+ var pathJoin = (function() {
+ var _join = path.join;
+ return sinon.stub(path,"join",function() {
+ if (arguments.length == 3 && arguments[2] == "package.json") {
+ return _join(resourcesDir,"TestNodeModule" + path.sep + "node_modules" + path.sep,arguments[1],arguments[2]);
+ }
+ if (arguments.length == 2 && arguments[1] == "TestNodeModule") {
+ return _join(resourcesDir,"TestNodeModule" + path.sep + "node_modules" + path.sep,arguments[1]);
+ }
+ return _join.apply(this,arguments);
+ });
+ })();
+
+ var readdirSync = (function() {
+ var originalReaddirSync = fs.readdirSync;
+ var callCount = 0;
+ return sinon.stub(fs,"readdirSync",function(dir) {
+ var result = [];
+ if (callCount == 1) {
+ result = originalReaddirSync(resourcesDir + "TestNodeModule" + path.sep + "node_modules");
+ }
+ callCount++;
+ return result;
+ });
+ })();
+
+ typeRegistry.init(settingsWithStorage);
+ typeRegistry.load('wontexist',false).then(function(){
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(2);
+ typeRegistry.addModule("TestNodeModule").then(function(node) {
+ done(new Error("addModule resolved"));
+ }).otherwise(function(err) {
+ done();
+ });
+ }).catch(function(e) {
+ done(e);
+ }).finally(function() {
+ readdirSync.restore();
+ pathJoin.restore();
+ });
+ });
+
+
+ it('fails to add non-existent module name', function(done) {
+ typeRegistry.init(settingsWithStorage);
+ typeRegistry.load("wontexist",true).then(function(){
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.be.empty;
+
+ typeRegistry.addModule("DoesNotExistModule").then(function(node) {
+ done(new Error("ENOENT not thrown"));
+ }).otherwise(function(e) {
+ e.code.should.eql("MODULE_NOT_FOUND");
+ done();
+ });
+
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+ it('removes nodes from the registry by module', function(done) {
+ var fs = require("fs");
+ var path = require("path");
+
+ var pathJoin = (function() {
+ var _join = path.join;
+ return sinon.stub(path,"join",function() {
+ if (arguments.length == 3 && arguments[2] == "package.json") {
+ return _join(resourcesDir,"TestNodeModule" + path.sep + "node_modules" + path.sep,arguments[1],arguments[2]);
+ }
+ if (arguments.length == 2 && arguments[1] == "TestNodeModule") {
+ return _join(resourcesDir,"TestNodeModule" + path.sep + "node_modules" + path.sep,arguments[1]);
+ }
+ return _join.apply(this,arguments);
+ });
+ })();
+
+ var readdirSync = (function() {
+ var originalReaddirSync = fs.readdirSync;
+ var callCount = 0;
+ return sinon.stub(fs,"readdirSync",function(dir) {
+ var result = [];
+ if (callCount == 1) {
+ result = originalReaddirSync(resourcesDir + "TestNodeModule" + path.sep + "node_modules");
+ }
+ callCount++;
+ return result;
+ });
+ })();
+
+ typeRegistry.init(settingsWithStorage);
+ typeRegistry.load('wontexist',false).then(function(){
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(2);
+ var res = typeRegistry.removeModule("TestNodeModule");
+
+ res.should.be.an.Array.and.have.lengthOf(2);
+ res[0].should.have.a.property("id",list[0].id);
+ res[1].should.have.a.property("id",list[1].id);
+
+ list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.be.empty;
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ }).finally(function() {
+ readdirSync.restore();
+ pathJoin.restore();
+ });
+
+ });
+
+ it('fails to remove non-existent module name', function(done) {
+ typeRegistry.init(settings);
+ typeRegistry.load("wontexist",true).then(function(){
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.be.empty;
+
+ /*jshint immed: false */
+ (function() {
+ typeRegistry.removeModule("DoesNotExistModule");
+ }).should.throw();
+
+ done();
+
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+
+ it('allows nodes to be enabled and disabled', function(done) {
+ typeRegistry.init(settingsWithStorage);
+ typeRegistry.load(resourcesDir+path.sep+"TestNode1",true).then(function() {
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.have.lengthOf(1);
+ list[0].should.have.property("id");
+ list[0].should.have.property("name","TestNode1.js");
+ list[0].should.have.property("enabled",true);
+
+ var nodeConfig = typeRegistry.getNodeConfigs();
+ nodeConfig.length.should.be.greaterThan(0);
+
+ var info = typeRegistry.disableNode(list[0].id);
+ info.should.have.property("id",list[0].id);
+ info.should.have.property("enabled",false);
+
+ var list2 = typeRegistry.getNodeList();
+ list2.should.be.an.Array.and.have.lengthOf(1);
+ list2[0].should.have.property("enabled",false);
+
+ typeRegistry.getNodeConfigs().length.should.equal(0);
+
+ var info2 = typeRegistry.enableNode(list[0].id);
+ info2.should.have.property("id",list[0].id);
+ info2.should.have.property("enabled",true);
+
+ var list3 = typeRegistry.getNodeList();
+ list3.should.be.an.Array.and.have.lengthOf(1);
+ list3[0].should.have.property("enabled",true);
+
+ var nodeConfig2 = typeRegistry.getNodeConfigs();
+ nodeConfig2.should.eql(nodeConfig);
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+
+ it('fails to enable/disable non-existent nodes', function(done) {
+ typeRegistry.init(settings);
+ typeRegistry.load("wontexist",true).then(function() {
+ var list = typeRegistry.getNodeList();
+ list.should.be.an.Array.and.be.empty;
+
+ /*jshint immed: false */
+ (function() {
+ typeRegistry.disableNode("123");
+ }).should.throw();
+
+ /*jshint immed: false */
+ (function() {
+ typeRegistry.enableNode("123");
+ }).should.throw();
+
+ done();
+ }).catch(function(e) {
+ done(e);
+ });
+ });
+});
diff --git a/dgbuilder/test/red/nodes/resources/DuplicateTestNode/TestNode1.html b/dgbuilder/test/red/nodes/resources/DuplicateTestNode/TestNode1.html
new file mode 100644
index 0000000..b637ede
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/DuplicateTestNode/TestNode1.html
@@ -0,0 +1,3 @@
+<script type="text/x-red" data-template-name="test-node-1"></script>
+<script type="text/x-red" data-help-name="test-node-1"></script>
+<script type="text/javascript">RED.nodes.registerType('test-node-1',{});</script>
diff --git a/dgbuilder/test/red/nodes/resources/DuplicateTestNode/TestNode1.js b/dgbuilder/test/red/nodes/resources/DuplicateTestNode/TestNode1.js
new file mode 100644
index 0000000..e812141
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/DuplicateTestNode/TestNode1.js
@@ -0,0 +1,5 @@
+// A test node that exports a function
+module.exports = function(RED) {
+ function DuplicateTestNode(n) {}
+ RED.nodes.registerType("test-node-1",DuplicateTestNode);
+}
diff --git a/dgbuilder/test/red/nodes/resources/MultipleNodes1/MultipleNodes1.html b/dgbuilder/test/red/nodes/resources/MultipleNodes1/MultipleNodes1.html
new file mode 100644
index 0000000..5359644
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/MultipleNodes1/MultipleNodes1.html
@@ -0,0 +1,6 @@
+<script type="text/x-red" data-template-name="test-node-multiple-1a"></script>
+<script type="text/x-red" data-help-name="test-node-multiple-1a"></script>
+<script type="text/javascript">RED.nodes.registerType('test-node-multiple-1a',{});</script>
+<script type="text/x-red" data-template-name="test-node-multiple-1b"></script>
+<script type="text/x-red" data-help-name="test-node-multiple-1b"></script>
+<script type="text/javascript">RED.nodes.registerType('test-node-multiple-1b',{});</script>
diff --git a/dgbuilder/test/red/nodes/resources/MultipleNodes1/MultipleNodes1.js b/dgbuilder/test/red/nodes/resources/MultipleNodes1/MultipleNodes1.js
new file mode 100644
index 0000000..55747c0
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/MultipleNodes1/MultipleNodes1.js
@@ -0,0 +1,7 @@
+// A test node that exports a function
+module.exports = function(RED) {
+ function TestNode1(n) {}
+ RED.nodes.registerType("test-node-multiple-1a",TestNode1);
+ function TestNode2(n) {}
+ RED.nodes.registerType("test-node-multiple-1b",TestNode2);
+}
diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/NestedNode.html b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/NestedNode.html
new file mode 100644
index 0000000..abc823e
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/NestedNode.html
@@ -0,0 +1,4 @@
+<script type="text/x-red" data-template-name="nested-node-1"></script>
+<script type="text/x-red" data-help-name="nested-node-1"></script>
+<script type="text/javascript">RED.nodes.registerType('nested-node-1',{});</script>
+<style></style>
diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/NestedNode.js b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/NestedNode.js
new file mode 100644
index 0000000..cd3148a
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/NestedNode.js
@@ -0,0 +1,5 @@
+// A test node that exports a function
+module.exports = function(RED) {
+ function TestNode(n) {}
+ RED.nodes.registerType("nested-node-1",TestNode);
+}
diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/icons/file.txt b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/icons/file.txt
new file mode 100644
index 0000000..59a29af
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/icons/file.txt
@@ -0,0 +1,3 @@
+This file exists just to ensure the 'icons' directory is in the repository.
+TODO: a future test needs to ensure the right icon files are loaded - this
+ directory can be used for that
diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.html b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.html
new file mode 100644
index 0000000..ac9235d
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.html
@@ -0,0 +1,4 @@
+<script type="text/x-red" data-template-name="should-not-load-1"></script>
+<script type="text/x-red" data-help-name="should-not-load-1"></script>
+<script type="text/javascript">RED.nodes.registerType('should-not-load-1',{});</script>
+<style></style>
diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.js b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.js
new file mode 100644
index 0000000..8af249b
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.js
@@ -0,0 +1,5 @@
+// A test node that exports a function
+module.exports = function(RED) {
+ function TestNode(n) {}
+ RED.nodes.registerType("should-not-load-1",TestNode);
+}
diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.html b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.html
new file mode 100644
index 0000000..4212fd5
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.html
@@ -0,0 +1,4 @@
+<script type="text/x-red" data-template-name="should-not-load-3"></script>
+<script type="text/x-red" data-help-name="should-not-load-3"></script>
+<script type="text/javascript">RED.nodes.registerType('should-not-load-3',{});</script>
+<style></style>
diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.js b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.js
new file mode 100644
index 0000000..5856ada
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.js
@@ -0,0 +1,5 @@
+// A test node that exports a function
+module.exports = function(RED) {
+ function TestNode(n) {}
+ RED.nodes.registerType("should-not-load-3",TestNode);
+}
diff --git a/dgbuilder/test/red/nodes/resources/TestNode1/TestNode1.html b/dgbuilder/test/red/nodes/resources/TestNode1/TestNode1.html
new file mode 100644
index 0000000..97dbf17
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/TestNode1/TestNode1.html
@@ -0,0 +1,5 @@
+<script type="text/x-red" data-template-name="test-node-1"></script>
+<script type="text/x-red" data-help-name="test-node-1"></script>
+<script type="text/javascript">RED.nodes.registerType('test-node-1',{});</script>
+<style></style>
+<p>this should be filtered out</p>
diff --git a/dgbuilder/test/red/nodes/resources/TestNode1/TestNode1.js b/dgbuilder/test/red/nodes/resources/TestNode1/TestNode1.js
new file mode 100644
index 0000000..bfa3b65
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/TestNode1/TestNode1.js
@@ -0,0 +1,5 @@
+// A test node that exports a function
+module.exports = function(RED) {
+ function TestNode(n) {}
+ RED.nodes.registerType("test-node-1",TestNode);
+}
diff --git a/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.html b/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.html
new file mode 100644
index 0000000..66b6590
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.html
@@ -0,0 +1,4 @@
+<script type="text/x-red" data-template-name="test-node-2"></script>
+<script type="text/x-red" data-help-name="test-node-2"></script>
+<script type="text/javascript">RED.nodes.registerType('test-node-2',{});</script>
+<style></style>
diff --git a/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.js b/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.js
new file mode 100644
index 0000000..faf61a8
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.js
@@ -0,0 +1,10 @@
+// A test node that exports a function which returns a resolving promise
+
+var when = require("when");
+module.exports = function(RED) {
+ return when.promise(function(resolve,reject) {
+ function TestNode(n) {}
+ RED.nodes.registerType("test-node-2",TestNode);
+ resolve();
+ });
+}
diff --git a/dgbuilder/test/red/nodes/resources/TestNode3/TestNode3.html b/dgbuilder/test/red/nodes/resources/TestNode3/TestNode3.html
new file mode 100644
index 0000000..9a0f6f7
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/TestNode3/TestNode3.html
@@ -0,0 +1,3 @@
+<script type="text/x-red" data-template-name="test-node-3"></script>
+<script type="text/x-red" data-help-name="test-node-3"></script>
+<script type="text/javascript">RED.nodes.registerType('test-node-3',{});</script>
diff --git a/dgbuilder/test/red/nodes/resources/TestNode3/TestNode3.js b/dgbuilder/test/red/nodes/resources/TestNode3/TestNode3.js
new file mode 100644
index 0000000..756dc13
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/TestNode3/TestNode3.js
@@ -0,0 +1,8 @@
+// A test node that exports a function which returns a rejecting promise
+
+var when = require("when");
+module.exports = function(RED) {
+ return when.promise(function(resolve,reject) {
+ reject("fail");
+ });
+}
diff --git a/dgbuilder/test/red/red_spec.js b/dgbuilder/test/red/red_spec.js
new file mode 100644
index 0000000..f61fd55
--- /dev/null
+++ b/dgbuilder/test/red/red_spec.js
@@ -0,0 +1,22 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+var should = require("should");
+
+describe("red/red", function() {
+ it('can be required without errors', function() {
+ require("../../red/red");
+ });
+});
diff --git a/dgbuilder/test/red/server_spec.js b/dgbuilder/test/red/server_spec.js
new file mode 100644
index 0000000..b20249c
--- /dev/null
+++ b/dgbuilder/test/red/server_spec.js
@@ -0,0 +1,22 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+var should = require("should");
+
+describe("red/server", function() {
+ it('can be required without errors', function() {
+ require("../../red/server");
+ });
+});
diff --git a/dgbuilder/test/red/settings_spec.js b/dgbuilder/test/red/settings_spec.js
new file mode 100644
index 0000000..fb4cbad
--- /dev/null
+++ b/dgbuilder/test/red/settings_spec.js
@@ -0,0 +1,114 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+var should = require("should");
+var when = require("when");
+
+var settings = require("../../red/settings");
+
+
+describe("red/settings", function() {
+
+ afterEach(function() {
+ settings.reset();
+ });
+
+ it('wraps the user settings as read-only properties', function() {
+ var userSettings = {
+ a: 123,
+ b: "test",
+ c: [1,2,3]
+ }
+ settings.init(userSettings);
+
+ settings.available().should.be.false;
+
+ settings.a.should.equal(123);
+ settings.b.should.equal("test");
+ settings.c.should.be.an.Array.with.lengthOf(3);
+
+ settings.get("a").should.equal(123);
+ settings.get("b").should.equal("test");
+ settings.get("c").should.be.an.Array.with.lengthOf(3);
+
+ /*jshint immed: false */
+ (function() {
+ settings.a = 456;
+ }).should.throw();
+
+ settings.c.push(5);
+ settings.c.should.be.an.Array.with.lengthOf(4);
+
+ /*jshint immed: false */
+ (function() {
+ settings.set("a",456);
+ }).should.throw();
+
+ /*jshint immed: false */
+ (function() {
+ settings.set("a",456);
+ }).should.throw();
+
+ /*jshint immed: false */
+ (function() {
+ settings.get("unknown");
+ }).should.throw();
+
+ /*jshint immed: false */
+ (function() {
+ settings.set("unknown",456);
+ }).should.throw();
+
+ });
+
+ it('loads global settings from storage', function(done) {
+ var userSettings = {
+ a: 123,
+ b: "test",
+ c: [1,2,3]
+ }
+ var savedSettings = null;
+ var storage = {
+ getSettings: function() {
+ return when.resolve({globalA:789});
+ },
+ saveSettings: function(settings) {
+ savedSettings = settings;
+ return when.resolve();
+ }
+ }
+ settings.init(userSettings);
+
+ settings.available().should.be.false;
+
+ /*jshint immed: false */
+ (function() {
+ settings.get("unknown");
+ }).should.throw();
+
+ settings.load(storage).then(function() {
+ settings.available().should.be.true;
+ settings.get("globalA").should.equal(789);
+ settings.set("globalA","abc").then(function() {
+ savedSettings.globalA.should.equal("abc");
+ done();
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+
+
+ });
+});
diff --git a/dgbuilder/test/red/storage/index_spec.js b/dgbuilder/test/red/storage/index_spec.js
new file mode 100644
index 0000000..4b60ba8
--- /dev/null
+++ b/dgbuilder/test/red/storage/index_spec.js
@@ -0,0 +1,128 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+var should = require("should");
+
+describe("red/storage/index", function() {
+
+ it('rejects the promise when settings suggest loading a bad module', function(done) {
+
+ var wrongModule = {
+ storageModule : "thisaintloading"
+ };
+
+ var storage = require("../../../red/storage/index");
+ storage.init(wrongModule).then( function() {
+ var one = 1;
+ var zero = 0;
+ try {
+ zero.should.equal(one, "The initialization promise should never get resolved");
+ } catch(err) {
+ done(err);
+ }
+ }).catch(function(e) {
+ done(); //successfully rejected promise
+ });
+ });
+
+ it('non-string storage module', function(done) {
+ var initSetsMeToTrue = false;
+
+ var moduleWithBooleanSettingInit = {
+ init : function() {
+ initSetsMeToTrue = true;
+ }
+ };
+
+ var setsBooleanModule = {
+ storageModule : moduleWithBooleanSettingInit
+ };
+
+ var storage = require("../../../red/storage/index");
+ storage.init(setsBooleanModule);
+ initSetsMeToTrue.should.be.true;
+ done();
+ });
+
+ it('respects storage interface', function(done) {
+ var calledFlagGetFlows = false;
+ var calledFlagGetCredentials = false;
+ var calledFlagGetAllFlows = false;
+ var calledInit = false;
+
+ var interfaceCheckerModule = {
+ init : function (settings) {
+ settings.should.be.an.Object;
+ calledInit = true;
+ },
+ getFlows : function() {
+ calledFlagGetFlows = true;
+ },
+ saveFlows : function (flows) {
+ flows.should.be.true;
+ },
+ getCredentials : function() {
+ calledFlagGetCredentials = true;
+ },
+ saveCredentials : function(credentials) {
+ credentials.should.be.true;
+ },
+ getAllFlows : function() {
+ calledFlagGetAllFlows = true;
+ },
+ getFlow : function(fn) {
+ fn.should.equal("name");
+ },
+ saveFlow : function(fn, data) {
+ fn.should.equal("name");
+ data.should.be.true;
+ },
+ getLibraryEntry : function(type, path) {
+ type.should.be.true;
+ path.should.equal("name");
+ },
+ saveLibraryEntry : function(type, path, meta, body) {
+ type.should.be.true;
+ path.should.equal("name");
+ meta.should.be.true;
+ body.should.be.true;
+ }
+ };
+
+ var moduleToLoad = {
+ storageModule : interfaceCheckerModule
+ };
+ var storage = require("../../../red/storage/index");
+
+ storage.init(moduleToLoad);
+ storage.getFlows();
+ storage.saveFlows(true);
+ storage.getCredentials();
+ storage.saveCredentials(true);
+ storage.getAllFlows();
+ storage.getFlow("name");
+ storage.saveFlow("name", true);
+ storage.getLibraryEntry(true, "name");
+ storage.saveLibraryEntry(true, "name", true, true);
+
+ calledInit.should.be.true;
+ calledFlagGetFlows.should.be.true;
+ calledFlagGetCredentials.should.be.true;
+ calledFlagGetAllFlows.should.be.true;
+
+ done();
+ });
+
+});
diff --git a/dgbuilder/test/red/storage/localfilesystem_spec.js b/dgbuilder/test/red/storage/localfilesystem_spec.js
new file mode 100644
index 0000000..a131170
--- /dev/null
+++ b/dgbuilder/test/red/storage/localfilesystem_spec.js
@@ -0,0 +1,367 @@
+/**
+ * Copyright 2013, 2014 IBM Corp.
+ *
+ * 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.
+ **/
+
+var should = require("should");
+var fs = require('fs-extra');
+var path = require('path');
+
+var localfilesystem = require("../../../red/storage/localfilesystem");
+
+describe('LocalFileSystem', function() {
+ var userDir = path.join(__dirname,".testUserHome");
+ var testFlow = [{"type":"tab","id":"d8be2a6d.2741d8","label":"Sheet 1"}];
+ beforeEach(function(done) {
+ fs.remove(userDir,function(err) {
+ fs.mkdir(userDir,done);
+ });
+ });
+ afterEach(function(done) {
+ fs.remove(userDir,done);
+ });
+
+ it('should initialise the user directory',function(done) {
+ localfilesystem.init({userDir:userDir}).then(function() {
+ fs.existsSync(path.join(userDir,"lib")).should.be.true;
+ fs.existsSync(path.join(userDir,"lib",'flows')).should.be.true;
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it('should handle missing flow file',function(done) {
+ localfilesystem.init({userDir:userDir}).then(function() {
+ var flowFile = 'flows_'+require('os').hostname()+'.json';
+ var flowFilePath = path.join(userDir,flowFile);
+ fs.existsSync(flowFilePath).should.be.false;
+ localfilesystem.getFlows().then(function(flows) {
+ flows.should.eql([]);
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it('should save flows to the default file',function(done) {
+ localfilesystem.init({userDir:userDir}).then(function() {
+ var flowFile = 'flows_'+require('os').hostname()+'.json';
+ var flowFilePath = path.join(userDir,flowFile);
+ var flowFileBackupPath = path.join(userDir,"flows.backup");
+ fs.existsSync(flowFilePath).should.be.false;
+ fs.existsSync(flowFileBackupPath).should.be.false;
+ localfilesystem.saveFlows(testFlow).then(function() {
+ fs.existsSync(flowFilePath).should.be.true;
+ fs.existsSync(flowFileBackupPath).should.be.false;
+ localfilesystem.getFlows().then(function(flows) {
+ flows.should.eql(testFlow);
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it('should save flows to the specified file',function(done) {
+ var defaultFlowFile = 'flows_'+require('os').hostname()+'.json';
+ var defaultFlowFilePath = path.join(userDir,defaultFlowFile);
+ var flowFile = 'test.json';
+ var flowFilePath = path.join(userDir,flowFile);
+
+ localfilesystem.init({userDir:userDir, flowFile:flowFilePath}).then(function() {
+ fs.existsSync(defaultFlowFilePath).should.be.false;
+ fs.existsSync(flowFilePath).should.be.false;
+
+ localfilesystem.saveFlows(testFlow).then(function() {
+ fs.existsSync(defaultFlowFilePath).should.be.false;
+ fs.existsSync(flowFilePath).should.be.true;
+ localfilesystem.getFlows().then(function(flows) {
+ flows.should.eql(testFlow);
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it('should backup the flows file', function(done) {
+ var defaultFlowFile = 'flows_'+require('os').hostname()+'.json';
+ var defaultFlowFilePath = path.join(userDir,defaultFlowFile);
+ var flowFile = 'test.json';
+ var flowFilePath = path.join(userDir,flowFile);
+ var flowFileBackupPath = path.join(userDir,"flows.backup");
+
+ localfilesystem.init({userDir:userDir, flowFile:flowFilePath}).then(function() {
+ fs.existsSync(defaultFlowFilePath).should.be.false;
+ fs.existsSync(flowFilePath).should.be.false;
+ fs.existsSync(flowFileBackupPath).should.be.false;
+
+ localfilesystem.saveFlows(testFlow).then(function() {
+ fs.existsSync(flowFileBackupPath).should.be.false;
+ fs.existsSync(defaultFlowFilePath).should.be.false;
+ fs.existsSync(flowFilePath).should.be.true;
+ var content = fs.readFileSync(flowFilePath,'utf8');
+ var testFlow2 = [{"type":"tab","id":"bc5672ad.2741d8","label":"Sheet 2"}];
+
+ localfilesystem.saveFlows(testFlow2).then(function() {
+ fs.existsSync(flowFileBackupPath).should.be.true;
+ fs.existsSync(defaultFlowFilePath).should.be.false;
+ fs.existsSync(flowFilePath).should.be.true;
+ var backupContent = fs.readFileSync(flowFileBackupPath,'utf8');
+ content.should.equal(backupContent);
+ var content2 = fs.readFileSync(flowFilePath,'utf8');
+ content2.should.not.equal(backupContent);
+ done();
+
+ }).otherwise(function(err) {
+ done(err);
+ });
+
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+
+
+ });
+
+ it('should handle missing credentials', function(done) {
+ var flowFile = 'test.json';
+ var flowFilePath = path.join(userDir,flowFile);
+ var credFile = path.join(userDir,"test_cred.json");
+ localfilesystem.init({userDir:userDir, flowFile:flowFilePath}).then(function() {
+ fs.existsSync(credFile).should.be.false;
+
+ localfilesystem.getCredentials().then(function(creds) {
+ creds.should.eql({});
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it('should handle credentials', function(done) {
+ var flowFile = 'test.json';
+ var flowFilePath = path.join(userDir,flowFile);
+ var credFile = path.join(userDir,"test_cred.json");
+
+ localfilesystem.init({userDir:userDir, flowFile:flowFilePath}).then(function() {
+
+ fs.existsSync(credFile).should.be.false;
+
+ var credentials = {"abc":{"type":"creds"}};
+
+ localfilesystem.saveCredentials(credentials).then(function() {
+ fs.existsSync(credFile).should.be.true;
+ localfilesystem.getCredentials().then(function(creds) {
+ creds.should.eql(credentials);
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it('should return an empty list of library flows',function(done) {
+ localfilesystem.init({userDir:userDir}).then(function() {
+ localfilesystem.getAllFlows().then(function(flows) {
+ flows.should.eql({});
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it('should return a valid list of library flows',function(done) {
+ localfilesystem.init({userDir:userDir}).then(function() {
+ var flowLib = path.join(userDir,"lib","flows");
+ fs.closeSync(fs.openSync(path.join(flowLib,"A.json"),"w"));
+ fs.closeSync(fs.openSync(path.join(flowLib,"B.json"),"w"));
+ fs.mkdirSync(path.join(flowLib,"C"));
+ fs.closeSync(fs.openSync(path.join(flowLib,"C","D.json"),"w"));
+ var testFlowsList = {"d":{"C":{"f":["D"]}},"f":["A","B"]};
+
+ localfilesystem.getAllFlows().then(function(flows) {
+ flows.should.eql(testFlowsList);
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it('should fail a non-existent flow', function(done) {
+ localfilesystem.init({userDir:userDir}).then(function() {
+ localfilesystem.getFlow("a/b/c.json").then(function(flow) {
+ should.fail(flow,"No flow","Flow found");
+ }).otherwise(function(err) {
+ // err should be null, so this will pass
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it('should return a flow',function(done) {
+ localfilesystem.init({userDir:userDir}).then(function() {
+ var testflowString = JSON.stringify(testFlow);
+ localfilesystem.saveFlow("a/b/c/d.json",testflowString).then(function() {
+ localfilesystem.getFlow("a/b/c/d.json").then(function(flow) {
+ flow.should.eql(testflowString);
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it('should return an empty list of library objects',function(done) {
+ localfilesystem.init({userDir:userDir}).then(function() {
+ localfilesystem.getLibraryEntry('object','').then(function(flows) {
+ flows.should.eql({});
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it('should return an error for a non-existent library object',function(done) {
+ localfilesystem.init({userDir:userDir}).then(function() {
+ localfilesystem.getLibraryEntry('object','A/B').then(function(flows) {
+ should.fail(null,null,"non-existent flow");
+ }).otherwise(function(err) {
+ should.exist(err);
+ done();
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ function createObjectLibrary() {
+ var objLib = path.join(userDir,"lib","object");
+ fs.mkdirSync(objLib);
+ fs.mkdirSync(path.join(objLib,"A"));
+ fs.mkdirSync(path.join(objLib,"B"));
+ fs.mkdirSync(path.join(objLib,"B","C"));
+ fs.writeFileSync(path.join(objLib,"file1.js"),"// abc: def\n// not a metaline \n\n Hi",'utf8');
+ fs.writeFileSync(path.join(objLib,"B","file2.js"),"// ghi: jkl\n// not a metaline \n\n Hi",'utf8');
+ }
+
+ it('should return a directory listing of library objects',function(done) {
+ localfilesystem.init({userDir:userDir}).then(function() {
+ createObjectLibrary();
+
+ localfilesystem.getLibraryEntry('object','').then(function(flows) {
+ flows.should.eql([ 'A', 'B', { abc: 'def', fn: 'file1.js' } ]);
+ localfilesystem.getLibraryEntry('object','B').then(function(flows) {
+ flows.should.eql([ 'C', { ghi: 'jkl', fn: 'file2.js' } ]);
+ localfilesystem.getLibraryEntry('object','B/C').then(function(flows) {
+ flows.should.eql([]);
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it('should return a library object',function(done) {
+ localfilesystem.init({userDir:userDir}).then(function() {
+ createObjectLibrary();
+ localfilesystem.getLibraryEntry('object','B/file2.js').then(function(body) {
+ body.should.eql("// not a metaline \n\n Hi");
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+ it('should return a newly saved library object',function(done) {
+ localfilesystem.init({userDir:userDir}).then(function() {
+ createObjectLibrary();
+ localfilesystem.getLibraryEntry('object','B').then(function(flows) {
+ flows.should.eql([ 'C', { ghi: 'jkl', fn: 'file2.js' } ]);
+ localfilesystem.saveLibraryEntry('object','B/D/file3.js',{mno:'pqr'},"// another non meta line\n\n Hi There").then(function() {
+ localfilesystem.getLibraryEntry('object','B/D').then(function(flows) {
+ flows.should.eql([ { mno: 'pqr', fn: 'file3.js' } ]);
+ localfilesystem.getLibraryEntry('object','B/D/file3.js').then(function(body) {
+ body.should.eql("// another non meta line\n\n Hi There");
+ done();
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ }).otherwise(function(err) {
+ done(err);
+ });
+ });
+
+});
diff --git a/dgbuilder/test/red/ui_spec.js b/dgbuilder/test/red/ui_spec.js
new file mode 100644
index 0000000..b9de7bf
--- /dev/null
+++ b/dgbuilder/test/red/ui_spec.js
@@ -0,0 +1,177 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+var request = require("supertest");
+var express = require("express");
+var redUI = require("../../red/ui");
+
+
+describe("red/ui icon handler", function() {
+ it('returns the default icon when getting an unknown icon', function(done) {
+ var app = express();
+ redUI({},app);
+ request(app)
+ .get("/icons/youwonthaveme.png")
+ .expect('Content-Type', /image\/png/)
+ .expect(200)
+ .end(function(err, res){
+ if (err){
+ return done(err);
+ }
+ done();
+ });
+ });
+
+ it('returns an icon from disk', function(done) {
+ var app = express();
+ redUI({},app);
+ request(app)
+ .get("/icons/arduino.png")
+ .expect('Content-Type', /image\/png/)
+ .expect(200)
+ .end(function(err, res){
+ if (err){
+ return done(err);
+ }
+ done();
+ });
+ });
+});
+
+describe("icon cache handler", function() {
+ var fs = require('fs-extra');
+ var path = require('path');
+ var events = require("../../red/events");
+
+ var tempDir = path.join(__dirname,".tmp/");
+ var cachedFakePNG = tempDir + "cacheMe.png";
+
+
+ beforeEach(function(done) {
+ fs.remove(tempDir,function(err) {
+ fs.mkdirSync(tempDir);
+ fs.writeFileSync(cachedFakePNG, "Hello PNG\n");
+ done();
+ });
+ });
+ afterEach(function(done) {
+ fs.exists(cachedFakePNG, function(exists) {
+ if(exists) {
+ fs.unlinkSync(cachedFakePNG);
+ }
+ fs.remove(tempDir,done);
+ })
+ });
+
+ /*
+ * This test case test that:
+ * 1) any directory can be added to the path lookup (such as /tmp) by
+ * calling the right event
+ * 2) that a file we know exists gets cached so that the lookup/verification
+ * of actual existence doesn't occur again when a subsequent request comes in
+ *
+ * The second point verifies that the cache works. If the cache wouldn't work
+ * the default PNG would be served
+ */
+ it('returns an icon using icon cache', function(done) {
+ var app = express();
+ redUI({},app);
+ events.emit("node-icon-dir", tempDir);
+ request(app)
+ .get("/icons/cacheMe.png")
+ .expect('Content-Type', /image\/png/)
+ .expect(200)
+ .end(function(err, res){
+ if (err){
+ return done(err);
+ }
+ fs.unlink(cachedFakePNG, function(err) {
+ if(err) {
+ return done(err);
+ }
+ request(app)
+ .get("/icons/cacheMe.png")
+ .expect('Content-Type', /text\/html/)
+ .expect(404)
+ .end(function(err, res){
+ if (err){
+ return done(err);
+ }
+ done();
+ });
+ });
+ });
+ });
+});
+
+describe("red/ui settings handler", function() {
+ it('returns the provided settings', function(done) {
+ var settings = {
+ httpNodeRoot: "testHttpNodeRoot",
+ version: "testVersion",
+ };
+ var app = express();
+ redUI(settings,app);
+ request(app)
+ .get("/settings")
+ .expect('Content-Type', /application\/json/)
+ .expect(200, "{\n \"httpNodeRoot\": \"testHttpNodeRoot\",\n \"version\": \"testVersion\"\n}")
+ .end(function(err, res){
+ if (err){
+ return done(err);
+ }
+ done();
+ });
+
+ });
+});
+
+describe("red/ui root handler", function() {
+ it('server up the main page', function(done) {
+ var app = express();
+ redUI({},app);
+
+ request(app)
+ .get("/")
+ .expect('Content-Type', /text\/html/)
+ .expect(200)
+ .end(function(err, res){
+ if (err){
+ return done(err);
+ }
+ done();
+ });
+
+ });
+
+ it('redirects to path ending with /', function(done) {
+ var rapp = express();
+ redUI({},rapp);
+
+ var app = express().use('/root', rapp);
+
+ request(app)
+ .get("/root")
+ .expect('Content-Type', /text\/plain/)
+ .expect(302)
+ .end(function(err, res){
+ if (err){
+ return done(err);
+ }
+ done();
+ });
+
+ });
+});
diff --git a/dgbuilder/test/red/util_spec.js b/dgbuilder/test/red/util_spec.js
new file mode 100644
index 0000000..5200ef1
--- /dev/null
+++ b/dgbuilder/test/red/util_spec.js
@@ -0,0 +1,70 @@
+/**
+ * Copyright 2014 IBM Corp.
+ *
+ * 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.
+ **/
+var should = require("should");
+var util = require("../../red/util");
+
+describe("red/util", function() {
+ describe('ensureString', function() {
+ it('strings are preserved', function() {
+ util.ensureString('string').should.equal('string');
+ });
+ it('Buffer is converted', function() {
+ var s = util.ensureString(new Buffer('foo'));
+ s.should.equal('foo');
+ (typeof s).should.equal('string');
+ });
+ it('Object is converted to JSON', function() {
+ var s = util.ensureString({foo: "bar"});
+ (typeof s).should.equal('string');
+ should.deepEqual(JSON.parse(s), {foo:"bar"});
+ });
+ it('stringifies other things', function() {
+ var s = util.ensureString(123);
+ (typeof s).should.equal('string');
+ s.should.equal('123');
+ });
+ });
+
+ describe('ensureBuffer', function() {
+ it('Buffers are preserved', function() {
+ var b = new Buffer('');
+ util.ensureBuffer(b).should.equal(b);
+ });
+ it('string is converted', function() {
+ var b = util.ensureBuffer('foo');
+ var expected = new Buffer('foo');
+ for (var i = 0; i < expected.length; i++) {
+ b[i].should.equal(expected[i]);
+ }
+ Buffer.isBuffer(b).should.equal(true);
+ });
+ it('Object is converted to JSON', function() {
+ var obj = {foo: "bar"}
+ var b = util.ensureBuffer(obj);
+ Buffer.isBuffer(b).should.equal(true);
+ should.deepEqual(JSON.parse(b), obj);
+ });
+ it('stringifies other things', function() {
+ var b = util.ensureBuffer(123);
+ Buffer.isBuffer(b).should.equal(true);
+ var expected = new Buffer('123');
+ for (var i = 0; i < expected.length; i++) {
+ b[i].should.equal(expected[i]);
+ }
+ });
+ });
+});
+
diff --git a/dgbuilder/test/resources/70-HTML-test-file.html b/dgbuilder/test/resources/70-HTML-test-file.html
new file mode 100644
index 0000000..a0932e1
--- /dev/null
+++ b/dgbuilder/test/resources/70-HTML-test-file.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<h1>This is a test page for node 70-HTML</h1>
+
+<p>There's nothing to read here.</p>
+
+<ol id="colours">
+ <li>Blue</li>
+ <li>Red</li>
+</ol>
+
+<ul id="fruits">
+ <li>Apple</li>
+ <li>Pear</li>
+</ul>
+
+<ul id="vegetables">
+ <li>Potato</li>
+ <li>Parsnip</li>
+</ul>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/dgbuilder/tools/FormatXml.java b/dgbuilder/tools/FormatXml.java
new file mode 100644
index 0000000..7c6915f
--- /dev/null
+++ b/dgbuilder/tools/FormatXml.java
@@ -0,0 +1,49 @@
+import javax.xml.transform.*;
+import javax.xml.transform.stream.*;
+import java.io.*;
+import java.util.*;
+import java.nio.file.Paths;
+import java.nio.file.Files;
+import java.nio.charset.StandardCharsets;
+import java.nio.charset.Charset;
+public class FormatXml{
+public static String formatXml(String input, int indent) {
+ try {
+ Source xmlInput = new StreamSource(new StringReader(input));
+ StringWriter stringWriter = new StringWriter();
+ StreamResult xmlOutput = new StreamResult(stringWriter);
+ TransformerFactory transformerFactory = TransformerFactory.newInstance();
+ transformerFactory.setAttribute("indent-number", indent);
+ Transformer transformer = transformerFactory.newTransformer();
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.transform(xmlInput, xmlOutput);
+ return xmlOutput.getWriter().toString();
+ } catch (Exception e) {
+ throw new RuntimeException(e); // simple exception handling, please review it
+ }
+}
+
+public static String prettyFormat(String input) {
+ return formatXml(input, 2);
+}
+
+public static String readFile(String path, Charset encoding)
+ throws IOException
+{
+ byte[] encoded = Files.readAllBytes(Paths.get(path));
+ return new String(encoded, encoding);
+}
+
+public static void main(String[] args){
+try{
+ if (args != null && args.length != 1){
+ System.out.println("Usage:java FormatXml xmlStr");
+ System.exit(-1);
+ }
+ String xmlStr = readFile(args[0], StandardCharsets.UTF_8);
+ System.out.println(prettyFormat(xmlStr));
+}catch(Exception e){
+ e.printStackTrace();
+}
+}
+}
diff --git a/dgbuilder/tools/PrintYangToProp.java b/dgbuilder/tools/PrintYangToProp.java
new file mode 100644
index 0000000..93aaac7
--- /dev/null
+++ b/dgbuilder/tools/PrintYangToProp.java
@@ -0,0 +1,1424 @@
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintStream;
+import java.io.FileDescriptor;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Properties;
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.io.*;
+import javax.json.*;
+import org.opendaylight.yangtools.yang.binding.Identifier;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddressBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Address;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.base.CaseFormat;
+
+public class PrintYangToProp {
+
+ private static final Logger LOG = LoggerFactory.getLogger(PrintYangToProp.class);
+ public static final String PROPERTIES_FILE="/opt/bvc/controller/configuration/flowred.properties";
+ private static Properties properties;
+
+ static {
+
+ // Trick class loader into loading builders. Some of
+ // these will be needed later by Reflection classes, but need
+ // to explicitly "new" them here to get class loader to load them.
+/*
+ ServiceInformationBuilder b2 = new ServiceInformationBuilder();
+ ServiceDataBuilder b3 = new ServiceDataBuilder();
+ SdncRequestHeaderBuilder b4 = new SdncRequestHeaderBuilder();
+ RequestInformationBuilder b6 = new RequestInformationBuilder();
+
+ FlowredGroupInformationDataBuilder b29 = new FlowredGroupInformationDataBuilder();
+ FlowredInformationDataBuilder b48 = new FlowredInformationDataBuilder();
+
+ OperStatusBuilder b41 = new OperStatusBuilder();
+*/
+
+
+ }
+
+ public static void loadProperties() {
+ /*
+
+ File file = new File(PROPERTIES_FILE);
+ properties = new Properties();
+ InputStream input = null;
+ if (file.isFile() && file.canRead()) {
+ try {
+ input = new FileInputStream(file);
+ properties.load(input);
+ LOG.info("Loaded properties from " + PROPERTIES_FILE );
+ } catch (Exception e) {
+ LOG.error("Failed to load properties " + PROPERTIES_FILE +"\n",e);
+ } finally {
+ if (input != null) {
+ try {
+ input.close();
+ } catch (IOException e) {
+ LOG.error("Failed to close properties file " + PROPERTIES_FILE +"\n",e);
+ }
+ }
+ }
+ }
+ */
+ }
+
+ public static Properties toProperties(Properties props, Object fromObj) {
+ Class fromClass = null;
+
+ if (fromObj != null)
+ {
+ fromClass = fromObj.getClass();
+ }
+ return (toProperties(props, "", fromObj, fromClass));
+ }
+
+ public static Properties toProperties(Properties props, String pfx, Object fromObj)
+ {
+ Class fromClass = null;
+
+ if (fromObj != null)
+ {
+ fromClass = fromObj.getClass();
+ }
+
+ return(toProperties(props, pfx, fromObj, fromClass));
+ }
+
+ public static Properties toProperties(Properties props, String pfx,
+ Object fromObj, Class fromClass) {
+
+ if (fromObj == null) {
+ return (props);
+ }
+
+
+ String simpleName = fromClass.getSimpleName();
+
+ //LOG.debug("Extracting properties from " + fromClass.getName()
+ // + " class");
+ if (fromObj instanceof List) {
+
+ // Class is a List. List should contain yang-generated classes.
+ //LOG.debug(fromClass.getName() + " is a List");
+
+ List fromList = (List) fromObj;
+
+ for (int i = 0; i < fromList.size(); i++) {
+ toProperties(props, pfx + "[" + i + "]", fromList.get(i), fromClass);
+ }
+ props.setProperty(pfx + "_length", "" + fromList.size());
+
+ } else if (isYangGenerated(fromClass)) {
+ // Class is yang generated.
+ //LOG.debug(fromClass.getName() + " is a Yang-generated class");
+
+ String propNamePfx = null;
+
+ // If called from a list (so prefix ends in ']'), don't
+ // add class name again
+ if (pfx.endsWith("]")) {
+ propNamePfx = pfx;
+ } else {
+ if ((pfx != null) && (pfx.length() > 0)) {
+ propNamePfx = pfx ;
+ } else {
+ propNamePfx = toLowerHyphen(fromClass.getSimpleName());
+ }
+
+ if (propNamePfx.endsWith("-builder")) {
+ propNamePfx = propNamePfx.substring(0, propNamePfx.length()
+ - "-builder".length());
+ }
+
+ if (propNamePfx.endsWith("-impl")) {
+ propNamePfx = propNamePfx.substring(0, propNamePfx.length()
+ - "-impl".length());
+ }
+ }
+
+ // Iterate through getter methods to figure out values we need to
+ // save from
+
+ for (Method m : fromClass.getMethods()) {
+ // LOG.debug("Checking " + m.getName() + " method");
+ if (isGetter(m)) {
+ // LOG.debug(m.getName() + " is a getter");
+ Class returnType = m.getReturnType();
+ String fieldName = toLowerHyphen(m.getName().substring(3));
+ if(m != null && m.getName().matches("^is[A-Z].*")){
+ fieldName = toLowerHyphen(m.getName().substring(2));
+ }
+
+ fieldName = fieldName.substring(0, 1).toLowerCase()
+ + fieldName.substring(1);
+
+ // Is the return type a yang generated class?
+ if (isYangGenerated(returnType)) {
+ // Is it an enum?
+ if (returnType.isEnum()) {
+ // Return type is a typedef. Save its value.
+ try {
+ boolean isAccessible = m.isAccessible();
+ if (!isAccessible) {
+ m.setAccessible(true);
+ }
+
+ Object retValue = m.invoke(fromObj);
+
+ if (!isAccessible) {
+ m.setAccessible(isAccessible);
+ }
+ if (retValue != null) {
+ String propName = propNamePfx + "."
+ + fieldName;
+ String propVal = retValue.toString();
+ String yangProp = "yang." + fieldName + "." + propVal;
+ if ( properties.containsKey(yangProp)) {
+ propVal = properties.getProperty(yangProp);
+ //LOG.debug("Adjusting property " + yangProp + " " + propVal);
+ }
+ //LOG.debug("Setting property " + propName
+ // + " to " + propVal);
+ props.setProperty(propName, propVal);
+ }
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception trying to convert Yang-generated enum returned by "
+ + fromClass.getName() + "."
+ + m.getName()
+ + "() to Properties entry", e);
+ }
+ } else if (isIpv4Address(returnType)) {
+ // Save its value
+ try {
+ String propName = propNamePfx + "." + fieldName;
+ boolean isAccessible = m.isAccessible();
+ if (!isAccessible) {
+ m.setAccessible(true);
+ }
+ Ipv4Address retValue = (Ipv4Address) m.invoke(fromObj);
+ if (!isAccessible) {
+ m.setAccessible(isAccessible);
+ }
+
+ if (retValue != null) {
+ String propVal = retValue.getValue().toString();
+ //LOG.debug("Setting property " + propName
+ // + " to " + propVal);
+ props.setProperty(propName, propVal);
+
+ }
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception trying to convert value returned by "
+ + fromClass.getName() + "."
+ + m.getName()
+ + "() to Properties entry", e);
+ }
+ } else if (isIpv6Address(returnType)) {
+ // Save its value
+ try {
+ String propName = propNamePfx + "." + fieldName;
+ boolean isAccessible = m.isAccessible();
+ if (!isAccessible) {
+ m.setAccessible(true);
+ }
+ Ipv6Address retValue = (Ipv6Address) m.invoke(fromObj);
+ if (!isAccessible) {
+ m.setAccessible(isAccessible);
+ }
+
+ if (retValue != null) {
+ String propVal = retValue.getValue().toString();
+ //LOG.debug("Setting property " + propName
+ // + " to " + propVal);
+ props.setProperty(propName, propVal);
+
+ }
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception trying to convert value returned by "
+ + fromClass.getName() + "."
+ + m.getName()
+ + "() to Properties entry", e);
+ }
+ } else {
+ try {
+ boolean isAccessible = m.isAccessible();
+ if (!isAccessible) {
+ m.setAccessible(true);
+ }
+ Object retValue = m.invoke(fromObj);
+ if (!isAccessible) {
+ m.setAccessible(isAccessible);
+ }
+ if (retValue != null) {
+ toProperties(props, propNamePfx + "." + fieldName, retValue, returnType);
+ }
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception trying to convert Yang-generated class returned by"
+ + fromClass.getName() + "."
+ + m.getName()
+ + "() to Properties entry", e);
+ }
+ }
+ } else if (returnType.equals(Class.class)) {
+
+ //LOG.debug(m.getName()
+ // + " returns a Class object - not interested");
+
+ } else if (List.class.isAssignableFrom(returnType)) {
+
+ // This getter method returns a list.
+ try {
+ boolean isAccessible = m.isAccessible();
+ if (!isAccessible) {
+ m.setAccessible(true);
+ }
+ Object retList = m.invoke(fromObj);
+ if (!isAccessible) {
+ m.setAccessible(isAccessible);
+ }
+ // Figure out what type of elements are stored in this array.
+ Type paramType = m.getGenericReturnType();
+ Type elementType = ((ParameterizedType) paramType)
+ .getActualTypeArguments()[0];
+ toProperties(props, propNamePfx + "." + fieldName,
+ retList, (Class)elementType);
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception trying to convert List returned by "
+ + fromClass.getName() + "."
+ + m.getName()
+ + "() to Properties entry", e);
+ }
+
+ } else {
+
+ // Method returns something that is not a List and not
+ // yang-generated.
+ // Save its value
+ try {
+ String propName = propNamePfx + "." + fieldName;
+ boolean isAccessible = m.isAccessible();
+ if (!isAccessible) {
+ m.setAccessible(true);
+ }
+ Object propValObj = m.invoke(fromObj);
+ if (!isAccessible) {
+ m.setAccessible(isAccessible);
+ }
+
+ if (propValObj != null) {
+ String propVal = propValObj.toString();
+ //LOG.debug("Setting property " + propName
+ // + " to " + propVal);
+ props.setProperty(propName, propVal);
+
+ }
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception trying to convert value returned by "
+ + fromClass.getName() + "."
+ + m.getName()
+ + "() to Properties entry", e);
+ }
+ }
+
+ }
+ }
+
+ } else {
+ // Class is not yang generated and not a list
+ // Do nothing.
+
+ }
+
+ return (props);
+ }
+
+ public static Object toBuilder(Properties props, Object toObj) {
+
+ return (toBuilder(props, "", toObj));
+ }
+
+ public static List toList(Properties props, String pfx, List toObj,
+ Class elemType) {
+
+ int maxIdx = -1;
+ boolean foundValue = false;
+
+ //LOG.debug("Saving properties to List<" + elemType.getName()
+ // + "> from " + pfx);
+
+ // Figure out array size
+ for (Object pNameObj : props.keySet()) {
+ String key = (String) pNameObj;
+
+ if (key.startsWith(pfx + "[")) {
+ String idxStr = key.substring(pfx.length() + 1);
+ int endloc = idxStr.indexOf("]");
+ if (endloc != -1) {
+ idxStr = idxStr.substring(0, endloc);
+ }
+
+ try {
+ int curIdx = Integer.parseInt(idxStr);
+ if (curIdx > maxIdx) {
+ maxIdx = curIdx;
+ }
+ } catch (Exception e) {
+ LOG.error("Illegal subscript in property " + key);
+ }
+
+ }
+ }
+
+ //LOG.debug(pfx + " has max index of " + maxIdx);
+ for (int i = 0; i <= maxIdx; i++) {
+
+ String curBase = pfx + "[" + i + "]";
+
+ if (isYangGenerated(elemType)) {
+ String builderName = elemType.getName() + "Builder";
+ try {
+ Class builderClass = Class.forName(builderName);
+ Object builderObj = builderClass.newInstance();
+ Method buildMethod = builderClass.getMethod("build");
+ builderObj = toBuilder(props, curBase, builderObj, true);
+ if (builderObj != null) {
+ //LOG.debug("Calling " + builderObj.getClass().getName()
+ // + "." + buildMethod.getName() + "()");
+ Object builtObj = buildMethod.invoke(builderObj);
+ toObj.add(builtObj);
+ foundValue = true;
+ }
+
+ } catch (ClassNotFoundException e) {
+ LOG.warn("Could not find builder class " + builderName, e);
+ } catch (Exception e) {
+ LOG.error("Caught exception trying to populate list from "
+ + pfx);
+ }
+ }
+
+ }
+
+ if (foundValue) {
+ return (toObj);
+ } else {
+ return (null);
+ }
+
+ }
+
+ public static Object toBuilder(Properties props, String pfx, Object toObj) {
+ return(toBuilder(props, pfx, toObj, false));
+ }
+
+ public static Object toBuilder(Properties props, String pfx, Object toObj, boolean preservePfx) {
+ Class toClass = toObj.getClass();
+ boolean foundValue = false;
+
+ //LOG.debug("Saving properties to " + toClass.getName() + " class from "
+ // + pfx);
+
+ Ipv4Address addr;
+
+ if (isYangGenerated(toClass)) {
+ // Class is yang generated.
+ //LOG.debug(toClass.getName() + " is a Yang-generated class");
+
+ String propNamePfx = null;
+ if (preservePfx) {
+ propNamePfx = pfx;
+ } else {
+
+ if ((pfx != null) && (pfx.length() > 0)) {
+ propNamePfx = pfx + "."
+ + toLowerHyphen(toClass.getSimpleName());
+ } else {
+ propNamePfx = toLowerHyphen(toClass.getSimpleName());
+ }
+
+ if (propNamePfx.endsWith("-builder")) {
+ propNamePfx = propNamePfx.substring(0, propNamePfx.length()
+ - "-builder".length());
+ }
+
+ if (propNamePfx.endsWith("-impl")) {
+ propNamePfx = propNamePfx.substring(0, propNamePfx.length()
+ - "-impl".length());
+ }
+ }
+
+ if (toObj instanceof Identifier) {
+ //LOG.debug(toClass.getName() + " is a Key - skipping");
+ return (toObj);
+ }
+
+ // Iterate through getter methods to figure out values we need to
+ // set
+
+ for (Method m : toClass.getMethods()) {
+ // LOG.debug("Is " + m.getName() + " method a setter?");
+ if (isSetter(m)) {
+ // LOG.debug(m.getName() + " is a setter");
+ Class paramTypes[] = m.getParameterTypes();
+ Class paramClass = paramTypes[0];
+
+ String fieldName = toLowerHyphen(m.getName().substring(3));
+ fieldName = fieldName.substring(0, 1).toLowerCase()
+ + fieldName.substring(1);
+
+ String propName = propNamePfx + "." + fieldName;
+
+ String paramValue = props.getProperty(propName);
+ if (paramValue == null) {
+ //LOG.debug(propName + " is unset");
+ } else {
+ //LOG.debug(propName + " = " + paramValue);
+ }
+
+ // Is the return type a yang generated class?
+ if (isYangGenerated(paramClass)) {
+ // Is it an enum?
+ if (paramClass.isEnum()) {
+
+ //LOG.debug(m.getName() + " expects an Enum");
+ // Param type is a typedef.
+ if (paramValue != null) {
+ Object paramObj = null;
+
+ try {
+ paramObj = Enum.valueOf(paramClass,
+ toUpperCamelCase(paramValue));
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception trying to convert field "
+ + propName + " to enum "
+ + paramClass.getName(), e);
+ }
+
+ try {
+ boolean isAccessible = m.isAccessible();
+ if (!isAccessible) {
+ m.setAccessible(true);
+ }
+
+ //LOG.debug("Calling "
+ // + toObj.getClass().getName() + "."
+ // + m.getName() + "(" + paramValue
+ // + ")");
+ m.invoke(toObj, paramObj);
+
+ if (!isAccessible) {
+ m.setAccessible(isAccessible);
+ }
+ foundValue = true;
+
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception trying to create Yang-generated enum expected by"
+ + toClass.getName()
+ + "."
+ + m.getName()
+ + "() from Properties entry",
+ e);
+ }
+ }
+ } else {
+
+ String simpleName = paramClass.getSimpleName();
+
+ if ("Ipv4Address".equals(simpleName)
+ || "Ipv6Address".equals(simpleName)) {
+
+ if (paramValue != null) {
+ try {
+ IpAddress ipAddr = IpAddressBuilder
+ .getDefaultInstance(paramValue);
+
+
+ if ("Ipv4Address".equals(simpleName))
+ {
+ m.invoke(toObj, ipAddr.getIpv4Address());
+ }
+ else
+ {
+ m.invoke(toObj, ipAddr.getIpv6Address());
+
+ }
+ foundValue = true;
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception calling "
+ + toClass.getName() + "."
+ + m.getName() + "("
+ + paramValue + ")", e);
+
+ }
+ }
+
+ } else {
+ // setter expects a yang-generated class. Need
+ // to
+ // create a builder to set it.
+
+ String builderName = paramClass.getName()
+ + "Builder";
+ Class builderClass = null;
+ Object builderObj = null;
+ Object paramObj = null;
+
+ //LOG.debug(m.getName()
+ // + " expects a yang-generated class - looking for builder "
+ // + builderName);
+ try {
+ builderClass = Class.forName(builderName);
+ builderObj = builderClass.newInstance();
+ paramObj = toBuilder(props, propNamePfx,
+ builderObj);
+ } catch (ClassNotFoundException e) {
+ Object constObj = null;
+ try {
+ // See if I can find a constructor I can
+ // use
+ Constructor[] constructors = paramClass
+ .getConstructors();
+ // Is there a String constructor?
+ for (Constructor c : constructors) {
+ Class[] cParms = c
+ .getParameterTypes();
+ if ((cParms != null)
+ && (cParms.length == 1)) {
+ if (String.class
+ .isAssignableFrom(cParms[0])) {
+ constObj = c
+ .newInstance(paramValue);
+ }
+ }
+ }
+
+ if (constObj == null) {
+ // Is there a Long constructor?
+ for (Constructor c : constructors) {
+ Class[] cParms = c
+ .getParameterTypes();
+ if ((cParms != null)
+ && (cParms.length == 1)) {
+ if (Long.class
+ .isAssignableFrom(cParms[0])) {
+ constObj = c
+ .newInstance(Long
+ .parseLong(paramValue));
+ }
+ }
+ }
+
+ }
+
+ if (constObj != null) {
+ try {
+ m.invoke(toObj, constObj);
+ foundValue = true;
+ } catch (Exception e2) {
+ LOG.error(
+ "Caught exception trying to call "
+ + m.getName(),
+ e2);
+ }
+ }
+ } catch (Exception e1) {
+ LOG.warn(
+ "Could not find a suitable constructor for "
+ + paramClass.getName(),
+ e1);
+ }
+
+ if (paramObj == null) {
+ LOG.warn("Could not find builder class "
+ + builderName
+ + " and could not find a String or Long constructor - trying just to set passing paramValue");
+
+ }
+
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception trying to create builder "
+ + builderName, e);
+ }
+
+ if (paramObj != null) {
+
+ try {
+
+ Method buildMethod = builderClass
+ .getMethod("build");
+ //LOG.debug("Calling "
+ // + paramObj.getClass().getName()
+ // + "." + buildMethod.getName()
+ // + "()");
+ Object builtObj = buildMethod
+ .invoke(paramObj);
+
+ boolean isAccessible = m.isAccessible();
+ if (!isAccessible) {
+ m.setAccessible(true);
+ }
+
+ //LOG.debug("Calling "
+ // + toObj.getClass().getName()
+ // + "." + m.getName() + "()");
+ m.invoke(toObj, builtObj);
+ if (!isAccessible) {
+ m.setAccessible(isAccessible);
+ }
+ foundValue = true;
+
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception trying to set Yang-generated class expected by"
+ + toClass.getName()
+ + "."
+ + m.getName()
+ + "() from Properties entry",
+ e);
+ }
+ } else {
+ try {
+ boolean isAccessible = m.isAccessible();
+ if (!isAccessible) {
+ m.setAccessible(true);
+ }
+ //LOG.debug("Calling "
+ // + toObj.getClass().getName()
+ // + "." + m.getName() + "("
+ // + paramValue + ")");
+ m.invoke(toObj, paramValue);
+ if (!isAccessible) {
+ m.setAccessible(isAccessible);
+ }
+ foundValue = true;
+
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception trying to convert value returned by"
+ + toClass.getName()
+ + "."
+ + m.getName()
+ + "() to Properties entry",
+ e);
+ }
+ }
+ }
+ }
+ } else {
+
+ // Setter's argument is not a yang-generated class. See
+ // if it is a List.
+
+ if (List.class.isAssignableFrom(paramClass)) {
+
+ //LOG.debug("Parameter class " + paramClass.getName()
+ // + " is a List");
+
+ // Figure out what type of args are in List and pass
+ // that to toList().
+
+ Type paramType = m.getGenericParameterTypes()[0];
+ Type elementType = ((ParameterizedType) paramType)
+ .getActualTypeArguments()[0];
+ Object paramObj = new LinkedList();
+ try {
+ paramObj = toList(props, propName,
+ (List) paramObj, (Class) elementType);
+ } catch (Exception e) {
+ LOG.error("Caught exception trying to create list expected as argument to "
+ + toClass.getName() + "." + m.getName());
+ }
+
+ if (paramObj != null) {
+ try {
+ boolean isAccessible = m.isAccessible();
+ if (!isAccessible) {
+ m.setAccessible(true);
+ }
+ //LOG.debug("Calling "
+ // + toObj.getClass().getName() + "."
+ // + m.getName() + "(" + paramValue
+ // + ")");
+ m.invoke(toObj, paramObj);
+ if (!isAccessible) {
+ m.setAccessible(isAccessible);
+ }
+ foundValue = true;
+
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception trying to convert List returned by"
+ + toClass.getName() + "."
+ + m.getName()
+ + "() to Properties entry",
+ e);
+ }
+ }
+ } else {
+
+ // Setter expects something that is not a List and
+ // not yang-generated. Just pass the parameter value
+
+ //LOG.debug("Parameter class "
+ // + paramClass.getName()
+ // + " is not a yang-generated class or a List");
+
+ if (paramValue != null) {
+
+ Object constObj = null;
+
+ try {
+ // See if I can find a constructor I can use
+ Constructor[] constructors = paramClass
+ .getConstructors();
+ // Is there a String constructor?
+ for (Constructor c : constructors) {
+ Class[] cParms = c.getParameterTypes();
+ if ((cParms != null)
+ && (cParms.length == 1)) {
+ if (String.class
+ .isAssignableFrom(cParms[0])) {
+ constObj = c
+ .newInstance(paramValue);
+ }
+ }
+ }
+
+ if (constObj == null) {
+ // Is there a Long constructor?
+ for (Constructor c : constructors) {
+ Class[] cParms = c
+ .getParameterTypes();
+ if ((cParms != null)
+ && (cParms.length == 1)) {
+ if (Long.class
+ .isAssignableFrom(cParms[0])) {
+ constObj = c
+ .newInstance(Long
+ .parseLong(paramValue));
+ }
+ }
+ }
+
+ }
+
+ if (constObj != null) {
+ try {
+ //LOG.debug("Calling "
+ // + toObj.getClass()
+ // .getName() + "."
+ // + m.getName() + "("
+ // + constObj + ")");
+ m.invoke(toObj, constObj);
+ foundValue = true;
+ } catch (Exception e2) {
+ LOG.error(
+ "Caught exception trying to call "
+ + m.getName(), e2);
+ }
+ } else {
+ try {
+ boolean isAccessible = m
+ .isAccessible();
+ if (!isAccessible) {
+ m.setAccessible(true);
+ }
+ //LOG.debug("Calling "
+ // + toObj.getClass()
+ // .getName() + "."
+ // + m.getName() + "("
+ // + paramValue + ")");
+ m.invoke(toObj, paramValue);
+ if (!isAccessible) {
+ m.setAccessible(isAccessible);
+ }
+ foundValue = true;
+
+ } catch (Exception e) {
+ LOG.error(
+ "Caught exception trying to convert value returned by"
+ + toClass.getName()
+ + "."
+ + m.getName()
+ + "() to Properties entry",
+ e);
+ }
+ }
+ } catch (Exception e1) {
+ LOG.warn(
+ "Could not find a suitable constructor for "
+ + paramClass.getName(), e1);
+ }
+
+ /*
+ * try { boolean isAccessible =
+ * m.isAccessible(); if (!isAccessible) {
+ * m.setAccessible(true); } LOG.debug("Calling "
+ * + toObj.getClass().getName() + "." +
+ * m.getName() + "(" + paramValue + ")");
+ * m.invoke(toObj, paramValue); if
+ * (!isAccessible) {
+ * m.setAccessible(isAccessible); } foundValue =
+ * true;
+ *
+ * } catch (Exception e) { LOG.error(
+ * "Caught exception trying to convert value returned by"
+ * + toClass.getName() + "." + m.getName() +
+ * "() to Properties entry", e); }
+ */
+ }
+ }
+ }
+ } // End of section handling "setter" method
+ } // End of loop through Methods
+ } // End of section handling yang-generated class
+
+ if (foundValue) {
+ return (toObj);
+ } else {
+ return (null);
+ }
+ }
+
+/*
+ public static void printPropertyList(PrintStream pstr, String pfx,
+ Class toClass) {
+ boolean foundValue = false;
+
+ //LOG.debug("Analyzing " + toClass.getName() + " class : pfx " + pfx);
+
+ if (isYangGenerated(toClass)
+ && (!Identifier.class.isAssignableFrom(toClass))) {
+ // Class is yang generated.
+ //LOG.debug(toClass.getName() + " is a Yang-generated class");
+
+ if (toClass.getName().endsWith("Key")) {
+ if (Identifier.class.isAssignableFrom(toClass)) {
+ //LOG.debug(Identifier.class.getName()
+ // + " is assignable from " + toClass.getName());
+ } else {
+
+ //LOG.debug(Identifier.class.getName()
+ // + " is NOT assignable from " + toClass.getName());
+ }
+ }
+
+ String propNamePfx = null;
+ if (pfx.endsWith("]")) {
+ propNamePfx = pfx;
+ } else {
+
+ if ((pfx != null) && (pfx.length() > 0)) {
+ propNamePfx = pfx + "."
+ + toLowerHyphen(toClass.getSimpleName());
+ } else {
+ propNamePfx = toLowerHyphen(toClass.getSimpleName());
+ }
+
+ if (propNamePfx.endsWith("-builder")) {
+ propNamePfx = propNamePfx.substring(0, propNamePfx.length()
+ - "-builder".length());
+ }
+
+ if (propNamePfx.endsWith("-impl")) {
+ propNamePfx = propNamePfx.substring(0, propNamePfx.length()
+ - "-impl".length());
+ }
+ }
+
+ // Iterate through getter methods to figure out values we need to
+ // set
+
+ for (Method m : toClass.getMethods()) {
+ //LOG.debug("Is " + m.getName() + " method a getter?");
+ if (isGetter(m)) {
+ //LOG.debug(m.getName() + " is a getter");
+ Class returnClass = m.getReturnType();
+
+ String fieldName = toLowerHyphen(m.getName().substring(3));
+ fieldName = fieldName.substring(0, 1).toLowerCase()
+ + fieldName.substring(1);
+
+ String propName = propNamePfx + "." + fieldName;
+
+ // Is the return type a yang generated class?
+ if (isYangGenerated(returnClass)) {
+ // Is it an enum?
+ if (returnClass.isEnum()) {
+ //System.out.println(returnClass.getSimpleName());
+ //System.out.println(Arrays.asList(returnClass.getEnumConstants()));
+
+ //LOG.debug(m.getName() + " is an Enum");
+ pstr.print("\n" + propName + ":Enum:" + Arrays.asList(returnClass.getEnumConstants()) + "\n");
+
+ } else {
+
+ String simpleName = returnClass.getSimpleName();
+
+ if ("Ipv4Address".equals(simpleName) || "Ipv6Address".equals(simpleName)) {
+ //LOG.debug(m.getName()+" is an "+simpleName);
+ pstr.print("\n" + propName + ":" + simpleName + "\n");
+ } else {
+ printPropertyList(pstr, propNamePfx, returnClass);
+ }
+
+ }
+ } else {
+
+ // Setter's argument is not a yang-generated class. See
+ // if it is a List.
+
+ if (List.class.isAssignableFrom(returnClass)) {
+
+ //LOG.debug("Parameter class "
+ //+ returnClass.getName() + " is a List");
+
+ // Figure out what type of args are in List and pass
+ // that to toList().
+
+ Type returnType = m.getGenericReturnType();
+ Type elementType = ((ParameterizedType) returnType)
+ .getActualTypeArguments()[0];
+ Class elementClass = (Class) elementType;
+ //LOG.debug("Calling printPropertyList on list type ("
+ //+ elementClass.getName()
+ //+ "), pfx is ("
+ // + pfx
+ // + "), toClass is ("
+ // + toClass.getName() + ")");
+ printPropertyList(
+ pstr,
+ propNamePfx
+ + "."
+ + toLowerHyphen(elementClass
+ .getSimpleName()) + "[]",
+ elementClass);
+
+ } else if (!returnClass.equals(Class.class)) {
+
+ // Setter expects something that is not a List and
+ // not yang-generated. Just pass the parameter value
+
+ //LOG.debug("Parameter class "
+ // + returnClass.getName()
+ // + " is not a yang-generated class or a List");
+ String className=returnClass.getName();
+
+ //"org.opendaylight.yangtools.yang.binding.Identifier"
+ int nClassNameIndex = className.lastIndexOf('.');
+ String nClassName = className;
+ if(nClassNameIndex != -1){
+ nClassName=className.substring(nClassNameIndex+1);
+ }
+ pstr.print("\n" + propName +":" + nClassName +"\n");
+
+ }
+ }
+ } // End of section handling "setter" method
+ } // End of loop through Methods
+ } // End of section handling yang-generated class
+
+ }
+*/
+
+ public static Properties prop = new Properties();
+ public static ArrayList<String> propList = new ArrayList<String>();
+ public static Properties getProperties(PrintStream pstr, String pfx,
+ Class toClass) {
+ boolean foundValue = false;
+
+ //LOG.debug("Analyzing " + toClass.getName() + " class : pfx " + pfx);
+
+ if (isYangGenerated(toClass)
+ && (!Identifier.class.isAssignableFrom(toClass))) {
+ // Class is yang generated.
+ //LOG.debug(toClass.getName() + " is a Yang-generated class");
+
+ if (toClass.getName().endsWith("Key")) {
+ if (Identifier.class.isAssignableFrom(toClass)) {
+ //LOG.debug(Identifier.class.getName()
+ // + " is assignable from " + toClass.getName());
+ } else {
+
+ //LOG.debug(Identifier.class.getName()
+ // + " is NOT assignable from " + toClass.getName());
+ }
+ }
+
+ String propNamePfx = null;
+ if (pfx.endsWith("]")) {
+ propNamePfx = pfx;
+ }else if(pfx.indexOf(".CLASS_FOUND") != -1){
+ pfx = pfx.replace(".CLASS_FOUND","");
+ propNamePfx = pfx + "."
+ + toLowerHyphen(toClass.getSimpleName());
+ } else {
+
+ if ((pfx != null) && (pfx.length() > 0)) {
+ propNamePfx = pfx + "."
+ + toLowerHyphen(toClass.getSimpleName());
+ } else {
+ propNamePfx = toLowerHyphen(toClass.getSimpleName());
+ }
+
+ if (propNamePfx.endsWith("-builder")) {
+ propNamePfx = propNamePfx.substring(0, propNamePfx.length()
+ - "-builder".length());
+ }
+
+ if (propNamePfx.endsWith("-impl")) {
+ propNamePfx = propNamePfx.substring(0, propNamePfx.length()
+ - "-impl".length());
+ }
+ }
+
+ // Iterate through getter methods to figure out values we need to
+ // set
+
+ for (Method m : toClass.getMethods()) {
+ //LOG.debug("Is " + m.getName() + " method a getter?");
+ if (isGetter(m)) {
+ // LOG.debug(m.getName() + " is a getter");
+ Class returnClass = m.getReturnType();
+
+ String fieldName = toLowerHyphen(m.getName().substring(3));
+ if(m != null && m.getName().matches("^is[A-Z].*")){
+ fieldName = toLowerHyphen(m.getName().substring(2));
+ }
+ fieldName = fieldName.substring(0, 1).toLowerCase()
+ + fieldName.substring(1);
+
+ String propName = propNamePfx + "." + fieldName;
+ //System.out.println("****" + propName);
+
+ // Is the return type a yang generated class?
+ if (isYangGenerated(returnClass)) {
+ // Is it an enum?
+ if (returnClass.isEnum()) {
+
+ //LOG.debug(m.getName() + " is an Enum");
+ //pstr.print("\n" + propName);
+ //pstr.print("\n" + propName + ":Enum:" + Arrays.asList(returnClass.getEnumConstants()) + "\n");
+ pstr.print("\"" + propName + ":Enum:" + Arrays.asList(returnClass.getEnumConstants()) + "\",");
+ prop.setProperty(propName,"");
+ propList.add(propName);
+
+ } else {
+
+ String simpleName = returnClass.getSimpleName();
+ //System.out.println("simpleName:" + simpleName);
+
+ if ("Ipv4Address".equals(simpleName) || "Ipv6Address".equals(simpleName) || "IpAddress".equals(simpleName)) {
+ //LOG.debug(m.getName()+" is an "+simpleName);
+ //pstr.print("\n" + propName);
+ //pstr.print("\n" + propName + ":" + simpleName + "\n");
+ pstr.print("\"" + propName + ":" + simpleName + "\",");
+ prop.setProperty(propName,"");
+ propList.add(propName);
+ } else {
+ boolean isString = false;
+ boolean isNumber = false;
+ boolean isBoolean = false;
+ boolean isIdentifier = false;
+ //System.out.println("simpleName:" + simpleName);
+ //System.out.println("propName:" + propName);
+ for(Method mthd : returnClass.getMethods()){
+ String methodName = mthd.getName();
+ //System.out.println("methodName:" + methodName);
+ if(methodName.equals("getValue")){
+ Class retType = mthd.getReturnType();
+ //System.out.println("retType:" + retType);
+ isString = String.class.isAssignableFrom(retType);
+ isNumber = Number.class.isAssignableFrom(retType);
+ isBoolean = Boolean.class.isAssignableFrom(retType);
+ isIdentifier = Identifier.class.isAssignableFrom(retType);
+ //System.out.println("isString:" + isString);
+ //System.out.println("isNumber:" + isNumber);
+ //System.out.println("isNumber:" + isNumber);
+ break;
+ }
+ }
+
+ if(isString){
+ pstr.print("\"" + propName + ":String\",");
+ prop.setProperty(propName,"");
+ propList.add(propName);
+ }else if(isNumber){
+ pstr.print("\"" + propName + ":Number\",");
+ prop.setProperty(propName,"");
+ propList.add(propName);
+ }else if(isBoolean){
+ pstr.print("\"" + propName + ":Boolean\",");
+ prop.setProperty(propName,"");
+ propList.add(propName);
+ }else if(isIdentifier){
+ //System.out.println("isIdentifier");
+ //isIdentifer so skipping
+ continue;
+ }else{
+ /*
+ System.out.println("fieldName:" + fieldName);
+ System.out.println("simpleName:" + simpleName);
+ System.out.println("returnClass:" + returnClass);
+ System.out.println("pstr:" + pstr);
+ System.out.println("propNamePfx:" + propNamePfx);
+ */
+ getProperties(pstr, propNamePfx + ".CLASS_FOUND", returnClass);
+ }
+ }
+
+ }
+ } else {
+
+ // Setter's argument is not a yang-generated class. See
+ // if it is a List.
+
+ if (List.class.isAssignableFrom(returnClass)) {
+
+ //LOG.debug("Parameter class "
+ // + returnClass.getName() + " is a List");
+
+ // Figure out what type of args are in List and pass
+ // that to toList().
+
+ Type returnType = m.getGenericReturnType();
+ Type elementType = ((ParameterizedType) returnType)
+ .getActualTypeArguments()[0];
+ Class elementClass = (Class) elementType;
+ //LOG.debug("Calling printPropertyList on list type ("
+ //+ elementClass.getName()
+ // + "), pfx is ("
+ // + pfx
+ // + "), toClass is ("
+ // + toClass.getName() + ")");
+ //System.out.println("List propNamePfx:" + propNamePfx+ "." + toLowerHyphen(elementClass.getSimpleName()) + "[]");
+ if(String.class.isAssignableFrom(elementClass)){
+ pstr.print("\"" + propName + ":[String,String,...]\",");
+ prop.setProperty(propName,"");
+ propList.add(propName);
+ }else if(Number.class.isAssignableFrom(elementClass)){
+ pstr.print("\"" + propName + ":[Number,Number,...]\",");
+ prop.setProperty(propName,"");
+ propList.add(propName);
+ }else if(Boolean.class.isAssignableFrom(elementClass)){
+ pstr.print("\"" + propName + ":[Boolean,Boolean,...]\",");
+ prop.setProperty(propName,"");
+ propList.add(propName);
+ }else if(Identifier.class.isAssignableFrom(elementClass)){
+ continue;
+ }else{
+ getProperties(
+ pstr,
+ propNamePfx
+ + "."
+ + toLowerHyphen(elementClass
+ .getSimpleName()) + "[]",
+ elementClass);
+ }
+
+ } else if (!returnClass.equals(Class.class)) {
+
+ // Setter expects something that is not a List and
+ // not yang-generated. Just pass the parameter value
+
+ //LOG.debug("Parameter class "
+ // + returnClass.getName()
+ // + " is not a yang-generated class or a List");
+
+ //pstr.print("\n" + propName);
+ String className=returnClass.getName();
+ int nClassNameIndex = className.lastIndexOf('.');
+ String nClassName = className;
+ if(nClassNameIndex != -1){
+ nClassName=className.substring(nClassNameIndex+1);
+ }
+ boolean isString = String.class.isAssignableFrom(returnClass);
+ boolean isNumber = Number.class.isAssignableFrom(returnClass);
+ boolean isBoolean = Boolean.class.isAssignableFrom(returnClass);
+ //pstr.print("\n" + propName +":" + nClassName +"\n");
+ boolean isIdentifier = Identifier.class.isAssignableFrom(returnClass);
+ if(!isIdentifier && !nClassName.equals("[C")){
+ if(isNumber){
+ pstr.print("\"" + propName +":Number\",");
+ }else if(isBoolean){
+ pstr.print("\"" + propName +":Boolean\",");
+ }else{
+ if(nClassName.equals("[B")){
+ pstr.print("\"" + propName +":Binary\",");
+ }else{
+ pstr.print("\"" + propName +":" + nClassName +"\",");
+ }
+ }
+ prop.setProperty(propName,"");
+ propList.add(propName);
+ }
+
+ }
+ }
+ } // End of section handling "setter" method
+ } // End of loop through Methods
+ } // End of section handling yang-generated class
+
+ return prop;
+ }
+
+ public static boolean isYangGenerated(Class c) {
+ if (c == null) {
+ return (false);
+ } else {
+ //System.out.println(c.getName());
+ return (c.getName().startsWith("org.opendaylight.yang.gen."));
+ }
+ }
+
+ public static boolean isIpv4Address(Class c) {
+
+ if (c == null ) {
+ return (false);
+ }
+ String simpleName = c.getSimpleName();
+ return ("Ipv4Address".equals(simpleName)) ;
+ }
+
+ public static boolean isIpv6Address(Class c) {
+
+ if (c == null ) {
+ return (false);
+ }
+ String simpleName = c.getSimpleName();
+ return ("Ipv6Address".equals(simpleName)) ;
+ }
+
+ public static String toLowerHyphen(String inStr) {
+ if (inStr == null) {
+ return (null);
+ }
+
+ String str = inStr.substring(0, 1).toLowerCase();
+ if (inStr.length() > 1) {
+ str = str + inStr.substring(1);
+ }
+
+ String regex = "(([a-z0-9])([A-Z]))";
+ String replacement = "$2-$3";
+
+ String retval = str.replaceAll(regex, replacement).toLowerCase();
+
+ //LOG.debug("Converting " + inStr + " => " + str + " => " + retval);
+ return (retval);
+ }
+
+ public static String toUpperCamelCase(String inStr) {
+ if (inStr == null) {
+ return (null);
+ }
+
+ String[] terms = inStr.split("-");
+ StringBuffer sbuff = new StringBuffer();
+ // Check if string begins with a digit
+ if (Character.isDigit(inStr.charAt(0))) {
+ sbuff.append('_');
+ }
+ for (String term : terms) {
+ sbuff.append(term.substring(0, 1).toUpperCase());
+ if (term.length() > 1) {
+ sbuff.append(term.substring(1));
+ }
+ }
+ return (sbuff.toString());
+
+ }
+
+ public static boolean isGetter(Method m) {
+ //System.out.println(m);
+ if (m == null) {
+ return (false);
+ }
+
+ if (Modifier.isPublic(m.getModifiers())
+ && (m.getParameterTypes().length == 0)) {
+ if ((m.getName().matches("^is[A-Z].*") || m.getName().matches("^get[A-Z].*"))
+ && m.getReturnType().equals(Boolean.class)) {
+ return (true);
+ }
+ if (m.getName().matches("^get[A-Z].*")
+ && !m.getReturnType().equals(void.class)) {
+ return (true);
+ }
+
+ }
+
+ return (false);
+ }
+
+ public static boolean isSetter(Method m) {
+ if (m == null) {
+ return (false);
+ }
+
+ if (Modifier.isPublic(m.getModifiers())
+ && (m.getParameterTypes().length == 1)) {
+ if (m.getName().matches("^set[A-Z].*")) {
+ Class[] paramTypes = m.getParameterTypes();
+ if (paramTypes[0].isAssignableFrom(Identifier.class)
+ || Identifier.class.isAssignableFrom(paramTypes[0])) {
+ return (false);
+ } else {
+ return (true);
+ }
+ }
+
+ }
+
+ return (false);
+ }
+
+ public static void main(String[] args){
+ try{
+ PrintStream ps = new PrintStream(new FileOutputStream(FileDescriptor.out));
+ PrintYangToProp printYangToProp = new PrintYangToProp();
+ String className = args[0];
+ //ClassLoader classLoader = PrintYangToProp.class.getClassLoader();
+ //Class aClass = classLoader.loadClass(className);
+ Class cl = Class.forName(className);
+ //printPropertyList(ps,"",cl);
+ //JsonObject jsonObj = Json.createObjectBuilder().build();
+ Properties p = getProperties(ps,"",cl);
+ //System.out.println(p);
+
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+ }
+
+
+}
diff --git a/dgbuilder/tools/auto_app.sh b/dgbuilder/tools/auto_app.sh
new file mode 100755
index 0000000..a3e0f2e
--- /dev/null
+++ b/dgbuilder/tools/auto_app.sh
@@ -0,0 +1,24 @@
+toolsDir=$PROJECT_HOME/tools
+if [ "$#" != "1" ]
+then
+ echo "Usage: $0 appName"
+ exit
+fi
+appName="$1"
+mkdir tmpws
+cd tmpws
+mkdir logs
+mvn archetype:generate -DarchetypeGroupId=com.brocade.developer -DarchetypeArtifactId=brocade.dev.plugin.ext.archetype -DarchetypeVersion=1.2.0.100-SNAPSHOT >${toolsDir}/tmpws/logs/mvn_gen_archetype.log 2>&1 <<EOF
+org.openecomp.sdnc.app
+${appName}
+1.0.0-SNAPSHOT
+org.openecomp.sdnc.app
+Y
+EOF
+if [ "$?" == "0" ]
+then
+ echo "App created successfully"
+else
+ echo "App creation failed"
+fi
+${toolsDir}/update_app_impl_yang.sh "${appName}" $1
diff --git a/dgbuilder/tools/dot_to_json.js b/dgbuilder/tools/dot_to_json.js
new file mode 100644
index 0000000..7ff80e8
--- /dev/null
+++ b/dgbuilder/tools/dot_to_json.js
@@ -0,0 +1,138 @@
+var obj={};
+function dotToJson(str,value,obj){
+ //var objArr = path.split("."), part;
+ var objArr = str.split(".");
+ var prevStr;
+ var currObj;
+ var prevObj;
+ //console.log(str);
+ var isArray = false;
+ var prevObjIsArray = false;
+ for(var i=0;i<objArr.length -1;i++){
+ var subStr= objArr[i] ;
+ if(isArray){
+ prevObjIsArray = true;
+ }
+ isArray = false;
+ if(subStr.indexOf(']') == subStr.length -1){
+ subStr = subStr.substring(0,subStr.length -2);
+ isArray = true;
+ }
+ //console.log("subStr:" + subStr + isArray);
+ //console.dir(prevObj);
+ if(isArray){
+ if(i==0 && obj[subStr] == undefined ){
+ //console.log("i==0 && obj[subStr] ");
+ obj[subStr]=[];
+ }else if(i==0 && obj[subStr][0] == undefined ){
+ obj[subStr][0]={};
+ }else if(i==0 && obj[subStr][0] != undefined ){
+ currObj= obj[subStr][0];
+ }else{
+ if(i == 1){
+ //console.log("i==1 && obj[prevStr] ");
+ prevObj=obj[prevStr];
+ if(prevObj[subStr] != undefined && prevObj[subStr][0] == undefined){
+ prevObj[subStr] = [];
+ prevObj[subStr][0] = {};
+ currObj = prevObj[subStr][0];
+ }else if(prevObj[subStr] != undefined && prevObj[subStr][0] != undefined){
+ currObj = prevObj[subStr][0];
+ }else if(prevObj[subStr] == undefined){
+ prevObj[subStr] = [];
+ prevObj[subStr][0] = {};
+ currObj = prevObj[subStr][0];
+ }
+ }else{
+ if(prevObj[subStr] == undefined){
+ prevObj[subStr]=[];
+ prevObj[subStr][0]={};
+ currObj = prevObj[subStr][0];
+ }else{
+ currObj = prevObj[subStr][0];
+ }
+ }
+ }
+ }else{
+ if(i==0 && obj[subStr] == undefined ){
+ obj[subStr] = {};
+ currObj= obj[subStr];
+ }else if(i==0 && obj[subStr] != undefined ){
+ currObj=obj[subStr];
+ //console.log("in gkjgjkg");
+ }else{
+ if(i == 1){
+ prevObj=obj[prevStr];
+ if(prevObj[subStr] == undefined){
+ prevObj[subStr] = {};
+ currObj = prevObj[subStr];
+ }else{
+ currObj = prevObj[subStr];
+ }
+ }else{
+ if(prevObj[subStr] == undefined){
+ prevObj[subStr] = {};
+ currObj = prevObj[subStr];
+ }else{
+ currObj = prevObj[subStr];
+ }
+ }
+ }
+ }
+ prevStr=subStr;
+ if(i <objArr.length-2){
+ //console.dir(currObj);
+ prevObj=currObj;
+ }
+ }
+ var lastStr = objArr[objArr.length-1];
+ if(isArray){
+ currObj[lastStr] = value;
+ }else{
+ currObj[lastStr] = value;
+ }
+ //prevObj[lastStr] = value;
+ //console.dir(currObj);
+ return obj;
+}
+function printObj(obj){
+for( j in obj){
+ console.log(j + ":" + obj[j]);
+ if(typeof obj[j] == "object" ){
+ printObj(obj[j]);
+ }
+
+}
+}
+
+/*
+var nObj={};
+for(var i=0;i<a.length;i++){
+ dotToJson(a[i],'',nObj);
+}
+*/
+var sliValuesObj = require(process.argv[2]);
+var moduleName = process.argv[3];
+//console.dir(sliValuesObj);
+var a= sliValuesObj[moduleName + "_VALUES"];
+var rpcs= sliValuesObj[moduleName + "_RPCS"];
+var nObj={};
+nObj['moduleName'] = moduleName;
+console.log("module.exports = ");
+for(var i=0;i<a.length;i++){
+ var key =a[i].substring(0,a[i].indexOf(':'));
+ //console.log(key);
+ var value =a[i].substring(a[i].indexOf(':') +1);
+ if(value == undefined) value ="";
+ dotToJson(key,value,nObj);
+}
+
+nObj[moduleName + "_PROPS"] =[];
+for(var i=0;i<a.length;i++){
+ var key =a[i].substring(0,a[i].indexOf(':'));
+ nObj[moduleName + "_PROPS"].push(key);
+}
+
+nObj[moduleName + "_RPCS"] = rpcs;
+
+console.log(JSON.stringify(nObj,null,4));
diff --git a/dgbuilder/tools/format_json.sh b/dgbuilder/tools/format_json.sh
new file mode 100755
index 0000000..f86ad3c
--- /dev/null
+++ b/dgbuilder/tools/format_json.sh
@@ -0,0 +1,6 @@
+if [ "$#" != "1" ]
+then
+ echo "Usage: $0 jsonFileFullPath"
+ exit
+fi
+cat $1|python -m json.tool
diff --git a/dgbuilder/tools/format_xml.sh b/dgbuilder/tools/format_xml.sh
new file mode 100755
index 0000000..f0074e6
--- /dev/null
+++ b/dgbuilder/tools/format_xml.sh
@@ -0,0 +1,17 @@
+if [ "$#" != "1" ]
+then
+ echo "Usage: $0 xmlFileFullPath"
+ exit
+fi
+
+if [ -z "$PROJECT_HOME" ]
+then
+ export PROJECT_HOME=$(pwd)/..
+fi
+export CLASSPATH=$CLASSPATH:.
+if [ -e "$1" ]
+then
+ java FormatXml $1
+else
+ echo "File $1 does not exist"
+fi
diff --git a/dgbuilder/tools/generate_props_from_yang.sh b/dgbuilder/tools/generate_props_from_yang.sh
new file mode 100755
index 0000000..4ce93af
--- /dev/null
+++ b/dgbuilder/tools/generate_props_from_yang.sh
@@ -0,0 +1,28 @@
+if [ -z "$PROJECT_HOME" ]
+then
+ export PROJECT_HOME=$(pwd)/..
+fi
+
+toolsDir=$PROJECT_HOME/tools
+rm -rf ${toolsDir}/tmpws
+mkdir ${toolsDir}/tmpws
+mkdir ${toolsDir}/tmpws/logs
+if [ "$#" != "1" ]
+then
+ echo "Command line:$0 $*" >${toolsDir}/tmpws/logs/err.log
+ echo "Usage: $0 yangFile" >>${toolsDir}/tmpws/logs/err.log
+ exit
+fi
+
+appName="yangApp"
+cd ${toolsDir}/tmpws
+mvn archetype:generate -DarchetypeGroupId=com.brocade.developer -DarchetypeArtifactId=brocade.dev.plugin.ext.archetype -DarchetypeVersion=1.2.0.100-SNAPSHOT >${toolsDir}/tmpws/logs/mvn_gen_archetype.log 2>&1 <<EOF
+org.openecomp.sdnc.app
+${appName}
+1.0.0-SNAPSHOT
+org.openecomp.sdnc.app
+Y
+EOF
+${toolsDir}/update_app_impl_yang.sh "${appName}" $1
+echo "Done..."
+
diff --git a/dgbuilder/tools/generate_props_from_yangs.sh b/dgbuilder/tools/generate_props_from_yangs.sh
new file mode 100755
index 0000000..8867cea
--- /dev/null
+++ b/dgbuilder/tools/generate_props_from_yangs.sh
@@ -0,0 +1,28 @@
+if [ -z "$PROJECT_HOME" ]
+then
+ export PROJECT_HOME=$(pwd)/..
+fi
+
+toolsDir=$PROJECT_HOME/tools
+rm -rf ${toolsDir}/tmpws
+mkdir ${toolsDir}/tmpws
+mkdir ${toolsDir}/tmpws/logs
+if [ "$#" != "2" ]
+then
+ echo "Command line:$0 $*" >${toolsDir}/tmpws/logs/err.log
+ echo "Usage: $0 yangFilesdirectoryFullPath baseYangFile" >>${toolsDir}/tmpws/logs/err.log
+ exit
+fi
+
+appName="yangApp"
+cd ${toolsDir}/tmpws
+mvn archetype:generate -DarchetypeGroupId=com.brocade.developer -DarchetypeArtifactId=brocade.dev.plugin.ext.archetype -DarchetypeVersion=1.2.0.100-SNAPSHOT >${toolsDir}/tmpws/logs/mvn_gen_archetype.log 2>&1 <<EOF
+org.openecomp.sdnc.app
+${appName}
+1.0.0-SNAPSHOT
+org.openecomp.sdnc.app
+Y
+EOF
+${toolsDir}/update_app_impl_yangs.sh "${appName}" $1 $2
+echo "Done..."
+
diff --git a/dgbuilder/tools/generate_props_from_yangs_zip.sh b/dgbuilder/tools/generate_props_from_yangs_zip.sh
new file mode 100755
index 0000000..3960711
--- /dev/null
+++ b/dgbuilder/tools/generate_props_from_yangs_zip.sh
@@ -0,0 +1,36 @@
+if [ "$PROJECT_HOME" == "" ]
+then
+ export PROJECT_HOME=$(pwd)/..
+fi
+
+toolsDir=$PROJECT_HOME/tools
+if [ "$#" != "1" ]
+then
+ echo "Usage: $0 yangFilesZipFullPath"
+ exit
+fi
+yangFilesZipFullPath="$1"
+rm -rf $PROJECT_HOME/tools/tmp
+mkdir $PROJECT_HOME/tools/tmp
+mv ${yangFilesZipFullPath} $PROJECT_HOME/tools/tmp
+cd $PROJECT_HOME/tools/tmp
+zipFile=$(basename $yangFilesZipFullPath)
+unzip $PROJECT_HOME/tools/tmp/$zipFile
+rm ${zipFile}
+for i in $(ls *.yang)
+do
+ fName="$i"
+ extension="${fName##*.}"
+ moduleName="${fName%.*}"
+ count=$(grep -w "import $moduleName" *.yang|wc -l)
+ if [ "$count" -eq "0" ]
+ then
+ rm -rf $PROJECT_HOME/yangFiles/$moduleName
+ mkdir $PROJECT_HOME/yangFiles/$moduleName
+ mv *.yang $PROJECT_HOME/yangFiles/$moduleName
+ cd $PROJECT_HOME/tools
+ echo ./generate_props_from_yangs.sh "$PROJECT_HOME/yangFiles/$moduleName" "$fName"
+ ./generate_props_from_yangs.sh "$PROJECT_HOME/yangFiles/$moduleName" "$fName"
+ exit
+ fi
+done
diff --git a/dgbuilder/tools/getModuleName.sh b/dgbuilder/tools/getModuleName.sh
new file mode 100755
index 0000000..cf0db19
--- /dev/null
+++ b/dgbuilder/tools/getModuleName.sh
@@ -0,0 +1,2 @@
+module=$(cat $1|egrep "module .*{"|awk '{print $2}'|sed -e 's/{//g')
+echo $module
diff --git a/dgbuilder/tools/getRpcsClassFromYang.sh b/dgbuilder/tools/getRpcsClassFromYang.sh
new file mode 100755
index 0000000..d7fc213
--- /dev/null
+++ b/dgbuilder/tools/getRpcsClassFromYang.sh
@@ -0,0 +1,85 @@
+toolsDir=$PROJECT_HOME/tools
+. ${toolsDir}/setClasspath
+if [ "$#" != "2" ]
+then
+ echo "Usage $0 yang_file generated_jar_file"
+ echo "example $0 /home/users/sdnc/src/aic-homing/model/src/main/yang/AicHoming.yang /home/users/sdnc/src/aic-homing/model/target/aicHoming.model-2.0.0.jar"
+ exit
+fi
+yangFile="$1"
+jarFile="$2"
+module=$(cat $yangFile|egrep "module .*{"|awk '{print $2}'|sed -e 's/{//g')
+#echo " \"$module\" : ["
+rpcs=$(grep rpc $yangFile|grep -v leaf|sed -e 's/^\s\+rpc//g'|awk '{print $1}')
+#echo ${rpcs}
+for i in `find ${toolsDir}/yangToolsJars -name "*.jar" -print`
+do
+#echo $i
+export CLASSPATH=$CLASSPATH:$i
+done
+export CLASSPATH=$2:$CLASSPATH:.:${toolsDir}/slf4j-api-1.7.2.jar:${toolsDir}/guava-14.0.1.jar:${toolsDir}/printYangToProp.jar
+allProps=""
+for rpc in $rpcs
+do
+rpcVal=$(echo $rpc|sed -e "s/\b\(.\)/\u\1/g"|sed s/\-//g)
+className=$(jar -tvf ${jarFile}|grep "org/opendaylight/yang/gen/"|grep -w "${rpcVal}Input.class"|grep -v grep|awk '{print $NF}'|sed -e 's/\//./g'|sed -e 's/.class$//g')
+inputProps=""
+if [ "$className" != "" ]
+then
+ #java -cp $CLASSPATH PrintYangToProp $className 2>/dev/null|grep '*' |cut -d'*' -f2|sed -e "s/^[ \t]*//g"|sed -e "s/^/\t\t\"/g"|sed -e "s/$/\",/g"
+ inputProps=$(java -cp $CLASSPATH PrintYangToProp $className 2>${toolsDir}/tmpws/logs/err.log)
+fi
+className=$(jar -tvf ${jarFile}|grep "org/opendaylight/yang/gen/"|grep -w "${rpcVal}Output"|grep -v grep|awk '{print $NF}'|sed -e 's/\//./g'|sed -e 's/.class$//g')
+#echo $inputProps
+#echo $className
+outputProps=""
+if [ "$className" != "" ]
+then
+ #java -cp $CLASSPATH PrintYangToProp $className 2>/dev/null|grep '*' |cut -d'*' -f2|sed -e "s/^[ \t]*//g"|sed -e "s/^/\t\t\"/g"|sed -e "s/$/\",/g"
+ outputProps=$(java -cp $CLASSPATH PrintYangToProp $className 2>${toolsDir}/tmpws/logs/err.log)
+fi
+if [ -z "$allProps" ]
+then
+ allProps=$(echo ${inputProps}${outputProps}|sed -e s/,$//g)
+else
+ allProps=$(echo ${allProps},${inputProps}${outputProps}|sed -e s/,$//g)
+fi
+done
+#allProps=$(echo ${inputProps}${outputProps}|sed -e s/,$//g)
+#echo $allProps
+#OIFS=$IFS
+#IFS=','
+#arr2=$allProps
+#for x in $arr2
+#do
+# echo "$x"
+#done
+#IFS=$OIFS
+#echo " ]"
+echo "module.exports = {"
+echo "\"moduleName\" : \"${module}\","
+echo "'${module}_VALUES' : "
+echo "[ $allProps ]"|python -m json.tool
+echo ","
+echo "'${module}_RPCS' : ["
+
+cnt=0
+#numOfRpcs=${#rpcs[@]}
+numOfRpcs=0;
+for rpc in $rpcs
+do
+ numOfRpcs=$((numOfRpcs+1))
+done
+
+for rpc in $rpcs
+do
+ cnt=$((cnt+1))
+ if [ $cnt -eq $numOfRpcs ]
+ then
+ echo " \"$rpc\""
+ else
+ echo " \"$rpc\","
+ fi
+done
+echo " ]"
+echo "}"
diff --git a/dgbuilder/tools/getRpcsClassFromYangs.sh b/dgbuilder/tools/getRpcsClassFromYangs.sh
new file mode 100755
index 0000000..f3ce4c8
--- /dev/null
+++ b/dgbuilder/tools/getRpcsClassFromYangs.sh
@@ -0,0 +1,85 @@
+toolsDir=$PROJECT_HOME/tools
+. ${toolsDir}/setClasspath
+if [ "$#" != "2" ]
+then
+ echo "Usage $0 yang_file generated_jar_file"
+ echo "example $0 /home/users/sdnc/src/appName/model/src/main/yang/app.yang /home/users/sdnc/src/appName/model/target/appName.model-2.0.0.jar"
+ exit
+fi
+yangFile="$1"
+jarFile="$2"
+module=$(cat $yangFile|egrep "module .*{"|awk '{print $2}'|sed -e 's/{//g')
+#echo " \"$module\" : ["
+rpcs=$(grep rpc $yangFile|grep -v leaf|sed -e 's/^\s\+rpc//g'|awk '{print $1}')
+for i in `find ${toolsDir}/yangToolsJars -name "*.jar" -print`
+do
+#echo $i
+export CLASSPATH=$CLASSPATH:$i
+done
+export CLASSPATH=$2:$CLASSPATH:.:${toolsDir}/slf4j-api-1.7.2.jar:${toolsDir}/guava-14.0.1.jar:${toolsDir}/printYangToProp.jar
+allProps=""
+for rpc in $rpcs
+do
+rpcVal=$(echo $rpc|sed -e "s/\b\(.\)/\u\1/g"|sed s/\-//g)
+#echo $rpcVal
+className=$(jar -tvf ${jarFile}|grep "org/opendaylight/yang/gen/"|grep -w "${rpcVal}Input.class"|grep -v grep|awk '{print $NF}'|sed -e 's/\//./g'|sed -e 's/.class$//g')
+#echo $className
+inputProps=""
+if [ "$className" != "" ]
+then
+ #java -cp $CLASSPATH PrintYangToProp $className 2>/dev/null|grep '*' |cut -d'*' -f2|sed -e "s/^[ \t]*//g"|sed -e "s/^/\t\t\"/g"|sed -e "s/$/\",/g"
+ inputProps=$(java -cp $CLASSPATH PrintYangToProp $className 2>${toolsDir}/tmpws/logs/err.log)
+fi
+className=$(jar -tvf ${jarFile}|grep "org/opendaylight/yang/gen/"|grep -w "${rpcVal}Output"|grep -v grep|awk '{print $NF}'|sed -e 's/\//./g'|sed -e 's/.class$//g')
+#echo $inputProps
+#echo $className
+outputProps=""
+if [ "$className" != "" ]
+then
+ #java -cp $CLASSPATH PrintYangToProp $className 2>/dev/null|grep '*' |cut -d'*' -f2|sed -e "s/^[ \t]*//g"|sed -e "s/^/\t\t\"/g"|sed -e "s/$/\",/g"
+ outputProps=$(java -cp $CLASSPATH PrintYangToProp $className 2>${toolsDir}/tmpws/logs/err.log)
+fi
+if [ -z "$allProps" ]
+then
+ allProps=$(echo ${inputProps}${outputProps}|sed -e s/,$//g)
+else
+ allProps=$(echo ${allProps},${inputProps}${outputProps}|sed -e s/,$//g)
+fi
+done
+#echo $allProps
+#OIFS=$IFS
+#IFS=','
+#arr2=$allProps
+#for x in $arr2
+#do
+# echo "$x"
+#done
+#IFS=$OIFS
+#echo " ]"
+echo "module.exports = {"
+echo "\"moduleName\" : \"${module}\","
+echo "'${module}_VALUES' : "
+echo "[ $allProps ]"|python -m json.tool
+echo ","
+echo "'${module}_RPCS' : ["
+
+cnt=0
+#numOfRpcs=${#rpcs[@]}
+numOfRpcs=0;
+for rpc in $rpcs
+do
+ numOfRpcs=$((numOfRpcs+1))
+done
+
+for rpc in $rpcs
+do
+ cnt=$((cnt+1))
+ if [ $cnt -eq $numOfRpcs ]
+ then
+ echo " \"$rpc\""
+ else
+ echo " \"$rpc\","
+ fi
+done
+echo " ]"
+echo "}"
diff --git a/dgbuilder/tools/guava-14.0.1.jar b/dgbuilder/tools/guava-14.0.1.jar
new file mode 100644
index 0000000..3a3d925
--- /dev/null
+++ b/dgbuilder/tools/guava-14.0.1.jar
Binary files differ
diff --git a/dgbuilder/tools/javax.json-api-1.0.jar b/dgbuilder/tools/javax.json-api-1.0.jar
new file mode 100644
index 0000000..d276c79
--- /dev/null
+++ b/dgbuilder/tools/javax.json-api-1.0.jar
Binary files differ
diff --git a/dgbuilder/tools/jsonTool.js b/dgbuilder/tools/jsonTool.js
new file mode 100644
index 0000000..b4ed21f
--- /dev/null
+++ b/dgbuilder/tools/jsonTool.js
@@ -0,0 +1,377 @@
+var obj={};
+function dotToJson(str,value,obj){
+ //var objArr = path.split("."), part;
+ var objArr = str.split(".");
+ var prevStr;
+ var currObj;
+ var prevObj;
+ //console.log(str);
+ var isArray = false;
+ var prevObjIsArray = false;
+ for(var i=0;i<objArr.length -1;i++){
+ var subStr= objArr[i] ;
+ if(isArray){
+ prevObjIsArray = true;
+ }
+ isArray = false;
+ if(subStr.indexOf(']') == subStr.length -1){
+ subStr = subStr.substring(0,subStr.length -2);
+ isArray = true;
+ }
+ //console.log("subStr:" + subStr + isArray);
+ //console.dir(prevObj);
+ if(isArray){
+ if(i==0 && obj[subStr] == undefined ){
+ //console.log("i==0 && obj[subStr] ");
+ obj[subStr]=[];
+ }else if(i==0 && obj[subStr][0] == undefined ){
+ obj[subStr][0]={};
+ }else if(i==0 && obj[subStr][0] != undefined ){
+ currObj= obj[subStr][0];
+ }else{
+ if(i == 1){
+ //console.log("i==1 && obj[prevStr] ");
+ prevObj=obj[prevStr];
+ if(prevObj[subStr][0] == undefined){
+ prevObj[subStr] = [];
+ prevObj[subStr][0] = {};
+ currObj = prevObj[subStr][0];
+ }else{
+ currObj = prevObj[subStr][0];
+ }
+ }else{
+ if(prevObj[subStr] == undefined){
+ prevObj[subStr]=[];
+ prevObj[subStr][0]={};
+ currObj = prevObj[subStr][0];
+ }else{
+ currObj = prevObj[subStr][0];
+ }
+ }
+ }
+ }else{
+ if(i==0 && obj[subStr] == undefined ){
+ obj[subStr] = {};
+ currObj= obj[subStr];
+ }else if(i==0 && obj[subStr] != undefined ){
+ currObj=obj[subStr];
+ //console.log("in gkjgjkg");
+ }else{
+ if(i == 1){
+ prevObj=obj[prevStr];
+ if(prevObj[subStr] == undefined){
+ prevObj[subStr] = {};
+ currObj = prevObj[subStr];
+ }else{
+ currObj = prevObj[subStr];
+ }
+ }else{
+ if(prevObj[subStr] == undefined){
+ prevObj[subStr] = {};
+ currObj = prevObj[subStr];
+ }else{
+ currObj = prevObj[subStr];
+ }
+ }
+ }
+ }
+ prevStr=subStr;
+ if(i <objArr.length-2){
+ //console.dir(currObj);
+ prevObj=currObj;
+ }
+ }
+ var lastStr = objArr[objArr.length-1];
+ if(isArray){
+ currObj[lastStr] = value;
+ }else{
+ currObj[lastStr] = value;
+ }
+ //prevObj[lastStr] = value;
+ //console.dir(currObj);
+ return obj;
+}
+function printObj(obj){
+for( j in obj){
+ console.log(j + ":" + obj[j]);
+ if(typeof obj[j] == "object" ){
+ printObj(obj[j]);
+ }
+
+}
+}
+
+a=[
+'service-configuration-operation-input.service-information.service-instance-id',
+'service-configuration-operation-input.service-information.subscriber-name',
+'service-configuration-operation-input.service-information.service-type',
+'service-configuration-operation-input.svc-config-additional-data.management-ip',
+'service-configuration-operation-input.sdnc-request-header.svc-request-id',
+'service-configuration-operation-input.sdnc-request-header.svc-notification-url',
+'service-configuration-operation-input.sdnc-request-header.svc-action',
+'service-configuration-operation-input.vr-lan.routing-protocol',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-vr-lan-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].vr-designation',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-vr-lan-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-vr-lan-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-vr-lan-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-defaulted-v6-vrlan',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-vce-loopback-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-vce-wan-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-server-enabled',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-server-enabled',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].use-v4-default-pool',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-default-pool-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-default-pool-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].excluded-v4-dhcp-addresses-from-default-pool[].excluded-v4-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].excluded-v4-dhcp-addresses-from-default-pool[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].use-v6-default-pool',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-default-pool-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-default-pool-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].excluded-v6-dhcp-addresses-from-default-pool[].excluded-v6-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].excluded-v6-dhcp-addresses-from-default-pool[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].v6-dhcp-pool-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].v6-dhcp-pool-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].v6-dhcp-relay-gateway-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].v6-dhcp-relay-next-hop-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].excluded-v6-addresses[].excluded-v6-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].excluded-v6-addresses[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].v4-dhcp-relay-next-hop-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].v4-dhcp-pool-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].v4-dhcp-pool-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].v4-dhcp-relay-gateway-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].excluded-v4-addresses[].excluded-v4-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].excluded-v4-addresses[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-nat-enabled',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-nat-mapping-entries[].v4-nat-internal',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-nat-mapping-entries[].v4-nat-next-hop-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-nat-mapping-entries[].v4-nat-external',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-nat-mapping-entries[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v6-lan-public-prefixes[].request-index',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v6-lan-public-prefixes[].v6-next-hop-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v6-lan-public-prefixes[].v6-lan-public-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v6-lan-public-prefixes[].v6-lan-public-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v6-lan-public-prefixes[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v4-lan-public-prefixes[].request-index',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v4-lan-public-prefixes[].v4-lan-public-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v4-lan-public-prefixes[].v4-next-hop-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v4-lan-public-prefixes[].v4-lan-public-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v4-lan-public-prefixes[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-static-routes[].v6-static-route-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-static-routes[].v6-next-hop-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-static-routes[].v6-static-route-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-static-routes[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-static-routes[].v4-static-route-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-static-routes[].v4-next-hop-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-static-routes[].v4-static-route-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-static-routes[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-enabled',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-default-pool-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].use-v4-default-pool',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-default-pool-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-pools[].v4-pat-pool-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-pools[].v4-pat-pool-next-hop-address',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-pools[].v4-pat-pool-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-pools[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].v6-firewall-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].v6-firewall-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].allow-icmp-ping',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].udp-port-list[].port-number',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].udp-port-list[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].tcp-port-list[].port-number',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].tcp-port-list[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].stateful-firewall-lite-v4-enabled',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].stateful-firewall-lite-v6-enabled',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].allow-icmp-ping',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].udp-port-list[].port-number',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].udp-port-list[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].tcp-port-list[].port-number',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].tcp-port-list[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].v4-firewall-prefix',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].v4-firewall-prefix-length',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].key',
+'service-configuration-operation-input.vr-lan.vr-lan-interface[].key',
+'service-configuration-operation-input.internet-evc-access-information.internet-evc-speed-value',
+'service-configuration-operation-input.internet-evc-access-information.ip-version',
+'service-configuration-operation-input.internet-evc-access-information.internet-evc-speed-units',
+'service-configuration-operation-input.l2-homing-information.preferred-aic-clli',
+'service-configuration-operation-input.l2-homing-information.evc-name',
+'service-configuration-operation-input.l2-homing-information.topology',
+'service-configuration-operation-input.internet-service-change-details.internet-evc-speed-value',
+'service-configuration-operation-input.internet-service-change-details.internet-evc-speed-units',
+'service-configuration-operation-input.internet-service-change-details.t-provided-v4-lan-public-prefixes[].request-index',
+'service-configuration-operation-input.internet-service-change-details.t-provided-v4-lan-public-prefixes[].v4-lan-public-prefix',
+'service-configuration-operation-input.internet-service-change-details.t-provided-v4-lan-public-prefixes[].v4-lan-public-prefix-length',
+'service-configuration-operation-input.internet-service-change-details.t-provided-v4-lan-public-prefixes[].key',
+'service-configuration-operation-input.internet-service-change-details.t-provided-v6-lan-public-prefixes[].request-index',
+'service-configuration-operation-input.internet-service-change-details.t-provided-v6-lan-public-prefixes[].v6-lan-public-prefix',
+'service-configuration-operation-input.internet-service-change-details.t-provided-v6-lan-public-prefixes[].v6-lan-public-prefix-length',
+'service-configuration-operation-input.internet-service-change-details.t-provided-v6-lan-public-prefixes[].key'
+];
+
+a=[
+ "service-configuration-operation-input.sdnc-request-header.svc-notification-url",
+ "service-configuration-operation-input.sdnc-request-header.svc-request-id",
+ "service-configuration-operation-input.sdnc-request-header.svc-action",
+ "service-configuration-operation-input.vpe-vpn-service.route-target",
+ "service-configuration-operation-input.vpe-vpn-service.e2e-vpn-key",
+ "service-configuration-operation-input.vpe-vpn-service.vpn-id",
+ "service-configuration-operation-input.vpe-vpn-service.vpn-vame",
+ "service-configuration-operation-input.vpe-vpn-service.spoke-routes.route-target",
+ "service-configuration-operation-input.vpe-vpn-service.spoke-routes.max-threshold",
+ "service-configuration-operation-input.vpe-vpn-service.spoke-routes.max-routes-limit",
+ "service-configuration-operation-input.vpe-vpn-service.v4-max-routes.max-routes-limit-warning",
+ "service-configuration-operation-input.vpe-vpn-service.v4-max-routes.max-routes-limit",
+ "service-configuration-operation-input.vpe-vpn-service.v6-max-routes.max-routes-limit-warning",
+ "service-configuration-operation-input.vpe-vpn-service.v6-max-routes.max-routes-limit",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-multicast-planned-region[].regions",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-multicast-planned-region[].key",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-v4-multicast-enabled",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.max-routes-limit-warning",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.max-routes-limit",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-data-mdt",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].rp-address",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].c-groups[].group-address-prefix-length",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].c-groups[].c-group-address-prefix",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].c-groups[].key",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].key",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-sm-static-override",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-default-range",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-groups[].v4-pim-ssm-group-address",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-groups[].v4-pim-ssm-group-address-prefix-length",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-groups[].key",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-default-mdt",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-data-mdt-wildcard-mask",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-v6-multicast-enabled",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.max-routes-limit-warning",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.max-routes-limit",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].rp-address",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].c-groups[].group-address-prefix-length",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].c-groups[].c-group-address-prefix",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].c-groups[].key",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].key",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-sm-static-override",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-default-range",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-groups[].v6-pim-ssm-group-address",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-groups[].v6-pim-ssm-group-address-prefix-length",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-groups[].key",
+ "service-configuration-operation-input.vpe-vpn-service.customer-id",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].router-distinguisher",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vpe-name",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-import-details[].vrf-import",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-import-details[].key",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].member",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].name",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-name",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-export-details[].vrf-export",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-export-details[].key",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].apply-group-template[].apply-group",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].apply-group-template[].key",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].key",
+ "service-configuration-operation-input.service-information.subscriber-name",
+ "service-configuration-operation-input.service-information.subscriber-global-id",
+ "service-configuration-operation-input.service-information.service-type",
+ "service-configuration-operation-input.service-information.service-instance-id",
+ "service-configuration-operation-input.request-information.notification-url",
+ "service-configuration-operation-input.request-information.order-number",
+ "service-configuration-operation-input.request-information.order-version",
+ "service-configuration-operation-input.request-information.request-action",
+ "service-configuration-operation-input.request-information.request-sub-action",
+ "service-configuration-operation-input.request-information.source",
+ "service-configuration-operation-input.request-information.request-id",
+ "service-configuration-operation-output.configuration-response-common.svc-request-id",
+ "service-configuration-operation-output.configuration-response-common.response-message",
+ "service-configuration-operation-output.configuration-response-common.ack-final-indicator",
+ "service-configuration-operation-output.configuration-response-common.response-code"
+];
+var nObj={};
+for(var i=0;i<a.length;i++){
+ dotToJson(a[i],'',nObj);
+}
+var a = [
+ "service-configuration-operation-input.sdnc-request-header.svc-notification-url:String",
+ "service-configuration-operation-input.sdnc-request-header.svc-request-id:String",
+ "service-configuration-operation-input.sdnc-request-header.svc-action:Enum:[Createupdatevpn]",
+ "service-configuration-operation-input.vpe-vpn-service.route-target:String",
+ "service-configuration-operation-input.vpe-vpn-service.e2e-vpn-key:String",
+ "service-configuration-operation-input.vpe-vpn-service.vpn-id:Integer",
+ "service-configuration-operation-input.vpe-vpn-service.vpn-vame:String",
+ "service-configuration-operation-input.vpe-vpn-service.spoke-routes.route-target:String",
+ "service-configuration-operation-input.vpe-vpn-service.spoke-routes.max-threshold:Short",
+ "service-configuration-operation-input.vpe-vpn-service.spoke-routes.max-routes-limit:BigInteger",
+ "service-configuration-operation-input.vpe-vpn-service.v4-max-routes.max-routes-limit-warning:Short",
+ "service-configuration-operation-input.vpe-vpn-service.v4-max-routes.max-routes-limit:BigInteger",
+ "service-configuration-operation-input.vpe-vpn-service.v6-max-routes.max-routes-limit-warning:Short",
+ "service-configuration-operation-input.vpe-vpn-service.v6-max-routes.max-routes-limit:BigInteger",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-multicast-planned-region[].regions:Enum:[EMEA, US, AP, LA, Canada]",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-multicast-planned-region[].key:Identifier",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-v4-multicast-enabled:Enum:[Y, N]",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.max-routes-limit-warning:Short",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.max-routes-limit:BigInteger",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-data-mdt:Ipv4Address",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].rp-address:Ipv4Address",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].c-groups[].group-address-prefix-length:Short",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].c-groups[].c-group-address-prefix:Ipv4Address",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].c-groups[].key:Identifier",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].key:Identifier",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-sm-static-override:Enum:[Y, N]",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-default-range:Enum:[Y, N]",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-groups[].v4-pim-ssm-group-address:Ipv4Address",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-groups[].v4-pim-ssm-group-address-prefix-length:Short",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-groups[].key:Identifier",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-default-mdt:Ipv4Address",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-data-mdt-wildcard-mask:Ipv4Address",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-v6-multicast-enabled:Enum:[Y, N]",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.max-routes-limit-warning:Short",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.max-routes-limit:BigInteger",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].rp-address:Ipv6Address",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].c-groups[].group-address-prefix-length:Short",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].c-groups[].c-group-address-prefix:Ipv6Address",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].c-groups[].key:Identifier",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].key:Identifier",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-sm-static-override:Enum:[Y, N]",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-default-range:Enum:[Y, N]",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-groups[].v6-pim-ssm-group-address:Ipv6Address",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-groups[].v6-pim-ssm-group-address-prefix-length:Short",
+ "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-groups[].key:Identifier",
+ "service-configuration-operation-input.vpe-vpn-service.customer-id:String",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].router-distinguisher:String",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vpe-name:String",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-import-details[].vrf-import:String",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-import-details[].key:Identifier",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].member:String",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].name:String",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-name:String",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-export-details[].vrf-export:String",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-export-details[].key:Identifier",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].apply-group-template[].apply-group:String",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].apply-group-template[].key:Identifier",
+ "service-configuration-operation-input.vpe-vpn-service.vrf-details[].key:Identifier",
+ "service-configuration-operation-input.service-information.subscriber-name:String",
+ "service-configuration-operation-input.service-information.subscriber-global-id:String",
+ "service-configuration-operation-input.service-information.service-type:Enum:[NBIPVPN]",
+ "service-configuration-operation-input.service-information.service-instance-id:String",
+ "service-configuration-operation-input.request-information.notification-url:String",
+ "service-configuration-operation-input.request-information.order-number:String",
+ "service-configuration-operation-input.request-information.order-version:String",
+ "service-configuration-operation-input.request-information.request-action:Enum:[Layer3ServiceVPNRequest]",
+ "service-configuration-operation-input.request-information.request-sub-action:Enum:[ACTIVATE, COMPLETE, CANCEL, SUPP]",
+ "service-configuration-operation-input.request-information.source:String",
+ "service-configuration-operation-input.request-information.request-id:String"
+]
+var nObj={};
+for(var i=0;i<a.length;i++){
+ var key =a[i].substring(0,a[i].indexOf(':'));
+ console.log(key);
+ var value =a[i].substring(a[i].indexOf(':') +1);
+ if(value == undefined) value ="";
+ dotToJson(key,value,nObj);
+}
+//nObj={};,
+//var a1='service-configuration-operation-input[].vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].v4-firewall-prefix-length';,
+ //dotToJson(a1,'',nObj);
+console.log(JSON.stringify(nObj,null,4));
+//console.log (stringToObj('abc.ebg.h',"",{}));
diff --git a/dgbuilder/tools/json_to_html b/dgbuilder/tools/json_to_html
new file mode 100644
index 0000000..51afe45
--- /dev/null
+++ b/dgbuilder/tools/json_to_html
@@ -0,0 +1,139 @@
+try{
+var jsonStr='{}';
+jsonObj=JSON.parse(jsonStr);
+var objectId =0;
+var level=0;
+var htmlStr=""
+htmlStr += "<html>";
+htmlStr += "<head>";
+htmlStr += "<script>";
+htmlStr += "function show(idVal){";
+htmlStr += " var val = \"<table border='1'>\" + document.getElementById(idVal).value + \"</table>\";";
+htmlStr += " document.getElementById('displayId').innerHTML = val;";
+htmlStr += "document.getElementById('displayId').style.display = \"block\";";
+//htmlStr += "alert(idVal);";
+//htmlStr += "alert(val);";
+htmlStr += "}";
+htmlStr += "</script>";
+htmlStr += "</head>";
+htmlStr += "<div id='displayId' style='display:none'></div>";
+htmlStr += "<div>\n<table border='1'>\n";
+printObjectValues(jsonObj,level);
+htmlStr += "\n</table>\n</div>";
+//var pattern = new RegExp("\\n","g");
+//htmlstr =htmlStr.replace(pattern,'');
+htmlStr += "</html>";
+console.log(htmlStr);
+
+function tabs(level){
+return '';
+}
+function tabsOrig(level){
+ var tabs="";
+ for(var i=0;i<level;i++){
+ tabs += "\t";
+ }
+ return tabs;
+}
+
+function printObjectValues(jsonObj,level){
+var output="";
+var objectHtmlStr="";
+try{
+for (var key in jsonObj) {
+//console.log(key +":" + jsonObj.hasOwnProperty(key));
+ if (jsonObj.hasOwnProperty(key)) {
+ var v = jsonObj[key];
+ if(typeof v === 'object' && Array.isArray(v) === false){
+ var idVal = objectId++;
+ level++;
+ objectHtmlStr += tabs(level) + "<div>\n" ;
+ objectHtmlStr += tabs(level+1 ) +"<table border='1'>\n" ;
+
+ var str=printObjectValues(v,level+2);
+ if(str != null && str != ''){
+ htmlStr += tabs(level+2) + objectHtmlStr + "<tr><td style='background-color:green'><a href=\"javascript:show('obj_" + idVal + "')\">" + key + "</a>\n";
+ htmlStr +="<input id='obj_" + idVal + "' type='hidden' value='" + str.trim() + "'>\n";
+ }
+
+ htmlStr += tabs(level+1) + "</table>\n" ;
+ htmlStr += tabs(level) + "</div>\n";
+ }else if(typeof v === 'object' && Array.isArray(v) === true){
+ var idVal = objectId++;
+ level++;
+ objectHtmlStr += tabs(level) + "<div>\n";
+ objectHtmlStr += tabs(level+1) + "<table border='1'>\n";
+
+ var str = printArrayValues(v,key,level+2);
+ if(str != null && str != ''){
+ htmlStr += tabs(level+2) + objectHtmlStr + "<tr><td style='background-color:blue'><a href=\"javascript:show('obj_" + idVal + "')\">" + key + "</a>\n";
+ htmlStr+="<input id='obj_" + objectId + "' type='hidden' value='" + str.trim() + "'>\n";
+ }
+
+ htmlStr += tabs(level+1) + "</table>\n" ;
+ htmlStr += tabs(level) + "</div>\n";
+ }else{
+ output += tabs(level) +"<tr><td>" + key + "</td><td>" + printValue(v) + "</td></tr>\n";
+ }
+ }
+}
+}catch(err){
+ console.log(err);
+}
+return output;
+}
+
+}catch(err){
+console.log( err );
+}
+
+function printArrayValues(arrObj,key,level){
+var output ="";
+var arrayHtmlStr ="";
+try{
+ for(var i=0;arrObj != null && i<arrObj.length;i++){
+ var o=arrObj[i];
+ if(typeof o === 'object' && Array.isArray(o) === false){
+ var idVal = objectId++;
+ level++;
+ arrayHtmlStr += tabs(level) + "<div>\n" ;
+ arrayHtmlStr += tabs(level+1 ) +"<table border='1'>\n" ;
+
+ var str = printObjectValues(o,level+2);
+ if(str != null && str != ''){
+ htmlStr += tabs(level+2 ) + arrayHtmlStr + "<tr><td><a href=\"javascript:show('obj_" + idVal + "')\">" +key + "[" + i + "]" + "</a>\n";
+ htmlStr+="<input id='obj_" + idVal + "' type='hidden' value='" +str.trim() + "'>\n";
+ }
+ htmlStr += tabs(level+1) + "</table>\n";
+ htmlStr += tabs(level) + "</div>\n";
+ }else if(typeof o === 'object' && Array.isArray(v) === true){
+ var idVal = objectId++;
+ level++;
+ arrayHtmlStr += tabs(level) + "<div>\n" ;
+ arrayHtmlStr += tabs(level+1 ) +"<table border='1'>\n" ;
+
+ var str = printArrayValues(o,key,level);
+ if(str != null && str != ''){
+ htmlStr += tabs(level+2 ) + arrayHtmlStr + "<tr><td><a href=\"javascript:show('obj_" + idVal + "')\">Array</a>\n";
+ htmlStr+="<input id='obj_" + idVal + "' type='hidden' value='" +str.trim() + "'>\n";
+ }
+
+ htmlStr += tabs(level+1) + "</table>\n";
+ htmlStr += tabs(level) + "</div>\n";
+ }else{
+ output += tabs(level) + "<tr><td>" + printValue(o) + "</td></tr>\n";
+ }
+ }
+}catch(err){
+ console.log(err);
+}
+return output;
+}
+
+function printValue(obj){
+ if(obj != undefined){
+ return obj;
+ }else{
+ return "";
+ }
+}
diff --git a/dgbuilder/tools/json_to_html_table b/dgbuilder/tools/json_to_html_table
new file mode 100755
index 0000000..20c9cfe
--- /dev/null
+++ b/dgbuilder/tools/json_to_html_table
@@ -0,0 +1,144 @@
+try{
+var jsonStr='{}';
+jsonObj=JSON.parse(jsonStr);
+var htmlObj ={};
+var objectId =0;
+var level=0;
+var htmlStr=""
+htmlStr += "<html>";
+htmlStr += "<head>";
+htmlStr += "<script>";
+htmlStr += "function show(idVal){";
+htmlStr += " var val = \"<table border='1'>\" + document.getElementById(idVal).value + \"</table>\";";
+htmlStr += " document.getElementById('displayId').innerHTML = val;";
+htmlStr += "document.getElementById('displayId').style.display = \"block\";";
+//htmlStr += "alert(idVal);";
+//htmlStr += "alert(val);";
+htmlStr += "}";
+htmlStr += "</script>";
+htmlStr += "</head>";
+htmlStr += "<div id='displayId' style='display:none'></div>";
+htmlStr += "<div>\n<table border='1'>\n";
+console.log("<html><table border='1'>");
+printObjectValues(jsonObj,null,level);
+console.log("</table></html>");
+htmlStr += "\n</table>\n</div>";
+//var pattern = new RegExp("\\n","g");
+//htmlstr =htmlStr.replace(pattern,'');
+htmlStr += "</html>";
+//console.log(htmlStr);
+
+//console.dir(htmlObj);
+var keyObj={};
+for (var key in htmlObj) {
+ var idx = key.lastIndexOf(".");
+ if(idx != -1){
+ var str = key.substr(0,idx);
+ keyObj[str] ='';
+ }else{
+ keyObj[key] ='';
+ }
+ //console.log(str);
+}
+
+console.dir(keyObj);
+console.log("<ul>");
+for (var key in keyObj) {
+ console.log("<li>" + key + "</li>");
+}
+console.log("</ul>");
+
+function tabs(level){
+return '';
+}
+function tabsOrig(level){
+ var tabs="";
+ for(var i=0;i<level;i++){
+ tabs += "\t";
+ }
+ return tabs;
+}
+
+function printObjectValues(jsonObj,pkey,level){
+var output="";
+var objectHtmlStr="";
+try{
+for (var key in jsonObj) {
+ if (jsonObj.hasOwnProperty(key)) {
+ var v = jsonObj[key];
+ if(typeof v === 'object' && Array.isArray(v) === false){
+ var nkey="";
+ if(pkey != null){
+ nkey = pkey + "." + key;
+ }else{
+ nkey = key;
+ }
+ var str=printObjectValues(v,nkey,level+2);
+ }else if(typeof v === 'object' && Array.isArray(v) === true){
+ var nkey="";
+ if(pkey != null){
+ nkey = pkey + "." + key;
+ }else{
+ nkey = key;
+ }
+ var str = printArrayValues(v,nkey,level+2);
+ }else{
+ if(pkey != null){
+ //console.log(pkey + "." + key + ":" +printValue(v) );
+ console.log("<tr><td>" + pkey + "." + key + "</td><td>" +printValue(v) + "</td></tr>" );
+ htmlObj[pkey + "." + key ] = printValue(v);
+ }else{
+ //console.log( key + ":" +printValue(v) );
+ console.log("<tr><td>" + key + "</td><td>" +printValue(v) + "</td></tr>" );
+ htmlObj[key ] = printValue(v);
+ }
+ //printValue(v);
+ }
+ }
+}
+}catch(err){
+ console.log(err);
+}
+return output;
+}
+
+}catch(err){
+console.log( err );
+}
+
+function printArrayValues(arrObj,pkey,level){
+var output ="";
+var arrayHtmlStr ="";
+try{
+ for(var i=0;arrObj != null && i<arrObj.length;i++){
+ var o=arrObj[i];
+ if(typeof o === 'object' && Array.isArray(o) === false){
+ var nkey = pkey +"[" + i + "]" ;
+ var str = printObjectValues(o,nkey,level+2);
+ }else if(typeof o === 'object' && Array.isArray(v) === true){
+ var nkey = pkey +"[" + i + "]" ;
+ var str = printArrayValues(o,nkey,level);
+ }else{
+ console.log("<tr><td>" + pkey + "." + key + "</td><td>" +printValue(o) + "</td></tr>" );
+ htmlObj[pkey + "." + key ] = printValue(o);
+ //console.log(pkey + ":" +printValue(o) );
+ //output += tabs(level) + "<tr><td>" + printValue(o) + "</td></tr>\n";
+ }
+ }
+}catch(err){
+ console.log(err);
+}
+return output;
+}
+
+function printValue(obj){
+ if(obj != undefined){
+ if(typeof obj == 'string'){
+ return "'" + obj + "'";
+ }else{
+ return obj;
+ }
+ }else{
+ return "";
+ }
+}
diff --git a/dgbuilder/tools/json_to_prop b/dgbuilder/tools/json_to_prop
new file mode 100755
index 0000000..f8830f3
--- /dev/null
+++ b/dgbuilder/tools/json_to_prop
@@ -0,0 +1,116 @@
+try{
+var jsonStr='{}';
+jsonObj=JSON.parse(jsonStr);
+var htmlObj ={};
+var objectId =0;
+var level=0;
+var htmlStr=""
+htmlStr += "<html>";
+htmlStr += "<head>";
+htmlStr += "<script>";
+htmlStr += "function show(idVal){";
+htmlStr += " var val = \"<table border='1'>\" + document.getElementById(idVal).value + \"</table>\";";
+htmlStr += " document.getElementById('displayId').innerHTML = val;";
+htmlStr += "document.getElementById('displayId').style.display = \"block\";";
+//htmlStr += "alert(idVal);";
+//htmlStr += "alert(val);";
+htmlStr += "}";
+htmlStr += "</script>";
+htmlStr += "</head>";
+htmlStr += "<div id='displayId' style='display:none'></div>";
+htmlStr += "<div>\n<table border='1'>\n";
+printObjectValues(jsonObj,null,level);
+htmlStr += "\n</table>\n</div>";
+//var pattern = new RegExp("\\n","g");
+//htmlstr =htmlStr.replace(pattern,'');
+htmlStr += "</html>";
+//console.log(htmlStr);
+
+function tabs(level){
+return '';
+}
+function tabsOrig(level){
+ var tabs="";
+ for(var i=0;i<level;i++){
+ tabs += "\t";
+ }
+ return tabs;
+}
+
+function printObjectValues(jsonObj,pkey,level){
+var output="";
+var objectHtmlStr="";
+try{
+for (var key in jsonObj) {
+ if (jsonObj.hasOwnProperty(key)) {
+ var v = jsonObj[key];
+ if(typeof v === 'object' && Array.isArray(v) === false){
+ var nkey="";
+ if(pkey != null){
+ nkey = pkey + "." + key;
+ }else{
+ nkey = key;
+ }
+ var str=printObjectValues(v,nkey,level+2);
+ }else if(typeof v === 'object' && Array.isArray(v) === true){
+ var nkey="";
+ if(pkey != null){
+ nkey = pkey + "." + key;
+ }else{
+ nkey = key;
+ }
+ var str = printArrayValues(v,nkey,level+2);
+ }else{
+ if(pkey != null){
+ console.log(pkey + "." + key + ":" +printValue(v) );
+ }else{
+ console.log(key + ":" +printValue(v) );
+ }
+ //printValue(v);
+ }
+ }
+}
+}catch(err){
+ console.log(err);
+}
+return output;
+}
+
+}catch(err){
+console.log( err );
+}
+
+function printArrayValues(arrObj,pkey,level){
+var output ="";
+var arrayHtmlStr ="";
+try{
+ for(var i=0;arrObj != null && i<arrObj.length;i++){
+ var o=arrObj[i];
+ if(typeof o === 'object' && Array.isArray(o) === false){
+ var nkey = pkey +"[" + i + "]" ;
+ var str = printObjectValues(o,nkey,level+2);
+ }else if(typeof o === 'object' && Array.isArray(v) === true){
+ var nkey = pkey +"[" + i + "]" ;
+ var str = printArrayValues(o,nkey,level);
+ }else{
+ console.log(pkey + ":" +printValue(o) );
+ //output += tabs(level) + "<tr><td>" + printValue(o) + "</td></tr>\n";
+ }
+ }
+}catch(err){
+ console.log(err);
+}
+return output;
+}
+
+function printValue(obj){
+ if(obj != undefined){
+ if(typeof obj == 'string'){
+ return "'" + obj + "'";
+ }else{
+ return obj;
+ }
+ }else{
+ return "";
+ }
+}
diff --git a/dgbuilder/tools/module-provider-impl.yang b/dgbuilder/tools/module-provider-impl.yang
new file mode 100644
index 0000000..6205910
--- /dev/null
+++ b/dgbuilder/tools/module-provider-impl.yang
@@ -0,0 +1,61 @@
+module yangApp-provider-impl {
+
+ yang-version 1;
+ namespace "brocade:training:yangApp:provider:impl";
+ prefix "yangApp-provider-impl";
+
+ import config { prefix config; revision-date 2013-04-05; }
+ import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
+
+ description
+ "This module contains the base YANG definitions for
+ yangApp-provider impl implementation.";
+
+ revision "2014-05-23" {
+ description
+ "Initial revision.";
+ }
+
+ // This is the definition of the service implementation as a module identity.
+ identity yangApp-provider-impl {
+ base config:module-type;
+
+ // Specifies the prefix for generated java classes.
+ config:java-name-prefix yangAppProvider;
+ }
+
+ // Augments the 'configuration' choice node under modules/module.
+ // We consume the three main services, RPCs, DataStore, and Notifications
+ augment "/config:modules/config:module/config:configuration" {
+ case yangApp-provider-impl {
+ when "/config:modules/config:module/config:type = 'yangApp-provider-impl'";
+
+ container rpc-registry {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity mdsal:binding-rpc-registry;
+ }
+ }
+ }
+
+ container notification-service {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity mdsal:binding-notification-service;
+ }
+ }
+ }
+
+ container data-broker {
+ uses config:service-ref {
+ refine type {
+ mandatory false;
+ config:required-identity mdsal:binding-async-data-broker;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/dgbuilder/tools/module-provider-impl.yang.bak b/dgbuilder/tools/module-provider-impl.yang.bak
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dgbuilder/tools/module-provider-impl.yang.bak
diff --git a/dgbuilder/tools/output_js/.gitignore b/dgbuilder/tools/output_js/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/dgbuilder/tools/output_js/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/dgbuilder/tools/printYangProps.sh b/dgbuilder/tools/printYangProps.sh
new file mode 100755
index 0000000..7d1d0fa
--- /dev/null
+++ b/dgbuilder/tools/printYangProps.sh
@@ -0,0 +1,8 @@
+toolsDir=$PROJECT_HOME/tools
+. ${toolsDir}/setClasspath
+if [ "$#" != "1" ]
+then
+ echo "Usage $0 className_without_the_dot_class_ext"
+ exit
+fi
+ java PrintYangToProp $1
diff --git a/dgbuilder/tools/printYangToProp.jar b/dgbuilder/tools/printYangToProp.jar
new file mode 100644
index 0000000..01b7310
--- /dev/null
+++ b/dgbuilder/tools/printYangToProp.jar
Binary files differ
diff --git a/dgbuilder/tools/rs b/dgbuilder/tools/rs
new file mode 100755
index 0000000..3d92b62
--- /dev/null
+++ b/dgbuilder/tools/rs
@@ -0,0 +1,2 @@
+#replaces / with a .
+echo $1|sed -e s%/%.%g
diff --git a/dgbuilder/tools/setClasspath b/dgbuilder/tools/setClasspath
new file mode 100755
index 0000000..082d31a
--- /dev/null
+++ b/dgbuilder/tools/setClasspath
@@ -0,0 +1,10 @@
+toolsDir=${PROJECT_HOME}/tools
+export CLASSPATH=
+export CLASSPATH=${toolsDir}/guava-14.0.1.jar:$CLASSPATH
+export CLASSPATH=${toolsDir}/javax.json-api-1.0.jar:$CLASSPATH
+export CLASSPATH=${toolsDir}/slf4j-api-1.7.2.jar:$CLASSPATH
+
+for i in `find ${toolsDir}/tmpws/jars -name "*.jar" -print`
+do
+export CLASSPATH=$CLASSPATH:$i
+done
diff --git a/dgbuilder/tools/slf4j-api-1.7.2.jar b/dgbuilder/tools/slf4j-api-1.7.2.jar
new file mode 100644
index 0000000..1a88708
--- /dev/null
+++ b/dgbuilder/tools/slf4j-api-1.7.2.jar
Binary files differ
diff --git a/dgbuilder/tools/update_app_impl_yang.sh b/dgbuilder/tools/update_app_impl_yang.sh
new file mode 100755
index 0000000..9ae5610
--- /dev/null
+++ b/dgbuilder/tools/update_app_impl_yang.sh
@@ -0,0 +1,45 @@
+toolsDir=$PROJECT_HOME/tools
+appRootDir=$1
+yangFileFullPath=$2
+yangFile=$(basename $yangFileFullPath)
+
+if [ "$#" != "2" ]
+then
+ echo "Usage: $0 appRootDir yangModuleName example:$0 bwcal bwcal"
+ exit
+fi
+cd ${toolsDir}/tmpws
+#cp ${toolsDir}/module-provider-impl.yang ${toolsDir}/tmpws
+
+if [ ! -e "${toolsDir}/module-provider-impl.yang" ]
+then
+ echo "${toolsDir}/module-provider-impl.yang should exist"
+ exit
+fi
+
+#echo "appRootDir:$appRootDir"
+#echo "yangFileFullPath:$yangFileFullPath"
+#echo "yangFile:$yangFile"
+
+cp ${yangFileFullPath} ${appRootDir}/model/src/main/yang/${yangFile}
+if [ "$?" != "0" ]
+then
+ echo "Could not copy the yang file. Exiting ..."
+ exit
+fi
+
+moduleName=$(cat $yangFileFullPath|egrep "module .*{"|cut -d' ' -f2|cut -d'{' -f1)
+#echo $moduleName
+sed -i.bak s/\$MODULE/$1/g ${toolsDir}/module-provider-impl.yang
+cp ${toolsDir}/module-provider-impl.yang ${appRootDir}/provider/src/main/yang/${appRootDir}-provider-impl.yang
+cd $appRootDir
+mvn clean install >${toolsDir}/tmpws/logs/mvn_install.log 2>&1
+mkdir ${toolsDir}/tmpws/jars
+cp ./model/target/${appRootDir}.model-1.0.0-SNAPSHOT.jar ${toolsDir}/tmpws/jars
+
+mv ${toolsDir}/output_js/${moduleName}_inputs.js ${toolsDir}/output_js/${moduleName}_inputs_prev.js >/dev/null 2>&1
+
+${toolsDir}/getRpcsClassFromYang.sh ${yangFileFullPath} ${toolsDir}/tmpws/${appRootDir}/model/target/${appRootDir}.model-1.0.0-SNAPSHOT.jar > ${toolsDir}/output_js/${moduleName}.js
+
+node ${toolsDir}/dot_to_json.js ${toolsDir}/output_js/${moduleName}.js $moduleName >${toolsDir}/output_js/${moduleName}_inputs.js
+cp ${toolsDir}/output_js/${moduleName}_inputs.js $PROJECT_HOME/generatedJS
diff --git a/dgbuilder/tools/update_app_impl_yangs.sh b/dgbuilder/tools/update_app_impl_yangs.sh
new file mode 100755
index 0000000..612f97d
--- /dev/null
+++ b/dgbuilder/tools/update_app_impl_yangs.sh
@@ -0,0 +1,51 @@
+toolsDir=$PROJECT_HOME/tools
+appRootDir=$1
+yangFilesDirFullPath=$2
+baseYangFile=$3
+
+#echo ${appRootDir}
+#echo ${yangFilesDirFullPath}
+#echo ${baseYangFile}
+if [ "$#" -lt "3" ]
+then
+ echo "Usage: $0 appRootDir yangFilesDirectoryFullPath baseYangFile example:$0 asdcApi /home/brocade/sdnc/asdcApi ASDC-API.yang"
+ exit
+fi
+cd ${toolsDir}/tmpws
+#cp ${toolsDir}/module-provider-impl.yang ${toolsDir}/tmpws
+
+if [ ! -e "${toolsDir}/module-provider-impl.yang" ]
+then
+ echo "module-provider-impl.yang should exist in the current directory"
+ exit
+fi
+
+#echo "appRootDir:$appRootDir"
+#echo "yangFileFullPath:$yangFileFullPath"
+#echo "yangFile:$yangFile"
+cp ${yangFilesDirFullPath}/*.yang ${appRootDir}/model/src/main/yang
+if [ "$?" != "0" ]
+then
+ echo "Could not copy the yang file. Exiting ..."
+ exit
+fi
+
+moduleName=$(cat ${yangFilesDirFullPath}/${baseYangFile}|egrep "module .*{"|cut -d' ' -f2|cut -d'{' -f1)
+sed -i.bak s/\$MODULE/$1/g ${toolsDir}/module-provider-impl.yang
+cp ${toolsDir}/module-provider-impl.yang ${appRootDir}/provider/src/main/yang/${appRootDir}-provider-impl.yang
+cd $appRootDir
+mvn clean install >${toolsDir}/tmpws/logs/mvn_install.log 2>&1
+if [ "$?" != "0" ]
+then
+ echo "mvn compile failed"
+ exit 1
+fi
+mkdir ${toolsDir}/tmpws/jars
+cp ./model/target/${appRootDir}.model-1.0.0-SNAPSHOT.jar ${toolsDir}/tmpws/jars
+
+mv ${toolsDir}/output_js/${moduleName}.js ${toolsDir}/output_js/${moduleName}.js_prev >/dev/null 2>&1
+${toolsDir}/getRpcsClassFromYangs.sh ${yangFilesDirFullPath}/${baseYangFile} ${toolsDir}/tmpws/${appRootDir}/model/target/${appRootDir}.model-1.0.0-SNAPSHOT.jar > ${toolsDir}/output_js/${moduleName}.js
+
+mv ${toolsDir}/output_js/${moduleName}_inputs.js ${toolsDir}/output_js/${moduleName}_inputs_prev.js >/dev/null 2>&1
+node ${toolsDir}/dot_to_json.js ${toolsDir}/output_js/${moduleName}.js $moduleName >>${toolsDir}/output_js/${moduleName}_inputs.js
+cp ${toolsDir}/output_js/${moduleName}_inputs.js $PROJECT_HOME/generatedJS
diff --git a/dgbuilder/yangFiles/.gitignore b/dgbuilder/yangFiles/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/dgbuilder/yangFiles/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/example-settings.xml b/example-settings.xml
new file mode 100644
index 0000000..2e7ce64
--- /dev/null
+++ b/example-settings.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=2 tabstop=2: -->
+<!--
+ Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+ <profiles>
+ <profile>
+ <id>openecomp-release</id>
+ <repositories>
+ <repository>
+ <id>openecomp-release</id>
+ <name>openecomp-release</name>
+ <url>https://ecomp-nexus:8443/repository/maven-releases/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>openecomp-release</id>
+ <name>openecomp-release</name>
+ <url>https://ecomp-nexus:8443/repository/maven-releases/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+
+ <profile>
+ <id>openecomp-snapshots</id>
+ <repositories>
+ <repository>
+ <id>openecomp-snapshot</id>
+ <name>openecomp-snapshot</name>
+ <url>https://ecomp-nexus:8443/repository/maven-snapshots/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>openecomp-snapshot</id>
+ <name>openecomp-snapshot</name>
+ <url>https://ecomp-nexus:8443/repository/maven-snapshots/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ <profile>
+ <id>opendaylight-release</id>
+ <repositories>
+ <repository>
+ <id>opendaylight-mirror</id>
+ <name>opendaylight-mirror</name>
+ <url>https://nexus.opendaylight.org/content/repositories/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>opendaylight-mirror</id>
+ <name>opendaylight-mirror</name>
+ <url>https://nexus.opendaylight.org/content/repositories/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+
+ <profile>
+ <id>opendaylight-snapshots</id>
+ <repositories>
+ <repository>
+ <id>opendaylight-snapshot</id>
+ <name>opendaylight-snapshot</name>
+ <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>opendaylight-snapshot</id>
+ <name>opendaylight-snapshot</name>
+ <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <activeProfile>openecomp-release</activeProfile>
+ <activeProfile>openecomp-snapshots</activeProfile>
+ <activeProfile>opendaylight-release</activeProfile>
+ <activeProfile>opendaylight-snapshots</activeProfile>
+ </activeProfiles>
+
+ <servers>
+ <server>
+ <id>nexus</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>openecomp-release</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>openecomp-snapshot</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ </servers>
+</settings>
diff --git a/installation/admportal/pom.xml b/installation/admportal/pom.xml
new file mode 100644
index 0000000..495a7fd
--- /dev/null
+++ b/installation/admportal/pom.xml
@@ -0,0 +1,197 @@
+<?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/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>installation</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>installation-admportal</artifactId>
+ <version>1.0.0</version>
+
+ <name>Installation - admportal</name>
+ <description>Creates admportal Docker container</description>
+
+ <properties>
+ <image.name>ecomp/admportal-sdnc-image</image.name>
+ </properties>
+
+
+ <build>
+ <plugins>
+
+
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.16.5</version>
+ <inherited>false</inherited>
+ <configuration>
+
+ <images>
+ <image>
+ <name>${image.name}</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+ <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
+ <tags>
+ <tag>${project.version}</tag>
+ <tag>latest</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-images</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-dockerfile</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/docker</directory>
+ <includes>
+ <include>Dockerfile</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-properties</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</outputDirectory>
+ <resources>
+ <resource>
+ <directory>../src/main/properties</directory>
+ <includes>
+ <include>*.properties</include>
+ <include>*.properties.sdnctldb01</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>exec-maven-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <executions>
+ <execution>
+ <id>Unzip admportal</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/usr/bin/unzip</executable>
+ <arguments>
+ <argument>-d</argument>
+ <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
+ <argument>../../admportal/target/*.zip</argument>
+ </arguments>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>Copy admportal config</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/bin/cp</executable>
+ <arguments>
+ <argument>../../admportal/config/admportal.json</argument>
+ <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</argument>
+ </arguments>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>Copy admportal config1</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/bin/cp</executable>
+ <arguments>
+ <argument>../../admportal/config/admportal.log4js.json</argument>
+ <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</argument>
+ </arguments>
+ </configuration>
+ </execution>
+
+
+ <execution>
+ <id>change shell permissions</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/usr/bin/find</executable>
+ <arguments>
+ <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
+ <argument>-name</argument>
+ <argument>*.sh</argument>
+ <argument>-exec</argument>
+ <argument>chmod</argument>
+ <argument>+x</argument>
+ <argument>{}</argument>
+ <argument>;</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
+ </plugins>
+
+ </build>
+ <organization>
+ <name>openECOMP</name>
+ </organization>
+</project>
diff --git a/installation/admportal/src/main/docker/Dockerfile b/installation/admportal/src/main/docker/Dockerfile
new file mode 100644
index 0000000..8facc58
--- /dev/null
+++ b/installation/admportal/src/main/docker/Dockerfile
@@ -0,0 +1,12 @@
+# Base ubuntu with added packages needed for open ecomp
+FROM ecomp/ubuntu-sdnc-image:${project.version}
+MAINTAINER SDN-C Team (sdnc@lists.openecomp.org)
+
+# create link for pm2
+#RUN ln -s /opt/openecomp/sdnc/admportal/node_modules/pm2/bin/pm2 /usr/bin/pm2
+
+# copy openecomp
+COPY opt /opt
+
+#ENTRYPOINT exec /opt/openecomp/sdnc/admportal/shell/startssl.sh
+EXPOSE 8843
diff --git a/installation/dgbuilder/flowShareUsers.js b/installation/dgbuilder/flowShareUsers.js
new file mode 100644
index 0000000..4cbf739
--- /dev/null
+++ b/installation/dgbuilder/flowShareUsers.js
@@ -0,0 +1,8 @@
+module.exports = {"flowShareUsers":
+ [
+ {
+ "name" : "Release 1702",
+ "rootDir" : "1702"
+ }
+ ]
+}
diff --git a/installation/dgbuilder/pom.xml b/installation/dgbuilder/pom.xml
new file mode 100644
index 0000000..4eaf158
--- /dev/null
+++ b/installation/dgbuilder/pom.xml
@@ -0,0 +1,177 @@
+<?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/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>installation</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>installation-dgbuilder</artifactId>
+ <version>1.0.0</version>
+
+ <name>Installation - dgbuilder</name>
+ <description>Creates docker container for dgbuilder</description>
+
+ <properties>
+ <image.name>ecomp/dgbuilder-sdnc-image</image.name>
+ </properties>
+
+
+ <build>
+ <plugins>
+
+
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.16.5</version>
+ <inherited>false</inherited>
+ <configuration>
+
+ <images>
+ <image>
+ <name>${image.name}</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+ <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
+ <tags>
+ <tag>${project.version}</tag>
+ <tag>latest</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-images</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-dockerfile</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/docker</directory>
+ <includes>
+ <include>Dockerfile</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>exec-maven-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <executions>
+ <execution>
+ <id>make-path</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/bin/mkdir</executable>
+ <arguments>
+ <argument>-p</argument>
+ <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>Copy dgbuilder</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/bin/cp</executable>
+ <arguments>
+ <argument>-r</argument>
+ <argument>../../dgbuilder</argument>
+ <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
+ </arguments>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>dgbuilder createReleaseDir</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/bin/bash</executable>
+ <arguments>
+ <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc/dgbuilder/createReleaseDir</argument>
+ <argument>1702</argument>
+ <argument>dguser</argument>
+ <argument>change_email_id@dgbuilder.com</argument>
+ </arguments>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>change shell permissions</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/usr/bin/find</executable>
+ <arguments>
+ <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
+ <argument>-name</argument>
+ <argument>*.sh</argument>
+ <argument>-exec</argument>
+ <argument>chmod</argument>
+ <argument>+x</argument>
+ <argument>{}</argument>
+ <argument>;</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
+ </plugins>
+
+ </build>
+ <organization>
+ <name>openECOMP</name>
+ </organization>
+</project>
diff --git a/installation/dgbuilder/src/main/docker/Dockerfile b/installation/dgbuilder/src/main/docker/Dockerfile
new file mode 100644
index 0000000..fd91e77
--- /dev/null
+++ b/installation/dgbuilder/src/main/docker/Dockerfile
@@ -0,0 +1,11 @@
+# Base ubuntu with added packages needed for open ecomp
+FROM ecomp/ubuntu-sdnc-image:${project.version}
+MAINTAINER SDN-C Team (sdnc@lists.openecomp.org)
+
+# copy openecomp
+COPY opt /opt
+WORKDIR /opt/openecomp/sdnc/dgbuilder
+RUN npm install
+
+#ENTRYPOINT /bin/bash /opt/openecomp/sdnc/dgbuilder/start sdnc1.0
+EXPOSE 3100
diff --git a/installation/pom.xml b/installation/pom.xml
new file mode 100644
index 0000000..c133695
--- /dev/null
+++ b/installation/pom.xml
@@ -0,0 +1,35 @@
+<?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/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>sdnc-oam</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>installation</artifactId>
+ <version>1.0.0</version>
+
+ <name>Installation</name>
+ <description>Installs SDN-C on local file system</description>
+
+ <properties>
+ <application.name>installation</application.name>
+
+ <maven.build.timestamp.format>yyMMdd-HHmmss</maven.build.timestamp.format>
+ <build.number>${maven.build.timestamp}</build.number>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ </properties>
+
+<modules>
+<module>ubuntu</module>
+<module>sdnc</module>
+<module>admportal</module>
+<module>dgbuilder</module>
+</modules>
+</project>
diff --git a/installation/sdnc/pom.xml b/installation/sdnc/pom.xml
new file mode 100644
index 0000000..6db2fd5
--- /dev/null
+++ b/installation/sdnc/pom.xml
@@ -0,0 +1,255 @@
+<?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/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>installation</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>installation-sdnc</artifactId>
+ <version>1.0.0</version>
+
+ <name>Installation - sdnc</name>
+ <description>Creates SDN Controller Docker container</description>
+
+ <properties>
+ <image.name>ecomp/sdnc-image</image.name>
+ <sdnc.core.version>${project.version}</sdnc.core.version>
+ <sdnc.adaptors.version>${project.version}</sdnc.adaptors.version>
+ <sdnc.northbound.version>${project.version}</sdnc.northbound.version>
+ <sdnc.plugins.version>${project.version}</sdnc.plugins.version>
+ </properties>
+
+
+ <build>
+ <plugins>
+
+
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.16.5</version>
+ <inherited>false</inherited>
+ <configuration>
+
+ <images>
+ <image>
+ <name>${image.name}</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+ <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
+ <tags>
+ <tag>${project.version}</tag>
+ <tag>latest</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-images</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-dockerfile</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/docker</directory>
+ <includes>
+ <include>Dockerfile</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>copy-scripts</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/bin</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/scripts</directory>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-tarballs</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>*.tgz</include>
+ <include>*.tar.gz</include>
+ <include>idmlight.db.mv.db</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-data</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>*.dump</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-properties</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</outputDirectory>
+ <resources>
+ <resource>
+ <directory>../src/main/properties</directory>
+ <includes>
+ <include>*.properties</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-keystores</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/stores</outputDirectory>
+ <resources>
+ <resource>
+ <directory>../src/main/stores</directory>
+ <includes>
+ <include>*.jks</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>exec-maven-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <executions>
+
+ <execution>
+ <id>Get features</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/bin/bash</executable>
+ <environmentVariables>
+ <SDNC_CORE_VERSION>${sdnc.core.version}</SDNC_CORE_VERSION>
+ <SDNC_ADAPTORS_VERSION>${sdnc.adaptors.version}</SDNC_ADAPTORS_VERSION>
+ <SDNC_NORTHBOUND_VERSION>${sdnc.northbound.version}</SDNC_NORTHBOUND_VERSION>
+ <SDNC_PLUGINS_VERSION>${sdnc.plugins.version}</SDNC_PLUGINS_VERSION>
+ <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
+ </environmentVariables>
+ <arguments>
+ <argument>${basedir}/src/main/scripts/installZips.sh</argument>
+ <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
+ </arguments>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>change shell permissions</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/usr/bin/find</executable>
+ <arguments>
+ <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
+ <argument>-name</argument>
+ <argument>*.sh</argument>
+ <argument>-exec</argument>
+ <argument>chmod</argument>
+ <argument>+x</argument>
+ <argument>{}</argument>
+ <argument>;</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
+ </plugins>
+
+ </build>
+ <organization>
+ <name>openECOMP</name>
+ </organization>
+</project>
diff --git a/installation/sdnc/src/main/docker/Dockerfile b/installation/sdnc/src/main/docker/Dockerfile
new file mode 100644
index 0000000..2e2140b
--- /dev/null
+++ b/installation/sdnc/src/main/docker/Dockerfile
@@ -0,0 +1,23 @@
+# Base ubuntu with added packages needed for open ecomp
+FROM ecomp/ubuntu-sdnc-image:${project.version}
+MAINTAINER SDN-C Team (sdnc@lists.openecomp.org)
+ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64
+ENV ODL_HOME /opt/opendaylight/current
+ENV SDNC_CONFIG_DIR /opt/openecomp/sdnc/data/properties
+
+# copy the opendaylight tar and expand
+COPY distribution-karaf-0.4.2-Beryllium-SR2.tar.gz /tmp
+RUN mkdir /opt/opendaylight /opt/openecomp
+RUN tar zxvf /tmp/distribution-karaf-0.4.2-Beryllium-SR2.tar.gz --directory /opt/opendaylight
+RUN ln -s /opt/opendaylight/distribution-karaf-0.4.2-Beryllium-SR2 /opt/opendaylight/current
+COPY idmlight.db.mv.db /opt/opendaylight/current
+
+# copy openecomp
+COPY opt /opt
+RUN ln -s /opt/openecomp/sdnc /opt/sdnc
+
+# workaround till we get proxy working
+COPY mysql.tgz /tmp
+RUN tar zxvf /tmp/mysql.tgz --directory /opt/opendaylight/current/system
+# ENTRYPOINT exec /opt/opendaylight/current/bin/karaf
+EXPOSE 8181
diff --git a/installation/sdnc/src/main/resources/distribution-karaf-0.4.2-Beryllium-SR2.tar.gz.REMOVED.git-id b/installation/sdnc/src/main/resources/distribution-karaf-0.4.2-Beryllium-SR2.tar.gz.REMOVED.git-id
new file mode 100644
index 0000000..3d10091
--- /dev/null
+++ b/installation/sdnc/src/main/resources/distribution-karaf-0.4.2-Beryllium-SR2.tar.gz.REMOVED.git-id
@@ -0,0 +1 @@
+e3c6abcc979fe257f05da7f22ec22c6099d10a67
\ No newline at end of file
diff --git a/installation/sdnc/src/main/resources/idmlight.db.mv.db b/installation/sdnc/src/main/resources/idmlight.db.mv.db
new file mode 100644
index 0000000..c6b359d
--- /dev/null
+++ b/installation/sdnc/src/main/resources/idmlight.db.mv.db
Binary files differ
diff --git a/installation/sdnc/src/main/resources/mysql.tgz b/installation/sdnc/src/main/resources/mysql.tgz
new file mode 100644
index 0000000..65973df
--- /dev/null
+++ b/installation/sdnc/src/main/resources/mysql.tgz
Binary files differ
diff --git a/installation/sdnc/src/main/resources/sdnctl.dump b/installation/sdnc/src/main/resources/sdnctl.dump
new file mode 100644
index 0000000..8be4c6a
--- /dev/null
+++ b/installation/sdnc/src/main/resources/sdnctl.dump
@@ -0,0 +1,1818 @@
+-- MySQL dump 10.13 Distrib 5.6.22, for Linux (x86_64)
+--
+-- Host: sdnctldb01 Database: sdnctl
+-- ------------------------------------------------------
+-- Server version 5.6.27-enterprise-commercial-advanced-log
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+SET @MYSQLDUMP_TEMP_LOG_BIN = @@SESSION.SQL_LOG_BIN;
+SET @@SESSION.SQL_LOG_BIN= 0;
+
+--
+-- Table structure for table `AGNOSTIC_NOTIFICATION_URL`
+--
+
+DROP TABLE IF EXISTS `AGNOSTIC_NOTIFICATION_URL`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `AGNOSTIC_NOTIFICATION_URL` (
+ `service_type` varchar(128) NOT NULL,
+ `service_instance_id` varchar(128) NOT NULL,
+ `request_id` varchar(128) NOT NULL,
+ `svc_notification_url` varchar(256) NOT NULL,
+ PRIMARY KEY (`service_type`,`service_instance_id`,`request_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `AGNOSTIC_TO_SVC_SPCFC_API`
+--
+
+DROP TABLE IF EXISTS `AGNOSTIC_TO_SVC_SPCFC_API`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `AGNOSTIC_TO_SVC_SPCFC_API` (
+ `operation` varchar(128) NOT NULL,
+ `service` varchar(128) NOT NULL,
+ `service_specific_api` varchar(128) NOT NULL,
+ `async_process` varchar(15) DEFAULT NULL,
+ PRIMARY KEY (`operation`,`service`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `AIC_AVAIL_ZONE_POOL`
+--
+
+DROP TABLE IF EXISTS `AIC_AVAIL_ZONE_POOL`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `AIC_AVAIL_ZONE_POOL` (
+ `aic_site_id` varchar(100) NOT NULL,
+ `status` varchar(40) NOT NULL,
+ `availability_zone` varchar(100) NOT NULL,
+ `token` varchar(5) NOT NULL,
+ `vnf_id` varchar(80) DEFAULT NULL,
+ `service_type` varchar(100) NOT NULL,
+ `vnf_type` varchar(20) DEFAULT NULL,
+ `hypervisor` varchar(10) DEFAULT NULL,
+ PRIMARY KEY (`aic_site_id`,`availability_zone`,`token`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `AIC_HOSTNAME`
+--
+
+DROP TABLE IF EXISTS `AIC_HOSTNAME`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `AIC_HOSTNAME` (
+ `hostname` varchar(20) NOT NULL,
+ `cust_id` int(11) NOT NULL,
+ `vendor_code` varchar(1) NOT NULL,
+ `virtual_device_type` varchar(2) DEFAULT NULL,
+ `device_sequence` varchar(3) NOT NULL,
+ `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`hostname`),
+ UNIQUE KEY `hostname` (`hostname`),
+ KEY `IN1_AIC_HOSTNAME` (`cust_id`),
+ CONSTRAINT `AC1_HOSTNAME` FOREIGN KEY (`cust_id`) REFERENCES `CUSTOMER` (`cust_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `AIC_NETWORK`
+--
+
+DROP TABLE IF EXISTS `AIC_NETWORK`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `AIC_NETWORK` (
+ `network_id` varchar(100) NOT NULL,
+ `network_name` varchar(100) DEFAULT NULL,
+ `status` varchar(20) DEFAULT NULL,
+ `tenant_id` varchar(100) DEFAULT NULL,
+ `switch_uuid` varchar(100) DEFAULT NULL,
+ `portgroup_name` varchar(100) DEFAULT NULL,
+ `portgroup_id` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`network_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `AIC_SITE`
+--
+
+DROP TABLE IF EXISTS `AIC_SITE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `AIC_SITE` (
+ `name` varchar(100) DEFAULT NULL,
+ `aic_site_id` varchar(100) NOT NULL,
+ `vcenter_url` varchar(200) DEFAULT NULL,
+ `vcenter_username` varchar(40) DEFAULT NULL,
+ `vcenter_passwd` varbinary(255) DEFAULT NULL,
+ `city` varchar(100) DEFAULT NULL,
+ `state` varchar(2) DEFAULT NULL,
+ `operational_status` varchar(20) DEFAULT NULL,
+ `oam_gateway_addr` varchar(20) DEFAULT '',
+ PRIMARY KEY (`aic_site_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `AIC_SWITCH`
+--
+
+DROP TABLE IF EXISTS `AIC_SWITCH`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `AIC_SWITCH` (
+ `switch_name` varchar(100) DEFAULT NULL,
+ `physical_network_name` varchar(100) NOT NULL,
+ `aic_site_id` varchar(100) DEFAULT NULL,
+ `uuid` varchar(100) DEFAULT NULL,
+ `availability_zone` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`physical_network_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `ALLOCATION_ITEM`
+--
+
+DROP TABLE IF EXISTS `ALLOCATION_ITEM`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `ALLOCATION_ITEM` (
+ `allocation_item_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `resource_id` bigint(20) NOT NULL,
+ `application_id` varchar(50) NOT NULL,
+ `resource_set_id` varchar(200) NOT NULL,
+ `resource_union_id` varchar(200) NOT NULL,
+ `resource_share_group_list` varchar(200) DEFAULT NULL,
+ `lt_used` bigint(20) DEFAULT NULL,
+ `ll_label` varchar(50) DEFAULT NULL,
+ `rr_used` varchar(200) DEFAULT NULL,
+ `allocation_time` datetime NOT NULL,
+ PRIMARY KEY (`allocation_item_id`),
+ UNIQUE KEY `allocation_item_id` (`allocation_item_id`),
+ UNIQUE KEY `IX2_ALLOCATION_ITEM` (`resource_id`,`resource_set_id`),
+ KEY `IX1_ALLOCATION_ITEM` (`resource_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=10104 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `ALTS_CREDENTIALS`
+--
+
+DROP TABLE IF EXISTS `ALTS_CREDENTIALS`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `ALTS_CREDENTIALS` (
+ `alts_username` varchar(255) NOT NULL,
+ `alts_password` varbinary(255) NOT NULL,
+ PRIMARY KEY (`alts_username`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `CITY_CODE`
+--
+
+DROP TABLE IF EXISTS `CITY_CODE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `CITY_CODE` (
+ `city_code_id` int(11) NOT NULL AUTO_INCREMENT,
+ `city_code` varchar(3) NOT NULL,
+ `city` varchar(150) NOT NULL,
+ `state` varchar(10) NOT NULL,
+ `country_code` varchar(10) NOT NULL,
+ PRIMARY KEY (`city_code_id`),
+ KEY `IN1_CITY_CODE` (`city`,`state`,`country_code`)
+) ENGINE=InnoDB AUTO_INCREMENT=37773 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `CUSTOMER`
+--
+
+DROP TABLE IF EXISTS `CUSTOMER`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `CUSTOMER` (
+ `cust_id` int(11) NOT NULL AUTO_INCREMENT,
+ `customer_name` varchar(60) NOT NULL,
+ `grua` varchar(4) NOT NULL,
+ `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`cust_id`),
+ UNIQUE KEY `IU1_CUSTOMER` (`customer_name`)
+) ENGINE=InnoDB AUTO_INCREMENT=186 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `DATA_OBJECT_MAPPING`
+--
+
+DROP TABLE IF EXISTS `DATA_OBJECT_MAPPING`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `DATA_OBJECT_MAPPING` (
+ `serial_key` int(11) NOT NULL AUTO_INCREMENT,
+ `data_object_key` varchar(100) NOT NULL,
+ `data_object_type` varchar(50) NOT NULL,
+ `service_type` varchar(50) NOT NULL,
+ `data_object_key2` varchar(100) NOT NULL,
+ `data_object_key2_type` varchar(50) NOT NULL,
+ PRIMARY KEY (`serial_key`),
+ KEY `IX1_DATA_OBJECT_MAPPING` (`data_object_key`,`data_object_type`,`service_type`),
+ KEY `IX2_DATA_OBJECT_MAPPING` (`service_type`,`data_object_key2`,`data_object_key2_type`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `DEVICE2CONNECTION_MAPPING`
+--
+
+DROP TABLE IF EXISTS `DEVICE2CONNECTION_MAPPING`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `DEVICE2CONNECTION_MAPPING` (
+ `vnf_host_name` varchar(100) NOT NULL,
+ `e2e_vpn_key` varchar(30) NOT NULL,
+ `service_type` varchar(30) NOT NULL,
+ `connection_id` bigint(20) NOT NULL,
+ PRIMARY KEY (`vnf_host_name`,`e2e_vpn_key`,`service_type`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `DEVICE2IPADDRESS_CONSUMPTION`
+--
+
+DROP TABLE IF EXISTS `DEVICE2IPADDRESS_CONSUMPTION`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `DEVICE2IPADDRESS_CONSUMPTION` (
+ `serial_key` int(11) NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) NOT NULL,
+ `device_type` varchar(30) NOT NULL,
+ `ip_version` varchar(10) NOT NULL,
+ `consumption_key` varchar(100) NOT NULL,
+ `logical_interface_service_id` varchar(100) NOT NULL,
+ `address_type` varchar(30) NOT NULL,
+ `ip_consumed` varchar(50) NOT NULL,
+ `vnf_type` varchar(30) NOT NULL,
+ PRIMARY KEY (`serial_key`),
+ KEY `IX1_DEVICEIPADDRESS_CONSUMPTION` (`device_id`,`device_type`,`ip_version`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `DEVICE2IPADDRESS_MAPPING`
+--
+
+DROP TABLE IF EXISTS `DEVICE2IPADDRESS_MAPPING`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `DEVICE2IPADDRESS_MAPPING` (
+ `serial_key` int(11) NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) NOT NULL,
+ `device_type` varchar(30) NOT NULL,
+ `secondary_key` varchar(100) NOT NULL,
+ `secondary_key_type` varchar(30) NOT NULL,
+ `address` varchar(50) NOT NULL,
+ `address_type` varchar(30) NOT NULL,
+ `ip_version` varchar(10) NOT NULL,
+ `length` int(11) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ PRIMARY KEY (`serial_key`),
+ KEY `IX1_DEVICE2IPADDRESS_MAPPING` (`device_id`,`device_type`,`secondary_key`,`secondary_key_type`,`address`,`address_type`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `EIPAM_IP_ASSIGNMENTS`
+--
+
+DROP TABLE IF EXISTS `EIPAM_IP_ASSIGNMENTS`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `EIPAM_IP_ASSIGNMENTS` (
+ `plan_name` varchar(40) NOT NULL,
+ `client_key` varchar(100) NOT NULL,
+ `service_type` varchar(40) NOT NULL,
+ `ip_address` varchar(40) DEFAULT NULL,
+ `prefix_length` int(2) DEFAULT NULL,
+ `status` varchar(20) DEFAULT NULL,
+ `service_instance_id` varchar(80) DEFAULT NULL,
+ `last_modified_ts` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `prev_status` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`plan_name`,`client_key`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `EIPAM_IP_SUBNETS`
+--
+
+DROP TABLE IF EXISTS `EIPAM_IP_SUBNETS`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `EIPAM_IP_SUBNETS` (
+ `entity_id` int(6) NOT NULL,
+ `service_type` varchar(40) NOT NULL,
+ `plan_name` varchar(40) NOT NULL,
+ `address_family` varchar(10) NOT NULL,
+ `ip_address` varchar(40) NOT NULL,
+ `prefix_length` int(3) NOT NULL,
+ `status` varchar(20) NOT NULL,
+ `last_modified_ts` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`entity_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `EIPAM_IP_SUBNET_KEYS`
+--
+
+DROP TABLE IF EXISTS `EIPAM_IP_SUBNET_KEYS`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `EIPAM_IP_SUBNET_KEYS` (
+ `entity_id` int(6) NOT NULL,
+ `key_name` varchar(255) NOT NULL,
+ `key_value` varchar(50) NOT NULL,
+ `level` int(2) NOT NULL,
+ PRIMARY KEY (`entity_id`,`key_name`,`key_value`,`level`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `EIPAM_REQUEST_KEY`
+--
+
+DROP TABLE IF EXISTS `EIPAM_REQUEST_KEY`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `EIPAM_REQUEST_KEY` (
+ `key_name_1` varchar(50) NOT NULL,
+ `address_family` varchar(4) NOT NULL,
+ `serial_key` int(2) NOT NULL AUTO_INCREMENT,
+ `plan_name` varchar(50) NOT NULL,
+ `request_length` int(2) NOT NULL,
+ `pools_length` int(2) NOT NULL,
+ `plan_length` int(2) NOT NULL,
+ `key_name_0` varchar(50) NOT NULL,
+ `key_name_type_0` varchar(255) NOT NULL,
+ `key_name_type_1` varchar(255) NOT NULL,
+ `prefix_length` int(2) NOT NULL,
+ `group_flag` char(1) NOT NULL,
+ `address_type` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`key_name_1`,`address_family`),
+ UNIQUE KEY `IX1_EIPAM_REQUEST_KEY` (`serial_key`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `GENERIC_L3_NETWORK`
+--
+
+DROP TABLE IF EXISTS `GENERIC_L3_NETWORK`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `GENERIC_L3_NETWORK` (
+ `network_id` varchar(80) NOT NULL,
+ `network_name` varchar(80) DEFAULT NULL,
+ `network_type` varchar(80) DEFAULT NULL,
+ `network_role` varchar(80) DEFAULT NULL,
+ `network_technology` varchar(80) DEFAULT NULL,
+ `neutron_network_id` varchar(80) DEFAULT NULL,
+ `is_bound_to_vpn` tinyint(1) DEFAULT NULL,
+ `orchestration_status` varchar(20) DEFAULT NULL,
+ `heat_stack_id` varchar(80) DEFAULT NULL,
+ `mso_catalog_key` varchar(80) DEFAULT NULL,
+ `service_id` varchar(80) NOT NULL,
+ `tenant_id` varchar(80) NOT NULL,
+ `physical_location_id` varchar(20) DEFAULT NULL,
+ `network_role_instance` varchar(80) NOT NULL,
+ PRIMARY KEY (`network_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `GENERIC_L3_NETWORK_SUBNET`
+--
+
+DROP TABLE IF EXISTS `GENERIC_L3_NETWORK_SUBNET`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `GENERIC_L3_NETWORK_SUBNET` (
+ `network_id` varchar(80) NOT NULL,
+ `subnet_id` varchar(80) NOT NULL,
+ `neutron_subnet_id` varchar(80) DEFAULT NULL,
+ `gateway_address` varchar(45) NOT NULL,
+ `network_start_address` varchar(45) NOT NULL,
+ `cidr_mask` varchar(20) NOT NULL,
+ `ip_version` char(1) NOT NULL,
+ `orchestration_status` varchar(64) NOT NULL,
+ `dhcp_enabled` tinyint(1) NOT NULL,
+ `dhcp_start` varchar(45) DEFAULT NULL,
+ `dhcp_end` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`network_id`,`subnet_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `GENERIC_L3_NETWORK_VPN_BINDING`
+--
+
+DROP TABLE IF EXISTS `GENERIC_L3_NETWORK_VPN_BINDING`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `GENERIC_L3_NETWORK_VPN_BINDING` (
+ `network_id` varchar(80) NOT NULL,
+ `vpn_id` varchar(80) NOT NULL,
+ PRIMARY KEY (`network_id`,`vpn_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `GENERIC_VNF`
+--
+
+DROP TABLE IF EXISTS `GENERIC_VNF`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `GENERIC_VNF` (
+ `vnf_id` varchar(80) NOT NULL,
+ `vnf_name` varchar(80) NOT NULL,
+ `vnf_type` varchar(200) NOT NULL,
+ `vnf_name2` varchar(80) DEFAULT NULL,
+ `service_id` varchar(80) NOT NULL,
+ `equipment_role` varchar(80) NOT NULL,
+ `orchestration_status` varchar(20) DEFAULT NULL,
+ `prov_status` varchar(20) DEFAULT NULL,
+ `heat_stack_id` varchar(80) DEFAULT NULL,
+ `mso_catalog_key` varchar(80) DEFAULT NULL,
+ `regional_resource_zone` varchar(80) DEFAULT NULL,
+ `operational_state` varchar(80) DEFAULT NULL,
+ `license_key` varchar(80) DEFAULT NULL,
+ `ipv4_oam_address` varchar(20) DEFAULT NULL,
+ `ipv4_loopback0_address` varchar(20) DEFAULT NULL,
+ `nm_lan_v6_address` varchar(40) DEFAULT NULL,
+ `management_v6_address` varchar(40) DEFAULT NULL,
+ `management_option` varchar(45) DEFAULT NULL,
+ `vcpu` varchar(45) DEFAULT NULL,
+ `vmemory` varchar(45) DEFAULT NULL,
+ `vdisk` varchar(45) DEFAULT NULL,
+ `vcpu_units` varchar(45) DEFAULT NULL,
+ `vmemory_units` varchar(45) DEFAULT NULL,
+ `vdisk_units` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`vnf_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `GENERIC_VNF_L3_NETWORK`
+--
+
+DROP TABLE IF EXISTS `GENERIC_VNF_L3_NETWORK`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `GENERIC_VNF_L3_NETWORK` (
+ `vnf_id` varchar(80) NOT NULL,
+ `network_id` varchar(80) NOT NULL,
+ PRIMARY KEY (`vnf_id`,`network_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `GENERIC_VNF_LICENSE_MANAGEMENT`
+--
+
+DROP TABLE IF EXISTS `GENERIC_VNF_LICENSE_MANAGEMENT`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `GENERIC_VNF_LICENSE_MANAGEMENT` (
+ `vnf_id` varchar(80) NOT NULL,
+ `att_uuid` varchar(80) NOT NULL,
+ PRIMARY KEY (`vnf_id`,`att_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `GENERIC_VNF_LINTERFACE`
+--
+
+DROP TABLE IF EXISTS `GENERIC_VNF_LINTERFACE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `GENERIC_VNF_LINTERFACE` (
+ `vnf_id` varchar(80) NOT NULL,
+ `interface_name` varchar(255) NOT NULL,
+ `interface_role` varchar(45) DEFAULT NULL,
+ `v6_wan_link_ip` varchar(45) DEFAULT NULL,
+ `selflink` varchar(128) DEFAULT NULL,
+ `interface_id` varchar(45) DEFAULT NULL,
+ `macaddr` varchar(64) DEFAULT NULL,
+ `network_name` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`vnf_id`,`interface_name`),
+ KEY `FK_GENERIC_VNF_LINTERFACE_GENERIC_VNF_IDX` (`vnf_id`),
+ CONSTRAINT `FK_GENERIC_VNF_LINTERFACE_GENERIC_VNF` FOREIGN KEY (`vnf_id`) REFERENCES `GENERIC_VNF` (`vnf_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `GENERIC_VNF_PSERVER`
+--
+
+DROP TABLE IF EXISTS `GENERIC_VNF_PSERVER`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `GENERIC_VNF_PSERVER` (
+ `vnf_id` varchar(64) NOT NULL,
+ `hostname` varchar(255) NOT NULL,
+ PRIMARY KEY (`vnf_id`,`hostname`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `GENERIC_VNF_SERVICE_INSTANCE`
+--
+
+DROP TABLE IF EXISTS `GENERIC_VNF_SERVICE_INSTANCE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `GENERIC_VNF_SERVICE_INSTANCE` (
+ `vnf_id` varchar(64) NOT NULL,
+ `service_instance_id` varchar(255) NOT NULL,
+ `relationship_key` varchar(64) NOT NULL,
+ `relationship_value` varchar(64) DEFAULT NULL,
+ `global_customer_id` varchar(255) DEFAULT NULL,
+ `service_type` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`vnf_id`,`service_instance_id`,`relationship_key`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `GENERIC_VNF_VNF_IMAGE`
+--
+
+DROP TABLE IF EXISTS `GENERIC_VNF_VNF_IMAGE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `GENERIC_VNF_VNF_IMAGE` (
+ `vnf_id` varchar(64) NOT NULL,
+ `att_uuid` varchar(255) NOT NULL,
+ PRIMARY KEY (`vnf_id`,`att_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `GENERIC_VNF_VSERVER`
+--
+
+DROP TABLE IF EXISTS `GENERIC_VNF_VSERVER`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `GENERIC_VNF_VSERVER` (
+ `vnf_id` varchar(80) NOT NULL,
+ `vserver_id` varchar(128) NOT NULL,
+ `tenant_id` varchar(128) DEFAULT NULL,
+ PRIMARY KEY (`vnf_id`,`vserver_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `GENERIC_VPN_BINDING`
+--
+
+DROP TABLE IF EXISTS `GENERIC_VPN_BINDING`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `GENERIC_VPN_BINDING` (
+ `vpn_id` varchar(80) NOT NULL,
+ `vpn_name` varchar(80) NOT NULL,
+ `global_route_target` varchar(80) NOT NULL,
+ PRIMARY KEY (`vpn_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `HOSTNAME`
+--
+
+DROP TABLE IF EXISTS `HOSTNAME`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `HOSTNAME` (
+ `hostname` varchar(21) NOT NULL,
+ `parent_hostname` varchar(21) DEFAULT NULL,
+ `cust_id` int(11) NOT NULL,
+ `loc_id` int(11) NOT NULL,
+ `site_sequence` varchar(2) NOT NULL,
+ `server_sequence` varchar(2) NOT NULL,
+ `activation_code` varchar(11) DEFAULT NULL,
+ `vnf_sequence` varchar(2) DEFAULT NULL,
+ `vendor_code` varchar(1) NOT NULL,
+ `virtual_device_type` varchar(2) DEFAULT NULL,
+ `device_sequence` varchar(3) DEFAULT NULL,
+ `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`hostname`),
+ KEY `IN1_HOSTNAME` (`cust_id`),
+ KEY `IN2_HOSTNAME` (`loc_id`),
+ KEY `IN3_HOSTNAME` (`vendor_code`),
+ KEY `IN4_HOSTNAME` (`parent_hostname`),
+ CONSTRAINT `FK1_HOSTNAME` FOREIGN KEY (`cust_id`) REFERENCES `CUSTOMER` (`cust_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
+ CONSTRAINT `FK2_HOSTNAME` FOREIGN KEY (`loc_id`) REFERENCES `LOCATION` (`loc_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
+ CONSTRAINT `FK3_HOSTNAME` FOREIGN KEY (`vendor_code`) REFERENCES `VENDOR_CODE` (`vendor_code`) ON DELETE NO ACTION ON UPDATE NO ACTION,
+ CONSTRAINT `FK4_HOSTNAME` FOREIGN KEY (`parent_hostname`) REFERENCES `HOSTNAME` (`hostname`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `IPV4_ADDRESS_POOL`
+--
+
+DROP TABLE IF EXISTS `IPV4_ADDRESS_POOL`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `IPV4_ADDRESS_POOL` (
+ `aic_site_id` varchar(100) NOT NULL,
+ `universe` varchar(40) NOT NULL,
+ `status` varchar(40) NOT NULL,
+ `ipv4_addr` varchar(20) NOT NULL,
+ PRIMARY KEY (`ipv4_addr`,`universe`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `LINTERFACE_VLAN`
+--
+
+DROP TABLE IF EXISTS `LINTERFACE_VLAN`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `LINTERFACE_VLAN` (
+ `vnf_id` varchar(80) NOT NULL,
+ `interface_name` varchar(255) NOT NULL,
+ `vlan_interface` varchar(255) NOT NULL,
+ `vlan_id_inner` varchar(64) DEFAULT NULL,
+ `vlan_id_outer` varchar(64) DEFAULT NULL,
+ PRIMARY KEY (`vnf_id`,`interface_name`,`vlan_interface`),
+ KEY `FK_LINTERFACE_VLAN_GENERIC_VNF_LINTERFACE_IDX` (`vnf_id`,`interface_name`),
+ CONSTRAINT `FK_LINTERFACE_VLAN_GENERIC_VNF_LINTERFACE` FOREIGN KEY (`vnf_id`, `interface_name`) REFERENCES `GENERIC_VNF_LINTERFACE` (`vnf_id`, `interface_name`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `LOCATION`
+--
+
+DROP TABLE IF EXISTS `LOCATION`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `LOCATION` (
+ `loc_id` int(11) NOT NULL AUTO_INCREMENT,
+ `address` varchar(150) NOT NULL,
+ `city_code_id` int(11) NOT NULL,
+ `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`loc_id`),
+ KEY `IN1_LOCATION_IDX` (`city_code_id`),
+ CONSTRAINT `FK1_LOCATION` FOREIGN KEY (`city_code_id`) REFERENCES `CITY_CODE` (`city_code_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `MAX_PORT_SPEED`
+--
+
+DROP TABLE IF EXISTS `MAX_PORT_SPEED`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `MAX_PORT_SPEED` (
+ `max_port_speed_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `image_file_name` varchar(50) NOT NULL,
+ `end_point_position` varchar(50) NOT NULL,
+ `interface_name` varchar(100) NOT NULL,
+ `max_speed` bigint(20) NOT NULL,
+ `unit` varchar(10) NOT NULL,
+ PRIMARY KEY (`max_port_speed_id`),
+ UNIQUE KEY `max_port_speed_id` (`max_port_speed_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `MAX_SERVER_SPEED`
+--
+
+DROP TABLE IF EXISTS `MAX_SERVER_SPEED`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `MAX_SERVER_SPEED` (
+ `max_server_speed_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `server_model` varchar(50) NOT NULL,
+ `evc_count` smallint(6) NOT NULL,
+ `max_speed` bigint(20) NOT NULL,
+ `unit` varchar(10) NOT NULL,
+ `description` varchar(500) DEFAULT NULL,
+ PRIMARY KEY (`max_server_speed_id`),
+ UNIQUE KEY `max_server_speed_id` (`max_server_speed_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `NBNC_BORDER_ELEMENT`
+--
+
+DROP TABLE IF EXISTS `NBNC_BORDER_ELEMENT`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `NBNC_BORDER_ELEMENT` (
+ `be_id` varchar(32) NOT NULL,
+ `be_type` varchar(16) NOT NULL,
+ `be_name` varchar(32) DEFAULT NULL,
+ `be_host_vnf_id` varchar(32) DEFAULT NULL,
+ `service_type_array` varchar(512) DEFAULT NULL,
+ `tangibility` varchar(16) DEFAULT NULL,
+ `usage_order` smallint(6) DEFAULT NULL,
+ `vlan_start` smallint(6) DEFAULT NULL,
+ `vlan_end` smallint(6) DEFAULT NULL,
+ `ipv4_subnet` varchar(18) DEFAULT NULL,
+ `ipv6_subnet` varchar(68) DEFAULT NULL,
+ `network_ip` varchar(48) DEFAULT NULL,
+ `be_location` varchar(16) DEFAULT NULL,
+ `description` varchar(128) DEFAULT NULL,
+ `updated_timestamp` timestamp NULL DEFAULT NULL,
+ `log_link_model_uuid` varchar(64) DEFAULT NULL,
+ PRIMARY KEY (`be_id`,`be_type`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `NBNC_IPE`
+--
+
+DROP TABLE IF EXISTS `NBNC_IPE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `NBNC_IPE` (
+ `ipe_name` varchar(32) NOT NULL,
+ `ipe_location` varchar(16) DEFAULT NULL,
+ `ipe_ip_address` varchar(16) DEFAULT NULL,
+ `ipe_id` varchar(8) DEFAULT NULL,
+ `service_type_array` varchar(512) DEFAULT NULL,
+ `ipe_status` varchar(32) DEFAULT NULL,
+ `updated_timestamp` timestamp NULL DEFAULT NULL,
+ PRIMARY KEY (`ipe_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `NBNC_IPE_PORT`
+--
+
+DROP TABLE IF EXISTS `NBNC_IPE_PORT`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `NBNC_IPE_PORT` (
+ `port_id` varchar(16) NOT NULL,
+ `ipe_name` varchar(32) NOT NULL,
+ `be_id` varchar(32) NOT NULL,
+ `be_type` varchar(16) NOT NULL,
+ `port_type` varchar(16) DEFAULT NULL,
+ `ae_name` varchar(16) DEFAULT NULL,
+ `description` varchar(128) DEFAULT NULL,
+ `updated_timestamp` timestamp NULL DEFAULT NULL,
+ PRIMARY KEY (`port_id`,`ipe_name`,`be_id`,`be_type`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `NBNC_MAPPING_SBG_BGF`
+--
+
+DROP TABLE IF EXISTS `NBNC_MAPPING_SBG_BGF`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `NBNC_MAPPING_SBG_BGF` (
+ `asbg_vlan` smallint(6) NOT NULL,
+ `bgf_vlan` smallint(6) NOT NULL,
+ PRIMARY KEY (`asbg_vlan`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `NBNC_SERVICE`
+--
+
+DROP TABLE IF EXISTS `NBNC_SERVICE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `NBNC_SERVICE` (
+ `service_type` varchar(16) NOT NULL,
+ `service_model_uuid` varchar(64) NOT NULL,
+ `description` varchar(128) DEFAULT NULL,
+ `created_timestamp` timestamp NULL DEFAULT NULL,
+ `updated_timestamp` timestamp NULL DEFAULT NULL,
+ PRIMARY KEY (`service_type`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `NBNC_SERVICE_VLAN`
+--
+
+DROP TABLE IF EXISTS `NBNC_SERVICE_VLAN`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `NBNC_SERVICE_VLAN` (
+ `be_id` varchar(32) NOT NULL,
+ `vlan` smallint(6) NOT NULL,
+ `service_type` varchar(16) DEFAULT NULL,
+ `be_type` varchar(16) DEFAULT NULL,
+ `be_name` varchar(32) DEFAULT NULL,
+ `be_host_vnf_id` varchar(32) DEFAULT NULL,
+ `be_location` varchar(16) DEFAULT NULL,
+ `be_usage_order` smallint(6) DEFAULT NULL,
+ `vlan_usage_order` smallint(6) DEFAULT NULL,
+ `status` varchar(16) DEFAULT 'AVAILABLE',
+ `request_id` varchar(64) DEFAULT NULL,
+ `service_instance_id` varchar(64) DEFAULT NULL,
+ `vni_id` varchar(16) DEFAULT NULL,
+ `customer_id` varchar(16) DEFAULT NULL,
+ `ipe1_router_name` varchar(32) DEFAULT NULL,
+ `ipe1_port_id` varchar(16) DEFAULT NULL,
+ `ipe1_ae_name` varchar(16) DEFAULT NULL,
+ `ipe2_router_name` varchar(32) DEFAULT NULL,
+ `ipe2_port_id` varchar(16) DEFAULT NULL,
+ `ipe2_ae_name` varchar(16) DEFAULT NULL,
+ `available_timestamp` timestamp NULL DEFAULT NULL,
+ `allocated_timestamp` timestamp NULL DEFAULT NULL,
+ `disabled_timestamp` timestamp NULL DEFAULT NULL,
+ `enabled_timestamp` timestamp NULL DEFAULT NULL,
+ `vpn_id` varchar(12) DEFAULT NULL,
+ `vpn_rt` varchar(16) DEFAULT NULL,
+ PRIMARY KEY (`be_id`,`vlan`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `NETWORK_PROFILE`
+--
+
+DROP TABLE IF EXISTS `NETWORK_PROFILE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `NETWORK_PROFILE` (
+ `network_type` varchar(100) NOT NULL,
+ `technology` varchar(100) NOT NULL,
+ PRIMARY KEY (`network_type`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `NETWORK_ROLE_VPN_BINDING`
+--
+
+DROP TABLE IF EXISTS `NETWORK_ROLE_VPN_BINDING`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `NETWORK_ROLE_VPN_BINDING` (
+ `network_role` varchar(80) NOT NULL,
+ `vpn_id` varchar(80) NOT NULL,
+ PRIMARY KEY (`network_role`,`vpn_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `NODE_TYPES`
+--
+
+DROP TABLE IF EXISTS `NODE_TYPES`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `NODE_TYPES` (
+ `nodetype` varchar(80) NOT NULL,
+ PRIMARY KEY (`nodetype`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `PARAMETERS`
+--
+
+DROP TABLE IF EXISTS `PARAMETERS`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `PARAMETERS` (
+ `name` varchar(100) NOT NULL,
+ `value` varchar(24) NOT NULL,
+ `category` varchar(24) DEFAULT NULL,
+ `memo` varchar(128) DEFAULT NULL,
+ PRIMARY KEY (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `PHYSICAL_LINK`
+--
+
+DROP TABLE IF EXISTS `PHYSICAL_LINK`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `PHYSICAL_LINK` (
+ `link_name` varchar(255) NOT NULL,
+ `speed_value` varchar(64) DEFAULT NULL,
+ `speed_units` varchar(64) DEFAULT NULL,
+ `circuit_id` varchar(255) NOT NULL,
+ `dual_mode` varchar(64) NOT NULL,
+ PRIMARY KEY (`link_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `PHYSICAL_LINK_PINTERFACE`
+--
+
+DROP TABLE IF EXISTS `PHYSICAL_LINK_PINTERFACE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `PHYSICAL_LINK_PINTERFACE` (
+ `link_name` varchar(255) NOT NULL,
+ `hostname` varchar(255) NOT NULL,
+ `port_name_ft` varchar(255) NOT NULL,
+ PRIMARY KEY (`link_name`,`hostname`,`port_name_ft`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `PINTERFACE`
+--
+
+DROP TABLE IF EXISTS `PINTERFACE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `PINTERFACE` (
+ `hostname` varchar(255) NOT NULL,
+ `port_name_ft` varchar(255) NOT NULL,
+ `interface_name` varchar(255) DEFAULT '',
+ `physical_speed` varchar(255) DEFAULT '',
+ `physical_units` varchar(255) DEFAULT '',
+ `port_description` varchar(255) DEFAULT '',
+ PRIMARY KEY (`hostname`,`port_name_ft`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `PORTAL_USERS`
+--
+
+DROP TABLE IF EXISTS `PORTAL_USERS`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `PORTAL_USERS` (
+ `email` varchar(64) NOT NULL,
+ `password` varbinary(255) NOT NULL,
+ `privilege` char(1) NOT NULL,
+ PRIMARY KEY (`email`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `PRE_LOAD_VNF_DATA`
+--
+
+DROP TABLE IF EXISTS `PRE_LOAD_VNF_DATA`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `PRE_LOAD_VNF_DATA` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `svc_request_id` varchar(100) DEFAULT '',
+ `svc_action` varchar(40) DEFAULT '',
+ `status` varchar(10) NOT NULL DEFAULT 'pending',
+ `filename` varchar(100) NOT NULL,
+ `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `preload_data` longblob,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=105 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `PRE_LOAD_VNF_NETWORK_DATA`
+--
+
+DROP TABLE IF EXISTS `PRE_LOAD_VNF_NETWORK_DATA`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `PRE_LOAD_VNF_NETWORK_DATA` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `svc_request_id` varchar(100) DEFAULT '',
+ `svc_action` varchar(40) DEFAULT '',
+ `status` varchar(10) NOT NULL DEFAULT 'pending',
+ `filename` varchar(100) NOT NULL,
+ `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `preload_data` longblob,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `PSERVER`
+--
+
+DROP TABLE IF EXISTS `PSERVER`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `PSERVER` (
+ `hostname` varchar(255) NOT NULL,
+ `ptnii_equip_name` varchar(255) DEFAULT '',
+ `number_of_cpus` varchar(255) DEFAULT '',
+ `disk_in_gigabytes` varchar(255) DEFAULT '',
+ `ram_in_megabytes` varchar(255) DEFAULT '',
+ `equip_type` varchar(255) DEFAULT '',
+ `equip_vendor` varchar(255) DEFAULT '',
+ `equip_model` varchar(255) DEFAULT '',
+ `fqdn` varchar(255) DEFAULT '',
+ `pserver_selflink` varchar(255) DEFAULT '',
+ `ipv4_oam_address` varchar(40) DEFAULT NULL,
+ `serial_number` varchar(255) DEFAULT '',
+ `pserver_id` varchar(255) DEFAULT '',
+ `internet_topology` varchar(40) DEFAULT '',
+ `aic_site_id` varchar(100) DEFAULT '',
+ `in_maint` varchar(5) DEFAULT '',
+ `pserver_name2` varchar(255) DEFAULT '',
+ `purpose` varchar(255) DEFAULT '',
+ PRIMARY KEY (`hostname`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `RANGE_RULE`
+--
+
+DROP TABLE IF EXISTS `RANGE_RULE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `RANGE_RULE` (
+ `range_rule_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `range_name` varchar(50) NOT NULL,
+ `service_model` varchar(50) NOT NULL,
+ `end_point_position` varchar(50) NOT NULL,
+ `equipment_level` varchar(50) NOT NULL,
+ `min_value` int(11) NOT NULL,
+ `max_value` int(11) NOT NULL,
+ PRIMARY KEY (`range_rule_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `RESOURCE`
+--
+
+DROP TABLE IF EXISTS `RESOURCE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `RESOURCE` (
+ `resource_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `asset_id` varchar(100) NOT NULL,
+ `resource_name` varchar(50) NOT NULL,
+ `resource_type` enum('Limit','Label','Range') NOT NULL,
+ `lt_used` bigint(20) DEFAULT NULL,
+ `ll_label` varchar(50) DEFAULT NULL,
+ `ll_reference_count` smallint(6) DEFAULT NULL,
+ `rr_used` varchar(4000) DEFAULT NULL,
+ PRIMARY KEY (`resource_id`),
+ UNIQUE KEY `resource_id` (`resource_id`),
+ UNIQUE KEY `IX1_RESOURCE` (`asset_id`,`resource_name`)
+) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `RESOURCE_LOAD`
+--
+
+DROP TABLE IF EXISTS `RESOURCE_LOAD`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `RESOURCE_LOAD` (
+ `resource_load_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `resource_id` bigint(20) NOT NULL,
+ `application_id` varchar(20) NOT NULL,
+ `resource_load_time` datetime NOT NULL,
+ `resource_expiration_time` datetime DEFAULT NULL,
+ PRIMARY KEY (`resource_load_id`),
+ UNIQUE KEY `resource_load_id` (`resource_load_id`),
+ UNIQUE KEY `IX2_RESOURCE_LOAD` (`resource_id`,`application_id`),
+ KEY `IX1_RESOURCE_LOAD` (`resource_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `RESOURCE_LOCK`
+--
+
+DROP TABLE IF EXISTS `RESOURCE_LOCK`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `RESOURCE_LOCK` (
+ `resource_lock_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `resource_name` varchar(50) NOT NULL,
+ `lock_holder` varchar(100) NOT NULL,
+ `lock_count` smallint(6) NOT NULL,
+ `lock_time` datetime NOT NULL,
+ `expiration_time` datetime NOT NULL,
+ PRIMARY KEY (`resource_lock_id`),
+ UNIQUE KEY `resource_lock_id` (`resource_lock_id`),
+ UNIQUE KEY `IX1_RESOURCE_LOCK` (`resource_name`)
+) ENGINE=InnoDB AUTO_INCREMENT=2951 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `RESOURCE_RULE`
+--
+
+DROP TABLE IF EXISTS `RESOURCE_RULE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `RESOURCE_RULE` (
+ `resource_rule_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `resource_name` varchar(50) NOT NULL,
+ `service_model` varchar(50) NOT NULL,
+ `end_point_position` varchar(50) NOT NULL,
+ `service_expression` varchar(2000) NOT NULL,
+ `equipment_level` varchar(50) NOT NULL,
+ `equipment_expression` varchar(2000) NOT NULL,
+ `allocation_expression` varchar(2000) NOT NULL,
+ `soft_limit_expression` varchar(2000) NOT NULL,
+ `hard_limit_expression` varchar(2000) NOT NULL,
+ PRIMARY KEY (`resource_rule_id`),
+ UNIQUE KEY `resource_rule_id` (`resource_rule_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `RESOURCE_THRESHOLD`
+--
+
+DROP TABLE IF EXISTS `RESOURCE_THRESHOLD`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `RESOURCE_THRESHOLD` (
+ `resource_threshold_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `resource_rule_id` bigint(20) NOT NULL,
+ `threshold_expression` varchar(2000) NOT NULL,
+ `threshold_message` varchar(2000) NOT NULL,
+ PRIMARY KEY (`resource_threshold_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `SERVICE_HOMING`
+--
+
+DROP TABLE IF EXISTS `SERVICE_HOMING`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `SERVICE_HOMING` (
+ `service_type` varchar(100) NOT NULL,
+ `lata` int(3) NOT NULL,
+ `hubbing_city_type` varchar(40) NOT NULL,
+ `latitude` float DEFAULT NULL,
+ `longitude` float DEFAULT NULL,
+ `primary_aic_site_name` varchar(100) NOT NULL,
+ `secondary_aic_site_name` varchar(100) DEFAULT NULL,
+ `tertiary_aic_site_name` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`service_type`,`lata`,`hubbing_city_type`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `SERVICE_HOMING_BACKUP`
+--
+
+DROP TABLE IF EXISTS `SERVICE_HOMING_BACKUP`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `SERVICE_HOMING_BACKUP` (
+ `service_type` varchar(100) NOT NULL,
+ `lata` int(3) NOT NULL,
+ `hubbing_city_type` varchar(40) NOT NULL,
+ `latitude` float DEFAULT NULL,
+ `longitude` float DEFAULT NULL,
+ `primary_aic_site_name` varchar(100) NOT NULL,
+ `secondary_aic_site_name` varchar(100) DEFAULT NULL,
+ `tertiary_aic_site_name` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`service_type`,`lata`,`hubbing_city_type`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `SERVICE_MANAGER_CREDENTIALS`
+--
+
+DROP TABLE IF EXISTS `SERVICE_MANAGER_CREDENTIALS`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `SERVICE_MANAGER_CREDENTIALS` (
+ `service_manager_username` varchar(255) NOT NULL,
+ `service_manager_password` varbinary(255) NOT NULL,
+ PRIMARY KEY (`service_manager_username`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `SERVICE_RESOURCE`
+--
+
+DROP TABLE IF EXISTS `SERVICE_RESOURCE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `SERVICE_RESOURCE` (
+ `service_resource_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `service_instance_id` varchar(80) NOT NULL,
+ `service_status` enum('Active','Pending') NOT NULL,
+ `service_change_number` smallint(6) NOT NULL,
+ `resource_set_id` varchar(100) NOT NULL,
+ `resource_union_id` varchar(100) NOT NULL,
+ PRIMARY KEY (`service_instance_id`,`service_change_number`),
+ UNIQUE KEY `service_resource_id` (`service_resource_id`),
+ KEY `IX1_SERVICE_RESOURCE` (`service_instance_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2203 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `SVC_LOGIC`
+--
+
+DROP TABLE IF EXISTS `SVC_LOGIC`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `SVC_LOGIC` (
+ `module` varchar(80) NOT NULL,
+ `rpc` varchar(80) NOT NULL,
+ `version` varchar(40) NOT NULL,
+ `mode` varchar(5) NOT NULL,
+ `active` varchar(1) NOT NULL,
+ `graph` longblob,
+ PRIMARY KEY (`module`,`rpc`,`version`,`mode`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `TENANT`
+--
+
+DROP TABLE IF EXISTS `TENANT`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `TENANT` (
+ `tenant_id` varchar(255) NOT NULL,
+ `tenant_name` varchar(255) NOT NULL,
+ `service_instance_id` varchar(255) NOT NULL,
+ PRIMARY KEY (`tenant_id`,`tenant_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `THRESHOLD_NOTIFICATION`
+--
+
+DROP TABLE IF EXISTS `THRESHOLD_NOTIFICATION`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `THRESHOLD_NOTIFICATION` (
+ `resource_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `threshold_expression` varchar(2000) DEFAULT NULL,
+ `threshold_message` varchar(500) DEFAULT NULL,
+ PRIMARY KEY (`resource_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+
+--
+-- Table structure for table `VENDOR_CODE`
+--
+
+DROP TABLE IF EXISTS `VENDOR_CODE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VENDOR_CODE` (
+ `vendor_code` varchar(1) NOT NULL,
+ `vendor` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`vendor_code`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VLAN_ID_POOL`
+--
+
+DROP TABLE IF EXISTS `VLAN_ID_POOL`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VLAN_ID_POOL` (
+ `aic_site_id` varchar(100) NOT NULL,
+ `purpose` varchar(40) NOT NULL,
+ `status` varchar(40) NOT NULL,
+ `vlan_id` int(4) NOT NULL,
+ `svc_instance_id` varchar(80) DEFAULT NULL,
+ `availability_zone` varchar(100) DEFAULT NULL,
+ `vplspe_name` varchar(80) DEFAULT NULL,
+ PRIMARY KEY (`vlan_id`,`aic_site_id`,`purpose`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VLAN_L3INTERFACE_IPV4_ADDRESS`
+--
+
+DROP TABLE IF EXISTS `VLAN_L3INTERFACE_IPV4_ADDRESS`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VLAN_L3INTERFACE_IPV4_ADDRESS` (
+ `vnf_id` varchar(80) NOT NULL,
+ `interface_name` varchar(255) NOT NULL,
+ `vlan_interface` varchar(255) NOT NULL,
+ `l3_interface_ipv4_address` varchar(64) NOT NULL,
+ `l3_interface_ipv4_prefix_length` varchar(45) DEFAULT NULL,
+ `vlan_id_inner` varchar(45) DEFAULT NULL,
+ `vlan_id_outer` varchar(45) DEFAULT NULL,
+ `is_floating` varchar(1) DEFAULT NULL,
+ PRIMARY KEY (`vnf_id`,`interface_name`,`vlan_interface`,`l3_interface_ipv4_address`),
+ KEY `FK_VLAN_L3INTERFACE_IPV4_ADDRESS_LINTERFACE_VLAN_IDX` (`vnf_id`,`interface_name`),
+ CONSTRAINT `FK_VLAN_L3INTERFACE_IPV4_ADDRESS_LINTERFACE_VLAN` FOREIGN KEY (`vnf_id`, `interface_name`, `vlan_interface`) REFERENCES `LINTERFACE_VLAN` (`vnf_id`, `interface_name`, `vlan_interface`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VLAN_L3INTERFACE_IPV6_ADDRESS`
+--
+
+DROP TABLE IF EXISTS `VLAN_L3INTERFACE_IPV6_ADDRESS`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VLAN_L3INTERFACE_IPV6_ADDRESS` (
+ `vnf_id` varchar(80) NOT NULL,
+ `interface_name` varchar(255) NOT NULL,
+ `vlan_interface` varchar(255) NOT NULL,
+ `l3_interface_ipv6_address` varchar(64) NOT NULL,
+ `l3_interface_ipv6_prefix_length` varchar(45) DEFAULT NULL,
+ `vlan_id_inner` varchar(45) DEFAULT NULL,
+ `vlan_id_outer` varchar(45) DEFAULT NULL,
+ `is_floating` varchar(1) DEFAULT NULL,
+ PRIMARY KEY (`vnf_id`,`interface_name`,`vlan_interface`,`l3_interface_ipv6_address`),
+ KEY `FK_VLAN_L3INTERFACE_IPV6_ADDRESS_LINTERFACE_VLAN_IDX` (`vnf_id`,`interface_name`,`vlan_interface`),
+ CONSTRAINT `FK_VLAN_L3INTERFACE_IPV6_ADDRESS_LINTERFACE_VLAN` FOREIGN KEY (`vnf_id`, `interface_name`, `vlan_interface`) REFERENCES `LINTERFACE_VLAN` (`vnf_id`, `interface_name`, `vlan_interface`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VLAN_PLAN_ID`
+--
+
+DROP TABLE IF EXISTS `VLAN_PLAN_ID`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VLAN_PLAN_ID` (
+ `plan_type` varchar(40) NOT NULL,
+ `purpose` varchar(40) NOT NULL,
+ `vlan_plan_id_count` int(4) NOT NULL,
+ PRIMARY KEY (`vlan_plan_id_count`,`plan_type`,`purpose`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VLAN_POOL`
+--
+
+DROP TABLE IF EXISTS `VLAN_POOL`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VLAN_POOL` (
+ `aic_site_id` varchar(100) NOT NULL,
+ `availability_zone` varchar(100) NOT NULL,
+ `vlan_plan_id` varchar(100) NOT NULL,
+ `plan_type` varchar(40) NOT NULL,
+ `purpose` varchar(40) NOT NULL,
+ `vlan_id` int(4) NOT NULL,
+ `status` varchar(40) NOT NULL,
+ `reserved_id` varchar(80) DEFAULT NULL,
+ PRIMARY KEY (`aic_site_id`,`availability_zone`,`vlan_plan_id`,`plan_type`,`purpose`,`vlan_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VLAN_RANGES`
+--
+
+DROP TABLE IF EXISTS `VLAN_RANGES`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VLAN_RANGES` (
+ `vlan_plan_id` varchar(100) NOT NULL,
+ `plan_type` varchar(40) NOT NULL,
+ `purpose` varchar(40) NOT NULL,
+ `range_start` int(4) NOT NULL,
+ `range_end` int(4) NOT NULL,
+ `generated` char(1) DEFAULT NULL,
+ PRIMARY KEY (`vlan_plan_id`,`plan_type`,`purpose`,`range_start`,`range_end`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VM_NETWORKS`
+--
+
+DROP TABLE IF EXISTS `VM_NETWORKS`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VM_NETWORKS` (
+ `vnf_type` varchar(200) NOT NULL,
+ `vm_type` varchar(45) NOT NULL,
+ `network_role` varchar(45) NOT NULL,
+ `assign_ips` tinyint(1) NOT NULL,
+ `assign_macs` tinyint(1) NOT NULL,
+ `assign_floating_ip` tinyint(1) NOT NULL,
+ `ip_count` int(11) DEFAULT NULL,
+ PRIMARY KEY (`vnf_type`,`vm_type`,`network_role`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VM_PROFILE`
+--
+
+DROP TABLE IF EXISTS `VM_PROFILE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VM_PROFILE` (
+ `vnf_type` varchar(200) NOT NULL,
+ `vm_type` varchar(45) NOT NULL,
+ `vm_count` int(11) NOT NULL,
+ PRIMARY KEY (`vnf_type`,`vm_type`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VNF`
+--
+
+DROP TABLE IF EXISTS `VNF`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VNF` (
+ `vnf_id` varchar(80) NOT NULL,
+ `vnf_name` varchar(80) NOT NULL,
+ `vnf_type` varchar(10) NOT NULL,
+ `orchestration_status` varchar(20) DEFAULT NULL,
+ `heat_stack_id` varchar(80) DEFAULT NULL,
+ `mso_catalog_key` varchar(80) DEFAULT NULL,
+ `availability_zone` varchar(80) DEFAULT NULL,
+ `aic_site_id` varchar(80) DEFAULT NULL,
+ `oam_ipv4_address` varchar(20) DEFAULT NULL,
+ `vnf_name2` varchar(80) DEFAULT NULL,
+ `vpe_id` varchar(80) NOT NULL,
+ `ipv4_loopback0_address` varchar(80) DEFAULT NULL,
+ `license_key` varchar(256) DEFAULT NULL,
+ `entitlement_resource_uuid` varchar(256) DEFAULT NULL,
+ PRIMARY KEY (`vnf_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VNF_IMAGE`
+--
+
+DROP TABLE IF EXISTS `VNF_IMAGE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VNF_IMAGE` (
+ `application_vendor` varchar(255) NOT NULL,
+ `application_version` varchar(255) NOT NULL,
+ `att_uuid` varchar(255) NOT NULL,
+ `application` varchar(255) DEFAULT NULL,
+ `selflink` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`application_vendor`,`application_version`,`att_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VNF_MODEL_LICENSES`
+--
+
+DROP TABLE IF EXISTS `VNF_MODEL_LICENSES`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VNF_MODEL_LICENSES` (
+ `att_part_number` varchar(255) NOT NULL,
+ `license_assignment_group` varchar(255) NOT NULL,
+ `license_required` tinyint(1) DEFAULT NULL,
+ `entitlement_assignment_group` varchar(255) DEFAULT NULL,
+ `entitlement_required` tinyint(1) DEFAULT NULL,
+ `feature_group_uuid` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`att_part_number`,`license_assignment_group`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VNF_MODEL_LICENSE_FEATURES`
+--
+
+DROP TABLE IF EXISTS `VNF_MODEL_LICENSE_FEATURES`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VNF_MODEL_LICENSE_FEATURES` (
+ `att_part_number` varchar(255) NOT NULL,
+ `license_assignment_group` varchar(255) NOT NULL,
+ `feature` varchar(255) NOT NULL,
+ PRIMARY KEY (`att_part_number`,`license_assignment_group`,`feature`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VNF_NETWORKS`
+--
+
+DROP TABLE IF EXISTS `VNF_NETWORKS`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VNF_NETWORKS` (
+ `vnf_type` varchar(200) NOT NULL,
+ `network_role` varchar(45) NOT NULL,
+ PRIMARY KEY (`vnf_type`,`network_role`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VNF_NETWORK_CONNECTION`
+--
+
+DROP TABLE IF EXISTS `VNF_NETWORK_CONNECTION`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VNF_NETWORK_CONNECTION` (
+ `connection_uuid` varchar(80) NOT NULL,
+ `vnf_id` varchar(80) NOT NULL,
+ `connection_id` varchar(80) DEFAULT NULL,
+ `connection_type` varchar(20) DEFAULT NULL,
+ `neutron_network_id` varchar(80) DEFAULT NULL,
+ `neutron_network_name` varchar(80) DEFAULT NULL,
+ `orchestration_status` varchar(20) DEFAULT NULL,
+ `switch_id` varchar(40) DEFAULT NULL,
+ `heat_stack_id` varchar(80) DEFAULT NULL,
+ `mso_catalog_key` varchar(80) DEFAULT NULL,
+ `provider_network` varchar(80) DEFAULT NULL,
+ `port_group_id` varchar(80) DEFAULT NULL,
+ `port_group_name` varchar(80) DEFAULT NULL,
+ PRIMARY KEY (`connection_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VNF_NETWORK_CONNECTION_VLAN`
+--
+
+DROP TABLE IF EXISTS `VNF_NETWORK_CONNECTION_VLAN`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VNF_NETWORK_CONNECTION_VLAN` (
+ `vlan_uuid` varchar(80) NOT NULL,
+ `vlan_id` int(4) NOT NULL,
+ `vlan_type` varchar(5) NOT NULL,
+ `connection_uuid` varchar(80) DEFAULT NULL,
+ PRIMARY KEY (`vlan_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VNF_PROFILE`
+--
+
+DROP TABLE IF EXISTS `VNF_PROFILE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VNF_PROFILE` (
+ `vnf_type` varchar(200) NOT NULL,
+ `availability_zone_count` int(11) NOT NULL,
+ `equipment_role` varchar(80) NOT NULL,
+ PRIMARY KEY (`vnf_type`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VPE_LOCK`
+--
+
+DROP TABLE IF EXISTS `VPE_LOCK`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VPE_LOCK` (
+ `vpe_name` varchar(20) NOT NULL,
+ `vpn_lock` varchar(20) NOT NULL,
+ PRIMARY KEY (`vpe_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VPE_POOL`
+--
+
+DROP TABLE IF EXISTS `VPE_POOL`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VPE_POOL` (
+ `vpe_name` varchar(20) NOT NULL,
+ `ipv4_oam_address` varchar(20) NOT NULL,
+ `loopback0_ipv4_address` varchar(20) NOT NULL,
+ `provisioning_status` varchar(10) NOT NULL,
+ `aic_site_id` varchar(100) NOT NULL,
+ `availability_zone` varchar(100) NOT NULL,
+ `vlan_id_outer` varchar(20) NOT NULL,
+ `vendor` varchar(20) NOT NULL,
+ `physical_intf_name` varchar(40) NOT NULL,
+ `physical_intf_speed` varchar(20) NOT NULL,
+ `physical_intf_units` varchar(20) NOT NULL,
+ `vpe_uuid` varchar(80) DEFAULT NULL,
+ `vpe_id` varchar(80) NOT NULL,
+ `image_filename` varchar(100) DEFAULT NULL,
+ `as_number` varchar(20) NOT NULL,
+ `loopback5000` varchar(16) DEFAULT NULL,
+ `loopback10` varchar(16) DEFAULT NULL,
+ PRIMARY KEY (`aic_site_id`,`vpe_name`,`availability_zone`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VPLSPE_POOL`
+--
+
+DROP TABLE IF EXISTS `VPLSPE_POOL`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VPLSPE_POOL` (
+ `vplspe_name` varchar(20) NOT NULL,
+ `aic_site_id` varchar(100) NOT NULL,
+ `availability_zone` varchar(100) NOT NULL,
+ `physical_intf_name` varchar(40) NOT NULL,
+ `physical_intf_speed` varchar(20) NOT NULL,
+ `physical_intf_units` varchar(20) NOT NULL,
+ `loopback0_ipv4_address` varchar(20) NOT NULL,
+ `vlan_id_outer` varchar(20) NOT NULL,
+ `vplspe_uuid` varchar(80) DEFAULT NULL,
+ `image_filename` varchar(100) DEFAULT NULL,
+ `provisioning_status` varchar(10) DEFAULT NULL,
+ `vendor` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`vplspe_name`,`aic_site_id`,`availability_zone`,`physical_intf_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VSERVER`
+--
+
+DROP TABLE IF EXISTS `VSERVER`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VSERVER` (
+ `tenant_id` varchar(40) NOT NULL,
+ `vserver_id` varchar(40) NOT NULL,
+ `aic_site_id` varchar(100) NOT NULL,
+ `vendor` varchar(20) NOT NULL,
+ `image_name` varchar(100) NOT NULL,
+ `vnf_type` varchar(10) NOT NULL,
+ `vnf_id` varchar(80) NOT NULL,
+ PRIMARY KEY (`tenant_id`,`vserver_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VSERVER2`
+--
+
+DROP TABLE IF EXISTS `VSERVER2`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VSERVER2` (
+ `tenant_id` varchar(255) NOT NULL,
+ `vserver_id` varchar(128) NOT NULL,
+ `vserver_name` varchar(255) NOT NULL,
+ `vserver_name2` varchar(255) DEFAULT NULL,
+ `prov_status` varchar(20) DEFAULT NULL,
+ `selflink` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`tenant_id`,`vserver_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `VSERVER_PSERVER`
+--
+
+DROP TABLE IF EXISTS `VSERVER_PSERVER`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VSERVER_PSERVER` (
+ `vserver_id` varchar(128) NOT NULL,
+ `pserver_hostname` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`vserver_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `WAN_COMBO_ALLOWABLE`
+--
+
+DROP TABLE IF EXISTS `WAN_COMBO_ALLOWABLE`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `WAN_COMBO_ALLOWABLE` (
+ `combo_sequence` int(11) NOT NULL AUTO_INCREMENT,
+ `internet_topology` varchar(20) DEFAULT NULL,
+ `wan1` varchar(40) DEFAULT NULL,
+ `wan2` varchar(40) DEFAULT NULL,
+ `new_start_release` char(5) DEFAULT NULL,
+ `description` varchar(128) NOT NULL,
+ PRIMARY KEY (`combo_sequence`),
+ UNIQUE KEY `IX1_WAN_COMBO_ALLOWABLE` (`internet_topology`,`wan1`,`wan2`)
+) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `emp1000`
+--
+
+DROP TABLE IF EXISTS `emp1000`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `emp1000` (
+ `firstName` varchar(20) DEFAULT NULL,
+ `lastName` varchar(20) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `linda`
+--
+
+DROP TABLE IF EXISTS `linda`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `linda` (
+ `c1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `testit`
+--
+
+DROP TABLE IF EXISTS `testit`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `testit` (
+ `c1` varchar(12) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `testtable`
+--
+
+DROP TABLE IF EXISTS `testtable`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `testtable` (
+ `city_code_id` int(11) NOT NULL AUTO_INCREMENT,
+ `city_code` varchar(3) NOT NULL,
+ `city` varchar(150) NOT NULL,
+ `state` varchar(10) NOT NULL,
+ `country_code` varchar(10) NOT NULL,
+ PRIMARY KEY (`city_code_id`),
+ KEY `IN1_testtable` (`city`,`state`,`country_code`)
+) ENGINE=InnoDB AUTO_INCREMENT=37756 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2016-11-23 16:01:55
diff --git a/installation/sdnc/src/main/scripts/installFeatures.sh b/installation/sdnc/src/main/scripts/installFeatures.sh
new file mode 100755
index 0000000..88a24f4
--- /dev/null
+++ b/installation/sdnc/src/main/scripts/installFeatures.sh
@@ -0,0 +1,108 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
+SDNC_HOME=${SDNC_HOME:-/opt/openecomp/sdnc}
+SDNC_FEATURE_DIR=${SDNC_FEATURE_DIR:-${SDNC_HOME}/features}
+
+SDNC_CORE_FEATURES=" \
+ dblib \
+ filters \
+ sli \
+ sliPluginUtils \
+ sliapi"
+
+SDNC_ADAPTORS_FEATURES=" \
+ aai-service \
+ mdsal-resource \
+ resource-assignment \
+ sql-resource"
+
+SDNC_NORTHBOUND_FEATURES=" \
+ asdcApi \
+ dataChange \
+ vnfapi \
+ vnftools"
+
+SDNC_PLUGINS_FEATURES=" \
+ properties-node \
+ restapi-call-node"
+
+
+SDNC_CORE_VERSION=${SDNC_CORE_VERSION:-0.0.1-SNAPSHOT}
+SDNC_ADAPTORS_VERSION=${SDNC_ADAPTORS_VERSION:-0.0.1-SNAPSHOT}
+SDNC_NORTHBOUND_VERSION=${SDNC_NORTHBOUND_VERSION:-0.0.1-SNAPSHOT}
+SDNC_PLUGINS_VERSION=${SDNC_PLUGINS_VERSION:-0.0.1-SNAPSHOT}
+
+echo "Enabling core features"
+${ODL_HOME}/bin/client -u karaf feature:install odl-mdsal-all
+${ODL_HOME}/bin/client -u karaf feature:install odl-mdsal-apidocs
+${ODL_HOME}/bin/client -u karaf feature:install odl-restconf-all
+
+
+
+
+echo "Installing SDN-C core"
+for feature in ${SDNC_CORE_FEATURES}
+do
+ if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ]
+ then
+ ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh
+ else
+ echo "No installer found for feature sdnc-${feature}"
+ fi
+done
+
+echo "Installing SDN-C adaptors"
+for feature in ${SDNC_ADAPTORS_FEATURES}
+do
+ if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ]
+ then
+ ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh
+ else
+ echo "No installer found for feature sdnc-${feature}"
+ fi
+done
+
+echo "Installing SDN-C northbound"
+for feature in ${SDNC_NORTHBOUND_FEATURES}
+do
+ if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ]
+ then
+ ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh
+ else
+ echo "No installer found for feature sdnc-${feature}"
+ fi
+done
+
+echo "Installing SDN-C plugins"
+for feature in ${SDNC_PLUGINS_FEATURES}
+do
+ if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ]
+ then
+ ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh
+ else
+ echo "No installer found for feature sdnc-${feature}"
+ fi
+done
diff --git a/installation/sdnc/src/main/scripts/installSdncDb.sh b/installation/sdnc/src/main/scripts/installSdncDb.sh
new file mode 100755
index 0000000..6f42e8f
--- /dev/null
+++ b/installation/sdnc/src/main/scripts/installSdncDb.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+SDNC_HOME=${SDNC_HOME:-/opt/openecomp/sdnc}
+MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
+
+SDNC_DB_USER=${SDNC_DB_USER:-sdnctl}
+SDNC_DB_PASSWD=${SDNC_DB_PASSWD:-gamma}
+SDNC_DB_DATABASE=${SDN_DB_DATABASE:-sdnctl}
+
+
+# Create tablespace and user account
+mysql -h dbhost -u root -p${MYSQL_PASSWD} mysql <<-END
+CREATE DATABASE ${SDNC_DB_DATABASE};
+CREATE USER '${SDNC_DB_USER}'@'localhost' IDENTIFIED BY '${SDNC_DB_PASSWD}';
+CREATE USER '${SDNC_DB_USER}'@'%' IDENTIFIED BY '${SDNC_DB_PASSWD}';
+GRANT ALL PRIVILEGES ON ${SDNC_DB_DATABASE}.* TO '${SDNC_DB_USER}'@'localhost' WITH GRANT OPTION;
+GRANT ALL PRIVILEGES ON ${SDNC_DB_DATABASE}.* TO '${SDNC_DB_USER}'@'%' WITH GRANT OPTION;
+commit;
+END
+
+if [ -f ${SDNC_HOME}/data/sdnctl.dump ]
+then
+ mysql -h dbhost -u root -p${MYSQL_PASSWD} sdnctl < ${SDNC_HOME}/data/sdnctl.dump
+fi
diff --git a/installation/sdnc/src/main/scripts/installZips.sh b/installation/sdnc/src/main/scripts/installZips.sh
new file mode 100755
index 0000000..0afb6a4
--- /dev/null
+++ b/installation/sdnc/src/main/scripts/installZips.sh
@@ -0,0 +1,116 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+SDNC_HOME=${SDNC_HOME:-/opt/openecomp/sdnc}
+
+targetDir=${1:-${SDNC_HOME}}
+featureDir=${targetDir}/features
+
+SDNC_CORE_FEATURES=" \
+ dblib \
+ filters \
+ sli \
+ sliPluginUtils \
+ sliapi"
+
+SDNC_ADAPTORS_FEATURES=" \
+ aai-service \
+ mdsal-resource \
+ resource-assignment \
+ sql-resource"
+
+SDNC_NORTHBOUND_FEATURES=" \
+ asdcApi \
+ dataChange \
+ vnfapi \
+ vnftools"
+
+SDNC_PLUGINS_FEATURES=" \
+ properties-node \
+ restapi-call-node"
+
+
+SDNC_CORE_VERSION=${SDNC_CORE_VERSION:-0.1.1}
+SDNC_ADAPTORS_VERSION=${SDNC_ADAPTORS_VERSION:-0.1.1}
+SDNC_NORTHBOUND_VERSION=${SDNC_NORTHBOUND_VERSION:-0.1.1}
+SDNC_PLUGINS_VERSION=${SDNC_PLUGINS_VERSION:-0.1.1}
+SDNC_OAM_VERSION=${SDNC_OAM_VERSION:-0.1.1}
+
+if [ ! -d ${targetDir} ]
+then
+ mkdir -p ${targetDir}
+fi
+
+if [ ! -d ${featureDir} ]
+then
+ mkdir -p ${featureDir}
+fi
+
+cwd=$(pwd)
+
+mavenOpts=${2:-"-s $cwd/../../jenkins-settings.xml"}
+cd /tmp
+
+echo "Installing SDN-C core version ${SDNC_CORE_VERSION}"
+for feature in ${SDNC_CORE_FEATURES}
+do
+ rm -f /tmp/${feature}-installer*.zip
+mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.openecomp.sdnc.core:${feature}-installer:${SDNC_CORE_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
+ unzip -d ${featureDir} /tmp/${feature}-installer*zip
+done
+
+echo "Installing SDN-C adaptors version ${SDNC_ADAPTORS_VERSION}"
+for feature in ${SDNC_ADAPTORS_FEATURES}
+do
+ rm -f /tmp/${feature}-installer*.zip
+mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.openecomp.sdnc.adaptors:${feature}-installer:${SDNC_ADAPTORS_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
+ unzip -d ${featureDir} /tmp/${feature}-installer*zip
+done
+
+echo "Installing SDN-C northbound version ${SDNC_NORTHBOUND_VERSION}"
+for feature in ${SDNC_NORTHBOUND_FEATURES}
+do
+ rm -f /tmp/${feature}-installer*.zip
+mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.openecomp.sdnc.northbound:${feature}-installer:${SDNC_NORTHBOUND_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
+ unzip -d ${featureDir} /tmp/${feature}-installer*zip
+done
+
+echo "Installing SDN-C plugins version ${SDNC_PLUGINS_VERSION}"
+for feature in ${SDNC_PLUGINS_FEATURES}
+do
+ rm -f /tmp/${feature}-installer*.zip
+mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.openecomp.sdnc.plugins:${feature}-installer:${SDNC_PLUGINS_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
+ unzip -d ${featureDir} /tmp/${feature}-installer*zip
+done
+
+
+
+echo "Installing platform-logic"
+rm -f /tmp/platform-logic-installer*.zip
+mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.openecomp.sdnc.oam:platform-logic-installer:${SDNC_OAM_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
+unzip -d ${targetDir} /tmp/platform-logic-installer*.zip
+
+find ${targetDir} -name '*.sh' -exec chmod +x '{}' \;
+
+cd $cwd
+
diff --git a/installation/sdnc/src/main/scripts/startODL.sh b/installation/sdnc/src/main/scripts/startODL.sh
new file mode 100755
index 0000000..93df96b
--- /dev/null
+++ b/installation/sdnc/src/main/scripts/startODL.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+
+# Install SDN-C platform components if not already installed and start container
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
+SDNC_HOME=${SDNC_HOME:-/opt/openecomp/sdnc}
+SLEEP_TIME=${SLEEP_TIME:-120}
+MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
+
+#
+# Wait for database
+#
+echo "Waiting for mysql"
+until mysql -h dbhost -u root -p${MYSQL_PASSWD} mysql &> /dev/null
+do
+ printf "."
+ sleep 1
+done
+echo -e "\nmysql ready"
+
+if [ ! -f ${SDNC_HOME}/.installed ]
+then
+ echo "Installing SDN-C database"
+ ${SDNC_HOME}/bin/installSdncDb.sh
+ echo "Starting OpenDaylight"
+ ${ODL_HOME}/bin/start
+ echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
+ sleep ${SLEEP_TIME}
+ echo "Installing SDN-C platform features"
+ ${SDNC_HOME}/bin/installFeatures.sh
+ if [ -x ${SDNC_HOME}/svclogic/bin/install.sh ]
+ then
+ echo "Installing directed graphs"
+ ${SDNC_HOME}/svclogic/bin/install.sh
+ fi
+
+
+ echo "Restarting OpenDaylight"
+ ${ODL_HOME}/bin/stop
+ echo "Installed at `date`" > ${SDNC_HOME}/.installed
+fi
+
+exec ${ODL_HOME}/bin/karaf
diff --git a/installation/src/main/properties/aaiclient.properties b/installation/src/main/properties/aaiclient.properties
new file mode 100644
index 0000000..485be8f
--- /dev/null
+++ b/installation/src/main/properties/aaiclient.properties
@@ -0,0 +1,249 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+#
+# Configuration file for A&AI Client
+#
+
+#
+# Certificate keystore and truststore
+#
+org.openecomp.sdnc.sli.aai.ssl.trust=/opt/openecomp/sdnc/data/stores/truststore.openecomp.client.jks
+org.openecomp.sdnc.sli.aai.ssl.trust.psswd=adminadmin
+org.openecomp.sdnc.sli.aai.host.certificate.ignore=true
+
+org.openecomp.sdnc.sli.aai.client.name=SDNC
+org.openecomp.sdnc.sli.aai.client.psswd=SDNC
+
+org.openecomp.sdnc.sli.aai.application=openECOMP
+#connection.timeout=1000
+#read.timeout=2000
+
+#
+# Configuration file for A&AI Client
+#
+org.openecomp.sdnc.sli.aai.uri=https://aai.api.simpledemo.openecomp.org:8443
+
+
+# query
+org.openecomp.sdnc.sli.aai.path.query=/aai/v8/search/sdn-zone-query
+org.openecomp.sdnc.sli.aai.query.nodes=/aai/v8/search/nodes-query?search-node-type={node-type}&filter={entity-identifier}:EQUALS:{entity-name}
+org.openecomp.sdnc.sli.aai.query.generic=/aai/v8/search/generic-query?key={identifier}:{value}&start-node-type={start-node-type}&include=complex&depth=3
+
+# named query
+org.openecomp.sdnc.sli.aai.query.named=/aai/search/named-query
+
+
+#update
+org.openecomp.sdnc.sli.aai.update=/aai/v8/actions/update
+
+# vce
+org.openecomp.sdnc.sli.aai.path.vce =/aai/v8/network/vces/vce/
+org.openecomp.sdnc.sli.aai.path.vces=/aai/v8/network/vces/
+
+# vpe
+org.openecomp.sdnc.sli.aai.path.vpe =/aai/v8/network/vpes/vpe/
+org.openecomp.sdnc.sli.aai.path.vpes=/aai/v8/network/vpes/
+
+# customer
+org.openecomp.sdnc.sli.aai.path.customer=/aai/v8/business/customers/customer/{customer-id}
+
+# service subscription
+org.openecomp.sdnc.sli.aai.path.service.subscription=/aai/v8/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}
+
+# service instance
+org.openecomp.sdnc.sli.aai.path.svcinst=/aai/v8/business/customers/customer/{customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances
+org.openecomp.sdnc.sli.aai.path.svcinst.query=/aai/v8/search/generic-query?key=service-instance.service-instance-id:{svc-instance-id}&start-node-type=service-instance&include=service-instance
+org.openecomp.sdnc.sli.aai.path.service.instance=/aai/v8/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id}
+
+# complex
+org.openecomp.sdnc.sli.aai.path.complexes=/aai/v8/cloud-infrastructure/complexes
+org.openecomp.sdnc.sli.aai.path.complex=/aai/v8/cloud-infrastructure/complexes/complex/{physical-location-id}
+
+# tenant
+org.openecomp.sdnc.sli.aai.path.tenant=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}
+org.openecomp.sdnc.sli.aai.path.tenant.query=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant?tenant-name={tenant-name}
+
+# vservers
+org.openecomp.sdnc.sli.aai.path.vservers=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/
+org.openecomp.sdnc.sli.aai.path.vserver=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}
+
+# vpls-pe
+org.openecomp.sdnc.sli.aai.path.vpls.pes=/aai/v8/network/vpls-pes/
+org.openecomp.sdnc.sli.aai.path.vpls.pe =/aai/v8/network/vpls-pes/vpls-pe/
+
+# ctag-pool
+org.openecomp.sdnc.sli.aai.path.ctag.pools=/aai/v8/cloud-infrastructure/complexes/complex/{physical-location-id}/ctag-pools
+org.openecomp.sdnc.sli.aai.path.ctag.pool=/aai/v8/cloud-infrastructure/complexes/complex/{physical-location-id}/ctag-pools/ctag-pool/{target-pe}/{availability-zone-name}
+
+#
+#-------------- 1510 ----------------------
+#
+
+# pservers
+org.openecomp.sdnc.sli.aai.path.pservers=/aai/v8/cloud-infrastructure/pservers
+org.openecomp.sdnc.sli.aai.path.pserver=/aai/v8/cloud-infrastructure/pservers/pserver/{hostname}
+
+# generic-vnf
+org.openecomp.sdnc.sli.aai.path.generic.vnfs=/aai/v8/network/generic-vnfs
+org.openecomp.sdnc.sli.aai.path.generic.vnf=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}
+
+# dvs-switch
+org.openecomp.sdnc.sli.aai.path.dvsswitches=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/dvs-switches
+org.openecomp.sdnc.sli.aai.path.dvsswitch=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/dvs-switches/dvs-switch/{switch-name}
+
+# L3 Networks
+org.openecomp.sdnc.sli.aai.path.l3networks=/aai/v8/network/l3-networks
+org.openecomp.sdnc.sli.aai.path.l3network=/aai/v8/network/l3-networks/l3-network/{network-id}
+org.openecomp.sdnc.sli.aai.path.l3network.query.name=/aai/v8/network/l3-networks/l3-network?network-name={network-name}
+
+# P-Interfaces
+org.openecomp.sdnc.sli.aai.path.pserver.pinterfaces=/aai/v8/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces
+org.openecomp.sdnc.sli.aai.path.pserver.pinterface=/aai/v8/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}
+
+# Physical Link
+org.openecomp.sdnc.sli.aai.path.physical.links=/aai/v8/network/physical-links
+org.openecomp.sdnc.sli.aai.path.physical.link=/aai/v8/network/physical-links/physical-link/{link-name}
+
+# VPN Bindings
+org.openecomp.sdnc.sli.aai.path.vpn.bindings=/aai/v8/network/vpn-bindings/
+org.openecomp.sdnc.sli.aai.path.vpn.binding=/aai/v8/network/vpn-bindings/vpn-binding/{vpn-id}
+
+# VNF IMAGES
+org.openecomp.sdnc.sli.aai.path.vnf.images=/aai/v8/service-design-and-creation/vnf-images
+org.openecomp.sdnc.sli.aai.path.vnf.image=/aai/v8/service-design-and-creation/vnf-images/vnf-image/{att-uuid}
+org.openecomp.sdnc.sli.aai.path.vnf.image.query=/aai/v8/service-design-and-creation/vnf-images/vnf-image?application={application_model}&application-vendor={application_vendor}
+
+# UBB Notify
+org.openecomp.sdnc.sli.aai.path.notify=/aai/v8/actions/notify
+org.openecomp.sdnc.sli.aai.notify.selflink.fqdn=https://aai.api.simpledemo.openecomp.org:8443/restconf/config/L3SDN-API:services/layer3-service-list/{service-instance-id}
+org.openecomp.sdnc.sli.aai.notify.selflink.avpn=https://aai.api.simpledemo.openecomp.org:8543/restconf/config/L3AVPN-EVC-API:services/service-list/{service-instance-id}/service-data/avpn-logicalchannel-information
+
+# Service
+org.openecomp.sdnc.sli.aai.path.service=/aai/v8/service-design-and-creation/services/service/{service-id}
+org.openecomp.sdnc.sli.aai.path.services=/aai/v8/service-design-and-creation/services
+
+
+#
+#-------------- 1604 ----------------------
+#
+
+# VNFC
+org.openecomp.sdnc.sli.aai.path.vnfc=/aai/v8/network/vnfcs/vnfc/{vnfc-name}
+
+# class-of-service
+org.openecomp.sdnc.sli.aai.path.class.of.service=/aai/v8/network/site-pair-sets/site-pair-set/{site-pair-set-id}/routing-instances/routing-instance/{routing-instance-id}/site-pairs/site-pair/{site-pair-id}/classes-of-service/class-of-service/{cos-id}
+
+# site-pair
+org.openecomp.sdnc.sli.aai.path.site.pair=/aai/v8/network/site-pair-sets/site-pair-set/{site-pair-set-id}/routing-instances/routing-instance/{routing-instance-id}/site-pairs/site-pair/{site-pair-id}
+
+# routing-instance
+org.openecomp.sdnc.sli.aai.path.routing.instance=/aai/v8/network/site-pair-sets/site-pair-set/{site-pair-set-id}/routing-instances/routing-instance/{routing-instance-id}
+
+# site-pair-set
+org.openecomp.sdnc.sli.aai.path.site.pair.set=/aai/v8/network/site-pair-sets/site-pair-set/{site-pair-set-id}
+
+# license key resource
+org.openecomp.sdnc.sli.aai.path.license.acquire=/aai/v8/actions/assignment/license-management/assignment-group-uuid/{assignment-group-uuid}
+org.openecomp.sdnc.sli.aai.path.license=/aai/v8/license-management/license-key-resources/license-key-resource/{att-uuid}
+
+# logical-link
+org.openecomp.sdnc.sli.aai.path.logical.link =/aai/v8/network/logical-links/logical-link/{link-name}
+
+# virtual-data-center
+org.openecomp.sdnc.sli.aai.path.virtual.data.center=/aai/v8/cloud-infrastructure/virtual-data-centers/virtual-data-center/{vdc-id}
+
+# wan-connector
+org.openecomp.sdnc.sli.aai.path.wan.connector=/aai/v8/business/connectors/connector/{resource-instance-id}
+
+# l-interface
+org.openecomp.sdnc.sli.aai.path.lag.interface.l.interface=/aai/v8/cloud-infrastructure/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{lag-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+org.openecomp.sdnc.sli.aai.path.p.interface.l.interface=/aai/v8/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces/p-interface/{p-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+
+# l-interface pnf
+org.openecomp.sdnc.sli.aai.path.lag.interface.l.interface.pnf=/aai/v8/network/pnfs/pnf/{pnf-name}/lag-interfaces/lag-interface/{lag-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+org.openecomp.sdnc.sli.aai.path.p.interface.l.interface.pnf=/aai/v8/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{p-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+
+# subinterface
+org.openecomp.sdnc.sli.aai.path.pnf.lag.interface.subinterface=/aai/v8/network/pnfs/pnf/{pnf-name}/lag-interfaces/lag-interface/{lag-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+org.openecomp.sdnc.sli.aai.path.pnf.p.interface.l.interface=/aai/v8/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{p-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+
+# vlans
+org.openecomp.sdnc.sli.aai.path.vlan=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}
+org.openecomp.sdnc.sli.aai.path.generic.vnf.vlan=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}
+
+# l3-interface-ipv4-address-list
+org.openecomp.sdnc.sli.aai.path.l3.interface.ipv4.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+org.openecomp.sdnc.sli.aai.path.vlan.l3.interface.ipv4.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+
+# l3-interface-ipv6-address-list
+org.openecomp.sdnc.sli.aai.path.l3.interface.ipv6.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+org.openecomp.sdnc.sli.aai.path.vlan.l3.interface.ipv6.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+
+# ipsec-configuration
+org.openecomp.sdnc.sli.aai.path.ipsec.configuration=/aai/v8/network/ipsec-configurations/ipsec-configuration/{ipsec-configuration-id}
+
+# vig server
+org.openecomp.sdnc.sli.aai.path.vig.server=/aai/v8/network/ipsec-configurations/ipsec-configuration/{ipsec-configuration-id}/vig-servers/vig-server/{vig-address-type}
+
+# l3-network
+org.openecomp.sdnc.sli.aai.path.l3.network=/aai/v8/network/l3-networks/l3-network/{network-id}
+
+# subnet
+org.openecomp.sdnc.sli.aai.path.subnet=/aai/v8/network/l3-networks/l3-network/{network-id}/subnets/subnet/{subnet-id}
+
+# multicast-configuration
+org.openecomp.sdnc.sli.aai.path.multicast.configuration=/aai/v8/network/multicast-configurations/multicast-configuration/{multicast-configuration-id}
+
+# org.openecomp.sdnc.sli.aai.path.l.interface.ipv4.address.list
+org.openecomp.sdnc.sli.aai.path.l3-interface.ipv4.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+
+# org.openecomp.sdnc.sli.aai.path.l.interface.vlan.ipv4.address.list
+org.openecomp.sdnc.sli.aai.path.l3-interface.vlan.ipv4.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+
+# org.openecomp.sdnc.sli.aai.path.l.interface.ipv6.address.list
+org.openecomp.sdnc.sli.aai.path.l3-interface.ipv6.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+
+# volume.group
+org.openecomp.sdnc.sli.aai.path.volume.group=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/volume-groups/volume-group/{volume-group-id}
+
+#cloud region
+org.openecomp.sdnc.sli.aai.path.cloud.region=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}
+
+# vf-module
+org.openecomp.sdnc.sli.aai.path.vf.module=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/vf-modules/vf-module/{vf-module-id}
+
+# l-interface through generic-vnf
+org.openecomp.sdnc.sli.aai.path.generic.vnf.linterface=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}
+
+# network-policy
+org.openecomp.sdnc.sli.aai.path.network.policy=/aai/v8/network/network-policies/network-policy/{network-policy-id}
+
+# pnf
+org.openecomp.sdnc.sli.aai.path.pnf=/aai/v8/network/pnfs/pnf/{pnf-name}
+
+#
+# Formatting
+#
+org.openecomp.sdnc.sli.aai.param.format=filter=%s:%s
+org.openecomp.sdnc.sli.aai.param.vnf_type=vnf-type
+org.openecomp.sdnc.sli.aai.param.physical.location.id=physical-location-id
+org.openecomp.sdnc.sli.aai.param.service.type=service-type
diff --git a/installation/src/main/properties/admportal.json b/installation/src/main/properties/admportal.json
new file mode 100755
index 0000000..830b762
--- /dev/null
+++ b/installation/src/main/properties/admportal.json
@@ -0,0 +1,68 @@
+{
+ "MainMenu": "gamma",
+ "dbConnLimit": "100",
+ "home": "/opt/admportal",
+ "sslEnabled": "false",
+ "nonSslPort": "8843",
+ "ConexusNetworkPort": "8443",
+ "AppNetworkPort": "8543",
+ "clusterPort": "8443",
+ "serviceHomingServiceType": "SDN-ETHERNET-INTERNET",
+ "passwordKey": "QtfJMKggVk",
+ "preloadImportDirectory": "C:/data/csv",
+ "clusterPrefixURL": "/jolokia/read/org.opendaylight.controller:Category=Shards,name=member-",
+ "clusterMidURL": "-shard-",
+ "clusterSuffixURL": "-config,type=DistributedConfigDatastore",
+ "shards": [
+ "default",
+ "inventory",
+ "topology"
+ ],
+ "dbFabric": "false",
+ "ip-addresses": {
+ "lo": "127.0.0.1",
+ "eth0": "127.0.0.1",
+ "docker0": "172.17.0.1",
+ "virbr0": "192.168.122.1"
+ },
+ "svclogicPropertiesDb01": "/opt/openecomp/sdnc/data/properties/svclogic.properties.sdnctldb01",
+ "databases": [
+ "dbhost|sdnctldb01"
+ ],
+ "dbFabricServer": "localhost",
+ "dbFabricPort": "32275",
+ "dbFabricGroupId": "hagroup1",
+ "dbFabricUser": "admin",
+ "dbFabricPassword": "admin",
+ "dbFabricDB": "mysql",
+ "dbUser": "sdnctl",
+ "dbPassword": "gamma",
+ "dbName": "sdnctl",
+ "odlProtocol": "http",
+ "odlHost": "sdnhost",
+ "odlConexusHost": "sdnhost",
+ "odlPort": "8181",
+ "odlConexusPort": "8181",
+ "odlUser": "admin",
+ "odlPasswd": "admin",
+ "ConexusNetwork_sslCert": "",
+ "ConexusNetwork_sslKey": "",
+ "AppNetwork_sslCert": "",
+ "AppNetwork_sslKey": "",
+ "hostnameList": [
+ {
+ "hname": "localhost"
+ }
+ ],
+ "shard_list": [
+ {
+ "shard_name": "default"
+ },
+ {
+ "shard_name": "inventory"
+ },
+ {
+ "shard_name": "topology"
+ }
+ ]
+}
diff --git a/installation/src/main/properties/admportal.log4js.json b/installation/src/main/properties/admportal.log4js.json
new file mode 100755
index 0000000..0f41e56
--- /dev/null
+++ b/installation/src/main/properties/admportal.log4js.json
@@ -0,0 +1,169 @@
+{
+ "appenders": [
+ {
+ "category": "accesslog",
+ "type" : "file",
+ "absolute": true,
+ "filename": "/opt/admportal/logs/accesslog.log"
+ },
+ {
+ "category" : "usertrace",
+ "type" : "file",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/usertrace.log"
+ },
+ {
+ "category": "tracelog",
+ "type" : "dateFile",
+ "absolute": true,
+ "filename": "/opt/admportal/logs/tracelog.log",
+ "pattern": "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "tunnel",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/tunnel.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "preload",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/preload.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "eipam",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/eipam.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "instar",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/instar.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "app",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/app.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "csp",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/csp.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "db",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/db.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "admin",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/admin.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "resalloc",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/resalloc.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "logs",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/applogs.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "sla",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/sla.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "gamma",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/gamma.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "odl",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/odl.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "mobility",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/mobility.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "ucpe",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/ucpe.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ },
+ {
+ "category" : "user",
+ "type" : "dateFile",
+ "absolute" : true,
+ "filename" : "/opt/admportal/logs/user.log",
+ "pattern" : "-yyyy-MM-dd",
+ "alwaysIncludePattern": true,
+ "backups" : 14
+ }
+ ]
+}
diff --git a/installation/src/main/properties/dblib.properties b/installation/src/main/properties/dblib.properties
new file mode 100644
index 0000000..fa81866
--- /dev/null
+++ b/installation/src/main/properties/dblib.properties
@@ -0,0 +1,37 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+# dblib.properrties
+org.openecomp.sdnc.sli.dbtype=jdbc
+
+org.openecomp.sdnc.sli.jdbc.hosts=sdnctldb01
+org.openecomp.sdnc.sli.jdbc.url=jdbc:mysql://dbhost:3306/sdnctl
+org.openecomp.sdnc.sli.jdbc.database=sdnctl
+org.openecomp.sdnc.sli.jdbc.user=sdnctl
+org.openecomp.sdnc.sli.jdbc.password=gamma
+org.openecomp.sdnc.sli.jdbc.connection.name=sdnctldb01
+org.openecomp.sdnc.sli.jdbc.connection.timeout=50
+org.openecomp.sdnc.sli.jdbc.request.timeout=100
+org.openecomp.sdnc.sli.jdbc.limit.init=10
+org.openecomp.sdnc.sli.jdbc.limit.min=10
+org.openecomp.sdnc.sli.jdbc.limit.max=20
+org.openecomp.dblib.connection.recovery=false
+
diff --git a/installation/src/main/properties/mdsal-resource.properties b/installation/src/main/properties/mdsal-resource.properties
new file mode 100644
index 0000000..62ad375
--- /dev/null
+++ b/installation/src/main/properties/mdsal-resource.properties
@@ -0,0 +1,27 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+org.openecomp.sdnc.sli.resource.mdsal.sdnc-user=admin
+org.openecomp.sdnc.sli.resource.mdsal.sdnc-passwd=admin
+org.openecomp.sdnc.sli.resource.mdsal.sdnc-host=localhost
+org.openecomp.sdnc.sli.resource.mdsal.sdnc-protocol=http
+org.openecomp.sdnc.sli.resource.mdsal.sdnc-port=8181
+
diff --git a/installation/src/main/properties/sql-resource.properties b/installation/src/main/properties/sql-resource.properties
new file mode 100644
index 0000000..3a08ebf
--- /dev/null
+++ b/installation/src/main/properties/sql-resource.properties
@@ -0,0 +1,23 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+org.openecomp.sdnc.resource.sql.cryptkey=QtfJMKggVk
+
diff --git a/installation/src/main/properties/svclogic.properties b/installation/src/main/properties/svclogic.properties
new file mode 100644
index 0000000..8f7c16e
--- /dev/null
+++ b/installation/src/main/properties/svclogic.properties
@@ -0,0 +1,29 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+org.openecomp.sdnc.sli.dbtype = dblib
+#Note : the next 4 fields are only used if org.openecomp.sdnc.sli.dbtype = jdbc
+org.openecomp.sdnc.sli.jdbc.url=jdbc:mysql://dbhost:3306/sdnctl
+org.openecomp.sdnc.sli.jdbc.database=sdnctl
+org.openecomp.sdnc.sli.jdbc.user=sdnctl
+org.openecomp.sdnc.sli.jdbc.password=gamma
+
+org.xml.sax.driver=org.apache.xerces.parsers.SAXParser
diff --git a/installation/src/main/properties/svclogic.properties.sdnctldb01 b/installation/src/main/properties/svclogic.properties.sdnctldb01
new file mode 100755
index 0000000..efc1cb3
--- /dev/null
+++ b/installation/src/main/properties/svclogic.properties.sdnctldb01
@@ -0,0 +1,29 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+org.openecomp.sdnc.sli.dbtype = dblib
+#Note : the next 4 fields are only used if org.openecomp.sdnc.sli.dbtype = jdbc
+org.openecomp.sdnc.sli.jdbc.url=jdbc:mysql://dbhost:3306/sdnctl
+org.openecomp.sdnc.sli.jdbc.database=sdnctl
+org.openecomp.sdnc.sli.jdbc.user=sdnctl
+org.openecomp.sdnc.sli.jdbc.password=gamma
+
+org.xml.sax.driver=org.apache.xerces.parsers.SAXParser
diff --git a/installation/src/main/stores/truststore.openecomp.client.jks b/installation/src/main/stores/truststore.openecomp.client.jks
new file mode 100644
index 0000000..6c854b4
--- /dev/null
+++ b/installation/src/main/stores/truststore.openecomp.client.jks
Binary files differ
diff --git a/installation/ubuntu/pom.xml b/installation/ubuntu/pom.xml
new file mode 100644
index 0000000..603ba26
--- /dev/null
+++ b/installation/ubuntu/pom.xml
@@ -0,0 +1,102 @@
+<?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/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>installation</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>installation-ubuntu</artifactId>
+ <version>1.0.0</version>
+
+ <name>Installation - ubuntu</name>
+ <description>Creates base ubuntu Docker container</description>
+
+ <properties>
+ <image.name>ecomp/ubuntu-sdnc-image</image.name>
+ </properties>
+
+
+ <build>
+ <plugins>
+
+
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.16.5</version>
+ <inherited>false</inherited>
+ <configuration>
+
+ <images>
+ <image>
+ <name>${image.name}</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+ <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
+ <tags>
+ <tag>${project.version}</tag>
+ <tag>latest</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-images</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-dockerfile</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/docker</directory>
+ <includes>
+ <include>Dockerfile</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+ </build>
+ <organization>
+ <name>openECOMP</name>
+ </organization>
+</project>
diff --git a/installation/ubuntu/src/main/docker/Dockerfile b/installation/ubuntu/src/main/docker/Dockerfile
new file mode 100644
index 0000000..4c6de28
--- /dev/null
+++ b/installation/ubuntu/src/main/docker/Dockerfile
@@ -0,0 +1,9 @@
+# Base ubuntu with added packages needed for open ecomp
+FROM ubuntu:14.04.5
+MAINTAINER SDN-C Team (sdnc@lists.openecomp.org)
+# Steps needed to run inside ATT
+#COPY sources.list /etc/apt
+#COPY my_key.pub /tmp
+#RUN apt-key add - < /tmp/my_key.pub
+# Add tools needed for OpenDaylight
+RUN apt-get update && apt-get install -y git openjdk-7-jdk maven2 mysql-client nodejs nodejs-legacy python-pip graphviz npm
diff --git a/jenkins-settings.xml b/jenkins-settings.xml
new file mode 100644
index 0000000..344994f
--- /dev/null
+++ b/jenkins-settings.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=2 tabstop=2: -->
+<!--
+ Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+ <profiles>
+ <profile>
+ <id>openecomp-release</id>
+ <repositories>
+ <repository>
+ <id>openecomp-release</id>
+ <name>openecomp-release</name>
+ <url>https://ecomp-nexus:8443/repository/maven-releases/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>openecomp-release</id>
+ <name>openecomp-release</name>
+ <url>https://ecomp-nexus:8443/repository/maven-releases/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+
+ <profile>
+ <id>openecomp-snapshots</id>
+ <repositories>
+ <repository>
+ <id>openecomp-snapshot</id>
+ <name>openecomp-snapshot</name>
+ <url>https://ecomp-nexus:8443/repository/maven-snapshots/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>openecomp-snapshot</id>
+ <name>openecomp-snapshot</name>
+ <url>https://ecomp-nexus:8443/repository/maven-snapshots/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ <profile>
+ <id>opendaylight-release</id>
+ <repositories>
+ <repository>
+ <id>opendaylight-mirror</id>
+ <name>opendaylight-mirror</name>
+ <url>https://nexus.opendaylight.org/content/repositories/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>opendaylight-mirror</id>
+ <name>opendaylight-mirror</name>
+ <url>https://nexus.opendaylight.org/content/repositories/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+
+ <profile>
+ <id>opendaylight-snapshots</id>
+ <repositories>
+ <repository>
+ <id>opendaylight-snapshot</id>
+ <name>opendaylight-snapshot</name>
+ <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>opendaylight-snapshot</id>
+ <name>opendaylight-snapshot</name>
+ <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <activeProfile>openecomp-release</activeProfile>
+ <activeProfile>openecomp-snapshots</activeProfile>
+ <activeProfile>opendaylight-release</activeProfile>
+ <activeProfile>opendaylight-snapshots</activeProfile>
+ </activeProfiles>
+
+ <servers>
+ <server>
+ <id>nexus</id>
+ <username>${ecomp.nexus.user}</username>
+ <password>${ecomp.nexus.password}</password>
+ </server>
+ <server>
+ <id>openecomp-release</id>
+ <username>${ecomp.nexus.user}</username>
+ <password>${ecomp.nexus.password}</password>
+ </server>
+ <server>
+ <id>openecomp-snapshot</id>
+ <username>${ecomp.nexus.user}</username>
+ <password>${ecomp.nexus.password}</password>
+ </server>
+ <server>
+ <id>sdnc-javadoc</id>
+ <username>${ecomp.nexus.user}</username>
+ <password>${ecomp.nexus.password}</password>
+ </server>
+ </servers>
+</settings>
diff --git a/platform-logic/.gitignore b/platform-logic/.gitignore
new file mode 100644
index 0000000..1b8a6ba
--- /dev/null
+++ b/platform-logic/.gitignore
@@ -0,0 +1,12 @@
+org.eclipse.core.resources.prefs
+.classpath
+.project
+.settings
+.idea
+.externalToolBuilders
+maven-eclipse.xml
+*.class
+target/
+MANIFEST.MF
+.DS_STORE
+.metadata
diff --git a/platform-logic/asdc-api/pom.xml b/platform-logic/asdc-api/pom.xml
new file mode 100644
index 0000000..bfc340b
--- /dev/null
+++ b/platform-logic/asdc-api/pom.xml
@@ -0,0 +1,58 @@
+<?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/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>platform-logic</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>platform-logic-asdcapi</artifactId>
+ <version>1.0.0</version>
+
+ <name>Platform Logic : ASDC-API</name>
+ <description>Contains platform-level service logic for the ASDC-API</description>
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-version</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>../target/graphs/asdcapi</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/xml</directory>
+ <includes>
+ <include>*.xml</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>graph.versions</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/platform-logic/asdc-api/src/main/json/vf-license-model-update.json b/platform-logic/asdc-api/src/main/json/vf-license-model-update.json
new file mode 100644
index 0000000..686c8af
--- /dev/null
+++ b/platform-logic/asdc-api/src/main/json/vf-license-model-update.json
@@ -0,0 +1,346 @@
+
+
+
+[
+ {
+ "id": "c7f3b902.c0fcc8",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 148,
+ "y": 123,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "72236e27.a51f78"
+ ]
+ ]
+ },
+ {
+ "id": "612aaed1.f30978",
+ "type": "comment",
+ "name": "ASDC update to VF license model",
+ "info": "",
+ "comments": "",
+ "x": 550,
+ "y": 45,
+ "z": "b94f5cde.40937",
+ "wires": []
+ },
+ {
+ "id": "72236e27.a51f78",
+ "type": "service-logic",
+ "name": "ASDC-API 1.0.0",
+ "module": "ASDC-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='ASDC-API' version='${project.version}'>",
+ "outputs": 1,
+ "x": 340,
+ "y": 124,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "e6c56f71.e6a96"
+ ]
+ ]
+ },
+ {
+ "id": "e6c56f71.e6a96",
+ "type": "method",
+ "name": "method vf-license-model-update",
+ "xml": "<method rpc='vf-license-model-update' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 588,
+ "y": 124,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "90b82ce5.7ff2a"
+ ]
+ ]
+ },
+ {
+ "id": "90b82ce5.7ff2a",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 222,
+ "y": 230,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "6a527c25.be62c4",
+ "b37c86cb.130b8",
+ "1c4b640e.56b174"
+ ]
+ ]
+ },
+ {
+ "id": "6a527c25.be62c4",
+ "type": "GenericXML",
+ "name": "record",
+ "xml": "<record plugin=\"com.att.sdnctl.sli.recording.Slf4jRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"vf-license-model\"/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 374,
+ "y": 230,
+ "z": "b94f5cde.40937",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "b37c86cb.130b8",
+ "type": "set",
+ "name": "set resource-plugin",
+ "xml": "<set>\n<parameter name='resource-plugin' value='com.att.sdnctl.sli.resource.gamma.GammaResource' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 410,
+ "y": 281,
+ "z": "b94f5cde.40937",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "1c4b640e.56b174",
+ "type": "switchNode",
+ "name": "switch: length of feature-group list > 0",
+ "xml": "<switch test='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group_length > 0`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 459,
+ "y": 344,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "1b40f4f1.7134f3"
+ ]
+ ]
+ },
+ {
+ "id": "1b40f4f1.7134f3",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 695,
+ "y": 343,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "9b76ec90.614c08"
+ ]
+ ]
+ },
+ {
+ "id": "9b76ec90.614c08",
+ "type": "for",
+ "name": "for: feature groups",
+ "xml": "<for index='i' start='0' end='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 855,
+ "y": 343,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "3dbfa83c.5d206"
+ ]
+ ]
+ },
+ {
+ "id": "44241b8a.fe4ddc",
+ "type": "save",
+ "name": "save VNF_MODEL_LICENSES",
+ "xml": "<save plugin='`$resource-plugin`' resource='vnf-model-licenses' key='att-part-number = $vf-license-model-update-input.vf-license-model.feature-group-list.feature-group[$i].att-part-number and license-assignment-group = $tmp-license-group' force='true'>\n<parameter name='att-part-number' value='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group[$i].att-part-number`' />\n<parameter name='license-assignment-group' value='`$tmp-license-group`'/>\n<parameter name='license-required' value='`$tmp-license-required`'/>\n<parameter name='entitlement-assignment-group' value='`$tmp-entitlement-group`'/>\n<parameter name='entitlement-required' value='`$tmp-entitlement-required`'/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1254,
+ "y": 544,
+ "z": "b94f5cde.40937",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "90633ed7.848e18",
+ "type": "switchNode",
+ "name": "switch: length of license key groups == 0",
+ "xml": "<switch test='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group[$i].license-key-group-list.license-key-group_length == 0`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1275,
+ "y": 294,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "a36e3c96.3c6238",
+ "fb2fe0dd.5e4d38"
+ ]
+ ]
+ },
+ {
+ "id": "a36e3c96.3c6238",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1523,
+ "y": 293,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "fc3c75a8.272ad"
+ ]
+ ]
+ },
+ {
+ "id": "fc3c75a8.272ad",
+ "type": "set",
+ "name": "set license required to 0",
+ "xml": "<set>\n<parameter name='tmp-license-required' value='0' />\n<parameter name='tmp-license-group' value='NONE' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1737,
+ "y": 293,
+ "z": "b94f5cde.40937",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "fb2fe0dd.5e4d38",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1521,
+ "y": 346,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "2d606ecc.b12bba"
+ ]
+ ]
+ },
+ {
+ "id": "2d606ecc.b12bba",
+ "type": "set",
+ "name": "set license required to 1",
+ "xml": "<set>\n<parameter name='tmp-license-required' value='1' />\n<parameter name='tmp-license-group' value='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group[$i].license-key-group-list.license-key-group[0].license-key-group-uuid`' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1732,
+ "y": 348,
+ "z": "b94f5cde.40937",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "64fd0671.15f188",
+ "type": "switchNode",
+ "name": "switch: length of entitlement pool == 0",
+ "xml": "<switch test='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group[$i].entitlement-pool-list.entitlement-pool_length == 0`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1277,
+ "y": 405,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "7ebbe15a.bb3988",
+ "9213bc2a.81103"
+ ]
+ ]
+ },
+ {
+ "id": "7ebbe15a.bb3988",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1525,
+ "y": 404,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "eb5a3c7b.4c3dc"
+ ]
+ ]
+ },
+ {
+ "id": "eb5a3c7b.4c3dc",
+ "type": "set",
+ "name": "set entitlement required to 0",
+ "xml": "<set>\n<parameter name='tmp-entitlement-required' value='0' />\n<parameter name='tmp-entitlement-group' value='NONE' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1739,
+ "y": 404,
+ "z": "b94f5cde.40937",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "9213bc2a.81103",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1523,
+ "y": 457,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "b64ce482.a1f508"
+ ]
+ ]
+ },
+ {
+ "id": "b64ce482.a1f508",
+ "type": "set",
+ "name": "set entitlement required to 1",
+ "xml": "<set>\n<parameter name='tmp-entitlement-required' value='1' />\n<parameter name='tmp-entitlement-group' value='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group[$i].entitlement-pool-list.entitlement-pool[0].entitlement-pool-uuid`' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1734,
+ "y": 459,
+ "z": "b94f5cde.40937",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3dbfa83c.5d206",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1022,
+ "y": 344,
+ "z": "b94f5cde.40937",
+ "wires": [
+ [
+ "90633ed7.848e18",
+ "64fd0671.15f188",
+ "44241b8a.fe4ddc"
+ ]
+ ]
+ }
+]
diff --git a/platform-logic/asdc-api/src/main/resources/graph.versions b/platform-logic/asdc-api/src/main/resources/graph.versions
new file mode 100644
index 0000000..4327161
--- /dev/null
+++ b/platform-logic/asdc-api/src/main/resources/graph.versions
@@ -0,0 +1 @@
+ASDC-API vf-license-model-update ${project.version} sync
diff --git a/platform-logic/asdc-api/src/main/xml/dg-vf-license-model-update.xml b/platform-logic/asdc-api/src/main/xml/dg-vf-license-model-update.xml
new file mode 100644
index 0000000..1dc8b52
--- /dev/null
+++ b/platform-logic/asdc-api/src/main/xml/dg-vf-license-model-update.xml
@@ -0,0 +1,78 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='ASDC-API' version='${project.version}'>
+ <method rpc='vf-license-model-update' mode='sync'>
+ <block>
+ <record plugin="org.openecomp.sdnc.sli.recording.Slf4jRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="vf-license-model"/>
+ </record>
+ <set>
+ <parameter name='resource-plugin' value='org.openecomp.sdnc.sli.resource.gamma.GammaResource' />
+ </set>
+ <switch test='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group_length > 0`'>
+ <outcome value='true'>
+ <for index='i' start='0' end='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group_length`' >
+ <block>
+ <switch test='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group[$i].license-key-group-list.license-key-group_length == 0`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='tmp-license-required' value='0' />
+ <parameter name='tmp-license-group' value='NONE' />
+ </set>
+ </outcome>
+ <outcome value='false'>
+ <set>
+ <parameter name='tmp-license-required' value='1' />
+ <parameter name='tmp-license-group' value='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group[$i].license-key-group-list.license-key-group[0].license-key-group-uuid`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group[$i].entitlement-pool-list.entitlement-pool_length == 0`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='tmp-entitlement-required' value='0' />
+ <parameter name='tmp-entitlement-group' value='NONE' />
+ </set>
+ </outcome>
+ <outcome value='false'>
+ <set>
+ <parameter name='tmp-entitlement-required' value='1' />
+ <parameter name='tmp-entitlement-group' value='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group[$i].entitlement-pool-list.entitlement-pool[0].entitlement-pool-uuid`' />
+ </set>
+ </outcome>
+ </switch>
+ <save plugin='`$resource-plugin`' resource='vnf-model-licenses' key='att-part-number = $vf-license-model-update-input.vf-license-model.feature-group-list.feature-group[$i].att-part-number and license-assignment-group = $tmp-license-group' force='true'>
+ <parameter name='att-part-number' value='`$vf-license-model-update-input.vf-license-model.feature-group-list.feature-group[$i].att-part-number`' />
+ <parameter name='license-assignment-group' value='`$tmp-license-group`'/>
+ <parameter name='license-required' value='`$tmp-license-required`'/>
+ <parameter name='entitlement-assignment-group' value='`$tmp-entitlement-group`'/>
+ <parameter name='entitlement-required' value='`$tmp-entitlement-required`'/>
+ </save>
+ </block>
+ </for>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic>
diff --git a/platform-logic/installer/pom.xml b/platform-logic/installer/pom.xml
new file mode 100644
index 0000000..4fb723a
--- /dev/null
+++ b/platform-logic/installer/pom.xml
@@ -0,0 +1,128 @@
+<?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/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>platform-logic</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>platform-logic-installer</artifactId>
+ <version>1.0.0</version>
+
+ <name>Platform Logic Installer</name>
+ <description>Contains platform-level service logic installer</description>
+
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-version</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>target/resources</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>*</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>create-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <attach>true</attach>
+ <descriptors>
+ <descriptor>src/assembly/assemble_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <phase>prepare-package</phase>
+ <configuration>
+ <transitive>false</transitive>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <useRepositoryLayout>false</useRepositoryLayout>
+ <addParentPoms>false</addParentPoms>
+ <copyPom>false</copyPom>
+ <scope>provided</scope>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.7.5</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>sli-common</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr4</artifactId>
+ <version>${antlr.version}</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>${mysql.connector.version}</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/platform-logic/installer/src/assembly/assemble_zip.xml b/platform-logic/installer/src/assembly/assemble_zip.xml
new file mode 100644
index 0000000..bfaa217
--- /dev/null
+++ b/platform-logic/installer/src/assembly/assemble_zip.xml
@@ -0,0 +1,70 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>../target/graphs</directory>
+ <outputDirectory>svclogic/graphs</outputDirectory>
+ <includes>
+ <include>**/*.xml</include>
+ <include>**/graph.versions</include>
+ </includes>
+ </fileSet>
+
+ <fileSet>
+ <directory>src/main/scripts</directory>
+ <outputDirectory>svclogic/bin</outputDirectory>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ <fileMode>0755</fileMode>
+ </fileSet>
+ <fileSet>
+ <directory>target/resources</directory>
+ <outputDirectory>svclogic/config</outputDirectory>
+ <includes>
+ <include>*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>target/lib</directory>
+ <outputDirectory>svclogic/lib</outputDirectory>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+
+
+</assembly>
diff --git a/platform-logic/installer/src/main/resources/svclogic.properties b/platform-logic/installer/src/main/resources/svclogic.properties
new file mode 100644
index 0000000..b738552
--- /dev/null
+++ b/platform-logic/installer/src/main/resources/svclogic.properties
@@ -0,0 +1,26 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+org.openecomp.sdnc.sli.dbtype = jdbc
+org.openecomp.sdnc.sli.jdbc.url = jdbc:mysql://sdnctldb01:3306/sdnctl
+org.openecomp.sdnc.sli.jdbc.database = sdnctl
+org.openecomp.sdnc.sli.jdbc.user = sdnctl
+org.openecomp.sdnc.sli.jdbc.password = gamma
diff --git a/platform-logic/installer/src/main/scripts/install.sh b/platform-logic/installer/src/main/scripts/install.sh
new file mode 100644
index 0000000..c8d47cd
--- /dev/null
+++ b/platform-logic/installer/src/main/scripts/install.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
+
+
+# Load directed graphs
+
+
+for graphlist in $(find $BASEDIR/graphs -name graph.versions -print)
+do
+ curdir=$(dirname $graphlist)
+
+ # Load files from directory containing graph.versions file
+ echo "Loading graphs from $curdir"
+ for file in $(ls $curdir/*.xml)
+ do
+ echo "Loading $file ..."
+ $BASEDIR/bin/svclogic.sh load $file $BASEDIR/config/svclogic.properties
+ done
+
+ # Activate directed graphs
+ while read module rpc version mode
+ do
+ echo "Activating $module $rpc $version $mode"
+ $BASEDIR/bin/svclogic.sh activate $module $rpc $version $mode $BASEDIR/config/svclogic.properties
+ done < $graphlist
+done
+
+
+
+
+
+
diff --git a/platform-logic/installer/src/main/scripts/setenv.sh b/platform-logic/installer/src/main/scripts/setenv.sh
new file mode 100644
index 0000000..f55ed8d
--- /dev/null
+++ b/platform-logic/installer/src/main/scripts/setenv.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+SDNC_CONFIG_DIR=${SDNC_CONFIG_DIR:-/opt/sdnc/data/properties}
+
+AAIURI=$(grep org.openecomp.sdnc.sli.aai.uri ${SDNC_CONFIG_DIR}/aaiclient.properties | grep -v '#' | cut -d'=' -f2)
+
+MYSQL_USER=$(grep org.openecomp.sdnc.sli.jdbc.user ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
+MYSQL_PWD=$(grep org.openecomp.sdnc.sli.jdbc.password ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
+MYSQL_DB=$(grep org.openecomp.sdnc.sli.jdbc.database ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
+MYSQL_SERVER=$(grep org.openecomp.sdnc.sli.jdbc.hosts ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2 | cut -d',' -f1)
+
+ODLUSER=$(grep controllerUser ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2)
+ODLPWD=$(grep controllerPass ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2)
+
+ODLHOST=$(grep odlNodes ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2|cut -d',' -f1)
+ODLPORT=$(grep controllerPort ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2)
+if [ $ODLPORT = 8443 ]
+then
+ ODLPROTO=https
+else
+ ODLPROTO=http
+fi
+
+unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy
diff --git a/platform-logic/installer/src/main/scripts/showActiveGraphs.sh b/platform-logic/installer/src/main/scripts/showActiveGraphs.sh
new file mode 100644
index 0000000..8735f2f
--- /dev/null
+++ b/platform-logic/installer/src/main/scripts/showActiveGraphs.sh
@@ -0,0 +1,29 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+MYSQL_USER=${MYSQL_USER:-sdnctl}
+MYSQL_PWD=${MYSQL_PWD:-gamma}
+MYSQL_DB=${MYSQL_DB:-sdnctl}
+MYSQL_HOST=${MYSQL_HOST:-dbhost}
+
+mysql --user=${MYSQL_USER} --password=${MYSQL_PWD} --host=${MYSQL_HOST} ${MYSQL_DB} <<-END
+SELECT module, rpc, version, mode from SVC_LOGIC where active='Y';
+END
diff --git a/platform-logic/installer/src/main/scripts/svclogic.sh b/platform-logic/installer/src/main/scripts/svclogic.sh
new file mode 100644
index 0000000..aca6bf1
--- /dev/null
+++ b/platform-logic/installer/src/main/scripts/svclogic.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 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=========================================================
+###
+
+BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
+JARDIR=${BASEDIR}/lib
+
+for jar in $JARDIR/*.jar
+do
+ CLASSPATH=$CLASSPATH:${jar}
+done
+
+java -cp ${CLASSPATH}:${MYSQL_JDBC_DRIVER} org.openecomp.sdnc.sli.SvcLogicParser $*
diff --git a/platform-logic/pom.xml b/platform-logic/pom.xml
new file mode 100644
index 0000000..c8479bb
--- /dev/null
+++ b/platform-logic/pom.xml
@@ -0,0 +1,36 @@
+<?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/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>sdnc-oam</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>platform-logic</artifactId>
+ <version>1.0.0</version>
+
+ <name>Platform Logic </name>
+ <description>Contains platform-level service logic</description>
+
+ <properties>
+ <application.name>platform-logic</application.name>
+
+ <maven.build.timestamp.format>yyMMdd-HHmmss</maven.build.timestamp.format>
+ <build.number>${maven.build.timestamp}</build.number>
+ </properties>
+
+ <modules>
+ <module>asdc-api</module>
+ <module>sliapi</module>
+ <module>vnfapi</module>
+ <module>installer</module>
+ </modules>
+ <organization>
+ <name>openECOMP</name>
+ </organization>
+</project>
diff --git a/platform-logic/sliapi/pom.xml b/platform-logic/sliapi/pom.xml
new file mode 100644
index 0000000..cd01597
--- /dev/null
+++ b/platform-logic/sliapi/pom.xml
@@ -0,0 +1,58 @@
+<?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/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>platform-logic</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>platform-logic-sliapi</artifactId>
+ <version>1.0.0</version>
+
+ <name>Platform Logic : SLI-API</name>
+ <description>Contains platform-level service logic for the SLI-API</description>
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-version</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>../target/graphs/sliapi</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/xml</directory>
+ <includes>
+ <include>*.xml</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>graph.versions</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/platform-logic/sliapi/src/main/json/sli_method_healthcheck.json b/platform-logic/sliapi/src/main/json/sli_method_healthcheck.json
new file mode 100644
index 0000000..e939467
--- /dev/null
+++ b/platform-logic/sliapi/src/main/json/sli_method_healthcheck.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"dbe3f1ee.ed5bb8","type":"dgstart","name":"DGSTART","outputs":1,"x":130,"y":52,"z":"95339741.be0da","wires":[["e5677e2c.75636"]]},{"id":"e5677e2c.75636","type":"service-logic","name":"sli ${project.version}","module":"sli","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='sli' version='${project.version}'>","outputs":1,"x":169,"y":117,"z":"95339741.be0da","wires":[["2abd790.d32b188"]]},{"id":"2abd790.d32b188","type":"method","name":"method healthcheck","xml":"<method rpc='healthcheck' mode='sync'>\n","comments":"","outputs":1,"x":212,"y":184,"z":"95339741.be0da","wires":[["33013f8c.9c1dc8"]]},{"id":"33013f8c.9c1dc8","type":"set","name":"set return message","xml":"<set>\n<parameter name='error-code' value='200' />\n<parameter name='error-message' value='SDN-C is healthy'/>\n<parameter name='ack-final' value='Y'/>\n","comments":"","x":263,"y":264,"z":"95339741.be0da","wires":[]}]
diff --git a/platform-logic/sliapi/src/main/resources/graph.versions b/platform-logic/sliapi/src/main/resources/graph.versions
new file mode 100644
index 0000000..d0cdbdc
--- /dev/null
+++ b/platform-logic/sliapi/src/main/resources/graph.versions
@@ -0,0 +1 @@
+sli healthcheck ${project.version} sync
diff --git a/platform-logic/sliapi/src/main/xml/sli_method_healthcheck.xml b/platform-logic/sliapi/src/main/xml/sli_method_healthcheck.xml
new file mode 100644
index 0000000..67eb019
--- /dev/null
+++ b/platform-logic/sliapi/src/main/xml/sli_method_healthcheck.xml
@@ -0,0 +1,27 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='sli' version='${project.version}'><method rpc='healthcheck' mode='sync'>
+<set>
+<parameter name='error-code' value='200' />
+<parameter name='error-message' value='SDN-C is healthy'/>
+<parameter name='ack-final' value='Y'/>
+</set></method></service-logic>
diff --git a/platform-logic/vnfapi/pom.xml b/platform-logic/vnfapi/pom.xml
new file mode 100644
index 0000000..11a0b26
--- /dev/null
+++ b/platform-logic/vnfapi/pom.xml
@@ -0,0 +1,58 @@
+<?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/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>platform-logic</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>platform-logic-vnfapi</artifactId>
+ <version>1.0.0</version>
+
+ <name>Platform Logic : VNF-API</name>
+ <description>Contains platform-level service logic for the VNF-API</description>
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-version</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>../target/graphs/vnfapi</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/xml</directory>
+ <includes>
+ <include>*.xml</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>graph.versions</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/platform-logic/vnfapi/src/main/json/generate-l3network-network-id.json b/platform-logic/vnfapi/src/main/json/generate-l3network-network-id.json
new file mode 100644
index 0000000..6a881f6
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/generate-l3network-network-id.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"dd70f366.d125c","type":"execute","name":"execute: generateUUID","xml":"<execute plugin=\"com.att.sdnctl.sli.SliPluginUtils.SliPluginUtils\" method=\"generateUUID\" >\n\t<parameter name=\"ctx-destination\" value=\"tmp.return.generate-l3network-network-id.uuid\" />","comments":"","outputs":1,"x":508.75,"y":337.5,"z":"d1ec70b0.44ebb","wires":[["f9cd5358.f88ee"]]},{"id":"f9cd5358.f88ee","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":704.5000076293945,"y":337.5,"z":"d1ec70b0.44ebb","wires":[["8a954bff.6fab18"]]},{"id":"8a954bff.6fab18","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<!-- Used to work around execute node bug -->\n\t<parameter name=\"execute_failure\" value=\"false\" />\n\n\t<!-- return parameters -->\n\t<parameter name=\"error-message.generate-l3network-network-id\" value=\"An error occured while generating a UUID for L3-NETWORK.\" />","comments":"","x":869.5000076293945,"y":337.74999713897705,"z":"d1ec70b0.44ebb","wires":[]},{"id":"e113a5e5.a5dc38","type":"get-resource","name":"Query AnAI - l3-network","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\"\n resource=\"l3-network\"\n key=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\"\n local-only=\"false\"\n pfx=\"tmp.local-variables.generate-l3network-network-id.L3NETWORK\" >","comments":"","outputs":1,"x":634.0000076293945,"y":428.74999713897705,"z":"d1ec70b0.44ebb","wires":[["8852c700.cf1728","49979ca4.27c0b4","414c6b14.1afed4","5312fbfe.635864"]]},{"id":"5c1d01b6.e9f5e","type":"for","name":"for n: true","xml":"<for atomic=\"true\" index=\"n\" start=\"0\" end=\"1\" >","comments":"","outputs":1,"x":458.00000762939453,"y":428.74999713897705,"z":"d1ec70b0.44ebb","wires":[["e113a5e5.a5dc38"]]},{"id":"8852c700.cf1728","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":838.5000076293945,"y":428.74999713897705,"z":"d1ec70b0.44ebb","wires":[["8e45d485.7ae718"]]},{"id":"49979ca4.27c0b4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":834.5000076293945,"y":508.74999713897705,"z":"d1ec70b0.44ebb","wires":[["9c34c546.317498"]]},{"id":"414c6b14.1afed4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":843.5000076293945,"y":468.74999713897705,"z":"d1ec70b0.44ebb","wires":[["6b739598.b52fcc"]]},{"id":"9c34c546.317498","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<!-- return parameters -->\n\t<parameter name=\"error-message.generate-l3network-network-id\" value=\"`'An error occured while checking if a generated l3network-network-id was unique. network-id = ' + $tmp.local-variables.generate-l3network-network-id.uuid`\" />","comments":"","x":1001.0000152587891,"y":533.750002861023,"z":"d1ec70b0.44ebb","wires":[]},{"id":"8e45d485.7ae718","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":996.5000076293945,"y":428.74999713897705,"z":"d1ec70b0.44ebb","wires":[["2b4a6d59.a9d4b2","401c414.4d08ac"]]},{"id":"2b4a6d59.a9d4b2","type":"set","name":"set: ...local...is-unique = 0","xml":"<set>\n\t<parameter name=\"tmp.local-variables.generate-l3network-network-id.is-unique\" value=\"0\" />","comments":"","outputs":1,"x":1214.0000610351562,"y":428.75000286102295,"z":"d1ec70b0.44ebb","wires":[[]]},{"id":"401c414.4d08ac","type":"execute","name":"execute: generateUUID","xml":"<execute plugin=\"com.att.sdnctl.sli.SliPluginUtils.SliPluginUtils\" method=\"generateUUID\" >\n\t<parameter name=\"ctx-destination\" value=\"tmp.return.generate-l3network-network-id.uuid\" />","comments":"","outputs":1,"x":1207.5000076293945,"y":468.74999713897705,"z":"d1ec70b0.44ebb","wires":[["2afa9dc4.53e492"]]},{"id":"2afa9dc4.53e492","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1394.5000076293945,"y":468.74999713897705,"z":"d1ec70b0.44ebb","wires":[["34a04552.d8838a"]]},{"id":"34a04552.d8838a","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<!-- return parameters -->\n\t<parameter name=\"error-message.generate-l3network-network-id\" value=\"An error occured while generating a UUID for L3-NETWORK.\" />","comments":"","x":1548.5000076293945,"y":468.74999713897705,"z":"d1ec70b0.44ebb","wires":[]},{"id":"6b739598.b52fcc","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":974.5000076293945,"y":468.74999713897705,"z":"d1ec70b0.44ebb","wires":[[]]},{"id":"437c334.fa9bacc","type":"dgstart","name":"DGSTART","outputs":1,"x":215.00000381469727,"y":24.999996185302734,"z":"d1ec70b0.44ebb","wires":[["d0d787ad.11a628"]]},{"id":"d0d787ad.11a628","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":239,"y":71.24999618530273,"z":"d1ec70b0.44ebb","wires":[["b3eba119.c492f"]]},{"id":"b3eba119.c492f","type":"method","name":"method generate-l3network-network-id","xml":"<method rpc=\"generate-l3network-network-id\" mode=\"sync\">","comments":"","outputs":1,"x":324.75,"y":123.74999618530273,"z":"d1ec70b0.44ebb","wires":[["f616b569.f578f8"]]},{"id":"bd83e429.00ab68","type":"comment","name":"VNF-API: GENERATE-L3NETWORK-NETWORK-ID","info":"","comments":"","x":766.5000152587891,"y":31.2499942779541,"z":"d1ec70b0.44ebb","wires":[]},{"id":"f616b569.f578f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":276.50000762939453,"y":248.74999713897705,"z":"d1ec70b0.44ebb","wires":[["dd70f366.d125c","5c1d01b6.e9f5e","b4996f5b.9e931","60de1533.5bb86c"]]},{"id":"2ec4eee9.2ac6b2","type":"comment","name":"LOOP UNTIL GENERATED NETWORK-ID ISN'T FOUND IN A&AI","info":"","comments":"","x":677.75,"y":385.0000009536743,"z":"d1ec70b0.44ebb","wires":[]},{"id":"5ce6ee54.fd9d2","type":"comment","name":"GENERATE A NETWORK-ID","info":"","comments":"","x":541.5,"y":294.9999990463257,"z":"d1ec70b0.44ebb","wires":[]},{"id":"b4996f5b.9e931","type":"set","name":"unset: local-variables & return","xml":"<set>\n\t<parameter name=\"tmp.local-variables.generate-l3network-network-id.\" value=\"\" />\n\t<parameter name=\"tmp.return.generate-l3network-network-id.\" value=\"\" />","comments":"","outputs":1,"x":527.5000076293945,"y":248.74999713897705,"z":"d1ec70b0.44ebb","wires":[[]]},{"id":"a706e0b1.9117a","type":"comment","name":"CLEANUP LOCAL VARIABLES TO BE USED","info":"","comments":"","x":611.75,"y":204.99999809265137,"z":"d1ec70b0.44ebb","wires":[]},{"id":"a0f4690f.efa0d8","type":"comment","name":"GLOBAL VARIABLES USED","info":"// RETURN VALUES\nerror-message.generate-generic-vnf-id\ntmp.return.generate-generic-vnf-id.uuid\n\n// LOCAL VARIABLES (erased at beginning & end of DG)\ntmp.local-variables.generate-generic-vnf-id.*\ntmp.local-variables.generate-generic-vnf-id.GENERIC_VNF.*","comments":"","x":753.0000305175781,"y":71.2499942779541,"z":"d1ec70b0.44ebb","wires":[]},{"id":"60de1533.5bb86c","type":"set","name":"unset: local-variables & return","xml":"<set>\n\t<parameter name=\"tmp.local-variables.generate-l3network-network-id.\" value=\"\" />","comments":"","outputs":1,"x":527.5000076293945,"y":528.749997138977,"z":"d1ec70b0.44ebb","wires":[[]]},{"id":"39e8f5d1.20ee3a","type":"comment","name":"CLEANUP LOCAL VARIABLES","info":"","comments":"","x":569,"y":486.25000190734863,"z":"d1ec70b0.44ebb","wires":[]},{"id":"5312fbfe.635864","type":"other","name":"Other","xml":"<outcome value=\"Other\">","comments":"","outputs":1,"x":834.5000076293945,"y":548.749997138977,"z":"d1ec70b0.44ebb","wires":[["9c34c546.317498"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/generate-subnets-subnet-id.json b/platform-logic/vnfapi/src/main/json/generate-subnets-subnet-id.json
new file mode 100644
index 0000000..9e526f6
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/generate-subnets-subnet-id.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"aaa6ff4b.724ea","type":"execute","name":"execute: generateUUID","xml":"<execute plugin=\"com.att.sdnctl.sli.SliPluginUtils.SliPluginUtils\" method=\"generateUUID\" >\n\t<parameter name=\"ctx-destination\" value=\"tmp.return.generate-subnets-subnet-id.uuid\" />","comments":"","outputs":1,"x":412.8571472167969,"y":357.1428527832031,"z":"212bebba.daa304","wires":[["5dbe3d08.2b3ac4"]]},{"id":"5dbe3d08.2b3ac4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":608.6071548461914,"y":357.1428527832031,"z":"212bebba.daa304","wires":[["e14fcee.4b28f3"]]},{"id":"e14fcee.4b28f3","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<!-- Used to work around execute node bug -->\n\t<parameter name=\"execute_failure\" value=\"false\" />\n\n\t<!-- return parameters -->\n\t<parameter name=\"error-message.generate-l3network-network-id\" value=\"An error occured while generating a UUID for L3-NETWORK.\" />","comments":"","x":773.6071548461914,"y":357.3928499221802,"z":"212bebba.daa304","wires":[]},{"id":"a4f5c20.aaf894","type":"get-resource","name":"Query AnAI - subnets","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\"\n\tresource=\"subnet\"\n\t\tkey=\"l3-network.network-id = $tmp.local.network-id \n\t\t\tAND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid\"\n\t\tlocal-only=\"false\"\n\t\tpfx=\"tmp.local-variables.generate-subnets-subnet-id.SUBNETS\" >","comments":"","outputs":1,"x":538.1071548461914,"y":448.3928499221802,"z":"212bebba.daa304","wires":[["7566b0aa.23333","41541145.8f2fe","f04ddaec.babb98","53fa760f.b1d208"]]},{"id":"6e3cbfaa.cae83","type":"for","name":"for s: true","xml":"<for atomic=\"true\" index=\"s\" start=\"0\" end=\"1\" >","comments":"","outputs":1,"x":362.1071548461914,"y":448.3928499221802,"z":"212bebba.daa304","wires":[["a4f5c20.aaf894"]]},{"id":"7566b0aa.23333","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":742.6071548461914,"y":448.3928499221802,"z":"212bebba.daa304","wires":[["a7ff3de0.89a3b"]]},{"id":"41541145.8f2fe","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":738.6071548461914,"y":528.3928499221802,"z":"212bebba.daa304","wires":[["f6eee8f.2de7c18"]]},{"id":"f04ddaec.babb98","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":747.6071548461914,"y":488.3928499221802,"z":"212bebba.daa304","wires":[["ef8307c7.c73008"]]},{"id":"f6eee8f.2de7c18","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<!-- return parameters -->\n\t<parameter name=\"error-message.generate-subnets-subnet-id\" value=\"`'An error occured while checking if a generated subnets-subnet-id was unique. subnet-id = ' + $tmp.local-variables.generate-subnets-subnet-id.uuid`\" />","comments":"","x":905.1071624755859,"y":553.3928556442261,"z":"212bebba.daa304","wires":[]},{"id":"a7ff3de0.89a3b","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":900.6071548461914,"y":448.3928499221802,"z":"212bebba.daa304","wires":[["bde977bc.984908","a44a8681.7894a8"]]},{"id":"bde977bc.984908","type":"set","name":"set: ...local...is-unique = 0","xml":"<set>\n\t<parameter name=\"tmp.local-variables.generate-subnets-subnet-id.is-unique\" value=\"0\" />","comments":"","outputs":1,"x":1118.1072082519531,"y":448.3928556442261,"z":"212bebba.daa304","wires":[[]]},{"id":"a44a8681.7894a8","type":"execute","name":"execute: generateUUID","xml":"<execute plugin=\"com.att.sdnctl.sli.SliPluginUtils.SliPluginUtils\" method=\"generateUUID\" >\n\t<parameter name=\"ctx-destination\" value=\"tmp.return.generate-subnets-subnet-id.uuid\" />","comments":"","outputs":1,"x":1111.6071548461914,"y":488.3928499221802,"z":"212bebba.daa304","wires":[["87ba26d4.c54c58"]]},{"id":"87ba26d4.c54c58","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1298.6071548461914,"y":488.3928499221802,"z":"212bebba.daa304","wires":[["22793b05.dbc9f4"]]},{"id":"22793b05.dbc9f4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<!-- return parameters -->\n\t<parameter name=\"error-message.generate-subnets-subnet-id\" value=\"An error occured while generating a UUID for SUBNETS.\" />","comments":"","x":1452.6071548461914,"y":488.3928499221802,"z":"212bebba.daa304","wires":[]},{"id":"ef8307c7.c73008","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":878.6071548461914,"y":488.3928499221802,"z":"212bebba.daa304","wires":[[]]},{"id":"514ace13.73fbc","type":"dgstart","name":"DGSTART","outputs":1,"x":119.10715103149414,"y":44.64284896850586,"z":"212bebba.daa304","wires":[["1b1cc085.47687f"]]},{"id":"1b1cc085.47687f","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":143.10714721679688,"y":90.89284896850586,"z":"212bebba.daa304","wires":[["d99b1637.7ed018"]]},{"id":"d99b1637.7ed018","type":"method","name":"method generate-subnets-subnet-id","xml":"<method rpc=\"generate-subnets-subnet-id\" mode=\"sync\">","comments":"","outputs":1,"x":228.85714721679688,"y":143.39284896850586,"z":"212bebba.daa304","wires":[["11287140.bdd92f"]]},{"id":"c84b6b4.9fc4398","type":"comment","name":"VNF-API: GENERATE-SUBNETS-SUBNET-ID","info":"","comments":"","x":670.6071624755859,"y":50.89284706115723,"z":"212bebba.daa304","wires":[]},{"id":"11287140.bdd92f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":180.6071548461914,"y":268.3928499221802,"z":"212bebba.daa304","wires":[["aaa6ff4b.724ea","a5490895.039508","41976a7f.5999d4","6e3cbfaa.cae83"]]},{"id":"6ab42343.db7f8c","type":"comment","name":"LOOP UNTIL GENERATED NETWORK-ID ISN'T FOUND IN A&AI","info":"","comments":"","x":581.8571472167969,"y":404.64285373687744,"z":"212bebba.daa304","wires":[]},{"id":"b9ed64f0.37f1d8","type":"comment","name":"GENERATE A SUBNET-ID","info":"","comments":"","x":445.6071472167969,"y":314.6428518295288,"z":"212bebba.daa304","wires":[]},{"id":"a5490895.039508","type":"set","name":"unset: local-variables & return","xml":"<set>\n\t<parameter name=\"tmp.local-variables.generate-subnets-subnet-id.\" value=\"\" />\n\t<parameter name=\"tmp.return.generate-subnets-subnet-id.\" value=\"\" />","comments":"","outputs":1,"x":431.6071548461914,"y":268.3928499221802,"z":"212bebba.daa304","wires":[[]]},{"id":"60c2bbdc.ec4e64","type":"comment","name":"CLEANUP LOCAL VARIABLES TO BE USED","info":"","comments":"","x":515.8571472167969,"y":224.6428508758545,"z":"212bebba.daa304","wires":[]},{"id":"71172ef4.cf0d8","type":"comment","name":"GLOBAL VARIABLES USED","info":"// RETURN VALUES\nerror-message.generate-generic-vnf-id\ntmp.return.generate-generic-vnf-id.uuid\n\n// LOCAL VARIABLES (erased at beginning & end of DG)\ntmp.local-variables.generate-generic-vnf-id.*\ntmp.local-variables.generate-generic-vnf-id.GENERIC_VNF.*","comments":"","x":657.107177734375,"y":90.89284706115723,"z":"212bebba.daa304","wires":[]},{"id":"41976a7f.5999d4","type":"set","name":"unset: local-variables & return","xml":"<set>\n\t<parameter name=\"tmp.local-variables.generate-subnets-subnet-id.\" value=\"\" />","comments":"","outputs":1,"x":431.6071548461914,"y":548.3928499221802,"z":"212bebba.daa304","wires":[[]]},{"id":"57f68649.0093a8","type":"comment","name":"CLEANUP LOCAL VARIABLES","info":"","comments":"","x":473.1071472167969,"y":505.89285469055176,"z":"212bebba.daa304","wires":[]},{"id":"53fa760f.b1d208","type":"other","name":"Other","xml":"<outcome value=\"Other\">","comments":"","outputs":1,"x":738.6071548461914,"y":568.3928499221802,"z":"212bebba.daa304","wires":[["f6eee8f.2de7c18"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/network-topology-assign.json b/platform-logic/vnfapi/src/main/json/network-topology-assign.json
new file mode 100644
index 0000000..351376e
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/network-topology-assign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"761cf409.e7fe2c","type":"method","name":"method network-topology-assign","xml":"<method rpc=\"network-topology-assign\" mode=\"sync\">","comments":"","outputs":1,"x":220,"y":88.57142639160156,"z":"f9c6b4d6.c89d48","wires":[["f32f7d99.8e885"]]},{"id":"2cc42ce.d3a7dd4","type":"service-logic","name":"VNF-API 3.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":295.4444351196289,"y":37.238101959228516,"z":"f9c6b4d6.c89d48","wires":[["761cf409.e7fe2c"]]},{"id":"d4150291.a47c7","type":"dgstart","name":"DGSTART","outputs":1,"x":131.33332061767578,"y":37.238101959228516,"z":"f9c6b4d6.c89d48","wires":[["2cc42ce.d3a7dd4"]]},{"id":"f32f7d99.8e885","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":185.76110458374023,"y":160.88003540039062,"z":"f9c6b4d6.c89d48","wires":[["e6608c59.2d82d","d54bce56.12186","7c655566.f8d98c","d18455b2.897038","9683e1d.b26132","fdec3d96.4fe6c","aec67243.3085b","b25a8a99.44e208","d1f10746.e56058","6a95cc4c.004c34","cced61c2.cb78b","d30ff142.3546e","eec55dc8.09816","d92a7574.cd1b58","f5d35022.8ff6","30dd8358.aaaadc","830f1b88.627bf8","d045d509.c8ec58","4330f5b6.e6251c"]]},{"id":"e6608c59.2d82d","type":"save","name":"save AnAI - l3-network","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$tmp.return.generate-l3network-network-id.uuid`\" />\n<parameter name=\"network-name\" value=\"`$network-topology-operation-input.network-request-information.network-name`\" />\n<parameter name=\"network-type\" value=\"`$network-topology-operation-input.network-request-information.network-type`\" />\n<parameter name=\"network-role\" value=\"`$preload-data.network-topology-information.network-topology-identifier.network-role`\" />\n<parameter name=\"network-technology\" value=\"`$preload-data.network-topology-information.network-topology-identifier.network-technology`\" />\n<parameter name=\"service-id\" value=\"`$network-topology-operation-input.service-information.service-id`\" />\n<parameter name=\"tenant-id\" value=\"`$network-topology-operation-input.network-request-information.tenant`\" />\n<parameter name=\"network-role-instance\" value=\"0\" />\n<parameter name=\"orchestration-status\" value=\"pending-create\" />","comments":"","outputs":1,"x":436.1934051513672,"y":454.1977233886719,"z":"f9c6b4d6.c89d48","wires":[["9de98ca4.f462","8cf9ad87.65dd7"]]},{"id":"d54bce56.12186","type":"for","name":"for loop i - PRELOAD subnets","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.subnets_length`\">\n","comments":"","outputs":1,"x":457.9034957885742,"y":640.8798131942749,"z":"f9c6b4d6.c89d48","wires":[["4ae47500.3fa4ac"]]},{"id":"7c655566.f8d98c","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"networkId\" value=\"`$tmp.return.generate-l3network-network-id.uuid`\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":375.84381103515625,"y":2471.0271310806274,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"d18455b2.897038","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":399.12740325927734,"y":2422.105136871338,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"9de98ca4.f462","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":628.4765625,"y":454.213041305542,"z":"f9c6b4d6.c89d48","wires":[["c0b37f94.55c04"]]},{"id":"4ae47500.3fa4ac","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":672.9021148681641,"y":640.8888244628906,"z":"f9c6b4d6.c89d48","wires":[["d2b530e1.e4e06","a4bddbdd.384ca8","b441c359.b1ed5","a461de0f.d6093","bbec29a5.4081f8","69434546.6b177c"]]},{"id":"c0b37f94.55c04","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to save l3-netework in AnAI with network-id = ' + $tmp.return.generate-l3network-network-id.uuid`\"/>","comments":"","x":829.254035949707,"y":453.9908256530762,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"bf4af859.d229c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1152.2541790008545,"y":868.8520412445068,"z":"f9c6b4d6.c89d48","wires":[["78a54b4f.f2a264"]]},{"id":"c5f09568.abd408","type":"set","name":"set tmp.dhcpEnabled.boolean=false","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"false\" />\n","comments":"","x":1419.9320831298828,"y":682.2393565177917,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"27c769b5.ca3316","type":"set","name":"set tmp.dhcpEnabled.boolean=true","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"true\" />\n","comments":"","x":1418.2495880126953,"y":641.1758060455322,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"d2b530e1.e4e06","type":"switchNode","name":"switch: PRELOAD dhcp-enabled","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$i].dhcp-enabled`\">","comments":"","outputs":1,"x":944.2495880126953,"y":640.6820316314697,"z":"f9c6b4d6.c89d48","wires":[["1d57866b.dc0d9a","1656d8a4.c39f97"]]},{"id":"1d57866b.dc0d9a","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1201.4719314575195,"y":640.9043521881104,"z":"f9c6b4d6.c89d48","wires":[["27c769b5.ca3316"]]},{"id":"1656d8a4.c39f97","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":1201.3766021728516,"y":682.7455735206604,"z":"f9c6b4d6.c89d48","wires":[["c5f09568.abd408"]]},{"id":"9683e1d.b26132","type":"for","name":"for loop i - PRELOAD vpn-bindings","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.vpn-bindings_length`\">\n","comments":"","outputs":1,"x":470.5514221191406,"y":1153.222297668457,"z":"f9c6b4d6.c89d48","wires":[["547d693b.b05e78"]]},{"id":"547d693b.b05e78","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":712.3292007446289,"y":1153.4722995758057,"z":"f9c6b4d6.c89d48","wires":[["26c6c645.1a9d3a","239555fc.bdbfaa","36380a8c.5dc166","300d9dbd.6d58a2"]]},{"id":"42bfa7b6.ab68a8","type":"save","name":"save relationship: vpn_bindings","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" \n\tforce=\"true\" \n\tlocal-only=\"false\">\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"vpn-binding\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"vpn-binding.vpn-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.vpn-binding-id`\" />","comments":"","outputs":1,"x":1053.856918334961,"y":1378.4445276260376,"z":"f9c6b4d6.c89d48","wires":[["80139c48.11b38","cd3c019c.f3ce1","188bd49e.885fbb"]]},{"id":"d1f10746.e56058","type":"call","name":"call: generate-l3network-network-id","xml":"<call module=\"VNF-API\" rpc=\"generate-l3network-network-id\" mode=\"sync\" >\n","comments":"","outputs":1,"x":474.26195526123047,"y":407.761869430542,"z":"f9c6b4d6.c89d48","wires":[["d51eccf4.b117b"]]},{"id":"d51eccf4.b117b","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":697.0119400024414,"y":408.0118598937988,"z":"f9c6b4d6.c89d48","wires":[["8780710c.05f27"]]},{"id":"8780710c.05f27","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='Error in generating l3-network.network-id in SDNC'/>","comments":"","x":853.7894134521484,"y":407.789644241333,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"fdec3d96.4fe6c","type":"switchNode","name":"switch ... PRELOAD vpn-bindings[]","xml":"<switch test=\"`$preload-data.network-topology-information.vpn-bindings_length`\">","comments":"","outputs":1,"x":470.92886522081153,"y":1109.8036111195884,"z":"f9c6b4d6.c89d48","wires":[["33a85e7a.541aa2"]]},{"id":"33a85e7a.541aa2","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":691.3733155992295,"y":1109.5813468297324,"z":"f9c6b4d6.c89d48","wires":[["8f10e90b.9b56a8"]]},{"id":"8f10e90b.9b56a8","type":"set","name":"set vpn-bindings[] = 0","xml":"<set>\n<parameter name=\"preload-data.network-topology-information.vpn-bindings_length\" value=\"0\" />\n","comments":"","x":885.9289245605469,"y":1109.5813674926758,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"b25a8a99.44e208","type":"switchNode","name":"switch ... PRELOAD network-policy[]","xml":"<switch test=\"`$preload-data.network-topology-information.network-policy_length`\">","comments":"","outputs":1,"x":452.0991668701172,"y":1523.0717792510986,"z":"f9c6b4d6.c89d48","wires":[["b82095af.08bfb8"]]},{"id":"b82095af.08bfb8","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":681.5436172485352,"y":1522.8495149612427,"z":"f9c6b4d6.c89d48","wires":[["91c9b9db.ea94b8"]]},{"id":"91c9b9db.ea94b8","type":"set","name":"set network-policy[] = 0","xml":"<set>\n<parameter name='preload-data.network-topology-information.network-policy_length' value='0' />\n","comments":"","x":876.0992262098525,"y":1522.849535624186,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"a4bddbdd.384ca8","type":"switchNode","name":"switch test: PRELOAD gateway-address","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$i].gateway-address`\">","comments":"","outputs":1,"x":968.646915435791,"y":735.6547451019287,"z":"f9c6b4d6.c89d48","wires":[["919f40fc.c3bd9"]]},{"id":"919f40fc.c3bd9","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1212.146915435791,"y":735.6547451019287,"z":"f9c6b4d6.c89d48","wires":[["82d44a1c.206d88"]]},{"id":"21deb593.226d7a","type":"GenericXML","name":"Execute: generate gateway-address","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool\" method=\"getGatewayAddress\">\n\t<parameter name=\"ipAddress\" value=\"`$preload-data.network-topology-information.subnets[$i].start-address`\" />\n\t<parameter name=\"ipVersion\" value=\"`$preload-data.network-topology-information.subnets[$i].ip-version`\" />\n\t<parameter name=\"subnet\" value=\"`$preload-data.network-topology-information.subnets[$i].cidr-mask`\" />\n\t<parameter name=\"ctxVariable\" value=\"tmp.return.generate.gateway-address\" />","comments":"","outputs":1,"x":1609.39693069458,"y":735.4047527313232,"z":"f9c6b4d6.c89d48","wires":[[]]},{"id":"82d44a1c.206d88","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1362.8969230651855,"y":735.6547555923462,"z":"f9c6b4d6.c89d48","wires":[["21deb593.226d7a","144c19a.8fa82e6"]]},{"id":"b441c359.b1ed5","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$preload-data.network-topology-information.subnets[$i].gateway-address`\" />\n","comments":"","x":922.1469306945801,"y":688.9047517776489,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"144c19a.8fa82e6","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$tmp.return.generate.gateway-address`\" />\n","comments":"","x":1575.89693069458,"y":777.4047546386719,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"26c6c645.1a9d3a","type":"switchNode","name":"switch: PRELOAD route-target != NULL","xml":"<switch test=\"`$preload-data.network-topology-information.vpn-bindings[$i].global-route-target != ''`\" >","comments":"","outputs":1,"x":975.5635833740234,"y":1244.8216018676758,"z":"f9c6b4d6.c89d48","wires":[["57a4fb2.f593104"]]},{"id":"57a4fb2.f593104","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1212.0635833740234,"y":1245.0716018676758,"z":"f9c6b4d6.c89d48","wires":[["fc2001b2.ee9d2"]]},{"id":"fc2001b2.ee9d2","type":"save","name":"query AnAI - vpn-bindings","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vpn-binding\" \n\t\tkey=\"vpn-binding.global-route-target = $preload-data.network-topology-information.vpn-bindings[$i].global-route-target\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.vpn-binding\">","comments":"","outputs":1,"x":1411.5635795593262,"y":1244.82160282135,"z":"f9c6b4d6.c89d48","wires":[["9d2982aa.7ea2a","c4a0a4b9.d67758","67b5caf1.ddebd4"]]},{"id":"9d2982aa.7ea2a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1621.8135795593262,"y":1325.0716037750244,"z":"f9c6b4d6.c89d48","wires":[["55368e8d.0d27b"]]},{"id":"78a54b4f.f2a264","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1351.6470069885254,"y":868.4881591796875,"z":"f9c6b4d6.c89d48","wires":[["5157a0f1.40c66","7598ed5f.703d44"]]},{"id":"5157a0f1.40c66","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving l3-newtork.subnet in AnAI where subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`\"/>","comments":"","x":1553.7465476989746,"y":868.23805809021,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"e4f1cfec.80ca7","type":"delete","name":"delete l3-network","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\">","comments":"","outputs":1,"x":1525.530288696289,"y":2284.034454345703,"z":"f9c6b4d6.c89d48","wires":[[]]},{"id":"2b7509e.d0964f6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Error writing to l3-netework - ' + $tmp.error-message`\"/>","comments":"","x":1512.4676208496094,"y":2327.230498313904,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"c4a0a4b9.d67758","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1627.3135833740234,"y":1284.57160282135,"z":"f9c6b4d6.c89d48","wires":[["55368e8d.0d27b"]]},{"id":"7598ed5f.703d44","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1335.7065505981445,"y":2284.2860431671143,"z":"f9c6b4d6.c89d48","wires":[["e4f1cfec.80ca7","2b7509e.d0964f6"]]},{"id":"55368e8d.0d27b","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1774.8135833740234,"y":1324.8216047286987,"z":"f9c6b4d6.c89d48","wires":[["7756b135.e6c4b","7598ed5f.703d44"]]},{"id":"7756b135.e6c4b","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'Failed to query vpn-bindings from AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`\"/>","comments":"","x":1996.9131240844727,"y":1324.5715036392212,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"239555fc.bdbfaa","type":"switchNode","name":"switch: PRELOAD vpn-binding-id","xml":"<switch test=\"`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`\">","comments":"","outputs":1,"x":955.8135871887207,"y":1200.3215417861938,"z":"f9c6b4d6.c89d48","wires":[["ea26c779.e30328"]]},{"id":"ea26c779.e30328","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1169.3135948181152,"y":1200.0715427398682,"z":"f9c6b4d6.c89d48","wires":[["d6658c61.93f25"]]},{"id":"d6658c61.93f25","type":"set","name":"set tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`\" />\n","comments":"","x":1351.8135948181152,"y":1200.0715436935425,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"67b5caf1.ddebd4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1622.8135795593262,"y":1244.82160282135,"z":"f9c6b4d6.c89d48","wires":[["93380f51.982a9"]]},{"id":"6fc7931.d198c6c","type":"set","name":"set tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"`$tmp.AnAI.vpn-binding.vpn-id`\" />\n","comments":"","x":2277.0636291503906,"y":1243.571678161621,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"80139c48.11b38","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1278.9297943115234,"y":1377.920114517212,"z":"f9c6b4d6.c89d48","wires":[["4dce9a6d.462e74"]]},{"id":"4dce9a6d.462e74","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1466.8226737976074,"y":1377.556221961975,"z":"f9c6b4d6.c89d48","wires":[["d7897aa2.314cd8","7598ed5f.703d44"]]},{"id":"d7897aa2.314cd8","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving vpn-binding relationship for l3-network in AnAI where vpn-id = ' + $tmp.vpn-binding-id`\"/>","comments":"","x":1679.9222145080566,"y":1378.3061208724976,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"aec67243.3085b","type":"for","name":"for loop i - PRELOAD network-policy","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.network-policy_length`\">\n","comments":"","outputs":1,"x":451.45642852783203,"y":1568.6431703567505,"z":"f9c6b4d6.c89d48","wires":[["9591c346.1a1b4"]]},{"id":"efde88cf.9b8748","type":"save","name":"save relationship: network-policy","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"network-policy\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"network-policy.network-policy-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.network-policy.network-policy-id`\" />","comments":"","outputs":1,"x":2268.0121154785156,"y":1701.1154356002808,"z":"f9c6b4d6.c89d48","wires":[["61a477bc.3c1228","70ae584f.c14f98"]]},{"id":"9591c346.1a1b4","type":"switchNode","name":"switch: PRELOAD network-policy-fqdn != NULL","xml":"<switch test=\"`$preload-data.network-topology-information.network-policy[$i].network-policy-fqdn != ''`\">","comments":"","outputs":1,"x":807.7186872694228,"y":1568.9924284617105,"z":"f9c6b4d6.c89d48","wires":[["28c23efe.60d8c2"]]},{"id":"28c23efe.60d8c2","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1073.4686872694228,"y":1569.2424284617105,"z":"f9c6b4d6.c89d48","wires":[["9a67180c.7e8c88"]]},{"id":"9a67180c.7e8c88","type":"save","name":"query AnAI - network-policy","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"network-policy\" \n\t\tkey=\"network-policy.network-policy-fqdn = $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.network-policy\">","comments":"","outputs":1,"x":1282.71869108412,"y":1569.2424284617105,"z":"f9c6b4d6.c89d48","wires":[["86e4182d.175af8","3ac39ea5.f66bf2","36636bd5.8e92b4"]]},{"id":"86e4182d.175af8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1490.71877500746,"y":1610.2424379984536,"z":"f9c6b4d6.c89d48","wires":[["19951b2e.af9645"]]},{"id":"3ac39ea5.f66bf2","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1496.2187788221572,"y":1568.7424370447793,"z":"f9c6b4d6.c89d48","wires":[["19951b2e.af9645"]]},{"id":"19951b2e.af9645","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1660.7187788221572,"y":1609.992438952128,"z":"f9c6b4d6.c89d48","wires":[["1be79b78.b46515","7598ed5f.703d44"]]},{"id":"1be79b78.b46515","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`\"/>","comments":"","x":1869.8183195326064,"y":1609.7423378626504,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"61a477bc.3c1228","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2491.084991455078,"y":1700.591022491455,"z":"f9c6b4d6.c89d48","wires":[["905198df.a2e8e8"]]},{"id":"905198df.a2e8e8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2670.977870941162,"y":1700.2271299362183,"z":"f9c6b4d6.c89d48","wires":[["3c4f721c.b157ae","7598ed5f.703d44"]]},{"id":"3c4f721c.b157ae","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving network-policy relationship for l3-network in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`\"/>","comments":"","x":2894.0774116516113,"y":1700.9770288467407,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"a461de0f.d6093","type":"call","name":"call: generate-subnets-subnet-id","xml":"<call module=\"VNF-API\" rpc=\"generate-subnets-subnet-id\" mode=\"sync\" >\n","comments":"","outputs":1,"x":941.7618713378906,"y":822.5118942260742,"z":"f9c6b4d6.c89d48","wires":[["6a268e02.7bf99"]]},{"id":"6a268e02.7bf99","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1239.5118560791016,"y":822.761884689331,"z":"f9c6b4d6.c89d48","wires":[["7598ed5f.703d44"]]},{"id":"6a95cc4c.004c34","type":"save","name":"save relationship: tenant and cloud-region","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" \n\tforce=\"true\" \n\tlocal-only=\"false\">\n\t<!-- create relationship-list -->\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"tenant\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"cloud-region.cloud-owner\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"att-aic\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-key\" value=\"cloud-region.cloud-region-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-value\" value=\"`$network-topology-operation-input.network-request-information.aic-cloud-region`\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-key\" value=\"tenant.tenant-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-value\" value=\"`$network-topology-operation-input.network-request-information.tenant`\" />\n\t<parameter name=\"relationship-list.relationship[1].related-to\" value=\"cloud-region\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[0].relationship-key\" value=\"cloud-region.cloud-owner\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[0].relationship-value\" value=\"att-aic\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[1].relationship-key\" value=\"cloud-region.cloud-region-id\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[1].relationship-value\" value=\"`$network-topology-operation-input.network-request-information.aic-cloud-region`\" />","comments":"","outputs":1,"x":495.5635681152344,"y":953.7380905151367,"z":"f9c6b4d6.c89d48","wires":[["94d20436.9f5a98","5c4aab8f.7f8844"]]},{"id":"94d20436.9f5a98","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":743.5635681152344,"y":953.7380905151367,"z":"f9c6b4d6.c89d48","wires":[["9bdd4cad.3259a"]]},{"id":"9bdd4cad.3259a","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":931.9563961029053,"y":953.3742084503174,"z":"f9c6b4d6.c89d48","wires":[["9e720f57.6429d","7598ed5f.703d44"]]},{"id":"9e720f57.6429d","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving tenant and clould-region relationship for l3-network in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`\"/>","comments":"","x":1136.0559368133545,"y":953.1241073608398,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"36380a8c.5dc166","type":"switchNode","name":"switch: tmp.vpn-binding-id != NULL","xml":"<switch test=\"`$tmp.vpn-binding-id != ''`\">","comments":"","outputs":1,"x":962.8135833740234,"y":1291.7381057739258,"z":"f9c6b4d6.c89d48","wires":[["2a156ae6.84e5a6"]]},{"id":"2a156ae6.84e5a6","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1182.5635681152344,"y":1291.7380905151367,"z":"f9c6b4d6.c89d48","wires":[["42bfa7b6.ab68a8"]]},{"id":"bbec29a5.4081f8","type":"set","name":"set tmp.local.network-id","xml":"<set>\n<parameter name=\"tmp.local.network-id\" value=\"`$tmp.return.generate-l3network-network-id.uuid`\" />\n","comments":"","x":917.5714569091797,"y":778.9999885559082,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"69434546.6b177c","type":"save","name":"save AnAI - l3-network.subnets","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid \n\t\t\tAND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$tmp.return.generate-l3network-network-id.uuid`\" />\n<parameter name=\"subnet-id\" value=\"`$tmp.return.generate-subnets-subnet-id.uuid`\" />\n<parameter name=\"subnet-name\" value=\"`$preload-data.network-topology-information.subnets[$i].subnet-name`\" />\n<parameter name=\"gateway-address\" value=\"`$tmp.gateway-address`\" />\n<parameter name=\"network-start-address\" value=\"`$preload-data.network-topology-information.subnets[$i].start-address`\" />\n<parameter name=\"cidr-mask\" value=\"`$preload-data.network-topology-information.subnets[$i].cidr-mask`\" />\n<parameter name=\"ip-version\" value=\"`$preload-data.network-topology-information.subnets[$i].ip-version`\" />\n<parameter name=\"dhcp-start\" value=\"`$preload-data.network-topology-information.subnets[$i].dhcp-start-address`\" />\n<parameter name=\"dhcp-end\" value=\"`$preload-data.network-topology-information.subnets[$i].dhcp-end-address`\" />\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.dhcpEnabled.boolean`\" />\n\t\t<parameter name=\"orchestration-status\" value=\"pending-create\" />","comments":"","outputs":1,"x":940.6379051208496,"y":868.5035381317139,"z":"f9c6b4d6.c89d48","wires":[["bf4af859.d229c8","91ca1bcf.ce5e18"]]},{"id":"cced61c2.cb78b","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $network-topology-operation-input.network-request-information.network-name\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.l3network.existed\">\n\n","comments":"","outputs":1,"x":458,"y":254.42857360839844,"z":"f9c6b4d6.c89d48","wires":[["442f4dcc.0db234","b16ddddf.00d98"]]},{"id":"442f4dcc.0db234","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":684.25,"y":296.6786346435547,"z":"f9c6b4d6.c89d48","wires":[["6a2fcf8c.18eb8"]]},{"id":"202129b8.5c0ed6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying whether l3-network with network-name = ' + $network-topology-operation-input.network-request-information.network-name + ' already exists in AnAI'`\"/>\n","comments":"","x":832.7457580566406,"y":254.89673042297363,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"b16ddddf.00d98","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":679.5235358344185,"y":254.89673042297363,"z":"f9c6b4d6.c89d48","wires":[["202129b8.5c0ed6"]]},{"id":"6a2fcf8c.18eb8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'A l3-network with network-name = ' + $network-topology-operation-input.network-request-information.network-name + ' already existed in AnAI with network-id = ' + $tmp.AnAI.l3network.existed.network-id`\" />\n","comments":"","x":835.4286193847656,"y":296.42857360839844,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"d30ff142.3546e","type":"set","name":"set: tmp.error-message to \"\"","xml":"<set>\n\t<parameter name=\"tmp.error-message\" value=\"\"/>","comments":"","x":451.5714111328125,"y":362.67857360839844,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"300d9dbd.6d58a2","type":"set","name":"unset tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"\" />\n","comments":"","x":929.8888931274414,"y":1154.015875339508,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"36636bd5.8e92b4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1493.24998304579,"y":1654.5715109507241,"z":"f9c6b4d6.c89d48","wires":[["ce9859f8.9238e8"]]},{"id":"cd3c019c.f3ce1","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1282.5872650146484,"y":1464.777780532837,"z":"f9c6b4d6.c89d48","wires":[["b9331242.105a7"]]},{"id":"b9331242.105a7","type":"set","name":"set tmp.is-bound-to-vpn","xml":"<set>\n<parameter name=\"tmp.is-bound-to-vpn\" value=\"true\" />\n","comments":"","x":1473.0872650146484,"y":1464.777780532837,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"dfebf1ef.060d1","type":"save","name":"update AnAI - l3-network","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" >\n<parameter name=\"is-bound-to-vpn\" value=\"true\" />","comments":"","outputs":1,"x":655.3016128540039,"y":1956.206524848938,"z":"f9c6b4d6.c89d48","wires":[["e1336583.4cd0d8","8f30eaa4.9bde48"]]},{"id":"e1336583.4cd0d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":851.5847702026367,"y":1956.221842765808,"z":"f9c6b4d6.c89d48","wires":[["f55c1f6d.ea9aa"]]},{"id":"eec55dc8.09816","type":"switchNode","name":"switch ... tmp.is-bound-to-vpn","xml":"<switch test=\"`$tmp.is-bound-to-vpn`\">","comments":"","outputs":1,"x":424.44444274902344,"y":1891.3493671417236,"z":"f9c6b4d6.c89d48","wires":[["34d11c70.e8f384"]]},{"id":"34d11c70.e8f384","type":"outcome","name":"true","xml":"<outcome value=\"true\">","comments":"","outputs":1,"x":643.8888931274414,"y":1891.1271028518677,"z":"f9c6b4d6.c89d48","wires":[["dfebf1ef.060d1"]]},{"id":"f55c1f6d.ea9aa","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1063.694450378418,"y":1956.5993690490723,"z":"f9c6b4d6.c89d48","wires":[["36e75acf.f931c6","7598ed5f.703d44"]]},{"id":"36e75acf.f931c6","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while updating l3-network is-bound-to-vpn in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`\"/>","comments":"","x":1282.194435119629,"y":1956.349347114563,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"8cf9ad87.65dd7","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":636.5714111328125,"y":497.57141304016113,"z":"f9c6b4d6.c89d48","wires":[["c0b37f94.55c04"]]},{"id":"91ca1bcf.ce5e18","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1160.5714111328125,"y":909.5714130401611,"z":"f9c6b4d6.c89d48","wires":[["78a54b4f.f2a264"]]},{"id":"5c4aab8f.7f8844","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":751.5714111328125,"y":995.5714130401611,"z":"f9c6b4d6.c89d48","wires":[["9bdd4cad.3259a"]]},{"id":"188bd49e.885fbb","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1287.0157318115234,"y":1420.5713863372803,"z":"f9c6b4d6.c89d48","wires":[["4dce9a6d.462e74"]]},{"id":"8f30eaa4.9bde48","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":859.071403503418,"y":1997.3214921951294,"z":"f9c6b4d6.c89d48","wires":[["f55c1f6d.ea9aa"]]},{"id":"70ae584f.c14f98","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2498.8214433458115,"y":1743.071546872457,"z":"f9c6b4d6.c89d48","wires":[["905198df.a2e8e8"]]},{"id":"93380f51.982a9","type":"switchNode","name":"switch: tmp.AnAI.vpn-binding.vpn-id","xml":"<switch test=\"`$tmp.AnAI.vpn-binding.vpn-id`\" >","comments":"","outputs":1,"x":1830.8214416503906,"y":1244.3214302062988,"z":"f9c6b4d6.c89d48","wires":[["eff41a9e.00afa8","5bc2956f.787c5c"]]},{"id":"b76ca92c.0ed578","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2253.5714416503906,"y":1283.3214302062988,"z":"f9c6b4d6.c89d48","wires":[["bb1b9631.658388","7598ed5f.703d44"]]},{"id":"5bc2956f.787c5c","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2088.5714416503906,"y":1283.8214302062988,"z":"f9c6b4d6.c89d48","wires":[["b76ca92c.0ed578"]]},{"id":"eff41a9e.00afa8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2088.5714111328125,"y":1243.8214130401611,"z":"f9c6b4d6.c89d48","wires":[["6fc7931.d198c6c"]]},{"id":"bb1b9631.658388","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'Failed to query vpn-bindings from AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target + '. It is likely that the same global-route-target points to more than one vpn-binding objects in AnAI.'`\"/>","comments":"","x":2469.0714111328125,"y":1283.3214130401611,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"ce9859f8.9238e8","type":"switchNode","name":"switch: tmp.AnAI.network-policy.network-policy-id","xml":"<switch test=\"`$tmp.AnAI.network-policy.network-policy-id`\" >","comments":"","outputs":1,"x":1771.3292541503906,"y":1654.0713682174683,"z":"f9c6b4d6.c89d48","wires":[["3c3f8072.e88a9","d073d6e1.0db6e8"]]},{"id":"3c3f8072.e88a9","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2045.0792541503906,"y":1653.5713682174683,"z":"f9c6b4d6.c89d48","wires":[["78fb0dee.396224"]]},{"id":"78fb0dee.396224","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2210.0792541503906,"y":1653.0713682174683,"z":"f9c6b4d6.c89d48","wires":[["7598ed5f.703d44","c12525bf.5dfe18"]]},{"id":"b7a4e2fe.7602c","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'Failed to query route-table-reference from AnAI where route-table-reference-fqdn = ' + $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn + '. It is likely that the same route-table-reference-fqdn points to more than one route-table-reference objects in AnAI.'`\"/>","comments":"","x":2636.912660386827,"y":1851.404614766439,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"d073d6e1.0db6e8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2044.5714111328125,"y":1700.8214664459229,"z":"f9c6b4d6.c89d48","wires":[["efde88cf.9b8748"]]},{"id":"d92a7574.cd1b58","type":"save","name":"update AnAI - l3-network.provider-network-information","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" >\n<parameter name=\"physical-network-name\" value=\"`$preload-data.network-topology-information.provider-network-information.physical-network-name`\" />\n<parameter name=\"is-provider-network\" value=\"`$preload-data.network-topology-information.provider-network-information.is-provider-network`\" />\n<parameter name=\"is-shared-network\" value=\"`$preload-data.network-topology-information.provider-network-information.is-shared-network`\" />\n<parameter name=\"is-external-network\" value=\"`$preload-data.network-topology-information.provider-network-information.is-external-network`\" />","comments":"","outputs":1,"x":534.7499847412109,"y":541.3214206695557,"z":"f9c6b4d6.c89d48","wires":[["8d65ff4.75283","a6764a00.4418a8"]]},{"id":"8d65ff4.75283","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":848.2831344604492,"y":541.3367395401001,"z":"f9c6b4d6.c89d48","wires":[["19a0604d.6fffb"]]},{"id":"19a0604d.6fffb","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1060.3928146362305,"y":541.7142658233643,"z":"f9c6b4d6.c89d48","wires":[["bfc1c864.dda818","7598ed5f.703d44"]]},{"id":"bfc1c864.dda818","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while updating l3-network with provider-network-information in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`\"/>","comments":"","x":1278.8927993774414,"y":541.464243888855,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"a6764a00.4418a8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":855.7697677612305,"y":582.4363889694214,"z":"f9c6b4d6.c89d48","wires":[["19a0604d.6fffb"]]},{"id":"f5d35022.8ff6","type":"switchNode","name":"switch ... PRELOAD route-table-reference[]","xml":"<switch test=\"`$preload-data.network-topology-information.route-table-reference_length`\">","comments":"","outputs":1,"x":469.74998474121094,"y":1721.5714130401611,"z":"f9c6b4d6.c89d48","wires":[["4f951dff.ce2564"]]},{"id":"4f951dff.ce2564","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":725.1944351196289,"y":1721.3491487503052,"z":"f9c6b4d6.c89d48","wires":[["d46faf09.e831"]]},{"id":"d46faf09.e831","type":"set","name":"set route-table-reference[] = 0","xml":"<set>\n<parameter name='preload-data.network-topology-information.route-table-reference_length' value='0' />\n","comments":"","x":930.7500440809463,"y":1721.3491694132485,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"30dd8358.aaaadc","type":"for","name":"for loop i - PRELOAD route-table-reference","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.route-table-reference_length`\">\n","comments":"","outputs":1,"x":468.1072463989258,"y":1769.142804145813,"z":"f9c6b4d6.c89d48","wires":[["9bc7e123.4762e"]]},{"id":"75664f84.1ae09","type":"save","name":"save relationship: route-table-reference","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"route-table-reference\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"route-table-reference.route-table-reference-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.route-table-reference.route-table-reference-id`\" />","comments":"","outputs":1,"x":2454.9962632921006,"y":1900.9483931859336,"z":"f9c6b4d6.c89d48","wires":[["4d7f2cce.5452f4","5883ac21.585844"]]},{"id":"9bc7e123.4762e","type":"switchNode","name":"switch: PRELOAD network-policy-fqdn != NULL","xml":"<switch test=\"`$preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn != ''`\">","comments":"","outputs":1,"x":853.7028350830078,"y":1768.8253860473633,"z":"f9c6b4d6.c89d48","wires":[["209cfc0f.7ee064"]]},{"id":"209cfc0f.7ee064","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1119.4528350830078,"y":1769.0753860473633,"z":"f9c6b4d6.c89d48","wires":[["4c6ed27c.d3899c"]]},{"id":"4c6ed27c.d3899c","type":"save","name":"query AnAI - route-table-reference","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"route-table-reference\" \n\t\tkey=\"route-table-reference.route-table-reference-fqdn = $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn\" \n\t\tpfx=\"tmp.AnAI.route-table-reference\">","comments":"","outputs":1,"x":1348.702838897705,"y":1769.0753860473633,"z":"f9c6b4d6.c89d48","wires":[["32be05d4.ef453a","d31265a9.dd2a68","fc3f6dcc.3ffa5"]]},{"id":"32be05d4.ef453a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1574.702922821045,"y":1810.0753955841064,"z":"f9c6b4d6.c89d48","wires":[["c7025ab3.2465e8"]]},{"id":"d31265a9.dd2a68","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1580.2029266357422,"y":1768.5753946304321,"z":"f9c6b4d6.c89d48","wires":[["c7025ab3.2465e8"]]},{"id":"c7025ab3.2465e8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1744.7029266357422,"y":1809.8253965377808,"z":"f9c6b4d6.c89d48","wires":[["a84e07a3.02c778"]]},{"id":"a84e07a3.02c778","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`\"/>","comments":"","x":1953.8024673461914,"y":1809.5752954483032,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"4d7f2cce.5452f4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2710.069139268663,"y":1900.423980077108,"z":"f9c6b4d6.c89d48","wires":[["7402c469.9e6bcc"]]},{"id":"7402c469.9e6bcc","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2889.962018754747,"y":1900.060087521871,"z":"f9c6b4d6.c89d48","wires":[["75091979.f14b18","7598ed5f.703d44"]]},{"id":"75091979.f14b18","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving route-table-reference relationship for l3-network in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`\"/>","comments":"","x":3114.061586168077,"y":1899.8100102742515,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"fc3f6dcc.3ffa5","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1577.234130859375,"y":1854.404468536377,"z":"f9c6b4d6.c89d48","wires":[["b4dd51b0.f58dd"]]},{"id":"5883ac21.585844","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2717.8055911593965,"y":1942.9045044581098,"z":"f9c6b4d6.c89d48","wires":[["7402c469.9e6bcc"]]},{"id":"b4dd51b0.f58dd","type":"switchNode","name":"switch: tmp.AnAI.route-table-reference.route-table-reference-id","xml":"<switch test=\"`$tmp.AnAI.route-table-referencey.route-table-reference-id`\" >","comments":"","outputs":1,"x":1895.3134019639756,"y":1853.904325803121,"z":"f9c6b4d6.c89d48","wires":[["caa62ee1.0e628","70a311b7.2883a"]]},{"id":"caa62ee1.0e628","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2222.0634019639756,"y":1853.404325803121,"z":"f9c6b4d6.c89d48","wires":[["6ccdc09b.5108b"]]},{"id":"6ccdc09b.5108b","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2387.0634019639756,"y":1852.904325803121,"z":"f9c6b4d6.c89d48","wires":[["b7a4e2fe.7602c"]]},{"id":"c12525bf.5dfe18","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'Failed to query newtork-policy from AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn + '. It is likely that the same network-policy-fqdn points to more than one network-policy objects in AnAI.'`\"/>","comments":"","x":2455.229965209961,"y":1652.5709247589111,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"70a311b7.2883a","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2221.5555589463975,"y":1900.6544240315757,"z":"f9c6b4d6.c89d48","wires":[["75664f84.1ae09"]]},{"id":"830f1b88.627bf8","type":"save","name":"save relationship: service-instance","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"service-instance\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"customer.global-customer-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$network-topology-operation-input.service-information.subscriber-name`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-key\" value=\"service-subscription.service-type\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-value\" value=\"`$network-topology-operation-input.service-information.service-type`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-key\" value=\"service-instance.service-instance-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-value\" value=\"`$network-topology-operation-input.service-information.service-instance-id`\" />","comments":"","outputs":1,"x":449.74998474121094,"y":2092.571413040161,"z":"f9c6b4d6.c89d48","wires":[["862cdb1e.cf3978","29684e7c.4d3332"]]},{"id":"862cdb1e.cf3978","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":704.8228607177734,"y":2092.0469999313354,"z":"f9c6b4d6.c89d48","wires":[["a91510cb.75d29"]]},{"id":"a91510cb.75d29","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":884.7157402038574,"y":2091.6831073760986,"z":"f9c6b4d6.c89d48","wires":[["c6dc81e.9bba78","7598ed5f.703d44"]]},{"id":"c6dc81e.9bba78","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving service-instance relationship for l3-network in AnAI where service-instance-id = ' + $network-topology-operation-input.service-information.service-instance-id`\"/>","comments":"","x":1122.8153076171875,"y":2091.433030128479,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"29684e7c.4d3332","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":712.5593126085068,"y":2134.5275243123374,"z":"f9c6b4d6.c89d48","wires":[["a91510cb.75d29"]]},{"id":"4330f5b6.e6251c","type":"switchNode","name":"switch: INPUT service-type","xml":"<switch test=\"`$network-topology-operation-input.service-information.service-type`\">","comments":"","outputs":1,"x":447.75,"y":160.57142639160156,"z":"f9c6b4d6.c89d48","wires":[["a00be1d.7bd562"]]},{"id":"a00be1d.7bd562","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":653.75,"y":160.57142639160156,"z":"f9c6b4d6.c89d48","wires":[["84d2b076.55161"]]},{"id":"84d2b076.55161","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='service-type, aka AnAI subscription-service-type, is required.'/>","comments":"","x":811.75,"y":160.57142639160156,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"d045d509.c8ec58","type":"switchNode","name":"switch: INPUT subscriber-name","xml":"<switch test=\"`$network-topology-operation-input.service-information.subscriber-name`\">","comments":"","outputs":1,"x":461.75,"y":206.57142639160156,"z":"f9c6b4d6.c89d48","wires":[["5efbbb28.950c14"]]},{"id":"5efbbb28.950c14","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":683.75,"y":206.57142639160156,"z":"f9c6b4d6.c89d48","wires":[["d57a3c68.3825d"]]},{"id":"d57a3c68.3825d","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='subscriber-name, aka AnAI global-customer-id, is required.'/>","comments":"","x":841.75,"y":206.57142639160156,"z":"f9c6b4d6.c89d48","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/network-topology-changeassign.json b/platform-logic/vnfapi/src/main/json/network-topology-changeassign.json
new file mode 100644
index 0000000..5a3beb4
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/network-topology-changeassign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"adccb6.8424d348","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":178.7500114440918,"y":167.50000190734863,"z":"b24c83f7.abbc6","wires":[["c7828b0a.e799e8","2212dd2d.8e7942","2dfb355b.d5d24a","313c1584.4f97fa","6c413597.876f3c","34af06b5.07d33a","59c57e09.0c9bd","c10e73d.da8889","bb8ce764.d17888","b16ab5f2.35a148","f15dac05.a23f","10056ed4.c3d191","b4cd1414.581b48","e456340c.466478","eca5ffa4.23d73","bd2d9b6e.b5c1d8"]]},{"id":"c7828b0a.e799e8","type":"get-resource","name":"get AnAI - l3-network","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":424.80941009521484,"y":168.38485431671143,"z":"b24c83f7.abbc6","wires":[["812ba46c.1b8558","8ace8ce6.55a0e"]]},{"id":"2212dd2d.8e7942","type":"switchNode","name":"switch: AnAI == PRELOAD - network-name","xml":"<switch test=\"`$tmp.AnAI.l3network.network-name == $preload-data.network-topology-information.network-topology-identifier.network-name`\">","comments":"","outputs":1,"x":493.2222099304199,"y":340.5555057525635,"z":"b24c83f7.abbc6","wires":[["f97c22c3.bd33d"]]},{"id":"2dfb355b.d5d24a","type":"for","name":"for loop k - tmp.AnAI.l3network.subnets.subnet","xml":"<for index=\"k\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">\n","comments":"","outputs":1,"x":499.5236930847168,"y":515.6143531799316,"z":"b24c83f7.abbc6","wires":[["4dd3576.8062ba8"]]},{"id":"99484323.6781e","type":"for","name":"for loop i - PRELOAD subnets","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.subnets_length`\">\n","comments":"","outputs":1,"x":847.464298248291,"y":1611.5709714889526,"z":"b24c83f7.abbc6","wires":[["caf58dc4.3309b"]]},{"id":"313c1584.4f97fa","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"networkId\" value=\"`$network-topology-operation-input.network-request-information.network-id`\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":284.05884170532227,"y":6246.302718162537,"z":"b24c83f7.abbc6","wires":[]},{"id":"812ba46c.1b8558","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":611.7143592834473,"y":209.57915782928467,"z":"b24c83f7.abbc6","wires":[["90e7717c.4ff42"]]},{"id":"90e7717c.4ff42","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'network-id: ' + $network-topology-operation-input.network-request-information.network-id + 'not found in AnAI'`\" />","comments":"","x":774.3531341552734,"y":209.4681453704834,"z":"b24c83f7.abbc6","wires":[]},{"id":"6a707f17.e585d","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":641.8493194580078,"y":654.6338815689087,"z":"b24c83f7.abbc6","wires":[["e1540d8d.4554a","15930eb5.9d2c61"]]},{"id":"c69a9fad.d395d","type":"set","name":"initialize tmp.start-address-match = 0","xml":"<set>\n<parameter name='tmp.start-address-match' value='0' />\n","comments":"","x":714.3761596679688,"y":563.1682300567627,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"cb84ba2b.90bd48","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":549.4607391357422,"y":1776.8211612701416,"z":"b24c83f7.abbc6","wires":[["766397f9.d8d1f8","9f8d35e4.e55ae8"]]},{"id":"7945c8d8.383a58","type":"set","name":"initialize tmp.start-address-match = 0","xml":"<set>\n<parameter name=\"tmp.start-address-match\" value=\"0\" />\n","comments":"","x":738.2764015197754,"y":1709.0573635101318,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"e1540d8d.4554a","type":"for","name":"for loop n PRELOAD subnets","xml":"<for index=\"n\" start=\"0\" end=\"`$preload-data.network-topology-information.subnets_length`\">\n","comments":"","outputs":1,"x":874.579891204834,"y":655.1577501296997,"z":"b24c83f7.abbc6","wires":[["94c41929.7cf038"]]},{"id":"4fd8628d.a08a8c","type":"switchNode","name":"switch: tmp.start-address-match = 0","xml":"<switch test=\"`$tmp.start-address-match == 0`\">","comments":"","outputs":1,"x":989.4622459411621,"y":1282.7005062103271,"z":"b24c83f7.abbc6","wires":[["d695fd69.34476"]]},{"id":"766397f9.d8d1f8","type":"for","name":"for loop j - AnAI l3subnet","xml":"<for index=\"j\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">\n","comments":"","outputs":1,"x":770.6567459106445,"y":1777.2368459701538,"z":"b24c83f7.abbc6","wires":[["a27e439b.1f5f7"]]},{"id":"d695fd69.34476","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1226.8745765686035,"y":1282.2680130004883,"z":"b24c83f7.abbc6","wires":[["df441732.5a6038"]]},{"id":"e08b1d05.35c67","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":933.4417266845703,"y":1831.371304512024,"z":"b24c83f7.abbc6","wires":[["f26659b9.bdc948"]]},{"id":"94c41929.7cf038","type":"switchNode","name":"switch: AnAI-k == PRELOAD-n start-address","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].network-start-address == $preload-data.network-topology-information.subnets[$n].start-address`\">","comments":"","outputs":1,"x":887.6592407226562,"y":706.0110673904419,"z":"b24c83f7.abbc6","wires":[["5c5db431.fc380c"]]},{"id":"a27e439b.1f5f7","type":"switchNode","name":"switch: PRELOAD-i == AnAI-j start-address","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$i].start-address == $tmp.AnAI.l3network.subnets.subnet[$j].network-start-address`\">","comments":"","outputs":1,"x":1084.7081756591797,"y":1777.8203172683716,"z":"b24c83f7.abbc6","wires":[["c4c3be7b.c7a1b"]]},{"id":"f26659b9.bdc948","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1113.581069946289,"y":1831.8419494628906,"z":"b24c83f7.abbc6","wires":[["8fd779af.d8ec98","b1a240fe.72ecb","bdf792c0.b5a28","2340601b.c0fbc","84c3d0d1.e984c","754d89e8.1de998"]]},{"id":"5c5db431.fc380c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1154.7284240722656,"y":706.2167139053345,"z":"b24c83f7.abbc6","wires":[["b5badb50.692f18"]]},{"id":"df441732.5a6038","type":"save","name":"update AnAI - subnet","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id\" >\n<parameter name=\"orchestration-status\" value=\"pending-delete\" />\n\t\t","comments":"","outputs":1,"x":1410.3694496154785,"y":1281.6625576019287,"z":"b24c83f7.abbc6","wires":[["b8c75959.a07998","e5068dd8.d58d5","150db709.87fab9"]]},{"id":"c4c3be7b.c7a1b","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1335.9098434448242,"y":1777.2601118087769,"z":"b24c83f7.abbc6","wires":[["b390fee8.578a3"]]},{"id":"b8c75959.a07998","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1603.3452911376953,"y":1281.5433139801025,"z":"b24c83f7.abbc6","wires":[["c6b0d6cd.d0a058"]]},{"id":"272c0e65.707422","type":"comment","name":"foreach AnAI l3subnet not found in PRELOAD, set pending-delete","info":"","comments":"","x":1032.8700065612793,"y":1158.146183013916,"z":"b24c83f7.abbc6","wires":[]},{"id":"661025a8.9e175c","type":"comment","name":"foreach PRELOAD subnet not found in AnAI l3subnet, create subnet in AnAI","info":"","comments":"","x":626.5205192565918,"y":1534.1595935821533,"z":"b24c83f7.abbc6","wires":[]},{"id":"5138e1dc.f8066","type":"switchNode","name":"switch: AnAI-k == PRELOAD-n cidr-mask","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].cidr-mask == $preload-data.network-topology-information.subnets[$n].cidr-mask`\">","comments":"","outputs":1,"x":1588.1782608032227,"y":467.1387405395508,"z":"b24c83f7.abbc6","wires":[["da70def2.76425"]]},{"id":"5bb8c4e2.6d08bc","type":"set","name":"set tmp.start-address-match = 1","xml":"<set>\n<parameter name='tmp.start-address-match' value='1' />\n","comments":"","x":1560.4662246704102,"y":418.6142053604126,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"b5badb50.692f18","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1304.9099044799805,"y":706.583779335022,"z":"b24c83f7.abbc6","wires":[["5bb8c4e2.6d08bc","5138e1dc.f8066","f67b8249.bf0ed","49957628.a77588","c6be995.0b46868","e67b0a35.1d06e8","aa1015d0.f81c38","cf30dbbc.caf468","ef8f189e.13e928"]]},{"id":"28694ef.e6d40b2","type":"comment","name":"start-addr matched, compare other subnet attrs","info":"","comments":"","x":1184.274257659912,"y":560.822154045105,"z":"b24c83f7.abbc6","wires":[]},{"id":"da70def2.76425","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1834.7589530944824,"y":467.59263038635254,"z":"b24c83f7.abbc6","wires":[["90858a29.37fc08"]]},{"id":"17ed7289.814ddd","type":"save","name":"update AnAI - subnet","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id\" >\n\t<!-- Update l3network.subnet -->\n\t<parameter name=\"gateway-address\" value=\"`$tmp.gateway-address`\"/>\n\t<parameter name=\"subnet-name\" value=\"`$preload-data.network-topology-information.subnets[$n].subnet-name`\"/>\n\t<parameter name=\"cidr-mask\" value=\"`$preload-data.network-topology-information.subnets[$n].cidr-mask`\"/>\n\t<parameter name=\"dhcp-start\" value=\"`$preload-data.network-topology-information.subnets[$n].dhcp-start-address`\"/>\n\t<parameter name=\"dhcp-end\" value=\"`$preload-data.network-topology-information.subnets[$n].dhcp-end-address`\"/>\n\t<parameter name=\"dhcp-enabled\" value=\"`$tmp.dhcpEnabled.boolean`\"/>\n\t<parameter name=\"orchestration-status\" value=\"pending-update\" />\n\t\t","comments":"","outputs":1,"x":1941.5383796691895,"y":1026.5579977035522,"z":"b24c83f7.abbc6","wires":[["2d5ecb94.1f2404","80e40fc7.91291","c9c8378e.07a4c8"]]},{"id":"bfe3db0b.73f948","type":"comment","name":"foreach AnAI subnet attr different from PRELOAD, update AnAI and set pending-update","info":"","comments":"","x":1908.5912628173828,"y":365.12071228027344,"z":"b24c83f7.abbc6","wires":[]},{"id":"cf30dbbc.caf468","type":"switchNode","name":"switch: AnAI-k == PRELOAD-n dhcp-enabled.boolean","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-enabled == $tmp.dhcpEnabled.boolean`\">","comments":"","outputs":1,"x":1625.5838432312012,"y":829.0172414779663,"z":"b24c83f7.abbc6","wires":[["7321a40b.545eac"]]},{"id":"7321a40b.545eac","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1908.4177474975586,"y":828.9894180297852,"z":"b24c83f7.abbc6","wires":[["1bcbd50a.81742b"]]},{"id":"8fd779af.d8ec98","type":"switchNode","name":"switch : PRELOAD dhcp-enabled","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$i].dhcp-enabled`\">","comments":"","outputs":1,"x":1376.659194946289,"y":1831.488842010498,"z":"b24c83f7.abbc6","wires":[["d1241924.ed09f8","7227226.f5b7ddc"]]},{"id":"7227226.f5b7ddc","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":1624.2147521972656,"y":1832.4095478057861,"z":"b24c83f7.abbc6","wires":[["2a420bce.572e64"]]},{"id":"d1241924.ed09f8","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1624.881492614746,"y":1878.8540449142456,"z":"b24c83f7.abbc6","wires":[["797eb8ae.317378"]]},{"id":"67602934.d76d68","type":"set","name":"set tmp.dhcpEnabled.bolean=false","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"false\" />\n","comments":"","x":2016.2388725280762,"y":738.6499919891357,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"25a34e9f.ba3cb2","type":"set","name":"set tmp.dhcpEnabled.boolean=true","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"true\" />\n","comments":"","x":2017.8779106140137,"y":780.1221618652344,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"aa1015d0.f81c38","type":"switchNode","name":"switch : PRELOAD-n dhcp-enabled","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$n].dhcp-enabled`\">","comments":"","outputs":1,"x":1567.1460990905762,"y":738.4153118133545,"z":"b24c83f7.abbc6","wires":[["d4a0bbfd.813968","7c02b1e6.66023"]]},{"id":"7c02b1e6.66023","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":1797.2017631530762,"y":738.6931438446045,"z":"b24c83f7.abbc6","wires":[["67602934.d76d68"]]},{"id":"d4a0bbfd.813968","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1796.618564605713,"y":779.8876571655273,"z":"b24c83f7.abbc6","wires":[["25a34e9f.ba3cb2"]]},{"id":"4dd3576.8062ba8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":452.6436080932617,"y":563.4527454376221,"z":"b24c83f7.abbc6","wires":[["c69a9fad.d395d","6a707f17.e585d","d6ebf8bb.4c2de8"]]},{"id":"d6ebf8bb.4c2de8","type":"set","name":"initialize tmp.subnetUpdate = 0","xml":"<set>\n<parameter name='tmp.subnetUpdate' value='0' />\n","comments":"","x":695.1359634399414,"y":608.8260974884033,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"f67b8249.bf0ed","type":"switchNode","name":"switch: tmp.subnetUpdate = 1","xml":"<switch test=\"`$tmp.subnetUpdate == 1`\">","comments":"","outputs":1,"x":1548.4172706604004,"y":1027.1630268096924,"z":"b24c83f7.abbc6","wires":[["b0b528dc.173918"]]},{"id":"b0b528dc.173918","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1756.4172706604004,"y":1026.8297748565674,"z":"b24c83f7.abbc6","wires":[["17ed7289.814ddd"]]},{"id":"caf58dc4.3309b","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":476.2505073547363,"y":1709.036449432373,"z":"b24c83f7.abbc6","wires":[["7945c8d8.383a58","cb84ba2b.90bd48"]]},{"id":"d922f181.c8317","type":"set","name":"set tmp.l3networkUpdate = 1","xml":"<set>\n<parameter name=\"tmp.l3networkUpdate\" value=\"1\" />\n","comments":"","x":2512.298324584961,"y":1271.3373107910156,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"e5068dd8.d58d5","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1610.0681495666504,"y":1435.3452835083008,"z":"b24c83f7.abbc6","wires":[["87593b73.e592d8"]]},{"id":"b0faff93.2dd14","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1640.504550933838,"y":2245.03267288208,"z":"b24c83f7.abbc6","wires":[["ee66f92b.ccfb18"]]},{"id":"f20c0bb3.0d7af8","type":"set","name":"set tmp.subnetRollback: orchestraton-status","xml":"<set>\n <parameter name=\"tmp.subnetRollback[$x].subnet-id\" value= \"`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`\"/>\n <parameter name=\"tmp.subnetRollback[$x].orchestration-status\" value= \"`$tmp.AnAI.l3network.subnets.subnet[$k].orchestration-status`\" />\n <parameter name=\"tmp.subnetRollback[$x].type\" value = \"delete\" />\n \n\n\n","comments":"","x":2054.0706214904785,"y":1434.5365447998047,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"87593b73.e592d8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1746.9279098510742,"y":1435.1081132888794,"z":"b24c83f7.abbc6","wires":[["f20c0bb3.0d7af8","8f7fc73c.e2c3d8","3eceba12.f5d206"]]},{"id":"ee66f92b.ccfb18","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1782.9489860534668,"y":2244.078380584717,"z":"b24c83f7.abbc6","wires":[["eaaa5901.98e238","29738f0c.0d796","3b6d36e2.4f5b5a"]]},{"id":"eaaa5901.98e238","type":"set","name":"set tmp.subnetRollback for create","xml":"<set>\n <parameter name=\"tmp.subnetRollback[$x].subnet-id\" value= \"`$tmp.return.generate-subnets-subnet-id.uuid`\" />\n <parameter name=\"tmp.subnetRollback[$x].type\" value = \"create\" />","comments":"","x":2019.2348937988281,"y":2244.792977333069,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"8f7fc73c.e2c3d8","type":"set","name":"$x++","xml":"<set>\n <parameter name=\"x\" value = \"`$x + 1`\" />\n\n","comments":"","x":1937.775577545166,"y":1480.5871963500977,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"29738f0c.0d796","type":"set","name":"$x++","xml":"<set>\n <parameter name=\"x\" value = \"`$x + 1`\" />\n\n","comments":"","x":1936.1711730957031,"y":2290.3573427200317,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"49957628.a77588","type":"switchNode","name":"switch: l3subnet[k] == PRELOAD subnets[n] dhcp-start","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-start == $preload-data.network-topology-information.subnets[$n].dhcp-start-address`\">","comments":"","outputs":1,"x":1627.2202644348145,"y":877.0411176681519,"z":"b24c83f7.abbc6","wires":[["a485a10d.6f0aa"]]},{"id":"a485a10d.6f0aa","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1908.1367721557617,"y":876.7633323669434,"z":"b24c83f7.abbc6","wires":[["ca9a6174.d3216"]]},{"id":"c6be995.0b46868","type":"switchNode","name":"switch: l3subnet[k] == PRELOAD subnets[n] dhcp-end","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-end == $preload-data.network-topology-information.subnets[$n].dhcp-end-address`\">","comments":"","outputs":1,"x":1624.4424324035645,"y":924.3744916915894,"z":"b24c83f7.abbc6","wires":[["b7005098.53ee7"]]},{"id":"b7005098.53ee7","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1907.3589401245117,"y":924.0967063903809,"z":"b24c83f7.abbc6","wires":[["292eb234.c8484e"]]},{"id":"e25fc8a9.1116e8","type":"method","name":"method network-topology-changeassign","xml":"<method rpc=\"network-topology-changeassign\" mode=\"sync\">","comments":"","outputs":1,"x":228.1150665283203,"y":109.55552768707275,"z":"b24c83f7.abbc6","wires":[["adccb6.8424d348"]]},{"id":"202a3e03.4ddbf2","type":"service-logic","name":"VNF-API 3.1.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":282.5594940185547,"y":53.22220325469971,"z":"b24c83f7.abbc6","wires":[["e25fc8a9.1116e8"]]},{"id":"570ef049.e5ed1","type":"dgstart","name":"DGSTART","outputs":1,"x":118.44837951660156,"y":53.22220325469971,"z":"b24c83f7.abbc6","wires":[["202a3e03.4ddbf2"]]},{"id":"8ace8ce6.55a0e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":604.6705780029297,"y":168.77773571014404,"z":"b24c83f7.abbc6","wires":[["77d4339b.2c77fc"]]},{"id":"77d4339b.2c77fc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`'Error retrieving l3-network with network-id=' + $network-topology-operation-input.network-request-information.network-id + ' from AnAI'`\" />","comments":"","x":763.7816619873047,"y":168.9999647140503,"z":"b24c83f7.abbc6","wires":[]},{"id":"540da71a.6c5d78","type":"GenericXML","name":"Execute: generate gateway-address","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool\" method=\"getGatewayAddress\">\n\t<parameter name=\"ipAddress\" value=\"`$preload-data.network-topology-information.subnets[$n].start-address`\" />\n\t<parameter name=\"ipVersion\" value=\"`$preload-data.network-topology-information.subnets[$n].ip-version`\" />\n\t<parameter name=\"subnet\" value=\"`$preload-data.network-topology-information.subnets[$n].cidr-mask`\" />\n\t<parameter name=\"ctxVariable\" value=\"tmp.return.generate.gateway-address\" />","comments":"","outputs":1,"x":2190.293586730957,"y":525.952335357666,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"66b36d53.f585d4","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$tmp.return.generate.gateway-address`\" />\n","comments":"","x":2807.043712615967,"y":588.9523363113403,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"e67b0a35.1d06e8","type":"switchNode","name":"switch : PRELOAD gateway-address","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$n].gateway-address`\">","comments":"","outputs":1,"x":1575.543586730957,"y":525.952335357666,"z":"b24c83f7.abbc6","wires":[["8b3b77a0.09f798","4ab20367.f03b6c"]]},{"id":"8b3b77a0.09f798","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1809.543586730957,"y":525.952335357666,"z":"b24c83f7.abbc6","wires":[["4d8feb3a.3484b4"]]},{"id":"4ab20367.f03b6c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1811.543586730957,"y":569.952335357666,"z":"b24c83f7.abbc6","wires":[["6708d473.7fb07c"]]},{"id":"6708d473.7fb07c","type":"switchNode","name":"switch: AnAI-k == PRELOAD-n gateway-address","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].gateway-address == $preload-data.network-topology-information.subnets[$n].gateway-address`\">","comments":"","outputs":1,"x":2044.543743133545,"y":648.6666088104248,"z":"b24c83f7.abbc6","wires":[["263829a0.412d26","9e7603e8.19f05"]]},{"id":"263829a0.412d26","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2321.043743133545,"y":648.9166088104248,"z":"b24c83f7.abbc6","wires":[["ac91a48c.df4748"]]},{"id":"d3078aa9.d0b7f8","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$preload-data.network-topology-information.subnets[$n].gateway-address`\" />\n","comments":"","x":2808.0437049865723,"y":647.0594596862793,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"4d8feb3a.3484b4","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1949.543586730957,"y":525.952335357666,"z":"b24c83f7.abbc6","wires":[["540da71a.6c5d78","e9310489.7af568"]]},{"id":"ac91a48c.df4748","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2460.043743133545,"y":648.9166088104248,"z":"b24c83f7.abbc6","wires":[["d3078aa9.d0b7f8","9d0c9a84.7d8738"]]},{"id":"6e1e477.31893b8","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2527.4322395324707,"y":1113.436484336853,"z":"b24c83f7.abbc6","wires":[]},{"id":"f97c22c3.bd33d","type":"not-found","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":747.4722099304199,"y":340.55950260162354,"z":"b24c83f7.abbc6","wires":[["5b49a928.5702a8"]]},{"id":"5b49a928.5702a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'No preload network found with network-name = ' + $tmp.AnAI.l3network.network-name + ' in SDNC'`\" />","comments":"","x":910.1109848022461,"y":340.44849014282227,"z":"b24c83f7.abbc6","wires":[]},{"id":"cd77a967.3c6308","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2295.138832092285,"y":1026.595251083374,"z":"b24c83f7.abbc6","wires":[["6e1e477.31893b8","fcfd2600.488c78","5d6b7d0.b989584"]]},{"id":"2d5ecb94.1f2404","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2127.6016120910645,"y":1026.3078203201294,"z":"b24c83f7.abbc6","wires":[["cd77a967.3c6308"]]},{"id":"80e40fc7.91291","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2135.163372039795,"y":1181.254093170166,"z":"b24c83f7.abbc6","wires":[["3fce51fa.fd9e2e"]]},{"id":"c1d7a122.2a287","type":"set","name":"set tmp.subnetRollback: keys","xml":"<set>\n <parameter name=\"tmp.subnetRollback[$x].subnet-id\" value= \"`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`\"/>\n <parameter name=\"tmp.subnetRollback[$x].type\" value = \"update\"/>\n \n\n\n","comments":"","x":2511.4268836975098,"y":1181.4888858795166,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"3fce51fa.fd9e2e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2273.662322998047,"y":1181.2392616271973,"z":"b24c83f7.abbc6","wires":[["c1d7a122.2a287","61057541.26debc","d922f181.c8317"]]},{"id":"61057541.26debc","type":"set","name":"$x++","xml":"<set>\n <parameter name=\"x\" value = \"`$x + 1`\" />\n\n","comments":"","x":2441.1170692443848,"y":1227.039545059204,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"3d2b0a50.3a8f56","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2039.186595916748,"y":1368.3451623916626,"z":"b24c83f7.abbc6","wires":[]},{"id":"84c3d0d1.e984c","type":"save","name":"save AnAI - l3-network.subnets.subnet","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid\" >\n\t<!-- Create l3-network object -->\n\t<parameter name=\"network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n\t<parameter name=\"subnet-id\" value=\"`$tmp.return.generate-subnets-subnet-id.uuid`\" />\n\t<parameter name=\"gateway-address\" value=\"`$tmp.gateway-address`\" />\n\t<parameter name=\"subnet-name\" value=\"`$preload-data.network-topology-information.subnets[$i].subnet-name`\" />\t\t\n\t<parameter name=\"network-start-address\" value=\"`$preload-data.network-topology-information.subnets[$i].start-address`\" />\n\t<parameter name=\"cidr-mask\" value=\"`$preload-data.network-topology-information.subnets[$i].cidr-mask`\" />\n\t<parameter name=\"ip-version\" value=\"`$preload-data.network-topology-information.subnets[$i].ip-version`\" />\n\t<parameter name=\"dhcp-start\" value=\"`$preload-data.network-topology-information.subnets[$i].dhcp-start-address`\" />\n\t<parameter name=\"dhcp-end\" value=\"`$preload-data.network-topology-information.subnets[$i].dhcp-end-address`\" />\n\t<parameter name=\"dhcp-enabled\" value=\"`$tmp.dhcpEnabled.boolean`\" />\n\t<parameter name=\"orchestration-status\" value=\"pending-create\" />","comments":"","outputs":1,"x":1392.1628170013428,"y":2104.321937561035,"z":"b24c83f7.abbc6","wires":[["ddd8c8e2.0b4288","b0faff93.2dd14","92778af8.befa68"]]},{"id":"ddd8c8e2.0b4288","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1634.7790908813477,"y":2104.670440673828,"z":"b24c83f7.abbc6","wires":[["8dabdae5.57ab58"]]},{"id":"bdf792c0.b5a28","type":"switchNode","name":"switch : PRELOAD gateway-address","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$i].gateway-address`\">","comments":"","outputs":1,"x":1391.028793334961,"y":1969.615735054016,"z":"b24c83f7.abbc6","wires":[["b4dd1568.7deed8"]]},{"id":"b4dd1568.7deed8","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1614.528793334961,"y":1969.615735054016,"z":"b24c83f7.abbc6","wires":[["cbdcd1c2.b3ed5"]]},{"id":"a0138d79.73728","type":"GenericXML","name":"Execute: generate gateway-address","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool\" method=\"getGatewayAddress\">\n\t<parameter name=\"ipAddress\" value=\"`$preload-data.network-topology-information.subnets[$i].start-address`\" />\n\t<parameter name=\"ipVersion\" value=\"`$preload-data.network-topology-information.subnets[$i].ip-version`\" />\n\t<parameter name=\"subnet\" value=\"`$preload-data.network-topology-information.subnets[$i].cidr-mask`\" />\n\t<parameter name=\"ctxVariable\" value=\"tmp.return.generate.gateway-address\" />","comments":"","outputs":1,"x":1987.77880859375,"y":1969.3657426834106,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"cbdcd1c2.b3ed5","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1756.2788009643555,"y":1969.6157455444336,"z":"b24c83f7.abbc6","wires":[["a0138d79.73728","c95c4bf2.a7bd28"]]},{"id":"b1a240fe.72ecb","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name='tmp.gateway-address' value='`$preload-data.network-topology-information.subnets[$i].gateway-address`' />\n","comments":"","x":1353.52880859375,"y":1925.8657417297363,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"c95c4bf2.a7bd28","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$tmp.return.generate.gateway-address`\" />\n","comments":"","x":1954.27880859375,"y":2011.3657445907593,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"2340601b.c0fbc","type":"call","name":"call generate-subnets-subnet-id","xml":"<call module=\"VNF-API\" rpc=\"generate-subnets-subnet-id\" mode=\"sync\" >\n","comments":"","outputs":1,"x":1371.1437721252441,"y":2057.4728574752808,"z":"b24c83f7.abbc6","wires":[["8589e64d.6294f8"]]},{"id":"8589e64d.6294f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1634.893756866455,"y":2057.7228479385376,"z":"b24c83f7.abbc6","wires":[["8dabdae5.57ab58"]]},{"id":"c6b0d6cd.d0a058","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1807.6506958007812,"y":1281.8093757629395,"z":"b24c83f7.abbc6","wires":[["3d2b0a50.3a8f56","eea3a1e.e88116","1623f021.c2b9"]]},{"id":"2a420bce.572e64","type":"set","name":"set tmp.dhcpEnabled.bolean=false","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"false\" />\n","comments":"","x":1848.3532104492188,"y":1831.9525032043457,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"797eb8ae.317378","type":"set","name":"set tmp.dhcpEnabled.boolean=true","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"true\" />\n","comments":"","x":1850.1350021362305,"y":1878.5675792694092,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"9117f581.49cd58","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2045.3016777038574,"y":2193.504596710205,"z":"b24c83f7.abbc6","wires":[]},{"id":"8dabdae5.57ab58","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1834.5158653259277,"y":2104.3617782592773,"z":"b24c83f7.abbc6","wires":[["9117f581.49cd58","a6fad29a.1da73","ca78be2.35c6c4"]]},{"id":"a6fad29a.1da73","type":"set","name":"set i, j max + 1","xml":"<set>\n\t<parameter name='j' value='`$tmp.AnAI.l3subnet_length + 1`' />\n\t<parameter name='i' value='`$preload-data.network-topology-information.subnets_length + 1`' />","comments":"","x":2009.0159034729004,"y":2104.361795425415,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"da60e97d.0ede68","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Error updating l3-network in AnAI with network-id = ' + $tmp.AnAI.l3network.network-id + ' - ' + $tmp.error-message + ' - ' + $tmp.rollback.error-message`\"/>","comments":"","x":669.991397857666,"y":6073.796445846558,"z":"b24c83f7.abbc6","wires":[]},{"id":"6c413597.876f3c","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":347.87683486938477,"y":6179.523144721985,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"3b6d36e2.4f5b5a","type":"set","name":"set tmp.l3networkUpdate = 1","xml":"<set>\n<parameter name='tmp.l3networkUpdate' value='1' />\n","comments":"","x":2005.5675163269043,"y":2336.881452560425,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"4ab836fd.f49d78","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1271.8109970092773,"y":4664.159008979797,"z":"b24c83f7.abbc6","wires":[["b682bac.b292748"]]},{"id":"80e7eee4.21ab2","type":"switchNode","name":"switch : tmp.l3networkUpdate = 1","xml":"<switch test=\"`$tmp.l3networkUpdate == 1`\">\n","comments":"","outputs":1,"x":518.019718170166,"y":4664.275115013123,"z":"b24c83f7.abbc6","wires":[["b8e556ef.dde5f8"]]},{"id":"b8e556ef.dde5f8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":731.6863822937012,"y":4664.052649497986,"z":"b24c83f7.abbc6","wires":[["e53a9499.9d4d28"]]},{"id":"e53a9499.9d4d28","type":"save","name":"update AnAI - l3-network.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"orchestration-status\" value=\"pending-update\" />","comments":"","outputs":1,"x":986.7340812683105,"y":4664.179589271545,"z":"b24c83f7.abbc6","wires":[["4ab836fd.f49d78","b3df03dc.e1fb8","40f41704.9cc688"]]},{"id":"b682bac.b292748","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1446.8769569396973,"y":4664.4650774002075,"z":"b24c83f7.abbc6","wires":[["277621ff.2d16fe","2e3c7ba2.d21b54"]]},{"id":"277621ff.2d16fe","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"An error occurred while updating l3-network.orchestration-status in AnAI\"/>","comments":"","x":1694.02103805542,"y":4664.2675523757935,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"ea36d758.4a9288","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":493.1831245422363,"y":2314.7121753692627,"z":"b24c83f7.abbc6","wires":[["50318e70.387a9","6f14f693.d5a4e8"]]},{"id":"70d1080b.b08868","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":459.1587104797363,"y":3271.960355758667,"z":"b24c83f7.abbc6","wires":[["85ca29b3.1bb488","67e9507e.488ea"]]},{"id":"7d587fe3.3f132","type":"save","name":"Rollback AnAI - l3-network.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"orchestration-status\" value=\"`$tmp.AnAI.l3network.orchestration-status`\" />","comments":"","outputs":1,"x":1280.6508178710938,"y":5976.617420196533,"z":"b24c83f7.abbc6","wires":[["d11dd828.7802a8","81ba8fb7.9e498"]]},{"id":"ae8d6ec6.39e21","type":"set","name":"set tmp.subnetUpdate = 1","xml":"<set>\n<parameter name=\"tmp.subnetUpdate\" value=\"1\" />\n","comments":"","x":2313.293930053711,"y":828.4881381988525,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"3eceba12.f5d206","type":"set","name":"set tmp.l3networkUpdate = 1","xml":"<set>\n<parameter name=\"tmp.l3networkUpdate\" value=\"1\" />\n","comments":"","x":2005.543643951416,"y":1525.7023010253906,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"9f8d35e4.e55ae8","type":"switchNode","name":"switch: tmp.start-address-match = 0","xml":"<switch test=\"`$tmp.start-address-match == 0`\">","comments":"","outputs":1,"x":693.8650512695312,"y":1831.6666650772095,"z":"b24c83f7.abbc6","wires":[["e08b1d05.35c67"]]},{"id":"b390fee8.578a3","type":"set","name":"set tmp.start-address-match = 1","xml":"<set>\n<parameter name='tmp.start-address-match' value='1' />\n","comments":"","x":1557.3650588989258,"y":1776.9166612625122,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"50318e70.387a9","type":"save","name":"delete relationship: vpn_binding","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\tAND related-to = vpn-binding\" >","comments":"","outputs":1,"x":764.8055114746094,"y":2315.0001096725464,"z":"b24c83f7.abbc6","wires":[["30ff2667.471baa"]]},{"id":"c4f81359.003b8","type":"for","name":"for loop i - PRELOAD vpn-bindings","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.vpn-bindings_length`\">\n","comments":"","outputs":1,"x":862.5317022535537,"y":2543.666758219401,"z":"b24c83f7.abbc6","wires":[["7c3e0805.40af68"]]},{"id":"7c3e0805.40af68","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1101.309480879042,"y":2543.9167601267495,"z":"b24c83f7.abbc6","wires":[["678f44ab.ea50ac","1598e5df.565bea","36a2784d.cf59e8","236011f6.f5e4be"]]},{"id":"d17665c3.e234d8","type":"save","name":"save relationship: vpn_bindings","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"vpn-binding\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"vpn-binding.vpn-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.vpn-binding-id`\" />","comments":"","outputs":1,"x":1557.5039176940918,"y":2921.8888416290283,"z":"b24c83f7.abbc6","wires":[["cc145aed.800d88","e2c85fda.7c9cd","49306a1.5c79894"]]},{"id":"a47b8b14.1829d8","type":"switchNode","name":"switch ... PRELOAD vpn-bindings[]","xml":"<switch test=\"`$preload-data.network-topology-information.vpn-bindings_length`\">","comments":"","outputs":1,"x":862.9091453552246,"y":2500.248071670532,"z":"b24c83f7.abbc6","wires":[["4801868f.077cf8"]]},{"id":"4801868f.077cf8","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1089.3535957336426,"y":2500.0258073806763,"z":"b24c83f7.abbc6","wires":[["a35d2b.e1e2b2d8"]]},{"id":"a35d2b.e1e2b2d8","type":"set","name":"set vpn-bindings[] = 0","xml":"<set>\n<parameter name=\"preload-data.network-topology-information.vpn-bindings_length\" value=\"0\" />\n","comments":"","x":1277.90920469496,"y":2500.0258280436196,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"6940ee9d.942ff","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1604.0438635084365,"y":2637.5160624186196,"z":"b24c83f7.abbc6","wires":[["96fde5e9.4b32b8"]]},{"id":"96fde5e9.4b32b8","type":"save","name":"query AnAI - vpn-bindings","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vpn-binding\" \n\t\tkey=\"vpn-binding.global-route-target = $preload-data.network-topology-information.vpn-bindings[$i].global-route-target\" \n\t\tpfx=\"tmp.AnAI.vpn-binding\">","comments":"","outputs":1,"x":1808.5438596937393,"y":2637.266063372294,"z":"b24c83f7.abbc6","wires":[["3c316751.c18568","f1e8d85f.221188","804fc820.1767b8"]]},{"id":"3c316751.c18568","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2016.293897840712,"y":2684.766030947367,"z":"b24c83f7.abbc6","wires":[["30521316.33fc5c"]]},{"id":"f1e8d85f.221188","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2021.7939016554092,"y":2637.266029993693,"z":"b24c83f7.abbc6","wires":[["30521316.33fc5c"]]},{"id":"30521316.33fc5c","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":2169.293901655409,"y":2684.5160319010415,"z":"b24c83f7.abbc6","wires":[["c83277b8.bca398","69801ad3.b07ae4"]]},{"id":"c83277b8.bca398","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'Failed to query vpn-bindings n AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`\"/>","comments":"","x":2410.3934423658584,"y":2684.265930811564,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"678f44ab.ea50ac","type":"switchNode","name":"switch: PRELOAD vpn-binding-id","xml":"<switch test=\"`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`\">","comments":"","outputs":1,"x":1346.7938673231338,"y":2591.7660023371377,"z":"b24c83f7.abbc6","wires":[["49c99c5d.db6104"]]},{"id":"49c99c5d.db6104","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1567.2938749525283,"y":2591.516003290812,"z":"b24c83f7.abbc6","wires":[["dc650ff6.6a37a"]]},{"id":"dc650ff6.6a37a","type":"set","name":"set tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`\" />\n","comments":"","x":1762.7938749525283,"y":2591.5160042444863,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"804fc820.1767b8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2021.7107429504395,"y":2785.932608604431,"z":"b24c83f7.abbc6","wires":[["d43a1da1.801f4"]]},{"id":"d43a1da1.801f4","type":"set","name":"set tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"`$tmp.AnAI.vpn-binding.vpn-id`\" />\n","comments":"","x":2212.2107429504395,"y":2785.932608604431,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"cc145aed.800d88","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1817.5767936706543,"y":2921.3644285202026,"z":"b24c83f7.abbc6","wires":[["bd84c069.9f407"]]},{"id":"bd84c069.9f407","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1974.4696731567383,"y":2921.000535964966,"z":"b24c83f7.abbc6","wires":[["d0bc0241.16643","67a32bcf.a45a94","d62cda9.c225228"]]},{"id":"d0bc0241.16643","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.vpn-binding-id`\"/>","comments":"","x":2194.5692138671875,"y":2920.7504348754883,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"d8a1ae30.7e241","type":"switchNode","name":"switch: tmp.vpn-binding-id != NULL","xml":"<switch test=\"`$tmp.vpn-binding-id != ''`\">","comments":"","outputs":1,"x":1387.5438346862793,"y":2816.9325428009033,"z":"b24c83f7.abbc6","wires":[["35e2cab.1320636"]]},{"id":"35e2cab.1320636","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1609.7938385009766,"y":2816.9325428009033,"z":"b24c83f7.abbc6","wires":[["d17665c3.e234d8"]]},{"id":"9dcafbd2.180118","type":"switchNode","name":"switch ... PRELOAD network-policy[]","xml":"<switch test=\"`$preload-data.network-topology-information.network-policy_length`\">","comments":"","outputs":1,"x":815.2102928161621,"y":3497.8329753875732,"z":"b24c83f7.abbc6","wires":[["9a549469.8cf168"]]},{"id":"9a549469.8cf168","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1044.65474319458,"y":3497.6107110977173,"z":"b24c83f7.abbc6","wires":[["626b2924.e714b8"]]},{"id":"626b2924.e714b8","type":"set","name":"set network-policy[] = 0","xml":"<set>\n<parameter name='preload-data.network-topology-information.network-policy_length' value='0' />\n","comments":"","x":1239.2103521558975,"y":3497.6107317606607,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"f4907fd3.a65","type":"for","name":"for loop i - PRELOAD network-policy","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.network-policy_length`\">\n","comments":"","outputs":1,"x":814.567554473877,"y":3543.404366493225,"z":"b24c83f7.abbc6","wires":[["c8c91878.a06a48"]]},{"id":"74c62ee.c142ad","type":"save","name":"save relationship: network-policy","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"network-policy\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"network-policy.network-policy-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.network-policy.network-policy-id`\" />","comments":"","outputs":1,"x":2095.9804649353027,"y":3742.5910663604736,"z":"b24c83f7.abbc6","wires":[["961c1793.845838","cd9366f0.221d18","c3c189a0.4ccb58"]]},{"id":"c8c91878.a06a48","type":"switchNode","name":"switch: PRELOAD network-policy-fqdn != NULL","xml":"<switch test=\"`$preload-data.network-topology-information.network-policy[$i].network-policy-fqdn != NULL`\">","comments":"","outputs":1,"x":1173.0797521803115,"y":3543.5036207834873,"z":"b24c83f7.abbc6","wires":[["b83dfff2.e2be5"]]},{"id":"b83dfff2.e2be5","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1453.8297521803115,"y":3543.7536207834873,"z":"b24c83f7.abbc6","wires":[["72405702.54bef8"]]},{"id":"72405702.54bef8","type":"save","name":"query AnAI - network-policy","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"network-policy\" \n\t\tkey=\"network-policy.network-policy-fqdn = $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn\" \n\t\tpfx=\"tmp.AnAI.network-policy\" >","comments":"","outputs":1,"x":1653.8297882080078,"y":3543.753540992737,"z":"b24c83f7.abbc6","wires":[["9106f450.700d08","d7e04886.f0b1b8","38bde268.aac7fe"]]},{"id":"9106f450.700d08","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1865.8298204210068,"y":3584.503463109335,"z":"b24c83f7.abbc6","wires":[["8bf9d679.d0ee98"]]},{"id":"d7e04886.f0b1b8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1871.329824235704,"y":3544.0034621556606,"z":"b24c83f7.abbc6","wires":[["8bf9d679.d0ee98"]]},{"id":"8bf9d679.d0ee98","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":2020.829824235704,"y":3584.2534640630092,"z":"b24c83f7.abbc6","wires":[["e5a86167.920af","338842a2.95efee"]]},{"id":"e5a86167.920af","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`\"/>","comments":"","x":2236.9293649461533,"y":3584.0033629735317,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"961c1793.845838","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2322.0533409118652,"y":3742.066653251648,"z":"b24c83f7.abbc6","wires":[["9f43abef.bd4728"]]},{"id":"9f43abef.bd4728","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":2462.946220397949,"y":3741.702760696411,"z":"b24c83f7.abbc6","wires":[["d2d1e07.7cfa32","133667f2.eb77f8"]]},{"id":"d2d1e07.7cfa32","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving l3-newtork network-policy relationship in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`\"/>","comments":"","x":2694.0457611083984,"y":3741.4526596069336,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"85ca29b3.1bb488","type":"save","name":"delete relationship: network-policy","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t AND related-to = network-policy\" >","comments":"","outputs":1,"x":747.372989654541,"y":3271.769684076309,"z":"b24c83f7.abbc6","wires":[["e8183966.f88478"]]},{"id":"754d89e8.1de998","type":"set","name":"set tmp.local.network-id","xml":"<set>\n<parameter name=\"tmp.local.network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n","comments":"","x":1350.7499885559082,"y":2012.642957687378,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"7ffa62de.33fecc","type":"comment","name":"query l3-network gets all the subnets and relationships for free","info":"","comments":"","x":1084.7022819519043,"y":164.40476989746094,"z":"b24c83f7.abbc6","wires":[]},{"id":"1598e5df.565bea","type":"switchNode","name":"switch: PRELOAD route-target != NULL","xml":"<switch test=\"`$preload-data.network-topology-information.vpn-bindings[$i].global-route-target != ''`\" >","comments":"","outputs":1,"x":1368.130941602919,"y":2637.071567217509,"z":"b24c83f7.abbc6","wires":[["6940ee9d.942ff"]]},{"id":"34af06b5.07d33a","type":"set","name":"initialize tmp variables, x, tmp.error-message, tmp.l3networkUpdate, execute_failure","xml":"<set>\n\t<parameter name='x' value='0' />\n\t<parameter name='tmp.error-message' value='' />\n\t<parameter name='execute_failure' value='false' />\n\t<parameter name='tmp.l3networkUpdate' value='0' />","comments":"","x":617.3453178405762,"y":428.8214406967163,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"e9310489.7af568","type":"switchNode","name":"switch: AnAI-k == tmp.return.generate.gateway-address","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].gateway-address == $tmp.return.generate.gateway-address`\">","comments":"","outputs":1,"x":2155.7498893737793,"y":588.8214159011841,"z":"b24c83f7.abbc6","wires":[["fd638c90.7772"]]},{"id":"fd638c90.7772","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2440.3215827941895,"y":588.2857179641724,"z":"b24c83f7.abbc6","wires":[["8a95056c.8243a8"]]},{"id":"8a95056c.8243a8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2585.0000495910645,"y":588.7222108840942,"z":"b24c83f7.abbc6","wires":[["66b36d53.f585d4","9d0c9a84.7d8738"]]},{"id":"1bcbd50a.81742b","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2045.7501602172852,"y":829.2222023010254,"z":"b24c83f7.abbc6","wires":[["ae8d6ec6.39e21"]]},{"id":"ca9a6174.d3216","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2045.0001602172852,"y":876.222204208374,"z":"b24c83f7.abbc6","wires":[["ae8d6ec6.39e21"]]},{"id":"292eb234.c8484e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2044.5001602172852,"y":924.4722051620483,"z":"b24c83f7.abbc6","wires":[["ae8d6ec6.39e21"]]},{"id":"38bde268.aac7fe","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1870.595417022705,"y":3742.094934463501,"z":"b24c83f7.abbc6","wires":[["74c62ee.c142ad"]]},{"id":"36a2784d.cf59e8","type":"set","name":"unset tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"\" />\n","comments":"","x":1320.9166776869033,"y":2544.0001236597695,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"30ff2667.471baa","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":996.0833282470703,"y":2314.5833377838135,"z":"b24c83f7.abbc6","wires":[["e69d9ede.c998c"]]},{"id":"e69d9ede.c998c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1155.8201026916504,"y":2315.2746753692627,"z":"b24c83f7.abbc6","wires":[["7c0a1390.80c06c","2f44a8dd.3b2668"]]},{"id":"7c0a1390.80c06c","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"An error occurred while deleting l3-network vpn-binding relationship from AnAI\"/>","comments":"","x":1374.500072479248,"y":2315.5835123062134,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"e8183966.f88478","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":971.5079612731934,"y":3271.3528950214386,"z":"b24c83f7.abbc6","wires":[["fc52b15.447615"]]},{"id":"fc52b15.447615","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1148.2447357177734,"y":3271.044232606888,"z":"b24c83f7.abbc6","wires":[["18b5ade9.0299e2","8aeb103.23b59f"]]},{"id":"18b5ade9.0299e2","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"An error occurred while deleting l3-network network-policy relationship from AnAI in preparation to regenerate the network-policy relationship from PRELOAD.\"/>","comments":"","x":1372.2579612731934,"y":3271.3528950214386,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"28badb43.5ee5d4","type":"switchNode","name":"switch : tmp.l3network.status.updated = 1","xml":"<switch test=\"`$tmp.l3network.status.updated == 1`\">\n","comments":"","outputs":1,"x":764.6190795898438,"y":5976.534414291382,"z":"b24c83f7.abbc6","wires":[["d6b5f392.672a4"]]},{"id":"d6b5f392.672a4","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1017.2857131958008,"y":5976.812002182007,"z":"b24c83f7.abbc6","wires":[["7d587fe3.3f132"]]},{"id":"7d8628e3.bfb0d8","type":"set","name":"set tmp.l3network.status.updated = 1","xml":"<set>\n<parameter name='tmp.l3network.status.updated' value='1' />\n","comments":"","x":1527.988193511963,"y":4767.8097858428955,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"b3df03dc.e1fb8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1275.9168281555176,"y":4768.083599090576,"z":"b24c83f7.abbc6","wires":[["7d8628e3.bfb0d8"]]},{"id":"f2214172.a1643","type":"for","name":"for loop z - tmp.AnAI.l3network.relationship-list.relationship[]","xml":"<for index=\"z\" start=\"0\" end=\"`$tmp.AnAI.l3network.relationship-list.relationship_length`\">\n","comments":"","outputs":1,"x":824.3810005187988,"y":4983.3337116241455,"z":"b24c83f7.abbc6","wires":[["40b39fed.993b8"]]},{"id":"40b39fed.993b8","type":"switchNode","name":"switch: relationship[].related-to","xml":"<switch test=\"`$tmp.AnAI.l3network.relationship-list.relationship[$z].related-to`\">","comments":"","outputs":1,"x":901.1309394836426,"y":5074.583716392517,"z":"b24c83f7.abbc6","wires":[["445af20b.efd5dc","7e1ce913.d1ada8","63a30c32.764734"]]},{"id":"445af20b.efd5dc","type":"other","name":"vpn-binding","xml":"<outcome value='vpn-binding'>\n","comments":"","outputs":1,"x":1130.6309394836426,"y":5074.833716392517,"z":"b24c83f7.abbc6","wires":[["3307d5fd.2423fa"]]},{"id":"fb5a4fe8.b156b","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":491.38093185424805,"y":4982.8337116241455,"z":"b24c83f7.abbc6","wires":[["f2214172.a1643","30cb9475.50352c","28badb43.5ee5d4","da60e97d.0ede68"]]},{"id":"befdd7ed.7d6be8","type":"save","name":"Rollback to save relationship: vpn_binding","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"vpn-binding\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"vpn-binding.vpn-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`\" />","comments":"","outputs":1,"x":1294.21431350708,"y":5133.833827018738,"z":"b24c83f7.abbc6","wires":[["a9924139.29c5e","d4b57fb0.f24f4"]]},{"id":"a9924139.29c5e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1547.2871894836426,"y":5133.309413909912,"z":"b24c83f7.abbc6","wires":[["3a4aef64.3150d"]]},{"id":"3a4aef64.3150d","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'An error occurred during rollback of l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":1787.2795906066895,"y":5132.695249557495,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"9cd29c09.984bd","type":"set","name":"set tmp.network-policy.updated = 1","xml":"<set>\n<parameter name='tmp.network-policy.updated' value='1' />\n","comments":"","x":2567.38090133667,"y":3832.2736530303955,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"e0cc74f6.cef2e8","type":"set","name":"set tmp.vpn-binding.updated = 1","xml":"<set>\n<parameter name='tmp.vpn-binding.updated' value='1' />\n","comments":"","x":2044.4286079406738,"y":3063.916700363159,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"cd9366f0.221d18","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2328.63090133667,"y":3832.5236530303955,"z":"b24c83f7.abbc6","wires":[["9cd29c09.984bd"]]},{"id":"e2c85fda.7c9cd","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1820.6786003112793,"y":3063.916700363159,"z":"b24c83f7.abbc6","wires":[["e0cc74f6.cef2e8"]]},{"id":"7e1ce913.d1ada8","type":"other","name":"network-policy","xml":"<outcome value='network-policy'>\n","comments":"","outputs":1,"x":1141.583209991455,"y":5223.654871940613,"z":"b24c83f7.abbc6","wires":[["163697ef.53ddb8"]]},{"id":"a1822be9.e1be18","type":"save","name":"Rollback to save relationship: network-policy","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"network-policy\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"network-policy.network-policy-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`\" />","comments":"","outputs":1,"x":1309.16646194458,"y":5282.988368034363,"z":"b24c83f7.abbc6","wires":[["cde96a1a.b38188","c5b6850b.08be08"]]},{"id":"cde96a1a.b38188","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1569.2393379211426,"y":5282.463954925537,"z":"b24c83f7.abbc6","wires":[["de78af5a.c6912"]]},{"id":"de78af5a.c6912","type":"set","name":"tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'An error occurred during rollback of l3-newtork network-policy relationship in AnAI where network-policy-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":1785.2316627502441,"y":5282.849543571472,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"163697ef.53ddb8","type":"switchNode","name":"switch: tmp.network-policy.updated == 1","xml":"<switch test=\"`$tmp.network-policy.updated == 1`\">","comments":"","outputs":1,"x":1412.9166984558105,"y":5223.655074119568,"z":"b24c83f7.abbc6","wires":[["7a01074a.f70308"]]},{"id":"3307d5fd.2423fa","type":"switchNode","name":"switch: tmp.vpn-binding.updated == 1","xml":"<switch test=\"`$tmp.vpn-binding.updated == 1`\">","comments":"","outputs":1,"x":1372.916706085205,"y":5074.655116081238,"z":"b24c83f7.abbc6","wires":[["462a22ce.3cdbbc"]]},{"id":"462a22ce.3cdbbc","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1606.916706085205,"y":5074.655116081238,"z":"b24c83f7.abbc6","wires":[["befdd7ed.7d6be8"]]},{"id":"7a01074a.f70308","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1657.916706085205,"y":5223.655116081238,"z":"b24c83f7.abbc6","wires":[["a1822be9.e1be18"]]},{"id":"70aa977b.fe30d8","type":"for","name":"for loop i - tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">\n","comments":"","outputs":1,"x":1018.5593681335449,"y":5636.50013256073,"z":"b24c83f7.abbc6","wires":[["e51d6a24.425c98"]]},{"id":"56134ac0.df0084","type":"switchNode","name":"switch: tmp.subnetRollback[].type","xml":"<switch test=\"`$tmp.subnetRollback[$j].type`\">","comments":"","outputs":1,"x":1265.3325576782227,"y":5719.288496017456,"z":"b24c83f7.abbc6","wires":[["cab697cd.251568","d0693ac4.d5ac18"]]},{"id":"cab697cd.251568","type":"outcomeTrue","name":"delete","xml":"<outcome value='delete'>\n","comments":"","outputs":1,"x":1504.0470352172852,"y":5719.137134552002,"z":"b24c83f7.abbc6","wires":[["74fc00ec.dc13f"]]},{"id":"d0693ac4.d5ac18","type":"outcomeTrue","name":"update","xml":"<outcome value='update'>\n","comments":"","outputs":1,"x":1505.6183624267578,"y":5764.709531784058,"z":"b24c83f7.abbc6","wires":[["32bdc1c1.96f2ee"]]},{"id":"74fc00ec.dc13f","type":"save","name":"Rollback AnAI delete - l3network.subnets.subnet","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.subnetRollback[$j].subnet-id\" >\n<parameter name=\"orchestration-status\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`\" />\n\t\t","comments":"","outputs":1,"x":1786.475700378418,"y":5718.710096359253,"z":"b24c83f7.abbc6","wires":[["d50c1822.8cb098","ad551bbf.58fcc8"]]},{"id":"76cbcff8.a7aa9","type":"outcomeTrue","name":"create","xml":"<outcome value='create'>\n","comments":"","outputs":1,"x":1657.0249366760254,"y":5868.8378829956055,"z":"b24c83f7.abbc6","wires":[["5e8f2f9e.a1436"]]},{"id":"5e8f2f9e.a1436","type":"delete","name":"Rollback AnAI create - l3-network.subnets.subnet","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.subnetRollback[$j].subnet-id\" >","comments":"","outputs":1,"x":1943.310344696045,"y":5867.815706253052,"z":"b24c83f7.abbc6","wires":[["eb93aa28.0b07f8","c1cf86f2.493818"]]},{"id":"30cb9475.50352c","type":"for","name":"for loop j - subnetRollback[]","xml":"<for index=\"j\" start=\"0\" end=\"`$x`\">\n","comments":"","outputs":1,"x":728.845157623291,"y":5525.070099830627,"z":"b24c83f7.abbc6","wires":[["dad835c6.d0c618"]]},{"id":"e51d6a24.425c98","type":"switchNode","name":"switch: subnet-id tmp.AnAI.l3network.subnets.subnet[] == tmp.subnetRollback[]","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-id == $tmp.subnetRollback[$j].subnet-id`\">","comments":"","outputs":1,"x":1521.5595359802246,"y":5636.785568237305,"z":"b24c83f7.abbc6","wires":[["f63c8882.16f8c8"]]},{"id":"f63c8882.16f8c8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1899.2739334106445,"y":5637.213930130005,"z":"b24c83f7.abbc6","wires":[["7bc44cc3.686514"]]},{"id":"32bdc1c1.96f2ee","type":"save","name":"rollback AnAI update - l3-network.subnets.subnet ","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$j].subnet-id\" >\n<parameter name=\"subnet-name\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name`\"/>\n<parameter name=\"gateway-address\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].gateway-address`\"/>\n<parameter name=\"cidr-mask\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].cidr-mask`\"/>\n<parameter name=\"dhcp-start\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-start`\"/>\n<parameter name=\"dhcp-end\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-end`\"/>\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-enabled`\"/>\n<parameter name=\"orchestration-status\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`\" />\n\t\t","comments":"","outputs":1,"x":1788.274269104004,"y":5764.070308685303,"z":"b24c83f7.abbc6","wires":[["1f2ad8bc.a55ac7","e61b880e.096858"]]},{"id":"90858a29.37fc08","type":"set","name":"set tmp.subnetUpdate = 1","xml":"<set>\n<parameter name=\"tmp.subnetUpdate\" value=\"1\" />\n","comments":"","x":2039.7500114440918,"y":467.30952644348145,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"2e3c7ba2.d21b54","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":1703.5237846374512,"y":4707.786193847656,"z":"b24c83f7.abbc6","wires":[]},{"id":"8ecdb1d7.aea0c","type":"outcomeTrue","name":"true","xml":"<outcome value=\"true\">","outputs":1,"x":626.4760551452637,"y":4866.821534156799,"z":"b24c83f7.abbc6","wires":[["fb5a4fe8.b156b"]]},{"id":"59c57e09.0c9bd","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":420.53577041625977,"y":1611.0597400665283,"z":"b24c83f7.abbc6","wires":[["41ca0932.f48da8"]]},{"id":"41ca0932.f48da8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":623.2500190734863,"y":1611.059762954712,"z":"b24c83f7.abbc6","wires":[["99484323.6781e"]]},{"id":"15930eb5.9d2c61","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":822.3214836120605,"y":1218.0238513946533,"z":"b24c83f7.abbc6","wires":[["13aa477e.313a59"]]},{"id":"13aa477e.313a59","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1028.035732269287,"y":1218.023874282837,"z":"b24c83f7.abbc6","wires":[["4fd8628d.a08a8c"]]},{"id":"eea3a1e.e88116","type":"set","name":"set k, n max + 1","xml":"<set>\n\t<parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />\n\t<parameter name='n' value='`$preload-data.network-topology-information.subnets_length + 1`' />","comments":"","x":2009.035930633545,"y":1281.0239906311035,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"fcfd2600.488c78","type":"set","name":"set k, n max + 1","xml":"<set>\n\t<parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />\n\t<parameter name='n' value='`$preload-data.network-topology-information.subnets_length + 1`' />","comments":"","x":2495.2500495910645,"y":1026.416687965393,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"f15dac05.a23f","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":417.50002670288086,"y":2252.666706085205,"z":"b24c83f7.abbc6","wires":[["aae89695.f77e48"]]},{"id":"aae89695.f77e48","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":620.2142753601074,"y":2252.6667289733887,"z":"b24c83f7.abbc6","wires":[["ea36d758.4a9288"]]},{"id":"b16ab5f2.35a148","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":419.91669845581055,"y":4867.2497272491455,"z":"b24c83f7.abbc6","wires":[["8ecdb1d7.aea0c"]]},{"id":"bb8ce764.d17888","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":426.8452568054199,"y":4584.21407699585,"z":"b24c83f7.abbc6","wires":[["4b1ed48a.23e81c"]]},{"id":"4b1ed48a.23e81c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":629.5595054626465,"y":4584.214099884033,"z":"b24c83f7.abbc6","wires":[["80e7eee4.21ab2"]]},{"id":"c10e73d.da8889","type":"switchNode","name":"switch: texecute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":441.80556869506836,"y":3195.333309173584,"z":"b24c83f7.abbc6","wires":[["452cff0a.34b71"]]},{"id":"452cff0a.34b71","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":644.5198173522949,"y":3195.3333320617676,"z":"b24c83f7.abbc6","wires":[["70d1080b.b08868"]]},{"id":"6f14f693.d5a4e8","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":748.750057220459,"y":2416.8331909179688,"z":"b24c83f7.abbc6","wires":[["4f7b45c9.8320cc"]]},{"id":"4f7b45c9.8320cc","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":951.4643058776855,"y":2416.8332138061523,"z":"b24c83f7.abbc6","wires":[["1cdf3f9f.d8ad9"]]},{"id":"1cdf3f9f.d8ad9","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":575.4166831970215,"y":2500.1666870117188,"z":"b24c83f7.abbc6","wires":[["a47b8b14.1829d8","c4f81359.003b8"]]},{"id":"2f44a8dd.3b2668","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":1379.3213157653809,"y":2357.7857484817505,"z":"b24c83f7.abbc6","wires":[]},{"id":"69801ad3.b07ae4","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2416.083438873291,"y":2728.4998531341553,"z":"b24c83f7.abbc6","wires":[]},{"id":"236011f6.f5e4be","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":1326.7500114440918,"y":2731.1666736602783,"z":"b24c83f7.abbc6","wires":[["a714abe2.f5c9e8"]]},{"id":"a714abe2.f5c9e8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1529.4642601013184,"y":2731.166696548462,"z":"b24c83f7.abbc6","wires":[["d8a1ae30.7e241"]]},{"id":"67a32bcf.a45a94","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2201.1783409118652,"y":3006.547595977783,"z":"b24c83f7.abbc6","wires":[]},{"id":"d62cda9.c225228","type":"set","name":"set i = max + 1","xml":"<set>\n <parameter name=\"i\" value = \"`$preload-data.network-topology-information.vpn-bindings_length + 1`\" />\n\n","comments":"","x":2168.321300506592,"y":2963.452346801758,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"67e9507e.488ea","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":722.6388664245605,"y":3411.7224493026733,"z":"b24c83f7.abbc6","wires":[["24fa2743.255dc8"]]},{"id":"24fa2743.255dc8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":925.3531150817871,"y":3411.722472190857,"z":"b24c83f7.abbc6","wires":[["abcc1298.8b121"]]},{"id":"abcc1298.8b121","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":551.5277671813965,"y":3498.1664628982544,"z":"b24c83f7.abbc6","wires":[["9dcafbd2.180118","f4907fd3.a65"]]},{"id":"8aeb103.23b59f","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":1377.8608665466309,"y":3317.5153970718384,"z":"b24c83f7.abbc6","wires":[]},{"id":"338842a2.95efee","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2245.4166526794434,"y":3628.166793823242,"z":"b24c83f7.abbc6","wires":[]},{"id":"133667f2.eb77f8","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2704.7027473449707,"y":3785.4525051116943,"z":"b24c83f7.abbc6","wires":[]},{"id":"9d0c9a84.7d8738","type":"set","name":"set tmp.subnetUpdate = 1","xml":"<set>\n<parameter name=\"tmp.subnetUpdate\" value=\"1\" />\n","comments":"","x":2812.464214324951,"y":697.5952434539795,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"9e7603e8.19f05","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2322.178722381592,"y":693.7380847930908,"z":"b24c83f7.abbc6","wires":[["17af6854.693e78"]]},{"id":"17af6854.693e78","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$preload-data.network-topology-information.subnets[$n].gateway-address`\" />\n","comments":"","x":2518.035655975342,"y":693.8809680938721,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"dad835c6.d0c618","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":728.4644050598145,"y":5585.832514762878,"z":"b24c83f7.abbc6","wires":[["70aa977b.fe30d8","e3487ebb.a5939","153987c7.1a4048"]]},{"id":"f6fe6422.4322c8","type":"set","name":"set: tmp.rollbck.match = 1","xml":"<set>\n\t<parameter name=\"tmp.rollback.match\" value=\"1\"/>","comments":"","x":1242.6072006225586,"y":5804.118718147278,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"7bc44cc3.686514","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":996.6070785522461,"y":5719.1187171936035,"z":"b24c83f7.abbc6","wires":[["56134ac0.df0084","f6fe6422.4322c8"]]},{"id":"e3487ebb.a5939","type":"switchNode","name":"switch: tmp.rollback.match == 0","xml":"<switch test=\"`$tmp.rollback.match == 0`\">","comments":"","outputs":1,"x":970.8927803039551,"y":5869.405124664307,"z":"b24c83f7.abbc6","wires":[["97427759.0023b8"]]},{"id":"44553355.40997c","type":"switchNode","name":"switch: tmp.subnetRollback[].type","xml":"<switch test=\"`$tmp.subnetRollback[$j].type`\">","comments":"","outputs":1,"x":1423.607120513916,"y":5868.690284729004,"z":"b24c83f7.abbc6","wires":[["76cbcff8.a7aa9"]]},{"id":"d50c1822.8cb098","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2076.3214721679688,"y":5718.976065635681,"z":"b24c83f7.abbc6","wires":[["abd6e5ca.0f7378"]]},{"id":"abd6e5ca.0f7378","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'failed to rollback the subnet.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":2341.3138847351074,"y":5718.36167049408,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"a1bcb891.4f80b8","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'failed to rollback the subnet attributes update in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":2344.1787719726562,"y":5763.833457946777,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"602727b5.9746c8","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'failed to rollback to delete subnet from AnAI where subnet-id = ' + $tmp.subnetRollback[$j].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":2462.321430206299,"y":5867.9756507873535,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"1f2ad8bc.a55ac7","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2076.3212890625,"y":5764.11878490448,"z":"b24c83f7.abbc6","wires":[["a1bcb891.4f80b8"]]},{"id":"eb93aa28.0b07f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2231.4643592834473,"y":5867.404291152954,"z":"b24c83f7.abbc6","wires":[["602727b5.9746c8"]]},{"id":"cdfeb5ff.d63b08","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'failed to rollback l3network.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":1794.464267730713,"y":5975.404790878296,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"d11dd828.7802a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1556.6071968078613,"y":5975.8334312438965,"z":"b24c83f7.abbc6","wires":[["cdfeb5ff.d63b08"]]},{"id":"d02a826d.205fd","type":"comment","name":"---- ROLLBACK STARTS HERE ----","info":"","comments":"","x":484.1071357727051,"y":4820.047375679016,"z":"b24c83f7.abbc6","wires":[]},{"id":"ca78be2.35c6c4","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving new subnet in AnAI with subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`\"/>","comments":"","x":2037.1785850524902,"y":2146.595244407654,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"1623f021.c2b9","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while updating subnet status to pending-delete in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`\"/>","comments":"","x":2030.3214073181152,"y":1323.7380981445312,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"5d6b7d0.b989584","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while updating subnet attributes in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`\"/>","comments":"","x":2519.464366912842,"y":1069.880968093872,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"153987c7.1a4048","type":"set","name":"set: tmp.rollbck.match = 0","xml":"<set>\n\t<parameter name=\"tmp.rollback.match\" value=\"0\"/>","comments":"","x":950.8928108215332,"y":5586.119483947754,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"92778af8.befa68","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1643.0358047485352,"y":2149.9285049438477,"z":"b24c83f7.abbc6","wires":[["8dabdae5.57ab58"]]},{"id":"150db709.87fab9","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1612.1785697937012,"y":1325.3571643829346,"z":"b24c83f7.abbc6","wires":[["c6b0d6cd.d0a058"]]},{"id":"c9c8378e.07a4c8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2135.8928031921387,"y":1069.928575515747,"z":"b24c83f7.abbc6","wires":[["cd77a967.3c6308"]]},{"id":"49306a1.5c79894","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1826.6071586608887,"y":2964.214220046997,"z":"b24c83f7.abbc6","wires":[["bd84c069.9f407"]]},{"id":"c3c189a0.4ccb58","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2330.6071586608887,"y":3788.071397781372,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"40f41704.9cc688","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1280.1071510314941,"y":4706.237885475159,"z":"b24c83f7.abbc6","wires":[["b682bac.b292748"]]},{"id":"10056ed4.c3d191","type":"switchNode","name":"switch: AnAI == INPUT - network-name","xml":"<switch test=\"`$tmp.AnAI.l3network.network-name == $network-topology-operation-input.network-request-information.network-name`\">","comments":"","outputs":1,"x":482.1785697937012,"y":250.93650436401367,"z":"b24c83f7.abbc6","wires":[["9ed8a698.ef15c8"]]},{"id":"9ed8a698.ef15c8","type":"not-found","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":729.4285697937012,"y":250.94050121307373,"z":"b24c83f7.abbc6","wires":[["669252c9.4ba83c"]]},{"id":"669252c9.4ba83c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'The input network-name,' + network-topology-operation-input.network-request-information.network-name + ', does not match what is returned from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":892.0673446655273,"y":250.82948875427246,"z":"b24c83f7.abbc6","wires":[]},{"id":"b4cd1414.581b48","type":"switchNode","name":"switch: AnAI == INPUT - network-type","xml":"<switch test=\"`$tmp.AnAI.l3network.network-type == $network-topology-operation-input.network-request-information.network-type`\">","comments":"","outputs":1,"x":475.892822265625,"y":294.22220611572266,"z":"b24c83f7.abbc6","wires":[["4ad1dbfd.e57f94"]]},{"id":"4ad1dbfd.e57f94","type":"not-found","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":730.142822265625,"y":294.2262029647827,"z":"b24c83f7.abbc6","wires":[["3522894b.36b6e6"]]},{"id":"3522894b.36b6e6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'The input network-type,' + network-topology-operation-input.network-request-information.network-type + ', does not match what is returned from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":892.7815971374512,"y":294.11519050598145,"z":"b24c83f7.abbc6","wires":[]},{"id":"e456340c.466478","type":"switchNode","name":"switch: AnAI == PRELOAD - network-type","xml":"<switch test=\"`$tmp.AnAI.l3network.network-type == $preload-data.network-topology-information.network-topology-identifier.network-type`\">","comments":"","outputs":1,"x":491.0357475280762,"y":384.22219944000244,"z":"b24c83f7.abbc6","wires":[["9cd473e1.2c58a"]]},{"id":"9cd473e1.2c58a","type":"not-found","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":747.2857475280762,"y":384.2261962890625,"z":"b24c83f7.abbc6","wires":[["6893351b.74b03c"]]},{"id":"6893351b.74b03c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'No preload network found with network-type = ' + $tmp.AnAI.l3network.network-type + ' in SDNC'`\" />","comments":"","x":909.9245223999023,"y":384.11518383026123,"z":"b24c83f7.abbc6","wires":[]},{"id":"97427759.0023b8","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1190.7143287658691,"y":5869.460375785828,"z":"b24c83f7.abbc6","wires":[["44553355.40997c"]]},{"id":"c5b6850b.08be08","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1577.4998817443848,"y":5322.082991600037,"z":"b24c83f7.abbc6","wires":[["de78af5a.c6912"]]},{"id":"d4b57fb0.f24f4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1554.4998817443848,"y":5173.749495506287,"z":"b24c83f7.abbc6","wires":[["3a4aef64.3150d"]]},{"id":"ad551bbf.58fcc8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2084.333240509033,"y":5673.749419212341,"z":"b24c83f7.abbc6","wires":[["abd6e5ca.0f7378"]]},{"id":"e61b880e.096858","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2083.9998664855957,"y":5809.082915306091,"z":"b24c83f7.abbc6","wires":[["a1bcb891.4f80b8"]]},{"id":"c1cf86f2.493818","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2239.999988555908,"y":5909.749419212341,"z":"b24c83f7.abbc6","wires":[["602727b5.9746c8"]]},{"id":"81ba8fb7.9e498","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1564.3332405090332,"y":6018.082915306091,"z":"b24c83f7.abbc6","wires":[["cdfeb5ff.d63b08"]]},{"id":"eca5ffa4.23d73","type":"switchNode","name":"switch ... tmp.AnAI.l3network.subnets.subnet[]","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":499.1785697937012,"y":470.35716438293457,"z":"b24c83f7.abbc6","wires":[["48a25cc2.387cb4"]]},{"id":"48a25cc2.387cb4","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":769.6230201721191,"y":470.1349000930786,"z":"b24c83f7.abbc6","wires":[["8ba49ed0.9ad3c"]]},{"id":"8ba49ed0.9ad3c","type":"set","name":"set tmp.AnAI.l3network.subnets.subnet[] = 0","xml":"<set>\n<parameter name=\"tmp.AnAI.l3network.subnets.subnet_length\" value=\"0\" />\n","comments":"","x":1027.1786291334365,"y":470.134920756022,"z":"b24c83f7.abbc6","wires":[]},{"id":"95ceb957.e7a948","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":463.0356864929199,"y":4019.404680252075,"z":"b24c83f7.abbc6","wires":[["c3dd4c7f.8ca1e","af6b3c9b.97c77"]]},{"id":"2d4379bf.6ca416","type":"switchNode","name":"switch ... PRELOAD route-table-reference[]","xml":"<switch test=\"`$preload-data.network-topology-information.route-table-reference_length`\">","comments":"","outputs":1,"x":837.8372917175293,"y":4245.277545928955,"z":"b24c83f7.abbc6","wires":[["7688d6b7.3bce68"]]},{"id":"7688d6b7.3bce68","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1094.5317192077637,"y":4245.0550355911255,"z":"b24c83f7.abbc6","wires":[["26a757db.f17628"]]},{"id":"26a757db.f17628","type":"set","name":"set route-table-reference[] = 0","xml":"<set>\n<parameter name='preload-data.network-topology-information.route-table-reference_length' value='0' />\n","comments":"","x":1309.087328169081,"y":4245.055056254068,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"3fbe4ceb.b0e5e4","type":"for","name":"for loop i - PRELOAD route-table-reference","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.route-table-reference_length`\">\n","comments":"","outputs":1,"x":837.4445457458496,"y":4290.848835945129,"z":"b24c83f7.abbc6","wires":[["6b695bb.39906a4"]]},{"id":"e761c57c.044408","type":"save","name":"save relationship: network-policy","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"route-table-reference\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"route-table-reference.route-table-reference-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.route-table-reference.route-table-reference-id`\" />","comments":"","outputs":1,"x":2229.8574409484863,"y":4490.035390853882,"z":"b24c83f7.abbc6","wires":[["5628f36a.55c77c","a92d1865.c2b648","3e5fe722.9f7198"]]},{"id":"6b695bb.39906a4","type":"switchNode","name":"switch: PRELOAD route-table-reference-fqdn != NULL","xml":"<switch test=\"`$preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn != NULL`\">","comments":"","outputs":1,"x":1248.2067527770996,"y":4290.947957038879,"z":"b24c83f7.abbc6","wires":[["8696f734.56d0f8"]]},{"id":"8696f734.56d0f8","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1533.9567604064941,"y":4291.197957038879,"z":"b24c83f7.abbc6","wires":[["c3ff1f7e.223f6"]]},{"id":"c3ff1f7e.223f6","type":"save","name":"query AnAI - route-table-reference","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"route-table-reference\" \n\t\tkey=\"route-table-reference.route-table-reference-fqdn = $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn\" \n\t\tpfx=\"tmp.AnAI.route-table-reference\">","comments":"","outputs":1,"x":1760.7067642211914,"y":4291.197865486145,"z":"b24c83f7.abbc6","wires":[["c5a368f6.5d1388","4611ee89.1d504","1c257c97.0acec3"]]},{"id":"c5a368f6.5d1388","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1999.7067964341904,"y":4331.947787602743,"z":"b24c83f7.abbc6","wires":[["c1256682.7b8998"]]},{"id":"4611ee89.1d504","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2005.2068002488877,"y":4291.447786649069,"z":"b24c83f7.abbc6","wires":[["c1256682.7b8998"]]},{"id":"c1256682.7b8998","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":2154.7068002488877,"y":4331.697788556417,"z":"b24c83f7.abbc6","wires":[["daaddd41.3513f","dabc25b1.2558b8"]]},{"id":"daaddd41.3513f","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`\"/>","comments":"","x":2370.806340959337,"y":4331.44768746694,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"5628f36a.55c77c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2455.930316925049,"y":4489.510977745056,"z":"b24c83f7.abbc6","wires":[["e1c99ca6.e00f4"]]},{"id":"e1c99ca6.e00f4","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":2596.823196411133,"y":4489.147085189819,"z":"b24c83f7.abbc6","wires":[["e0fe20d7.e6c28","6b785063.e94b4"]]},{"id":"e0fe20d7.e6c28","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving l3-newtork route-table-reference relationship in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`\"/>","comments":"","x":2827.922737121582,"y":4488.896984100342,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"c3dd4c7f.8ca1e","type":"save","name":"delete relationship: route-table-reference","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t AND related-to = route-table-reference\" >","comments":"","outputs":1,"x":751.2499656677246,"y":4019.2140085697174,"z":"b24c83f7.abbc6","wires":[["593b5e06.7f9d3"]]},{"id":"1c257c97.0acec3","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2004.4723930358887,"y":4489.539258956909,"z":"b24c83f7.abbc6","wires":[["e761c57c.044408"]]},{"id":"593b5e06.7f9d3","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1044.384937286377,"y":4018.797219514847,"z":"b24c83f7.abbc6","wires":[["72f7191.61f2fe8"]]},{"id":"72f7191.61f2fe8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1221.121711730957,"y":4018.488557100296,"z":"b24c83f7.abbc6","wires":[["35c5090a.a6a506","9f95b6ef.410b58"]]},{"id":"35c5090a.a6a506","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"An error occurred while deleting l3-network route-table-reference relationship from AnAI prior to regenerate the route-table-reference relationship from PRELOAD.\"/>","comments":"","x":1445.134937286377,"y":4018.797219514847,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"b1f0d10d.9422f","type":"set","name":"set tmp.route-table-reference.updated = 1","xml":"<set>\n<parameter name='tmp.route-table-reference.updated' value='1' />\n","comments":"","x":2701.2578773498535,"y":4579.717977523804,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"a92d1865.c2b648","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2462.5078773498535,"y":4579.967977523804,"z":"b24c83f7.abbc6","wires":[["b1f0d10d.9422f"]]},{"id":"bd2d9b6e.b5c1d8","type":"switchNode","name":"switch: texecute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":441.6825370788574,"y":3942.777727127075,"z":"b24c83f7.abbc6","wires":[["3e54549b.21c4cc"]]},{"id":"3e54549b.21c4cc","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":648.3967933654785,"y":3942.777656555176,"z":"b24c83f7.abbc6","wires":[["95ceb957.e7a948"]]},{"id":"af6b3c9b.97c77","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":726.5158424377441,"y":4159.1667737960815,"z":"b24c83f7.abbc6","wires":[["96f82eb1.4c085"]]},{"id":"96f82eb1.4c085","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":929.2300910949707,"y":4159.166796684265,"z":"b24c83f7.abbc6","wires":[["ab2bfb98.61b8f8"]]},{"id":"ab2bfb98.61b8f8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":555.4047431945801,"y":4245.610787391663,"z":"b24c83f7.abbc6","wires":[["2d4379bf.6ca416","3fbe4ceb.b0e5e4"]]},{"id":"9f95b6ef.410b58","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":1450.7378425598145,"y":4064.9597215652466,"z":"b24c83f7.abbc6","wires":[]},{"id":"dabc25b1.2558b8","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2379.293628692627,"y":4375.61111831665,"z":"b24c83f7.abbc6","wires":[]},{"id":"6b785063.e94b4","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2838.5797233581543,"y":4532.8968296051025,"z":"b24c83f7.abbc6","wires":[]},{"id":"3e5fe722.9f7198","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2464.4841346740723,"y":4535.51572227478,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"63a30c32.764734","type":"other","name":"route-table-reference","xml":"<outcome value='route-table-reference'>\n","comments":"","outputs":1,"x":1136.785717010498,"y":5378.57142829895,"z":"b24c83f7.abbc6","wires":[["cb6e6d5b.fb8fc"]]},{"id":"e64e8959.22cce8","type":"save","name":"Rollback to save relationship: route-table-reference","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"route-table-reference\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"route-table-reference.route-table-reference-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`\" />","comments":"","outputs":1,"x":1304.368968963623,"y":5437.9049243927,"z":"b24c83f7.abbc6","wires":[["daa92ca8.40a27","751ffeff.5a4d2"]]},{"id":"daa92ca8.40a27","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1564.4418449401855,"y":5437.3805112838745,"z":"b24c83f7.abbc6","wires":[["5bbb5aa9.dd0a84"]]},{"id":"5bbb5aa9.dd0a84","type":"set","name":"tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'An error occurred during rollback of l3-newtork route-table-reference relationship in AnAI where route-table-reference-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":1780.434169769287,"y":5437.76609992981,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"cb6e6d5b.fb8fc","type":"switchNode","name":"switch: tmp.route-table-reference.updated == 1","xml":"<switch test=\"`$tmp.route-table-reference.updated == 1`\">","comments":"","outputs":1,"x":1408.1192054748535,"y":5378.571630477905,"z":"b24c83f7.abbc6","wires":[["43ccda4d.49fa94"]]},{"id":"43ccda4d.49fa94","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1653.119213104248,"y":5378.571672439575,"z":"b24c83f7.abbc6","wires":[["e64e8959.22cce8"]]},{"id":"751ffeff.5a4d2","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1572.7023887634277,"y":5476.999547958374,"z":"b24c83f7.abbc6","wires":[["5bbb5aa9.dd0a84"]]},{"id":"ef8f189e.13e928","type":"switchNode","name":"switch: l3subnet[k] == PRELOAD subnets[n] subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-name == $preload-data.network-topology-information.subnets[$n].subnet-name`\">","comments":"","outputs":1,"x":1637.285717010498,"y":971.0714282989502,"z":"b24c83f7.abbc6","wires":[["abf8f55e.ce71d8"]]},{"id":"abf8f55e.ce71d8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1937.2022247314453,"y":970.7936429977417,"z":"b24c83f7.abbc6","wires":[["a89a0d2d.9ab2c"]]},{"id":"a89a0d2d.9ab2c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2075.3434448242188,"y":971.1691417694092,"z":"b24c83f7.abbc6","wires":[["ae8d6ec6.39e21"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/network-topology-delete.json b/platform-logic/vnfapi/src/main/json/network-topology-delete.json
new file mode 100644
index 0000000..3c2ca1d
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/network-topology-delete.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"9a85f16b.d93cd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1144,"y":667.2234153747559,"z":"78f26cc2.346884","wires":[["97b09ce.37e6a6","3e48845d.1dee8c","7a75947e.dc19cc"]]},{"id":"97b09ce.37e6a6","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":1376.1924362182617,"y":716.0835227966309,"z":"78f26cc2.346884","wires":[[]]},{"id":"3e48845d.1dee8c","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"networkId\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1355.73929977417,"y":766.4465789794922,"z":"78f26cc2.346884","wires":[]},{"id":"7a75947e.dc19cc","type":"delete","name":"delete AnAI - l3-network","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >","comments":"","outputs":1,"x":1381.7546920776367,"y":668.0158958435059,"z":"78f26cc2.346884","wires":[[]]},{"id":"6426b1cc.4346d","type":"switchNode","name":"switch: INPUT network-id","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.network-id`\">","comments":"","outputs":1,"x":262.6510238647461,"y":236.66913223266602,"z":"78f26cc2.346884","wires":[["9751ef82.d9c77","bf204584.cdc938","1b3cf9d1.1a1ed6"]]},{"id":"7698e3d.ad1ef1c","type":"switchNode","name":"switch: INPUT network-name","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.network-name`\">","comments":"","outputs":1,"x":700.6512680053711,"y":410.12323570251465,"z":"78f26cc2.346884","wires":[["c217c4b3.588c08","5789e661.35e1f8"]]},{"id":"28116afa.ade786","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"DisconnectNetworkRequest requires network-id or network-name \"/>","comments":"","x":1085.651268005371,"y":409.12323570251465,"z":"78f26cc2.346884","wires":[]},{"id":"28abb006.b3f25","type":"get-resource","name":"get AnAI - l3-network by network-name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $network-topology-operation-input.network-request-information.network-name\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1168.1371955871582,"y":453.1300859451294,"z":"78f26cc2.346884","wires":[["b4715be3.bcd0c8","5d878005.c41e6","89e70fc0.287a2"]]},{"id":"6a7fc7cc.ee76d8","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":718.0410385131836,"y":237.04998779296875,"z":"78f26cc2.346884","wires":[["690d7e4b.60bd3","b9af04da.c023e8","47d05050.d96c3"]]},{"id":"690d7e4b.60bd3","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":947.9980697631836,"y":236.52020263671875,"z":"78f26cc2.346884","wires":[["2ebce416.bdfaac"]]},{"id":"2ebce416.bdfaac","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"Failed to query AAI by network-id\"/>","comments":"","x":1111.9981002807617,"y":236.51995849609375,"z":"78f26cc2.346884","wires":[]},{"id":"b4715be3.bcd0c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1404.1373176574707,"y":453.1300859451294,"z":"78f26cc2.346884","wires":[["b96fe1bf.ab29e"]]},{"id":"b96fe1bf.ab29e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"Failed to query AAI by network-name\"/>","comments":"","x":1568.1373481750488,"y":453.1298418045044,"z":"78f26cc2.346884","wires":[]},{"id":"1b3cf9d1.1a1ed6","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":496.7481002807617,"y":237.15521240234375,"z":"78f26cc2.346884","wires":[["6a7fc7cc.ee76d8"]]},{"id":"9751ef82.d9c77","type":"other","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":496.6369857788086,"y":320.26629638671875,"z":"78f26cc2.346884","wires":[["7698e3d.ad1ef1c"]]},{"id":"bf204584.cdc938","type":"other","name":"0","xml":"<outcome value='0'>","comments":"","outputs":1,"x":496.7481002807617,"y":278.15521240234375,"z":"78f26cc2.346884","wires":[["7698e3d.ad1ef1c"]]},{"id":"c217c4b3.588c08","type":"other","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":924.4981002807617,"y":409.65546226501465,"z":"78f26cc2.346884","wires":[["28116afa.ade786"]]},{"id":"5789e661.35e1f8","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":923.4981384277344,"y":453.655478477478,"z":"78f26cc2.346884","wires":[["28abb006.b3f25"]]},{"id":"b9af04da.c023e8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":955.9980697631836,"y":281.22381591796875,"z":"78f26cc2.346884","wires":[["59b0c026.b692a"]]},{"id":"5d878005.c41e6","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1412.137134552002,"y":499.8349199295044,"z":"78f26cc2.346884","wires":[["9de2063e.c41718"]]},{"id":"59b0c026.b692a","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"networkId\" value=\"`$network-topology-operation-input.network-request-information.network-id` not found\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1122.9980697631836,"y":281.22381591796875,"z":"78f26cc2.346884","wires":[]},{"id":"9de2063e.c41718","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"augmentation\" value=\"`$network-topology-operation-input.network-request-information.network-name` not found\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1574.137134552002,"y":499.8349199295044,"z":"78f26cc2.346884","wires":[]},{"id":"47d05050.d96c3","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":952.3224105834961,"y":325.90545654296875,"z":"78f26cc2.346884","wires":[["9a85f16b.d93cd"]]},{"id":"89e70fc0.287a2","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1407.461353302002,"y":547.5165605545044,"z":"78f26cc2.346884","wires":[["9a85f16b.d93cd"]]},{"id":"bcbd8a.ad7d6278","type":"method","name":"method network-topology-delete","xml":"<method rpc=\"network-topology-delete\" mode=\"sync\">","comments":"","outputs":1,"x":212.60881805419922,"y":109.03170585632324,"z":"78f26cc2.346884","wires":[["acd387f9.1c0658"]]},{"id":"eaea2109.ba78e","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":299.2754669189453,"y":47.142822265625,"z":"78f26cc2.346884","wires":[["bcbd8a.ad7d6278"]]},{"id":"93281b43.a28d38","type":"dgstart","name":"DGSTART","outputs":1,"x":135.1643524169922,"y":47.142822265625,"z":"78f26cc2.346884","wires":[["eaea2109.ba78e"]]},{"id":"acd387f9.1c0658","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":171.02154541015625,"y":172.30953216552734,"z":"78f26cc2.346884","wires":[["6426b1cc.4346d"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/network-topology-operation.json b/platform-logic/vnfapi/src/main/json/network-topology-operation.json
new file mode 100644
index 0000000..edffef6
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/network-topology-operation.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"31cafe01.9adca2","type":"switchNode","name":"switch: request-action","xml":"<switch test=\"`$network-topology-operation-input.request-information.request-action`\">\n","comments":"","outputs":1,"x":371.4285888671875,"y":270.0613708496094,"z":"77e6e7e2.0c2078","wires":[["20cf373a.361a98","1e0fc860.39fab8","1be0c7c8.9720a8"]]},{"id":"20cf373a.361a98","type":"other","name":"NetworkActivateRequest","xml":"<outcome value='NetworkActivateRequest'>","comments":"","outputs":1,"x":632.0319213867188,"y":269.2359848022461,"z":"77e6e7e2.0c2078","wires":[["d5087218.fb661"]]},{"id":"15061e2c.b35542","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":154.1070327758789,"y":184.20634078979492,"z":"77e6e7e2.0c2078","wires":[["31cafe01.9adca2","577eb935.6138d8"]]},{"id":"577eb935.6138d8","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$network-topology-operation-input.service-information.service-id`\"/>\n<parameter name=\"field6\" value=\"`$network-topology-operation-input.service-information.service-type`\"/>\n<parameter name=\"field7\" value=\"`$network-topology-operation-input.service-information.subscriber-name`\"/>\n<parameter name=\"field8\" value=\"`$network-topology-operation-input.service-information.service-instance-id`\"/>\n<parameter name=\"field9\" value=\"`$network-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field10\" value=\"`$network-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field11\" value=\"`$network-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field12\" value=\"`$network-topology-operation-input.network-request-information.network-name`\"/>\n<parameter name=\"field13\" value=\"`$network-topology-operation-input.network-request-information.network-type`\"/>\n<parameter name=\"field14\" value=\"`$network-topology-operation-input.network-request-information.tenant`\"/>\n<parameter name=\"field15\" value=\"`$network-topology-operation-input.network-request-information.aic-cloud-region`\"/>\n<parameter name=\"field16\" value=\"`$network-topology-operation-input.network-request-information.aic-clli`\"/>\n<parameter name=\"field17\" value=\"`$network-topology-operation-input.network-request-information.network-id`\"/>","comments":"","outputs":1,"x":327.53912353515625,"y":183.33685493469238,"z":"77e6e7e2.0c2078","wires":[[]]},{"id":"4283a1fe.970e","type":"method","name":"method network-topology-operation","xml":"<method rpc=\"network-topology-operation\" mode=\"sync\">","comments":"","outputs":1,"x":215.6626205444336,"y":132.76189613342285,"z":"77e6e7e2.0c2078","wires":[["15061e2c.b35542"]]},{"id":"8c257c9.b4a768","type":"service-logic","name":"VNF-API 3.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":291.1070556640625,"y":81.4285717010498,"z":"77e6e7e2.0c2078","wires":[["4283a1fe.970e"]]},{"id":"1888b70.5a9a849","type":"dgstart","name":"DGSTART","outputs":1,"x":126.99594116210938,"y":81.4285717010498,"z":"77e6e7e2.0c2078","wires":[["8c257c9.b4a768"]]},{"id":"2eb8cf98.68207","type":"other","name":"changeassign","xml":"<outcome value='changeassign'>","comments":"","outputs":1,"x":1295.6823081970215,"y":764.8134984970093,"z":"77e6e7e2.0c2078","wires":[["55a1785.811b488"]]},{"id":"183ebb2.55cc445","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1275.5392951965332,"y":680.3813581466675,"z":"77e6e7e2.0c2078","wires":[["bed5b432.c78528"]]},{"id":"bed5b432.c78528","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='svc-action is not found'/>","comments":"","x":1430.8725471496582,"y":680.2385053634644,"z":"77e6e7e2.0c2078","wires":[]},{"id":"b3ce277.8bbe0d8","type":"other","name":"rollback","xml":"<outcome value='rollback'>","comments":"","outputs":1,"x":1275.900478363037,"y":825.8095054626465,"z":"77e6e7e2.0c2078","wires":[["b70577da.72cbd8"]]},{"id":"1e0fc860.39fab8","type":"other","name":"DisconnectNetworkRequest","xml":"<outcome value='DisconnectNetworkRequest'>","comments":"","outputs":1,"x":633.9988098144531,"y":866.2646436691284,"z":"77e6e7e2.0c2078","wires":[["d5bba27d.129ba"]]},{"id":"d5bba27d.129ba","type":"switchNode","name":"switch: svc-action","xml":"<switch test=\"`$network-topology-operation-input.sdnc-request-header.svc-action`\">\n<!--\nleaf svc-action { \n\ttype enumeration { \n\t\tenum \"reserve\";\n\t\tenum \"assign\";\n\t\tenum \"activate\"; // equal to commit\n\t\tenum \"delete\";\t // equal to commit\n\t\tenum \"changeassign\";\n\t\tenum \"changedelete\";\n\t\tenum \"rollback\";\n\t}\n}\n-->\n\n","comments":"","outputs":1,"x":1053.1556777954102,"y":866.0714836120605,"z":"77e6e7e2.0c2078","wires":[["c42c53f4.a698e","bbac4b77.98a938","b3ce277.8bbe0d8"]]},{"id":"c42c53f4.a698e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1273.327880859375,"y":907.3238182067871,"z":"77e6e7e2.0c2078","wires":[["e9be7005.8afb1"]]},{"id":"bbac4b77.98a938","type":"other","name":"delete","xml":"<outcome value='delete'>","comments":"","outputs":1,"x":1273.097999572754,"y":866.6927261352539,"z":"77e6e7e2.0c2078","wires":[["ca6df125.11a36"]]},{"id":"1be0c7c8.9720a8","type":"other","name":"outcome: Other","xml":"<outcome value=\"Other\">\n\n","outputs":1,"x":588.8092346191406,"y":1034.5774583816528,"z":"77e6e7e2.0c2078","wires":[["19650673.dc91ba"]]},{"id":"19650673.dc91ba","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='request-action is not found'/>","comments":"","x":777.1857681274414,"y":1034.2418870925903,"z":"77e6e7e2.0c2078","wires":[]},{"id":"e0fbbcbd.94887","type":"switchNode","name":"switch: svc-action","xml":"<switch test=\"`$network-topology-operation-input.sdnc-request-header.svc-action`\">\n<!--\nleaf svc-action { \n\ttype enumeration { \n\t\tenum \"reserve\";\n\t\tenum \"assign\";\n\t\tenum \"activate\"; // equal to commit\n\t\tenum \"delete\";\t // equal to commit\n\t\tenum \"changeassign\";\n\t\tenum \"changedelete\";\n\t\tenum \"rollback\";\n\t}\n}\n-->\n\n","comments":"","outputs":1,"x":1062.7933540344238,"y":680.813473701477,"z":"77e6e7e2.0c2078","wires":[["183ebb2.55cc445","4694c88.93afa38","2eb8cf98.68207","b3ce277.8bbe0d8"]]},{"id":"4694c88.93afa38","type":"other","name":"assign","xml":"<outcome value='assign'>","comments":"","outputs":1,"x":1274.5710906982422,"y":722.0357122421265,"z":"77e6e7e2.0c2078","wires":[["d2be8e97.44cde"]]},{"id":"d2be8e97.44cde","type":"call","name":"call network-topology-assign","xml":"<call module=\"VNF-API\" rpc=\"network-topology-assign\" mode=\"sync\" >\n","comments":"","outputs":1,"x":1479.015712738037,"y":721.7023401260376,"z":"77e6e7e2.0c2078","wires":[[]]},{"id":"55a1785.811b488","type":"call","name":"call network-topology-changeassign","xml":"<call module=\"VNF-API\" rpc=\"network-topology-changeassign\" mode=\"sync\" >\n","comments":"","outputs":1,"x":1542.3489036560059,"y":764.702374458313,"z":"77e6e7e2.0c2078","wires":[[]]},{"id":"ca6df125.11a36","type":"call","name":"call network-topology-delete","xml":"<call module=\"VNF-API\" rpc=\"network-topology-delete\" mode=\"sync\" >\n","comments":"","outputs":1,"x":1487.011703491211,"y":866.4483852386475,"z":"77e6e7e2.0c2078","wires":[[]]},{"id":"b70577da.72cbd8","type":"call","name":"call network-topology-rollback","xml":"<call module=\"VNF-API\" rpc=\"network-topology-rollback\" mode=\"sync\" >\n","comments":"","outputs":1,"x":1493.678394317627,"y":825.6983976364136,"z":"77e6e7e2.0c2078","wires":[[]]},{"id":"e9be7005.8afb1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='svc-action is not found'/>","comments":"","x":1440.2337760925293,"y":907.654748916626,"z":"77e6e7e2.0c2078","wires":[]},{"id":"f8ae8d90.96fb9","type":"switchNode","name":"switch: INPUT tenant","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.tenant`\">","comments":"","outputs":1,"x":1072.9252319335938,"y":592.666690826416,"z":"77e6e7e2.0c2078","wires":[["28fb3d78.eb0af2"]]},{"id":"93bb40f4.7ba4f","type":"switchNode","name":"switch: INPUT aic-cloud-region","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.aic-cloud-region`\">","comments":"","outputs":1,"x":1103.6630859375,"y":549.5674476623535,"z":"77e6e7e2.0c2078","wires":[["13cb6d46.7a9153"]]},{"id":"13cb6d46.7a9153","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1323.6630859375,"y":549.5674476623535,"z":"77e6e7e2.0c2078","wires":[["ff46b0fc.13c06"]]},{"id":"ff46b0fc.13c06","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='aic-cloud-region is required.'/>","comments":"","x":1481.6630859375,"y":549.5674476623535,"z":"77e6e7e2.0c2078","wires":[]},{"id":"e5a3480f.852ad8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='tenant is required.'/>","comments":"","x":1420.6630859375,"y":592.5674476623535,"z":"77e6e7e2.0c2078","wires":[]},{"id":"28fb3d78.eb0af2","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1261.6630859375,"y":592.5674476623535,"z":"77e6e7e2.0c2078","wires":[["e5a3480f.852ad8"]]},{"id":"4d3b388f.6b7b98","type":"switchNode","name":"switch: INPUT service-id","xml":"<switch test=\"`$network-topology-operation-input.service-information.service-id`\">","comments":"","outputs":1,"x":1083.0402221679688,"y":636.6785926818848,"z":"77e6e7e2.0c2078","wires":[["9466e4e0.c54e58"]]},{"id":"9466e4e0.c54e58","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1280.0402221679688,"y":636.6785926818848,"z":"77e6e7e2.0c2078","wires":[["d80af115.ca6c7"]]},{"id":"d80af115.ca6c7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='service-id is required.'/>","comments":"","x":1438.0402221679688,"y":636.6785926818848,"z":"77e6e7e2.0c2078","wires":[]},{"id":"d5087218.fb661","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":850.1785926818848,"y":268.6446952819824,"z":"77e6e7e2.0c2078","wires":[["93bb40f4.7ba4f","f8ae8d90.96fb9","4d3b388f.6b7b98","e0fbbcbd.94887","6c34a2d6.99642c","ec4123bf.eee3b","ff6a348f.ffa388"]]},{"id":"6c34a2d6.99642c","type":"switchNode","name":"switch test: INPUT network-name","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.network-name`\">","comments":"","outputs":1,"x":1107.4744110107422,"y":269.53583812713623,"z":"77e6e7e2.0c2078","wires":[["80a2e828.b1ec78","c1ab4aa6.364898"]]},{"id":"80a2e828.b1ec78","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1332.9188079833984,"y":269.5358238220215,"z":"77e6e7e2.0c2078","wires":[["4b7119ee.fa71d8"]]},{"id":"c1ab4aa6.364898","type":"other","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1332.7124862670898,"y":315.1866683959961,"z":"77e6e7e2.0c2078","wires":[["81af9fea.61ea4"]]},{"id":"4b7119ee.fa71d8","type":"switchNode","name":"switch test: PRELOAD network-name","xml":"<switch test=\"`$preload-data.network-topology-information.network-topology-identifier.network-name`\">","comments":"","outputs":1,"x":1570.5422401428223,"y":269.7703857421875,"z":"77e6e7e2.0c2078","wires":[["4d1bddd5.84a7d4","d843d3b9.82fae"]]},{"id":"81af9fea.61ea4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='network-name is required from input'/>","comments":"","x":1491.9902648925781,"y":315.1033058166504,"z":"77e6e7e2.0c2078","wires":[]},{"id":"4d1bddd5.84a7d4","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1826.3633117675781,"y":269.20250034332275,"z":"77e6e7e2.0c2078","wires":[["7a6d0faa.240a7"]]},{"id":"d843d3b9.82fae","type":"other","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1826.823631286621,"y":310.7421703338623,"z":"77e6e7e2.0c2078","wires":[["53c2ee9e.fca61"]]},{"id":"7a6d0faa.240a7","type":"switchNode","name":"switch: network-name INPUT == PRELOAD","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.network-name == $preload-data.network-topology-information.network-topology-identifier.network-name`\">","comments":"","outputs":1,"x":2089.620864868164,"y":269.8973398208618,"z":"77e6e7e2.0c2078","wires":[["6a236a9f.8b8514"]]},{"id":"53c2ee9e.fca61","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='network-name not found from preload-data'/>","comments":"","x":1988.3235702514648,"y":310.76990699768066,"z":"77e6e7e2.0c2078","wires":[]},{"id":"6a236a9f.8b8514","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2356.030086517334,"y":269.2027349472046,"z":"77e6e7e2.0c2078","wires":[["89b3fea6.2f7df"]]},{"id":"89b3fea6.2f7df","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"`'No preload-data found to match input network-name = ' + $network-topology-operation-input.network-request-information.network-name`\"/>","comments":"","x":2523.5856323242188,"y":268.5358238220215,"z":"77e6e7e2.0c2078","wires":[]},{"id":"ec4123bf.eee3b","type":"switchNode","name":"switch test: INPUT network-type","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.network-type`\">","comments":"","outputs":1,"x":1108.5715026855469,"y":390.0613555908203,"z":"77e6e7e2.0c2078","wires":[["951992a5.361","6668c754.77fdc8"]]},{"id":"951992a5.361","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1334.0158996582031,"y":390.06134128570557,"z":"77e6e7e2.0c2078","wires":[["d03cda02.c26cc8"]]},{"id":"6668c754.77fdc8","type":"other","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1333.8095779418945,"y":435.7121858596802,"z":"77e6e7e2.0c2078","wires":[["3fbf5322.83e6dc"]]},{"id":"d03cda02.c26cc8","type":"switchNode","name":"switch test: PRELOAD network-type","xml":"<switch test=\"`$preload-data.network-topology-information.network-topology-identifier.network-type`\">","comments":"","outputs":1,"x":1571.639331817627,"y":390.2959032058716,"z":"77e6e7e2.0c2078","wires":[["5d7fef2e.5cba","52bcb.31e0b435c"]]},{"id":"3fbf5322.83e6dc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='network-type is required from input'/>","comments":"","x":1493.0873565673828,"y":435.6288232803345,"z":"77e6e7e2.0c2078","wires":[]},{"id":"5d7fef2e.5cba","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1827.4604034423828,"y":389.72801780700684,"z":"77e6e7e2.0c2078","wires":[["79120c5d.b5e044"]]},{"id":"52bcb.31e0b435c","type":"other","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1827.9207229614258,"y":431.2676877975464,"z":"77e6e7e2.0c2078","wires":[["8087d80e.4b69e8"]]},{"id":"79120c5d.b5e044","type":"switchNode","name":"switch: network-type INPUT == PRELOAD","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.network-type == $preload-data.network-topology-information.network-topology-identifier.network-type`\">","comments":"","outputs":1,"x":2090.7179565429688,"y":390.4228572845459,"z":"77e6e7e2.0c2078","wires":[["d8519067.4d8bf"]]},{"id":"8087d80e.4b69e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='network-type not found from preload-data'/>","comments":"","x":1989.4206619262695,"y":431.29542446136475,"z":"77e6e7e2.0c2078","wires":[]},{"id":"d8519067.4d8bf","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2357.1271781921387,"y":389.7282524108887,"z":"77e6e7e2.0c2078","wires":[["642b9594.3cd29c"]]},{"id":"642b9594.3cd29c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"`'No preload-data found to match input network-type = ' + $network-topology-operation-input.network-request-information.network-type`\"/>","comments":"","x":2524.6827239990234,"y":389.06134128570557,"z":"77e6e7e2.0c2078","wires":[]},{"id":"ff6a348f.ffa388","type":"switchNode","name":"switch: INPUT service-instance-id","xml":"<switch test=\"`$network-topology-operation-input.service-information.service-instance-id`\">","comments":"","outputs":1,"x":1111.4285888671875,"y":498.5714416503906,"z":"77e6e7e2.0c2078","wires":[["339b56d0.67aada"]]},{"id":"339b56d0.67aada","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1331.4285888671875,"y":498.5714416503906,"z":"77e6e7e2.0c2078","wires":[["dafca54f.6d6618"]]},{"id":"dafca54f.6d6618","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='service-instance-id is required.'/>","comments":"","x":1489.4285888671875,"y":498.5714416503906,"z":"77e6e7e2.0c2078","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/network-topology-rollback.json b/platform-logic/vnfapi/src/main/json/network-topology-rollback.json
new file mode 100644
index 0000000..6ba2b66
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/network-topology-rollback.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"ed874a4d.fd8fa8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":205.71429443359375,"y":164.2857208251953,"z":"16a5084d.6904d8","wires":[["24d7124b.287cae","6f5f0903.600f88","56187c49.06fa54","34867ac.18cfc86"]]},{"id":"be439a72.253938","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":688.7422180175781,"y":164.44003295898438,"z":"16a5084d.6904d8","wires":[["b0ac9e35.109ef"]]},{"id":"b0ac9e35.109ef","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'l3-network not found in AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":851.9366149902344,"y":164.55125427246094,"z":"16a5084d.6904d8","wires":[]},{"id":"24d7124b.287cae","type":"switchNode","name":"switch: l3-network.orchestration_status","xml":"<switch test=\"`$tmp.AnAI.l3network.orchestration-status`\">","comments":"","outputs":1,"x":463.72552490234375,"y":272.89379501342773,"z":"16a5084d.6904d8","wires":[["2c75bd76.80f6d2","4c028d7d.749944","ba62e3d9.12a4"]]},{"id":"2c75bd76.80f6d2","type":"other","name":"pending-create","xml":"<outcome value='pending-create'>\n","comments":"","outputs":1,"x":747.4795608520508,"y":273.5526599884033,"z":"16a5084d.6904d8","wires":[["d89faa07.866668"]]},{"id":"ba62e3d9.12a4","type":"other","name":"pending-update","xml":"<outcome value='pending-update'>\n","comments":"","outputs":1,"x":750.0867538452148,"y":383.1594228744507,"z":"16a5084d.6904d8","wires":[["924236c2.8eb018"]]},{"id":"4c028d7d.749944","type":"other","name":"pending-delete","xml":"<outcome value='pending-delete'>\n","comments":"","outputs":1,"x":747.2295074462891,"y":328.2672004699707,"z":"16a5084d.6904d8","wires":[["d63de22c.d6ac3"]]},{"id":"d63de22c.d6ac3","type":"save","name":"update AnAI: l3-network.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id\" >\n<parameter name=\"orchestration-status\" value=\"active\" />","comments":"","outputs":1,"x":1029.535385131836,"y":328.9064884185791,"z":"16a5084d.6904d8","wires":[["30ace356.607a3c"]]},{"id":"30ace356.607a3c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1282.0407447814941,"y":328.19105052948,"z":"16a5084d.6904d8","wires":[["65d58e38.14597"]]},{"id":"65d58e38.14597","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to update l3-netework orchestration-status in AnAI for network-id = ' + $network-topology-operation-input.network-request-information.network-id`\"/>","comments":"","x":1440.5405006408691,"y":327.69105052948,"z":"16a5084d.6904d8","wires":[]},{"id":"56187c49.06fa54","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"networkId\" value=\"`$network-topology-operation-input.network-request-information.network-id`\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":387.8685607910156,"y":810.4369297027588,"z":"16a5084d.6904d8","wires":[]},{"id":"6f5f0903.600f88","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":411.8686218261719,"y":763.4369297027588,"z":"16a5084d.6904d8","wires":[[]]},{"id":"924236c2.8eb018","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":934.9215087890625,"y":383.1720905303955,"z":"16a5084d.6904d8","wires":[["ddbaf6a3.157138","b17a76ed.0f85b8","601ab575.5ab91c"]]},{"id":"ddbaf6a3.157138","type":"for","name":"for loop i - tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">\n","comments":"","outputs":1,"x":1257.5074462890625,"y":437.3375072479248,"z":"16a5084d.6904d8","wires":[["3a9492ae.aa26ae"]]},{"id":"3a9492ae.aa26ae","type":"switchNode","name":"switch : l3subnet.orchestration-status","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`\">","comments":"","outputs":1,"x":1308.7061004638672,"y":534.154951095581,"z":"16a5084d.6904d8","wires":[["dcb0b0f5.3edc8","3c0ecb2f.7fa144"]]},{"id":"dcb0b0f5.3edc8","type":"other","name":"pending-create","xml":"<outcome value='pending-create'>\n","comments":"","outputs":1,"x":1579.3409118652344,"y":533.6986665725708,"z":"16a5084d.6904d8","wires":[["4b483612.3e69e8"]]},{"id":"3c0ecb2f.7fa144","type":"other","name":"pending-delete","xml":"<outcome value='pending-delete'>\n","comments":"","outputs":1,"x":1581.5910339355469,"y":580.4486694335938,"z":"16a5084d.6904d8","wires":[["262c9783.799c48"]]},{"id":"ce707857.7d5938","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1483.0867156982422,"y":644.0207948684692,"z":"16a5084d.6904d8","wires":[["105e0afc.2b75f5"]]},{"id":"105e0afc.2b75f5","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to rollback l3-netework orchestration-status in AnAI for network-id = ' + $network-topology-operation-input.network-request-information.network-id`\"/>","comments":"","x":1648.9435691833496,"y":644.0206813812256,"z":"16a5084d.6904d8","wires":[]},{"id":"7560895d.bec338","type":"method","name":"method network-topology-rollback","xml":"<method rpc=\"network-topology-rollback\" mode=\"sync\">","comments":"","outputs":1,"x":254.35324096679688,"y":104.81352615356445,"z":"16a5084d.6904d8","wires":[["ed874a4d.fd8fa8"]]},{"id":"22f704b1.4b00ac","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":308.79766845703125,"y":48.480201721191406,"z":"16a5084d.6904d8","wires":[["7560895d.bec338"]]},{"id":"14e828b3.f5f857","type":"dgstart","name":"DGSTART","outputs":1,"x":144.68655395507812,"y":48.480201721191406,"z":"16a5084d.6904d8","wires":[["22f704b1.4b00ac"]]},{"id":"34867ac.18cfc86","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":453.4643249511719,"y":164.9246368408203,"z":"16a5084d.6904d8","wires":[["be439a72.253938","d84ea22f.e407c"]]},{"id":"d84ea22f.e407c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":681.4643249511719,"y":207.9246368408203,"z":"16a5084d.6904d8","wires":[["42ccb0c4.44987"]]},{"id":"42ccb0c4.44987","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`'An error occurred while querying l3-network from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":833.5754089355469,"y":208.14686584472656,"z":"16a5084d.6904d8","wires":[]},{"id":"262c9783.799c48","type":"save","name":"update AnAI - subnet.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id \n\t\t\tAND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id\" >\n\t<parameter name=\"orchestration-status\" value=\"active\" />\n\t\t","comments":"","outputs":1,"x":1862.6230087280273,"y":580.6667499542236,"z":"16a5084d.6904d8","wires":[["c9eebef.d2d794"]]},{"id":"d89faa07.866668","type":"delete","name":"delete AnAI - l3-network","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id\" >","comments":"","outputs":1,"x":968.1071929931641,"y":273.78178787231445,"z":"16a5084d.6904d8","wires":[["9ce56dcb.c4e3b"]]},{"id":"9ce56dcb.c4e3b","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1159.857177734375,"y":273.5317840576172,"z":"16a5084d.6904d8","wires":[["119f926b.f22d8e"]]},{"id":"119f926b.f22d8e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to delete l3-network from AAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`\"/>","comments":"","x":1318.3570355589,"y":273.0320094249846,"z":"16a5084d.6904d8","wires":[]},{"id":"4b483612.3e69e8","type":"delete","name":"delete l3-network.subnet","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id \n\t\t\tAND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id\" >","comments":"","outputs":1,"x":1808.6865310668945,"y":533.5754108428955,"z":"16a5084d.6904d8","wires":[["88c83fbb.cfade"]]},{"id":"b17a76ed.0f85b8","type":"save","name":"update AnAI - l3-network.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id\" >\n<parameter name=\"orchestration-status\" value=\"active\" />","comments":"","outputs":1,"x":1219.020034790039,"y":644.4007987976074,"z":"16a5084d.6904d8","wires":[["ce707857.7d5938"]]},{"id":"88c83fbb.cfade","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2002.8293075561523,"y":533.5754375457764,"z":"16a5084d.6904d8","wires":[["ad6689b7.9adf18"]]},{"id":"ad6689b7.9adf18","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`'Failed to rollback to delete subnet from AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' and network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":2150.9403915405273,"y":533.7976665496826,"z":"16a5084d.6904d8","wires":[]},{"id":"c9eebef.d2d794","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2115.6864852905273,"y":580.4325847625732,"z":"16a5084d.6904d8","wires":[["b2f04093.c9348"]]},{"id":"b2f04093.c9348","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`'Failed to rollback subnet orchestration-status from AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' and network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":2263.7975692749023,"y":580.6548137664795,"z":"16a5084d.6904d8","wires":[]},{"id":"601ab575.5ab91c","type":"switchNode","name":"switch ... tmp.AnAI.l3network.subnets.subnet_length[]","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":1275.1428833007812,"y":383.2857360839844,"z":"16a5084d.6904d8","wires":[["fc8ffad6.e42698"]]},{"id":"fc8ffad6.e42698","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1556.5873336791992,"y":383.0634717941284,"z":"16a5084d.6904d8","wires":[["188c2712.ad31f9"]]},{"id":"188c2712.ad31f9","type":"set","name":"set tmp.AnAI.l3network.subnets.subnet_length = 0","xml":"<set>\n<parameter name=\"tmp.AnAI.l3network.subnets.subnet_length\" value=\"0\" />\n","comments":"","outputs":1,"x":1831.1429426405166,"y":383.0634924570718,"z":"16a5084d.6904d8","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/preload-network-topology-operation.json b/platform-logic/vnfapi/src/main/json/preload-network-topology-operation.json
new file mode 100644
index 0000000..e0701c9
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/preload-network-topology-operation.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"2b70e6bb.85997a","type":"dgstart","name":"DGSTART","outputs":1,"x":127.14286041259766,"y":74.28571319580078,"z":"418bfec1.6ec9d","wires":[["4e0a2233.21b8cc"]]},{"id":"4e0a2233.21b8cc","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":160.14287567138672,"y":125.39681243896484,"z":"418bfec1.6ec9d","wires":[["408c6275.d3cccc"]]},{"id":"408c6275.d3cccc","type":"method","name":"preload-network-topology-operation","xml":"<method rpc=\"preload-network-topology-operation\" mode=\"sync\">","comments":"","outputs":1,"x":240.80953216552734,"y":202.73013877868652,"z":"418bfec1.6ec9d","wires":[["d62a514b.d51bc"]]},{"id":"d62a514b.d51bc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":175.36505889892578,"y":323.9523696899414,"z":"418bfec1.6ec9d","wires":[["b009273e.32cec8","f4841692.2b9828"]]},{"id":"6d566c28.40eb94","type":"comment","name":"preload-network-topology-operation","info":"","comments":"","x":708.8550300598145,"y":81.0533971786499,"z":"418bfec1.6ec9d","wires":[]},{"id":"b009273e.32cec8","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"preload-network-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$preload-network-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$preload-network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$preload-network-topology-operation-input.service-information.service-instance-id`\"/>\n<parameter name=\"field6\" value=\"`$preload-network-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$preload-network-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$preload-network-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field9\" value=\"`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.service-type`\"/>\n<parameter name=\"field10\" value=\"`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-name`\"/>\n<parameter name=\"field11\" value=\"`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-type`\"/>\n<parameter name=\"field12\" value=\"`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-role`\"/>\n<parameter name=\"field13\" value=\"`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-technology`\"/>","comments":"","outputs":1,"x":396.07718658447266,"y":307.6089401245117,"z":"418bfec1.6ec9d","wires":[[]]},{"id":"48dd215b.72708","type":"comment","name":"request-action = PreloadNetworkRequest, svc-action = reserve","info":"","comments":"","x":717.6428565979004,"y":118.73015975952148,"z":"418bfec1.6ec9d","wires":[]},{"id":"f4841692.2b9828","type":"switchNode","name":"switch: request-action","xml":"<switch test=\"`$preload-network-topology-operation-input.request-information.request-action`\">\n","comments":"","outputs":1,"x":442.14286041259766,"y":344.0533981323242,"z":"418bfec1.6ec9d","wires":[["fac0642d.abb4d8","b8412422.c95d98","c045741c.637738"]]},{"id":"fac0642d.abb4d8","type":"other","name":"PreloadNetworkRequest","xml":"<outcome value='PreloadNetworkRequest'>","comments":"","outputs":1,"x":670.1428604125977,"y":345.0533981323242,"z":"418bfec1.6ec9d","wires":[["e310fb22.59f6b8"]]},{"id":"b8412422.c95d98","type":"other","name":"DeletePreloadNetworkRequest","xml":"<outcome value='DeletePreloadNetworkRequest'>","comments":"","outputs":1,"x":683.1428604125977,"y":614.0533981323242,"z":"418bfec1.6ec9d","wires":[["94895ced.01f0f"]]},{"id":"4e1fc2cc.f2923c","type":"set","name":"Delete Preload Data","xml":"<set>\n<parameter name=\"preload-data.\" value=\"\" />\n","comments":"","outputs":1,"x":1150.2540283203125,"y":614.7201194763184,"z":"418bfec1.6ec9d","wires":[[]]},{"id":"a5d85b0f.26c618","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1134.142921447754,"y":696.0534000396729,"z":"418bfec1.6ec9d","wires":[]},{"id":"c045741c.637738","type":"other","name":"outcome: Other","xml":"<outcome value=\"Other\">\n\n","outputs":1,"x":651.1428604125977,"y":734.0533981323242,"z":"418bfec1.6ec9d","wires":[["8f6f1c80.7e41b"]]},{"id":"8f6f1c80.7e41b","type":"returnFailure","name":"return failure","xml":" <return status=\"failure\">\n\t<parameter name='error-code' value='2000'/>\n\t<parameter name='error-message' value='Invalid Request `$preload-network-topology-operation-input.request-information.request-action`'/>\n\n \n","comments":"","x":893.2249755859375,"y":734.738935470581,"z":"418bfec1.6ec9d","wires":[]},{"id":"e310fb22.59f6b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":910.1428604125977,"y":344.0533981323242,"z":"418bfec1.6ec9d","wires":[["6ee0c350.4beafc","56bd18f2.7b01d8","3681c77.3bb7238","94b71ffd.dd657","a54cd151.1dc8c"]]},{"id":"94b71ffd.dd657","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1144.9643630981445,"y":515.4383478164673,"z":"418bfec1.6ec9d","wires":[]},{"id":"3681c77.3bb7238","type":"set","name":"set: order-status = PendingAssignment","xml":"<set>\n\t<parameter name=\"preload-data.oper-status.order-status\" value=\"PendingAssignment\"/>","comments":"","outputs":1,"x":1218.6390342712402,"y":428.4464111328125,"z":"418bfec1.6ec9d","wires":[[]]},{"id":"6ee0c350.4beafc","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":1166.873191833496,"y":473.239990234375,"z":"418bfec1.6ec9d","wires":[[]]},{"id":"56bd18f2.7b01d8","type":"set","name":"set: preload-data += input","xml":"<set>\n<parameter name=\"preload-data.\" value=\"preload-network-topology-operation-input.\" />\n","comments":"","outputs":1,"x":1176.4445762634277,"y":384.658486366272,"z":"418bfec1.6ec9d","wires":[[]]},{"id":"94895ced.01f0f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":922.1428604125977,"y":615.0533981323242,"z":"418bfec1.6ec9d","wires":[["4e1fc2cc.f2923c","a5d85b0f.26c618","53e93276.727bcc"]]},{"id":"bfc175eb.f98d18","type":"comment","name":"request-action = DeletePreloadNetworkRequest, svc-action = delete","info":"","comments":"","x":726.1428604125977,"y":156.05339813232422,"z":"418bfec1.6ec9d","wires":[]},{"id":"a54cd151.1dc8c","type":"set","name":"Delete Preload Data","xml":"<set>\n<parameter name=\"preload-data.\" value=\"\" />\n","comments":"","outputs":1,"x":1158.3929595947266,"y":343.74997329711914,"z":"418bfec1.6ec9d","wires":[[]]},{"id":"53e93276.727bcc","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":1156,"y":655,"z":"418bfec1.6ec9d","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/preload-vf-module-topology-operation.json b/platform-logic/vnfapi/src/main/json/preload-vf-module-topology-operation.json
new file mode 100644
index 0000000..d400658
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/preload-vf-module-topology-operation.json
@@ -0,0 +1,3 @@
+
+
+[{"id":"4ed05b5.6b0cc24","type":"dgstart","name":"DGSTART","outputs":1,"x":129,"y":63,"z":"c02ffcad.d96588","wires":[["7a49be38.64e98"]]},{"id":"7a49be38.64e98","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":162.00001525878906,"y":114.11109924316406,"z":"c02ffcad.d96588","wires":[["d3ccd8ee.2b9278"]]},{"id":"d3ccd8ee.2b9278","type":"method","name":"preload-vf-module-topology-operation","xml":"<method rpc=\"preload-vf-module-topology-operation\" mode=\"sync\">","comments":"","outputs":1,"x":249.33334350585938,"y":159.22219848632812,"z":"c02ffcad.d96588","wires":[["43320618.59ae38"]]},{"id":"43320618.59ae38","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":231.50789642333984,"y":219.80951690673828,"z":"c02ffcad.d96588","wires":[["f5b119ec.e6b","c7734083.208b18"]]},{"id":"f5b119ec.e6b","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"preload-vf-module-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$preload-vf-module-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$preload-vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$preload-vf-module-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field6\" value=\"`$preload-vf-module-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$preload-vf-module-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$preload-vf-module-topology-operation-input.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`\"/>\n<parameter name=\"field9\" value=\"`$preload-vf-module-topology-operation-input.vf-module-topology-information.vf-module-identifiers.vf-module-name`\"/>\n<parameter name=\"field10\" value=\"`$preload-vf-module-topology-operation-input.service-information.service-instance-id`\"/>","comments":"","outputs":1,"x":422.2200241088867,"y":219.60895919799805,"z":"c02ffcad.d96588","wires":[[]]},{"id":"c7734083.208b18","type":"switchNode","name":"switch: request-action","xml":"<switch test=\"`$preload-vf-module-topology-operation-input.request-information.request-action`\">\n\n","comments":"","outputs":1,"x":466.8571014404297,"y":264.6248369216919,"z":"c02ffcad.d96588","wires":[["6acf84a1.0edcb4","63c23261.09f294","b3485c95.2f976"]]},{"id":"6acf84a1.0edcb4","type":"other","name":"PreloadVfModuleRequest","xml":"<outcome value='PreloadVfModuleRequest'>","comments":"","outputs":1,"x":722.8571014404297,"y":264.6248369216919,"z":"c02ffcad.d96588","wires":[["743d62df.7dc0ec"]]},{"id":"63c23261.09f294","type":"other","name":"DeletePreloadVfModuleRequest","xml":"<outcome value='DeletePreloadVfModuleRequest'>","comments":"","outputs":1,"x":739.1427154541016,"y":485.83913707733154,"z":"c02ffcad.d96588","wires":[["b697edc0.00ada"]]},{"id":"6a60f29f.69eb8c","type":"set","name":"Delete vf-module-preload-data","xml":"<set>\n<parameter name=\"vf-module-preload-data.\" value=\"\" />\n","comments":"","x":1254.3927764892578,"y":485.58916664123535,"z":"c02ffcad.d96588","wires":[]},{"id":"b3485c95.2f976","type":"other","name":"outcome: Other","xml":"<outcome value=\"Other\">\n\n","outputs":1,"x":677.4284362792969,"y":604.8391275405884,"z":"c02ffcad.d96588","wires":[["7b304af0.ef57b4"]]},{"id":"7b304af0.ef57b4","type":"returnFailure","name":"return failure","xml":" <return status=\"failure\">\n\t<parameter name='error-code' value='2000'/>\n\t<parameter name='error-message' value=\"`'Invalid Request, ' + $preload-vf-module-topology-operation-input.request-information.request-action`\"/>\n\n \n","comments":"","x":925.3676300048828,"y":605.1595792770386,"z":"c02ffcad.d96588","wires":[]},{"id":"743d62df.7dc0ec","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":963.8571014404297,"y":264.6248369216919,"z":"c02ffcad.d96588","wires":[["7f0c8c59.497cc4","3ce7f257.b72826","6c7514f5.b868a4","e15fd6d3.405928","adf3760.7268908"]]},{"id":"6d99ded3.62ff18","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1343.8571472167969,"y":602.3034706115723,"z":"c02ffcad.d96588","wires":[]},{"id":"6c7514f5.b868a4","type":"set","name":"set: order-status = PendingAssignment","xml":"<set>\n\t<parameter name=\"vf-module-preload-data.oper-status.order-status\" value=\"PendingAssignment\"/>","comments":"","x":1276.8810577392578,"y":399.24797916412354,"z":"c02ffcad.d96588","wires":[]},{"id":"69e4e2cc.d3d454","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":1364.7659606933594,"y":559.3115577697754,"z":"c02ffcad.d96588","wires":[]},{"id":"7f0c8c59.497cc4","type":"get-resource","name":"get-resource: vnf-profile.vnf-type","xml":"<get-resource plugin=\"org.openecomp.sdnc.sli.resource.sql.SqlResource\" \n\tresource=\"vnf-profile\" key=\"SELECT * from VNF_PROFILE where vnf_type = $preload-vf-module-topology-operation-input.vf-module-topology-information.vf-module-identifiers.vf-module-model-id\">\n","comments":"","outputs":1,"x":1255.3771514892578,"y":265.0774154663086,"z":"c02ffcad.d96588","wires":[["1d79be03.963b92","21840fa8.360b2"]]},{"id":"b16775da.951558","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"preload vnf-model-id not found. New vnf-model-id can be added via admin portal\" />","comments":"","x":1745.7103424072266,"y":264.2995834350586,"z":"c02ffcad.d96588","wires":[]},{"id":"1d79be03.963b92","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1532.3770904541016,"y":264.8551254272461,"z":"c02ffcad.d96588","wires":[["b16775da.951558"]]},{"id":"3ce7f257.b72826","type":"set","name":"set: vf-module-preload-data += input","xml":"<set>\n<parameter name=\"vf-module-preload-data.\" value=\"preload-vf-module-topology-operation-input.\" />\n","comments":"","x":1270.0476837158203,"y":353.54341983795166,"z":"c02ffcad.d96588","wires":[]},{"id":"21840fa8.360b2","type":"success","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1524.654800415039,"y":306.40059661865234,"z":"c02ffcad.d96588","wires":[["b16775da.951558"]]},{"id":"b697edc0.00ada","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":990.8927154541016,"y":485.8391361236572,"z":"c02ffcad.d96588","wires":[["6a60f29f.69eb8c","adf3760.7268908"]]},{"id":"e15fd6d3.405928","type":"set","name":"Delete vf-module-preload-data","xml":"<set>\n<parameter name=\"vf-module-preload-data.\" value=\"\" />\n","comments":"","x":1249.0713653564453,"y":309.96434783935547,"z":"c02ffcad.d96588","wires":[]},{"id":"adf3760.7268908","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1175.5357208251953,"y":560.0714998245239,"z":"c02ffcad.d96588","wires":[["69e4e2cc.d3d454","6d99ded3.62ff18"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/preload-vnf-instance-topology-operation.json b/platform-logic/vnfapi/src/main/json/preload-vnf-instance-topology-operation.json
new file mode 100644
index 0000000..fca4005
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/preload-vnf-instance-topology-operation.json
@@ -0,0 +1,3 @@
+
+
+[{"id":"4e9ae561.7b3bdc","type":"dgstart","name":"DGSTART","outputs":1,"x":89,"y":35,"z":"b4f2c7b3.ab7c9","wires":[["c1b468c3.926cd8"]]},{"id":"c1b468c3.926cd8","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":122.00001525878906,"y":86.11109924316406,"z":"b4f2c7b3.ab7c9","wires":[["451f3c5c.01a58c"]]},{"id":"451f3c5c.01a58c","type":"method","name":"preload-vnf-instance-topology-operation","xml":"<method rpc=\"preload-vnf-instance-topology-operation\" mode=\"sync\">","comments":"","outputs":1,"x":209.33334350585938,"y":131.22219848632812,"z":"b4f2c7b3.ab7c9","wires":[["a682f066.77cf4"]]},{"id":"a682f066.77cf4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":191.50789642333984,"y":191.80951690673828,"z":"b4f2c7b3.ab7c9","wires":[["6eda1ef4.1ead78","b5eac53b.9e8d28"]]},{"id":"6eda1ef4.1ead78","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"preload-vnf-instance-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$preload-vnf-instance-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$preload-vnf-instance-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$preload-vnf-instance-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field6\" value=\"`$preload-vnf-instance-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$preload-vnf-instance-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$preload-vnf-instance-topology-operation-input.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id`\"/>\n<parameter name=\"field9\" value=\"`$preload-vnf-instance-topology-operation-input.vnf-instance-topology-information.vnf-instance-identifiers.vnf-instance-name`\"/>\n<parameter name=\"field10\" value=\"`$preload-vnf-instance-topology-operation-input.service-information.service-instance-id`\"/>","comments":"","outputs":1,"x":382.2200241088867,"y":191.60895919799805,"z":"b4f2c7b3.ab7c9","wires":[[]]},{"id":"b5eac53b.9e8d28","type":"switchNode","name":"switch: request-action","xml":"<switch test=\"`$preload-vnf-instance-topology-operation-input.request-information.request-action`\">\n\n","comments":"","outputs":1,"x":426.8571014404297,"y":236.6248369216919,"z":"b4f2c7b3.ab7c9","wires":[["5e96cd18.3876b4","4ad665bd.459114","ab2a26d5.c6128"]]},{"id":"5e96cd18.3876b4","type":"other","name":"PreloadVnfInstanceRequest","xml":"<outcome value='PreloadVnfInstanceRequest'>","comments":"","outputs":1,"x":688.8571014404297,"y":236.6248369216919,"z":"b4f2c7b3.ab7c9","wires":[["e72ac2fe.5d824"]]},{"id":"4ad665bd.459114","type":"other","name":"DeletePreloadVnfInstanceRequest","xml":"<outcome value='DeletePreloadVnfInstanceRequest'>","comments":"","outputs":1,"x":708.1427154541016,"y":457.83913707733154,"z":"b4f2c7b3.ab7c9","wires":[["a201aadf.fd3c4"]]},{"id":"57509d2f.c1779c","type":"set","name":"Delete vnf-instance-preload-data","xml":"<set>\n<parameter name=\"vnf-instance-preload-data.\" value=\"\" />\n","comments":"","x":1224.3927764892578,"y":457.58916664123535,"z":"b4f2c7b3.ab7c9","wires":[[]]},{"id":"ab2a26d5.c6128","type":"other","name":"outcome: Other","xml":"<outcome value=\"Other\">\n\n","outputs":1,"x":637.4284362792969,"y":576.8391275405884,"z":"b4f2c7b3.ab7c9","wires":[["fa569e30.804e1"]]},{"id":"fa569e30.804e1","type":"returnFailure","name":"return failure","xml":" <return status=\"failure\">\n\t<parameter name='error-code' value='2000'/>\n\t<parameter name='error-message' value='Invalid Request `$preload-vnf-instance-topology-operation-input.request-information.request-action`'/>\n\n \n","comments":"","x":895.3676300048828,"y":577.1595792770386,"z":"b4f2c7b3.ab7c9","wires":[]},{"id":"e72ac2fe.5d824","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":933.8571014404297,"y":236.6248369216919,"z":"b4f2c7b3.ab7c9","wires":[["f77e2117.bb6f6","4f83b470.be184c","9d54146b.7af598","9a828dbc.af94c8","e9ffde5b.92c2a"]]},{"id":"43c4685.d24a598","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1313.8571472167969,"y":574.3034706115723,"z":"b4f2c7b3.ab7c9","wires":[]},{"id":"9d54146b.7af598","type":"set","name":"set: order-status = PendingAssignment","xml":"<set>\n\t<parameter name=\"vnf-instance-preload-data.oper-status.order-status\" value=\"PendingAssignment\"/>","comments":"","x":1246.8810577392578,"y":371.24797916412354,"z":"b4f2c7b3.ab7c9","wires":[[]]},{"id":"d7e96d34.d9ff38","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":1334.7659606933594,"y":531.3115577697754,"z":"b4f2c7b3.ab7c9","wires":[[]]},{"id":"f77e2117.bb6f6","type":"get-resource","name":"get-resource: vnf-profile.vnf-type","xml":"<get-resource plugin=\"org.openecomp.sdnc.sli.resource.sql.SqlResource\" \n\tresource=\"vnf-profile\" key=\"SELECT * from VNF_PROFILE where vnf_type = $preload-vnf-instance-topology-operation-input.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id\">\n","comments":"","outputs":1,"x":1225.3771514892578,"y":237.0774154663086,"z":"b4f2c7b3.ab7c9","wires":[["f80978ff.f80f6","da20f0d9.1dc818"]]},{"id":"8662fe2a.4fba88","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"preload vnf-model-id not found. New vnf-model-id can be added via admin portal\" />","comments":"","x":1715.7103424072266,"y":236.2995834350586,"z":"b4f2c7b3.ab7c9","wires":[]},{"id":"f80978ff.f80f6","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1502.3770904541016,"y":236.8551254272461,"z":"b4f2c7b3.ab7c9","wires":[["8662fe2a.4fba88"]]},{"id":"4f83b470.be184c","type":"set","name":"set: vnf-instance-preload-data += input","xml":"<set>\n<parameter name=\"vnf-instance-preload-data.\" value=\"preload-vnf-instance-topology-operation-input.\" />\n","comments":"","x":1245.0476837158203,"y":325.54341983795166,"z":"b4f2c7b3.ab7c9","wires":[[]]},{"id":"da20f0d9.1dc818","type":"success","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1494.654800415039,"y":278.40059661865234,"z":"b4f2c7b3.ab7c9","wires":[["8662fe2a.4fba88"]]},{"id":"a201aadf.fd3c4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":960.8927154541016,"y":457.8391361236572,"z":"b4f2c7b3.ab7c9","wires":[["57509d2f.c1779c","e9ffde5b.92c2a"]]},{"id":"9a828dbc.af94c8","type":"set","name":"Delete vnf-instance-preload-data","xml":"<set>\n<parameter name=\"vnf-instance-preload-data.\" value=\"\" />\n","comments":"","x":1227.0713653564453,"y":281.96434783935547,"z":"b4f2c7b3.ab7c9","wires":[[]]},{"id":"e9ffde5b.92c2a","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1145.5357208251953,"y":532.0714998245239,"z":"b4f2c7b3.ab7c9","wires":[["d7e96d34.d9ff38","43c4685.d24a598"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/preload-vnf-topology-operation.json b/platform-logic/vnfapi/src/main/json/preload-vnf-topology-operation.json
new file mode 100644
index 0000000..e039035
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/preload-vnf-topology-operation.json
@@ -0,0 +1,3 @@
+
+
+[{"id":"fae93ccf.cab658","type":"dgstart","name":"DGSTART","outputs":1,"x":129,"y":20,"z":"2500da67.7593e6","wires":[["ca4ee988.18e94"]]},{"id":"ca4ee988.18e94","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":162.00001525878906,"y":71.11109924316406,"z":"2500da67.7593e6","wires":[["f719cf30.51d0b"]]},{"id":"f719cf30.51d0b","type":"method","name":"preload-vnf-topology-operation","xml":"<method rpc=\"preload-vnf-topology-operation\" mode=\"sync\">","comments":"","outputs":1,"x":249.33334350585938,"y":116.22219848632812,"z":"2500da67.7593e6","wires":[["78ada0b2.50427"]]},{"id":"78ada0b2.50427","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":177.22219848632812,"y":269.6666564941406,"z":"2500da67.7593e6","wires":[["77cbb227.262d74","c8f7640f.136fa"]]},{"id":"169fbec8.2ae4b1","type":"comment","name":"preload-vnf-topology-operation","info":"","comments":"","x":710.7121696472168,"y":26.76768398284912,"z":"2500da67.7593e6","wires":[]},{"id":"77cbb227.262d74","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"preload-vnf-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$preload-vnf-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$preload-vnf-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$preload-vnf-topology-operation-input.service-information.service-instance-id`\"/>\n<parameter name=\"field6\" value=\"`$preload-vnf-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$preload-vnf-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$preload-vnf-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field9\" value=\"`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.service-type`\"/>\n<parameter name=\"field10\" value=\"`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-name`\"/>\n<parameter name=\"field11\" value=\"`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type`\"/>","comments":"","outputs":1,"x":397.934326171875,"y":253.32322692871094,"z":"2500da67.7593e6","wires":[[]]},{"id":"cd624889.3ab088","type":"comment","name":"request-action = PreloadVNFRequest, svc-action = reserve","info":"","comments":"","x":719.4999961853027,"y":64.4444465637207,"z":"2500da67.7593e6","wires":[]},{"id":"c8f7640f.136fa","type":"switchNode","name":"switch: request-action","xml":"<switch test=\"`$preload-vnf-topology-operation-input.request-information.request-action`\">\n<!--\nleaf request-action { \n\t\t\t\ttype enumeration { \n\t\t\t\t\tenum \"VNFActivateRequest\";\n\t\t\t\t\tenum \"ChangeVNFActivateRequest\";\n\t\t\t\t\tenum \"DisconnectVNFRequest\";\n\t\t\t\t\tenum \"PreloadVNFRequest\";\n\t\t\t\t\tenum \"DeletePreloadVNFRequest\";\n\t\t\t\t} \n}\n-->\n\n","comments":"","outputs":1,"x":444,"y":289.76768493652344,"z":"2500da67.7593e6","wires":[["496c8179.d18ef","8675aa08.bbf3f8","c9bbcd1d.2da5f8"]]},{"id":"496c8179.d18ef","type":"other","name":"PreloadVNFRequest","xml":"<outcome value='PreloadVNFRequest'>","comments":"","outputs":1,"x":672,"y":290.76768493652344,"z":"2500da67.7593e6","wires":[["c51b9598.c5f25"]]},{"id":"8675aa08.bbf3f8","type":"other","name":"DeletePreloadVNFRequest","xml":"<outcome value='DeletePreloadVNFRequest'>","comments":"","outputs":1,"x":673.5713119506836,"y":664.6248331069946,"z":"2500da67.7593e6","wires":[["56297be.01b5984"]]},{"id":"90fab1a1.b184","type":"set","name":"Delete Preload Data","xml":"<set>\n<parameter name=\"preload-data.\" value=\"\" />\n","comments":"","x":1143.5713119506836,"y":706.6248331069946,"z":"2500da67.7593e6","wires":[]},{"id":"d7b12d3.82f4c5","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1126.5713119506836,"y":746.6248331069946,"z":"2500da67.7593e6","wires":[]},{"id":"c9bbcd1d.2da5f8","type":"other","name":"outcome: Other","xml":"<outcome value=\"Other\">\n\n","outputs":1,"x":641.5713119506836,"y":784.6248331069946,"z":"2500da67.7593e6","wires":[["e1246f8e.79201"]]},{"id":"e1246f8e.79201","type":"returnFailure","name":"return failure","xml":" <return status=\"failure\">\n\t<parameter name='error-code' value='2000'/>\n\t<parameter name='error-message' value='Invalid Request `$preload-vnf-topology-operation-input.request-information.request-action`'/>\n\n \n","comments":"","x":883.6534042358398,"y":783.0881509780884,"z":"2500da67.7593e6","wires":[]},{"id":"c51b9598.c5f25","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":912,"y":289.76768493652344,"z":"2500da67.7593e6","wires":[["ee8d2da6.a9587","9950aa2a.c6fbb","e6726c5.1ca5f1","64decaf7.b5ef04","e1a96601.00fff8","8c6d0f47.8edca","ddd51a1e.acd6b"]]},{"id":"8c6d0f47.8edca","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1170.0000457763672,"y":526.1962547302246,"z":"2500da67.7593e6","wires":[]},{"id":"e1a96601.00fff8","type":"set","name":"set: order-status = PendingAssignment","xml":"<set>\n\t<parameter name=\"preload-data.oper-status.order-status\" value=\"PendingAssignment\"/>","comments":"","x":1245.0239715576172,"y":486.28368759155273,"z":"2500da67.7593e6","wires":[]},{"id":"ee8d2da6.a9587","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":1190.9088668823242,"y":288.91858863830566,"z":"2500da67.7593e6","wires":[]},{"id":"e6726c5.1ca5f1","type":"get-resource","name":"get-resource: vnf-profile.vnf-type","xml":"<get-resource plugin=\"`$sql-resource-plugin`\" resource=\"vnf-profile\" key=\"SELECT * from VNF_PROFILE WHERE vnf_type = $preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type\">\n","comments":"","outputs":1,"x":1223.520133972168,"y":368.3631076812744,"z":"2500da67.7593e6","wires":[["7db96b77.bfc044","b73e7ecf.53e96"]]},{"id":"aadb3af.3b1dcc8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"preload vnf-type not found as valid vnf \" />","comments":"","x":1713.8533248901367,"y":367.5852756500244,"z":"2500da67.7593e6","wires":[]},{"id":"7db96b77.bfc044","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1500.5200729370117,"y":368.1408176422119,"z":"2500da67.7593e6","wires":[["aadb3af.3b1dcc8"]]},{"id":"9950aa2a.c6fbb","type":"set","name":"set : sql-resource-plugin","xml":"<set only-if-unset=\"true\">\n<parameter name=\"sql-resource-plugin\" value=\"org.openecomp.sdnc.sli.resource.sql.SqlResource\"/>","comments":"","x":1211.7321090698242,"y":327.79737281799316,"z":"2500da67.7593e6","wires":[]},{"id":"64decaf7.b5ef04","type":"set","name":"set: preload-data += input","xml":"<set>\n<parameter name=\"preload-data.\" value=\"preload-vnf-topology-operation-input.\" />\n","comments":"","x":1202.940658569336,"y":446.82912826538086,"z":"2500da67.7593e6","wires":[]},{"id":"b73e7ecf.53e96","type":"success","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1492.7977828979492,"y":409.68628883361816,"z":"2500da67.7593e6","wires":[["aadb3af.3b1dcc8"]]},{"id":"56297be.01b5984","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":912.5713119506836,"y":665.6248331069946,"z":"2500da67.7593e6","wires":[["f3e9e7c1.6f523","90fab1a1.b184","d7b12d3.82f4c5"]]},{"id":"f3e9e7c1.6f523","type":"get-resource","name":"get-resource: vnf-profile.vnf-type","xml":"<get-resource plugin=\"`$sql-resource-plugin`\" resource=\"generic-vnf\" key=\"SELECT * FROM VNF_PROFILE vnf-type = $preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type\">\n","comments":"","outputs":1,"x":1181.5713119506836,"y":665.6248331069946,"z":"2500da67.7593e6","wires":[["cab895eb.9b1258"]]},{"id":"cab895eb.9b1258","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1448.5713119506836,"y":664.6248331069946,"z":"2500da67.7593e6","wires":[["f94b13c7.f036c"]]},{"id":"f94b13c7.f036c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"3000\" />\n\t<parameter name=\"error-message\" value=\"preload vnf-type cannot be deleted while vnf is in use\" />","comments":"","x":1662.5713119506836,"y":664.6248331069946,"z":"2500da67.7593e6","wires":[]},{"id":"4447ff82.0787b","type":"comment","name":"request-action = DeletePreloadVNFRequest, svc-action = delete","info":"","comments":"","x":728,"y":101.76768493652344,"z":"2500da67.7593e6","wires":[]},{"id":"ddd51a1e.acd6b","type":"set","name":"Delete Preload Data","xml":"<set>\n<parameter name=\"preload-data.\" value=\"\" />\n","comments":"","x":1185.7143020629883,"y":407.0000305175781,"z":"2500da67.7593e6","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-activate.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-activate.json
new file mode 100644
index 0000000..7d875a8
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-activate.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"39e8a74f.00d7a8","type":"set","name":"set: order-status = Active","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.order-status\" value=\"Active\"/>","comments":"","outputs":1,"x":432.8571472167969,"y":392.8571472167969,"z":"99edc426.381898","wires":[[]]},{"id":"74e6fd2f.dee3c4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":179.85713958740234,"y":160.35716247558594,"z":"99edc426.381898","wires":[["39e8a74f.00d7a8","83f09b75.461298","b65a1681.7c1c38","ca5aa154.d8ea2","e0967d0e.757cc","91c8fd96.73034","ef986c0d.9506","3041a9ae.a8b0d6","38723ef.e0f7bc2","7646ab3a.7636e4"]]},{"id":"dfa6e2c6.49745","type":"method","name":"method vf-module-topology-activate","xml":"<method rpc='vf-module-topology-activate' mode='sync'>\n","comments":"","outputs":1,"x":222.5238265991211,"y":104.5238265991211,"z":"99edc426.381898","wires":[["74e6fd2f.dee3c4"]]},{"id":"daef36a1.fa1368","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":314.52379608154297,"y":57.523834228515625,"z":"99edc426.381898","wires":[["dfa6e2c6.49745"]]},{"id":"1253e5b0.3e31fa","type":"dgstart","name":"DGSTART","outputs":1,"x":149.35713958740234,"y":57.35716247558594,"z":"99edc426.381898","wires":[["daef36a1.fa1368"]]},{"id":"83f09b75.461298","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$vf-module-service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":472.1905212402344,"y":289.19036865234375,"z":"99edc426.381898","wires":[["32730681.fc526a"]]},{"id":"32730681.fc526a","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":721.5238723754883,"y":288.52367782592773,"z":"99edc426.381898","wires":[["94496491.8e1268"]]},{"id":"86ef0554.fbc0a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1379.8569946289062,"y":288.5237293243408,"z":"99edc426.381898","wires":[]},{"id":"e0967d0e.757cc","type":"switchNode","name":"switch:vf-module-id config == input","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id == $vf-module-service-data.vf-module-id`\">","comments":"","outputs":1,"x":465.6298828125,"y":237.40260314941406,"z":"99edc426.381898","wires":[["f8c73b3a.1a2af8"]]},{"id":"f8c73b3a.1a2af8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":694.084358215332,"y":237.58442306518555,"z":"99edc426.381898","wires":[["6bcf58a9.7508d8"]]},{"id":"6bcf58a9.7508d8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"`'vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' not found in SDNC'`\"/>","comments":"","x":847.1753005981445,"y":237.49352645874023,"z":"99edc426.381898","wires":[]},{"id":"b65a1681.7c1c38","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":400.96826171875,"y":705.5238037109375,"z":"99edc426.381898","wires":[]},{"id":"94496491.8e1268","type":"switchNode","name":"switch: order-status = PendingUpdate","xml":"<switch test=\"`$vf-module-service-data.oper-status.order-status == PendingUpdate`\">","comments":"","outputs":1,"x":972.4480667114258,"y":288.9480857849121,"z":"99edc426.381898","wires":[["b04177c6.257fd8"]]},{"id":"b04177c6.257fd8","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1214.902473449707,"y":288.948055267334,"z":"99edc426.381898","wires":[["86ef0554.fbc0a8"]]},{"id":"ca5aa154.d8ea2","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-order-status\" value=\"`$vf-module-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":465.9708251953125,"y":341.4708557128906,"z":"99edc426.381898","wires":[[]]},{"id":"a84acf1a.f3c8c","type":"comment","name":"request-action = VNFActivateRequest, svc-action = activate","info":"","comments":"","x":728.4682235717773,"y":96.69049644470215,"z":"99edc426.381898","wires":[]},{"id":"91c8fd96.73034","type":"set","name":"set: service-data = input","xml":"<set>\n\t<parameter name=\"vf-module-service-data.\" value=\"vf-module-topology-operation-input.\" />","comments":"","outputs":1,"x":429.8571472167969,"y":527.9127197265625,"z":"99edc426.381898","wires":[[]]},{"id":"ef986c0d.9506","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-action\" value=\"`$vf-module-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":399.8571472167969,"y":439.9127197265625,"z":"99edc426.381898","wires":[[]]},{"id":"cba23ed7.a7888","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":758.2698669433594,"y":482.90121841430664,"z":"99edc426.381898","wires":[["b1d53231.032d9"]]},{"id":"b1d53231.032d9","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while updating vf-module orchestration-status in AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\"/>","comments":"","x":941.4127960205078,"y":482.90128898620605,"z":"99edc426.381898","wires":[]},{"id":"d71b0b9.a2878f8","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":423.17459869384766,"y":663.6269645690918,"z":"99edc426.381898","wires":[[]]},{"id":"3041a9ae.a8b0d6","type":"save","name":"update AnAI - vf-module.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tAND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" >\n\t<parameter name=\"orchestration-status\" value=\"active\" />","comments":"","outputs":1,"x":493.74600982666016,"y":482.91271591186523,"z":"99edc426.381898","wires":[["cba23ed7.a7888","324dd0a1.e8559"]]},{"id":"324dd0a1.e8559","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":765.4960327148438,"y":525.66273021698,"z":"99edc426.381898","wires":[["b1d53231.032d9"]]},{"id":"38723ef.e0f7bc2","type":"set","name":"set: vnf-instance-service-data.vf-module-relationship-list[]","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vf-module-relationship-list[$vnf-instance-service-data.vf-module-relationship-list_length].vf-module-id\" value=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id`\" />","comments":"","outputs":1,"x":532.2460098266602,"y":619.1627159118652,"z":"99edc426.381898","wires":[[]]},{"id":"d97e99d0.9e7e48","type":"set","name":"set: vnf-instance-service-data.vf-module-relationship-list[] = 0","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vf-module-relationship-list_length\" value=\"0\" />","comments":"","outputs":1,"x":1149.773796081543,"y":575.0516405105591,"z":"99edc426.381898","wires":[[]]},{"id":"7646ab3a.7636e4","type":"switchNode","name":"switch: vnf-instance-service-data.vf-module-relationship-list[]","xml":"<switch test=\"`$vnf-instance-service-data.vf-module-relationship-list_length`\">","comments":"","outputs":1,"x":543.4960098266602,"y":574.4127254486084,"z":"99edc426.381898","wires":[["f9261340.ae80b"]]},{"id":"f9261340.ae80b","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":844.7460098266602,"y":574.4127254486084,"z":"99edc426.381898","wires":[["d97e99d0.9e7e48"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-assign-vnf-networks.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-assign-vnf-networks.json
new file mode 100644
index 0000000..15e63ad
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-assign-vnf-networks.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"c30b96fb.b54ae8","type":"dgstart","name":"DGSTART","outputs":1,"x":107.3214340209961,"y":47.32143020629883,"z":"1faa4c21.138614","wires":[["92128070.77ca8"]]},{"id":"92128070.77ca8","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":272.4880905151367,"y":47.488101959228516,"z":"1faa4c21.138614","wires":[["17c24793.5d4508"]]},{"id":"17c24793.5d4508","type":"method","name":"method vf-module-topology-assign-vnf-networks","xml":"<method rpc='vf-module-topology-assign-vnf-networks' mode='sync'>","comments":"","outputs":1,"x":235.7381134033203,"y":101.73809432983398,"z":"1faa4c21.138614","wires":[["4de1dc94.aef9f4"]]},{"id":"4de1dc94.aef9f4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":188.0714340209961,"y":150.57143020629883,"z":"1faa4c21.138614","wires":[["70ff54f3.ff0e6c","b46a3430.78ab38","aaf65e9a.4351f","763de398.5ac24c","8fc6861.1cc4c78","330d0bd.ba072f4","3600f85a.1aec98"]]},{"id":"dc1fefd3.cd357","type":"switchNode","name":"switch test: INPUT network-id = NULL or 0","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id == '' or $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id == '0'`\">","comments":"","outputs":1,"x":764.5137062072754,"y":701.5578842163086,"z":"1faa4c21.138614","wires":[["ed113fb3.62eda","a0ca4ac5.fdc388"]]},{"id":"ed113fb3.62eda","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1039.8771934509277,"y":745.7397541999817,"z":"1faa4c21.138614","wires":[["aba6d801.11f9a8"]]},{"id":"aba6d801.11f9a8","type":"switchNode","name":"switch : INPUT network-name = NULL","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name == '' or $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name == '0'`\">","comments":"","outputs":1,"x":1277.659294128418,"y":745.5837326049805,"z":"1faa4c21.138614","wires":[["18391f2.d637de1","d29dc4ee.83b888"]]},{"id":"a0ca4ac5.fdc388","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1039.8974800109863,"y":702.4467806816101,"z":"1faa4c21.138614","wires":[["3c76d450.1a1c5c"]]},{"id":"18391f2.d637de1","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1515.851245880127,"y":785.139214515686,"z":"1faa4c21.138614","wires":[["4e004f85.49efa"]]},{"id":"3c76d450.1a1c5c","type":"save","name":"get AnAI - l3-network by id","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id\" \n\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1241.1195945739746,"y":702.4469485282898,"z":"1faa4c21.138614","wires":[["b7314ceb.79175","32bd35ee.cb0d2a"]]},{"id":"b7314ceb.79175","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1444.0642852783203,"y":702.0023970603943,"z":"1faa4c21.138614","wires":[["32309ba2.0ab454"]]},{"id":"3c910573.9a235a","type":"for","name":"for i : INPUT vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks_length`\">","comments":"","outputs":1,"x":546.8075828552246,"y":559.0505676269531,"z":"1faa4c21.138614","wires":[["dfdb5bcb.cdcf38"]]},{"id":"4e004f85.49efa","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name\" \n\tpfx=\"tmp.AnAI.l3network\">\n\n","comments":"","outputs":1,"x":1726.3532485961914,"y":784.8810062408447,"z":"1faa4c21.138614","wires":[["127c9bfe.0fbf64","7871388.9d854c8"]]},{"id":"127c9bfe.0fbf64","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1947.6032485961914,"y":785.131067276001,"z":"1faa4c21.138614","wires":[["32309ba2.0ab454"]]},{"id":"f0b9ed4f.6db11","type":"set","name":"initialize tmp.usePreload = 1 and tmp.AAI.l3network","xml":"<set>\n<parameter name='tmp.usePreload' value='1' />\n<parameter name='tmp.AnAI.l3network.' value='' />\n","comments":"","outputs":1,"x":478.3012237548828,"y":472.77592849731445,"z":"1faa4c21.138614","wires":[[]]},{"id":"e1f0efe6.81d2e","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":138.2354278564453,"y":472.56047439575195,"z":"1faa4c21.138614","wires":[["f0b9ed4f.6db11","6e1813c8.e5e2fc","ee2deaea.1bec48"]]},{"id":"70ff54f3.ff0e6c","type":"for","name":"for j : PRELOAD vnf-networks","xml":"<for index=\"j\" start=\"0\" end=\"`$vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":272.4603729248047,"y":385.82141494750977,"z":"1faa4c21.138614","wires":[["e1f0efe6.81d2e"]]},{"id":"6e1813c8.e5e2fc","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":314.1876983642578,"y":558.9804592132568,"z":"1faa4c21.138614","wires":[["3c910573.9a235a","aeff0ffa.88a75"]]},{"id":"dfdb5bcb.cdcf38","type":"switchNode","name":"switch : PRELOAD network-role = INPUT","xml":"<switch test=\"`$vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-role == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-role`\">","comments":"","outputs":1,"x":856.1877632141113,"y":558.3441305160522,"z":"1faa4c21.138614","wires":[["382cc26b.de833e"]]},{"id":"382cc26b.de833e","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1106.9831886291504,"y":558.6397728919983,"z":"1faa4c21.138614","wires":[["fb7701c1.24954"]]},{"id":"fb7701c1.24954","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":465.2687568664551,"y":659.4189281463623,"z":"1faa4c21.138614","wires":[["dc1fefd3.cd357","5a2e54d8.28c0dc","bc41d36b.5b0d6"]]},{"id":"5a2e54d8.28c0dc","type":"set","name":"set tmp.usePreload = 0","xml":"<set>\n<parameter name='tmp.usePreload' value='0' />\n","comments":"","outputs":1,"x":705.6323890686035,"y":659.3280572891235,"z":"1faa4c21.138614","wires":[[]]},{"id":"d29dc4ee.83b888","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1515.4091796875,"y":745.8452072143555,"z":"1faa4c21.138614","wires":[["32309ba2.0ab454"]]},{"id":"bc41d36b.5b0d6","type":"switchNode","name":"switch : tmp.usePreload= 0","xml":"<switch test=\"`$tmp.usePreload == 0`\">","comments":"","outputs":1,"x":705.0207977294922,"y":971.0733308792114,"z":"1faa4c21.138614","wires":[["9ce9a7a6.6d0d28"]]},{"id":"9ce9a7a6.6d0d28","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":906.0206756591797,"y":971.0734529495239,"z":"1faa4c21.138614","wires":[["df99f43a.192678"]]},{"id":"aeff0ffa.88a75","type":"switchNode","name":"switch: tmp.usePreload= 1","xml":"<switch test=\"`$tmp.usePreload == 1`\">","comments":"","outputs":1,"x":467.8374481201172,"y":1901.7782440185547,"z":"1faa4c21.138614","wires":[["35b40dfd.b6e712"]]},{"id":"35b40dfd.b6e712","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":675.869026184082,"y":1901.5184955596924,"z":"1faa4c21.138614","wires":[["9aecd914.8483b8"]]},{"id":"32309ba2.0ab454","type":"set","name":"set tmp.usePreload = 1","xml":"<set>\n<parameter name='tmp.usePreload' value='1' />\n","comments":"","outputs":1,"x":1710.0172729492188,"y":886.6042308807373,"z":"1faa4c21.138614","wires":[[]]},{"id":"70579eed.d89c5","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying AnAI for l3-network with network-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id`\" />\n","comments":"","x":1594.9880854288735,"y":661.1269476148818,"z":"1faa4c21.138614","wires":[]},{"id":"32bd35ee.cb0d2a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1437.7658632066514,"y":661.1269476148818,"z":"1faa4c21.138614","wires":[["70579eed.d89c5"]]},{"id":"d5ab10a8.40fb5","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred whie querying AnAI for l3-network with network-name = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name`\" />\n","comments":"","x":2096.099006652832,"y":743.3491630554199,"z":"1faa4c21.138614","wires":[]},{"id":"7871388.9d854c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1938.8767844306099,"y":743.3491630554199,"z":"1faa4c21.138614","wires":[["d5ab10a8.40fb5"]]},{"id":"b46a3430.78ab38","type":"switchNode","name":"switch ...PRELOAD vnf-networks[]","xml":"<switch test=\"`$vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":452.07142639160156,"y":330.0714340209961,"z":"1faa4c21.138614","wires":[["3f756909.e553f6"]]},{"id":"3f756909.e553f6","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":679.5158996582031,"y":329.5991439819336,"z":"1faa4c21.138614","wires":[["61c7ea59.ae7a54"]]},{"id":"61c7ea59.ae7a54","type":"set","name":"set PRELOAD vnf-networks[] = 0","xml":"<set>\n<parameter name = \"vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks_length\" value=\"0\" />\n","comments":"","outputs":1,"x":901.0715086195205,"y":329.59916464487696,"z":"1faa4c21.138614","wires":[[]]},{"id":"ee2deaea.1bec48","type":"switchNode","name":"switch ...INPUT vnf-networks[]","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks_length`\">","comments":"","outputs":1,"x":367.5714416503906,"y":513.8214120864868,"z":"1faa4c21.138614","wires":[["b5803df6.ae5a9"]]},{"id":"b5803df6.ae5a9","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":591.0158920288086,"y":513.5991477966309,"z":"1faa4c21.138614","wires":[["a3eaa269.9cad5"]]},{"id":"a3eaa269.9cad5","type":"set","name":"set INPUT vnf-networks_length = 0","xml":"<set>\n<parameter name='vf-module-topology-operation-input.vf-module-request-information.vnf-networks_length' value='0' />\n","comments":"","outputs":1,"x":823.571500990126,"y":513.5991684595742,"z":"1faa4c21.138614","wires":[[]]},{"id":"a5aed389.d71d6","type":"comment","name":"For each preload network, see if there is an override in input","info":"","comments":"","x":741.6826629638672,"y":422.0436592102051,"z":"1faa4c21.138614","wires":[]},{"id":"238b5959.ad0836","type":"comment","name":"CALLED BY vf-module-topology-assign AND vf-module-topology-changeassign","info":"","comments":"","x":793.7380828857422,"y":92.68254470825195,"z":"1faa4c21.138614","wires":[]},{"id":"763de398.5ac24c","type":"set","name":"set: service-data =+ input","xml":"<set>\n\t<parameter name=\"vf-module-service-data.\" value=\"vf-module-topology-operation-input.\" />","comments":"","outputs":1,"x":423.8492031097412,"y":239.015869140625,"z":"1faa4c21.138614","wires":[[]]},{"id":"aaf65e9a.4351f","type":"set","name":"set: service-data = preload-data","xml":"<set>\n\t<parameter name=\"vf-module-service-data.\" value=\"vf-module-preload-data.\" />","comments":"","outputs":1,"x":443.75331687927246,"y":197.162353515625,"z":"1faa4c21.138614","wires":[[]]},{"id":"8fc6861.1cc4c78","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":396.19046783447266,"y":2271.0118932724,"z":"1faa4c21.138614","wires":[]},{"id":"330d0bd.ba072f4","type":"switchNode","name":"switch: preload order-status = PendingAssignment","xml":"<switch test=\"`$vf-module-preload-data.oper-status.order-status == PendingAssignment`\">","comments":"","outputs":1,"x":500.8492126464844,"y":150.57143306732178,"z":"1faa4c21.138614","wires":[["4c5e6e0b.0d9a"]]},{"id":"471ae763.ed73c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid preload-data order status'/>","comments":"","x":917.7884559631348,"y":150.26844310760498,"z":"1faa4c21.138614","wires":[]},{"id":"4c5e6e0b.0d9a","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":768.4553451538086,"y":150.2683687210083,"z":"1faa4c21.138614","wires":[["471ae763.ed73c8"]]},{"id":"3600f85a.1aec98","type":"set","name":"set: vf-module-id","xml":"<set>\n\t<parameter name=\"vf-module-service-data.vf-module-id\" value=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id`\"/>","comments":"","outputs":1,"x":397.17071533203125,"y":283.51190757751465,"z":"1faa4c21.138614","wires":[[]]},{"id":"5b189a42.545814","type":"for","name":"for k : SERVICE_DATA vnf-networks","xml":"<for index=\"k\" start=\"0\" end=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":774,"y":1174,"z":"1faa4c21.138614","wires":[["a749d767.017348"]]},{"id":"a749d767.017348","type":"switchNode","name":"switch: SERVICE-DATA network-role = INPUT","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-role`\">","comments":"","outputs":1,"x":1134.9634094238281,"y":1173.099287033081,"z":"1faa4c21.138614","wires":[["b3cb6d4f.0288f"]]},{"id":"b3cb6d4f.0288f","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1414.5088195800781,"y":1173.144941329956,"z":"1faa4c21.138614","wires":[["24634a0a.d7c076"]]},{"id":"de134847.1f4e48","type":"set","name":"set: SERVICE_DATA vnf-networks = AAI DATA","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-name\" value=\"`$tmp.AnAI.l3network.network-name`\" />\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].neutron-id\" value=\"`$tmp.AnAI.l3network.neutron-network-id`\" />\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn\" value=\"`$tmp.AnAI.l3network.contrail-network-fqdn`\" />\n","comments":"","outputs":1,"x":1892.982032775879,"y":1172.0794134140015,"z":"1faa4c21.138614","wires":[[]]},{"id":"24634a0a.d7c076","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1574.9354400634766,"y":1172.961480140686,"z":"1faa4c21.138614","wires":[["73a4d8d5.c06308","748cdef5.bc80f","de134847.1f4e48"]]},{"id":"a8393abf.7fcee8","type":"comment","name":"Use INPUT vnf-networks to override preload","info":"","comments":"","x":880.2924880981445,"y":1064.4257173538208,"z":"1faa4c21.138614","wires":[]},{"id":"181bc12d.03d83f","type":"switchNode","name":"switch: INPUT sbunet-name != NULL","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-name != ''`\">","comments":"","outputs":1,"x":2357.911766052246,"y":1280.5684156417847,"z":"1faa4c21.138614","wires":[["b1aab41.1658748"]]},{"id":"b1aab41.1658748","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2595.1617317199707,"y":1280.3183946609497,"z":"1faa4c21.138614","wires":[["ebb89f74.08857"]]},{"id":"ce3cc9d0.4cee08","type":"set","name":"set: service-data = AnAI - subnet-id ","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3334.42374420166,"y":1393.8661336898804,"z":"1faa4c21.138614","wires":[[]]},{"id":"ebb89f74.08857","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2460.923728942871,"y":1330.866021156311,"z":"1faa4c21.138614","wires":[["c8277f6a.50834"]]},{"id":"94133efa.587e1","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2469.352195739746,"y":1395.2946138381958,"z":"1faa4c21.138614","wires":[["d4e7d16e.714f7"]]},{"id":"d4e7d16e.714f7","type":"switchNode","name":"switch: AnAI == INPUT - subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-name`\">","comments":"","outputs":1,"x":2842.102149963379,"y":1394.5446977615356,"z":"1faa4c21.138614","wires":[["cf289518.3fc368"]]},{"id":"cf289518.3fc368","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3100.50484085083,"y":1394.4117259979248,"z":"1faa4c21.138614","wires":[["ce3cc9d0.4cee08"]]},{"id":"c8277f6a.50834","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2746.2452125549316,"y":1330.449411869049,"z":"1faa4c21.138614","wires":[["94133efa.587e1"]]},{"id":"748cdef5.bc80f","type":"switchNode","name":"switch: INPUT sbunet-id != NULL","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-id != ''`\">","comments":"","outputs":1,"x":1851.483211517334,"y":1236.8065958023071,"z":"1faa4c21.138614","wires":[["87aac3bf.46e16","8c173a36.9127d8"]]},{"id":"1bed8cec.efe9e3","type":"set","name":"set: data-data = INPUT - subnet-id ","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-id`\" />","comments":"","outputs":1,"x":2349.7332077026367,"y":1237.0565977096558,"z":"1faa4c21.138614","wires":[[]]},{"id":"87aac3bf.46e16","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2107.7331771850586,"y":1236.5565748214722,"z":"1faa4c21.138614","wires":[["1bed8cec.efe9e3"]]},{"id":"8c173a36.9127d8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2108.9832191467285,"y":1280.5565958023071,"z":"1faa4c21.138614","wires":[["181bc12d.03d83f"]]},{"id":"12ef162a.3f441a","type":"switchNode","name":"switch: INPUT ipv6-sbunet-name != NULL","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-name != ''`\">","comments":"","outputs":1,"x":2366.185417175293,"y":1508.7114629745483,"z":"1faa4c21.138614","wires":[["f70a96da.79e438"]]},{"id":"f70a96da.79e438","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2613.4353828430176,"y":1508.4614419937134,"z":"1faa4c21.138614","wires":[["f829dcc5.c6de7"]]},{"id":"cc6db42c.cf6378","type":"set","name":"set: service-data = AnAI - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3342.697395324707,"y":1622.009181022644,"z":"1faa4c21.138614","wires":[[]]},{"id":"f829dcc5.c6de7","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2469.197380065918,"y":1559.0090684890747,"z":"1faa4c21.138614","wires":[["fdeef706.829528"]]},{"id":"4f132648.69d248","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2477.625846862793,"y":1623.4376611709595,"z":"1faa4c21.138614","wires":[["cae2d965.d355a8"]]},{"id":"cae2d965.d355a8","type":"switchNode","name":"switch: AnAI == INPUT - ipv6-subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-name`\">","comments":"","outputs":1,"x":2850.375801086426,"y":1622.6877450942993,"z":"1faa4c21.138614","wires":[["1d5397be.45f898"]]},{"id":"1d5397be.45f898","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3108.778491973877,"y":1622.5547733306885,"z":"1faa4c21.138614","wires":[["cc6db42c.cf6378"]]},{"id":"fdeef706.829528","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2754.5188636779785,"y":1558.5924592018127,"z":"1faa4c21.138614","wires":[["4f132648.69d248"]]},{"id":"73a4d8d5.c06308","type":"switchNode","name":"switch: INPUT ipv6-sbunet-id != NULL","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-id != ''`\">","comments":"","outputs":1,"x":1859.7568626403809,"y":1464.9496431350708,"z":"1faa4c21.138614","wires":[["9cb75fc8.62948","64acb997.b0bf68"]]},{"id":"ae50028d.0d9f6","type":"set","name":"set: service-data = INPUT - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-id`\" />","comments":"","outputs":1,"x":2367.0068588256836,"y":1465.1996450424194,"z":"1faa4c21.138614","wires":[[]]},{"id":"9cb75fc8.62948","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2116.0068283081055,"y":1464.6996221542358,"z":"1faa4c21.138614","wires":[["ae50028d.0d9f6"]]},{"id":"64acb997.b0bf68","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2117.2568702697754,"y":1508.6996431350708,"z":"1faa4c21.138614","wires":[["12ef162a.3f441a"]]},{"id":"df99f43a.192678","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":515.8282470703125,"y":1070.390067100525,"z":"1faa4c21.138614","wires":[["44440d79.5a1ee4","5b189a42.545814"]]},{"id":"44440d79.5a1ee4","type":"switchNode","name":"switch:vf-module-service-data...vnf-networks_length","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":831.0153274536133,"y":1124.4490270614624,"z":"1faa4c21.138614","wires":[["63358e06.3f664"]]},{"id":"63358e06.3f664","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1118.5153198242188,"y":1124.4490270614624,"z":"1faa4c21.138614","wires":[["ac876566.e9a498"]]},{"id":"ac876566.e9a498","type":"switchNode","name":"set: vf-module-service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1417.2653198242188,"y":1124.4490270614624,"z":"1faa4c21.138614","wires":[[]]},{"id":"a64b9779.a71b08","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1339.638515472412,"y":1900.6209201812744,"z":"1faa4c21.138614","wires":[["4696ff9e.15cd7"]]},{"id":"3b397c6b.f1ef14","type":"set","name":"set: SERVICE_DATA vnf-networks = AAI DATA","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-name\" value=\"`$tmp.AnAI.l3network.network-name`\" />\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].neutron-id\" value=\"`$tmp.AnAI.l3network.neutron-network-id`\" />\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn\" value=\"`$tmp.AnAI.l3network.contrail-network-fqdn`\" />\n\n","comments":"","outputs":1,"x":2014.0710487365723,"y":2173.3637895584106,"z":"1faa4c21.138614","wires":[[]]},{"id":"5d489590.345c3c","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-name\" \n\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1116.531536102295,"y":1900.8868598937988,"z":"1faa4c21.138614","wires":[["a64b9779.a71b08","96f0e56a.e21d98","1b8842da.0a0e4d"]]},{"id":"9aecd914.8483b8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":858.0431060791016,"y":1901.1858234405518,"z":"1faa4c21.138614","wires":[["5d489590.345c3c","eb351c3a.523a","a1ca6a21.36bfc8"]]},{"id":"60582a4c.d77b14","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying AnAI for l3-network with network-name = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$j].network-name`\" />\n","comments":"","x":1486.9243507385254,"y":1938.4834985733032,"z":"1faa4c21.138614","wires":[]},{"id":"96f0e56a.e21d98","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1331.7021285163032,"y":1938.4834985733032,"z":"1faa4c21.138614","wires":[["60582a4c.d77b14"]]},{"id":"4696ff9e.15cd7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'PRELOAD network-name = ' + $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' not found in AnAI'`\" />\n","comments":"","x":1505.9243812561035,"y":1900.4835233688354,"z":"1faa4c21.138614","wires":[]},{"id":"1f867022.29e93","type":"switchNode","name":"switch: SERVICE-DATA network-role = PRELOAD","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-role`\">","comments":"","outputs":1,"x":1264.674373626709,"y":2173.2336616516113,"z":"1faa4c21.138614","wires":[["e72c07ef.a09cd8"]]},{"id":"e72c07ef.a09cd8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1549.0770645141602,"y":2173.1006898880005,"z":"1faa4c21.138614","wires":[["946a7c8e.c755c"]]},{"id":"eb351c3a.523a","type":"for","name":"for k : SERVICE_DATA vnf-networks","xml":"<for index=\"k\" start=\"0\" end=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":1134.4244194030762,"y":2120.483539581299,"z":"1faa4c21.138614","wires":[["1f867022.29e93"]]},{"id":"4c2a528c.ae82fc","type":"switchNode","name":"switch: tmp.AnAI.l3network.network-id == null","xml":"<switch test=\"`$tmp.AnAI.l3network.network-id == ''`\">","comments":"","outputs":1,"x":1597.317310333252,"y":1976.3764724731445,"z":"1faa4c21.138614","wires":[["c00f083d.1aa798"]]},{"id":"c00f083d.1aa798","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":1859.567310333252,"y":1976.3764724731445,"z":"1faa4c21.138614","wires":[["45a1f95e.d33e58"]]},{"id":"45a1f95e.d33e58","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying l3-network with network-name = ' + $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' , it is likely that there are more than one l3-newtork object with the same network-name in AnAI.'`\" />\n","comments":"","x":2013.567310333252,"y":1976.8764724731445,"z":"1faa4c21.138614","wires":[]},{"id":"1b8842da.0a0e4d","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1337.317295074463,"y":1976.1264533996582,"z":"1faa4c21.138614","wires":[["4c2a528c.ae82fc"]]},{"id":"a1ca6a21.36bfc8","type":"switchNode","name":"switch: vf-module-service-data...vnf-networks_length","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":1189.995891571045,"y":2071.305072784424,"z":"1faa4c21.138614","wires":[["2beaa433.a0358c"]]},{"id":"2beaa433.a0358c","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1477.4958839416504,"y":2071.305072784424,"z":"1faa4c21.138614","wires":[["46d2dad3.6e7a34"]]},{"id":"46d2dad3.6e7a34","type":"switchNode","name":"set: vf-module-service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1776.2458839416504,"y":2071.305072784424,"z":"1faa4c21.138614","wires":[[]]},{"id":"19586604.772bba","type":"switchNode","name":"switch: SERVICE-DATA sbunet-id == NULL","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id == ''`\">","comments":"","outputs":1,"x":2000.0316200256348,"y":2225.2693090438843,"z":"1faa4c21.138614","wires":[["b3750df1.dad78"]]},{"id":"946a7c8e.c755c","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":1707.0316123962402,"y":2173.2693090438843,"z":"1faa4c21.138614","wires":[["3b397c6b.f1ef14","19586604.772bba","a54a422d.7f289"]]},{"id":"b3750df1.dad78","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2256.2815856933594,"y":2225.0192880630493,"z":"1faa4c21.138614","wires":[["1fb12a07.945fd6"]]},{"id":"1fb12a07.945fd6","type":"switchNode","name":"switch: SERVICE-DATA sbunet-name != NULL","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-name != ''`\">","comments":"","outputs":1,"x":2082.6267700195312,"y":2285.174117088318,"z":"1faa4c21.138614","wires":[["7263aff8.1dc94"]]},{"id":"7263aff8.1dc94","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2347.876735687256,"y":2284.924096107483,"z":"1faa4c21.138614","wires":[["1e753aed.9f0f55"]]},{"id":"1cc5f67b.c5836a","type":"set","name":"set: service-data = AnAI - subnet-id ","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3104.1387329101562,"y":2408.043137550354,"z":"1faa4c21.138614","wires":[[]]},{"id":"1e753aed.9f0f55","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2201.3529663085938,"y":2346.1146154403687,"z":"1faa4c21.138614","wires":[["80ab5bcc.2e28c8"]]},{"id":"ea48a7cf.4c4df8","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2239.067184448242,"y":2409.4716176986694,"z":"1faa4c21.138614","wires":[["145c2385.46aa9c"]]},{"id":"145c2385.46aa9c","type":"switchNode","name":"switch: AnAI == service-data - subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-name`\">","comments":"","outputs":1,"x":2611.817138671875,"y":2408.7217016220093,"z":"1faa4c21.138614","wires":[["b42e690f.505ff8"]]},{"id":"b42e690f.505ff8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2870.219829559326,"y":2408.5887298583984,"z":"1faa4c21.138614","wires":[["1cc5f67b.c5836a"]]},{"id":"80ab5bcc.2e28c8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2486.6744499206543,"y":2345.6980061531067,"z":"1faa4c21.138614","wires":[["ea48a7cf.4c4df8"]]},{"id":"5296c6fd.9fcb48","type":"switchNode","name":"switch: SERVICE-DATA ipv6-sbunet-name != NULL","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name != ''`\">","comments":"","outputs":1,"x":2096.4482421875,"y":2544.9955739974976,"z":"1faa4c21.138614","wires":[["e32aea1f.9758e8"]]},{"id":"e32aea1f.9758e8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2381.6982078552246,"y":2544.7455530166626,"z":"1faa4c21.138614","wires":[["384e37ed.ea75c8"]]},{"id":"13d42cf8.7179b3","type":"set","name":"set: service-data = AnAI - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3127.9600982666016,"y":2660.007555961609,"z":"1faa4c21.138614","wires":[[]]},{"id":"384e37ed.ea75c8","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2193.7459716796875,"y":2603.7931451797485,"z":"1faa4c21.138614","wires":[["21db5d22.4f1eb2"]]},{"id":"1f1251f4.1e980e","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2262.8885498046875,"y":2661.4360361099243,"z":"1faa4c21.138614","wires":[["c4b44e57.fc7a1"]]},{"id":"c4b44e57.fc7a1","type":"switchNode","name":"switch: AnAI == service-data - ipv6-subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name`\">","comments":"","outputs":1,"x":2635.6385040283203,"y":2660.686120033264,"z":"1faa4c21.138614","wires":[["95800325.64ed4"]]},{"id":"95800325.64ed4","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2894.0411949157715,"y":2660.5531482696533,"z":"1faa4c21.138614","wires":[["13d42cf8.7179b3"]]},{"id":"21db5d22.4f1eb2","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2479.067455291748,"y":2603.3765358924866,"z":"1faa4c21.138614","wires":[["1f1251f4.1e980e"]]},{"id":"b6579139.05a4d","type":"comment","name":"Use Preload Data","info":"","comments":"","x":453.5230941772461,"y":1850.9603958129883,"z":"1faa4c21.138614","wires":[]},{"id":"a54a422d.7f289","type":"switchNode","name":"switch: SERVICE-DATA ipv6-sbunet-id == NULL","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id == ''`\">","comments":"","outputs":1,"x":2010.781494140625,"y":2492.055146217346,"z":"1faa4c21.138614","wires":[["c01ff5de.4ee4b8"]]},{"id":"c01ff5de.4ee4b8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2295.0314598083496,"y":2491.8051252365112,"z":"1faa4c21.138614","wires":[["5296c6fd.9fcb48"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-assign.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-assign.json
new file mode 100644
index 0000000..46afa88
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-assign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"c16263f6.6c033","type":"dgstart","name":"DGSTART","outputs":1,"x":122.85714721679688,"y":48.57143020629883,"z":"350dd502.49698a","wires":[["37a9d0a8.5ccc7"]]},{"id":"37a9d0a8.5ccc7","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":288.0238037109375,"y":48.738101959228516,"z":"350dd502.49698a","wires":[["588951bd.cad18"]]},{"id":"588951bd.cad18","type":"method","name":"method vf-module-topology-assign","xml":"<method rpc='vf-module-topology-assign' mode='sync'>\n","comments":"","outputs":1,"x":247.4524040222168,"y":104.30952453613281,"z":"350dd502.49698a","wires":[["23232616.dc87ba"]]},{"id":"23232616.dc87ba","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":234.78572463989258,"y":159.14286041259766,"z":"350dd502.49698a","wires":[["f8edc82.b3e8938","2ec63c84.2fdfa4","6f2046b4.9e38b8","70b11385.26396c","83b4e560.3deac8","ec42a08c.2f911","3fb1f49d.968cac","70c2e0fb.98281"]]},{"id":"f8edc82.b3e8938","type":"set","name":"set: order-status = PendingCreate","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.order-status\" value=\"PendingCreate\"/>","comments":"","outputs":1,"x":502.67656326293945,"y":581.3350772857666,"z":"350dd502.49698a","wires":[[]]},{"id":"2ec63c84.2fdfa4","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":441.8194007873535,"y":667.0397090911865,"z":"350dd502.49698a","wires":[]},{"id":"2e373aaa.eea7e6","type":"comment","name":"request-action = VNFActivateRequest","info":"","comments":"","x":681.4523811340332,"y":77.25397491455078,"z":"350dd502.49698a","wires":[]},{"id":"2f391c5c.812e84","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":799.7263221740723,"y":532.3576011657715,"z":"350dd502.49698a","wires":[["47e9fdf3.2b1f24"]]},{"id":"ccece92b.253528","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"An error occurred while updating vf-module orchestration-status in AnAI\"/>","comments":"","x":1183.8692512512207,"y":532.3576717376709,"z":"350dd502.49698a","wires":[]},{"id":"a9a15235.6b621","type":"save","name":"save relationship: l3-network","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tand generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" >\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />","comments":"","outputs":1,"x":802.031810760498,"y":375.2578191757202,"z":"350dd502.49698a","wires":[["7bf5e0bd.bd877"]]},{"id":"7bf5e0bd.bd877","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1014.676082611084,"y":375.3048334121704,"z":"350dd502.49698a","wires":[["6b0b8d97.a1d2c4"]]},{"id":"6f2046b4.9e38b8","type":"for","name":"for i : SERVICE_DATA vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":507.67861557006836,"y":375.226300239563,"z":"350dd502.49698a","wires":[["a9a15235.6b621"]]},{"id":"9195333e.3c5b3","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while saving vf-module l3-network relationship in AnAI with network-id = ' + $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`\"/>","comments":"","x":1183.726146697998,"y":485.3211603164673,"z":"350dd502.49698a","wires":[]},{"id":"6b0b8d97.a1d2c4","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":973.4405326843262,"y":437.6070137023926,"z":"350dd502.49698a","wires":[["2266e1a7.71fbbe","9195333e.3c5b3"]]},{"id":"2266e1a7.71fbbe","type":"save","name":"delete vf-module: l3-network relationship","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tAND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id \n\t\t\tAND related-to = l3-network\" >","comments":"","outputs":1,"x":1266.8691291809082,"y":438.0357599258423,"z":"350dd502.49698a","wires":[[]]},{"id":"70b11385.26396c","type":"save","name":"update AnAI - vf-module.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tand generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" >\n<parameter name=\"orchestration-status\" value=\"pending-create\" />","comments":"","outputs":1,"x":535.202465057373,"y":532.3690986633301,"z":"350dd502.49698a","wires":[["2f391c5c.812e84"]]},{"id":"47e9fdf3.2b1f24","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":958.1548957824707,"y":532.4643602371216,"z":"350dd502.49698a","wires":[["ccece92b.253528","2266e1a7.71fbbe"]]},{"id":"83b4e560.3deac8","type":"call","name":"call: vf-module-topology-assign-vnf-networks","xml":"<call module='VNF-API' rpc='vf-module-topology-assign-vnf-networks' mode='sync' >","comments":"","outputs":1,"x":534.9524040222168,"y":264.8928756713867,"z":"350dd502.49698a","wires":[[]]},{"id":"ec42a08c.2f911","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":465.8572120666504,"y":626.4642963409424,"z":"350dd502.49698a","wires":[[]]},{"id":"3fb1f49d.968cac","type":"switchNode","name":"switch ...SERVICE-DATA vnf-networks[]","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":520.0357627868652,"y":315.46430587768555,"z":"350dd502.49698a","wires":[["66fc8dde.364c84"]]},{"id":"66fc8dde.364c84","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":760.4802360534668,"y":314.99201583862305,"z":"350dd502.49698a","wires":[["5163a821.a1b9a8"]]},{"id":"5163a821.a1b9a8","type":"set","name":"set SERVICE-DATA vnf-networks[] = 0","xml":"<set>\n<parameter name='vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length' value='0' />\n","comments":"","outputs":1,"x":982.0358450147842,"y":314.9920365015664,"z":"350dd502.49698a","wires":[[]]},{"id":"70c2e0fb.98281","type":"save","name":"GET AnAI - vf-module","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tand generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" \n\t\tpfx=\"tmp.AnAI.vfmodule\" >","comments":"","outputs":1,"x":465.5357322692871,"y":159.64287090301514,"z":"350dd502.49698a","wires":[["5093485a.9aea88","ef352420.3d6798"]]},{"id":"5093485a.9aea88","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":659.5357322692871,"y":159.39287090301514,"z":"350dd502.49698a","wires":[["2a95d52a.bc0f4a"]]},{"id":"ef352420.3d6798","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":667.0357475280762,"y":199.39288139343262,"z":"350dd502.49698a","wires":[["a7a735d3.c7fd48"]]},{"id":"2a95d52a.bc0f4a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\"/>","comments":"","x":813.7857322692871,"y":159.14287090301514,"z":"350dd502.49698a","wires":[]},{"id":"a7a735d3.c7fd48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'vf-module not found in AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\"/>","comments":"","x":834.2857322692871,"y":199.64287090301514,"z":"350dd502.49698a","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-changeassign.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-changeassign.json
new file mode 100644
index 0000000..d12a01c
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-changeassign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"74fb79ea.032e48","type":"dgstart","name":"DGSTART","outputs":1,"x":122.85714721679688,"y":60,"z":"82b724af.168de8","wires":[["1f56866e.5a45aa"]]},{"id":"1f56866e.5a45aa","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":288.0238037109375,"y":60.16667175292969,"z":"82b724af.168de8","wires":[["7d1ef972.4819e8"]]},{"id":"ded9641e.047bb8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":200.3571548461914,"y":163,"z":"82b724af.168de8","wires":[["74023518.66a7dc","53b04d88.f911e4","ee20442e.3ca3d8","4e4ca37c.97abbc","3db50ae5.43abb6","6af9e30c.118d8c","64e590aa.7bcaa","490cb041.34c72","3520790.e294188","8646627b.abeda","df4daff8.410d8"]]},{"id":"74023518.66a7dc","type":"set","name":"set: order-status = PendingUpdate","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.order-status\" value=\"PendingUpdate\"/>","comments":"","outputs":1,"x":495.8020248413086,"y":887.4610958099365,"z":"82b724af.168de8","wires":[[]]},{"id":"53b04d88.f911e4","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":434.07183837890625,"y":1022.2609748840332,"z":"82b724af.168de8","wires":[]},{"id":"ee20442e.3ca3d8","type":"switchNode","name":"switch: service-data order-status = Active","xml":"<switch test=\"`$vf-module-service-data.oper-status.order-status == Active`\">","comments":"","outputs":1,"x":515.5238189697266,"y":162.88889145851135,"z":"82b724af.168de8","wires":[["6f57b256.79d63c"]]},{"id":"2efaeb27.a894b4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid service-data order status'/>","comments":"","x":920.2736358642578,"y":162.72226548194885,"z":"82b724af.168de8","wires":[]},{"id":"6f57b256.79d63c","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":761.6904449462891,"y":162.47214341163635,"z":"82b724af.168de8","wires":[["2efaeb27.a894b4"]]},{"id":"7d1ef972.4819e8","type":"method","name":"method vf-module-topology-changeassign","xml":"<method rpc='vf-module-topology-changeassign' mode='sync'>\n","comments":"","outputs":1,"x":222.85714721679688,"y":111,"z":"82b724af.168de8","wires":[["ded9641e.047bb8"]]},{"id":"4e4ca37c.97abbc","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-action\" value=\"`$vf-module-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":433.80957794189453,"y":933.476110458374,"z":"82b724af.168de8","wires":[[]]},{"id":"3db50ae5.43abb6","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-order-status\" value=\"`$vf-module-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":497.80957794189453,"y":841.476110458374,"z":"82b724af.168de8","wires":[[]]},{"id":"6af9e30c.118d8c","type":"call","name":"call: vf-module-topology-assign-vnf-neworks","xml":"<call module='VNF-API' rpc='vf-module-topology-assign-vnf-networks' mode='sync' >","comments":"","outputs":1,"x":523.7460479736328,"y":208.66666793823242,"z":"82b724af.168de8","wires":[[]]},{"id":"490cb041.34c72","type":"save","name":"delete l3-network relationship","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tAND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id \n\t\t\tAND related-to = l3-network\" >","comments":"","outputs":1,"x":478.7778015136719,"y":339.9049777984619,"z":"82b724af.168de8","wires":[["9028380b.6c4ac8"]]},{"id":"557a38ee.a802f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while deleting existing vf-module l3-network relationship in AnAI with with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id + ' vf-module update FAILED.'`\"/>","comments":"","x":880.6347961425781,"y":340.1903476715088,"z":"82b724af.168de8","wires":[]},{"id":"64e590aa.7bcaa","type":"save","name":"get AnAI - vf-module","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tand generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" \n\t\tpfx=\"tmp.AnAI.vfmodule\">","comments":"","outputs":1,"x":452.63490295410156,"y":253.55555725097656,"z":"82b724af.168de8","wires":[["6fd52d0e.ed4644","85739c68.20d2c"]]},{"id":"795ec745.e145d8","type":"save","name":"save l3-network relationship","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tAND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" >\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />","comments":"","outputs":1,"x":799.5909881591797,"y":429.90022468566895,"z":"82b724af.168de8","wires":[["c6d96495.8cf3e8"]]},{"id":"c6d96495.8cf3e8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1012.7352294921875,"y":429.94725704193115,"z":"82b724af.168de8","wires":[["fc96e652.96f9f8"]]},{"id":"3520790.e294188","type":"for","name":"for i : SERVICE_DATA vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":495.80943298339844,"y":429.44017601013184,"z":"82b724af.168de8","wires":[["795ec745.e145d8"]]},{"id":"cbdefadd.2eea08","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to update vf-module l3-network relationship in AnAI. ' + $error-message`\"/>","comments":"","x":1368.928123474121,"y":789.1421012878418,"z":"82b724af.168de8","wires":[]},{"id":"fc96e652.96f9f8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1181.713981628418,"y":429.1780004501343,"z":"82b724af.168de8","wires":[["cbdefadd.2eea08","c910e4b6.a9df08","434af9d5.0675a8","264625a3.d0bf3a","52f02717.530ac8"]]},{"id":"434af9d5.0675a8","type":"save","name":"delete relationship: vf-module","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tAND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id \n\t\t\tAND related-to = l3-network\" >","comments":"","outputs":1,"x":1421.2140502929688,"y":477.10680198669434,"z":"82b724af.168de8","wires":[[]]},{"id":"d3e9f0df.7a967","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\"/>","comments":"","x":833.9204864501953,"y":254.2696990966797,"z":"82b724af.168de8","wires":[]},{"id":"9028380b.6c4ac8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":694.6349182128906,"y":340.3333225250244,"z":"82b724af.168de8","wires":[["557a38ee.a802f8"]]},{"id":"8646627b.abeda","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":455.4286117553711,"y":979.4286098480225,"z":"82b724af.168de8","wires":[[]]},{"id":"264625a3.d0bf3a","type":"for","name":"for i : tmp.AnAI.vfmodule.relationship","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.vfmodule.relationship-list.relationship_length`\">","comments":"","outputs":1,"x":1445.1783752441406,"y":568.0000343322754,"z":"82b724af.168de8","wires":[["e2842577.e43338"]]},{"id":"e2842577.e43338","type":"switchNode","name":"switch: relationship.related-to","xml":"<switch test=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].related-to`\">","comments":"","outputs":1,"x":1756.1783447265625,"y":567.7143545150757,"z":"82b724af.168de8","wires":[["6c2ffb96.bbe484"]]},{"id":"6c2ffb96.bbe484","type":"other","name":"l3-network","xml":"<outcome value='l3-network'>","comments":"","outputs":1,"x":1984.1783447265625,"y":567.7143545150757,"z":"82b724af.168de8","wires":[["ee9c3f17.36cc2"]]},{"id":"a605f7c0.31a3b8","type":"for","name":"for j : tmp.AnAI.vfmodule.relationship-data","xml":"<for index=\"j\" start=\"0\" end=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length`\">","comments":"","outputs":1,"x":1884.1783752441406,"y":702.6071891784668,"z":"82b724af.168de8","wires":[["75b5e472.e4c3ac"]]},{"id":"75b5e472.e4c3ac","type":"save","name":"save l3-network relationship","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tAND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" >\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data[$j].relationship-value`\" />","comments":"","outputs":1,"x":2241.7498321533203,"y":702.750072479248,"z":"82b724af.168de8","wires":[["706c56b8.8643e8","5f66312e.f434f"]]},{"id":"706c56b8.8643e8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2499.7498321533203,"y":702.750072479248,"z":"82b724af.168de8","wires":[["7dd21ad6.da13b4"]]},{"id":"6fd52d0e.ed4644","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":642.4920768737793,"y":253.69842529296875,"z":"82b724af.168de8","wires":[["d3e9f0df.7a967"]]},{"id":"c910e4b6.a9df08","type":"set","name":"set error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`' | An error occurred while saving l3-network relationship with network-id = ' + $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id + ' for vf-module with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and generic-vnf-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\" />\n","comments":"","outputs":1,"x":1386.2141189575195,"y":429.10716819763184,"z":"82b724af.168de8","wires":[[]]},{"id":"7dd21ad6.da13b4","type":"set","name":"set error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`$error-message + ' | An error occurred while during rollback of l3-network relationship for vf-module with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and generic-vnf-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\" />\n","comments":"","outputs":1,"x":2697.7141494750977,"y":702.285717010498,"z":"82b724af.168de8","wires":[[]]},{"id":"85739c68.20d2c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":649.3849029541016,"y":296.1388702392578,"z":"82b724af.168de8","wires":[["d3e9f0df.7a967"]]},{"id":"5f66312e.f434f","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2510.0355377197266,"y":743.9285688400269,"z":"82b724af.168de8","wires":[["7dd21ad6.da13b4"]]},{"id":"75eb4741.287e38","type":"switchNode","name":"set: vf-module-service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1134.9840469360352,"y":384.7142581939697,"z":"82b724af.168de8","wires":[[]]},{"id":"6c3f0f76.71273","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":836.2340469360352,"y":384.7142581939697,"z":"82b724af.168de8","wires":[["75eb4741.287e38"]]},{"id":"df4daff8.410d8","type":"switchNode","name":"switch: vf-module-service-data...vnf-networks_length","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":548.7340545654297,"y":384.7142581939697,"z":"82b724af.168de8","wires":[["6c3f0f76.71273"]]},{"id":"7ee2d878.734fd8","type":"switchNode","name":"set: tmp.AnAI.vfmodule.relationship-list.relationship_length = 0","xml":"<set>\n\t<parameter name=\"tmp.AnAI.vfmodule.relationship-list.relationship_length\" value = \"0\" />","comments":"","outputs":1,"x":2168.9999923706055,"y":524.0000495910645,"z":"82b724af.168de8","wires":[[]]},{"id":"a0c959dc.928788","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1851.2499923706055,"y":524.0000495910645,"z":"82b724af.168de8","wires":[["7ee2d878.734fd8"]]},{"id":"52f02717.530ac8","type":"switchNode","name":"switch: tmp.AnAI.vfmodule.relationship-list.relationship_length","xml":"<switch test=\"`$tmp.AnAI.vfmodule.relationship-list.relationship_length`\">","comments":"","outputs":1,"x":1530.75,"y":524.0000495910645,"z":"82b724af.168de8","wires":[["a0c959dc.928788"]]},{"id":"767a5f43.e2cc1","type":"switchNode","name":"set: tmp.AnAI.vfmodulerelationship-list.relationship[$i].relationship-data_length = 0","xml":"<set>\n\t<parameter name=\"tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length\" value = \"0\" />","comments":"","outputs":1,"x":2777.0000228881836,"y":655.0000133514404,"z":"82b724af.168de8","wires":[[]]},{"id":"4e18247d.2004dc","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2392.2500228881836,"y":655.0000133514404,"z":"82b724af.168de8","wires":[["767a5f43.e2cc1"]]},{"id":"a926fa42.76f768","type":"switchNode","name":"switch: tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length","xml":"<switch test=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length`\">","comments":"","outputs":1,"x":2008.7500305175781,"y":655.0000133514404,"z":"82b724af.168de8","wires":[["4e18247d.2004dc"]]},{"id":"ee9c3f17.36cc2","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1596.2500228881836,"y":654.7500095367432,"z":"82b724af.168de8","wires":[["a926fa42.76f768","a605f7c0.31a3b8"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-delete.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-delete.json
new file mode 100644
index 0000000..66fbf71
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-delete.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"311b3dda.3a6ee2","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":391.11109924316406,"y":442.75004386901855,"z":"dab4c267.b1578","wires":[]},{"id":"3879dfc2.a88","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":168.11104583740234,"y":141.888916015625,"z":"dab4c267.b1578","wires":[["26cf5bcd.60b334","311b3dda.3a6ee2","1ebd1e72.56bc82","92acc6b8.3892a8","755d4650.1103f8","fad87c6e.a4bde","32debc64.c813c4","e381bce7.8db14"]]},{"id":"26cf5bcd.60b334","type":"set","name":"set: order-status = Deleted","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.order-status\" value=\"Deleted\"/>","comments":"","outputs":1,"x":432.11109924316406,"y":269.75004386901855,"z":"dab4c267.b1578","wires":[[]]},{"id":"3b032898.d41a98","type":"method","name":"method vf-module-topology-delete","xml":"<method rpc='vf-module-topology-delete' mode='sync'>\n","comments":"","outputs":1,"x":199.7777328491211,"y":91.05558013916016,"z":"dab4c267.b1578","wires":[["3879dfc2.a88"]]},{"id":"ee0d1a29.b42c08","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":269.77770233154297,"y":39.05558776855469,"z":"dab4c267.b1578","wires":[["3b032898.d41a98"]]},{"id":"7e50728c.7027fc","type":"dgstart","name":"DGSTART","outputs":1,"x":106.61104583740234,"y":38.888916015625,"z":"dab4c267.b1578","wires":[["ee0d1a29.b42c08"]]},{"id":"152dd102.d75f6f","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":639.4798355102539,"y":185.5732650756836,"z":"dab4c267.b1578","wires":[["32c98655.4f8d8a"]]},{"id":"32c98655.4f8d8a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":802.8129653930664,"y":185.57332611083984,"z":"dab4c267.b1578","wires":[]},{"id":"755d4650.1103f8","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-action\" value=\"`$vf-module-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":393.3686981201172,"y":313.2956371307373,"z":"dab4c267.b1578","wires":[[]]},{"id":"1ebd1e72.56bc82","type":"switchNode","name":"switch: vf-module-id config == input","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id == $vf-module-service-data.vf-module-id`\">","comments":"","outputs":1,"x":459.25494384765625,"y":142.37646102905273,"z":"dab4c267.b1578","wires":[["b8947b68.74b8b8"]]},{"id":"b8947b68.74b8b8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":684.7095031738281,"y":142.55828857421875,"z":"dab4c267.b1578","wires":[["5ffa6798.ed60a8"]]},{"id":"5ffa6798.ed60a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value='vf-module-id not found in SDNC'/>","comments":"","x":847.300422668457,"y":142.7173891067505,"z":"dab4c267.b1578","wires":[]},{"id":"92acc6b8.3892a8","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-order-status\" value=\"`$vf-module-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":458.5050506591797,"y":228.48759269714355,"z":"dab4c267.b1578","wires":[[]]},{"id":"fad87c6e.a4bde","type":"set","name":"Clear vf-module-topology","xml":"<set>\n\t<parameter name=\"vf-module-service-data.vf-module-topology-information.\" value=\"\" /> \n","comments":"","outputs":1,"x":425.5050506591797,"y":353.48759269714355,"z":"dab4c267.b1578","wires":[[]]},{"id":"e381bce7.8db14","type":"switchNode","name":"switch: order-status = Active","xml":"<switch test=\"`$vf-module-service-data.oper-status.order-status == Active`\">","comments":"","outputs":1,"x":437.66273498535156,"y":185.87306594848633,"z":"dab4c267.b1578","wires":[["152dd102.d75f6f"]]},{"id":"32debc64.c813c4","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":413.8254165649414,"y":398.6905174255371,"z":"dab4c267.b1578","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-operation.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-operation.json
new file mode 100644
index 0000000..1acb0fd
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-operation.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"b2b9aa36.90c458","type":"dgstart","name":"DGSTART","outputs":1,"x":147.38094329833984,"y":59.999999046325684,"z":"63798740.0bebb8","wires":[["3b7a89dc.6882f6"]]},{"id":"3b7a89dc.6882f6","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":314.65870666503906,"y":59.66666793823242,"z":"63798740.0bebb8","wires":[["80962807.697918"]]},{"id":"80962807.697918","type":"method","name":"vf-module-topology-operation","xml":"<method rpc='vf-module-topology-operation' mode='sync'>\n","comments":"","outputs":1,"x":237.88094329833984,"y":110.2222204208374,"z":"63798740.0bebb8","wires":[["a021878d.6bc908"]]},{"id":"e35b68e.76c7198","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":665.9920959472656,"y":960.3332662582397,"z":"63798740.0bebb8","wires":[["7d148de2.daa994"]]},{"id":"7d148de2.daa994","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='svc-action not recognized'/>\n","comments":"","x":890.9920959472656,"y":960.3332662582397,"z":"63798740.0bebb8","wires":[]},{"id":"981a0559.178fd8","type":"other","name":"delete","xml":"<outcome value='delete'>","comments":"","outputs":1,"x":666.2420959472656,"y":916.5832681655884,"z":"63798740.0bebb8","wires":[["b4d8512d.b7644"]]},{"id":"b4d8512d.b7644","type":"call","name":"call: vf-module-topology-delete","xml":"<call module='VNF-API' rpc='vf-module-topology-delete' mode='sync' >","comments":"","outputs":1,"x":945.9921646118164,"y":916.5832691192627,"z":"63798740.0bebb8","wires":[[]]},{"id":"9c74b303.df115","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"vf-module-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$vf-module-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field6\" value=\"`$vf-module-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$vf-module-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$vf-module-topology-operation-input.service-information.service-id`\"/>\n<parameter name=\"field9\" value=\"`$vf-module-topology-operation-input.service-information.service-type`\"/>\n<parameter name=\"field10\" value=\"`$vf-module-topology-operation-input.service-information.subscriber-name`\"/>\n<parameter name=\"field11\" value=\"`$vf-module-topology-operation-input.service-information.service-instance-id`\"/>\n<parameter name=\"field12\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-id`\"/>\n<parameter name=\"field13\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-model-id`\"/>\n<parameter name=\"field14\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-name`\"/>\n<parameter name=\"field15\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.request-version`\"/>\n<parameter name=\"field16\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.vnf-instance-id`\"/>\n<parameter name=\"field17\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.vnf-model-id`\"/>\n<parameter name=\"field18\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.vnf-instance-name`\"/>\n<parameter name=\"field19\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.aic-cloud-region`\"/>\n<parameter name=\"field20\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.tenant`\"/>","comments":"","outputs":1,"x":420.0476379394531,"y":167.22222423553467,"z":"63798740.0bebb8","wires":[[]]},{"id":"f768fd5a.adb8a","type":"comment","name":"vf-module-topology-operation","info":"","comments":"","x":638.2698211669922,"y":101.44444370269775,"z":"63798740.0bebb8","wires":[]},{"id":"a021878d.6bc908","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":232.38095092773438,"y":167.00000476837158,"z":"63798740.0bebb8","wires":[["9c74b303.df115","bc617051.8373c","7d112cb1.d7edf4","4133dd42.c08bb4","293395b5.40c96a","44fbb825.f1f9d8","18c435d7.1141ea","bac1f2ae.3be1","6d26b2ee.e1dbcc"]]},{"id":"bc617051.8373c","type":"switchNode","name":"switch: INPUT vf-module-name","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-name`\">","comments":"","outputs":1,"x":494.04762268066406,"y":213.66664695739746,"z":"63798740.0bebb8","wires":[["80948d41.4e439","28867132.f8316e"]]},{"id":"80948d41.4e439","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":708.0476226806641,"y":213.66664695739746,"z":"63798740.0bebb8","wires":[["b4b96e66.163f7"]]},{"id":"28867132.f8316e","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":707.0476226806641,"y":257.66664695739746,"z":"63798740.0bebb8","wires":[["40842fb6.6a48e"]]},{"id":"b4b96e66.163f7","type":"switchNode","name":"switch: PRELOAD vf-module-name","xml":"<switch test=\"`$vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-name`\">","comments":"","outputs":1,"x":938.0476226806641,"y":213.66664695739746,"z":"63798740.0bebb8","wires":[["f71a995b.156168","191fc631.94c04a"]]},{"id":"f71a995b.156168","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1173.047622680664,"y":213.66664695739746,"z":"63798740.0bebb8","wires":[["ede3c59c.0a6ad8"]]},{"id":"191fc631.94c04a","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1174.047622680664,"y":256.66664695739746,"z":"63798740.0bebb8","wires":[["6ba480c9.342ea"]]},{"id":"ede3c59c.0a6ad8","type":"switchNode","name":"switch: vf-module-name INPUT == PRELOAD","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-name == $vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-name`\">","comments":"","outputs":1,"x":1431.047607421875,"y":213.66664505004883,"z":"63798740.0bebb8","wires":[["2482f31f.63fecc"]]},{"id":"2482f31f.63fecc","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1686.380973815918,"y":214.3335475921631,"z":"63798740.0bebb8","wires":[["f44b3d7f.1ca9b"]]},{"id":"f44b3d7f.1ca9b","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value='vf-module-name not found in vf-module-preload-data'/>","comments":"","x":1845.0475997924805,"y":213.66664695739746,"z":"63798740.0bebb8","wires":[]},{"id":"6ba480c9.342ea","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='No preload data found to match vf-module-name'/>","comments":"","x":1341.047622680664,"y":256.66664695739746,"z":"63798740.0bebb8","wires":[]},{"id":"40842fb6.6a48e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vf-module-name is required'/>","comments":"","x":868.5476226806641,"y":257.91664695739746,"z":"63798740.0bebb8","wires":[]},{"id":"7d112cb1.d7edf4","type":"switchNode","name":"switch: INPUT vf-module-model-id","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-model-id`\">","comments":"","outputs":1,"x":500.26985931396484,"y":318.33331775665283,"z":"63798740.0bebb8","wires":[["474af7dd.015108","e5dce74.d4b4018"]]},{"id":"474af7dd.015108","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":723.2698516845703,"y":318.33331775665283,"z":"63798740.0bebb8","wires":[["5540ad23.69af84"]]},{"id":"e5dce74.d4b4018","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":722.2698516845703,"y":360.33331775665283,"z":"63798740.0bebb8","wires":[["dddc6603.8e99c8"]]},{"id":"5540ad23.69af84","type":"switchNode","name":"switch: PRELOAD vf-module-model-id","xml":"<switch test=\"`$vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`\">","comments":"","outputs":1,"x":962.2698516845703,"y":318.33331775665283,"z":"63798740.0bebb8","wires":[["2864ae53.aa3a82","9183452.51198b8"]]},{"id":"2864ae53.aa3a82","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1202.2698516845703,"y":318.33331775665283,"z":"63798740.0bebb8","wires":[["74e5fb42.a304e4"]]},{"id":"9183452.51198b8","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1202.2698516845703,"y":359.33331775665283,"z":"63798740.0bebb8","wires":[["376fd68.672322a"]]},{"id":"dddc6603.8e99c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vf-module-model-id is required'/>","comments":"","x":883.7698516845703,"y":360.58331775665283,"z":"63798740.0bebb8","wires":[]},{"id":"74e5fb42.a304e4","type":"switchNode","name":"switch: vf-module-model-id INPUT == PRELOAD","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-model-id == $vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`\">","comments":"","outputs":1,"x":1473.2698287963867,"y":318.33331775665283,"z":"63798740.0bebb8","wires":[["f518b05.e9bfe5"]]},{"id":"376fd68.672322a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='No preload data found to match vf-module-model-id from input'/>","comments":"","x":1362.2698287963867,"y":359.33331775665283,"z":"63798740.0bebb8","wires":[]},{"id":"f518b05.e9bfe5","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1743.2698287963867,"y":318.66681385040283,"z":"63798740.0bebb8","wires":[["64c53b14.74a6a4"]]},{"id":"64c53b14.74a6a4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value='vf-module-model-id not found in vf-module-preload-data'/>","comments":"","x":1901.9364547729492,"y":317.9999132156372,"z":"63798740.0bebb8","wires":[]},{"id":"4133dd42.c08bb4","type":"switchNode","name":"switch: INPUT vf-module-id","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id`\">","comments":"","outputs":1,"x":478.4485168457031,"y":410.2976427078247,"z":"63798740.0bebb8","wires":[["24582128.95217e","a8303f6.63a26c"]]},{"id":"a8303f6.63a26c","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":700.448486328125,"y":450.44048023223877,"z":"63798740.0bebb8","wires":[["636f5b70.b91114"]]},{"id":"24582128.95217e","type":"outcome","name":"0","xml":"<outcome value='0'>","comments":"","outputs":1,"x":700.5914154052734,"y":409.86907863616943,"z":"63798740.0bebb8","wires":[["636f5b70.b91114"]]},{"id":"636f5b70.b91114","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vf-module-id cannot be NULL or 0'/>","comments":"","x":875.3056945800781,"y":450.7262010574341,"z":"63798740.0bebb8","wires":[]},{"id":"293395b5.40c96a","type":"switchNode","name":"switch: INPUT vnf-instance-id","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\">","comments":"","outputs":1,"x":484.3532485961914,"y":503.9444637298584,"z":"63798740.0bebb8","wires":[["9950854d.189d38","8d68bc49.6b2e4"]]},{"id":"8d68bc49.6b2e4","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":717.3532180786133,"y":542.0873012542725,"z":"63798740.0bebb8","wires":[["65b058d.3449fa8"]]},{"id":"9950854d.189d38","type":"outcome","name":"0","xml":"<outcome value='0'>","comments":"","outputs":1,"x":716.4961471557617,"y":504.5158996582031,"z":"63798740.0bebb8","wires":[["65b058d.3449fa8"]]},{"id":"65b058d.3449fa8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-instance-id cannot be NULL or 0'/>","comments":"","x":871.2104263305664,"y":542.3730220794678,"z":"63798740.0bebb8","wires":[]},{"id":"44fbb825.f1f9d8","type":"switchNode","name":"switch: INPUT vnf-instance-name","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-instance-name`\">","comments":"","outputs":1,"x":497.6032371520996,"y":584.9444646835327,"z":"63798740.0bebb8","wires":[["c5d65cf1.fcd86"]]},{"id":"c5d65cf1.fcd86","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":747.6032066345215,"y":585.0873022079468,"z":"63798740.0bebb8","wires":[["425cdf86.d8726"]]},{"id":"425cdf86.d8726","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-instance-name cannot be NULL'/>","comments":"","x":901.4604148864746,"y":585.3730230331421,"z":"63798740.0bebb8","wires":[]},{"id":"18c435d7.1141ea","type":"switchNode","name":"switch: INPUT vnf-model-id","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-model-id`\">","comments":"","outputs":1,"x":479.353271484375,"y":632.1944665908813,"z":"63798740.0bebb8","wires":[["96ed3988.9aab78"]]},{"id":"96ed3988.9aab78","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":729.3532409667969,"y":632.3373041152954,"z":"63798740.0bebb8","wires":[["368ecf78.0f8b6"]]},{"id":"368ecf78.0f8b6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-model-id cannot be NULL'/>","comments":"","x":883.21044921875,"y":632.6230249404907,"z":"63798740.0bebb8","wires":[]},{"id":"bac1f2ae.3be1","type":"switchNode","name":"switch: INPUT aic-cloud-region","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.aic-cloud-region`\">","comments":"","outputs":1,"x":489.6309509277344,"y":676.5000085830688,"z":"63798740.0bebb8","wires":[["a479aebf.dc5d"]]},{"id":"a479aebf.dc5d","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":707.6309204101562,"y":676.6428461074829,"z":"63798740.0bebb8","wires":[["988e892c.d475a8"]]},{"id":"988e892c.d475a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='aic-cloud-region cannot be NULL'/>","comments":"","x":861.4881286621094,"y":676.9285669326782,"z":"63798740.0bebb8","wires":[]},{"id":"6d26b2ee.e1dbcc","type":"switchNode","name":"switch: svc-action","xml":"<switch test=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-action`\">\n<!--\nleaf svc-action { \n\ttype enumeration { \n\t\tenum \"reserve\";\n\t\tenum \"assign\";\n\t\tenum \"activate\"; // equal to commit\n\t\tenum \"delete\";\t // equal to commit\n\t\tenum \"changeassign\";\n\t\tenum \"changedelete\";\n\t\tenum \"rollback\";\n\t}\n}\n-->\n\n","comments":"","outputs":1,"x":447.9364929199219,"y":742.3332624435425,"z":"63798740.0bebb8","wires":[["e35b68e.76c7198","93ac097f.c6f298","1922a4aa.01150b","2f8e310d.ec431e","981a0559.178fd8","33970441.68697c"]]},{"id":"93ac097f.c6f298","type":"other","name":"assign","xml":"<outcome value='assign'>","comments":"","outputs":1,"x":665.4920501708984,"y":742.3332681655884,"z":"63798740.0bebb8","wires":[["8c570735.beda08"]]},{"id":"1922a4aa.01150b","type":"other","name":"activate","xml":"<outcome value='activate'>","comments":"","outputs":1,"x":668.4920654296875,"y":831.5832567214966,"z":"63798740.0bebb8","wires":[["8daf28f.5d017d8"]]},{"id":"2f8e310d.ec431e","type":"other","name":"rollback","xml":"<outcome value='rollback'>","comments":"","outputs":1,"x":668.2420654296875,"y":873.8332576751709,"z":"63798740.0bebb8","wires":[["da48c7ad.8819b8"]]},{"id":"33970441.68697c","type":"other","name":"changeassign","xml":"<outcome value='changeassign'>","comments":"","outputs":1,"x":686.9920654296875,"y":787.8332586288452,"z":"63798740.0bebb8","wires":[["355d5e58.476532"]]},{"id":"8c570735.beda08","type":"call","name":"call: vf-module-topology-assign","xml":"<call module='VNF-API' rpc='vf-module-topology-assign' mode='sync' >","comments":"","outputs":1,"x":945.7420501708984,"y":742.3332662582397,"z":"63798740.0bebb8","wires":[[]]},{"id":"355d5e58.476532","type":"call","name":"call: vf-module-topology-changeassign","xml":"<call module='VNF-API' rpc='vf-module-topology-changeassign' mode='sync' >","comments":"","outputs":1,"x":968.9921722412109,"y":787.3332662582397,"z":"63798740.0bebb8","wires":[[]]},{"id":"da48c7ad.8819b8","type":"call","name":"call: vf-module-topology-rollback","xml":"<call module='VNF-API' rpc='vf-module-topology-rollback' mode='sync' >","comments":"","outputs":1,"x":950.7421722412109,"y":873.8332681655884,"z":"63798740.0bebb8","wires":[[]]},{"id":"8daf28f.5d017d8","type":"call","name":"call: vf-module-topology-activate","xml":"<call module='VNF-API' rpc='vf-module-topology-activate' mode='sync' >","comments":"","outputs":1,"x":950.2421646118164,"y":831.8332619667053,"z":"63798740.0bebb8","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-rollback.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-rollback.json
new file mode 100644
index 0000000..85e05a5
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-rollback.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"c3ce5a21.858818","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":156.80559539794922,"y":155.7499885559082,"z":"a2906cac.f91a6","wires":[["b7bd282e.ecbe08"]]},{"id":"504ed4c1.19f72c","type":"method","name":"method vf-module-topology-rollback","xml":"<method rpc='vf-module-topology-rollback' mode='sync'>\n","comments":"","outputs":1,"x":185.22228240966797,"y":103.1666612625122,"z":"a2906cac.f91a6","wires":[["c3ce5a21.858818"]]},{"id":"bbc0a862.2012a8","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":262.3333435058594,"y":44.055559158325195,"z":"a2906cac.f91a6","wires":[["504ed4c1.19f72c"]]},{"id":"dc5c5f1f.f5323","type":"dgstart","name":"DGSTART","outputs":1,"x":96.61115264892578,"y":43.888885498046875,"z":"a2906cac.f91a6","wires":[["bbc0a862.2012a8"]]},{"id":"69f49ed4.8c74a","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":895.0556182861328,"y":508.4972972869873,"z":"a2906cac.f91a6","wires":[]},{"id":"5f1c1e9f.c2fb3","type":"set","name":"set: order-status = Deleted","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.order-status\" value=\"Deleted\"/>","comments":"","outputs":1,"x":930.8056182861328,"y":337.2751064300537,"z":"a2906cac.f91a6","wires":[[]]},{"id":"560147c0.dbc8c8","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$vf-module-service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":963.6465606689453,"y":251.40388870239258,"z":"a2906cac.f91a6","wires":[["190a74c8.9c3ddb"]]},{"id":"190a74c8.9c3ddb","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1195.2299423217773,"y":251.2372007369995,"z":"a2906cac.f91a6","wires":[["c8163813.24eb68"]]},{"id":"c8163813.24eb68","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1347.5630722045898,"y":251.23726177215576,"z":"a2906cac.f91a6","wires":[]},{"id":"9439ef4e.19bcf","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-action\" value=\"`$vf-modules-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":892.5633125305176,"y":379.57069969177246,"z":"a2906cac.f91a6","wires":[[]]},{"id":"2366439a.26ba4c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1218.9041366577148,"y":204.1944456100464,"z":"a2906cac.f91a6","wires":[["378d2536.971caa"]]},{"id":"378d2536.971caa","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value=\"`'vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' not found in SDNC'`\"/>","comments":"","x":1378.9949569702148,"y":204.60354900360107,"z":"a2906cac.f91a6","wires":[]},{"id":"97215d09.0cf54","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-order-status\" value=\"`$vf-module-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":956.4496612548828,"y":294.59599781036377,"z":"a2906cac.f91a6","wires":[[]]},{"id":"98c2d38b.6194","type":"set","name":"Clear vf-module topology","xml":"<set>\n\t<parameter name=\"vf-module-service-data.\" value=\"\" /> \n","comments":"","outputs":1,"x":925.9496612548828,"y":423.2626552581787,"z":"a2906cac.f91a6","wires":[[]]},{"id":"77cc369b.dab328","type":"switchNode","name":"switch:CONFIG == INPUT - vf-module-id","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id == $vf-module-service-data.vf-module-id`\">","comments":"","outputs":1,"x":975.0556182861328,"y":204.1944456100464,"z":"a2906cac.f91a6","wires":[["2366439a.26ba4c"]]},{"id":"b7bd282e.ecbe08","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$vf-module-service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":264.30560302734375,"y":202.69444942474365,"z":"a2906cac.f91a6","wires":[["d8a6efb4.1cae2"]]},{"id":"d8a6efb4.1cae2","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":500.5555953979492,"y":203.44444274902344,"z":"a2906cac.f91a6","wires":[["d28acb25.7ef2e8"]]},{"id":"d28acb25.7ef2e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":662.5555953979492,"y":203.44444274902344,"z":"a2906cac.f91a6","wires":[["77cc369b.dab328","560147c0.dbc8c8","97215d09.0cf54","5f1c1e9f.c2fb3","9439ef4e.19bcf","98c2d38b.6194","69f49ed4.8c74a","5a9a93a0.4a243c"]]},{"id":"58f1f93f.d350c8","type":"comment","name":"request-action = VNFActivateRequest, svc-action = rollback","info":"","comments":"","x":760.3056030273438,"y":80.44444465637207,"z":"a2906cac.f91a6","wires":[]},{"id":"5a9a93a0.4a243c","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":916.6666259765625,"y":465.5555419921875,"z":"a2906cac.f91a6","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-activate.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-activate.json
new file mode 100644
index 0000000..5e025e3
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-activate.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"224ab88a.0adf58","type":"set","name":"set: order-status = Active","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.order-status\" value=\"Active\"/>","comments":"","outputs":1,"x":423.33331298828125,"y":374.3888626098633,"z":"76e70bd1.ad60c4","wires":[[]]},{"id":"ab9eb400.713038","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":170.33330535888672,"y":141.88887786865234,"z":"76e70bd1.ad60c4","wires":[["224ab88a.0adf58","c8ee6ab7.bac638","c0d479cd.b79348","34cb709c.929ed","f798ae57.6d47d","b8342ba1.d183f8","a8c37c05.42ceb","716ea0ca.5337a"]]},{"id":"e7f31ebf.f0df3","type":"method","name":"method vnf-instance-topology-activate","xml":"<method rpc='vnf-instance-topology-activate' mode='sync'>\n","comments":"","outputs":1,"x":212.99999237060547,"y":86.0555419921875,"z":"76e70bd1.ad60c4","wires":[["ab9eb400.713038"]]},{"id":"ef96001e.3e2e5","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":304.99996185302734,"y":39.05554962158203,"z":"76e70bd1.ad60c4","wires":[["e7f31ebf.f0df3"]]},{"id":"5b8d2293.3efc3c","type":"dgstart","name":"DGSTART","outputs":1,"x":139.83330535888672,"y":38.888877868652344,"z":"76e70bd1.ad60c4","wires":[["ef96001e.3e2e5"]]},{"id":"c8ee6ab7.bac638","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$vnf-instance-service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":462.66668701171875,"y":270.72208404541016,"z":"76e70bd1.ad60c4","wires":[["2f2bb679.ddde5a"]]},{"id":"2f2bb679.ddde5a","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":712.0000381469727,"y":271.05539321899414,"z":"76e70bd1.ad60c4","wires":[["caf23eef.2d6a7"]]},{"id":"9112f66c.accf18","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1370.3331604003906,"y":270.0554447174072,"z":"76e70bd1.ad60c4","wires":[]},{"id":"f798ae57.6d47d","type":"switchNode","name":"switch:vnf-instance-id config == input","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id == $vnf-instance-service-data.vnf-instance-id`\">","comments":"","outputs":1,"x":456.1060485839844,"y":218.93431854248047,"z":"76e70bd1.ad60c4","wires":[["d6b1f417.d762b8"]]},{"id":"d6b1f417.d762b8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":684.5605239868164,"y":219.11613845825195,"z":"76e70bd1.ad60c4","wires":[["7f1082ca.4c62bc"]]},{"id":"7f1082ca.4c62bc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"`'vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id + ' not found in SDNC'`\"/>","comments":"","x":837.6514663696289,"y":219.02524185180664,"z":"76e70bd1.ad60c4","wires":[]},{"id":"c0d479cd.b79348","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":392.4444274902344,"y":595.0555191040039,"z":"76e70bd1.ad60c4","wires":[]},{"id":"caf23eef.2d6a7","type":"switchNode","name":"switch: order-status = PendingUpdate","xml":"<switch test=\"`$vnf-instance-service-data.oper-status.order-status == PendingUpdate`\">","comments":"","outputs":1,"x":962.9242324829102,"y":270.4798011779785,"z":"76e70bd1.ad60c4","wires":[["3d49c074.c55d4"]]},{"id":"3d49c074.c55d4","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1205.3786392211914,"y":270.4797706604004,"z":"76e70bd1.ad60c4","wires":[["9112f66c.accf18"]]},{"id":"26b3d7a2.652ae8","type":"comment","name":"once success is returned, operational-data gets saved","info":"","comments":"","x":738.8510208129883,"y":555.9898414611816,"z":"76e70bd1.ad60c4","wires":[]},{"id":"34cb709c.929ed","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-order-status\" value=\"`$vnf-instance-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":456.4469909667969,"y":323.00257110595703,"z":"76e70bd1.ad60c4","wires":[[]]},{"id":"1c5ee2ad.503e0d","type":"comment","name":"request-action = VNFActivateRequest, svc-action = activate","info":"","comments":"","x":718.9443893432617,"y":78.22221183776855,"z":"76e70bd1.ad60c4","wires":[]},{"id":"b8342ba1.d183f8","type":"set","name":"set: service-data = input","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.\" value=\"vnf-instance-topology-operation-input.\" />","comments":"","outputs":1,"x":420.33331298828125,"y":509.4444351196289,"z":"76e70bd1.ad60c4","wires":[[]]},{"id":"a8c37c05.42ceb","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-action\" value=\"`$vnf-instance-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":390.33331298828125,"y":421.4444351196289,"z":"76e70bd1.ad60c4","wires":[[]]},{"id":"9d73784e.83dda8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":778.7460327148438,"y":464.43293380737305,"z":"76e70bd1.ad60c4","wires":[["852e8aa2.d5c6c8"]]},{"id":"852e8aa2.d5c6c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while updating vnf-instance orchestration-status in AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\"/>","comments":"","x":961.8889617919922,"y":464.43300437927246,"z":"76e70bd1.ad60c4","wires":[]},{"id":"5f34e90c.952258","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":414.65076446533203,"y":553.1586799621582,"z":"76e70bd1.ad60c4","wires":[[]]},{"id":"716ea0ca.5337a","type":"save","name":"update AnAI - vnf-instance.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" >\n<parameter name=\"orchestration-status\" value=\"active\" />","comments":"","outputs":1,"x":491.22217559814453,"y":464.44443130493164,"z":"76e70bd1.ad60c4","wires":[["9d73784e.83dda8","d85d5574.f399a8"]]},{"id":"d85d5574.f399a8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":785.9721984863281,"y":507.1944456100464,"z":"76e70bd1.ad60c4","wires":[["852e8aa2.d5c6c8"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign-vnf-networks.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign-vnf-networks.json
new file mode 100644
index 0000000..577b751
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign-vnf-networks.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"2febef4a.283f9","type":"dgstart","name":"DGSTART","outputs":1,"x":142.85714721679688,"y":42.85714340209961,"z":"705ac336.10121c","wires":[["87e9f370.e9afd"]]},{"id":"87e9f370.e9afd","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":308.0238037109375,"y":43.0238151550293,"z":"705ac336.10121c","wires":[["93f9836d.c6161"]]},{"id":"93f9836d.c6161","type":"method","name":"method vnf-instance-topology-assign-vnf-networks","xml":"<method rpc='vnf-instance-topology-assign-vnf-networks' mode='sync'>\n","comments":"","outputs":1,"x":271.2738265991211,"y":97.27380752563477,"z":"705ac336.10121c","wires":[["32b0dfaf.61c42"]]},{"id":"32b0dfaf.61c42","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":223.60714721679688,"y":146.1071434020996,"z":"705ac336.10121c","wires":[["469e6730.fe15a8","86c0733.b9d429","5927f9c6.e24288","62bcb573.1f631c","c6c3193c.d163d8","c5892e4d.2c5e1","675a0354.e31bbc"]]},{"id":"5c01cf7e.f97ba","type":"switchNode","name":"switch test: INPUT network-id = NULL or 0","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id == '' or $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id == '0'`\">","comments":"","outputs":1,"x":804.0494194030762,"y":698.0935974121094,"z":"705ac336.10121c","wires":[["f75a2a6c.ecff98","35d46151.35aa0e"]]},{"id":"f75a2a6c.ecff98","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1093.4129066467285,"y":741.2754673957825,"z":"705ac336.10121c","wires":[["8e53b29.404cb5"]]},{"id":"8e53b29.404cb5","type":"switchNode","name":"switch : INPUT network-name = NULL","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name == '' or $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name == '0'`\">","comments":"","outputs":1,"x":1331.1950073242188,"y":741.1194458007812,"z":"705ac336.10121c","wires":[["8819d24.34e3e3","4bb47302.d72c4c"]]},{"id":"35d46151.35aa0e","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1093.433193206787,"y":697.9824938774109,"z":"705ac336.10121c","wires":[["6dd56a34.8d5b54"]]},{"id":"8819d24.34e3e3","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1569.3869590759277,"y":780.6749277114868,"z":"705ac336.10121c","wires":[["7b1b2acb.ddf7c4"]]},{"id":"6dd56a34.8d5b54","type":"save","name":"get AnAI - l3-network by id","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id\" \n\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1294.6553077697754,"y":697.9826617240906,"z":"705ac336.10121c","wires":[["44c56e39.3f0a8","51e53ee8.48261"]]},{"id":"44c56e39.3f0a8","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1497.599998474121,"y":697.5381102561951,"z":"705ac336.10121c","wires":[["dff64318.2bcdb"]]},{"id":"19517c79.8ad8d4","type":"for","name":"for i : INPUT vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks_length`\">","comments":"","outputs":1,"x":582.3432960510254,"y":554.5862808227539,"z":"705ac336.10121c","wires":[["bdc05789.7d3538"]]},{"id":"7b1b2acb.ddf7c4","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name\" \n\tpfx=\"tmp.AnAI.l3network\">\n\n","comments":"","outputs":1,"x":1779.8889617919922,"y":780.4167194366455,"z":"705ac336.10121c","wires":[["2e045a8b.0e6f96","8351920.613ce7"]]},{"id":"2e045a8b.0e6f96","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2001.1389617919922,"y":780.6667804718018,"z":"705ac336.10121c","wires":[["dff64318.2bcdb"]]},{"id":"7b66b18d.2f326","type":"set","name":"initialize tmp.usePreload = 1 and tmp.AAI.l3network","xml":"<set>\n<parameter name='tmp.usePreload' value='1' />\n<parameter name='tmp.AnAI.l3network.' value='' />\n","comments":"","outputs":1,"x":513.8369369506836,"y":468.31164169311523,"z":"705ac336.10121c","wires":[[]]},{"id":"43e60079.dc59f","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":173.7711410522461,"y":468.09618759155273,"z":"705ac336.10121c","wires":[["7b66b18d.2f326","47109692.f76808","30733a26.180766"]]},{"id":"469e6730.fe15a8","type":"for","name":"for j : PRELOAD vnf-networks","xml":"<for index=\"j\" start=\"0\" end=\"`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":307.99608612060547,"y":381.35712814331055,"z":"705ac336.10121c","wires":[["43e60079.dc59f"]]},{"id":"47109692.f76808","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":349.7234115600586,"y":554.5161724090576,"z":"705ac336.10121c","wires":[["19517c79.8ad8d4","7c927d87.7b5564"]]},{"id":"bdc05789.7d3538","type":"switchNode","name":"switch : PRELOAD network-role = INPUT","xml":"<switch test=\"`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-role == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-role`\">","comments":"","outputs":1,"x":891.7234764099121,"y":553.879843711853,"z":"705ac336.10121c","wires":[["c183486b.a5ef78"]]},{"id":"c183486b.a5ef78","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1142.5189018249512,"y":554.1754860877991,"z":"705ac336.10121c","wires":[["54abbc42.575c24"]]},{"id":"54abbc42.575c24","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":500.80447006225586,"y":654.9546413421631,"z":"705ac336.10121c","wires":[["5c01cf7e.f97ba","210d0a9b.6fcbb6","90f51ab8.31eb88"]]},{"id":"210d0a9b.6fcbb6","type":"set","name":"set tmp.usePreload = 0","xml":"<set>\n<parameter name='tmp.usePreload' value='0' />\n","comments":"","outputs":1,"x":745.1681022644043,"y":654.8637704849243,"z":"705ac336.10121c","wires":[[]]},{"id":"4bb47302.d72c4c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1568.9448928833008,"y":741.3809204101562,"z":"705ac336.10121c","wires":[["dff64318.2bcdb"]]},{"id":"90f51ab8.31eb88","type":"switchNode","name":"switch : tmp.usePreload= 0","xml":"<switch test=\"`$tmp.usePreload == 0`\">","comments":"","outputs":1,"x":753.667610168457,"y":972.085075378418,"z":"705ac336.10121c","wires":[["d1d0fb28.49edd8"]]},{"id":"d1d0fb28.49edd8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":960.6674880981445,"y":972.0851974487305,"z":"705ac336.10121c","wires":[["5b8f0229.494b7c"]]},{"id":"95ee9ed6.51075","type":"for","name":"for k : SERVICE_DATA vnf-networks","xml":"<for index=\"k\" start=\"0\" end=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":834.2347030639648,"y":1170.0867052078247,"z":"705ac336.10121c","wires":[["5e01584.eae73a8"]]},{"id":"5e01584.eae73a8","type":"switchNode","name":"switch: SERVICE-DATA network-role = INPUT","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-role`\">","comments":"","outputs":1,"x":1195.198112487793,"y":1169.1859922409058,"z":"705ac336.10121c","wires":[["c658b72e.64fd88"]]},{"id":"c658b72e.64fd88","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1474.743522644043,"y":1169.2316465377808,"z":"705ac336.10121c","wires":[["55115b00.d54c94"]]},{"id":"7c927d87.7b5564","type":"switchNode","name":"switch: tmp.usePreload= 1","xml":"<switch test=\"`$tmp.usePreload == 1`\">","comments":"","outputs":1,"x":577.5398750305176,"y":1811.4806985855103,"z":"705ac336.10121c","wires":[["cb0441d2.c823a"]]},{"id":"cb0441d2.c823a","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":785.5714530944824,"y":1811.220950126648,"z":"705ac336.10121c","wires":[["7eabce1e.f927a"]]},{"id":"dff64318.2bcdb","type":"set","name":"set tmp.usePreload = 1","xml":"<set>\n<parameter name='tmp.usePreload' value='1' />\n","comments":"","outputs":1,"x":1763.5529861450195,"y":882.1399440765381,"z":"705ac336.10121c","wires":[[]]},{"id":"e2672de2.41ec7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying AnAI for l3-network with network-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id`\" />\n","comments":"","x":1648.5237986246743,"y":656.6626608106826,"z":"705ac336.10121c","wires":[]},{"id":"51e53ee8.48261","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1491.3015764024522,"y":656.6626608106826,"z":"705ac336.10121c","wires":[["e2672de2.41ec7"]]},{"id":"e8382ace.043858","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying AnAI for l3-network with network-name = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name`\" />\n","comments":"","x":2149.634719848633,"y":738.8848762512207,"z":"705ac336.10121c","wires":[]},{"id":"8351920.613ce7","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1992.4124976264102,"y":738.8848762512207,"z":"705ac336.10121c","wires":[["e8382ace.043858"]]},{"id":"96febb32.ff1698","type":"set","name":"set: SERVICE_DATA vnf-networks = AAI DATA","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-name\" value=\"`$tmp.AnAI.l3network.network-name`\" />\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].neutron-id\" value=\"`$tmp.AnAI.l3network.neutron-network-id`\" />\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn\" value=\"`$tmp.AnAI.l3network.contrail-network-fqdn`\" />\n","comments":"","outputs":1,"x":1953.2167358398438,"y":1168.1661186218262,"z":"705ac336.10121c","wires":[[]]},{"id":"b430a14b.edbac","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1423.1784019470215,"y":1811.1015844345093,"z":"705ac336.10121c","wires":[["5e981db0.af4e04"]]},{"id":"bfa6a0be.7489","type":"set","name":"set: SERVICE_DATA vnf-networks = AAI DATA","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-name\" value=\"`$tmp.AnAI.l3network.network-name`\" />\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].neutron-id\" value=\"`$tmp.AnAI.l3network.neutron-network-id`\" />\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn\" value=\"`$tmp.AnAI.l3network.contrail-network-fqdn`\" />\n\n","comments":"","outputs":1,"x":2097.6109352111816,"y":2083.8444538116455,"z":"705ac336.10121c","wires":[[]]},{"id":"ab894ac3.a9bab8","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-name\" \n\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1200.0714225769043,"y":1811.3675241470337,"z":"705ac336.10121c","wires":[["b430a14b.edbac","c1f93466.7c2698","fd1394ec.ad0d08"]]},{"id":"7eabce1e.f927a","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":941.5829925537109,"y":1811.6664876937866,"z":"705ac336.10121c","wires":[["ab894ac3.a9bab8","74f2ba7a.8cc2c4","1538dd04.c879b3"]]},{"id":"eb0f970.2983468","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying AnAI for l3-network with network-name = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$j].network-name`\" />\n","comments":"","x":1570.4642372131348,"y":1848.964162826538,"z":"705ac336.10121c","wires":[]},{"id":"c1f93466.7c2698","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1415.2420149909126,"y":1848.964162826538,"z":"705ac336.10121c","wires":[["eb0f970.2983468"]]},{"id":"5e981db0.af4e04","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'PRELOAD network-name = ' + $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' not found in AnAI'`\" />\n","comments":"","x":1589.464267730713,"y":1810.9641876220703,"z":"705ac336.10121c","wires":[]},{"id":"86c0733.b9d429","type":"switchNode","name":"switch ...PRELOAD vnf-networks[]","xml":"<switch test=\"`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":487.60713958740234,"y":325.6071472167969,"z":"705ac336.10121c","wires":[["6be8fc2.6fa3c04"]]},{"id":"6be8fc2.6fa3c04","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":715.0516128540039,"y":325.1348571777344,"z":"705ac336.10121c","wires":[["71d9fad7.21cca4"]]},{"id":"71d9fad7.21cca4","type":"set","name":"set PRELOAD vnf-networks[] = 0","xml":"<set>\n<parameter name = \"vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length\" value=\"0\" />\n","comments":"","outputs":1,"x":936.6072218153213,"y":325.13487784067775,"z":"705ac336.10121c","wires":[[]]},{"id":"30733a26.180766","type":"switchNode","name":"switch ...INPUT vnf-networks[]","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks_length`\">","comments":"","outputs":1,"x":403.1071548461914,"y":509.3571252822876,"z":"705ac336.10121c","wires":[["65ed996e.186c98"]]},{"id":"65ed996e.186c98","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":626.5516052246094,"y":509.13486099243164,"z":"705ac336.10121c","wires":[["62ba63ce.b4775c"]]},{"id":"62ba63ce.b4775c","type":"set","name":"set INPUT vnf-networks_length = 0","xml":"<set>\n<parameter name='vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks_length' value='0' />\n","comments":"","outputs":1,"x":859.1072141859268,"y":509.134881655375,"z":"705ac336.10121c","wires":[[]]},{"id":"d7d2ccb7.b7852","type":"comment","name":"For each preload network, see if there is an override in input","info":"","comments":"","x":777.218376159668,"y":417.57937240600586,"z":"705ac336.10121c","wires":[]},{"id":"cb5c7a6.d166888","type":"switchNode","name":"switch: SERVICE-DATA network-role = PRELOAD","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-role`\">","comments":"","outputs":1,"x":1348.2142601013184,"y":2083.714325904846,"z":"705ac336.10121c","wires":[["44615613.416bf8"]]},{"id":"44615613.416bf8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1632.6169509887695,"y":2083.5813541412354,"z":"705ac336.10121c","wires":[["9eb668ef.2179a8"]]},{"id":"74f2ba7a.8cc2c4","type":"for","name":"for k : SERVICE_DATA vnf-networks","xml":"<for index=\"k\" start=\"0\" end=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":1217.9643058776855,"y":2030.9642038345337,"z":"705ac336.10121c","wires":[["cb5c7a6.d166888"]]},{"id":"24c39fed.a3597","type":"comment","name":"CALLED BY vnf-instance-topology-assign AND vnf-instance-topology-changeassign","info":"","comments":"","x":829.273796081543,"y":88.21825790405273,"z":"705ac336.10121c","wires":[]},{"id":"62bcb573.1f631c","type":"set","name":"set: service-data =+ input","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.\" value=\"vnf-instance-topology-operation-input.\" />","comments":"","outputs":1,"x":459.384916305542,"y":234.55158233642578,"z":"705ac336.10121c","wires":[[]]},{"id":"5927f9c6.e24288","type":"set","name":"set: service-data = preload-data","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.\" value=\"vnf-instance-preload-data.\" />","comments":"","outputs":1,"x":479.28903007507324,"y":192.69806671142578,"z":"705ac336.10121c","wires":[[]]},{"id":"c6c3193c.d163d8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":416.6428451538086,"y":2581.464366912842,"z":"705ac336.10121c","wires":[]},{"id":"c5892e4d.2c5e1","type":"switchNode","name":"switch: preload order-status = PendingAssignment","xml":"<switch test=\"`$vnf-instance-preload-data.oper-status.order-status == PendingAssignment`\">","comments":"","outputs":1,"x":536.3849258422852,"y":146.10714626312256,"z":"705ac336.10121c","wires":[["9e68561a.bf1958"]]},{"id":"934076d8.86ea48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid preload-data order status'/>","comments":"","x":953.3241691589355,"y":145.80415630340576,"z":"705ac336.10121c","wires":[]},{"id":"9e68561a.bf1958","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":803.9910583496094,"y":145.80408191680908,"z":"705ac336.10121c","wires":[["934076d8.86ea48"]]},{"id":"675a0354.e31bbc","type":"set","name":"set: vnf-iinstance-d","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vnf-instance-id\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\"/>","comments":"","outputs":1,"x":439.70642852783203,"y":279.04762077331543,"z":"705ac336.10121c","wires":[[]]},{"id":"2745e73.af9a018","type":"switchNode","name":"switch: tmp.AnAI.l3network.network-id == null","xml":"<switch test=\"`$tmp.AnAI.l3network.network-id == ''`\">","comments":"","outputs":1,"x":1680.8571968078613,"y":1886.8571367263794,"z":"705ac336.10121c","wires":[["e35dc16c.c2c63"]]},{"id":"e35dc16c.c2c63","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":1943.1071968078613,"y":1886.8571367263794,"z":"705ac336.10121c","wires":[["6722f4ec.b60c2c"]]},{"id":"6722f4ec.b60c2c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying l3-network with network-name = ' + $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' , it is likely that there are more than one l3-newtork object with the same network-name in AnAI.'`\" />\n","comments":"","x":2097.1071968078613,"y":1887.3571367263794,"z":"705ac336.10121c","wires":[]},{"id":"fd1394ec.ad0d08","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1420.8571815490723,"y":1886.607117652893,"z":"705ac336.10121c","wires":[["2745e73.af9a018"]]},{"id":"1538dd04.c879b3","type":"switchNode","name":"switch: vnf-instance-service-data...vnf-networks_length","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":1273.5357780456543,"y":1981.7857370376587,"z":"705ac336.10121c","wires":[["acdd927c.05908"]]},{"id":"acdd927c.05908","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1561.0357704162598,"y":1981.7857370376587,"z":"705ac336.10121c","wires":[["15d7e90e.01ef77"]]},{"id":"15d7e90e.01ef77","type":"switchNode","name":"set: vnf-instance-service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1859.7857704162598,"y":1981.7857370376587,"z":"705ac336.10121c","wires":[[]]},{"id":"2dbaf99b.74fa26","type":"switchNode","name":"switch: SERVICE-DATA sbunet-id == NULL","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id == ''`\">","comments":"","outputs":1,"x":2083.571506500244,"y":2135.749973297119,"z":"705ac336.10121c","wires":[["72edf3ef.16637c"]]},{"id":"9eb668ef.2179a8","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":1790.5714988708496,"y":2083.749973297119,"z":"705ac336.10121c","wires":[["bfa6a0be.7489","2dbaf99b.74fa26","ceefaa2e.4bf518"]]},{"id":"72edf3ef.16637c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2339.8214721679688,"y":2135.499952316284,"z":"705ac336.10121c","wires":[["bfc8e1d2.0b5d2"]]},{"id":"bfc8e1d2.0b5d2","type":"switchNode","name":"switch: SERVICE-DATA sbunet-name != NULL","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-name != ''`\">","comments":"","outputs":1,"x":2166.1666564941406,"y":2195.6547813415527,"z":"705ac336.10121c","wires":[["fd2de09f.959e6"]]},{"id":"fd2de09f.959e6","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2431.4166221618652,"y":2195.404760360718,"z":"705ac336.10121c","wires":[["2cb0803c.c7bc8"]]},{"id":"4a5f9fe5.05752","type":"set","name":"set: service-data = AnAI - subnet-id ","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3187.6786193847656,"y":2318.523801803589,"z":"705ac336.10121c","wires":[[]]},{"id":"2cb0803c.c7bc8","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2284.892852783203,"y":2256.5952796936035,"z":"705ac336.10121c","wires":[["d4ebe86e.15b258"]]},{"id":"4954faeb.6cfbf4","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2322.6070709228516,"y":2319.9522819519043,"z":"705ac336.10121c","wires":[["90d30b64.06a4e8"]]},{"id":"90d30b64.06a4e8","type":"switchNode","name":"switch: AnAI == service-data - subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-name`\">","comments":"","outputs":1,"x":2695.3570251464844,"y":2319.202365875244,"z":"705ac336.10121c","wires":[["2e058631.959aea"]]},{"id":"2e058631.959aea","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2953.7597160339355,"y":2319.0693941116333,"z":"705ac336.10121c","wires":[["4a5f9fe5.05752"]]},{"id":"d4ebe86e.15b258","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2570.2143363952637,"y":2256.1786704063416,"z":"705ac336.10121c","wires":[["4954faeb.6cfbf4"]]},{"id":"59ecf05b.2d584","type":"switchNode","name":"switch: SERVICE-DATA ipv6-sbunet-name != NULL","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name != ''`\">","comments":"","outputs":1,"x":2179.9881286621094,"y":2455.4762382507324,"z":"705ac336.10121c","wires":[["11682b08.bfbad5"]]},{"id":"11682b08.bfbad5","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2465.238094329834,"y":2455.2262172698975,"z":"705ac336.10121c","wires":[["3e72b6d2.9b778a"]]},{"id":"c982fd9a.aac94","type":"set","name":"set: service-data = AnAI - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3211.499984741211,"y":2570.4882202148438,"z":"705ac336.10121c","wires":[[]]},{"id":"3e72b6d2.9b778a","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2277.285858154297,"y":2514.2738094329834,"z":"705ac336.10121c","wires":[["3cfbefe2.89e85"]]},{"id":"30ffaee.a267252","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2346.428436279297,"y":2571.916700363159,"z":"705ac336.10121c","wires":[["4c7bf8f0.8c87f8"]]},{"id":"4c7bf8f0.8c87f8","type":"switchNode","name":"switch: AnAI == service-data - ipv6-subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name`\">","comments":"","outputs":1,"x":2719.1783905029297,"y":2571.166784286499,"z":"705ac336.10121c","wires":[["9622186b.306c98"]]},{"id":"9622186b.306c98","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2977.581081390381,"y":2571.033812522888,"z":"705ac336.10121c","wires":[["c982fd9a.aac94"]]},{"id":"3cfbefe2.89e85","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2562.6073417663574,"y":2513.8572001457214,"z":"705ac336.10121c","wires":[["30ffaee.a267252"]]},{"id":"12a1ac30.b20924","type":"comment","name":"Use INPUT vnf-networks to override preload","info":"","comments":"","x":919.8214416503906,"y":921.9643211364746,"z":"705ac336.10121c","wires":[]},{"id":"55115b00.d54c94","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1635.1701431274414,"y":1169.0481853485107,"z":"705ac336.10121c","wires":[["3532fb1.4b9fd04","f20e0105.06607","96febb32.ff1698"]]},{"id":"ba99d311.ff42e","type":"comment","name":"Use INPUT vnf-networks to override preload","info":"","comments":"","x":940.5271911621094,"y":1060.5124225616455,"z":"705ac336.10121c","wires":[]},{"id":"7e2271f2.8e943","type":"switchNode","name":"switch: INPUT sbunet-name != NULL","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-name != ''`\">","comments":"","outputs":1,"x":2418.146469116211,"y":1276.6551208496094,"z":"705ac336.10121c","wires":[["bce7ec0c.26ab4"]]},{"id":"bce7ec0c.26ab4","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2655.3964347839355,"y":1276.4050998687744,"z":"705ac336.10121c","wires":[["5ecde9ff.9bcd68"]]},{"id":"1b75f440.6ce07c","type":"set","name":"set: service-data = AnAI - subnet-id ","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3394.658447265625,"y":1389.952838897705,"z":"705ac336.10121c","wires":[[]]},{"id":"5ecde9ff.9bcd68","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2521.158432006836,"y":1326.9527263641357,"z":"705ac336.10121c","wires":[["c5624ea.4db5bb"]]},{"id":"94a26b5d.774068","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2529.586898803711,"y":1391.3813190460205,"z":"705ac336.10121c","wires":[["2d6ec25.ba7e33e"]]},{"id":"2d6ec25.ba7e33e","type":"switchNode","name":"switch: AnAI == INPUT - subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-name`\">","comments":"","outputs":1,"x":2902.3368530273438,"y":1390.6314029693604,"z":"705ac336.10121c","wires":[["81fef1e6.a152e"]]},{"id":"81fef1e6.a152e","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3160.739543914795,"y":1390.4984312057495,"z":"705ac336.10121c","wires":[["1b75f440.6ce07c"]]},{"id":"c5624ea.4db5bb","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2806.4799156188965,"y":1326.5361170768738,"z":"705ac336.10121c","wires":[["94a26b5d.774068"]]},{"id":"f20e0105.06607","type":"switchNode","name":"switch: INPUT sbunet-id != NULL","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-id != ''`\">","comments":"","outputs":1,"x":1911.7179145812988,"y":1232.8933010101318,"z":"705ac336.10121c","wires":[["d4afa68e.bfc558","98804ce8.a13a6"]]},{"id":"abd5ea69.b13cb8","type":"set","name":"set: data-data = INPUT - subnet-id ","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-id`\" />","comments":"","outputs":1,"x":2409.9679107666016,"y":1233.1433029174805,"z":"705ac336.10121c","wires":[[]]},{"id":"d4afa68e.bfc558","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2167.9678802490234,"y":1232.6432800292969,"z":"705ac336.10121c","wires":[["abd5ea69.b13cb8"]]},{"id":"98804ce8.a13a6","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2169.2179222106934,"y":1276.6433010101318,"z":"705ac336.10121c","wires":[["7e2271f2.8e943"]]},{"id":"1d02e4c9.16f89b","type":"switchNode","name":"switch: INPUT ipv6-sbunet-name != NULL","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-name != ''`\">","comments":"","outputs":1,"x":2426.420120239258,"y":1504.798168182373,"z":"705ac336.10121c","wires":[["560491e4.841a3"]]},{"id":"560491e4.841a3","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2673.6700859069824,"y":1504.548147201538,"z":"705ac336.10121c","wires":[["ad4e972e.25b658"]]},{"id":"dfb01c55.64a29","type":"set","name":"set: service-data = AnAI - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3402.932098388672,"y":1618.0958862304688,"z":"705ac336.10121c","wires":[[]]},{"id":"ad4e972e.25b658","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2529.432083129883,"y":1555.0957736968994,"z":"705ac336.10121c","wires":[["c4bb2d17.a6dd2"]]},{"id":"b53303f1.98bac","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2537.860549926758,"y":1619.5243663787842,"z":"705ac336.10121c","wires":[["8b2e7716.5aaf38"]]},{"id":"8b2e7716.5aaf38","type":"switchNode","name":"switch: AnAI == INPUT - ipv6-subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-name`\">","comments":"","outputs":1,"x":2910.6105041503906,"y":1618.774450302124,"z":"705ac336.10121c","wires":[["e8ec1e1f.57f23"]]},{"id":"e8ec1e1f.57f23","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3169.013195037842,"y":1618.6414785385132,"z":"705ac336.10121c","wires":[["dfb01c55.64a29"]]},{"id":"c4bb2d17.a6dd2","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2814.7535667419434,"y":1554.6791644096375,"z":"705ac336.10121c","wires":[["b53303f1.98bac"]]},{"id":"3532fb1.4b9fd04","type":"switchNode","name":"switch: INPUT ipv6-sbunet-id != NULL","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-id != ''`\">","comments":"","outputs":1,"x":1919.9915657043457,"y":1461.0363483428955,"z":"705ac336.10121c","wires":[["843a8b19.b1c348","8591ce30.50334"]]},{"id":"f7ba6e82.4320e","type":"set","name":"set: service-data = INPUT - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-id`\" />","comments":"","outputs":1,"x":2427.2415618896484,"y":1461.2863502502441,"z":"705ac336.10121c","wires":[[]]},{"id":"843a8b19.b1c348","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2176.2415313720703,"y":1460.7863273620605,"z":"705ac336.10121c","wires":[["f7ba6e82.4320e"]]},{"id":"8591ce30.50334","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2177.4915733337402,"y":1504.7863483428955,"z":"705ac336.10121c","wires":[["1d02e4c9.16f89b"]]},{"id":"10ab9be3.5754a4","type":"comment","name":"Use Preload Data","info":"","comments":"","x":608.4915390014648,"y":1743.5838871002197,"z":"705ac336.10121c","wires":[]},{"id":"5b8f0229.494b7c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":576.0629501342773,"y":1066.4767723083496,"z":"705ac336.10121c","wires":[["c5e10bb0.819f28","95ee9ed6.51075"]]},{"id":"c5e10bb0.819f28","type":"switchNode","name":"switch: vnf-instance-service-data...vnf-networks_length","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":891.2500305175781,"y":1120.535732269287,"z":"705ac336.10121c","wires":[["6761e206.68fe2c"]]},{"id":"6761e206.68fe2c","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1178.7500228881836,"y":1120.535732269287,"z":"705ac336.10121c","wires":[["380d182.b48fce8"]]},{"id":"380d182.b48fce8","type":"switchNode","name":"set: vnf-instance-service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1477.5000228881836,"y":1120.535732269287,"z":"705ac336.10121c","wires":[[]]},{"id":"ceefaa2e.4bf518","type":"switchNode","name":"switch: SERVICE-DATA ipv6-sbunet-id == NULL","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id == ''`\">","comments":"","outputs":1,"x":2094.3213806152344,"y":2402.535810470581,"z":"705ac336.10121c","wires":[["c1f79dd7.d0fc5"]]},{"id":"c1f79dd7.d0fc5","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2378.571346282959,"y":2402.285789489746,"z":"705ac336.10121c","wires":[["59ecf05b.2d584"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign.json
new file mode 100644
index 0000000..cccd771
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"2cedcd37.fe8ab2","type":"dgstart","name":"DGSTART","outputs":1,"x":174.57137298583984,"y":71.4285888671875,"z":"cee53bf1.d63798","wires":[["d0b308e8.cdee18"]]},{"id":"d0b308e8.cdee18","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":339.73802947998047,"y":71.59526062011719,"z":"cee53bf1.d63798","wires":[["7508dd9c.f543d4"]]},{"id":"7508dd9c.f543d4","type":"method","name":"method vnf-instance-topology-assign","xml":"<method rpc='vnf-instance-topology-assign' mode='sync'>\n","comments":"","outputs":1,"x":289.16661834716797,"y":118.59525680541992,"z":"cee53bf1.d63798","wires":[["df9a3175.c6c8d"]]},{"id":"df9a3175.c6c8d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":235.07138061523438,"y":174.4285888671875,"z":"cee53bf1.d63798","wires":[["da24c094.d6258","7e403afc.ca86f4","db6cf5b9.be6428","41693571.36e60c","8723af06.8912c","4e11edf0.dd1024","33375972.3ee9b6","88fc01a3.bf7a3"]]},{"id":"da24c094.d6258","type":"set","name":"set: order-status = PendingCreate","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.order-status\" value=\"PendingCreate\"/>","comments":"","outputs":1,"x":502.96221923828125,"y":595.6208057403564,"z":"cee53bf1.d63798","wires":[[]]},{"id":"7e403afc.ca86f4","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":442.1050567626953,"y":681.3254375457764,"z":"cee53bf1.d63798","wires":[]},{"id":"c1bd5bbc.d08278","type":"comment","name":"request-action = VNFActivateRequest","info":"","comments":"","x":681.738037109375,"y":91.53970336914062,"z":"cee53bf1.d63798","wires":[]},{"id":"2983e427.e89c6c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":820.0119781494141,"y":546.6433296203613,"z":"cee53bf1.d63798","wires":[["6e9f230e.fe328c"]]},{"id":"5785fdd6.aeaed4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"An error occurred while updating vnf-instance orchestration-status in AnAI\"/>","comments":"","x":1204.1549072265625,"y":546.6434001922607,"z":"cee53bf1.d63798","wires":[]},{"id":"67bf7768.b620d8","type":"save","name":"save relationship: l3-network","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf:relationship-list\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" >\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />","comments":"","outputs":1,"x":822.3174667358398,"y":389.54354763031006,"z":"cee53bf1.d63798","wires":[["a997a0b4.695d1"]]},{"id":"a997a0b4.695d1","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1034.9617385864258,"y":389.59056186676025,"z":"cee53bf1.d63798","wires":[["aea10b11.934cb8"]]},{"id":"db6cf5b9.be6428","type":"for","name":"for i : SERVICE_DATA vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":507.96427154541016,"y":389.51202869415283,"z":"cee53bf1.d63798","wires":[["67bf7768.b620d8"]]},{"id":"12eea8c7.978027","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while saving generic-vnf l3-network relationship in AnAI with network-id = ' + $vnf-instance.service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id`\"/>","comments":"","x":1204.0118026733398,"y":499.60688877105713,"z":"cee53bf1.d63798","wires":[]},{"id":"aea10b11.934cb8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":993.726188659668,"y":451.8927421569824,"z":"cee53bf1.d63798","wires":[["98086e0f.3b64d","12eea8c7.978027"]]},{"id":"98086e0f.3b64d","type":"save","name":"delete vnf-instance: l3-network relationship","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf:relationship-list\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id \n\t\t\tAND related-to = l3-network\" >","comments":"","outputs":1,"x":1287.15478515625,"y":452.32148838043213,"z":"cee53bf1.d63798","wires":[[]]},{"id":"41693571.36e60c","type":"save","name":"update AnAI - vnf-instance.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" >\n\t<parameter name=\"orchestration-status\" value=\"pending-create\" />","comments":"","outputs":1,"x":544.4881210327148,"y":546.6548271179199,"z":"cee53bf1.d63798","wires":[["2983e427.e89c6c"]]},{"id":"6e9f230e.fe328c","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":978.4405517578125,"y":546.7500886917114,"z":"cee53bf1.d63798","wires":[["5785fdd6.aeaed4","98086e0f.3b64d"]]},{"id":"8723af06.8912c","type":"call","name":"call: vnf-instance-topology-assign-vnf-networks","xml":"<call module='VNF-API' rpc='vnf-instance-topology-assign-vnf-networks' mode='sync' >","comments":"","outputs":1,"x":542.2380599975586,"y":279.17860412597656,"z":"cee53bf1.d63798","wires":[[]]},{"id":"4e11edf0.dd1024","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":466.1428680419922,"y":640.7500247955322,"z":"cee53bf1.d63798","wires":[[]]},{"id":"33375972.3ee9b6","type":"switchNode","name":"switch ...SERVICE-DATA vnf-networks[]","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":520.321418762207,"y":329.7500343322754,"z":"cee53bf1.d63798","wires":[["de2601f5.481bb"]]},{"id":"de2601f5.481bb","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":766.7658920288086,"y":329.2777442932129,"z":"cee53bf1.d63798","wires":[["bc89e7d4.363558"]]},{"id":"bc89e7d4.363558","type":"set","name":"set SERVICE-DATA vnf-networks[] = 0","xml":"<set>\n<parameter name='vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length' value='0' />\n","comments":"","outputs":1,"x":1012.321500990126,"y":329.27776495615626,"z":"cee53bf1.d63798","wires":[[]]},{"id":"88fc01a3.bf7a3","type":"save","name":"GET AnAI - vnf-instance","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" \n\tpfx=\"tmp.AnAI.vnf-instance\" >","comments":"","outputs":1,"x":465.8213882446289,"y":173.92859935760498,"z":"cee53bf1.d63798","wires":[["544d350b.3602ec","2400a64e.19d90a"]]},{"id":"544d350b.3602ec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":666.8213882446289,"y":173.67859935760498,"z":"cee53bf1.d63798","wires":[["24cc16d1.2a783a"]]},{"id":"2400a64e.19d90a","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":674.321403503418,"y":213.67860984802246,"z":"cee53bf1.d63798","wires":[["e96a9f54.0d0cd"]]},{"id":"24cc16d1.2a783a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while querying generic-vnf from AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\"/>","comments":"","x":833.0713882446289,"y":173.42859935760498,"z":"cee53bf1.d63798","wires":[]},{"id":"e96a9f54.0d0cd","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'generic-vnf not found in AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\"/>","comments":"","x":834.5713882446289,"y":213.92859935760498,"z":"cee53bf1.d63798","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-changeassign.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-changeassign.json
new file mode 100644
index 0000000..4f58397
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-changeassign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"7e3f5196.e417c","type":"dgstart","name":"DGSTART","outputs":1,"x":111.42857360839844,"y":60.00000047683716,"z":"2cd468d5.f36418","wires":[["10b8528a.211b1d"]]},{"id":"10b8528a.211b1d","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":276.59523010253906,"y":60.166672229766846,"z":"2cd468d5.f36418","wires":[["59ca7427.fd225c"]]},{"id":"26eeb6ea.2961fa","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":188.92858123779297,"y":163.00000047683716,"z":"2cd468d5.f36418","wires":[["54500f80.f1dde","b5bb0315.e5f83","e31262f8.d4f67","b5584bc7.3ea138","7c0c33c0.92e28c","e091d3c2.33bc","ed72da5e.728ab8","579e919a.69eb7","d72290b6.13cfc","7b79f91e.a56ff8","723df9f0.89be98"]]},{"id":"54500f80.f1dde","type":"set","name":"set: order-status = PendingUpdate","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.order-status\" value=\"PendingUpdate\"/>","comments":"","outputs":1,"x":484.37345123291016,"y":887.4610962867737,"z":"2cd468d5.f36418","wires":[[]]},{"id":"b5bb0315.e5f83","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":422.6432647705078,"y":1022.2609753608704,"z":"2cd468d5.f36418","wires":[]},{"id":"e31262f8.d4f67","type":"switchNode","name":"switch: service-data order-status = Active","xml":"<switch test=\"`$vnf-instance-service-data.oper-status.order-status == Active`\">","comments":"","outputs":1,"x":495.2063674926758,"y":163.66666984558105,"z":"2cd468d5.f36418","wires":[["83191ca8.35ba"]]},{"id":"1634a3cd.229f0c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid service-data order status'/>","comments":"","x":899.9561920166016,"y":166.00004768371582,"z":"2cd468d5.f36418","wires":[]},{"id":"83191ca8.35ba","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":741.3729934692383,"y":163.24992179870605,"z":"2cd468d5.f36418","wires":[["1634a3cd.229f0c"]]},{"id":"59ca7427.fd225c","type":"method","name":"method vnf-instance-topology-changeassign","xml":"<method rpc='vnf-instance-topology-changeassign' mode='sync'>\n","comments":"","outputs":1,"x":233.65078735351562,"y":109.88889026641846,"z":"2cd468d5.f36418","wires":[["26eeb6ea.2961fa"]]},{"id":"b5584bc7.3ea138","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-action\" value=\"`$vnf-instance-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":422.3810043334961,"y":933.4761109352112,"z":"2cd468d5.f36418","wires":[[]]},{"id":"7c0c33c0.92e28c","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-order-status\" value=\"`$vnf-instance-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":486.3810043334961,"y":841.4761109352112,"z":"2cd468d5.f36418","wires":[[]]},{"id":"e091d3c2.33bc","type":"call","name":"call: vnf-instance-topology-assign-vnf-networks","xml":"<call module='VNF-API' rpc='vnf-instance-topology-assign-vnf-networks' mode='sync' >","comments":"","outputs":1,"x":514.3174896240234,"y":209.77777767181396,"z":"2cd468d5.f36418","wires":[[]]},{"id":"579e919a.69eb7","type":"save","name":"delete l3-network relationship","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf:relationship-list\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id \n\t\t\tAND related-to = l3-network\" >","comments":"","outputs":1,"x":461.793701171875,"y":348.7938804626465,"z":"2cd468d5.f36418","wires":[["12305cd8.a70123"]]},{"id":"6fb4fdc9.79da44","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while deleting existing l3-network relationship in AnAI with with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id + ' vnf-instance update FAILED.'`\"/>","comments":"","x":863.6506958007812,"y":349.07925033569336,"z":"2cd468d5.f36418","wires":[]},{"id":"ed72da5e.728ab8","type":"save","name":"get AnAI - vnf-instance","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" \n\tpfx=\"tmp.AnAI.vnf-instance\" >","comments":"","outputs":1,"x":440.0952453613281,"y":253.55556106567383,"z":"2cd468d5.f36418","wires":[["75c63427.b2a41c","58db1cd8.34dbb4"]]},{"id":"f6b122b7.d730f","type":"save","name":"save l3-network relationship","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf:relationship-list\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" >\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />","comments":"","outputs":1,"x":780.8290863037109,"y":438.56689071655273,"z":"2cd468d5.f36418","wires":[["f6bb7bd9.76bae8"]]},{"id":"f6bb7bd9.76bae8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":989.9733276367188,"y":438.61392307281494,"z":"2cd468d5.f36418","wires":[["93b5ee1e.221ca"]]},{"id":"d72290b6.13cfc","type":"for","name":"for i : SERVICE_DATA vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":481.0475311279297,"y":439.1068420410156,"z":"2cd468d5.f36418","wires":[["f6b122b7.d730f"]]},{"id":"5921c16b.5bd97","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to update vnf-instance l3-network relationship in AnAI. ' + $error-message`\"/>","comments":"","x":1335.166160583496,"y":818.8087882995605,"z":"2cd468d5.f36418","wires":[]},{"id":"93b5ee1e.221ca","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1152.9520797729492,"y":438.84466648101807,"z":"2cd468d5.f36418","wires":[["5921c16b.5bd97","76dff6e4.660dd8","625f1fb8.1f18e","efc90ef3.b0a7c","e4edafac.b2e1f"]]},{"id":"625f1fb8.1f18e","type":"save","name":"delete relationship: vf-module","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf:relationship-list\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id \n\t\t\tAND related-to = l3-network\" >","comments":"","outputs":1,"x":1392.4521484375,"y":486.7734680175781,"z":"2cd468d5.f36418","wires":[[]]},{"id":"e63dcfd2.1a0d3","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while querying generic-vnf from AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\"/>","comments":"","x":821.3808288574219,"y":254.26970291137695,"z":"2cd468d5.f36418","wires":[]},{"id":"12305cd8.a70123","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":677.6508178710938,"y":349.222225189209,"z":"2cd468d5.f36418","wires":[["6fb4fdc9.79da44"]]},{"id":"7b79f91e.a56ff8","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":444.00003814697266,"y":979.4286103248596,"z":"2cd468d5.f36418","wires":[[]]},{"id":"efc90ef3.b0a7c","type":"for","name":"for i : tmp.AnAI.vnf-instance.relationship","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.vnf-instance.relationship-list.relationship_length`\">","comments":"","outputs":1,"x":1425.4164733886719,"y":577.6667003631592,"z":"2cd468d5.f36418","wires":[["68e41057.68fce"]]},{"id":"68e41057.68fce","type":"switchNode","name":"switch: relationship.related-to","xml":"<switch test=\"`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].related-to`\">","comments":"","outputs":1,"x":1732.4164428710938,"y":577.3810205459595,"z":"2cd468d5.f36418","wires":[["ac07b174.2f5ff"]]},{"id":"ac07b174.2f5ff","type":"other","name":"l3-network","xml":"<outcome value='l3-network'>","comments":"","outputs":1,"x":1955.4164428710938,"y":577.3810205459595,"z":"2cd468d5.f36418","wires":[["87f7cb69.27eb38"]]},{"id":"a34ca0bd.1f59f","type":"for","name":"for j : tmp.AnAI.vnf-instance.relationship-data","xml":"<for index=\"j\" start=\"0\" end=\"`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length`\">","comments":"","outputs":1,"x":1866.6664123535156,"y":711.0238761901855,"z":"2cd468d5.f36418","wires":[["867a21f.18c04e"]]},{"id":"867a21f.18c04e","type":"save","name":"save l3-network relationship","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf:relationship-list\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" >\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data[$j].relationship-value`\" />","comments":"","outputs":1,"x":2224.2378692626953,"y":711.1667594909668,"z":"2cd468d5.f36418","wires":[["6dbc5217.3d6f5c","6f428706.86a3b8"]]},{"id":"6dbc5217.3d6f5c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2482.2378692626953,"y":711.1667594909668,"z":"2cd468d5.f36418","wires":[["6609cec3.9d5d2"]]},{"id":"75c63427.b2a41c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":629.9524192810059,"y":253.69842910766602,"z":"2cd468d5.f36418","wires":[["e63dcfd2.1a0d3"]]},{"id":"76dff6e4.660dd8","type":"set","name":"set error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`' | An error occurred while saving l3-network relationship with network-id = ' + $vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id + ' for vnf-instance with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\" />\n","comments":"","outputs":1,"x":1357.4522171020508,"y":438.7738342285156,"z":"2cd468d5.f36418","wires":[[]]},{"id":"6609cec3.9d5d2","type":"set","name":"set error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`$error-message + ' | An error occurred while during rollback of l3-network relationship for vnf-instance with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\" />\n","comments":"","outputs":1,"x":2680.2021865844727,"y":710.7024040222168,"z":"2cd468d5.f36418","wires":[[]]},{"id":"58db1cd8.34dbb4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":636.8452453613281,"y":296.1388740539551,"z":"2cd468d5.f36418","wires":[["e63dcfd2.1a0d3"]]},{"id":"6f428706.86a3b8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2492.5235748291016,"y":752.3452558517456,"z":"2cd468d5.f36418","wires":[["6609cec3.9d5d2"]]},{"id":"f7812e3d.246cd","type":"switchNode","name":"set: vnf-instance-service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1126.888816833496,"y":394.7142753601074,"z":"2cd468d5.f36418","wires":[[]]},{"id":"a018c1ed.7323c","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":828.1388168334961,"y":394.7142753601074,"z":"2cd468d5.f36418","wires":[["f7812e3d.246cd"]]},{"id":"723df9f0.89be98","type":"switchNode","name":"switch: vnf-instance-service-data...vnf-networks_length","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":540.6388244628906,"y":394.7142753601074,"z":"2cd468d5.f36418","wires":[["a018c1ed.7323c"]]},{"id":"b1a06442.5f4468","type":"switchNode","name":"set: tmp.AnAI.vnf-instance.relationship-list.relationship_length = 0","xml":"<set>\n\t<parameter name=\"tmp.AnAI.vnf-instance.relationship-list.relationship_length\" value = \"0\" />","comments":"","outputs":1,"x":2139.2380905151367,"y":533.6667156219482,"z":"2cd468d5.f36418","wires":[[]]},{"id":"cfeea49e.1a6548","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1821.4880905151367,"y":533.6667156219482,"z":"2cd468d5.f36418","wires":[["b1a06442.5f4468"]]},{"id":"e4edafac.b2e1f","type":"switchNode","name":"switch: tmp.AnAI.vnf-instance.relationship-list.relationship_length","xml":"<switch test=\"`$tmp.AnAI.vnf-instance.relationship-list.relationship_length`\">","comments":"","outputs":1,"x":1502.9880981445312,"y":533.6667156219482,"z":"2cd468d5.f36418","wires":[["cfeea49e.1a6548"]]},{"id":"87f7cb69.27eb38","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1571.250015258789,"y":663.7500133514404,"z":"2cd468d5.f36418","wires":[["baf72e9.09de9d","a34ca0bd.1f59f"]]},{"id":"baf72e9.09de9d","type":"switchNode","name":"switch: tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length","xml":"<switch test=\"`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length`\">","comments":"","outputs":1,"x":1990.7500228881836,"y":664.0000171661377,"z":"2cd468d5.f36418","wires":[["ddf26f89.730fa"]]},{"id":"ddf26f89.730fa","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2367.250015258789,"y":664.0000171661377,"z":"2cd468d5.f36418","wires":[["a4584fcd.7e598"]]},{"id":"a4584fcd.7e598","type":"switchNode","name":"set: tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length = 0","xml":"<set>\n\t<parameter name=\"tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length\" value = \"0\" />","comments":"","outputs":1,"x":2752.000015258789,"y":664.0000171661377,"z":"2cd468d5.f36418","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-delete.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-delete.json
new file mode 100644
index 0000000..edca37e
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-delete.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"892394b6.5a0068","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":394.4444274902344,"y":448.305570602417,"z":"bae6c09b.ec173","wires":[]},{"id":"ae2cbfc2.b3e0d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":171.44437408447266,"y":147.44444274902344,"z":"bae6c09b.ec173","wires":[["8dac86ee.e1bed8","892394b6.5a0068","3d06c980.f160e6","d3da4ebd.718d2","e25b96d5.e6f508","da9108f7.df52c8","ed7cb1e2.2fa6d","99637329.93ae"]]},{"id":"8dac86ee.e1bed8","type":"set","name":"set: order-status = Deleted","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.order-status\" value=\"Deleted\"/>","comments":"","outputs":1,"x":435.4444274902344,"y":275.305570602417,"z":"bae6c09b.ec173","wires":[[]]},{"id":"24188683.531f4a","type":"method","name":"method vnf-instance-topology-delete","xml":"<method rpc='vnf-instance-topology-delete' mode='sync'>\n","comments":"","outputs":1,"x":203.1110610961914,"y":96.6111068725586,"z":"bae6c09b.ec173","wires":[["ae2cbfc2.b3e0d"]]},{"id":"2d805b52.c5e354","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":273.1110305786133,"y":44.611114501953125,"z":"bae6c09b.ec173","wires":[["24188683.531f4a"]]},{"id":"1dec305b.bded3","type":"dgstart","name":"DGSTART","outputs":1,"x":109.94437408447266,"y":44.44444274902344,"z":"bae6c09b.ec173","wires":[["2d805b52.c5e354"]]},{"id":"59d02cc9.9c4fa4","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":642.8131637573242,"y":191.12879180908203,"z":"bae6c09b.ec173","wires":[["cbe21014.03475"]]},{"id":"cbe21014.03475","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":806.1462936401367,"y":191.12885284423828,"z":"bae6c09b.ec173","wires":[]},{"id":"e25b96d5.e6f508","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-action\" value=\"`$vnf-instance-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":396.7020263671875,"y":318.85116386413574,"z":"bae6c09b.ec173","wires":[[]]},{"id":"3d06c980.f160e6","type":"switchNode","name":"switch: vnf-instance-id config == input","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vf-module-id == $vf-module-service-data.vnf-instance-id`\">","comments":"","outputs":1,"x":468.58827209472656,"y":147.93198776245117,"z":"bae6c09b.ec173","wires":[["52ff4df1.be8e04"]]},{"id":"52ff4df1.be8e04","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":717.0428314208984,"y":148.1138153076172,"z":"bae6c09b.ec173","wires":[["8514ded5.e8697"]]},{"id":"8514ded5.e8697","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value='vf-module-id not found in SDNC'/>","comments":"","x":885.6337509155273,"y":148.27291584014893,"z":"bae6c09b.ec173","wires":[]},{"id":"d3da4ebd.718d2","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-order-status\" value=\"`$vnf-instance-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":461.83837890625,"y":234.043119430542,"z":"bae6c09b.ec173","wires":[[]]},{"id":"da9108f7.df52c8","type":"set","name":"Clear vnf-instance-topology","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.\" value=\"\" /> \n","comments":"","outputs":1,"x":435.83837890625,"y":359.043119430542,"z":"bae6c09b.ec173","wires":[[]]},{"id":"99637329.93ae","type":"switchNode","name":"switch: order-status = Active","xml":"<switch test=\"`$vnf-instance-service-data.oper-status.order-status == Active`\">","comments":"","outputs":1,"x":439.9960632324219,"y":191.42859268188477,"z":"bae6c09b.ec173","wires":[["59d02cc9.9c4fa4"]]},{"id":"ed7cb1e2.2fa6d","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":417.1587448120117,"y":404.24604415893555,"z":"bae6c09b.ec173","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-operation.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-operation.json
new file mode 100644
index 0000000..b82bb88
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-operation.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"b6cde583.fc1578","type":"dgstart","name":"DGSTART","outputs":1,"x":148.57142639160156,"y":67.14286041259766,"z":"7f454f1f.392aa","wires":[["22ea9e53.72aad2"]]},{"id":"22ea9e53.72aad2","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":315.8491897583008,"y":66.8095293045044,"z":"7f454f1f.392aa","wires":[["9e0df0a0.1f3a9"]]},{"id":"9e0df0a0.1f3a9","type":"method","name":"vnf-instance-topology-operation","xml":"<method rpc='vnf-instance-topology-operation' mode='sync'>\n","comments":"","outputs":1,"x":243.07142639160156,"y":121.36507797241211,"z":"7f454f1f.392aa","wires":[["97f7f3c4.5c2c7"]]},{"id":"7da5f802.f7a678","type":"switchNode","name":"switch: svc-action","xml":"<switch test=\"`$vnf-instance-topology-operation-input.sdnc-request-header.svc-action`\">\n","comments":"","outputs":1,"x":461.6269760131836,"y":587.2261047363281,"z":"7f454f1f.392aa","wires":[["56abcb20.439cd4","7b21b7bd.d66ed8","6552ee31.315f","4cc3c0e7.f2f6c","5f3d0452.12c89c","c827944d.effcf8"]]},{"id":"56abcb20.439cd4","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":679.4325790405273,"y":803.9761066436768,"z":"7f454f1f.392aa","wires":[["a888bd06.a19e8"]]},{"id":"7b21b7bd.d66ed8","type":"other","name":"assign","xml":"<outcome value='assign'>","comments":"","outputs":1,"x":679.1825332641602,"y":587.226110458374,"z":"7f454f1f.392aa","wires":[["c8e7f422.0f4a78"]]},{"id":"a888bd06.a19e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='svc-action not recognized'/>\n","comments":"","x":893.4325790405273,"y":803.9761066436768,"z":"7f454f1f.392aa","wires":[]},{"id":"6552ee31.315f","type":"other","name":"activate","xml":"<outcome value='activate'>","comments":"","outputs":1,"x":682.1825485229492,"y":676.4760990142822,"z":"7f454f1f.392aa","wires":[["6c5e9dfe.049d54"]]},{"id":"4cc3c0e7.f2f6c","type":"other","name":"rollback","xml":"<outcome value='rollback'>","comments":"","outputs":1,"x":681.9325485229492,"y":718.7260999679565,"z":"7f454f1f.392aa","wires":[["db8da778.5bf248"]]},{"id":"c827944d.effcf8","type":"other","name":"changeassign","xml":"<outcome value='changeassign'>","comments":"","outputs":1,"x":700.6825485229492,"y":632.7261009216309,"z":"7f454f1f.392aa","wires":[["4b6cc24b.5be82c"]]},{"id":"5f3d0452.12c89c","type":"other","name":"delete","xml":"<outcome value='delete'>","comments":"","outputs":1,"x":679.6825790405273,"y":760.2261075973511,"z":"7f454f1f.392aa","wires":[["43dc3d5d.2b8ed4"]]},{"id":"c8e7f422.0f4a78","type":"call","name":"call: vnf-instance-topology-assign","xml":"<call module='VNF-API' rpc='vnf-instance-topology-assign' mode='sync' >","comments":"","outputs":1,"x":953.4325332641602,"y":587.2261085510254,"z":"7f454f1f.392aa","wires":[[]]},{"id":"4b6cc24b.5be82c","type":"call","name":"call: vnf-instance-topology-changeassign","xml":"<call module='VNF-API' rpc='vnf-instance-topology-changeassign' mode='sync' >","comments":"","outputs":1,"x":976.6826553344727,"y":632.2261085510254,"z":"7f454f1f.392aa","wires":[[]]},{"id":"db8da778.5bf248","type":"call","name":"call: vnf-instance-topology-rollback","xml":"<call module='VNF-API' rpc='vnf-instance-topology-rollback' mode='sync' >","comments":"","outputs":1,"x":958.4326553344727,"y":718.726110458374,"z":"7f454f1f.392aa","wires":[[]]},{"id":"43dc3d5d.2b8ed4","type":"call","name":"call: vnf-instance-topology-delete","xml":"<call module='VNF-API' rpc='vnf-instance-topology-delete' mode='sync' >","comments":"","outputs":1,"x":954.4326477050781,"y":760.2261085510254,"z":"7f454f1f.392aa","wires":[[]]},{"id":"6c5e9dfe.049d54","type":"call","name":"call: vnf-instance-topology-activate","xml":"<call module='VNF-API' rpc='vnf-instance-topology-activate' mode='sync' >","comments":"","outputs":1,"x":957.9326477050781,"y":676.726104259491,"z":"7f454f1f.392aa","wires":[[]]},{"id":"e853df7f.d8cf2","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"vnf-instance-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$vnf-instance-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$vnf-instance-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$vnf-instance-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field6\" value=\"`$vnf-instance-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$vnf-instance-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$vnf-instance-topology-operation-input.service-information.service-id`\"/>\n<parameter name=\"field9\" value=\"`$vnf-instance-topology-operation-input.service-information.service-type`\"/>\n<parameter name=\"field10\" value=\"`$vnf-instance-topology-operation-input.service-information.subscriber-name`\"/>\n<parameter name=\"field11\" value=\"`$vnf-instance-topology-operation-input.service-information.service-instance-id`\"/>\n<parameter name=\"field12\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.request-version`\"/>\n<parameter name=\"field13\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\"/>\n<parameter name=\"field14\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-model-id`\"/>\n<parameter name=\"field15\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-name`\"/>\n<parameter name=\"field16\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.aic-cloud-region`\"/>\n<parameter name=\"field17\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.tenant`\"/>","comments":"","outputs":1,"x":435.1269989013672,"y":171.03175735473633,"z":"7f454f1f.392aa","wires":[[]]},{"id":"1ce1cb42.ddf305","type":"comment","name":"vnf-instance-topology-operation","info":"","comments":"","x":675.4603042602539,"y":112.58730411529541,"z":"7f454f1f.392aa","wires":[]},{"id":"97f7f3c4.5c2c7","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":251.57142639160156,"y":171.14287185668945,"z":"7f454f1f.392aa","wires":[["e853df7f.d8cf2","1629c736.329f19","d7f25385.ebe65","7da5f802.f7a678","7d084342.0bce0c","d50b494f.832b58"]]},{"id":"1629c736.329f19","type":"switchNode","name":"switch: INPUT vnf-instance-name","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-name`\">","comments":"","outputs":1,"x":516.7936553955078,"y":217.5872926712036,"z":"7f454f1f.392aa","wires":[["ecffbed3.c6e14","b49395b.4d79268"]]},{"id":"ecffbed3.c6e14","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":750.7936553955078,"y":217.5872926712036,"z":"7f454f1f.392aa","wires":[["a273a316.cf939"]]},{"id":"b49395b.4d79268","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":750.7936553955078,"y":259.5872926712036,"z":"7f454f1f.392aa","wires":[["32a0f03.ebb881"]]},{"id":"a273a316.cf939","type":"switchNode","name":"switch: PRELOAD vnf-instance-name","xml":"<switch test=\"`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-instance-name`\">","comments":"","outputs":1,"x":988.7936553955078,"y":217.5872926712036,"z":"7f454f1f.392aa","wires":[["cbb1a490.a33cd8","c77c21c9.5614a"]]},{"id":"cbb1a490.a33cd8","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1221.7936553955078,"y":217.5872926712036,"z":"7f454f1f.392aa","wires":[["c2db9f95.3f365"]]},{"id":"c77c21c9.5614a","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1219.7936553955078,"y":258.5872926712036,"z":"7f454f1f.392aa","wires":[["6aa2959b.18ff5c"]]},{"id":"c2db9f95.3f365","type":"switchNode","name":"switch: vnf-instance-name INPUT == PRELOAD","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-name == $vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-instance-name`\">","comments":"","outputs":1,"x":1495.7936401367188,"y":217.58729076385498,"z":"7f454f1f.392aa","wires":[["8c2ca8dd.1e4558"]]},{"id":"8c2ca8dd.1e4558","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1771.1270065307617,"y":217.25419330596924,"z":"7f454f1f.392aa","wires":[["e4dc9156.5d663"]]},{"id":"e4dc9156.5d663","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value='vnf-instance-name from input not found in vnf-instance-preload-data'/>","comments":"","x":1929.7936325073242,"y":217.5872926712036,"z":"7f454f1f.392aa","wires":[]},{"id":"6aa2959b.18ff5c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='No preload data found to match vnf-instance-name from input'/>","comments":"","x":1386.7936553955078,"y":258.5872926712036,"z":"7f454f1f.392aa","wires":[]},{"id":"32a0f03.ebb881","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-instance-name is required'/>","comments":"","x":912.2936553955078,"y":259.8372926712036,"z":"7f454f1f.392aa","wires":[]},{"id":"d7f25385.ebe65","type":"switchNode","name":"switch: INPUT vnf-model-id","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-model-id`\">","comments":"","outputs":1,"x":496.79368591308594,"y":305.5872926712036,"z":"7f454f1f.392aa","wires":[["c7fe49d7.91ad98","fbe8d80c.171448"]]},{"id":"c7fe49d7.91ad98","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":713.7936782836914,"y":306.5872926712036,"z":"7f454f1f.392aa","wires":[["90e0b948.74bb68"]]},{"id":"fbe8d80c.171448","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":714.7936782836914,"y":349.5872926712036,"z":"7f454f1f.392aa","wires":[["e694a04b.dee48"]]},{"id":"90e0b948.74bb68","type":"switchNode","name":"switch: PRELOAD vnf-model-id","xml":"<switch test=\"`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id`\">","comments":"","outputs":1,"x":924.7936782836914,"y":306.5872926712036,"z":"7f454f1f.392aa","wires":[["ff6610b6.ecd1e","160f2740.7d7439"]]},{"id":"ff6610b6.ecd1e","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1135.7936782836914,"y":306.5872926712036,"z":"7f454f1f.392aa","wires":[["d7a29f1b.08cf3"]]},{"id":"160f2740.7d7439","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1136.7936782836914,"y":348.5872926712036,"z":"7f454f1f.392aa","wires":[["a6c80c7f.af94e"]]},{"id":"e694a04b.dee48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-model-id is required'/>","comments":"","x":868.2936782836914,"y":349.8372926712036,"z":"7f454f1f.392aa","wires":[]},{"id":"d7a29f1b.08cf3","type":"switchNode","name":"switch: vnf-model-id INPUT == PRELOAD","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-model-id == $vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id`\">","comments":"","outputs":1,"x":1383.7936553955078,"y":306.5872926712036,"z":"7f454f1f.392aa","wires":[["6ed859c6.7bded8"]]},{"id":"a6c80c7f.af94e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='No preload data found to match vnf-model-id from input'/>","comments":"","x":1295.7936553955078,"y":348.5872926712036,"z":"7f454f1f.392aa","wires":[]},{"id":"6ed859c6.7bded8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1632.7936553955078,"y":305.9207887649536,"z":"7f454f1f.392aa","wires":[["89f8a67e.750a48"]]},{"id":"89f8a67e.750a48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value='request.vnf-model-id not found in vnf-instance-preload-data'/>","comments":"","x":1791.4602813720703,"y":305.253888130188,"z":"7f454f1f.392aa","wires":[]},{"id":"7d084342.0bce0c","type":"switchNode","name":"switch: INPUT vnf-instance-id","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\">","comments":"","outputs":1,"x":502.47232818603516,"y":400.0516195297241,"z":"7f454f1f.392aa","wires":[["f23dfd7e.975a9","2a84c473.0020ec"]]},{"id":"2a84c473.0020ec","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":721.472297668457,"y":441.1944570541382,"z":"7f454f1f.392aa","wires":[["1240516c.17edef"]]},{"id":"f23dfd7e.975a9","type":"outcome","name":"0","xml":"<outcome value='0'>","comments":"","outputs":1,"x":720.6152267456055,"y":399.62305545806885,"z":"7f454f1f.392aa","wires":[["1240516c.17edef"]]},{"id":"1240516c.17edef","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vf-instance-id cannot be NULL or 0'/>","comments":"","x":896.3295059204102,"y":441.4801778793335,"z":"7f454f1f.392aa","wires":[]},{"id":"d50b494f.832b58","type":"switchNode","name":"switch: INPUT aic-cloud-region","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.aic-cloud-region`\">","comments":"","outputs":1,"x":504.3214416503906,"y":522.6428508758545,"z":"7f454f1f.392aa","wires":[["e2f45743.5634e8"]]},{"id":"e2f45743.5634e8","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":722.3214111328125,"y":522.7856884002686,"z":"7f454f1f.392aa","wires":[["d672f28c.c59ab"]]},{"id":"d672f28c.c59ab","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='aic-cloud-region cannot be NULL'/>","comments":"","x":876.1786193847656,"y":523.0714092254639,"z":"7f454f1f.392aa","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-rollback.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-rollback.json
new file mode 100644
index 0000000..e9d9dc4
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-rollback.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"94c92ddd.ae5ed","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":184.44444274902344,"y":160.74999046325684,"z":"df9d3b3e.c0e1c8","wires":[["93e2a330.f35a"]]},{"id":"3d687d14.a75552","type":"method","name":"method vnf-instance-topology-rollback","xml":"<method rpc='vnf-instance-topology-rollback' mode='sync'>\n","comments":"","outputs":1,"x":212.8611297607422,"y":108.16666316986084,"z":"df9d3b3e.c0e1c8","wires":[["94c92ddd.ae5ed"]]},{"id":"cee35ab0.d8d768","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":289.9721908569336,"y":49.05556106567383,"z":"df9d3b3e.c0e1c8","wires":[["3d687d14.a75552"]]},{"id":"561962a7.5d021c","type":"dgstart","name":"DGSTART","outputs":1,"x":124.25,"y":48.88888740539551,"z":"df9d3b3e.c0e1c8","wires":[["cee35ab0.d8d768"]]},{"id":"1bf35c69.3105c4","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":922.694465637207,"y":513.4972991943359,"z":"df9d3b3e.c0e1c8","wires":[]},{"id":"faa6e689.963ce8","type":"set","name":"set: order-status = Deleted","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.order-status\" value=\"Deleted\"/>","comments":"","outputs":1,"x":958.444465637207,"y":342.27510833740234,"z":"df9d3b3e.c0e1c8","wires":[[]]},{"id":"8bd3d099.709d5","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$vnf-instance-service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":991.2854080200195,"y":256.4038906097412,"z":"df9d3b3e.c0e1c8","wires":[["8b9ee3fe.e64ab"]]},{"id":"8b9ee3fe.e64ab","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1222.8687896728516,"y":256.23720264434814,"z":"df9d3b3e.c0e1c8","wires":[["a0d580c9.8f91a"]]},{"id":"a0d580c9.8f91a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1375.201919555664,"y":256.2372636795044,"z":"df9d3b3e.c0e1c8","wires":[]},{"id":"61bf6764.c0ee08","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-action\" value=\"`$vnf-instances-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":920.2021598815918,"y":384.5707015991211,"z":"df9d3b3e.c0e1c8","wires":[[]]},{"id":"abf35da3.aa20e","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1246.542984008789,"y":209.19444751739502,"z":"df9d3b3e.c0e1c8","wires":[["6266141a.67c14c"]]},{"id":"6266141a.67c14c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value=\"`'vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id + ' not found in SDNC'`\"/>","comments":"","x":1406.633804321289,"y":209.6035509109497,"z":"df9d3b3e.c0e1c8","wires":[]},{"id":"a6e5c1a8.6bc63","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-order-status\" value=\"`$vnf-instance-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":984.088508605957,"y":299.5959997177124,"z":"df9d3b3e.c0e1c8","wires":[[]]},{"id":"8e3a7d8d.ca152","type":"set","name":"Clear vnf-instance topology","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.\" value=\"\" /> \n","comments":"","outputs":1,"x":960.588508605957,"y":428.26265716552734,"z":"df9d3b3e.c0e1c8","wires":[[]]},{"id":"68d58b09.4d9dd4","type":"switchNode","name":"switch:CONFIG == INPUT - vnf-instance-id","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id == $vnf-instance-service-data.vnf-instance-id`\">","comments":"","outputs":1,"x":1002.694465637207,"y":209.19444751739502,"z":"df9d3b3e.c0e1c8","wires":[["abf35da3.aa20e"]]},{"id":"93e2a330.f35a","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$vnf-instance-service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":291.94445037841797,"y":207.69445133209229,"z":"df9d3b3e.c0e1c8","wires":[["ef7c4880.dd4728"]]},{"id":"ef7c4880.dd4728","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":528.1944427490234,"y":208.44444465637207,"z":"df9d3b3e.c0e1c8","wires":[["7f540634.54f868"]]},{"id":"7f540634.54f868","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":690.1944427490234,"y":208.44444465637207,"z":"df9d3b3e.c0e1c8","wires":[["68d58b09.4d9dd4","8bd3d099.709d5","a6e5c1a8.6bc63","faa6e689.963ce8","61bf6764.c0ee08","8e3a7d8d.ca152","1bf35c69.3105c4","e3c9abe6.25d908"]]},{"id":"34d8bebb.20ff92","type":"comment","name":"request-action = VNFActivateRequest, svc-action = rollback","info":"","comments":"","x":787.944450378418,"y":85.4444465637207,"z":"df9d3b3e.c0e1c8","wires":[]},{"id":"e3c9abe6.25d908","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":944.3054733276367,"y":470.55554389953613,"z":"df9d3b3e.c0e1c8","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-activate.json b/platform-logic/vnfapi/src/main/json/vnf-topology-activate.json
new file mode 100644
index 0000000..87f11f2
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-activate.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"88706b6c.d7e8f8","type":"comment","name":"VNF-TOPOLOGY-ACTIVATE","info":"","comments":"","x":705,"y":56.25,"z":"bdb7525f.b82ac","wires":[]},{"id":"9919a3a0.0db84","type":"set","name":"set: order-status = Active","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"Active\"/>","comments":"","outputs":1,"x":416.1111373901367,"y":392.19443130493164,"z":"bdb7525f.b82ac","wires":[[]]},{"id":"c7aef71a.0546b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":163.1111297607422,"y":159.6944465637207,"z":"bdb7525f.b82ac","wires":[["9919a3a0.0db84","d2f822b9.c0ba2","cb7a4a21.63f1a8","a2825e7b.f1f5b","997d743b.93f348","4d75942d.b062cc","4d26f461.ab756c","be925673.a43ed8"]]},{"id":"e1d7f022.0eec5","type":"method","name":"method vnf-topology-activate","xml":"<method rpc='vnf-topology-activate' mode='sync'>\n","comments":"","outputs":1,"x":205.77781677246094,"y":103.86111068725586,"z":"bdb7525f.b82ac","wires":[["c7aef71a.0546b8"]]},{"id":"8ecea6c6.be7228","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":297.7777862548828,"y":56.86111831665039,"z":"bdb7525f.b82ac","wires":[["e1d7f022.0eec5"]]},{"id":"c14838e9.4ff538","type":"dgstart","name":"DGSTART","outputs":1,"x":132.6111297607422,"y":56.6944465637207,"z":"bdb7525f.b82ac","wires":[["8ecea6c6.be7228"]]},{"id":"d2f822b9.c0ba2","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$service-data.oper-status.order-status == PendingCreate`\">\n\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":455.4445114135742,"y":288.5276527404785,"z":"bdb7525f.b82ac","wires":[["7fbf2884.337bd8"]]},{"id":"7fbf2884.337bd8","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":704.7778625488281,"y":288.8609619140625,"z":"bdb7525f.b82ac","wires":[["6a86c40f.3cacbc"]]},{"id":"5ab563ab.d3ac3c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid last-order-status'/>","comments":"","x":1363.110984802246,"y":287.8610134124756,"z":"bdb7525f.b82ac","wires":[]},{"id":"997d743b.93f348","type":"switchNode","name":"switch:vnf-id config == input","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`\">","comments":"","outputs":1,"x":427.88387298583984,"y":236.73988723754883,"z":"bdb7525f.b82ac","wires":[["18372478.ff847c"]]},{"id":"18372478.ff847c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":647.3383483886719,"y":236.9217071533203,"z":"bdb7525f.b82ac","wires":[["a2862881.e98788"]]},{"id":"a2862881.e98788","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"`'vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' not found in config tree'`\"/>","comments":"","x":825.4292907714844,"y":236.830810546875,"z":"bdb7525f.b82ac","wires":[]},{"id":"cb7a4a21.63f1a8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":385.22225189208984,"y":612.8610877990723,"z":"bdb7525f.b82ac","wires":[]},{"id":"6a86c40f.3cacbc","type":"switchNode","name":"switch: order-status = PendingUpdate","xml":"<switch test=\"`$service-data.oper-status.order-status == PendingUpdate`\">\n\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":955.7020568847656,"y":288.2853698730469,"z":"bdb7525f.b82ac","wires":[["8c8f2029.ca786"]]},{"id":"8c8f2029.ca786","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1198.1564636230469,"y":288.28533935546875,"z":"bdb7525f.b82ac","wires":[["5ab563ab.d3ac3c"]]},{"id":"3c6838ea.3c4ff8","type":"comment","name":"once success is returned, operational-data gets saved","info":"","comments":"","x":731.6288452148438,"y":573.79541015625,"z":"bdb7525f.b82ac","wires":[]},{"id":"a2825e7b.f1f5b","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-order-status\" value=\"`$service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":449.22481536865234,"y":340.8081398010254,"z":"bdb7525f.b82ac","wires":[[]]},{"id":"b434395d.5c9488","type":"comment","name":"request-action = VNFActivateRequest, svc-action = activate","info":"","comments":"","x":711.7222137451172,"y":96.02778053283691,"z":"bdb7525f.b82ac","wires":[]},{"id":"4d75942d.b062cc","type":"set","name":"set: service-data = input","xml":"<set>\n\t<parameter name=\"service-data.\" value=\"vnf-topology-operation-input.\" />","comments":"","outputs":1,"x":413.1111373901367,"y":527.2500038146973,"z":"bdb7525f.b82ac","wires":[[]]},{"id":"4d26f461.ab756c","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-action\" value=\"`$service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":383.1111373901367,"y":439.25000381469727,"z":"bdb7525f.b82ac","wires":[[]]},{"id":"25f69501.db82ca","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":741.5238571166992,"y":482.2385025024414,"z":"bdb7525f.b82ac","wires":[["8b31c6d4.18a8e8"]]},{"id":"8b31c6d4.18a8e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Encountered error while updating vf-module orchestration-status in AnAI with vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\"/>","comments":"","x":909.6667861938477,"y":482.2385730743408,"z":"bdb7525f.b82ac","wires":[]},{"id":"baf5a37d.f9734","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":407.4285888671875,"y":570.9642486572266,"z":"bdb7525f.b82ac","wires":[[]]},{"id":"be925673.a43ed8","type":"save","name":"update AnAI - vf-module.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tAND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\t\tlocal-only=\"false\" >\n\t<parameter name=\"orchestration-status\" value=\"active\" />","comments":"","outputs":1,"x":477,"y":482.25,"z":"bdb7525f.b82ac","wires":[["25f69501.db82ca"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-assign-vfmodule.json b/platform-logic/vnfapi/src/main/json/vnf-topology-assign-vfmodule.json
new file mode 100644
index 0000000..6bdfc89
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-assign-vfmodule.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"a31dd50.8f7cf28","type":"dgstart","name":"DGSTART","outputs":1,"x":140,"y":61.42857360839844,"z":"3018bfef.3ec6f","wires":[["fcb8154c.6bd848"]]},{"id":"fcb8154c.6bd848","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":305.1666564941406,"y":61.595245361328125,"z":"3018bfef.3ec6f","wires":[["94fe54b7.9c25f8"]]},{"id":"94fe54b7.9c25f8","type":"method","name":"method vnf-topology-assign-vfmodule","xml":"<method rpc='vnf-topology-assign-vfmodule' mode='sync'>\n","comments":"","outputs":1,"x":237.16668701171875,"y":114.5952377319336,"z":"3018bfef.3ec6f","wires":[["1d4d3089.10a17f"]]},{"id":"1d4d3089.10a17f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":189.50000762939453,"y":163.42857360839844,"z":"3018bfef.3ec6f","wires":[["20002884.ee2078","b3f35db0.e0e4","d031edaa.e6184","cb1afc0e.40927","3c67b88b.3c6c28","9aaf059b.32e0d8","9f4073e7.b1211"]]},{"id":"637385b9.ca295c","type":"switchNode","name":"switch test: INPUT network-id = NULL","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id == '' or $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id == '0'`\">","comments":"","outputs":1,"x":718.9422798156738,"y":715.4150276184082,"z":"3018bfef.3ec6f","wires":[["49d71e01.633db","53a64d09.4de384"]]},{"id":"49d71e01.633db","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":959.3057670593262,"y":758.5968976020813,"z":"3018bfef.3ec6f","wires":[["3983efb0.652cd"]]},{"id":"3983efb0.652cd","type":"switchNode","name":"switch : INPUT network-name = NULL","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name == '' or $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name == '0'`\">","comments":"","outputs":1,"x":1197.0878677368164,"y":758.4408760070801,"z":"3018bfef.3ec6f","wires":[["372c9435.92cf3c","d62ab763.7f7488"]]},{"id":"53a64d09.4de384","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":959.3260536193848,"y":715.3039240837097,"z":"3018bfef.3ec6f","wires":[["c6e8f114.6edb3"]]},{"id":"372c9435.92cf3c","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1435.2798194885254,"y":797.9963579177856,"z":"3018bfef.3ec6f","wires":[["459aea4a.7ec284"]]},{"id":"c6e8f114.6edb3","type":"save","name":"get AnAI - l3-network by id","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1160.548168182373,"y":715.3040919303894,"z":"3018bfef.3ec6f","wires":[["ef79ca38.6e05a8","8a064197.2016f"]]},{"id":"ef79ca38.6e05a8","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1363.4928588867188,"y":714.8595404624939,"z":"3018bfef.3ec6f","wires":[["df4013d1.53f66"]]},{"id":"d4a5dd72.75857","type":"for","name":"for i : INPUT vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks_length`\">","comments":"","outputs":1,"x":548.236156463623,"y":571.9077110290527,"z":"3018bfef.3ec6f","wires":[["2dd04c5d.087a24"]]},{"id":"459aea4a.7ec284","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n\n","comments":"","outputs":1,"x":1645.7818222045898,"y":797.7381496429443,"z":"3018bfef.3ec6f","wires":[["3388e17e.b2e1be","86e3396f.1580b8"]]},{"id":"3388e17e.b2e1be","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1867.0318222045898,"y":797.9882106781006,"z":"3018bfef.3ec6f","wires":[["df4013d1.53f66"]]},{"id":"b1029783.5d2708","type":"set","name":"initialize tmp.usePreload = 1 and tmp.AAI.l3network","xml":"<set>\n<parameter name='tmp.usePreload' value='1' />\n<parameter name='tmp.AnAI.l3network.' value='' />\n","comments":"","outputs":1,"x":435.72979736328125,"y":485.63307189941406,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"22808f4a.1e8c2","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":510.91400146484375,"y":398.16761016845703,"z":"3018bfef.3ec6f","wires":[["b1029783.5d2708","816372ff.06ba2","b66fd01c.9af55"]]},{"id":"20002884.ee2078","type":"for","name":"for j : PRELOAD vnf-networks","xml":"<for index=\"j\" start=\"0\" end=\"`$preload-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":273.8889465332031,"y":398.6785583496094,"z":"3018bfef.3ec6f","wires":[["22808f4a.1e8c2"]]},{"id":"816372ff.06ba2","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":315.61627197265625,"y":571.8376026153564,"z":"3018bfef.3ec6f","wires":[["d4a5dd72.75857","fd1635d9.5c1398"]]},{"id":"2dd04c5d.087a24","type":"switchNode","name":"switch : PRELOAD network-role = INPUT","xml":"<switch test=\"`$preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-role == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-role`\">","comments":"","outputs":1,"x":857.6163368225098,"y":572.2012739181519,"z":"3018bfef.3ec6f","wires":[["b66fe12f.c0be8"]]},{"id":"b66fe12f.c0be8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1108.4117622375488,"y":572.4969162940979,"z":"3018bfef.3ec6f","wires":[["6c5f5d3f.b58ed4"]]},{"id":"6c5f5d3f.b58ed4","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":466.6973304748535,"y":672.2760715484619,"z":"3018bfef.3ec6f","wires":[["637385b9.ca295c","13b8f738.862a39","989e6dbf.d5d9d"]]},{"id":"13b8f738.862a39","type":"set","name":"set tmp.usePreload = 0","xml":"<set>\n<parameter name='tmp.usePreload' value='0' />\n","comments":"","outputs":1,"x":673.060962677002,"y":672.1852006912231,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"d62ab763.7f7488","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1434.8377532958984,"y":758.7023506164551,"z":"3018bfef.3ec6f","wires":[["df4013d1.53f66"]]},{"id":"989e6dbf.d5d9d","type":"switchNode","name":"switch : tmp.usePreload= 0","xml":"<switch test=\"`$tmp.usePreload == 0`\">","comments":"","outputs":1,"x":699.7430572509766,"y":951.2915191650391,"z":"3018bfef.3ec6f","wires":[["a94fbeb7.9f49d"]]},{"id":"a94fbeb7.9f49d","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":898.7429428100586,"y":951.5416564941406,"z":"3018bfef.3ec6f","wires":[["f300366b.1bf838"]]},{"id":"ae3d7146.3003c","type":"for","name":"for k : SERVICE_DATA vnf-networks","xml":"<for index=\"k\" start=\"0\" end=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":800.1870269775391,"y":1135.3089752197266,"z":"3018bfef.3ec6f","wires":[["6d4a43e6.1837ec"]]},{"id":"6d4a43e6.1837ec","type":"switchNode","name":"switch: SERVICE-DATA network-role = INPUT","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-role`\">","comments":"","outputs":1,"x":1158.0671691894531,"y":1135.6582279205322,"z":"3018bfef.3ec6f","wires":[["5d39673b.750638"]]},{"id":"5d39673b.750638","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1437.6125793457031,"y":1135.7038822174072,"z":"3018bfef.3ec6f","wires":[["99507e8d.3fb04"]]},{"id":"fd1635d9.5c1398","type":"switchNode","name":"switch: tmp.usePreload= 1","xml":"<switch test=\"`$tmp.usePreload == 1`\">","comments":"","outputs":1,"x":540.9327087402344,"y":1653.80224609375,"z":"3018bfef.3ec6f","wires":[["f3fd6148.f130e"]]},{"id":"f3fd6148.f130e","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":748.9642868041992,"y":1653.5424976348877,"z":"3018bfef.3ec6f","wires":[["394ee13a.df62ee"]]},{"id":"df4013d1.53f66","type":"set","name":"set tmp.usePreload = 1","xml":"<set>\n<parameter name='tmp.usePreload' value='1' />\n","comments":"","outputs":1,"x":1629.4458465576172,"y":899.4613742828369,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"b7f69264.cf1ab","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to query AnAI for l3-network with network-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id`\" />\n","comments":"","x":1514.416659037272,"y":673.9840910169814,"z":"3018bfef.3ec6f","wires":[]},{"id":"8a064197.2016f","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1357.1944368150498,"y":673.9840910169814,"z":"3018bfef.3ec6f","wires":[["b7f69264.cf1ab"]]},{"id":"d9b59f8d.62ec6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to query AnAI for l3-network with network-name = ' + $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name`\" />\n","comments":"","x":2015.5275802612305,"y":756.2063064575195,"z":"3018bfef.3ec6f","wires":[]},{"id":"86e3396f.1580b8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1858.3053580390078,"y":756.2063064575195,"z":"3018bfef.3ec6f","wires":[["d9b59f8d.62ec6"]]},{"id":"18ac44d0.2f45cb","type":"set","name":"set: SERVICE_DATA vnf-networks = AAI DATA","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-name\" value=\"`$tmp.AnAI.l3network.network-name`\" />\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].neutron-id\" value=\"`$tmp.AnAI.l3network.neutron-network-id`\" />\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn\" value=\"`$tmp.AnAI.l3network.contrail-network-fqdn`\" />\n","comments":"","outputs":1,"x":1894.9072570800781,"y":1135.7456226348877,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"d30c2e81.9d2fd","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1419.0712356567383,"y":1653.4231624603271,"z":"3018bfef.3ec6f","wires":[["ae6f9f81.1a798"]]},{"id":"10de1549.964beb","type":"set","name":"set: SERVICE_DATA vnf-networks = AAI DATA","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-name\" value=\"`$tmp.AnAI.l3network.network-name`\" />\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].neutron-id\" value=\"`$tmp.AnAI.l3network.neutron-network-id`\" />\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn\" value=\"`$tmp.AnAI.l3network.contrail-network-fqdn`\" />\n\n","comments":"","outputs":1,"x":2024.2062301635742,"y":1900.2730236053467,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"a3d35540.191cd8","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-name\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1153.964256286621,"y":1653.6891021728516,"z":"3018bfef.3ec6f","wires":[["d30c2e81.9d2fd","d435904c.f085c","f9269416.45efe8"]]},{"id":"394ee13a.df62ee","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":904.9758262634277,"y":1653.9880352020264,"z":"3018bfef.3ec6f","wires":[["a3d35540.191cd8","b15670b5.3c9b2","ad2f4a81.8af4e8"]]},{"id":"e68e26af.0bdf48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to query AnAI for l3-network with network-name = ' + $vnf-topology-operation-input.vnf-request-information.vnf-networks[$j].network-name`\" />\n","comments":"","x":1566.3570709228516,"y":1691.285740852356,"z":"3018bfef.3ec6f","wires":[]},{"id":"d435904c.f085c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1411.1348487006294,"y":1691.285740852356,"z":"3018bfef.3ec6f","wires":[["e68e26af.0bdf48"]]},{"id":"ae6f9f81.1a798","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'PRELOAD network-name = ' + $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' not found in AnAI'`\" />\n","comments":"","x":1585.3571014404297,"y":1653.2857656478882,"z":"3018bfef.3ec6f","wires":[]},{"id":"b3f35db0.e0e4","type":"switchNode","name":"switch ...PRELOAD vnf-networks[]","xml":"<switch test=\"`$preload-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":453.5,"y":342.9285774230957,"z":"3018bfef.3ec6f","wires":[["24971653.569cea"]]},{"id":"24971653.569cea","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":680.9444732666016,"y":342.4562873840332,"z":"3018bfef.3ec6f","wires":[["cbca70d0.7f17"]]},{"id":"cbca70d0.7f17","type":"set","name":"set PRELOAD vnf-networks[] = 0","xml":"<set>\n<parameter name = \"preload-data.vnf-topology-information.vnf-assignments.vnf-networks_length\" value=\"0\" />\n","comments":"","outputs":1,"x":902.5000822279189,"y":342.4563080469766,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"b66fd01c.9af55","type":"switchNode","name":"switch ...INPUT vnf-networks[]","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks_length`\">","comments":"","outputs":1,"x":369.00001525878906,"y":526.6785554885864,"z":"3018bfef.3ec6f","wires":[["3bbc7752.e54408"]]},{"id":"3bbc7752.e54408","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":592.444465637207,"y":526.4562911987305,"z":"3018bfef.3ec6f","wires":[["ebefaf21.666f1"]]},{"id":"ebefaf21.666f1","type":"set","name":"set INPUT vnf-networks_length = 0","xml":"<set>\n<parameter name='vnf-topology-operation-input.vnf-request-information.vnf-networks_length' value='0' />\n","comments":"","outputs":1,"x":825.0000745985244,"y":526.4563118616738,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"8ee6be3c.0943d","type":"comment","name":"For each preload network, see if there is an override in input","info":"","comments":"","x":861.8612213134766,"y":454.90082454681396,"z":"3018bfef.3ec6f","wires":[]},{"id":"be41e53d.c12d58","type":"switchNode","name":"switch: SERVICE-DATA network-role = PRELOAD","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-role == $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-role`\">","comments":"","outputs":1,"x":1278.1070175170898,"y":1900.0358438491821,"z":"3018bfef.3ec6f","wires":[["35b957ef.660a98"]]},{"id":"35b957ef.660a98","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1566.509693145752,"y":1899.6528720855713,"z":"3018bfef.3ec6f","wires":[["9a01436f.4ed71"]]},{"id":"b15670b5.3c9b2","type":"for","name":"for k : SERVICE_DATA vnf-networks","xml":"<for index=\"k\" start=\"0\" end=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":1173.642807006836,"y":1850.6072368621826,"z":"3018bfef.3ec6f","wires":[["be41e53d.c12d58"]]},{"id":"c7ee590b.fb69b8","type":"comment","name":"CALLED BY vnf-topology-assign AND vnf-topology-changeassign","info":"","comments":"","x":795.1666564941406,"y":105.53968811035156,"z":"3018bfef.3ec6f","wires":[]},{"id":"cb1afc0e.40927","type":"set","name":"set: service-data =+ input","xml":"<set>\n\t<parameter name=\"service-data.\" value=\"vnf-topology-operation-input.\" />","comments":"","outputs":1,"x":425.27777671813965,"y":251.8730125427246,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"d031edaa.e6184","type":"set","name":"set: service-data = preload-data","xml":"<set>\n\t<parameter name=\"service-data.\" value=\"preload-data.\" />","comments":"","outputs":1,"x":445.1818904876709,"y":210.0194969177246,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"3c67b88b.3c6c28","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":396.2857437133789,"y":1912.2859153747559,"z":"3018bfef.3ec6f","wires":[]},{"id":"9aaf059b.32e0d8","type":"switchNode","name":"switch: preload order-status = PendingAssignment","xml":"<switch test=\"`$preload-data.oper-status.order-status == PendingAssignment`\">\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":502.2777862548828,"y":163.4285764694214,"z":"3018bfef.3ec6f","wires":[["113a87df.14b818"]]},{"id":"d97cceee.5c382","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid preload-data order status'/>","comments":"","x":919.2170295715332,"y":163.1255865097046,"z":"3018bfef.3ec6f","wires":[]},{"id":"113a87df.14b818","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":769.883918762207,"y":163.1255121231079,"z":"3018bfef.3ec6f","wires":[["d97cceee.5c382"]]},{"id":"9f4073e7.b1211","type":"set","name":"set: vnf-id","xml":"<set>\n\t<parameter name=\"service-data.vnf-id\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id`\"/>\n\t<parameter name=\"service-data.service-information.service-instance-id\" value=\"`$vnf-topology-operation-input.service-information.service-instance-id`\"/>\n\t<parameter name=\"service-data.vnf-request-information.vnf-id\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id`\"/>\n <parameter name=\"service-data.vnf-topology-information.vnf-topology-identifier.vnf-id\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id`\"/>","comments":"","outputs":1,"x":377.5992889404297,"y":296.36905097961426,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"63fc40cc.c84e4","type":"switchNode","name":"switch: tmp.AnAI.l3network.network-id == null","xml":"<switch test=\"`$tmp.AnAI.l3network.network-id == ''`\">","comments":"","outputs":1,"x":1676.7500305175781,"y":1729.1787147521973,"z":"3018bfef.3ec6f","wires":[["f7b88266.11803"]]},{"id":"f7b88266.11803","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":1939.0000305175781,"y":1729.1787147521973,"z":"3018bfef.3ec6f","wires":[["60aaae18.6b34b"]]},{"id":"60aaae18.6b34b","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying l3-network with network-name = ' + $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' , it is likely that there are more than one l3-newtork object with the same network-name in AnAI.'`\" />\n","comments":"","x":2093.000030517578,"y":1729.6787147521973,"z":"3018bfef.3ec6f","wires":[]},{"id":"f9269416.45efe8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1414.750015258789,"y":1728.928695678711,"z":"3018bfef.3ec6f","wires":[["63fc40cc.c84e4"]]},{"id":"365956fb.0b312a","type":"switchNode","name":"switch: SERVICE-DATA ipv6-sbunet-id == NULL","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id == ''`\">","comments":"","outputs":1,"x":2011.41650390625,"y":2245.250244140625,"z":"3018bfef.3ec6f","wires":[["94a6ca67.61df88"]]},{"id":"94a6ca67.61df88","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2295.6664695739746,"y":2245.00022315979,"z":"3018bfef.3ec6f","wires":[["34509c24.cfaf64"]]},{"id":"b4cda74e.ecf228","type":"switchNode","name":"switch: SERVICE-DATA sbunet-name != NULL","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-name != ''`\">","comments":"","outputs":1,"x":2102.857208251953,"y":2050.3570852279663,"z":"3018bfef.3ec6f","wires":[["117b6909.23fc67"]]},{"id":"117b6909.23fc67","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2368.1071739196777,"y":2050.1070642471313,"z":"3018bfef.3ec6f","wires":[["14f42f64.b3e611"]]},{"id":"f8a8a33e.215bb","type":"set","name":"set: service-data = AnAI - subnet-id ","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3136.868942260742,"y":2164.6549243927,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"14f42f64.b3e611","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2228.368927001953,"y":2107.9048166275024,"z":"3018bfef.3ec6f","wires":[["12ee504d.24c76"]]},{"id":"f8a347b6.06cb48","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2271.797393798828,"y":2166.0834045410156,"z":"3018bfef.3ec6f","wires":[["f8cb09b3.6b0028"]]},{"id":"f8cb09b3.6b0028","type":"switchNode","name":"switch: AnAI == service-data - subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-name`\">","comments":"","outputs":1,"x":2644.547348022461,"y":2165.3334884643555,"z":"3018bfef.3ec6f","wires":[["7ed66661.050d48"]]},{"id":"7ed66661.050d48","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2902.950038909912,"y":2165.2005167007446,"z":"3018bfef.3ec6f","wires":[["f8a8a33e.215bb"]]},{"id":"12ee504d.24c76","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2513.6904106140137,"y":2107.4882073402405,"z":"3018bfef.3ec6f","wires":[["f8a347b6.06cb48"]]},{"id":"34509c24.cfaf64","type":"switchNode","name":"switch: SERVICE-DATA ipv6-sbunet-name != NULL","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name != ''`\">","comments":"","outputs":1,"x":2147.6188888549805,"y":2299.976417541504,"z":"3018bfef.3ec6f","wires":[["9d340516.572948"]]},{"id":"9d340516.572948","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2432.868854522705,"y":2299.726396560669,"z":"3018bfef.3ec6f","wires":[["1544738d.b38abc"]]},{"id":"e9ee4f00.4d645","type":"set","name":"set: service-data = AnAI - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3159.1308670043945,"y":2411.7742557525635,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"1544738d.b38abc","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2248.1308517456055,"y":2355.024024963379,"z":"3018bfef.3ec6f","wires":[["151974e3.0664ab"]]},{"id":"5a40afd6.e4ff8","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2294.0593185424805,"y":2413.202735900879,"z":"3018bfef.3ec6f","wires":[["d120df1f.f811c"]]},{"id":"d120df1f.f811c","type":"switchNode","name":"switch: AnAI == service-data - ipv6-subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name`\">","comments":"","outputs":1,"x":2666.8092727661133,"y":2412.4528198242188,"z":"3018bfef.3ec6f","wires":[["541bc841.f2b0f8"]]},{"id":"541bc841.f2b0f8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2925.2119636535645,"y":2412.319848060608,"z":"3018bfef.3ec6f","wires":[["e9ee4f00.4d645"]]},{"id":"151974e3.0664ab","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2533.452335357666,"y":2354.607415676117,"z":"3018bfef.3ec6f","wires":[["5a40afd6.e4ff8"]]},{"id":"9a01436f.4ed71","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1729.9999771118164,"y":1900.16672706604,"z":"3018bfef.3ec6f","wires":[["10de1549.964beb","6110484f.04a978","365956fb.0b312a"]]},{"id":"6110484f.04a978","type":"switchNode","name":"switch: SERVICE-DATA sbunet-id == NULL","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id == ''`\">","comments":"","outputs":1,"x":1996.4285697937012,"y":1993.845314025879,"z":"3018bfef.3ec6f","wires":[["71d2499c.c98928"]]},{"id":"71d2499c.c98928","type":"outcomeFalse","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2252.6785049438477,"y":1994.345365524292,"z":"3018bfef.3ec6f","wires":[["b4cda74e.ecf228"]]},{"id":"99507e8d.3fb04","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1601.2500228881836,"y":1136.2500171661377,"z":"3018bfef.3ec6f","wires":[["18ac44d0.2f45cb","aa7965a7.8a0268","fe682f55.17228"]]},{"id":"9b32ad95.a25bc","type":"comment","name":"Use INPUT vnf-networks to override preload","info":"","comments":"","x":906.6070709228516,"y":1030.7142543792725,"z":"3018bfef.3ec6f","wires":[]},{"id":"f6b569a4.ef41e8","type":"comment","name":"if INPUT vnf-network not in AnAI, use Preload","info":"","comments":"","x":1957.1429443359375,"y":878.2142715454102,"z":"3018bfef.3ec6f","wires":[]},{"id":"acfdf9bf.62cbd8","type":"switchNode","name":"switch: INPUT sbunet-name != NULL","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-name != ''`\">","comments":"","outputs":1,"x":2384.226348876953,"y":1246.8569526672363,"z":"3018bfef.3ec6f","wires":[["279dbc6a.3dcd44"]]},{"id":"279dbc6a.3dcd44","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2621.4763145446777,"y":1246.6069316864014,"z":"3018bfef.3ec6f","wires":[["7a8c22e0.a09bfc"]]},{"id":"15630d42.609893","type":"set","name":"set: service-data = AnAI - subnet-id ","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3360.738327026367,"y":1360.154670715332,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"7a8c22e0.a09bfc","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2487.238311767578,"y":1297.1545581817627,"z":"3018bfef.3ec6f","wires":[["f12b50fc.bf6ec"]]},{"id":"3e5c8652.818e1a","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2495.666778564453,"y":1361.5831508636475,"z":"3018bfef.3ec6f","wires":[["1103bb86.f0b774"]]},{"id":"1103bb86.f0b774","type":"switchNode","name":"switch: AnAI == INPUT - subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-name`\">","comments":"","outputs":1,"x":2868.416732788086,"y":1360.8332347869873,"z":"3018bfef.3ec6f","wires":[["86b2b0cf.39e87"]]},{"id":"86b2b0cf.39e87","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3126.819423675537,"y":1360.7002630233765,"z":"3018bfef.3ec6f","wires":[["15630d42.609893"]]},{"id":"f12b50fc.bf6ec","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2772.5597953796387,"y":1296.7379488945007,"z":"3018bfef.3ec6f","wires":[["3e5c8652.818e1a"]]},{"id":"fe682f55.17228","type":"switchNode","name":"switch: INPUT sbunet-id != NULL","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-id != ''`\">","comments":"","outputs":1,"x":1877.797794342041,"y":1203.0951328277588,"z":"3018bfef.3ec6f","wires":[["d47a1488.eef628","c9c1e1fa.1b416"]]},{"id":"b85f607.859b7a","type":"set","name":"set: data-data = INPUT - subnet-id ","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-id`\" />","comments":"","outputs":1,"x":2376.0477905273438,"y":1203.3451347351074,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"d47a1488.eef628","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2134.0477600097656,"y":1202.8451118469238,"z":"3018bfef.3ec6f","wires":[["b85f607.859b7a"]]},{"id":"c9c1e1fa.1b416","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2135.2978019714355,"y":1246.8451328277588,"z":"3018bfef.3ec6f","wires":[["acfdf9bf.62cbd8"]]},{"id":"a1734fb1.d43be","type":"switchNode","name":"switch: INPUT ipv6-sbunet-name != NULL","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-name != ''`\">","comments":"","outputs":1,"x":2392.5,"y":1475,"z":"3018bfef.3ec6f","wires":[["e98fe3c1.1cf8c"]]},{"id":"e98fe3c1.1cf8c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2639.7499656677246,"y":1474.749979019165,"z":"3018bfef.3ec6f","wires":[["77179e25.c032f"]]},{"id":"7618e85b.df1788","type":"set","name":"set: service-data = AnAI - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3369.011978149414,"y":1588.2977180480957,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"77179e25.c032f","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2495.511962890625,"y":1525.2976055145264,"z":"3018bfef.3ec6f","wires":[["d63d308e.fbbed"]]},{"id":"4cf11d6a.ec1414","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2503.9404296875,"y":1589.7261981964111,"z":"3018bfef.3ec6f","wires":[["1eb54f30.ad23b1"]]},{"id":"1eb54f30.ad23b1","type":"switchNode","name":"switch: AnAI == INPUT - ipv6-subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-name`\">","comments":"","outputs":1,"x":2876.690383911133,"y":1588.976282119751,"z":"3018bfef.3ec6f","wires":[["bba8b999.fef0c8"]]},{"id":"bba8b999.fef0c8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3135.093074798584,"y":1588.8433103561401,"z":"3018bfef.3ec6f","wires":[["7618e85b.df1788"]]},{"id":"d63d308e.fbbed","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2780.8334465026855,"y":1524.8809962272644,"z":"3018bfef.3ec6f","wires":[["4cf11d6a.ec1414"]]},{"id":"aa7965a7.8a0268","type":"switchNode","name":"switch: INPUT ipv6-sbunet-id != NULL","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-id != ''`\">","comments":"","outputs":1,"x":1886.071445465088,"y":1431.2381801605225,"z":"3018bfef.3ec6f","wires":[["dba017f7.db9878","db733b1.265eec8"]]},{"id":"83458f26.3bb7d","type":"set","name":"set: service-data = INPUT - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-id`\" />","comments":"","outputs":1,"x":2393.3214416503906,"y":1431.488182067871,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"dba017f7.db9878","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2142.3214111328125,"y":1430.9881591796875,"z":"3018bfef.3ec6f","wires":[["83458f26.3bb7d"]]},{"id":"db733b1.265eec8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2143.5714530944824,"y":1474.9881801605225,"z":"3018bfef.3ec6f","wires":[["a1734fb1.d43be"]]},{"id":"f8168a86.067868","type":"comment","name":"Use Preload Data","info":"","comments":"","x":576,"y":1599.5,"z":"3018bfef.3ec6f","wires":[]},{"id":"ad2f4a81.8af4e8","type":"switchNode","name":"switch: service-data...vnf-networks_length","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":1190.21435546875,"y":1803.0714111328125,"z":"3018bfef.3ec6f","wires":[["27e3bb35.5afc04"]]},{"id":"27e3bb35.5afc04","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1449.7143478393555,"y":1803.0714111328125,"z":"3018bfef.3ec6f","wires":[["c75309.f948fcf8"]]},{"id":"c75309.f948fcf8","type":"switchNode","name":"set: service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1714.4643478393555,"y":1803.0714111328125,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"98d3927f.7bccf","type":"switchNode","name":"switch: service-data...vnf-networks_length","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":817.6786041259766,"y":1087.6786041259766,"z":"3018bfef.3ec6f","wires":[["d2e9cd7e.23312"]]},{"id":"d2e9cd7e.23312","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1077.178596496582,"y":1087.6786041259766,"z":"3018bfef.3ec6f","wires":[["fcd3cd85.688eb"]]},{"id":"fcd3cd85.688eb","type":"switchNode","name":"set: service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1341.928596496582,"y":1087.6786041259766,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"f300366b.1bf838","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":542.1428298950195,"y":1036.6786041259766,"z":"3018bfef.3ec6f","wires":[["98d3927f.7bccf","ae3d7146.3003c"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-assign.json b/platform-logic/vnfapi/src/main/json/vnf-topology-assign.json
new file mode 100644
index 0000000..6e43198
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-assign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"ffac9d92.2aaca","type":"dgstart","name":"DGSTART","outputs":1,"x":192.85714721679688,"y":78.57142639160156,"z":"c61f02a7.f710b","wires":[["cb8ca6c4.e37a28"]]},{"id":"cb8ca6c4.e37a28","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":358.0238037109375,"y":78.73809814453125,"z":"c61f02a7.f710b","wires":[["5e434d1b.a4bf14"]]},{"id":"5e434d1b.a4bf14","type":"method","name":"method vnf-topology-assign","xml":"<method rpc='vnf-topology-assign' mode='sync'>\n","comments":"","outputs":1,"x":266.0238342285156,"y":125.73809051513672,"z":"c61f02a7.f710b","wires":[["d0de5a86.924be8"]]},{"id":"d0de5a86.924be8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":253.3571548461914,"y":181.57142639160156,"z":"c61f02a7.f710b","wires":[["1e8a3f5e.717d91","f514732f.8810c","d85c86c9.1e8a28","3fd98125.b3edde","ea24658e.334798","3868dfb4.d7723","954a9a87.8b91b8","69314bf3.7bab64"]]},{"id":"1e8a3f5e.717d91","type":"set","name":"set: order-status = PendingCreate","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"PendingCreate\"/>","comments":"","outputs":1,"x":521.2479934692383,"y":602.7636432647705,"z":"c61f02a7.f710b","wires":[[]]},{"id":"f514732f.8810c","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":460.39083099365234,"y":688.4682750701904,"z":"c61f02a7.f710b","wires":[]},{"id":"9d55e492.693d48","type":"comment","name":"request-action = VNFActivateRequest","info":"","comments":"","x":700.023811340332,"y":98.68254089355469,"z":"c61f02a7.f710b","wires":[]},{"id":"8ef75230.30a75","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":818.2977523803711,"y":553.7861671447754,"z":"c61f02a7.f710b","wires":[["e8c4e2c.01b712"]]},{"id":"34349fb4.a298a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"Encountered error while updating vf-module orchestration-status in AnAI\"/>","comments":"","x":1202.4406814575195,"y":553.7862377166748,"z":"c61f02a7.f710b","wires":[]},{"id":"64dd9984.c41aa8","type":"save","name":"save relationship: l3-network","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tand generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\tforce=\"true\" \n\tlocal-only=\"false\">\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />","comments":"","outputs":1,"x":820.6032409667969,"y":396.6863851547241,"z":"c61f02a7.f710b","wires":[["df85f46a.a2a638"]]},{"id":"df85f46a.a2a638","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1033.2475128173828,"y":396.7333993911743,"z":"c61f02a7.f710b","wires":[["90ef1bbc.fcd5d8"]]},{"id":"d85c86c9.1e8a28","type":"for","name":"for i : SERVICE_DATA vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":526.2500457763672,"y":396.6548662185669,"z":"c61f02a7.f710b","wires":[["64dd9984.c41aa8"]]},{"id":"cab52ea5.e9d35","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Encountered error while saving vf-module l3-network relationship in AnAI with network-id = ' + $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`\"/>","comments":"","x":1202.2975769042969,"y":506.7497262954712,"z":"c61f02a7.f710b","wires":[]},{"id":"90ef1bbc.fcd5d8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":992.011962890625,"y":459.0355796813965,"z":"c61f02a7.f710b","wires":[["1f3d8f07.94f7b1","cab52ea5.e9d35"]]},{"id":"1f3d8f07.94f7b1","type":"save","name":"delete vf-module: l3-network relationship","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\tAND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id \n\t\tAND related-to = l3-network\" \n\tforce=\"true\" \n\tlocal-only=\"false\">","comments":"","outputs":1,"x":1285.440559387207,"y":459.4643259048462,"z":"c61f02a7.f710b","wires":[[]]},{"id":"3fd98125.b3edde","type":"save","name":"update AnAI - vf-module.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tand generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\t\tlocal-only=\"false\" >\n\t<parameter name=\"orchestration-status\" value=\"pending-create\" />","comments":"","outputs":1,"x":553.7738952636719,"y":553.797664642334,"z":"c61f02a7.f710b","wires":[["8ef75230.30a75"]]},{"id":"e8c4e2c.01b712","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":976.7263259887695,"y":553.8929262161255,"z":"c61f02a7.f710b","wires":[["34349fb4.a298a","1f3d8f07.94f7b1"]]},{"id":"ea24658e.334798","type":"call","name":"call: vnf-topology-assign-vfmodule","xml":"<call module='VNF-API' rpc='vnf-topology-assign-vfmodule' mode='sync' >","comments":"","outputs":1,"x":520.5238342285156,"y":286.3214416503906,"z":"c61f02a7.f710b","wires":[[]]},{"id":"3868dfb4.d7723","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":484.4286422729492,"y":647.8928623199463,"z":"c61f02a7.f710b","wires":[[]]},{"id":"954a9a87.8b91b8","type":"switchNode","name":"switch ...SERVICE-DATA vnf-networks[]","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":538.6071929931641,"y":336.89287185668945,"z":"c61f02a7.f710b","wires":[["49274fc7.115de"]]},{"id":"49274fc7.115de","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":779.0516662597656,"y":336.42058181762695,"z":"c61f02a7.f710b","wires":[["b1bab9f3.5e4328"]]},{"id":"b1bab9f3.5e4328","type":"set","name":"set SERVICE-DATA vnf-networks[] = 0","xml":"<set>\n<parameter name='service-data.vnf-topology-information.vnf-assignments.vnf-networks_length' value='0' />\n","comments":"","outputs":1,"x":1000.607275221083,"y":336.4206024805703,"z":"c61f02a7.f710b","wires":[[]]},{"id":"69314bf3.7bab64","type":"save","name":"GET AnAI - vf-module","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tand generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.vfmodule\" >","comments":"","outputs":1,"x":484.10716247558594,"y":181.07143688201904,"z":"c61f02a7.f710b","wires":[["7ddae686.7d9d48","4aa52b8f.fa62b4"]]},{"id":"7ddae686.7d9d48","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":678.1071624755859,"y":180.82143688201904,"z":"c61f02a7.f710b","wires":[["72bfa174.1630f"]]},{"id":"4aa52b8f.fa62b4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":685.607177734375,"y":220.82144737243652,"z":"c61f02a7.f710b","wires":[["a517ff09.80f91"]]},{"id":"72bfa174.1630f","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Encountered error while querying vf-module from AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\"/>","comments":"","x":832.3571624755859,"y":180.57143688201904,"z":"c61f02a7.f710b","wires":[]},{"id":"a517ff09.80f91","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'vf-module not found in AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\"/>","comments":"","x":852.8571624755859,"y":221.07143688201904,"z":"c61f02a7.f710b","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-changeassign.json b/platform-logic/vnfapi/src/main/json/vnf-topology-changeassign.json
new file mode 100644
index 0000000..5c4b03c
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-changeassign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"31d117bd.10a048","type":"dgstart","name":"DGSTART","outputs":1,"x":126.25,"y":58.75,"z":"a5fb464c.c71c28","wires":[["2d3833.abbcb7ce"]]},{"id":"2d3833.abbcb7ce","type":"service-logic","name":"VNF-API 2.1.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":291.4166564941406,"y":58.91667175292969,"z":"a5fb464c.c71c28","wires":[["a102d673.d7f388"]]},{"id":"efb068cd.5823f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":203.75000762939453,"y":161.75,"z":"a5fb464c.c71c28","wires":[["f8ca55f5.34b0b8","af9ec214.64e7a","e2492eda.02325","2abf740c.cd838c","c7d8c86f.119978","7e665123.21b8b","59d37872.b8ce68","7c97e6ef.65e338","be63322a.38b31","eb3fccd4.5ce26"]]},{"id":"f8ca55f5.34b0b8","type":"set","name":"set: order-status = PendingUpdate","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"PendingUpdate\"/>","comments":"","outputs":1,"x":499.1948776245117,"y":886.2110958099365,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"af9ec214.64e7a","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":437.4646911621094,"y":1021.0109748840332,"z":"a5fb464c.c71c28","wires":[]},{"id":"e2492eda.02325","type":"switchNode","name":"switch: service-data order-status = Active","xml":"<switch test=\"`$service-data.oper-status.order-status == Active`\">\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":522.25,"y":205.75,"z":"a5fb464c.c71c28","wires":[["b2a5f07c.04d7d"]]},{"id":"26a5b9af.94f946","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid service-data order status'/>","comments":"","x":926.9998168945312,"y":205.5833740234375,"z":"a5fb464c.c71c28","wires":[]},{"id":"b2a5f07c.04d7d","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":768.4166259765625,"y":205.333251953125,"z":"a5fb464c.c71c28","wires":[["26a5b9af.94f946"]]},{"id":"a102d673.d7f388","type":"method","name":"method vnf-topology-changeassign","xml":"<method rpc='vnf-topology-changeassign' mode='sync'>\n","comments":"","outputs":1,"x":226.25,"y":109.75,"z":"a5fb464c.c71c28","wires":[["efb068cd.5823f8"]]},{"id":"2abf740c.cd838c","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-action\" value=\"`$service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":437.20243072509766,"y":932.226110458374,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"c7d8c86f.119978","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-order-status\" value=\"`$service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":501.20243072509766,"y":840.226110458374,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"7e665123.21b8b","type":"call","name":"call: vnf-topology-assign-vfmodule","xml":"<call module='VNF-API' rpc='vnf-topology-assign-vfmodule' mode='sync' >","comments":"","outputs":1,"x":500.25,"y":250.75,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"7c97e6ef.65e338","type":"save","name":"delete relationship: vf-module","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tAND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id \n\t\t\tAND related-to = l3-network\" \n\tforce=\"true\" \n\tlocal-only=\"false\">","comments":"","outputs":1,"x":484.39288330078125,"y":395.3216552734375,"z":"a5fb464c.c71c28","wires":[["7cf8a075.0c7b6"]]},{"id":"71ebaa69.659a44","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while deleting existing vf-module l3-network relationship in AnAI with with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id + ' vf-module update FAILED.'`\"/>","comments":"","x":886.2498779296875,"y":395.6070251464844,"z":"a5fb464c.c71c28","wires":[]},{"id":"59d37872.b8ce68","type":"save","name":"get AnAI - vf-module","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tand generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.vfmodule\">","comments":"","outputs":1,"x":458.25,"y":296.75,"z":"a5fb464c.c71c28","wires":[["70f5df5a.ae288","da907bbd.1df408"]]},{"id":"42a2f99d.70da88","type":"save","name":"save vf-module relationship: l3-network","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tAND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\tforce=\"true\" \n\tlocal-only=\"false\">\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />","comments":"","outputs":1,"x":826.5554656982422,"y":484.6502323150635,"z":"a5fb464c.c71c28","wires":[["34aa2d4f.eeba12"]]},{"id":"34aa2d4f.eeba12","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1069.69970703125,"y":484.6972646713257,"z":"a5fb464c.c71c28","wires":[["d4b975b3.5b0b68"]]},{"id":"be63322a.38b31","type":"for","name":"for i : SERVICE_DATA vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":504.2022705078125,"y":484.61871337890625,"z":"a5fb464c.c71c28","wires":[["42a2f99d.70da88"]]},{"id":"62d9f13e.cced9","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to update vf-module l3-network relationship in AnAI. ' + $error-message`\"/>","comments":"","x":1396.6425323486328,"y":764.8921175003052,"z":"a5fb464c.c71c28","wires":[]},{"id":"d4b975b3.5b0b68","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1215.6784591674805,"y":484.9280080795288,"z":"a5fb464c.c71c28","wires":[["62d9f13e.cced9","9440d75c.a932c8","4db9652d.ed131c","28a4b739.327c78"]]},{"id":"4db9652d.ed131c","type":"save","name":"delete relationship: vf-module","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tAND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id \n\t\t\tAND related-to = l3-network\" \n\tforce=\"true\" \n\tlocal-only=\"false\">","comments":"","outputs":1,"x":1456.6070709228516,"y":532.8567838668823,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"9447b7ff.c2b628","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\"/>","comments":"","x":839.5355834960938,"y":297.4641418457031,"z":"a5fb464c.c71c28","wires":[]},{"id":"7cf8a075.0c7b6","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":700.25,"y":395.75,"z":"a5fb464c.c71c28","wires":[["71ebaa69.659a44"]]},{"id":"eb3fccd4.5ce26","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":458.8214645385742,"y":978.1786098480225,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"28a4b739.327c78","type":"for","name":"for i : tmp.AnAI.vfmodule.relationship","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.vfmodule.relationship-list.relationship_length`\">","comments":"","outputs":1,"x":1476.1428756713867,"y":582.321457862854,"z":"a5fb464c.c71c28","wires":[["cab01870.1f3998"]]},{"id":"cab01870.1f3998","type":"switchNode","name":"switch: relationship.related-to","xml":"<switch test=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].related-to`\">","comments":"","outputs":1,"x":1785.1428451538086,"y":583.0357780456543,"z":"a5fb464c.c71c28","wires":[["8c96096.770f9f8"]]},{"id":"8c96096.770f9f8","type":"other","name":"l3-network","xml":"<outcome value='l3-network'>","comments":"","outputs":1,"x":2008.1428451538086,"y":583.0357780456543,"z":"a5fb464c.c71c28","wires":[["32c23b53.ebdd34"]]},{"id":"32c23b53.ebdd34","type":"for","name":"for j : tmp.AnAI.vfmodule.relationship-data","xml":"<for index=\"j\" start=\"0\" end=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length`\">","comments":"","outputs":1,"x":1603.142837524414,"y":665.6786203384399,"z":"a5fb464c.c71c28","wires":[["62acd50c.89a44c"]]},{"id":"62acd50c.89a44c","type":"save","name":"save vf-module relationship: l3-network","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tAND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\tforce=\"true\" \n\tlocal-only=\"false\">\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data[$j].relationship-value`\" />","comments":"","outputs":1,"x":1960.7142944335938,"y":665.8215036392212,"z":"a5fb464c.c71c28","wires":[["4d56aed6.76e2d","145c425.478d3be"]]},{"id":"4d56aed6.76e2d","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2218.7142944335938,"y":665.8215036392212,"z":"a5fb464c.c71c28","wires":[["5961586a.d170d8"]]},{"id":"70f5df5a.ae288","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":648.1071739196777,"y":296.8928680419922,"z":"a5fb464c.c71c28","wires":[["9447b7ff.c2b628"]]},{"id":"9440d75c.a932c8","type":"set","name":"set error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`' | An error occurred while saving l3-network relationship with network-id = ' + $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id + ' for vf-module with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\" />\n","comments":"","outputs":1,"x":1420.178596496582,"y":484.85717582702637,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"5961586a.d170d8","type":"set","name":"set error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`$error-message + ' | An error occurred while during rollback of l3-network relationship for vf-module with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\" />\n","comments":"","outputs":1,"x":2416.678611755371,"y":665.3571481704712,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"da907bbd.1df408","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":655,"y":339.33331298828125,"z":"a5fb464c.c71c28","wires":[["9447b7ff.c2b628"]]},{"id":"145c425.478d3be","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2229,"y":707,"z":"a5fb464c.c71c28","wires":[["5961586a.d170d8"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-changedelete.json b/platform-logic/vnfapi/src/main/json/vnf-topology-changedelete.json
new file mode 100644
index 0000000..aec5495
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-changedelete.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"acc7a1a9.a1048","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":202.5,"y":202.5,"z":"c2480ba7.74ffa8","wires":[["64cc4463.d3e58c","85ab4097.8b2dc","acf4923b.06fde","5df44df2.cfa404","a0786094.6ea81","ecb32124.6cd76","b4b1be1a.81bad","b95c32b4.219e1"]]},{"id":"eaa42ad6.78f358","type":"method","name":"method vnf-topology-changedelete","xml":"<method rpc='vnf-topology-changedelete' mode='sync'>\n","comments":"","outputs":1,"x":263.16668701171875,"y":128.66666507720947,"z":"c2480ba7.74ffa8","wires":[["acc7a1a9.a1048"]]},{"id":"64cc4463.d3e58c","type":"switchNode","name":"switch: order-status = Active","xml":"<switch test=\"'$service-data.oper-status.order-status == Active'\">\n\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":497.83331298828125,"y":260.8331604003906,"z":"c2480ba7.74ffa8","wires":[["b18f56cb.33d1f8"]]},{"id":"c7301650.992bf8","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":333.1666564941406,"y":82.666672706604,"z":"c2480ba7.74ffa8","wires":[["eaa42ad6.78f358"]]},{"id":"b18f56cb.33d1f8","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":718.1666870117188,"y":261.1664733886719,"z":"c2480ba7.74ffa8","wires":[["94a2faf.7549008"]]},{"id":"608bf838.51bd68","type":"dgstart","name":"DGSTART","outputs":1,"x":170,"y":82.50000095367432,"z":"c2480ba7.74ffa8","wires":[["c7301650.992bf8"]]},{"id":"94a2faf.7549008","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid last-order-status'/>","comments":"","x":877.4998168945312,"y":261.16651916503906,"z":"c2480ba7.74ffa8","wires":[]},{"id":"85ab4097.8b2dc","type":"set","name":"set: order-status = PendingDelete","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"PendingDelete\"/>","comments":"","outputs":1,"x":512.9999694824219,"y":422.4999694824219,"z":"c2480ba7.74ffa8","wires":[[]]},{"id":"acf4923b.06fde","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />\n","comments":"","x":459,"y":589.4999694824219,"z":"c2480ba7.74ffa8","wires":[]},{"id":"efff4a22.b9abb8","type":"comment","name":"Update VNF status to PendingDelete","info":"","comments":"","x":1071.3333740234375,"y":73.38889789581299,"z":"c2480ba7.74ffa8","wires":[]},{"id":"67d8ea7b.3b55e4","type":"comment","name":"VNF-TOPOLOGY-CHANGEDELETE","info":"","comments":"","x":766.8889007568359,"y":73.05555725097656,"z":"c2480ba7.74ffa8","wires":[]},{"id":"94a9e016.11104","type":"comment","name":"request-action = DisconnectVNFRequest, svc-action = changedelete","info":"","comments":"","x":899.7777404785156,"y":109.1666669845581,"z":"c2480ba7.74ffa8","wires":[]},{"id":"ecb32124.6cd76","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-action\" value=\"`$service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":456,"y":476.4999694824219,"z":"c2480ba7.74ffa8","wires":[[]]},{"id":"5df44df2.cfa404","type":"switchNode","name":"switch:vnf-id config == input","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`\">","comments":"","outputs":1,"x":495.1363830566406,"y":203.69192504882812,"z":"c2480ba7.74ffa8","wires":[["e76a19e5.7aa208"]]},{"id":"e76a19e5.7aa208","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":717.5909118652344,"y":203.87375259399414,"z":"c2480ba7.74ffa8","wires":[["7f2aec26.3ec724"]]},{"id":"7f2aec26.3ec724","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-id not found'/>","comments":"","x":875.6818161010742,"y":203.78285026550293,"z":"c2480ba7.74ffa8","wires":[]},{"id":"a0786094.6ea81","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-order-status\" value=\"`$service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":518.1363525390625,"y":371.6919250488281,"z":"c2480ba7.74ffa8","wires":[[]]},{"id":"b4b1be1a.81bad","type":"set","name":"set: service-data = input","xml":"<set>\n\t<parameter name=\"service-data.\" value=\"vnf-topology-operation-input.\" /> \n","comments":"","outputs":1,"x":487.1363525390625,"y":530.6918640136719,"z":"c2480ba7.74ffa8","wires":[[]]},{"id":"b95c32b4.219e1","type":"save","name":"update generic-vnf status to pending-delete","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"vnf-id = $vnf-topology-operation-input.vnf-request-information.vnf-id\" \n\tforce=\"true\" \n\tlocal-only=\"false\" >\n\t<parameter name=\"orchestration-status\" value=\"pending-delete\" />\n","comments":"","outputs":1,"x":542.1363525390625,"y":316.6918640136719,"z":"c2480ba7.74ffa8","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-delete.json b/platform-logic/vnfapi/src/main/json/vnf-topology-delete.json
new file mode 100644
index 0000000..aee34c1
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-delete.json
@@ -0,0 +1,3 @@
+
+
+[{"id":"fcf7e196.b57a18","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":407,"y":762.7500286102295,"z":"56a388d8.4ce54","wires":[]},{"id":"31ea957a.8db692","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":183.99996185302734,"y":123,"z":"56a388d8.4ce54","wires":[["9de92ad.50ab058","fcf7e196.b57a18","bb79241.52c52d8","32164f41.c7fe48","4983281c.426558","a52c709c.8702d","a6b4d2d7.948f98","1672533.d5ee9ad"]]},{"id":"9de92ad.50ab058","type":"set","name":"set: order-status = Deleted","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"Deleted\"/>","comments":"","x":448,"y":589.7500286102295,"z":"56a388d8.4ce54","wires":[[]]},{"id":"1ccc10cf.aaa8b7","type":"method","name":"method vnf-topology-delete","xml":"<method rpc='vnf-topology-delete' mode='sync'>\n","comments":"","outputs":1,"x":215.6666488647461,"y":72.16666412353516,"z":"56a388d8.4ce54","wires":[["31ea957a.8db692"]]},{"id":"a68ff260.8bc4","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":285.66661834716797,"y":20.166671752929688,"z":"56a388d8.4ce54","wires":[["1ccc10cf.aaa8b7"]]},{"id":"f5fafe40.045238","type":"dgstart","name":"DGSTART","outputs":1,"x":122.49996185302734,"y":20,"z":"56a388d8.4ce54","wires":[["a68ff260.8bc4"]]},{"id":"3d3232c2.77f4ce","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1110.9242897033691,"y":204.46213626861572,"z":"56a388d8.4ce54","wires":[["26bca269.f17f9e"]]},{"id":"26bca269.f17f9e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1263.2574195861816,"y":204.46219730377197,"z":"56a388d8.4ce54","wires":[]},{"id":"4983281c.426558","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-action\" value=\"`$service-data.request-information.request-action`\"/>","comments":"","x":409.2575988769531,"y":633.2956218719482,"z":"56a388d8.4ce54","wires":[[]]},{"id":"bb79241.52c52d8","type":"switchNode","name":"switch:vnf-id config == input","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`\">","comments":"","outputs":1,"x":453.14385986328125,"y":122.48754501342773,"z":"56a388d8.4ce54","wires":[["beb921bb.2c9b58"]]},{"id":"beb921bb.2c9b58","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":654.5984191894531,"y":122.66937255859375,"z":"56a388d8.4ce54","wires":[["127ae102.70f307"]]},{"id":"127ae102.70f307","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-id not found'/>","comments":"","x":818.189338684082,"y":122.82847309112549,"z":"56a388d8.4ce54","wires":[]},{"id":"32164f41.c7fe48","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-order-status\" value=\"`$service-data.oper-status.order-status`\"/>","comments":"","x":474.3939514160156,"y":548.4875774383545,"z":"56a388d8.4ce54","wires":[[]]},{"id":"a52c709c.8702d","type":"set","name":"Clear vnf topology","xml":"<set>\n\t<parameter name=\"service-data.vnf-topology-information.\" value=\"\" /> \n","comments":"","x":418.3939514160156,"y":673.4875774383545,"z":"56a388d8.4ce54","wires":[[]]},{"id":"1283dc8f.0dbbdb","type":"switchNode","name":"switch: order-status = Active","xml":"<switch test=\"`$service-data.oper-status.order-status == Active`\">","comments":"","outputs":1,"x":909.1071891784668,"y":204.76193714141846,"z":"56a388d8.4ce54","wires":[["3d3232c2.77f4ce"]]},{"id":"1672533.d5ee9ad","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":429.71431732177734,"y":718.690502166748,"z":"56a388d8.4ce54","wires":[[]]},{"id":"a6b4d2d7.948f98","type":"switchNode","name":"switch: INPUT aic-cloud-region","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`\">","comments":"","outputs":1,"x":462.00001525878906,"y":205.0833387374878,"z":"56a388d8.4ce54","wires":[["3af03fc8.e707b","ddc78af.60992f8"]]},{"id":"3af03fc8.e707b","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":693.7500114440918,"y":252.72619247436523,"z":"56a388d8.4ce54","wires":[["afd57709.8addb"]]},{"id":"afd57709.8addb","type":"switchNode","name":"switch: INPUT aic-clli","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.aic-clli`\">","comments":"","outputs":1,"x":890.7500534057617,"y":252.83336067199707,"z":"56a388d8.4ce54","wires":[["dadea9f1.52f198","ac9e3f4c.36446"]]},{"id":"ddc78af.60992f8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":693.250072479248,"y":204.83335304260254,"z":"56a388d8.4ce54","wires":[["1283dc8f.0dbbdb"]]},{"id":"dadea9f1.52f198","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1085.75,"y":253.5833339691162,"z":"56a388d8.4ce54","wires":[["81095c78.688578"]]},{"id":"81095c78.688578","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Either aic-cloud-region or aic-clli must be present'/>","comments":"","x":1258.25,"y":254.0833339691162,"z":"56a388d8.4ce54","wires":[]},{"id":"ac9e3f4c.36446","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1087,"y":296.0833339691162,"z":"56a388d8.4ce54","wires":[["7a2e8e8a.7bba7"]]},{"id":"680cdb38.59b984","type":"save","name":"delete generic-vnf-l3-network","xml":"<delete plugin=\"org.openecomp.sdnc.sli.resource.sql.SqlResource\" \n\tresource=\"generic-vnf-l3-network\" \n\tkey=\"DELETE FROM GENERIC_VNF_L3_NETWORK WHERE vnf_id = $service-data.vnf-id\" \n\tforce=\"true\" >\n\n","comments":"","outputs":1,"x":1209.5000305175781,"y":418.5833568572998,"z":"56a388d8.4ce54","wires":[["bb5026cb.49ad98"]]},{"id":"e95a580b.ce45f8","type":"save","name":"delete GammaResource: generic-vnf","xml":"<delete plugin=\"org.openecomp.sdnc.sli.resource.sql.SqlResource\" \n\tresource=\"generic-vnf\" \n\tkey=\"DELETE FROM GENERIC_VNF where vnf_id = $service-data.vnf-id\" \n\tlocal-only=\"true\" \n\tforce=\"true\" >\n\n","comments":"","outputs":1,"x":1233.159194946289,"y":504.9546184539795,"z":"56a388d8.4ce54","wires":[["bb5026cb.49ad98"]]},{"id":"e46b8405.65dc18","type":"save","name":"delete generic-vnf-vserver","xml":"<delete plugin=\"org.openecomp.sdnc.sli.resource.sql.SqlResource\" \n\tresource=\"generic-vnf-vserver\" \n\tkey=\"DELETE FROM GENERIC_VNF_VSERVER where vnf_id = $service-data.vnf-id\" \n\tforce=\"true\" >\n\n","comments":"","outputs":1,"x":1200.909194946289,"y":460.0379009246826,"z":"56a388d8.4ce54","wires":[["bb5026cb.49ad98"]]},{"id":"f2b7f8ab.79b31","type":"switchNode","name":"switch: order-status = PendingDelete","xml":"<switch test=\"'$service-data.oper-status.order-status == PendingDelete'\">\n\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":1232.750015258789,"y":376.83334159851074,"z":"56a388d8.4ce54","wires":[["142b3d5d.ab57d3"]]},{"id":"142b3d5d.ab57d3","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1462.0833892822266,"y":377.166654586792,"z":"56a388d8.4ce54","wires":[["f3ef39a7.92022"]]},{"id":"f3ef39a7.92022","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1614.416519165039,"y":377.16671562194824,"z":"56a388d8.4ce54","wires":[]},{"id":"7a2e8e8a.7bba7","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":979.5,"y":377.0833339691162,"z":"56a388d8.4ce54","wires":[["680cdb38.59b984","e95a580b.ce45f8","e46b8405.65dc18","6a59db9b.2f1714"]]},{"id":"bb5026cb.49ad98","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1495.75,"y":459.5833339691162,"z":"56a388d8.4ce54","wires":[["8239c2d0.1bd9c"]]},{"id":"8239c2d0.1bd9c","type":"set","name":"set: error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occurred while deleting generic-vnf, generic-vnf-l3-netweork or generic-vnf-vserver from GammaResource\"/>","comments":"","x":1678.2500228881836,"y":459.58334255218506,"z":"56a388d8.4ce54","wires":[[]]},{"id":"6a59db9b.2f1714","type":"save","name":"delete AnAI: generic-vnf","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\tkey=\"generic-vnf.vnf-id = $service-data.vnf-id\" \n\tlocal-only=\"false\" \n\tforce=\"true\" >\n\n","comments":"","outputs":1,"x":1191.5,"y":549.3333339691162,"z":"56a388d8.4ce54","wires":[["6f19a831.9a037"]]},{"id":"6f19a831.9a037","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1384.590805053711,"y":549.4620494842529,"z":"56a388d8.4ce54","wires":[["d613b798.91976"]]},{"id":"d613b798.91976","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to delete generic-vnf from AnAI with vnf-id = '+ $service-data.vnf-id`\"/>","comments":"","x":1542.7573318481445,"y":549.5454301834106,"z":"56a388d8.4ce54","wires":[]},{"id":"1e6708d8.18e507","type":"comment","name":"NOT checking order-status intentionally","info":"","comments":"","x":1337.000015258789,"y":341.0833396911621,"z":"56a388d8.4ce54","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-operation.json b/platform-logic/vnfapi/src/main/json/vnf-topology-operation.json
new file mode 100644
index 0000000..3658949
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-operation.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"958f963f.31b188","type":"dgstart","name":"DGSTART","outputs":1,"x":119,"y":55,"z":"25983d3c.1a46c2","wires":[["d0fd6aea.b81a28"]]},{"id":"d0fd6aea.b81a28","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":286.2777633666992,"y":54.66666889190674,"z":"25983d3c.1a46c2","wires":[["1c65065f.c3d76a"]]},{"id":"1c65065f.c3d76a","type":"method","name":"vnf-topology-operation","xml":"<method rpc='vnf-topology-operation' mode='sync'>\n","comments":"","outputs":1,"x":176.49999237060547,"y":97.22221946716309,"z":"25983d3c.1a46c2","wires":[["3cc3382f.1bf7c8"]]},{"id":"dde1c2c4.10a5a","type":"switchNode","name":"switch: svc-action","xml":"<switch test=\"`$vnf-topology-operation-input.sdnc-request-header.svc-action`\">\n<!--\nleaf svc-action { \n\ttype enumeration { \n\t\tenum \"reserve\";\n\t\tenum \"assign\";\n\t\tenum \"activate\"; // equal to commit\n\t\tenum \"delete\";\t // equal to commit\n\t\tenum \"changeassign\";\n\t\tenum \"changedelete\";\n\t\tenum \"rollback\";\n\t}\n}\n-->\n\n","comments":"","outputs":1,"x":370.55554962158203,"y":728.3332614898682,"z":"25983d3c.1a46c2","wires":[["8f40217f.2be81","44aca114.d2cc","972c2555.d107c8","5e0f2d9d.3e79e4","cbce4b74.b01e88","57c70c87.486604","b4b94e63.99422"]]},{"id":"8f40217f.2be81","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":578.3611526489258,"y":1255.0832691192627,"z":"25983d3c.1a46c2","wires":[["7399697a.b21158"]]},{"id":"44aca114.d2cc","type":"other","name":"assign","xml":"<outcome value='assign'>","comments":"","outputs":1,"x":588.1111068725586,"y":728.3332672119141,"z":"25983d3c.1a46c2","wires":[["221592c2.d2e22e"]]},{"id":"7399697a.b21158","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='svc-action not recognized'/>\n","comments":"","x":750.3611526489258,"y":1255.0832691192627,"z":"25983d3c.1a46c2","wires":[]},{"id":"972c2555.d107c8","type":"other","name":"activate","xml":"<outcome value='activate'>","comments":"","outputs":1,"x":591.1111221313477,"y":817.5832557678223,"z":"25983d3c.1a46c2","wires":[["42a68a05.d53734"]]},{"id":"5e0f2d9d.3e79e4","type":"other","name":"rollback","xml":"<outcome value='rollback'>","comments":"","outputs":1,"x":590.8611221313477,"y":859.8332567214966,"z":"25983d3c.1a46c2","wires":[["a61ccd6d.3aebe"]]},{"id":"57c70c87.486604","type":"other","name":"changeassign","xml":"<outcome value='changeassign'>","comments":"","outputs":1,"x":609.6111221313477,"y":773.8332576751709,"z":"25983d3c.1a46c2","wires":[["e15984c8.645068"]]},{"id":"cbce4b74.b01e88","type":"other","name":"delete","xml":"<outcome value='delete'>","comments":"","outputs":1,"x":586.1111602783203,"y":1127.5832681655884,"z":"25983d3c.1a46c2","wires":[["f561040f.098178"]]},{"id":"b2b5054b.a272c8","type":"call","name":"call: vnf-topology-assign","xml":"<call module='VNF-API' rpc='vnf-topology-assign' mode='sync' >","comments":"","outputs":1,"x":980.3611068725586,"y":728.3332653045654,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"b4b94e63.99422","type":"other","name":"changedelete","xml":"<outcome value='changedelete'>","comments":"","outputs":1,"x":607.8611526489258,"y":957.5832653045654,"z":"25983d3c.1a46c2","wires":[["c42de2b1.7e92f"]]},{"id":"ba1b2b13.db9ac8","type":"call","name":"call: vnf-topology-changeassign","xml":"<call module='VNF-API' rpc='vnf-topology-changeassign' mode='sync' >","comments":"","outputs":1,"x":1003.6112289428711,"y":772.3332653045654,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"3dbb27de.9f2dc8","type":"call","name":"call: vnf-topology-rollback","xml":"<call module='VNF-API' rpc='vnf-topology-rollback' mode='sync' >","comments":"","outputs":1,"x":985.3612289428711,"y":859.8332672119141,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"f561040f.098178","type":"call","name":"call: vnf-topology-delete","xml":"<call module='VNF-API' rpc='vnf-topology-delete' mode='sync' >","comments":"","outputs":1,"x":794.8612289428711,"y":1127.5832691192627,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"c6b280b0.6cd7f","type":"call","name":"call: vnf-topology-activate","xml":"<call module='VNF-API' rpc='vnf-topology-activate' mode='sync' >","comments":"","outputs":1,"x":984.8612213134766,"y":816.833261013031,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"155d31e0.05b84e","type":"call","name":"call: vnf-topology-changedelete","xml":"<call module='VNF-API' rpc='vnf-topology-changedelete' mode='sync' >","comments":"","outputs":1,"x":990.3612365722656,"y":1048.583267211914,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"a7b54cb3.980ce","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"svc-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$vnf-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$vnf-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$vnf-topology-operation-input.service-information.service-instance-id`\"/>\n<parameter name=\"field6\" value=\"`$vnf-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$vnf-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$vnf-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field9\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-name`\"/>\n<parameter name=\"field10\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-type`\"/>\n<parameter name=\"field11\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id`\"/>\n<parameter name=\"field12\" value=\"`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`\"/>\n<parameter name=\"field13\" value=\"`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`\"/>\n<parameter name=\"field14\" value=\"`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\"/>\n<parameter name=\"field15\" value=\"`$vnf-topology-operation-input.vnf-request-information.tenant`\"/>\n<parameter name=\"field16\" value=\"`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-name`\"/>\n<parameter name=\"field17\" value=\"`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-type`\"/>\n<parameter name=\"field18\" value=\"`$preload-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":340.5555725097656,"y":142.88889503479004,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"bffc5a60.352f28","type":"comment","name":"vnf-topology-operation","info":"","comments":"","x":581.8888778686523,"y":77.44444465637207,"z":"25983d3c.1a46c2","wires":[]},{"id":"3cc3382f.1bf7c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":176.00000762939453,"y":143.0000057220459,"z":"25983d3c.1a46c2","wires":[["a7b54cb3.980ce","54531a3f.9a8244","f8efbd03.26ae7","dde1c2c4.10a5a","28d8bce6.199104"]]},{"id":"54531a3f.9a8244","type":"switchNode","name":"switch: INPUT vnf-name","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-name`\">","comments":"","outputs":1,"x":393.22222900390625,"y":187.44443321228027,"z":"25983d3c.1a46c2","wires":[["45cb3770.822158","cf085c81.629d9"]]},{"id":"45cb3770.822158","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":607.2222290039062,"y":187.44443321228027,"z":"25983d3c.1a46c2","wires":[["edf87ba5.9649e8"]]},{"id":"cf085c81.629d9","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":608.2222290039062,"y":223.44443321228027,"z":"25983d3c.1a46c2","wires":[["c31d2b9a.235b38"]]},{"id":"edf87ba5.9649e8","type":"switchNode","name":"switch: PRELOAD vnf-name","xml":"<switch test=\"`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-name`\">","comments":"","outputs":1,"x":818.2222290039062,"y":187.44443321228027,"z":"25983d3c.1a46c2","wires":[["dd3bda61.91fef8","d1fbfea6.d6b4e"]]},{"id":"dd3bda61.91fef8","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1029.2222290039062,"y":187.44443321228027,"z":"25983d3c.1a46c2","wires":[["a56ba8fa.fd0dc8"]]},{"id":"d1fbfea6.d6b4e","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1030.2222290039062,"y":222.44443321228027,"z":"25983d3c.1a46c2","wires":[["74256d47.66f134"]]},{"id":"a56ba8fa.fd0dc8","type":"switchNode","name":"switch: vnf-name INPUT == PRELOAD","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-name == $preload-data.vnf-topology-information.vnf-topology-identifier.vnf-name`\">","comments":"","outputs":1,"x":1277.2222137451172,"y":187.44443130493164,"z":"25983d3c.1a46c2","wires":[["fd6ecd32.7e998"]]},{"id":"fd6ecd32.7e998","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1523.5555801391602,"y":187.1113338470459,"z":"25983d3c.1a46c2","wires":[["d4097d82.5bf18"]]},{"id":"d4097d82.5bf18","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='request.vnf-name not found in preload-data'/>","comments":"","x":1682.2222061157227,"y":186.44443321228027,"z":"25983d3c.1a46c2","wires":[]},{"id":"74256d47.66f134","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='No preload data found to match vnf-name'/>","comments":"","x":1197.2222290039062,"y":222.44443321228027,"z":"25983d3c.1a46c2","wires":[]},{"id":"c31d2b9a.235b38","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-name is required'/>","comments":"","x":769.7222290039062,"y":223.69443321228027,"z":"25983d3c.1a46c2","wires":[]},{"id":"f8efbd03.26ae7","type":"switchNode","name":"switch: INPUT vnf-type","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-type`\">","comments":"","outputs":1,"x":389.2222595214844,"y":275.4444332122803,"z":"25983d3c.1a46c2","wires":[["65e149af.cbde18","ea33806b.6d2f5"]]},{"id":"65e149af.cbde18","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":606.2222518920898,"y":276.4444332122803,"z":"25983d3c.1a46c2","wires":[["62202805.17d5c8"]]},{"id":"ea33806b.6d2f5","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":607.2222518920898,"y":312.4444332122803,"z":"25983d3c.1a46c2","wires":[["ac6b3fa2.70605"]]},{"id":"62202805.17d5c8","type":"switchNode","name":"switch: PRELOAD vnf-type","xml":"<switch test=\"`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-type`\">","comments":"","outputs":1,"x":817.2222518920898,"y":276.4444332122803,"z":"25983d3c.1a46c2","wires":[["c1ab266d.3e50e8","6103e8e2.d0ac48"]]},{"id":"c1ab266d.3e50e8","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1028.2222518920898,"y":276.4444332122803,"z":"25983d3c.1a46c2","wires":[["7d4ee884.193e58"]]},{"id":"6103e8e2.d0ac48","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1029.2222518920898,"y":311.4444332122803,"z":"25983d3c.1a46c2","wires":[["25b723b.6c928dc"]]},{"id":"ac6b3fa2.70605","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-type is required'/>","comments":"","x":768.7222518920898,"y":312.6944332122803,"z":"25983d3c.1a46c2","wires":[]},{"id":"7d4ee884.193e58","type":"switchNode","name":"switch: vnf-type INPUT == PRELOAD","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-type == $preload-data.vnf-topology-information.vnf-topology-identifier.vnf-type`\">","comments":"","outputs":1,"x":1276.2222290039062,"y":276.4444332122803,"z":"25983d3c.1a46c2","wires":[["3f9c526d.64517e"]]},{"id":"25b723b.6c928dc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='No preload data found to match vnf-type'/>","comments":"","x":1196.2222290039062,"y":311.4444332122803,"z":"25983d3c.1a46c2","wires":[]},{"id":"3f9c526d.64517e","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1525.2222290039062,"y":276.7779293060303,"z":"25983d3c.1a46c2","wires":[["1f890771.7bde59"]]},{"id":"1f890771.7bde59","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='request.vnf-type not found in preload-data'/>","comments":"","x":1683.8888549804688,"y":276.11102867126465,"z":"25983d3c.1a46c2","wires":[]},{"id":"28d8bce6.199104","type":"switchNode","name":"switch: INPUT vnf-id","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id`\">","comments":"","outputs":1,"x":381.9009017944336,"y":369.9087600708008,"z":"25983d3c.1a46c2","wires":[["ae4cccb8.ead7f","c595b7b0.cb5c08"]]},{"id":"c595b7b0.cb5c08","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":564.9008712768555,"y":407.05159759521484,"z":"25983d3c.1a46c2","wires":[["c4592136.61d7c"]]},{"id":"ae4cccb8.ead7f","type":"outcome","name":"0","xml":"<outcome value='0'>","comments":"","outputs":1,"x":564.0438003540039,"y":369.4801959991455,"z":"25983d3c.1a46c2","wires":[["c4592136.61d7c"]]},{"id":"c4592136.61d7c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vf-modules vnf-id cannot be NULL or 0'/>","comments":"","x":739.7580795288086,"y":407.33731842041016,"z":"25983d3c.1a46c2","wires":[]},{"id":"40476a8f.071944","type":"switchNode","name":"switch: INPUT generic-vnf-id","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\">","comments":"","outputs":1,"x":1187.972312927246,"y":471.19446659088135,"z":"25983d3c.1a46c2","wires":[["71e91fc9.fc681","eaa464db.400d28"]]},{"id":"eaa464db.400d28","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1420.972282409668,"y":509.3373041152954,"z":"25983d3c.1a46c2","wires":[["f557b1e2.3389f"]]},{"id":"71e91fc9.fc681","type":"outcome","name":"0","xml":"<outcome value='0'>","comments":"","outputs":1,"x":1420.1152114868164,"y":471.7659025192261,"z":"25983d3c.1a46c2","wires":[["f557b1e2.3389f"]]},{"id":"f557b1e2.3389f","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/>","comments":"","x":1574.829490661621,"y":509.6230249404907,"z":"25983d3c.1a46c2","wires":[]},{"id":"6c32f4a6.dc1bbc","type":"switchNode","name":"switch: INPUT generic-vnf-name","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`\">","comments":"","outputs":1,"x":1199.722312927246,"y":552.1944665908813,"z":"25983d3c.1a46c2","wires":[["65632028.5d066"]]},{"id":"65632028.5d066","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1417.722282409668,"y":552.3373041152954,"z":"25983d3c.1a46c2","wires":[["8ba72342.bbed5"]]},{"id":"8ba72342.bbed5","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='generic-vnf-name cannot be NULL'/>","comments":"","x":1571.579490661621,"y":552.6230249404907,"z":"25983d3c.1a46c2","wires":[]},{"id":"b28e0cca.d41bb","type":"switchNode","name":"switch: INPUT generic-vnf-type","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`\">","comments":"","outputs":1,"x":1193.972312927246,"y":596.1944665908813,"z":"25983d3c.1a46c2","wires":[["aa1b2f7.b06f8d"]]},{"id":"aa1b2f7.b06f8d","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1411.972282409668,"y":596.3373041152954,"z":"25983d3c.1a46c2","wires":[["e2e17d64.872be"]]},{"id":"e2e17d64.872be","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='generic-vnf-type cannot be NULL'/>","comments":"","x":1565.829490661621,"y":596.6230249404907,"z":"25983d3c.1a46c2","wires":[]},{"id":"58a1478b.c0e8f8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":957.5001373291016,"y":470.75006675720215,"z":"25983d3c.1a46c2","wires":[["40476a8f.071944","6c32f4a6.dc1bbc","b28e0cca.d41bb","529f560e.4f4038"]]},{"id":"42a68a05.d53734","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":739.5000152587891,"y":817.0000095367432,"z":"25983d3c.1a46c2","wires":[["58a1478b.c0e8f8","c6b280b0.6cd7f"]]},{"id":"e15984c8.645068","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":768.2500152587891,"y":773.2500095367432,"z":"25983d3c.1a46c2","wires":[["58a1478b.c0e8f8","ba1b2b13.db9ac8"]]},{"id":"a61ccd6d.3aebe","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":740.7500152587891,"y":859.5000104904175,"z":"25983d3c.1a46c2","wires":[["3dbb27de.9f2dc8","58a1478b.c0e8f8"]]},{"id":"221592c2.d2e22e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":758.2500152587891,"y":728.2500114440918,"z":"25983d3c.1a46c2","wires":[["58a1478b.c0e8f8","b2b5054b.a272c8"]]},{"id":"5199930f.f65cbc","type":"comment","name":"changedelete is for 1604 VNF ONLY","info":"","comments":"","x":1045.000015258789,"y":908.7500133514404,"z":"25983d3c.1a46c2","wires":[]},{"id":"529f560e.4f4038","type":"switchNode","name":"switch: INPUT aic-cloud-region","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`\">","comments":"","outputs":1,"x":1193.250015258789,"y":638.7500114440918,"z":"25983d3c.1a46c2","wires":[["97a6fbef.743c78"]]},{"id":"97a6fbef.743c78","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1411.249984741211,"y":638.8928489685059,"z":"25983d3c.1a46c2","wires":[["4f783332.567abc"]]},{"id":"4f783332.567abc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='aic-cloud-region cannot be NULL'/>","comments":"","x":1565.107192993164,"y":639.1785697937012,"z":"25983d3c.1a46c2","wires":[]},{"id":"65f88fb5.ab931","type":"switchNode","name":"switch: INPUT aic-cloud-region","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`\">","comments":"","outputs":1,"x":988.7500190734863,"y":958.0000133514404,"z":"25983d3c.1a46c2","wires":[["41b77e7.203668"]]},{"id":"41b77e7.203668","type":"outcome","name":"other","xml":"<outcome value='other'>","comments":"","outputs":1,"x":1206.7499885559082,"y":958.1428508758545,"z":"25983d3c.1a46c2","wires":[["c067f3e8.62d66"]]},{"id":"c067f3e8.62d66","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='aic-cloud-region can not be present for 1604 VNF changedelete'/>","comments":"","x":1360.6071968078613,"y":958.4285717010498,"z":"25983d3c.1a46c2","wires":[]},{"id":"bfc65951.089598","type":"switchNode","name":"switch: INPUT aic-clli","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.aic-clli`\">","comments":"","outputs":1,"x":958.7500381469727,"y":1001.5000276565552,"z":"25983d3c.1a46c2","wires":[["8c86155.bd7ede8"]]},{"id":"8c86155.bd7ede8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1140.7500076293945,"y":1001.6428651809692,"z":"25983d3c.1a46c2","wires":[["b2dd9cc5.c6ce"]]},{"id":"b2dd9cc5.c6ce","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='aic-cloud-region can not be present for 1604 VNF changedelete'/>","comments":"","x":1294.6072158813477,"y":1001.9285860061646,"z":"25983d3c.1a46c2","wires":[]},{"id":"c42de2b1.7e92f","type":"block","name":"block","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":770.0000190734863,"y":957.7500133514404,"z":"25983d3c.1a46c2","wires":[["65f88fb5.ab931","bfc65951.089598","155d31e0.05b84e"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-rollback.json b/platform-logic/vnfapi/src/main/json/vnf-topology-rollback.json
new file mode 100644
index 0000000..0f0477d
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-rollback.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"4adc401f.6fd4e","type":"comment","name":"vnf-topology-rollback","info":"","comments":"","x":768.75,"y":68.75,"z":"c46e36ad.370538","wires":[]},{"id":"a35df8d1.5089b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":176.66674041748047,"y":180.05554580688477,"z":"c46e36ad.370538","wires":[["4b413bbb.dead44"]]},{"id":"4b859f58.89806","type":"method","name":"method vnf-topology-rollback","xml":"<method rpc='vnf-topology-rollback' mode='sync'>\n","comments":"","outputs":1,"x":205.08342742919922,"y":127.47221851348877,"z":"c46e36ad.370538","wires":[["a35df8d1.5089b8"]]},{"id":"f018b62.ed5ec48","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":297.0833969116211,"y":80.4722261428833,"z":"c46e36ad.370538","wires":[["4b859f58.89806"]]},{"id":"7687c33c.8308fc","type":"dgstart","name":"DGSTART","outputs":1,"x":150.91674041748047,"y":79.3055534362793,"z":"c46e36ad.370538","wires":[["f018b62.ed5ec48"]]},{"id":"9e388b53.8eec58","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":914.9167633056641,"y":490.5806646347046,"z":"c46e36ad.370538","wires":[]},{"id":"498b1cdc.f5b874","type":"set","name":"set: order-status = Deleted","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"Deleted\"/>","comments":"","outputs":1,"x":950.6667633056641,"y":361.5806636810303,"z":"c46e36ad.370538","wires":[[]]},{"id":"966704da.f1e5e8","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":983.5077056884766,"y":275.70944595336914,"z":"c46e36ad.370538","wires":[["f9e7dbf4.3cee38"]]},{"id":"f9e7dbf4.3cee38","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1215.0910873413086,"y":275.5427579879761,"z":"c46e36ad.370538","wires":[["da524aac.dca358"]]},{"id":"da524aac.dca358","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1367.424217224121,"y":275.5428190231323,"z":"c46e36ad.370538","wires":[]},{"id":"1b62d02c.b7bba","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-action\" value=\"`$service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":912.4244575500488,"y":403.876256942749,"z":"c46e36ad.370538","wires":[[]]},{"id":"db17d4a.2603328","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1203.765281677246,"y":228.50000286102295,"z":"c46e36ad.370538","wires":[["27eb4ee.58ec4b2"]]},{"id":"27eb4ee.58ec4b2","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"`'vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' not found in config tree'`\"/>","comments":"","x":1366.856101989746,"y":228.90910625457764,"z":"c46e36ad.370538","wires":[]},{"id":"523d2145.891db","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-order-status\" value=\"`$service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":977.3108062744141,"y":318.56821060180664,"z":"c46e36ad.370538","wires":[[]]},{"id":"c8d475e9.cca918","type":"set","name":"Clear vnf topology","xml":"<set>\n\t<parameter name=\"service-data.\" value=\"\" /> \n","comments":"","outputs":1,"x":925.8108062744141,"y":447.5682125091553,"z":"c46e36ad.370538","wires":[[]]},{"id":"1b28eda7.d7bd22","type":"switchNode","name":"switch:CONFIG == INPUT - vnf-id","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`\">","comments":"","outputs":1,"x":972.9167633056641,"y":228.50000286102295,"z":"c46e36ad.370538","wires":[["db17d4a.2603328"]]},{"id":"4b413bbb.dead44","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$service-data.oper-status.order-status == PendingCreate`\">\n\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":284.166748046875,"y":227.00000667572021,"z":"c46e36ad.370538","wires":[["487e1089.4a94b"]]},{"id":"487e1089.4a94b","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":520.4167404174805,"y":227.75,"z":"c46e36ad.370538","wires":[["1f7d22e0.cbfffd"]]},{"id":"1f7d22e0.cbfffd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":682.4167404174805,"y":227.75,"z":"c46e36ad.370538","wires":[["1b28eda7.d7bd22","966704da.f1e5e8","523d2145.891db","498b1cdc.f5b874","1b62d02c.b7bba","c8d475e9.cca918","9e388b53.8eec58"]]},{"id":"9dca4993.365578","type":"comment","name":"request-action = VNFActivateRequest, svc-action = rollback","info":"","comments":"","x":780.166748046875,"y":104.75000190734863,"z":"c46e36ad.370538","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/resources/graph.versions b/platform-logic/vnfapi/src/main/resources/graph.versions
new file mode 100644
index 0000000..a49567c
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/resources/graph.versions
@@ -0,0 +1,33 @@
+VNF-API generate-l3network-network-id ${project.version} sync
+VNF-API generate-subnets-subnet-id ${project.version} sync
+VNF-API network-topology-assign ${project.version} sync
+VNF-API network-topology-changeassign ${project.version} sync
+VNF-API network-topology-delete ${project.version} sync
+VNF-API network-topology-operation ${project.version} sync
+VNF-API network-topology-rollback ${project.version} sync
+VNF-API preload-network-topology-operation ${project.version} sync
+VNF-API preload-vf-module-topology-operation ${project.version} sync
+VNF-API preload-vnf-instance-topology-operation ${project.version} sync
+VNF-API preload-vnf-topology-operation ${project.version} sync
+VNF-API vf-module-topology-activate ${project.version} sync
+VNF-API vf-module-topology-assign ${project.version} sync
+VNF-API vf-module-topology-assign-vnf-networks ${project.version} sync
+VNF-API vf-module-topology-changeassign ${project.version} sync
+VNF-API vf-module-topology-delete ${project.version} sync
+VNF-API vf-module-topology-operation ${project.version} sync
+VNF-API vf-module-topology-rollback ${project.version} sync
+VNF-API vnf-instance-topology-activate ${project.version} sync
+VNF-API vnf-instance-topology-assign ${project.version} sync
+VNF-API vnf-instance-topology-assign-vnf-networks ${project.version} sync
+VNF-API vnf-instance-topology-changeassign ${project.version} sync
+VNF-API vnf-instance-topology-delete ${project.version} sync
+VNF-API vnf-instance-topology-operation ${project.version} sync
+VNF-API vnf-instance-topology-rollback ${project.version} sync
+VNF-API vnf-topology-activate ${project.version} sync
+VNF-API vnf-topology-assign ${project.version} sync
+VNF-API vnf-topology-assign-vfmodule ${project.version} sync
+VNF-API vnf-topology-changeassign ${project.version} sync
+VNF-API vnf-topology-changedelete ${project.version} sync
+VNF-API vnf-topology-delete ${project.version} sync
+VNF-API vnf-topology-operation ${project.version} sync
+VNF-API vnf-topology-rollback ${project.version} sync
diff --git a/platform-logic/vnfapi/src/main/xml/dg-generate-l3network-network-id.xml b/platform-logic/vnfapi/src/main/xml/dg-generate-l3network-network-id.xml
new file mode 100644
index 0000000..443be5b
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-generate-l3network-network-id.xml
@@ -0,0 +1,48 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="generate-l3network-network-id" mode="sync"><block atomic="true"><set>
+ <parameter name="tmp.local-variables.generate-l3network-network-id." value="" />
+ <parameter name="tmp.return.generate-l3network-network-id." value="" /></set><execute plugin="org.openecomp.sdnc.sli.SliPluginUtils.SliPluginUtils" method="generateUUID" >
+ <parameter name="ctx-destination" value="tmp.return.generate-l3network-network-id.uuid" /><outcome value='failure'>
+<return status='failure'>
+ <!-- Used to work around execute node bug -->
+ <parameter name="execute_failure" value="false" />
+
+ <!-- return parameters -->
+ <parameter name="error-message.generate-l3network-network-id" value="An error occured while generating a UUID for L3-NETWORK." /></return></outcome></execute><for atomic="true" index="n" start="0" end="1" ><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"
+ local-only="false"
+ pfx="tmp.local-variables.generate-l3network-network-id.L3NETWORK" ><outcome value='success'>
+<block atomic='true'><set>
+ <parameter name="tmp.local-variables.generate-l3network-network-id.is-unique" value="0" /></set><execute plugin="org.openecomp.sdnc.sli.SliPluginUtils.SliPluginUtils" method="generateUUID" >
+ <parameter name="ctx-destination" value="tmp.return.generate-l3network-network-id.uuid" /><outcome value='failure'>
+<return status="failure">
+ <!-- return parameters -->
+ <parameter name="error-message.generate-l3network-network-id" value="An error occured while generating a UUID for L3-NETWORK." /></return></outcome></execute></block></outcome><outcome value='not-found'>
+<block></block></outcome><outcome value='failure'>
+<return status="failure">
+ <!-- return parameters -->
+ <parameter name="error-message.generate-l3network-network-id" value="`'An error occured while checking if a generated l3network-network-id was unique. network-id = ' + $tmp.local-variables.generate-l3network-network-id.uuid`" /></return></outcome><outcome value="Other"><return status="failure">
+ <!-- return parameters -->
+ <parameter name="error-message.generate-l3network-network-id" value="`'An error occured while checking if a generated l3network-network-id was unique. network-id = ' + $tmp.local-variables.generate-l3network-network-id.uuid`" /></return></outcome></get-resource></for><set>
+ <parameter name="tmp.local-variables.generate-l3network-network-id." value="" /></set></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-generate-subnets-subnet-id.xml b/platform-logic/vnfapi/src/main/xml/dg-generate-subnets-subnet-id.xml
new file mode 100644
index 0000000..c33fe9a
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-generate-subnets-subnet-id.xml
@@ -0,0 +1,49 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="generate-subnets-subnet-id" mode="sync"><block atomic="true"><set>
+ <parameter name="tmp.local-variables.generate-subnets-subnet-id." value="" />
+ <parameter name="tmp.return.generate-subnets-subnet-id." value="" /></set><execute plugin="org.openecomp.sdnc.sli.SliPluginUtils.SliPluginUtils" method="generateUUID" >
+ <parameter name="ctx-destination" value="tmp.return.generate-subnets-subnet-id.uuid" /><outcome value='failure'>
+<return status='failure'>
+ <!-- Used to work around execute node bug -->
+ <parameter name="execute_failure" value="false" />
+
+ <!-- return parameters -->
+ <parameter name="error-message.generate-l3network-network-id" value="An error occured while generating a UUID for L3-NETWORK." /></return></outcome></execute><for atomic="true" index="s" start="0" end="1" ><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.local.network-id
+ AND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid"
+ local-only="false"
+ pfx="tmp.local-variables.generate-subnets-subnet-id.SUBNETS" ><outcome value='success'>
+<block atomic='true'><set>
+ <parameter name="tmp.local-variables.generate-subnets-subnet-id.is-unique" value="0" /></set><execute plugin="org.openecomp.sdnc.sli.SliPluginUtils.SliPluginUtils" method="generateUUID" >
+ <parameter name="ctx-destination" value="tmp.return.generate-subnets-subnet-id.uuid" /><outcome value='failure'>
+<return status="failure">
+ <!-- return parameters -->
+ <parameter name="error-message.generate-subnets-subnet-id" value="An error occured while generating a UUID for SUBNETS." /></return></outcome></execute></block></outcome><outcome value='not-found'>
+<block></block></outcome><outcome value='failure'>
+<return status="failure">
+ <!-- return parameters -->
+ <parameter name="error-message.generate-subnets-subnet-id" value="`'An error occured while checking if a generated subnets-subnet-id was unique. subnet-id = ' + $tmp.local-variables.generate-subnets-subnet-id.uuid`" /></return></outcome><outcome value="Other"><return status="failure">
+ <!-- return parameters -->
+ <parameter name="error-message.generate-subnets-subnet-id" value="`'An error occured while checking if a generated subnets-subnet-id was unique. subnet-id = ' + $tmp.local-variables.generate-subnets-subnet-id.uuid`" /></return></outcome></get-resource></for><set>
+ <parameter name="tmp.local-variables.generate-subnets-subnet-id." value="" /></set></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-network-topology-assign.xml b/platform-logic/vnfapi/src/main/xml/dg-network-topology-assign.xml
new file mode 100644
index 0000000..650f024
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-network-topology-assign.xml
@@ -0,0 +1,358 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="network-topology-assign" mode="sync"><block atomic="true"><switch test="`$network-topology-operation-input.service-information.service-type`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='service-type, aka AnAI subscription-service-type, is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.service-information.subscriber-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='subscriber-name, aka AnAI global-customer-id, is required.'/></return></outcome></switch><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $network-topology-operation-input.network-request-information.network-name"
+ local-only="false"
+ pfx="tmp.AnAI.l3network.existed">
+
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying whether l3-network with network-name = ' + $network-topology-operation-input.network-request-information.network-name + ' already exists in AnAI'`"/>
+</return></outcome><outcome value='success'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'A l3-network with network-name = ' + $network-topology-operation-input.network-request-information.network-name + ' already existed in AnAI with network-id = ' + $tmp.AnAI.l3network.existed.network-id`" />
+</return></outcome></get-resource><set>
+ <parameter name="tmp.error-message" value=""/></set><call module="VNF-API" rpc="generate-l3network-network-id" mode="sync" >
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='Error in generating l3-network.network-id in SDNC'/></return></outcome></call><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
+<!-- Create l3-network object -->
+<parameter name="network-id" value="`$tmp.return.generate-l3network-network-id.uuid`" />
+<parameter name="network-name" value="`$network-topology-operation-input.network-request-information.network-name`" />
+<parameter name="network-type" value="`$network-topology-operation-input.network-request-information.network-type`" />
+<parameter name="network-role" value="`$preload-data.network-topology-information.network-topology-identifier.network-role`" />
+<parameter name="network-technology" value="`$preload-data.network-topology-information.network-topology-identifier.network-technology`" />
+<parameter name="service-id" value="`$network-topology-operation-input.service-information.service-id`" />
+<parameter name="tenant-id" value="`$network-topology-operation-input.network-request-information.tenant`" />
+<parameter name="network-role-instance" value="0" />
+<parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to save l3-netework in AnAI with network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to save l3-netework in AnAI with network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></return></outcome></save><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
+<parameter name="physical-network-name" value="`$preload-data.network-topology-information.provider-network-information.physical-network-name`" />
+<parameter name="is-provider-network" value="`$preload-data.network-topology-information.provider-network-information.is-provider-network`" />
+<parameter name="is-shared-network" value="`$preload-data.network-topology-information.provider-network-information.is-shared-network`" />
+<parameter name="is-external-network" value="`$preload-data.network-topology-information.provider-network-information.is-external-network`" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating l3-network with provider-network-information in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating l3-network with provider-network-information in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></update><for index="i" start="0" end="`$preload-data.network-topology-information.subnets_length`">
+<block atomic='true'><switch test="`$preload-data.network-topology-information.subnets[$i].dhcp-enabled`"><outcome value='Y'><set>
+<parameter name="tmp.dhcpEnabled.boolean" value="true" />
+</set></outcome><outcome value='N'><set>
+<parameter name="tmp.dhcpEnabled.boolean" value="false" />
+</set></outcome></switch><set>
+<parameter name="tmp.gateway-address" value="`$preload-data.network-topology-information.subnets[$i].gateway-address`" />
+</set><switch test="`$preload-data.network-topology-information.subnets[$i].gateway-address`"><outcome value=''><block atomic='true'><execute plugin="org.openecomp.sdnc.sli.plugin.ipAddressTools.IpAddressTool" method="getGatewayAddress">
+ <parameter name="ipAddress" value="`$preload-data.network-topology-information.subnets[$i].start-address`" />
+ <parameter name="ipVersion" value="`$preload-data.network-topology-information.subnets[$i].ip-version`" />
+ <parameter name="subnet" value="`$preload-data.network-topology-information.subnets[$i].cidr-mask`" />
+ <parameter name="ctxVariable" value="tmp.return.generate.gateway-address" /></execute><set>
+<parameter name="tmp.gateway-address" value="`$tmp.return.generate.gateway-address`" />
+</set></block></outcome></switch><set>
+<parameter name="tmp.local.network-id" value="`$tmp.return.generate-l3network-network-id.uuid`" />
+</set><call module="VNF-API" rpc="generate-subnets-subnet-id" mode="sync" >
+<outcome value='failure'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></outcome></call><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid
+ AND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid" >
+<!-- Create l3-network object -->
+<parameter name="network-id" value="`$tmp.return.generate-l3network-network-id.uuid`" />
+<parameter name="subnet-id" value="`$tmp.return.generate-subnets-subnet-id.uuid`" />
+<parameter name="subnet-name" value="`$preload-data.network-topology-information.subnets[$i].subnet-name`" />
+<parameter name="gateway-address" value="`$tmp.gateway-address`" />
+<parameter name="network-start-address" value="`$preload-data.network-topology-information.subnets[$i].start-address`" />
+<parameter name="cidr-mask" value="`$preload-data.network-topology-information.subnets[$i].cidr-mask`" />
+<parameter name="ip-version" value="`$preload-data.network-topology-information.subnets[$i].ip-version`" />
+<parameter name="dhcp-start" value="`$preload-data.network-topology-information.subnets[$i].dhcp-start-address`" />
+<parameter name="dhcp-end" value="`$preload-data.network-topology-information.subnets[$i].dhcp-end-address`" />
+<parameter name="dhcp-enabled" value="`$tmp.dhcpEnabled.boolean`" />
+ <parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving l3-newtork.subnet in AnAI where subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving l3-newtork.subnet in AnAI where subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save></block></for><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"
+ force="true"
+ local-only="false">
+ <!-- create relationship-list -->
+ <parameter name="relationship-list.relationship[0].related-to" value="tenant" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="cloud-region.cloud-owner" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="att-aic" />
+ <parameter name="relationship-list.relationship[0].relationship-data[1].relationship-key" value="cloud-region.cloud-region-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[1].relationship-value" value="`$network-topology-operation-input.network-request-information.aic-cloud-region`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[2].relationship-key" value="tenant.tenant-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[2].relationship-value" value="`$network-topology-operation-input.network-request-information.tenant`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="cloud-region" />
+ <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-key" value="cloud-region.cloud-owner" />
+ <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-value" value="att-aic" />
+ <parameter name="relationship-list.relationship[1].relationship-data[1].relationship-key" value="cloud-region.cloud-region-id" />
+ <parameter name="relationship-list.relationship[1].relationship-data[1].relationship-value" value="`$network-topology-operation-input.network-request-information.aic-cloud-region`" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving tenant and clould-region relationship for l3-network in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving tenant and clould-region relationship for l3-network in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save><switch test="`$preload-data.network-topology-information.vpn-bindings_length`"><outcome value=''><set>
+<parameter name="preload-data.network-topology-information.vpn-bindings_length" value="0" />
+</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.vpn-bindings_length`">
+<block atomic='true'><set>
+<parameter name="tmp.vpn-binding-id" value="" />
+</set><switch test="`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`"><outcome value='Other'>
+<set>
+<parameter name="tmp.vpn-binding-id" value="`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`" />
+</set></outcome></switch><switch test="`$preload-data.network-topology-information.vpn-bindings[$i].global-route-target != ''`" ><outcome value='true'>
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vpn-binding"
+ key="vpn-binding.global-route-target = $preload-data.network-topology-information.vpn-bindings[$i].global-route-target"
+ local-only="false"
+ pfx="tmp.AnAI.vpn-binding"><outcome value='success'>
+<switch test="`$tmp.AnAI.vpn-binding.vpn-id`" ><outcome value='Other'>
+<set>
+<parameter name="tmp.vpn-binding-id" value="`$tmp.AnAI.vpn-binding.vpn-id`" />
+</set></outcome><outcome value=''>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query vpn-bindings from AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target + '. It is likely that the same global-route-target points to more than one vpn-binding objects in AnAI.'`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></switch></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query vpn-bindings from AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query vpn-bindings from AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></get-resource></outcome></switch><switch test="`$tmp.vpn-binding-id != ''`"><outcome value='true'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"
+ force="true"
+ local-only="false">
+
+ <parameter name="relationship-list.relationship[0].related-to" value="vpn-binding" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="vpn-binding.vpn-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.vpn-binding-id`" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving vpn-binding relationship for l3-network in AnAI where vpn-id = ' + $tmp.vpn-binding-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving vpn-binding relationship for l3-network in AnAI where vpn-id = ' + $tmp.vpn-binding-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='success'>
+<set>
+<parameter name="tmp.is-bound-to-vpn" value="true" />
+</set></outcome></save></outcome></switch></block></for><switch test="`$preload-data.network-topology-information.network-policy_length`"><outcome value=''><set>
+<parameter name='preload-data.network-topology-information.network-policy_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.network-policy_length`">
+<switch test="`$preload-data.network-topology-information.network-policy[$i].network-policy-fqdn != ''`"><outcome value='true'>
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="network-policy"
+ key="network-policy.network-policy-fqdn = $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn"
+ local-only="false"
+ pfx="tmp.AnAI.network-policy"><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='success'>
+<switch test="`$tmp.AnAI.network-policy.network-policy-id`" ><outcome value=''>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query newtork-policy from AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn + '. It is likely that the same network-policy-fqdn points to more than one network-policy objects in AnAI.'`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='Other'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
+<parameter name="relationship-list.relationship[0].related-to" value="network-policy" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="network-policy.network-policy-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.network-policy.network-policy-id`" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving network-policy relationship for l3-network in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving network-policy relationship for l3-network in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save></outcome></switch></outcome></get-resource></outcome></switch></for><switch test="`$preload-data.network-topology-information.route-table-reference_length`"><outcome value=''><set>
+<parameter name='preload-data.network-topology-information.route-table-reference_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.route-table-reference_length`">
+<switch test="`$preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn != ''`"><outcome value='true'>
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="route-table-reference"
+ key="route-table-reference.route-table-reference-fqdn = $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn"
+ pfx="tmp.AnAI.route-table-reference"><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set></block></outcome><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set></block></outcome><outcome value='success'>
+<switch test="`$tmp.AnAI.route-table-referencey.route-table-reference-id`" ><outcome value=''>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query route-table-reference from AnAI where route-table-reference-fqdn = ' + $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn + '. It is likely that the same route-table-reference-fqdn points to more than one route-table-reference objects in AnAI.'`"/></set></block></outcome><outcome value='Other'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
+<parameter name="relationship-list.relationship[0].related-to" value="route-table-reference" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="route-table-reference.route-table-reference-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.route-table-reference.route-table-reference-id`" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving route-table-reference relationship for l3-network in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving route-table-reference relationship for l3-network in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save></outcome></switch></outcome></get-resource></outcome></switch></for><switch test="`$tmp.is-bound-to-vpn`"><outcome value="true"><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
+<parameter name="is-bound-to-vpn" value="true" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating l3-network is-bound-to-vpn in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating l3-network is-bound-to-vpn in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></update></outcome></switch><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
+<parameter name="relationship-list.relationship[0].related-to" value="service-instance" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="customer.global-customer-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$network-topology-operation-input.service-information.subscriber-name`" />
+<parameter name="relationship-list.relationship[0].relationship-data[1].relationship-key" value="service-subscription.service-type" />
+<parameter name="relationship-list.relationship[0].relationship-data[1].relationship-value" value="`$network-topology-operation-input.service-information.service-type`" />
+<parameter name="relationship-list.relationship[0].relationship-data[2].relationship-key" value="service-instance.service-instance-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[2].relationship-value" value="`$network-topology-operation-input.service-information.service-instance-id`" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving service-instance relationship for l3-network in AnAI where service-instance-id = ' + $network-topology-operation-input.service-information.service-instance-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving service-instance relationship for l3-network in AnAI where service-instance-id = ' + $network-topology-operation-input.service-information.service-instance-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save><set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="networkId" value="`$tmp.return.generate-l3network-network-id.uuid`" />
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-network-topology-changeassign.xml b/platform-logic/vnfapi/src/main/xml/dg-network-topology-changeassign.xml
new file mode 100644
index 0000000..8b16c83
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-network-topology-changeassign.xml
@@ -0,0 +1,525 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="network-topology-changeassign" mode="sync"><block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id"
+ local-only="false"
+ pfx="tmp.AnAI.l3network">
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error retrieving l3-network with network-id=' + $network-topology-operation-input.network-request-information.network-id + ' from AnAI'`" /></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'network-id: ' + $network-topology-operation-input.network-request-information.network-id + 'not found in AnAI'`" /></return></outcome></get-resource><switch test="`$tmp.AnAI.l3network.network-name == $network-topology-operation-input.network-request-information.network-name`"><outcome value='false'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'The input network-name,' + network-topology-operation-input.network-request-information.network-name + ', does not match what is returned from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`" /></return></outcome></switch><switch test="`$tmp.AnAI.l3network.network-type == $network-topology-operation-input.network-request-information.network-type`"><outcome value='false'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'The input network-type,' + network-topology-operation-input.network-request-information.network-type + ', does not match what is returned from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`" /></return></outcome></switch><switch test="`$tmp.AnAI.l3network.network-name == $preload-data.network-topology-information.network-topology-identifier.network-name`"><outcome value='false'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'No preload network found with network-name = ' + $tmp.AnAI.l3network.network-name + ' in SDNC'`" /></return></outcome></switch><switch test="`$tmp.AnAI.l3network.network-type == $preload-data.network-topology-information.network-topology-identifier.network-type`"><outcome value='false'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'No preload network found with network-type = ' + $tmp.AnAI.l3network.network-type + ' in SDNC'`" /></return></outcome></switch><set>
+ <parameter name='x' value='0' />
+ <parameter name='tmp.error-message' value='' />
+ <parameter name='execute_failure' value='false' />
+ <parameter name='tmp.l3networkUpdate' value='0' /></set><switch test="`$tmp.AnAI.l3network.subnets.subnet_length`"><outcome value=''><set>
+<parameter name="tmp.AnAI.l3network.subnets.subnet_length" value="0" />
+</set></outcome></switch><for index="k" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`">
+<block atomic='true'><set>
+<parameter name='tmp.start-address-match' value='0' />
+</set><set>
+<parameter name='tmp.subnetUpdate' value='0' />
+</set><block atomic='true'><for index="n" start="0" end="`$preload-data.network-topology-information.subnets_length`">
+<switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].network-start-address == $preload-data.network-topology-information.subnets[$n].start-address`"><outcome value='true'>
+<block atomic='true'><set>
+<parameter name='tmp.start-address-match' value='1' />
+</set><switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].cidr-mask == $preload-data.network-topology-information.subnets[$n].cidr-mask`"><outcome value='false'>
+<set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></outcome></switch><switch test="`$preload-data.network-topology-information.subnets[$n].gateway-address`"><outcome value=''><block>
+<execute plugin="org.openecomp.sdnc.sli.plugin.ipAddressTools.IpAddressTool" method="getGatewayAddress">
+ <parameter name="ipAddress" value="`$preload-data.network-topology-information.subnets[$n].start-address`" />
+ <parameter name="ipVersion" value="`$preload-data.network-topology-information.subnets[$n].ip-version`" />
+ <parameter name="subnet" value="`$preload-data.network-topology-information.subnets[$n].cidr-mask`" />
+ <parameter name="ctxVariable" value="tmp.return.generate.gateway-address" /></execute><switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].gateway-address == $tmp.return.generate.gateway-address`"><outcome value='false'>
+<block>
+<set>
+<parameter name="tmp.gateway-address" value="`$tmp.return.generate.gateway-address`" />
+</set><set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></block></outcome></switch></block></outcome><outcome value='Other'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].gateway-address == $preload-data.network-topology-information.subnets[$n].gateway-address`"><outcome value='false'>
+<block>
+<set>
+<parameter name="tmp.gateway-address" value="`$preload-data.network-topology-information.subnets[$n].gateway-address`" />
+</set><set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></block></outcome><outcome value='true'>
+<set>
+<parameter name="tmp.gateway-address" value="`$preload-data.network-topology-information.subnets[$n].gateway-address`" />
+</set></outcome></switch></outcome></switch><switch test="`$preload-data.network-topology-information.subnets[$n].dhcp-enabled`"><outcome value='N'><set>
+<parameter name="tmp.dhcpEnabled.boolean" value="false" />
+</set></outcome><outcome value='Y'><set>
+<parameter name="tmp.dhcpEnabled.boolean" value="true" />
+</set></outcome></switch><switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-enabled == $tmp.dhcpEnabled.boolean`"><outcome value='false'>
+<block>
+<set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></block></outcome></switch><switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-start == $preload-data.network-topology-information.subnets[$n].dhcp-start-address`"><outcome value='false'>
+<block>
+<set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></block></outcome></switch><switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-end == $preload-data.network-topology-information.subnets[$n].dhcp-end-address`"><outcome value='false'>
+<block>
+<set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></block></outcome></switch><switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-name == $preload-data.network-topology-information.subnets[$n].subnet-name`"><outcome value='false'>
+<block>
+<set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></block></outcome></switch><switch test="`$tmp.subnetUpdate == 1`"><outcome value='true'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id" >
+ <!-- Update l3network.subnet -->
+ <parameter name="gateway-address" value="`$tmp.gateway-address`"/>
+ <parameter name="subnet-name" value="`$preload-data.network-topology-information.subnets[$n].subnet-name`"/>
+ <parameter name="cidr-mask" value="`$preload-data.network-topology-information.subnets[$n].cidr-mask`"/>
+ <parameter name="dhcp-start" value="`$preload-data.network-topology-information.subnets[$n].dhcp-start-address`"/>
+ <parameter name="dhcp-end" value="`$preload-data.network-topology-information.subnets[$n].dhcp-end-address`"/>
+ <parameter name="dhcp-enabled" value="`$tmp.dhcpEnabled.boolean`"/>
+ <parameter name="orchestration-status" value="pending-update" />
+ <outcome value='failure'>
+<block>
+<set>
+ <parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />
+ <parameter name='n' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating subnet attributes in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='not-found'>
+<block>
+<set>
+ <parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />
+ <parameter name='n' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating subnet attributes in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<block>
+<set>
+ <parameter name="tmp.subnetRollback[$x].subnet-id" value= "`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`"/>
+ <parameter name="tmp.subnetRollback[$x].type" value = "update"/>
+
+
+
+</set><set>
+ <parameter name="x" value = "`$x + 1`" />
+
+</set><set>
+<parameter name="tmp.l3networkUpdate" value="1" />
+</set></block></outcome></update></outcome></switch></block></outcome></switch></for><switch test="`$execute_failure`"><outcome value='false'>
+<switch test="`$tmp.start-address-match == 0`"><outcome value='true'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id" >
+<parameter name="orchestration-status" value="pending-delete" />
+ <outcome value='failure'>
+<block>
+<set>
+ <parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />
+ <parameter name='n' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating subnet status to pending-delete in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='not-found'>
+<block>
+<set>
+ <parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />
+ <parameter name='n' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating subnet status to pending-delete in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<block>
+<set>
+ <parameter name="tmp.subnetRollback[$x].subnet-id" value= "`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`"/>
+ <parameter name="tmp.subnetRollback[$x].orchestration-status" value= "`$tmp.AnAI.l3network.subnets.subnet[$k].orchestration-status`" />
+ <parameter name="tmp.subnetRollback[$x].type" value = "delete" />
+
+
+
+</set><set>
+ <parameter name="x" value = "`$x + 1`" />
+
+</set><set>
+<parameter name="tmp.l3networkUpdate" value="1" />
+</set></block></outcome></update></outcome></switch></outcome></switch></block></block></for><switch test="`$execute_failure`"><outcome value='false'>
+<for index="i" start="0" end="`$preload-data.network-topology-information.subnets_length`">
+<block atomic='true'><set>
+<parameter name="tmp.start-address-match" value="0" />
+</set><block atomic='true'><for index="j" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`">
+<switch test="`$preload-data.network-topology-information.subnets[$i].start-address == $tmp.AnAI.l3network.subnets.subnet[$j].network-start-address`"><outcome value='true'>
+<set>
+<parameter name='tmp.start-address-match' value='1' />
+</set></outcome></switch></for><switch test="`$tmp.start-address-match == 0`"><outcome value='true'>
+<block atomic="true"><switch test="`$preload-data.network-topology-information.subnets[$i].dhcp-enabled`"><outcome value='N'><set>
+<parameter name="tmp.dhcpEnabled.boolean" value="false" />
+</set></outcome><outcome value='Y'><set>
+<parameter name="tmp.dhcpEnabled.boolean" value="true" />
+</set></outcome></switch><set>
+<parameter name='tmp.gateway-address' value='`$preload-data.network-topology-information.subnets[$i].gateway-address`' />
+</set><switch test="`$preload-data.network-topology-information.subnets[$i].gateway-address`"><outcome value=''><block>
+<execute plugin="org.openecomp.sdnc.sli.plugin.ipAddressTools.IpAddressTool" method="getGatewayAddress">
+ <parameter name="ipAddress" value="`$preload-data.network-topology-information.subnets[$i].start-address`" />
+ <parameter name="ipVersion" value="`$preload-data.network-topology-information.subnets[$i].ip-version`" />
+ <parameter name="subnet" value="`$preload-data.network-topology-information.subnets[$i].cidr-mask`" />
+ <parameter name="ctxVariable" value="tmp.return.generate.gateway-address" /></execute><set>
+<parameter name="tmp.gateway-address" value="`$tmp.return.generate.gateway-address`" />
+</set></block></outcome></switch><set>
+<parameter name="tmp.local.network-id" value="`$tmp.AnAI.l3network.network-id`" />
+</set><call module="VNF-API" rpc="generate-subnets-subnet-id" mode="sync" >
+<outcome value='failure'>
+<block>
+<set>
+ <parameter name='j' value='`$tmp.AnAI.l3subnet_length + 1`' />
+ <parameter name='i' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving new subnet in AnAI with subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome></call><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid" >
+ <!-- Create l3-network object -->
+ <parameter name="network-id" value="`$tmp.AnAI.l3network.network-id`" />
+ <parameter name="subnet-id" value="`$tmp.return.generate-subnets-subnet-id.uuid`" />
+ <parameter name="gateway-address" value="`$tmp.gateway-address`" />
+ <parameter name="subnet-name" value="`$preload-data.network-topology-information.subnets[$i].subnet-name`" />
+ <parameter name="network-start-address" value="`$preload-data.network-topology-information.subnets[$i].start-address`" />
+ <parameter name="cidr-mask" value="`$preload-data.network-topology-information.subnets[$i].cidr-mask`" />
+ <parameter name="ip-version" value="`$preload-data.network-topology-information.subnets[$i].ip-version`" />
+ <parameter name="dhcp-start" value="`$preload-data.network-topology-information.subnets[$i].dhcp-start-address`" />
+ <parameter name="dhcp-end" value="`$preload-data.network-topology-information.subnets[$i].dhcp-end-address`" />
+ <parameter name="dhcp-enabled" value="`$tmp.dhcpEnabled.boolean`" />
+ <parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
+<block>
+<set>
+ <parameter name='j' value='`$tmp.AnAI.l3subnet_length + 1`' />
+ <parameter name='i' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving new subnet in AnAI with subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='not-found'>
+<block>
+<set>
+ <parameter name='j' value='`$tmp.AnAI.l3subnet_length + 1`' />
+ <parameter name='i' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving new subnet in AnAI with subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<block>
+<set>
+ <parameter name="tmp.subnetRollback[$x].subnet-id" value= "`$tmp.return.generate-subnets-subnet-id.uuid`" />
+ <parameter name="tmp.subnetRollback[$x].type" value = "create" /></set><set>
+ <parameter name="x" value = "`$x + 1`" />
+
+</set><set>
+<parameter name='tmp.l3networkUpdate' value='1' />
+</set></block></outcome></save></block></outcome></switch></block></block></for></outcome></switch><switch test="`$execute_failure`"><outcome value='false'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND related-to = vpn-binding" ><outcome value='failure'>
+<block>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="An error occurred while deleting l3-network vpn-binding relationship from AnAI"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome></delete><switch test="`$execute_failure`"><outcome value='false'>
+<block atomic='true'><switch test="`$preload-data.network-topology-information.vpn-bindings_length`"><outcome value=''><set>
+<parameter name="preload-data.network-topology-information.vpn-bindings_length" value="0" />
+</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.vpn-bindings_length`">
+<block atomic='true'><set>
+<parameter name="tmp.vpn-binding-id" value="" />
+</set><switch test="`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`"><outcome value='Other'>
+<set>
+<parameter name="tmp.vpn-binding-id" value="`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`" />
+</set></outcome></switch><switch test="`$preload-data.network-topology-information.vpn-bindings[$i].global-route-target != ''`" ><outcome value='true'>
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vpn-binding"
+ key="vpn-binding.global-route-target = $preload-data.network-topology-information.vpn-bindings[$i].global-route-target"
+ pfx="tmp.AnAI.vpn-binding"><outcome value='not-found'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query vpn-bindings n AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query vpn-bindings n AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<set>
+<parameter name="tmp.vpn-binding-id" value="`$tmp.AnAI.vpn-binding.vpn-id`" />
+</set></outcome></get-resource></outcome></switch><switch test="`$execute_failure`"><outcome value='false'>
+<switch test="`$tmp.vpn-binding-id != ''`"><outcome value='true'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="relationship-list.relationship[0].related-to" value="vpn-binding" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="vpn-binding.vpn-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.vpn-binding-id`" /><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.vpn-binding-id`"/></set><set>
+ <parameter name="i" value = "`$preload-data.network-topology-information.vpn-bindings_length + 1`" />
+
+</set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='not-found'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.vpn-binding-id`"/></set><set>
+ <parameter name="i" value = "`$preload-data.network-topology-information.vpn-bindings_length + 1`" />
+
+</set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<set>
+<parameter name='tmp.vpn-binding.updated' value='1' />
+</set></outcome></save></outcome></switch></outcome></switch></block></for></block></outcome></switch></block></outcome></switch><switch test="`$execute_failure`"><outcome value='false'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND related-to = network-policy" ><outcome value='failure'>
+<block>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="An error occurred while deleting l3-network network-policy relationship from AnAI in preparation to regenerate the network-policy relationship from PRELOAD."/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome></delete><switch test="`$execute_failure`"><outcome value='false'>
+<block atomic='true'><switch test="`$preload-data.network-topology-information.network-policy_length`"><outcome value=''><set>
+<parameter name='preload-data.network-topology-information.network-policy_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.network-policy_length`">
+<switch test="`$preload-data.network-topology-information.network-policy[$i].network-policy-fqdn != NULL`"><outcome value='true'>
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="network-policy"
+ key="network-policy.network-policy-fqdn = $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn"
+ pfx="tmp.AnAI.network-policy" ><outcome value='not-found'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="relationship-list.relationship[0].related-to" value="network-policy" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="network-policy.network-policy-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.network-policy.network-policy-id`" /><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving l3-newtork network-policy relationship in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='not-found'>
+</outcome><outcome value='success'>
+<set>
+<parameter name='tmp.network-policy.updated' value='1' />
+</set></outcome></save></outcome></get-resource></outcome></switch></for></block></outcome></switch></block></outcome></switch><switch test="`$execute_failure`"><outcome value='false'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND related-to = route-table-reference" ><outcome value='failure'>
+<block>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="An error occurred while deleting l3-network route-table-reference relationship from AnAI prior to regenerate the route-table-reference relationship from PRELOAD."/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome></delete><switch test="`$execute_failure`"><outcome value='false'>
+<block atomic='true'><switch test="`$preload-data.network-topology-information.route-table-reference_length`"><outcome value=''><set>
+<parameter name='preload-data.network-topology-information.route-table-reference_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.route-table-reference_length`">
+<switch test="`$preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn != NULL`"><outcome value='true'>
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="route-table-reference"
+ key="route-table-reference.route-table-reference-fqdn = $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn"
+ pfx="tmp.AnAI.route-table-reference"><outcome value='not-found'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="relationship-list.relationship[0].related-to" value="route-table-reference" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="route-table-reference.route-table-reference-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.route-table-reference.route-table-reference-id`" /><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving l3-newtork route-table-reference relationship in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='not-found'>
+</outcome><outcome value='success'>
+<set>
+<parameter name='tmp.route-table-reference.updated' value='1' />
+</set></outcome></save></outcome></get-resource></outcome></switch></for></block></outcome></switch></block></outcome></switch><switch test="`$execute_failure`"><outcome value='false'>
+<switch test="`$tmp.l3networkUpdate == 1`">
+<outcome value='true'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="orchestration-status" value="pending-update" /><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="An error occurred while updating l3-network.orchestration-status in AnAI"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='not-found'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="An error occurred while updating l3-network.orchestration-status in AnAI"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<set>
+<parameter name='tmp.l3network.status.updated' value='1' />
+</set></outcome></update></outcome></switch></outcome></switch><switch test="`$execute_failure`"><outcome value="true"><block atomic='true'><for index="z" start="0" end="`$tmp.AnAI.l3network.relationship-list.relationship_length`">
+<switch test="`$tmp.AnAI.l3network.relationship-list.relationship[$z].related-to`"><outcome value='vpn-binding'>
+<switch test="`$tmp.vpn-binding.updated == 1`"><outcome value='true'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="relationship-list.relationship[0].related-to" value="vpn-binding" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="vpn-binding.vpn-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'An error occurred during rollback of l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'An error occurred during rollback of l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></save></outcome></switch></outcome><outcome value='network-policy'>
+<switch test="`$tmp.network-policy.updated == 1`"><outcome value='true'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="relationship-list.relationship[0].related-to" value="network-policy" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="network-policy.network-policy-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'An error occurred during rollback of l3-newtork network-policy relationship in AnAI where network-policy-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'An error occurred during rollback of l3-newtork network-policy relationship in AnAI where network-policy-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></save></outcome></switch></outcome><outcome value='route-table-reference'>
+<switch test="`$tmp.route-table-reference.updated == 1`"><outcome value='true'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="relationship-list.relationship[0].related-to" value="route-table-reference" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="route-table-reference.route-table-reference-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'An error occurred during rollback of l3-newtork route-table-reference relationship in AnAI where route-table-reference-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'An error occurred during rollback of l3-newtork route-table-reference relationship in AnAI where route-table-reference-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></save></outcome></switch></outcome></switch></for><for index="j" start="0" end="`$x`">
+<block atomic='true'><set>
+ <parameter name="tmp.rollback.match" value="0"/></set><for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`">
+<switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-id == $tmp.subnetRollback[$j].subnet-id`"><outcome value='true'>
+<block atomic='true'><switch test="`$tmp.subnetRollback[$j].type`"><outcome value='delete'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND subnet.subnet-id = $tmp.subnetRollback[$j].subnet-id" >
+<parameter name="orchestration-status" value="`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`" />
+ <outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback the subnet.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback the subnet.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></update></outcome><outcome value='update'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$j].subnet-id" >
+<parameter name="subnet-name" value="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name`"/>
+<parameter name="gateway-address" value="`$tmp.AnAI.l3network.subnets.subnet[$i].gateway-address`"/>
+<parameter name="cidr-mask" value="`$tmp.AnAI.l3network.subnets.subnet[$i].cidr-mask`"/>
+<parameter name="dhcp-start" value="`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-start`"/>
+<parameter name="dhcp-end" value="`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-end`"/>
+<parameter name="dhcp-enabled" value="`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-enabled`"/>
+<parameter name="orchestration-status" value="`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`" />
+ <outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback the subnet attributes update in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback the subnet attributes update in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></update></outcome></switch><set>
+ <parameter name="tmp.rollback.match" value="1"/></set></block></outcome></switch></for><switch test="`$tmp.rollback.match == 0`"><outcome value='true'>
+<switch test="`$tmp.subnetRollback[$j].type`"><outcome value='create'>
+<delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND subnet.subnet-id = $tmp.subnetRollback[$j].subnet-id" ><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback to delete subnet from AnAI where subnet-id = ' + $tmp.subnetRollback[$j].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback to delete subnet from AnAI where subnet-id = ' + $tmp.subnetRollback[$j].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></delete></outcome></switch></outcome></switch></block></for><switch test="`$tmp.l3network.status.updated == 1`">
+<outcome value='true'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="orchestration-status" value="`$tmp.AnAI.l3network.orchestration-status`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback l3network.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback l3network.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></update></outcome></switch><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error updating l3-network in AnAI with network-id = ' + $tmp.AnAI.l3network.network-id + ' - ' + $tmp.error-message + ' - ' + $tmp.rollback.error-message`"/></return></block></outcome></switch><set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="networkId" value="`$network-topology-operation-input.network-request-information.network-id`" />
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-network-topology-delete.xml b/platform-logic/vnfapi/src/main/xml/dg-network-topology-delete.xml
new file mode 100644
index 0000000..83be060
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-network-topology-delete.xml
@@ -0,0 +1,75 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="network-topology-delete" mode="sync"><block atomic="true">
+<switch test="`$network-topology-operation-input.network-request-information.network-id`"><outcome value='Other'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id"
+ pfx="tmp.AnAI.l3network">
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="Failed to query AAI by network-id"/></return></outcome><outcome value='not-found'>
+<return status="success">
+ <parameter name="networkId" value="`$network-topology-operation-input.network-request-information.network-id` not found" />
+ <parameter name="error-code" value="200" /></return></outcome><outcome value='success'>
+<block atomic="true"><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" ></delete><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="networkId" value="`$tmp.AnAI.l3network.network-id`" />
+ <parameter name="error-code" value="200" /></return></block></outcome></get-resource></outcome><outcome value='0'><switch test="`$network-topology-operation-input.network-request-information.network-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="DisconnectNetworkRequest requires network-id or network-name "/></return></outcome><outcome value='Other'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $network-topology-operation-input.network-request-information.network-name"
+ pfx="tmp.AnAI.l3network">
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="Failed to query AAI by network-name"/></return></outcome><outcome value='not-found'>
+<return status="success">
+ <parameter name="augmentation" value="`$network-topology-operation-input.network-request-information.network-name` not found" />
+ <parameter name="error-code" value="200" /></return></outcome><outcome value='success'>
+<block atomic="true"><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" ></delete><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="networkId" value="`$tmp.AnAI.l3network.network-id`" />
+ <parameter name="error-code" value="200" /></return></block></outcome></get-resource></outcome></switch></outcome><outcome value=''><switch test="`$network-topology-operation-input.network-request-information.network-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="DisconnectNetworkRequest requires network-id or network-name "/></return></outcome><outcome value='Other'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $network-topology-operation-input.network-request-information.network-name"
+ pfx="tmp.AnAI.l3network">
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="Failed to query AAI by network-name"/></return></outcome><outcome value='not-found'>
+<return status="success">
+ <parameter name="augmentation" value="`$network-topology-operation-input.network-request-information.network-name` not found" />
+ <parameter name="error-code" value="200" /></return></outcome><outcome value='success'>
+<block atomic="true"><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" ></delete><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="networkId" value="`$tmp.AnAI.l3network.network-id`" />
+ <parameter name="error-code" value="200" /></return></block></outcome></get-resource></outcome></switch></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-network-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-network-topology-operation.xml
new file mode 100644
index 0000000..70c5994
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-network-topology-operation.xml
@@ -0,0 +1,109 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="network-topology-operation" mode="sync"><block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$network-topology-operation-input.service-information.service-id`"/>
+<parameter name="field6" value="`$network-topology-operation-input.service-information.service-type`"/>
+<parameter name="field7" value="`$network-topology-operation-input.service-information.subscriber-name`"/>
+<parameter name="field8" value="`$network-topology-operation-input.service-information.service-instance-id`"/>
+<parameter name="field9" value="`$network-topology-operation-input.request-information.request-id`"/>
+<parameter name="field10" value="`$network-topology-operation-input.request-information.request-action`"/>
+<parameter name="field11" value="`$network-topology-operation-input.request-information.source`"/>
+<parameter name="field12" value="`$network-topology-operation-input.network-request-information.network-name`"/>
+<parameter name="field13" value="`$network-topology-operation-input.network-request-information.network-type`"/>
+<parameter name="field14" value="`$network-topology-operation-input.network-request-information.tenant`"/>
+<parameter name="field15" value="`$network-topology-operation-input.network-request-information.aic-cloud-region`"/>
+<parameter name="field16" value="`$network-topology-operation-input.network-request-information.aic-clli`"/>
+<parameter name="field17" value="`$network-topology-operation-input.network-request-information.network-id`"/></record><switch test="`$network-topology-operation-input.request-information.request-action`">
+<outcome value='NetworkActivateRequest'><block atomic="true">
+<switch test="`$network-topology-operation-input.network-request-information.network-name`"><outcome value='Other'><switch test="`$preload-data.network-topology-information.network-topology-identifier.network-name`"><outcome value='Other'><switch test="`$network-topology-operation-input.network-request-information.network-name == $preload-data.network-topology-information.network-topology-identifier.network-name`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="`'No preload-data found to match input network-name = ' + $network-topology-operation-input.network-request-information.network-name`"/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='network-name not found from preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='network-name is required from input'/></return></outcome></switch><switch test="`$network-topology-operation-input.network-request-information.network-type`"><outcome value='Other'><switch test="`$preload-data.network-topology-information.network-topology-identifier.network-type`"><outcome value='Other'><switch test="`$network-topology-operation-input.network-request-information.network-type == $preload-data.network-topology-information.network-topology-identifier.network-type`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="`'No preload-data found to match input network-type = ' + $network-topology-operation-input.network-request-information.network-type`"/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='network-type not found from preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='network-type is required from input'/></return></outcome></switch><switch test="`$network-topology-operation-input.service-information.service-instance-id`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='service-instance-id is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.network-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='aic-cloud-region is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.network-request-information.tenant`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='tenant is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.service-information.service-id`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='service-id is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
+<!--
+leaf svc-action {
+ type enumeration {
+ enum "reserve";
+ enum "assign";
+ enum "activate"; // equal to commit
+ enum "delete"; // equal to commit
+ enum "changeassign";
+ enum "changedelete";
+ enum "rollback";
+ }
+}
+-->
+
+<outcome value='Other'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='svc-action is not found'/></return></outcome><outcome value='assign'><call module="VNF-API" rpc="network-topology-assign" mode="sync" >
+</call></outcome><outcome value='changeassign'><call module="VNF-API" rpc="network-topology-changeassign" mode="sync" >
+</call></outcome><outcome value='rollback'><call module="VNF-API" rpc="network-topology-rollback" mode="sync" >
+</call></outcome></switch></block></outcome><outcome value='DisconnectNetworkRequest'><switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
+<!--
+leaf svc-action {
+ type enumeration {
+ enum "reserve";
+ enum "assign";
+ enum "activate"; // equal to commit
+ enum "delete"; // equal to commit
+ enum "changeassign";
+ enum "changedelete";
+ enum "rollback";
+ }
+}
+-->
+
+<outcome value='rollback'><call module="VNF-API" rpc="network-topology-rollback" mode="sync" >
+</call></outcome><outcome value='delete'><call module="VNF-API" rpc="network-topology-delete" mode="sync" >
+</call></outcome><outcome value='Other'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='svc-action is not found'/></return></outcome></switch></outcome><outcome value="Other">
+
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='request-action is not found'/></return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-network-topology-rollback.xml b/platform-logic/vnfapi/src/main/xml/dg-network-topology-rollback.xml
new file mode 100644
index 0000000..925cac8
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-network-topology-rollback.xml
@@ -0,0 +1,75 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="network-topology-rollback" mode="sync"><block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id"
+ pfx="tmp.AnAI.l3network">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'l3-network not found in AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying l3-network from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`" /></return></outcome></get-resource><switch test="`$tmp.AnAI.l3network.orchestration-status`"><outcome value='pending-create'>
+<delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to delete l3-network from AAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`"/></return></outcome></delete></outcome><outcome value='pending-delete'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id" >
+<parameter name="orchestration-status" value="active" /><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to update l3-netework orchestration-status in AnAI for network-id = ' + $network-topology-operation-input.network-request-information.network-id`"/></return></outcome></update></outcome><outcome value='pending-update'>
+<block atomic="true">
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length`"><outcome value=''><set>
+<parameter name="tmp.AnAI.l3network.subnets.subnet_length" value="0" />
+</set></outcome></switch><for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`">
+<switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`"><outcome value='pending-create'>
+<delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id
+ AND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to rollback to delete subnet from AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' and network-id = ' + $network-topology-operation-input.network-request-information.network-id`" /></return></outcome></delete></outcome><outcome value='pending-delete'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id
+ AND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id" >
+ <parameter name="orchestration-status" value="active" />
+ <outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to rollback subnet orchestration-status from AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' and network-id = ' + $network-topology-operation-input.network-request-information.network-id`" /></return></outcome></update></outcome></switch></for><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id" >
+<parameter name="orchestration-status" value="active" /><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to rollback l3-netework orchestration-status in AnAI for network-id = ' + $network-topology-operation-input.network-request-information.network-id`"/></return></outcome></update></block></outcome></switch><set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="networkId" value="`$network-topology-operation-input.network-request-information.network-id`" />
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-preload-network-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-preload-network-topology-operation.xml
new file mode 100644
index 0000000..52b68e2
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-preload-network-topology-operation.xml
@@ -0,0 +1,55 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="preload-network-topology-operation" mode="sync"><block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="preload-network-topology-operation"/>
+<parameter name="field3" value="`$preload-network-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$preload-network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$preload-network-topology-operation-input.service-information.service-instance-id`"/>
+<parameter name="field6" value="`$preload-network-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$preload-network-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$preload-network-topology-operation-input.request-information.source`"/>
+<parameter name="field9" value="`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.service-type`"/>
+<parameter name="field10" value="`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-name`"/>
+<parameter name="field11" value="`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-type`"/>
+<parameter name="field12" value="`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-role`"/>
+<parameter name="field13" value="`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-technology`"/></record><switch test="`$preload-network-topology-operation-input.request-information.request-action`">
+<outcome value='PreloadNetworkRequest'><block atomic="true"><set>
+<parameter name="preload-data." value="" />
+</set><set>
+<parameter name="preload-data." value="preload-network-topology-operation-input." />
+</set><set>
+ <parameter name="preload-data.oper-status.order-status" value="PendingAssignment"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></outcome><outcome value='DeletePreloadNetworkRequest'><block atomic="true"><set>
+<parameter name="preload-data." value="" />
+</set><set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></outcome><outcome value="Other">
+
+ <return status="failure">
+ <parameter name='error-code' value='2000'/>
+ <parameter name='error-message' value='Invalid Request `$preload-network-topology-operation-input.request-information.request-action`'/>
+
+
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-preload-vf-module-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-preload-vf-module-topology-operation.xml
new file mode 100644
index 0000000..345b580
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-preload-vf-module-topology-operation.xml
@@ -0,0 +1,63 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="preload-vf-module-topology-operation" mode="sync"><block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="preload-vf-module-topology-operation"/>
+<parameter name="field3" value="`$preload-vf-module-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$preload-vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$preload-vf-module-topology-operation-input.request-information.source`"/>
+<parameter name="field6" value="`$preload-vf-module-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$preload-vf-module-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$preload-vf-module-topology-operation-input.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`"/>
+<parameter name="field9" value="`$preload-vf-module-topology-operation-input.vf-module-topology-information.vf-module-identifiers.vf-module-name`"/>
+<parameter name="field10" value="`$preload-vf-module-topology-operation-input.service-information.service-instance-id`"/></record><switch test="`$preload-vf-module-topology-operation-input.request-information.request-action`">
+
+<outcome value='PreloadVfModuleRequest'><block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.resource.sql.SqlResource"
+ resource="vnf-profile" key="SELECT * from VNF_PROFILE where vnf_type = $preload-vf-module-topology-operation-input.vf-module-topology-information.vf-module-identifiers.vf-module-model-id">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="preload vnf-model-id not found. New vnf-model-id can be added via admin portal" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="preload vnf-model-id not found. New vnf-model-id can be added via admin portal" /></return></outcome></get-resource><set>
+<parameter name="vf-module-preload-data." value="" />
+</set><set>
+<parameter name="vf-module-preload-data." value="preload-vf-module-topology-operation-input." />
+</set><set>
+ <parameter name="vf-module-preload-data.oper-status.order-status" value="PendingAssignment"/></set><block>
+<set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></block></outcome><outcome value='DeletePreloadVfModuleRequest'><block atomic="true"><set>
+<parameter name="vf-module-preload-data." value="" />
+</set><block>
+<set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></block></outcome><outcome value="Other">
+
+ <return status="failure">
+ <parameter name='error-code' value='2000'/>
+ <parameter name='error-message' value="`'Invalid Request, ' + $preload-vf-module-topology-operation-input.request-information.request-action`"/>
+
+
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-preload-vnf-instance-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-preload-vnf-instance-topology-operation.xml
new file mode 100644
index 0000000..cec3848
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-preload-vnf-instance-topology-operation.xml
@@ -0,0 +1,63 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="preload-vnf-instance-topology-operation" mode="sync"><block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="preload-vnf-instance-topology-operation"/>
+<parameter name="field3" value="`$preload-vnf-instance-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$preload-vnf-instance-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$preload-vnf-instance-topology-operation-input.request-information.source`"/>
+<parameter name="field6" value="`$preload-vnf-instance-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$preload-vnf-instance-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$preload-vnf-instance-topology-operation-input.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id`"/>
+<parameter name="field9" value="`$preload-vnf-instance-topology-operation-input.vnf-instance-topology-information.vnf-instance-identifiers.vnf-instance-name`"/>
+<parameter name="field10" value="`$preload-vnf-instance-topology-operation-input.service-information.service-instance-id`"/></record><switch test="`$preload-vnf-instance-topology-operation-input.request-information.request-action`">
+
+<outcome value='PreloadVnfInstanceRequest'><block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.resource.sql.SqlResource"
+ resource="vnf-profile" key="SELECT * from VNF_PROFILE where vnf_type = $preload-vnf-instance-topology-operation-input.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="preload vnf-model-id not found. New vnf-model-id can be added via admin portal" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="preload vnf-model-id not found. New vnf-model-id can be added via admin portal" /></return></outcome></get-resource><set>
+<parameter name="vnf-instance-preload-data." value="" />
+</set><set>
+<parameter name="vnf-instance-preload-data." value="preload-vnf-instance-topology-operation-input." />
+</set><set>
+ <parameter name="vnf-instance-preload-data.oper-status.order-status" value="PendingAssignment"/></set><block>
+<set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></block></outcome><outcome value='DeletePreloadVnfInstanceRequest'><block atomic="true"><set>
+<parameter name="vnf-instance-preload-data." value="" />
+</set><block>
+<set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></block></outcome><outcome value="Other">
+
+ <return status="failure">
+ <parameter name='error-code' value='2000'/>
+ <parameter name='error-message' value='Invalid Request `$preload-vnf-instance-topology-operation-input.request-information.request-action`'/>
+
+
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-preload-vnf-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-preload-vnf-topology-operation.xml
new file mode 100644
index 0000000..f427452
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-preload-vnf-topology-operation.xml
@@ -0,0 +1,76 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="preload-vnf-topology-operation" mode="sync"><block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="preload-vnf-topology-operation"/>
+<parameter name="field3" value="`$preload-vnf-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$preload-vnf-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$preload-vnf-topology-operation-input.service-information.service-instance-id`"/>
+<parameter name="field6" value="`$preload-vnf-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$preload-vnf-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$preload-vnf-topology-operation-input.request-information.source`"/>
+<parameter name="field9" value="`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.service-type`"/>
+<parameter name="field10" value="`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-name`"/>
+<parameter name="field11" value="`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type`"/></record><switch test="`$preload-vnf-topology-operation-input.request-information.request-action`">
+<!--
+leaf request-action {
+ type enumeration {
+ enum "VNFActivateRequest";
+ enum "ChangeVNFActivateRequest";
+ enum "DisconnectVNFRequest";
+ enum "PreloadVNFRequest";
+ enum "DeletePreloadVNFRequest";
+ }
+}
+-->
+
+<outcome value='PreloadVNFRequest'><block atomic="true"><set>
+<parameter name="ack-final" value="Y"/></set><set only-if-unset="true">
+<parameter name="sql-resource-plugin" value="org.openecomp.sdnc.sli.resource.sql.SqlResource"/></set><get-resource plugin="`$sql-resource-plugin`" resource="vnf-profile" key="SELECT * from VNF_PROFILE WHERE vnf_type = $preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="preload vnf-type not found as valid vnf " /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="preload vnf-type not found as valid vnf " /></return></outcome></get-resource><set>
+<parameter name="preload-data." value="" />
+</set><set>
+<parameter name="preload-data." value="preload-vnf-topology-operation-input." />
+</set><set>
+ <parameter name="preload-data.oper-status.order-status" value="PendingAssignment"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></outcome><outcome value='DeletePreloadVNFRequest'><block atomic="true"><get-resource plugin="`$sql-resource-plugin`" resource="generic-vnf" key="SELECT * FROM VNF_PROFILE vnf-type = $preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type">
+<outcome value='success'>
+<return status='failure'>
+ <parameter name="error-code" value="3000" />
+ <parameter name="error-message" value="preload vnf-type cannot be deleted while vnf is in use" /></return></outcome></get-resource><set>
+<parameter name="preload-data." value="" />
+</set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></outcome><outcome value="Other">
+
+ <return status="failure">
+ <parameter name='error-code' value='2000'/>
+ <parameter name='error-message' value='Invalid Request `$preload-vnf-topology-operation-input.request-information.request-action`'/>
+
+
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-activate.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-activate.xml
new file mode 100644
index 0000000..16d9252
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-activate.xml
@@ -0,0 +1,45 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-activate' mode='sync'>
+<block atomic="true"><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id == $vf-module-service-data.vf-module-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="`'vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' not found in SDNC'`"/></return></outcome></switch><switch test="`$vf-module-service-data.oper-status.order-status == PendingCreate`"><outcome value='false'><switch test="`$vf-module-service-data.oper-status.order-status == PendingUpdate`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch></outcome></switch><set>
+ <parameter name="vf-module-service-data.oper-status.last-order-status" value="`$vf-module-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.order-status" value="Active"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.last-action" value="`$vf-module-service-data.request-information.request-action`"/></set><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id" >
+ <parameter name="orchestration-status" value="active" /><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while updating vf-module orchestration-status in AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while updating vf-module orchestration-status in AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"/></return></outcome></update><set>
+ <parameter name="vf-module-service-data." value="vf-module-topology-operation-input." /></set><switch test="`$vnf-instance-service-data.vf-module-relationship-list_length`"><outcome value=''><set>
+ <parameter name="vnf-instance-service-data.vf-module-relationship-list_length" value="0" /></set></outcome></switch><set>
+ <parameter name="vnf-instance-service-data.vf-module-relationship-list[$vnf-instance-service-data.vf-module-relationship-list_length].vf-module-id" value="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id`" /></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign-vnf-networks.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign-vnf-networks.xml
new file mode 100644
index 0000000..dd2bf23
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign-vnf-networks.xml
@@ -0,0 +1,129 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-assign-vnf-networks' mode='sync'><block atomic="true"><switch test="`$vf-module-preload-data.oper-status.order-status == PendingAssignment`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid preload-data order status'/></return></outcome></switch><set>
+ <parameter name="vf-module-service-data." value="vf-module-preload-data." /></set><set>
+ <parameter name="vf-module-service-data." value="vf-module-topology-operation-input." /></set><set>
+ <parameter name="vf-module-service-data.vf-module-id" value="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id`"/></set><switch test="`$vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''><set>
+<parameter name = "vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks_length" value="0" />
+</set></outcome></switch><for index="j" start="0" end="`$vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><block atomic="true">
+<set>
+<parameter name='tmp.usePreload' value='1' />
+<parameter name='tmp.AnAI.l3network.' value='' />
+</set><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks_length`"><outcome value=''><set>
+<parameter name='vf-module-topology-operation-input.vf-module-request-information.vnf-networks_length' value='0' />
+</set></outcome></switch><block atomic="true">
+<for index="i" start="0" end="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks_length`"><switch test="`$vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-role == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-role`"><outcome value='true'>
+<block atomic="true">
+<set>
+<parameter name='tmp.usePreload' value='0' />
+</set><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id == '' or $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id == '0'`"><outcome value='false'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id"
+ pfx="tmp.AnAI.l3network">
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying AnAI for l3-network with network-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id`" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome></get-resource></outcome><outcome value='true'>
+<switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name == '' or $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name == '0'`"><outcome value='true'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome><outcome value='false'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name"
+ pfx="tmp.AnAI.l3network">
+
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred whie querying AnAI for l3-network with network-name = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name`" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome></get-resource></outcome></switch></outcome></switch><switch test="`$tmp.usePreload == 0`"><outcome value='true'>
+<block>
+<switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="k" start="0" end="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-role`"><outcome value='true'>
+<block>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-name" value="`$tmp.AnAI.l3network.network-name`" />
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-id" value="`$tmp.AnAI.l3network.network-id`" />
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].neutron-id" value="`$tmp.AnAI.l3network.neutron-network-id`" />
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn" value="`$tmp.AnAI.l3network.contrail-network-fqdn`" />
+</set><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-id != ''`"><outcome value='true'>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-id`" /></set></outcome><outcome value='false'>
+<switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-id != ''`"><outcome value='true'>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-id`" /></set></outcome><outcome value='false'>
+<switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch></block></outcome></switch></for></block></outcome></switch></block></outcome></switch></for><switch test="`$tmp.usePreload == 1`"><outcome value='true'><block atomic="true">
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-name"
+ pfx="tmp.AnAI.l3network">
+<outcome value='not-found'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'PRELOAD network-name = ' + $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' not found in AnAI'`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying AnAI for l3-network with network-name = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$j].network-name`" />
+</return></outcome><outcome value='success'>
+<switch test="`$tmp.AnAI.l3network.network-id == ''`"><outcome value='true'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying l3-network with network-name = ' + $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' , it is likely that there are more than one l3-newtork object with the same network-name in AnAI.'`" />
+</return></outcome></switch></outcome></get-resource><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="k" start="0" end="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-role`"><outcome value='true'>
+<block><set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-name" value="`$tmp.AnAI.l3network.network-name`" />
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-id" value="`$tmp.AnAI.l3network.network-id`" />
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].neutron-id" value="`$tmp.AnAI.l3network.neutron-network-id`" />
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn" value="`$tmp.AnAI.l3network.contrail-network-fqdn`" />
+
+</set><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id == ''`"><outcome value='true'>
+<switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id == ''`"><outcome value='true'>
+<switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch></block></outcome></switch></for></block></outcome></switch></block></block></for><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign.xml
new file mode 100644
index 0000000..abbb56a
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign.xml
@@ -0,0 +1,63 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-assign' mode='sync'>
+<block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ and generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id"
+ pfx="tmp.AnAI.vfmodule" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'vf-module not found in AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"/></return></outcome></get-resource><call module='VNF-API' rpc='vf-module-topology-assign-vnf-networks' mode='sync' ></call><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''><set>
+<parameter name='vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ and generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id" >
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`" /><outcome value='failure'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id
+ AND related-to = l3-network" ></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while saving vf-module l3-network relationship in AnAI with network-id = ' + $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`"/></return></block></outcome></save></for><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ and generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id" >
+<parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
+<block atomic="true">
+<delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id
+ AND related-to = l3-network" ></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="An error occurred while updating vf-module orchestration-status in AnAI"/></return></block></outcome></update><set>
+ <parameter name="vf-module-service-data.oper-status.order-status" value="PendingCreate"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-changeassign.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-changeassign.xml
new file mode 100644
index 0000000..bef4a8d
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-changeassign.xml
@@ -0,0 +1,85 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-changeassign' mode='sync'>
+<block atomic="true"><switch test="`$vf-module-service-data.oper-status.order-status == Active`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid service-data order status'/></return></outcome></switch><call module='VNF-API' rpc='vf-module-topology-assign-vnf-networks' mode='sync' ></call><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ and generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id"
+ pfx="tmp.AnAI.vfmodule"><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"/></return></outcome></get-resource><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id
+ AND related-to = l3-network" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while deleting existing vf-module l3-network relationship in AnAI with with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id + ' vf-module update FAILED.'`"/></return></outcome></delete><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="i" start="0" end="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id" >
+
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`' | An error occurred while saving l3-network relationship with network-id = ' + $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id + ' for vf-module with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and generic-vnf-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`" />
+</set><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id
+ AND related-to = l3-network" ></delete><switch test="`$tmp.AnAI.vfmodule.relationship-list.relationship_length`"><outcome value=''>
+<set>
+ <parameter name="tmp.AnAI.vfmodule.relationship-list.relationship_length" value = "0" /></set></outcome></switch><for index="i" start="0" end="`$tmp.AnAI.vfmodule.relationship-list.relationship_length`"><switch test="`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].related-to`"><outcome value='l3-network'><block atomic='true'><switch test="`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length`"><outcome value=''>
+<set>
+ <parameter name="tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length" value = "0" /></set></outcome></switch><for index="j" start="0" end="`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id" >
+
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data[$j].relationship-value`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$error-message + ' | An error occurred while during rollback of l3-network relationship for vf-module with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and generic-vnf-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`" />
+</set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$error-message + ' | An error occurred while during rollback of l3-network relationship for vf-module with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and generic-vnf-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`" />
+</set></outcome></save></for></block></outcome></switch></for><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to update vf-module l3-network relationship in AnAI. ' + $error-message`"/></return></block></outcome></save></for><set>
+ <parameter name="vf-module-service-data.oper-status.last-order-status" value="`$vf-module-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.order-status" value="PendingUpdate"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.last-action" value="`$vf-module-service-data.request-information.request-action`"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-delete.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-delete.xml
new file mode 100644
index 0000000..e8c1f43
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-delete.xml
@@ -0,0 +1,35 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-delete' mode='sync'>
+<block atomic="true"><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id == $vf-module-service-data.vf-module-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value='vf-module-id not found in SDNC'/></return></outcome></switch><switch test="`$vf-module-service-data.oper-status.order-status == Active`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch><set>
+ <parameter name="vf-module-service-data.oper-status.last-order-status" value="`$vf-module-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.order-status" value="Deleted"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.last-action" value="`$vf-module-service-data.request-information.request-action`"/></set><set>
+ <parameter name="vf-module-service-data.vf-module-topology-information." value="" />
+</set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-operation.xml
new file mode 100644
index 0000000..e0c3246
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-operation.xml
@@ -0,0 +1,90 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-operation' mode='sync'>
+<block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="vf-module-topology-operation"/>
+<parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$vf-module-topology-operation-input.request-information.source`"/>
+<parameter name="field6" value="`$vf-module-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$vf-module-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$vf-module-topology-operation-input.service-information.service-id`"/>
+<parameter name="field9" value="`$vf-module-topology-operation-input.service-information.service-type`"/>
+<parameter name="field10" value="`$vf-module-topology-operation-input.service-information.subscriber-name`"/>
+<parameter name="field11" value="`$vf-module-topology-operation-input.service-information.service-instance-id`"/>
+<parameter name="field12" value="`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-id`"/>
+<parameter name="field13" value="`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-model-id`"/>
+<parameter name="field14" value="`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-name`"/>
+<parameter name="field15" value="`$vf-module-topology-operation-input.vf-module-topology-information.request-version`"/>
+<parameter name="field16" value="`$vf-module-topology-operation-input.vf-module-topology-information.vnf-instance-id`"/>
+<parameter name="field17" value="`$vf-module-topology-operation-input.vf-module-topology-information.vnf-model-id`"/>
+<parameter name="field18" value="`$vf-module-topology-operation-input.vf-module-topology-information.vnf-instance-name`"/>
+<parameter name="field19" value="`$vf-module-topology-operation-input.vf-module-topology-information.aic-cloud-region`"/>
+<parameter name="field20" value="`$vf-module-topology-operation-input.vf-module-topology-information.tenant`"/></record><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-name`"><outcome value='Other'><switch test="`$vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-name`"><outcome value='Other'><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-name == $vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-name`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value='vf-module-name not found in vf-module-preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='No preload data found to match vf-module-name'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-module-name is required'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-model-id`"><outcome value='Other'><switch test="`$vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`"><outcome value='Other'><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-model-id == $vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value='vf-module-model-id not found in vf-module-preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='No preload data found to match vf-module-model-id from input'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-module-model-id is required'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-module-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-module-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-instance-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-instance-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-instance-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-instance-name cannot be NULL'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-model-id`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-model-id cannot be NULL'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region cannot be NULL'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.sdnc-request-header.svc-action`">
+<!--
+leaf svc-action {
+ type enumeration {
+ enum "reserve";
+ enum "assign";
+ enum "activate"; // equal to commit
+ enum "delete"; // equal to commit
+ enum "changeassign";
+ enum "changedelete";
+ enum "rollback";
+ }
+}
+-->
+
+<outcome value='assign'><call module='VNF-API' rpc='vf-module-topology-assign' mode='sync' ></call></outcome><outcome value='changeassign'><call module='VNF-API' rpc='vf-module-topology-changeassign' mode='sync' ></call></outcome><outcome value='activate'><call module='VNF-API' rpc='vf-module-topology-activate' mode='sync' ></call></outcome><outcome value='rollback'><call module='VNF-API' rpc='vf-module-topology-rollback' mode='sync' ></call></outcome><outcome value='delete'><call module='VNF-API' rpc='vf-module-topology-delete' mode='sync' ></call></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='svc-action not recognized'/>
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-rollback.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-rollback.xml
new file mode 100644
index 0000000..d0d80da
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-rollback.xml
@@ -0,0 +1,35 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-rollback' mode='sync'>
+<block atomic="true"><switch test="`$vf-module-service-data.oper-status.order-status == PendingCreate`"><outcome value='true'><block atomic="true"><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id == $vf-module-service-data.vf-module-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value="`'vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' not found in SDNC'`"/></return></outcome></switch><switch test="`$vf-module-service-data.oper-status.order-status == PendingCreate`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch><set>
+ <parameter name="vf-module-service-data.oper-status.last-order-status" value="`$vf-module-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.order-status" value="Deleted"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.last-action" value="`$vf-modules-service-data.request-information.request-action`"/></set><set>
+ <parameter name="vf-module-service-data." value="" />
+</set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-activate.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-activate.xml
new file mode 100644
index 0000000..0f07fcf
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-activate.xml
@@ -0,0 +1,42 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-activate' mode='sync'>
+<block atomic="true"><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id == $vnf-instance-service-data.vnf-instance-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="`'vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id + ' not found in SDNC'`"/></return></outcome></switch><switch test="`$vnf-instance-service-data.oper-status.order-status == PendingCreate`"><outcome value='false'><switch test="`$vnf-instance-service-data.oper-status.order-status == PendingUpdate`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch></outcome></switch><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-order-status" value="`$vnf-instance-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.order-status" value="Active"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-action" value="`$vnf-instance-service-data.request-information.request-action`"/></set><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id" >
+<parameter name="orchestration-status" value="active" /><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while updating vnf-instance orchestration-status in AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while updating vnf-instance orchestration-status in AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></return></outcome></update><set>
+ <parameter name="vnf-instance-service-data." value="vnf-instance-topology-operation-input." /></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign-vnf-networks.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign-vnf-networks.xml
new file mode 100644
index 0000000..40e8429
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign-vnf-networks.xml
@@ -0,0 +1,130 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-assign-vnf-networks' mode='sync'>
+<block atomic="true"><switch test="`$vnf-instance-preload-data.oper-status.order-status == PendingAssignment`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid preload-data order status'/></return></outcome></switch><set>
+ <parameter name="vnf-instance-service-data." value="vnf-instance-preload-data." /></set><set>
+ <parameter name="vnf-instance-service-data." value="vnf-instance-topology-operation-input." /></set><set>
+ <parameter name="vnf-instance-service-data.vnf-instance-id" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></set><switch test="`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''><set>
+<parameter name = "vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length" value="0" />
+</set></outcome></switch><for index="j" start="0" end="`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><block atomic="true">
+<set>
+<parameter name='tmp.usePreload' value='1' />
+<parameter name='tmp.AnAI.l3network.' value='' />
+</set><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks_length`"><outcome value=''><set>
+<parameter name='vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks_length' value='0' />
+</set></outcome></switch><block atomic="true">
+<for index="i" start="0" end="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks_length`"><switch test="`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-role == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-role`"><outcome value='true'>
+<block atomic="true">
+<set>
+<parameter name='tmp.usePreload' value='0' />
+</set><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id == '' or $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id == '0'`"><outcome value='false'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id"
+ pfx="tmp.AnAI.l3network">
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying AnAI for l3-network with network-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id`" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome></get-resource></outcome><outcome value='true'>
+<switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name == '' or $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name == '0'`"><outcome value='true'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome><outcome value='false'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name"
+ pfx="tmp.AnAI.l3network">
+
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying AnAI for l3-network with network-name = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name`" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome></get-resource></outcome></switch></outcome></switch><switch test="`$tmp.usePreload == 0`"><outcome value='true'>
+<block>
+<switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="k" start="0" end="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-role`"><outcome value='true'>
+<block>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-name" value="`$tmp.AnAI.l3network.network-name`" />
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-id" value="`$tmp.AnAI.l3network.network-id`" />
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].neutron-id" value="`$tmp.AnAI.l3network.neutron-network-id`" />
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn" value="`$tmp.AnAI.l3network.contrail-network-fqdn`" />
+</set><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-id != ''`"><outcome value='true'>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-id`" /></set></outcome><outcome value='false'>
+<switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-id != ''`"><outcome value='true'>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-id`" /></set></outcome><outcome value='false'>
+<switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch></block></outcome></switch></for></block></outcome></switch></block></outcome></switch></for><switch test="`$tmp.usePreload == 1`"><outcome value='true'><block atomic="true">
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-name"
+ pfx="tmp.AnAI.l3network">
+<outcome value='not-found'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'PRELOAD network-name = ' + $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' not found in AnAI'`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying AnAI for l3-network with network-name = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$j].network-name`" />
+</return></outcome><outcome value='success'>
+<switch test="`$tmp.AnAI.l3network.network-id == ''`"><outcome value='true'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying l3-network with network-name = ' + $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' , it is likely that there are more than one l3-newtork object with the same network-name in AnAI.'`" />
+</return></outcome></switch></outcome></get-resource><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="k" start="0" end="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-role`"><outcome value='true'>
+<block><set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-name" value="`$tmp.AnAI.l3network.network-name`" />
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-id" value="`$tmp.AnAI.l3network.network-id`" />
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].neutron-id" value="`$tmp.AnAI.l3network.neutron-network-id`" />
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn" value="`$tmp.AnAI.l3network.contrail-network-fqdn`" />
+
+</set><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id == ''`"><outcome value='true'>
+<switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id == ''`"><outcome value='true'>
+<switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch></block></outcome></switch></for></block></outcome></switch></block></block></for><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign.xml
new file mode 100644
index 0000000..ca5ff84
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign.xml
@@ -0,0 +1,58 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-assign' mode='sync'>
+<block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id"
+ pfx="tmp.AnAI.vnf-instance" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying generic-vnf from AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'generic-vnf not found in AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></return></outcome></get-resource><call module='VNF-API' rpc='vnf-instance-topology-assign-vnf-networks' mode='sync' ></call><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''><set>
+<parameter name='vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id" >
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id`" /><outcome value='failure'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id
+ AND related-to = l3-network" ></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while saving generic-vnf l3-network relationship in AnAI with network-id = ' + $vnf-instance.service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id`"/></return></block></outcome></save></for><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id" >
+ <parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
+<block atomic="true">
+<delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id
+ AND related-to = l3-network" ></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="An error occurred while updating vnf-instance orchestration-status in AnAI"/></return></block></outcome></update><set>
+ <parameter name="vnf-instance-service-data.oper-status.order-status" value="PendingCreate"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-changeassign.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-changeassign.xml
new file mode 100644
index 0000000..6b1c1f2
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-changeassign.xml
@@ -0,0 +1,80 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-changeassign' mode='sync'>
+<block atomic="true"><switch test="`$vnf-instance-service-data.oper-status.order-status == Active`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid service-data order status'/></return></outcome></switch><call module='VNF-API' rpc='vnf-instance-topology-assign-vnf-networks' mode='sync' ></call><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id"
+ pfx="tmp.AnAI.vnf-instance" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying generic-vnf from AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying generic-vnf from AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></return></outcome></get-resource><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id
+ AND related-to = l3-network" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while deleting existing l3-network relationship in AnAI with with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id + ' vnf-instance update FAILED.'`"/></return></outcome></delete><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="i" start="0" end="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id" >
+
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id`" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`' | An error occurred while saving l3-network relationship with network-id = ' + $vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id + ' for vnf-instance with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`" />
+</set><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id
+ AND related-to = l3-network" ></delete><switch test="`$tmp.AnAI.vnf-instance.relationship-list.relationship_length`"><outcome value=''>
+<set>
+ <parameter name="tmp.AnAI.vnf-instance.relationship-list.relationship_length" value = "0" /></set></outcome></switch><for index="i" start="0" end="`$tmp.AnAI.vnf-instance.relationship-list.relationship_length`"><switch test="`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].related-to`"><outcome value='l3-network'><block atomic='true'><switch test="`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length`"><outcome value=''>
+<set>
+ <parameter name="tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length" value = "0" /></set></outcome></switch><for index="j" start="0" end="`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id" >
+
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data[$j].relationship-value`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$error-message + ' | An error occurred while during rollback of l3-network relationship for vnf-instance with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`" />
+</set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$error-message + ' | An error occurred while during rollback of l3-network relationship for vnf-instance with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`" />
+</set></outcome></save></for></block></outcome></switch></for><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to update vnf-instance l3-network relationship in AnAI. ' + $error-message`"/></return></block></outcome></save></for><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-order-status" value="`$vnf-instance-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.order-status" value="PendingUpdate"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-action" value="`$vnf-instance-service-data.request-information.request-action`"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-delete.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-delete.xml
new file mode 100644
index 0000000..1c683be
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-delete.xml
@@ -0,0 +1,35 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-delete' mode='sync'>
+<block atomic="true"><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vf-module-id == $vf-module-service-data.vnf-instance-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value='vf-module-id not found in SDNC'/></return></outcome></switch><switch test="`$vnf-instance-service-data.oper-status.order-status == Active`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-order-status" value="`$vnf-instance-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.order-status" value="Deleted"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-action" value="`$vnf-instance-service-data.request-information.request-action`"/></set><set>
+ <parameter name="vnf-instance-service-data.vnf-instance-topology-information." value="" />
+</set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-operation.xml
new file mode 100644
index 0000000..322819b
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-operation.xml
@@ -0,0 +1,65 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-operation' mode='sync'>
+<block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="vnf-instance-topology-operation"/>
+<parameter name="field3" value="`$vnf-instance-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$vnf-instance-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$vnf-instance-topology-operation-input.request-information.source`"/>
+<parameter name="field6" value="`$vnf-instance-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$vnf-instance-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$vnf-instance-topology-operation-input.service-information.service-id`"/>
+<parameter name="field9" value="`$vnf-instance-topology-operation-input.service-information.service-type`"/>
+<parameter name="field10" value="`$vnf-instance-topology-operation-input.service-information.subscriber-name`"/>
+<parameter name="field11" value="`$vnf-instance-topology-operation-input.service-information.service-instance-id`"/>
+<parameter name="field12" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.request-version`"/>
+<parameter name="field13" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/>
+<parameter name="field14" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-model-id`"/>
+<parameter name="field15" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-name`"/>
+<parameter name="field16" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.aic-cloud-region`"/>
+<parameter name="field17" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.tenant`"/></record><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-name`"><outcome value='Other'><switch test="`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-instance-name`"><outcome value='Other'><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-name == $vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-instance-name`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value='vnf-instance-name from input not found in vnf-instance-preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='No preload data found to match vnf-instance-name from input'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-instance-name is required'/></return></outcome></switch><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-model-id`"><outcome value='Other'><switch test="`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id`"><outcome value='Other'><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-model-id == $vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value='request.vnf-model-id not found in vnf-instance-preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='No preload data found to match vnf-model-id from input'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-model-id is required'/></return></outcome></switch><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-instance-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-instance-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region cannot be NULL'/></return></outcome></switch><switch test="`$vnf-instance-topology-operation-input.sdnc-request-header.svc-action`">
+<outcome value='assign'><call module='VNF-API' rpc='vnf-instance-topology-assign' mode='sync' ></call></outcome><outcome value='changeassign'><call module='VNF-API' rpc='vnf-instance-topology-changeassign' mode='sync' ></call></outcome><outcome value='activate'><call module='VNF-API' rpc='vnf-instance-topology-activate' mode='sync' ></call></outcome><outcome value='rollback'><call module='VNF-API' rpc='vnf-instance-topology-rollback' mode='sync' ></call></outcome><outcome value='delete'><call module='VNF-API' rpc='vnf-instance-topology-delete' mode='sync' ></call></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='svc-action not recognized'/>
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-rollback.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-rollback.xml
new file mode 100644
index 0000000..2ef2041
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-rollback.xml
@@ -0,0 +1,35 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-rollback' mode='sync'>
+<block atomic="true"><switch test="`$vnf-instance-service-data.oper-status.order-status == PendingCreate`"><outcome value='true'><block atomic="true"><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id == $vnf-instance-service-data.vnf-instance-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value="`'vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id + ' not found in SDNC'`"/></return></outcome></switch><switch test="`$vnf-instance-service-data.oper-status.order-status == PendingCreate`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-order-status" value="`$vnf-instance-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.order-status" value="Deleted"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-action" value="`$vnf-instances-service-data.request-information.request-action`"/></set><set>
+ <parameter name="vnf-instance-service-data." value="" />
+</set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-activate.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-activate.xml
new file mode 100644
index 0000000..81ad5bf
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-activate.xml
@@ -0,0 +1,65 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-activate' mode='sync'>
+<block atomic="true"><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="`'vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' not found in config tree'`"/></return></outcome></switch><switch test="`$service-data.oper-status.order-status == PendingCreate`">
+
+<!--
+leaf order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "Deleted";
+ }
+}
+--><outcome value='false'><switch test="`$service-data.oper-status.order-status == PendingUpdate`">
+
+<!--
+leaf order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "Deleted";
+ }
+}
+--><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid last-order-status'/></return></outcome></switch></outcome></switch><set>
+ <parameter name="service-data.oper-status.last-order-status" value="`$service-data.oper-status.order-status`"/></set><set>
+ <parameter name="service-data.oper-status.order-status" value="Active"/></set><set>
+ <parameter name="service-data.oper-status.last-action" value="`$service-data.request-information.request-action`"/></set><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ local-only="false" >
+ <parameter name="orchestration-status" value="active" /><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Encountered error while updating vf-module orchestration-status in AnAI with vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"/></return></outcome></update><set>
+ <parameter name="service-data." value="vnf-topology-operation-input." /></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign-vfmodule.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign-vfmodule.xml
new file mode 100644
index 0000000..e297a90
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign-vfmodule.xml
@@ -0,0 +1,148 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-assign-vfmodule' mode='sync'>
+<block atomic="true"><switch test="`$preload-data.oper-status.order-status == PendingAssignment`">
+<!--
+leaf order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "Deleted";
+ }
+}
+--><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid preload-data order status'/></return></outcome></switch><set>
+ <parameter name="service-data." value="preload-data." /></set><set>
+ <parameter name="service-data." value="vnf-topology-operation-input." /></set><set>
+ <parameter name="service-data.vnf-id" value="`$vnf-topology-operation-input.vnf-request-information.vnf-id`"/>
+ <parameter name="service-data.service-information.service-instance-id" value="`$vnf-topology-operation-input.service-information.service-instance-id`"/>
+ <parameter name="service-data.vnf-request-information.vnf-id" value="`$vnf-topology-operation-input.vnf-request-information.vnf-id`"/>
+ <parameter name="service-data.vnf-topology-information.vnf-topology-identifier.vnf-id" value="`$vnf-topology-operation-input.vnf-request-information.vnf-id`"/></set><switch test="`$preload-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''><set>
+<parameter name = "preload-data.vnf-topology-information.vnf-assignments.vnf-networks_length" value="0" />
+</set></outcome></switch><for index="j" start="0" end="`$preload-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><block atomic="true">
+<set>
+<parameter name='tmp.usePreload' value='1' />
+<parameter name='tmp.AnAI.l3network.' value='' />
+</set><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks_length`"><outcome value=''><set>
+<parameter name='vnf-topology-operation-input.vnf-request-information.vnf-networks_length' value='0' />
+</set></outcome></switch><block atomic="true">
+<for index="i" start="0" end="`$vnf-topology-operation-input.vnf-request-information.vnf-networks_length`"><switch test="`$preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-role == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-role`"><outcome value='true'>
+<block atomic="true">
+<set>
+<parameter name='tmp.usePreload' value='0' />
+</set><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id == '' or $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id == '0'`"><outcome value='false'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id"
+ local-only="false"
+ pfx="tmp.AnAI.l3network">
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'Failed to query AnAI for l3-network with network-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id`" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome></get-resource></outcome><outcome value='true'>
+<switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name == '' or $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name == '0'`"><outcome value='true'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome><outcome value='false'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name"
+ local-only="false"
+ pfx="tmp.AnAI.l3network">
+
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'Failed to query AnAI for l3-network with network-name = ' + $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name`" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome></get-resource></outcome></switch></outcome></switch><switch test="`$tmp.usePreload == 0`"><outcome value='true'>
+<block>
+<switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="k" start="0" end="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-role`"><outcome value='true'>
+<block>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-name" value="`$tmp.AnAI.l3network.network-name`" />
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-id" value="`$tmp.AnAI.l3network.network-id`" />
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].neutron-id" value="`$tmp.AnAI.l3network.neutron-network-id`" />
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn" value="`$tmp.AnAI.l3network.contrail-network-fqdn`" />
+</set><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-id != ''`"><outcome value='true'>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-id`" /></set></outcome><outcome value='false'>
+<switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-name`"><outcome value='true'>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-id != ''`"><outcome value='true'>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-id`" /></set></outcome><outcome value='false'>
+<switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-name`"><outcome value='true'>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch></block></outcome></switch></for></block></outcome></switch></block></outcome></switch></for><switch test="`$tmp.usePreload == 1`"><outcome value='true'><block atomic="true">
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-name"
+ local-only="false"
+ pfx="tmp.AnAI.l3network">
+<outcome value='not-found'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'PRELOAD network-name = ' + $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' not found in AnAI'`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'Failed to query AnAI for l3-network with network-name = ' + $vnf-topology-operation-input.vnf-request-information.vnf-networks[$j].network-name`" />
+</return></outcome><outcome value='success'>
+<switch test="`$tmp.AnAI.l3network.network-id == ''`"><outcome value='true'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying l3-network with network-name = ' + $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' , it is likely that there are more than one l3-newtork object with the same network-name in AnAI.'`" />
+</return></outcome></switch></outcome></get-resource><switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="k" start="0" end="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-role == $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-role`"><outcome value='true'>
+<block>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-name" value="`$tmp.AnAI.l3network.network-name`" />
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-id" value="`$tmp.AnAI.l3network.network-id`" />
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].neutron-id" value="`$tmp.AnAI.l3network.neutron-network-id`" />
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn" value="`$tmp.AnAI.l3network.contrail-network-fqdn`" />
+
+</set><switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id == ''`"><outcome value='true'>
+<switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-name`"><outcome value='true'>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch><switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id == ''`"><outcome value='true'>
+<switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name`"><outcome value='true'>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch></block></outcome></switch></for></block></outcome></switch></block></block></for><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign.xml
new file mode 100644
index 0000000..50c2f0c
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign.xml
@@ -0,0 +1,72 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-assign' mode='sync'>
+<block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ and generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ local-only="false"
+ pfx="tmp.AnAI.vfmodule" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Encountered error while querying vf-module from AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'vf-module not found in AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"/></return></outcome></get-resource><call module='VNF-API' rpc='vnf-topology-assign-vfmodule' mode='sync' ></call><switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''><set>
+<parameter name='service-data.vnf-topology-information.vnf-assignments.vnf-networks_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ and generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ force="true"
+ local-only="false">
+
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`" /><outcome value='failure'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id
+ AND related-to = l3-network"
+ force="true"
+ local-only="false"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Encountered error while saving vf-module l3-network relationship in AnAI with network-id = ' + $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`"/></return></block></outcome></save></for><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ and generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ local-only="false" >
+ <parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
+<block atomic="true">
+<delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id
+ AND related-to = l3-network"
+ force="true"
+ local-only="false"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="Encountered error while updating vf-module orchestration-status in AnAI"/></return></block></outcome></update><set>
+ <parameter name="service-data.oper-status.order-status" value="PendingCreate"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changeassign.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changeassign.xml
new file mode 100644
index 0000000..68f1162
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changeassign.xml
@@ -0,0 +1,100 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-changeassign' mode='sync'>
+<block atomic="true"><switch test="`$service-data.oper-status.order-status == Active`">
+<!--
+leaf order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "Deleted";
+ }
+}
+--><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid service-data order status'/></return></outcome></switch><call module='VNF-API' rpc='vnf-topology-assign-vfmodule' mode='sync' ></call><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ and generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ local-only="false"
+ pfx="tmp.AnAI.vfmodule"><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"/></return></outcome></get-resource><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id
+ AND related-to = l3-network"
+ force="true"
+ local-only="false"><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while deleting existing vf-module l3-network relationship in AnAI with with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id + ' vf-module update FAILED.'`"/></return></outcome></delete><for index="i" start="0" end="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ force="true"
+ local-only="false">
+
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`" /><outcome value='failure'>
+<block>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`' | An error occurred while saving l3-network relationship with network-id = ' + $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id + ' for vf-module with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`" />
+</set><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id
+ AND related-to = l3-network"
+ force="true"
+ local-only="false"></delete><for index="i" start="0" end="`$tmp.AnAI.vfmodule.relationship-list.relationship_length`"><switch test="`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].related-to`"><outcome value='l3-network'><for index="j" start="0" end="`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ force="true"
+ local-only="false">
+
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data[$j].relationship-value`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$error-message + ' | An error occurred while during rollback of l3-network relationship for vf-module with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`" />
+</set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$error-message + ' | An error occurred while during rollback of l3-network relationship for vf-module with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`" />
+</set></outcome></save></for></outcome></switch></for><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to update vf-module l3-network relationship in AnAI. ' + $error-message`"/></return></block></outcome></save></for><set>
+ <parameter name="service-data.oper-status.last-order-status" value="`$service-data.oper-status.order-status`"/></set><set>
+ <parameter name="service-data.oper-status.order-status" value="PendingUpdate"/></set><set>
+ <parameter name="service-data.oper-status.last-action" value="`$service-data.request-information.request-action`"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changedelete.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changedelete.xml
new file mode 100644
index 0000000..6bb6392
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changedelete.xml
@@ -0,0 +1,53 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-changedelete' mode='sync'>
+<block atomic="true"><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-id not found'/></return></outcome></switch><switch test="'$service-data.oper-status.order-status == Active'">
+
+<!--
+leaf order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "Deleted";
+ }
+}
+--><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid last-order-status'/></return></outcome></switch><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf"
+ key="vnf-id = $vnf-topology-operation-input.vnf-request-information.vnf-id"
+ force="true"
+ local-only="false" >
+ <parameter name="orchestration-status" value="pending-delete" />
+</update><set>
+ <parameter name="service-data.oper-status.last-order-status" value="`$service-data.oper-status.order-status`"/></set><set>
+ <parameter name="service-data.oper-status.order-status" value="PendingDelete"/></set><set>
+ <parameter name="service-data.oper-status.last-action" value="`$service-data.request-information.request-action`"/></set><set>
+ <parameter name="service-data." value="vnf-topology-operation-input." />
+</set><return status='success'>
+ <parameter name="error-code" value="200" />
+</return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-delete.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-delete.xml
new file mode 100644
index 0000000..31e6186
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-delete.xml
@@ -0,0 +1,74 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-delete' mode='sync'>
+<block atomic="true"><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-id not found'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`"><outcome value='Other'>
+<switch test="`$service-data.oper-status.order-status == Active`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch></outcome><outcome value=''><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-clli`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Either aic-cloud-region or aic-clli must be present'/></return></outcome><outcome value='Other'>
+<block>
+<delete plugin="org.openecomp.sdnc.sli.resource.sql.SqlResource"
+ resource="generic-vnf-l3-network"
+ key="DELETE FROM GENERIC_VNF_L3_NETWORK WHERE vnf_id = $service-data.vnf-id"
+ force="true" >
+
+<outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occurred while deleting generic-vnf, generic-vnf-l3-netweork or generic-vnf-vserver from GammaResource"/></set></outcome></delete><delete plugin="org.openecomp.sdnc.sli.resource.sql.SqlResource"
+ resource="generic-vnf-vserver"
+ key="DELETE FROM GENERIC_VNF_VSERVER where vnf_id = $service-data.vnf-id"
+ force="true" >
+
+<outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occurred while deleting generic-vnf, generic-vnf-l3-netweork or generic-vnf-vserver from GammaResource"/></set></outcome></delete><delete plugin="org.openecomp.sdnc.sli.resource.sql.SqlResource"
+ resource="generic-vnf"
+ key="DELETE FROM GENERIC_VNF where vnf_id = $service-data.vnf-id"
+ local-only="true"
+ force="true" >
+
+<outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occurred while deleting generic-vnf, generic-vnf-l3-netweork or generic-vnf-vserver from GammaResource"/></set></outcome></delete><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $service-data.vnf-id"
+ local-only="false"
+ force="true" >
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to delete generic-vnf from AnAI with vnf-id = '+ $service-data.vnf-id`"/></return></outcome></delete></block></outcome></switch></outcome></switch><set>
+ <parameter name="service-data.oper-status.last-order-status" value="`$service-data.oper-status.order-status`"/></set><set>
+ <parameter name="service-data.oper-status.order-status" value="Deleted"/></set><set>
+ <parameter name="service-data.oper-status.last-action" value="`$service-data.request-information.request-action`"/></set><set>
+ <parameter name="service-data.vnf-topology-information." value="" />
+</set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-operation.xml
new file mode 100644
index 0000000..8eea2a1
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-operation.xml
@@ -0,0 +1,131 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-operation' mode='sync'>
+<block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="svc-topology-operation"/>
+<parameter name="field3" value="`$vnf-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$vnf-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$vnf-topology-operation-input.service-information.service-instance-id`"/>
+<parameter name="field6" value="`$vnf-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$vnf-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$vnf-topology-operation-input.request-information.source`"/>
+<parameter name="field9" value="`$vnf-topology-operation-input.vnf-request-information.vnf-name`"/>
+<parameter name="field10" value="`$vnf-topology-operation-input.vnf-request-information.vnf-type`"/>
+<parameter name="field11" value="`$vnf-topology-operation-input.vnf-request-information.vnf-id`"/>
+<parameter name="field12" value="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`"/>
+<parameter name="field13" value="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`"/>
+<parameter name="field14" value="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"/>
+<parameter name="field15" value="`$vnf-topology-operation-input.vnf-request-information.tenant`"/>
+<parameter name="field16" value="`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-name`"/>
+<parameter name="field17" value="`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-type`"/>
+<parameter name="field18" value="`$preload-data.oper-status.order-status`"/></record><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-name`"><outcome value='Other'><switch test="`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-name`"><outcome value='Other'><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-name == $preload-data.vnf-topology-information.vnf-topology-identifier.vnf-name`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='request.vnf-name not found in preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='No preload data found to match vnf-name'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-name is required'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-type`"><outcome value='Other'><switch test="`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-type`"><outcome value='Other'><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-type == $preload-data.vnf-topology-information.vnf-topology-identifier.vnf-type`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='request.vnf-type not found in preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='No preload data found to match vnf-type'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-type is required'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-modules vnf-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-modules vnf-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.sdnc-request-header.svc-action`">
+<!--
+leaf svc-action {
+ type enumeration {
+ enum "reserve";
+ enum "assign";
+ enum "activate"; // equal to commit
+ enum "delete"; // equal to commit
+ enum "changeassign";
+ enum "changedelete";
+ enum "rollback";
+ }
+}
+-->
+
+<outcome value='assign'><block>
+<block atomic="true">
+<switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-name cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-type cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region cannot be NULL'/></return></outcome></switch></block><call module='VNF-API' rpc='vnf-topology-assign' mode='sync' ></call></block></outcome><outcome value='changeassign'><block>
+<block atomic="true">
+<switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-name cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-type cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region cannot be NULL'/></return></outcome></switch></block><call module='VNF-API' rpc='vnf-topology-changeassign' mode='sync' ></call></block></outcome><outcome value='activate'><block>
+<block atomic="true">
+<switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-name cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-type cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region cannot be NULL'/></return></outcome></switch></block><call module='VNF-API' rpc='vnf-topology-activate' mode='sync' ></call></block></outcome><outcome value='rollback'><block>
+<block atomic="true">
+<switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-name cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-type cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region cannot be NULL'/></return></outcome></switch></block><call module='VNF-API' rpc='vnf-topology-rollback' mode='sync' ></call></block></outcome><outcome value='changedelete'><block atomic="true">
+<switch test="`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`"><outcome value='other'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region can not be present for 1604 VNF changedelete'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-clli`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region can not be present for 1604 VNF changedelete'/></return></outcome></switch><call module='VNF-API' rpc='vnf-topology-changedelete' mode='sync' ></call></block></outcome><outcome value='delete'><call module='VNF-API' rpc='vnf-topology-delete' mode='sync' ></call></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='svc-action not recognized'/>
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-rollback.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-rollback.xml
new file mode 100644
index 0000000..1724502
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-rollback.xml
@@ -0,0 +1,46 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 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=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-rollback' mode='sync'>
+<block atomic="true"><switch test="`$service-data.oper-status.order-status == PendingCreate`">
+
+<!--
+leaf order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "Deleted";
+ }
+}
+--><outcome value='true'><block atomic="true"><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="`'vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' not found in config tree'`"/></return></outcome></switch><switch test="`$service-data.oper-status.order-status == PendingCreate`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch><set>
+ <parameter name="service-data.oper-status.last-order-status" value="`$service-data.oper-status.order-status`"/></set><set>
+ <parameter name="service-data.oper-status.order-status" value="Deleted"/></set><set>
+ <parameter name="service-data.oper-status.last-action" value="`$service-data.request-information.request-action`"/></set><set>
+ <parameter name="service-data." value="" />
+</set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></outcome></switch></block></method></service-logic>
diff --git a/pom.xml b/pom.xml
new file mode 100755
index 0000000..0114d78
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,86 @@
+<?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/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>root</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.oam</groupId>
+ <artifactId>sdnc-oam</artifactId>
+
+ <name>SDN-C OAM</name>
+ <url>https://wiki.openecomp.org</url>
+ <description>The SDN-C OAM component contains the components needed to operate, administer and maintain the SDN-C platform.</description>
+
+
+ <issueManagement>
+ <system>JIRA</system>
+ <url>https://jira.openecomp.org/</url>
+ </issueManagement>
+
+ <scm>
+ <connection>scm:git:ssh://git@${openecomp.git.host}/sdnc-oam.git</connection>
+ <developerConnection>scm:git:ssh://${openecomp.git.host}:${openecomp.git.port}/${openecomp.git.project}/sdnc-oam.git</developerConnection>
+ <url>${openecomp.git.protocol}://${openecomp.git.host}/projects/${openecomp.git.project}/repos/sdnc-oam/browse</url>
+ <tag>HEAD</tag>
+ </scm>
+
+ <ciManagement>
+ <system>Jenkins</system>
+ <url>https://jenkins.openecomp.org/</url>
+ </ciManagement>
+
+ <distributionManagement>
+ <site>
+ <id>sdnc-javadoc</id>
+ <url>dav:https://${openecomp.nexus.host}:${openecomp.nexus.port}/repository/sdn-c-javadoc/${project.artifactId}/${project.version}</url>
+ </site>
+ </distributionManagement>
+
+ <build>
+ <plugins>
+ <!-- Blackduck plugin breaks release build
+ <plugin>
+ <groupId>com.blackducksoftware.integration</groupId>
+ <artifactId>hub-maven-plugin</artifactId>
+ <version>1.4.0</version>
+ <inherited>false</inherited>
+ <configuration>
+ <hubProjectName>${project.name}</hubProjectName>
+ <outputDirectory>${project.basedir}</outputDirectory>
+ </configuration>
+ <executions>
+ <execution>
+ <id>create-bdio-file</id>
+ <phase>package</phase>
+ <goals>
+ <goal>createHubOutput</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+ </plugins>
+
+ </build>
+ <modules>
+ <module>admportal</module>
+<!-- <module>chef</module> -->
+ <module>platform-logic</module>
+ <module>installation</module>
+<!--
+ <module>license</module>
+-->
+ </modules>
+ <organization>
+ <name>AT&T</name>
+ </organization>
+ <version>1.0.0</version>
+
+
+</project>
diff --git a/version.properties b/version.properties
new file mode 100644
index 0000000..494186b
--- /dev/null
+++ b/version.properties
@@ -0,0 +1,14 @@
+###########################################################
+# Versioning variables
+# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... )
+# because they are used in Jenkins, whose plug-in doesn't support
+
+release_name=0
+sprint_number=1
+feature_revision=2
+
+base_version=${release_name}.${sprint_number}.${feature_revision}
+
+release_version=${base_version}
+snapshot_version=${base_version}-SNAPSHOT
+